From owner-dev-commits-ports-main@freebsd.org Sun Sep 19 18:16:43 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 553AD66F1F4; Sun, 19 Sep 2021 18:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HCG9R0w6cz4SG4; Sun, 19 Sep 2021 18:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8030321E01; Sun, 19 Sep 2021 18:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18JIGglb027698; Sun, 19 Sep 2021 18:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18JIGgbO027697; Sun, 19 Sep 2021 18:16:42 GMT (envelope-from git) Date: Sun, 19 Sep 2021 18:16:42 GMT Message-Id: <202109191816.18JIGgbO027697@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: d8c851df599b - main - biology/py-libsedml: New port: SED-ML library for Python MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8c851df599b59e45eea03ee8a16af78602be1f0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2021 18:16:43 -0000 The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=d8c851df599b59e45eea03ee8a16af78602be1f0 commit d8c851df599b59e45eea03ee8a16af78602be1f0 Author: Yuri Victorovich AuthorDate: 2021-09-19 18:14:45 +0000 Commit: Yuri Victorovich CommitDate: 2021-09-19 18:15:36 +0000 biology/py-libsedml: New port: SED-ML library for Python --- biology/Makefile | 1 + biology/py-libsedml/Makefile | 34 ++++++++++++++++++++++++++ biology/py-libsedml/distinfo | 3 +++ biology/py-libsedml/files/patch-CMakeLists.txt | 22 +++++++++++++++++ biology/py-libsedml/files/quick-test.py | 20 +++++++++++++++ biology/py-libsedml/pkg-descr | 6 +++++ biology/py-libsedml/pkg-plist | 3 +++ 7 files changed, 89 insertions(+) diff --git a/biology/Makefile b/biology/Makefile index f57fe3e300fd..5e85d456e039 100644 --- a/biology/Makefile +++ b/biology/Makefile @@ -152,6 +152,7 @@ SUBDIR += py-macs2 SUBDIR += py-multiqc SUBDIR += py-libnuml + SUBDIR += py-libsedml SUBDIR += py-ont-fast5-api SUBDIR += py-orange3-bioinformatics SUBDIR += py-orange3-single-cell diff --git a/biology/py-libsedml/Makefile b/biology/py-libsedml/Makefile new file mode 100644 index 000000000000..d1432f390993 --- /dev/null +++ b/biology/py-libsedml/Makefile @@ -0,0 +1,34 @@ +PORTNAME= libsedml +DISTVERSIONPREFIX= v +DISTVERSION= 2.0.26 +CATEGORIES= biology devel +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= SED-ML library for Python + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/../../../LICENSE.txt + +BUILD_DEPENDS= swig:devel/swig +LIB_DEPENDS= libsedml.so:biology/libsedml \ + libsbml.so:biology/libsbml \ + libnuml.so:biology/libnuml + +USES= cmake localbase:ldflags python +USE_PYTHON= flavors + +USE_GITHUB= yes +GH_ACCOUNT= fbergmann +GH_PROJECT= libSEDML + +CMAKE_ARGS= -DCMAKE_INSTALL_LIBDIR=lib + +LDFLAGS+= -lsedml -lsbml -lnuml # otherwise it builds a broken shared object, see https://github.com/NuML/NuML/issues/21 + +WRKSRC_SUBDIR= src/bindings/python + +do-test: install + @${PYTHON_CMD} ${FILESDIR}/quick-test.py + +.include diff --git a/biology/py-libsedml/distinfo b/biology/py-libsedml/distinfo new file mode 100644 index 000000000000..305ade0a4d35 --- /dev/null +++ b/biology/py-libsedml/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1632069547 +SHA256 (fbergmann-libSEDML-v2.0.26_GH0.tar.gz) = 74334f2d2e0f4aae2f58f4013c432220ba12a6a6be4cf9478adbbefab7441b41 +SIZE (fbergmann-libSEDML-v2.0.26_GH0.tar.gz) = 956845 diff --git a/biology/py-libsedml/files/patch-CMakeLists.txt b/biology/py-libsedml/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..0a8f6e634f59 --- /dev/null +++ b/biology/py-libsedml/files/patch-CMakeLists.txt @@ -0,0 +1,22 @@ +--- CMakeLists.txt.orig 2021-09-19 17:41:37 UTC ++++ CMakeLists.txt +@@ -49,6 +49,7 @@ ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libsedml_wrap.cpp + COMMAND "${SWIG_EXECUTABLE}" + ARGS -I${CMAKE_CURRENT_SOURCE_DIR}/../swig/ ++ -I${CMAKE_INSTALL_PREFIX}/include + -I${CMAKE_CURRENT_SOURCE_DIR}/../../ + -I${CMAKE_CURRENT_BINARY_DIR}/../../ + -I${CMAKE_CURRENT_SOURCE_DIR}/../../sedml +@@ -125,9 +126,9 @@ if (PYTHON_USE_DYNAMIC_LOOKUP) + if (APPLE) + set_target_properties (binding_python_lib PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") + endif() +- target_link_libraries(binding_python_lib ${LIBSEDML_LIBRARY}-static) ++ target_link_libraries(binding_python_lib ${LIBSEDML_LIBRARY}) + else() +- target_link_libraries(binding_python_lib ${LIBSEDML_LIBRARY}-static ${PYTHON_LIBRARIES}) ++ target_link_libraries(binding_python_lib ${LIBSEDML_LIBRARY} ${PYTHON_LIBRARIES}) + endif() + + # diff --git a/biology/py-libsedml/files/quick-test.py b/biology/py-libsedml/files/quick-test.py new file mode 100644 index 000000000000..59be4485ce6d --- /dev/null +++ b/biology/py-libsedml/files/quick-test.py @@ -0,0 +1,20 @@ +# from https://github.com/fbergmann/libSEDML/issues/152 + +import libsedml + +# create data set +data_set = libsedml.SedDataSet() + +# set id +assert data_set.setId('obj') == 0 + +# check id set +assert data_set.getId() == 'obj' + +# set empty name +assert data_set.setName('') == 0 + +# id is no longer set! +assert data_set.getId() == 'obj' + +print("Test passed"); diff --git a/biology/py-libsedml/pkg-descr b/biology/py-libsedml/pkg-descr new file mode 100644 index 000000000000..c84d1db60018 --- /dev/null +++ b/biology/py-libsedml/pkg-descr @@ -0,0 +1,6 @@ +Python binding libSEDML. + +The libSEDML project makes use of libSBML XML layer as well as code generation +as starting point to produce a library for reading and writing of SED-ML models. + +WWW: https://github.com/fbergmann/libSEDML diff --git a/biology/py-libsedml/pkg-plist b/biology/py-libsedml/pkg-plist new file mode 100644 index 000000000000..81ce476b7592 --- /dev/null +++ b/biology/py-libsedml/pkg-plist @@ -0,0 +1,3 @@ +%%PYTHON_SITELIBDIR%%/libsedml.pth +%%PYTHON_SITELIBDIR%%/libsedml/_libsedml.so +%%PYTHON_SITELIBDIR%%/libsedml/libsedml.py