aboutsummaryrefslogtreecommitdiffstats
path: root/science
diff options
context:
space:
mode:
authoryuri <yuri@FreeBSD.org>2018-07-01 13:22:27 +0800
committeryuri <yuri@FreeBSD.org>2018-07-01 13:22:27 +0800
commit7f2beec7d387986265cc7a0e252e265690d2cfd2 (patch)
treea2c13cc74572e15f5010e0f6d3e1d91bbe8d67b9 /science
parent65414348d81a1f24b70381dd221e9a83abbaddba (diff)
downloadfreebsd-ports-gnome-7f2beec7d387986265cc7a0e252e265690d2cfd2.tar.gz
freebsd-ports-gnome-7f2beec7d387986265cc7a0e252e265690d2cfd2.tar.zst
freebsd-ports-gnome-7f2beec7d387986265cc7a0e252e265690d2cfd2.zip
New port: science/py-rmf: Library to support reading and writing of Rich Molecular Format files
Diffstat (limited to 'science')
-rw-r--r--science/Makefile1
-rw-r--r--science/py-rmf/Makefile28
-rw-r--r--science/py-rmf/distinfo3
-rw-r--r--science/py-rmf/files/patch-CMakeLists.txt62
-rw-r--r--science/py-rmf/files/patch-include_CMakeLists.txt10
-rw-r--r--science/py-rmf/files/patch-swig_CMakeLists.txt37
-rw-r--r--science/py-rmf/pkg-descr6
-rw-r--r--science/py-rmf/pkg-plist4
8 files changed, 151 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile
index 5ca73af1e20c..348b02f86a5f 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -196,6 +196,7 @@
SUBDIR += py-pyteomics.biolccc
SUBDIR += py-qspin
SUBDIR += py-quantities
+ SUBDIR += py-rmf
SUBDIR += py-scikit-fuzzy
SUBDIR += py-scikit-learn
SUBDIR += py-scikit-sparse
diff --git a/science/py-rmf/Makefile b/science/py-rmf/Makefile
new file mode 100644
index 000000000000..17288a958d41
--- /dev/null
+++ b/science/py-rmf/Makefile
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+PORTNAME= rmf
+DISTVERSION= g20180614
+CATEGORIES= science graphics
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Library to support reading and writing of Rich Molecular Format files
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+BUILD_DEPENDS= swig3.0:devel/swig30
+LIB_DEPENDS= libRMF.so:science/rmf
+
+USES= cmake:outsource python shebangfix
+USE_GITHUB= yes
+GH_ACCOUNT= salilab
+GH_TAGNAME= f917cf2
+SHEBANG_GLOB= *.py
+USE_PYTHON= flavors
+
+CMAKE_ARGS= -DCMAKE_INSTALL_PYTHONDIR:STRING=${PYTHON_SITELIBDIR}
+BINARY_ALIAS= python=${PYTHON_CMD}
+LDFLAGS+= -lRMF
+
+.include <bsd.port.mk>
diff --git a/science/py-rmf/distinfo b/science/py-rmf/distinfo
new file mode 100644
index 000000000000..735bd3bf311a
--- /dev/null
+++ b/science/py-rmf/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1530396872
+SHA256 (salilab-rmf-g20180614-f917cf2_GH0.tar.gz) = 9c877539b8c7a6af38b3d7155522a90b16b3e28596ec27ac941c7f812f1a1c6f
+SIZE (salilab-rmf-g20180614-f917cf2_GH0.tar.gz) = 15087905
diff --git a/science/py-rmf/files/patch-CMakeLists.txt b/science/py-rmf/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..77ab9ec45a9d
--- /dev/null
+++ b/science/py-rmf/files/patch-CMakeLists.txt
@@ -0,0 +1,62 @@
+--- CMakeLists.txt.orig 2018-06-15 00:56:51 UTC
++++ CMakeLists.txt
+@@ -4,15 +4,15 @@ project(RMF)
+ # needs to be in main CMakeLists.txt
+ enable_testing()
+
+-execute_process(COMMAND python setup_git.py
+- RESULT_VARIABLE setup
+- OUTPUT_VARIABLE toutput
+- ERROR_VARIABLE error
+- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
+-if(NOT ${setup} EQUAL 0)
+- message(FATAL_ERROR " Failed to run setup_git.py: ${setup}; ${error}")
+-endif()
++#execute_process(COMMAND python setup_git.py
++# RESULT_VARIABLE setup
++# OUTPUT_VARIABLE toutput
++# ERROR_VARIABLE error
++# WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
++# OUTPUT_STRIP_TRAILING_WHITESPACE)
++#if(NOT ${setup} EQUAL 0)
++# message(FATAL_ERROR " Failed to run setup_git.py: ${setup}; ${error}")
++#endif()
+
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake_modules)
+
+@@ -116,14 +116,14 @@ configure_file (
+ "${PROJECT_BINARY_DIR}/include/RMF/config.h"
+ )
+
+-add_subdirectory(data)
++#add_subdirectory(data)
+ add_subdirectory(include)
+
+-add_subdirectory(src)
+-add_subdirectory(bin)
++#add_subdirectory(src)
++#add_subdirectory(bin)
+
+-add_subdirectory(plugins/vmd/)
+-add_subdirectory(plugins/pymol/)
++#add_subdirectory(plugins/vmd/)
++#add_subdirectory(plugins/pymol/)
+
+ # swig support is a little broken
+
+@@ -142,10 +142,10 @@ endif()
+
+ add_subdirectory(swig)
+
+-add_subdirectory(test)
+-add_subdirectory(examples)
+-add_subdirectory(benchmark)
+-add_subdirectory(doc)
++#add_subdirectory(test)
++#add_subdirectory(examples)
++#add_subdirectory(benchmark)
++#add_subdirectory(doc)
+
+ add_custom_target(RMF DEPENDS ${RMF_BINS} ${RMF_SWIG} ${RMF_TESTS} ${RMF_VMD} RMF-decorators)
+ set_property(TARGET "RMF" PROPERTY FOLDER "RMF")
diff --git a/science/py-rmf/files/patch-include_CMakeLists.txt b/science/py-rmf/files/patch-include_CMakeLists.txt
new file mode 100644
index 000000000000..8570c72f3abf
--- /dev/null
+++ b/science/py-rmf/files/patch-include_CMakeLists.txt
@@ -0,0 +1,10 @@
+--- include/CMakeLists.txt.orig 2018-06-30 22:26:02 UTC
++++ include/CMakeLists.txt
+@@ -16,5 +16,5 @@ add_custom_target(RMF-decorators ALL DEP
+ "${PROJECT_SOURCE_DIR}/tools/build/make_decorators.py")
+ set_property(TARGET "RMF-decorators" PROPERTY FOLDER "RMF")
+
+-INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/include/RMF DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+-INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/include/RMF DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
++#INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/include/RMF DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
++#INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/include/RMF DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
diff --git a/science/py-rmf/files/patch-swig_CMakeLists.txt b/science/py-rmf/files/patch-swig_CMakeLists.txt
new file mode 100644
index 000000000000..2deb3fa057a3
--- /dev/null
+++ b/science/py-rmf/files/patch-swig_CMakeLists.txt
@@ -0,0 +1,37 @@
+--- swig/CMakeLists.txt.orig 2018-06-15 00:56:51 UTC
++++ swig/CMakeLists.txt
+@@ -59,7 +59,7 @@ set_target_properties("${SWIG_MODULE_RMF
+ IF(WIN32)
+ SWIG_LINK_LIBRARIES(RMF ${PYTHON_LIBRARIES} RMF-lib)
+ ELSE(WIN32)
+- SWIG_LINK_LIBRARIES(RMF RMF-lib)
++ #SWIG_LINK_LIBRARIES(RMF RMF-lib)
+ ENDIF(WIN32)
+
+ INSTALL(TARGETS ${SWIG_MODULE_RMF_REAL_NAME} DESTINATION ${CMAKE_INSTALL_PYTHONDIR})
+@@ -95,7 +95,7 @@ set_target_properties("${SWIG_MODULE_RMF
+ set(RMF_SWIG _RMF CACHE INTERNAL "" FORCE)
+
+
+-INSTALL(FILES "RMF.i" ${SWIG_INCLUDES} DESTINATION "${CMAKE_INSTALL_SWIGDIR}")
++#INSTALL(FILES "RMF.i" ${SWIG_INCLUDES} DESTINATION "${CMAKE_INSTALL_SWIGDIR}")
+
+
+ # Don't link in libpython (that prevents the extension from being used in
+@@ -104,7 +104,7 @@ INSTALL(FILES "RMF.i" ${SWIG_INCLUDES} D
+ IF(WIN32)
+ SWIG_LINK_LIBRARIES(RMF_HDF5 ${PYTHON_LIBRARIES} RMF-lib)
+ ELSE(WIN32)
+- SWIG_LINK_LIBRARIES(RMF_HDF5 RMF-lib)
++ #SWIG_LINK_LIBRARIES(RMF_HDF5 RMF-lib)
+ ENDIF(WIN32)
+ # Apple linkers complain by default if there are undefined symbols
+ IF(APPLE)
+@@ -116,6 +116,6 @@ INSTALL(TARGETS ${SWIG_MODULE_RMF_HDF5_R
+ INSTALL(FILES "${CMAKE_BINARY_DIR}/lib/RMF_HDF5.py" DESTINATION ${CMAKE_INSTALL_PYTHONDIR})
+
+ set(RMF_SWIG _RMF _RMF_HDF5 CACHE INTERNAL "" FORCE)
+-INSTALL(FILES "RMF_HDF5.i" DESTINATION "${CMAKE_INSTALL_SWIGDIR}")
++#INSTALL(FILES "RMF_HDF5.i" DESTINATION "${CMAKE_INSTALL_SWIGDIR}")
+
+ endif()
diff --git a/science/py-rmf/pkg-descr b/science/py-rmf/pkg-descr
new file mode 100644
index 000000000000..e95cceab4e79
--- /dev/null
+++ b/science/py-rmf/pkg-descr
@@ -0,0 +1,6 @@
+The Python binding for Rich Molecular Format (RMF) file format library
+storing hierarchical molecular data (such as atomic or coarse grained
+representations of proteins), along with markup, including geometry and score
+data.
+
+WWW: https://integrativemodeling.org/rmf/
diff --git a/science/py-rmf/pkg-plist b/science/py-rmf/pkg-plist
new file mode 100644
index 000000000000..2a1ea0ea236d
--- /dev/null
+++ b/science/py-rmf/pkg-plist
@@ -0,0 +1,4 @@
+%%PYTHON_SITELIBDIR%%/RMF.py
+%%PYTHON_SITELIBDIR%%/RMF_HDF5.py
+%%PYTHON_SITELIBDIR%%/_RMF.so
+%%PYTHON_SITELIBDIR%%/_RMF_HDF5.so