From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-libs/chemkit/Manifest | 7 + sci-libs/chemkit/chemkit-0.1-r1.ebuild | 84 ++++++++++ sci-libs/chemkit/files/chemkit-0.1-multilib.patch | 90 ++++++++++ sci-libs/chemkit/files/chemkit-0.1-unbundle.patch | 191 ++++++++++++++++++++++ sci-libs/chemkit/metadata.xml | 14 ++ 5 files changed, 386 insertions(+) create mode 100644 sci-libs/chemkit/Manifest create mode 100644 sci-libs/chemkit/chemkit-0.1-r1.ebuild create mode 100644 sci-libs/chemkit/files/chemkit-0.1-multilib.patch create mode 100644 sci-libs/chemkit/files/chemkit-0.1-unbundle.patch create mode 100644 sci-libs/chemkit/metadata.xml (limited to 'sci-libs/chemkit') diff --git a/sci-libs/chemkit/Manifest b/sci-libs/chemkit/Manifest new file mode 100644 index 000000000000..cab15ca5db29 --- /dev/null +++ b/sci-libs/chemkit/Manifest @@ -0,0 +1,7 @@ +AUX chemkit-0.1-multilib.patch 4694 SHA256 9c9402535a1afc727d96d6415dcf16780c0f29998ea7bac3e1e4c3b89ecf3af2 SHA512 dedde9e5db14f088e5a70ebfcd9f46b6fbb2d60b1800a61ece1f7afef24caac502f129573823807caec050ba1515ad402a3615953b903a239c5287a5b96aa8b8 WHIRLPOOL 4e86024cc5dd39af48133c43f477ca4c69fa21d88498fb7af95f1565c6785e2fac39cd1724129db1c390cbdb723a8deee9fab82e6aceae8ed6dfcae0e0a3a646 +AUX chemkit-0.1-unbundle.patch 6103 SHA256 0fb331b49205fc55e00404dec5dbbfc70f5d80b5a64ae06c6aeb7a6971f42552 SHA512 9edd39008763b56eb7697562536c4c4d476880a414ae1a305d1af64cee04e4ccb82585cfd15d2f7608b5200e39863a9a97c2a152110b28e501fbd055737ce015 WHIRLPOOL 1bfe931e706d7259dbf2a5527b1e75cbfa1ca09148fffd25c4e4cc986112fd1cb18730b462c29fcae553b6bbdefcb5c895934b96fb5e141a307fa67eb0becc23 +DIST chemkit-0.1.tar.gz 5842235 SHA256 bec718ce4ae2fcb4cda63004d05a6e6bf65c1887179f665fcee118cbe7bec11b SHA512 0273f8735333000b04007ccd7adc58f0c4809a570fa5a72e4161652d72e8953bf89cad0893c20ecbb3484d6c13a8828c92f12366dddeedaf591815c35f6ef011 WHIRLPOOL 30c73d5d2bb7e946204d3dcdd87b82fa3e5278e799b06df523557f46ca4c71ae7d5b9c37d82af8dcdee48bb83f8840c5f2900b4331c3cf643c323ef20abc1883 +EBUILD chemkit-0.1-r1.ebuild 1838 SHA256 b93c38a6167a09526421e7d44da225178725ecbc9a7274f74545fb954430bd7b SHA512 d1726b0239454b00623c807337341ff4bf5ad5da889e492da0613e09e34422c566322d2ceb68ebffcea52fd499d42c7678c7640b044d7b7a7312c84b4e322cb0 WHIRLPOOL 5c2b2c11d64d63e75d4ad21d03efd9231332dc04b694624fddc68b2e83ea6ef43605d80914a6b051039c40ed9502f7d58578aa11a563ac4d4f0859c22b1e55af +MISC ChangeLog 2689 SHA256 905f93d2a880dff2c014dcf2196ea45ee33e72e176347b8087c0b329668bff7c SHA512 5dbc79de565751e085de846a95cf4c85bdbfa256dd9b0016eb43f8d7ffdd409e2d7342bb9966c1fe8a6789cbd05fcdb8326fe95f572dbde403729b2723cc3428 WHIRLPOOL 41e5a82dab3b398fbf8e5f1c81e9c13d44114fc72c24fe02d3e8f554cea511a0294a621d2704ef99917e52df577925a9a06ed692ede6ca0490207e7d6fcf3cfd +MISC ChangeLog-2015 1121 SHA256 827207ab1d87618d48c2bca3e172225d76a1ae86d6aa6bc94f86b23f80bf77a8 SHA512 fdb871617cdafc76b4f8c094d61847286d83289b1fe89220afd64f289c6b53de3012db9042ae827609544c3c951a93292ffcea375229068415b5eec598e92657 WHIRLPOOL 486be8176ec3d1028c965a111e3ddf056a5fb5ee34d65d70e98909d6188385eaab5504ba970ada14152301960351d1fef83d6e53ab54f232c74c7d9b1bcab27a +MISC metadata.xml 453 SHA256 e2e8ab9cb866c65794124f2a6c54fbb921de29173a083bf55cd637f4848699d5 SHA512 4a492fc1856ccc3eda100f356ef4699bbbc9e51719015ffab0d14d6bf1077cd07f7be3a7113e93f9a1fb2acdc347dffe2fb68e6076c00e80f265cd35ec80019a WHIRLPOOL d9cc84fd96a0718df26cafa8aa1caceac17bb230538b8d4a2817564bf68d506fbe3f2fa1486dc5d0a0fd4fdc5eb83c5b34969bf2d6de4925cc74ba3c80f500d1 diff --git a/sci-libs/chemkit/chemkit-0.1-r1.ebuild b/sci-libs/chemkit/chemkit-0.1-r1.ebuild new file mode 100644 index 000000000000..b620a1e9f7fd --- /dev/null +++ b/sci-libs/chemkit/chemkit-0.1-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-utils multilib python-single-r1 virtualx + +DESCRIPTION="Library for chemistry applications" +HOMEPAGE="http://www.chemkit.org/" +SRC_URI="mirror://sourceforge/project/${PN}/${P}.tar.gz" + +SLOT="0" +LICENSE="BSD PSF-2.2" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="applications examples python test" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + test? ( applications python )" + +RDEPEND=" + dev-libs/boost + dev-libs/rapidxml + dev-cpp/eigen:3 + dev-qt/qtcore:4 + dev-qt/qtgui:4 + dev-qt/qtopengl:4 + media-libs/glu + sci-libs/inchi + sci-libs/lemon + virtual/opengl + examples? ( + x11-libs/libX11 + x11-libs/libXext + ) + python? ( ${PYTHON_DEPS} ) +" +DEPEND="${RDEPEND}" + +S="${WORKDIR}"/${PN} + +PATCHES=( + "${FILESDIR}"/${P}-multilib.patch + "${FILESDIR}"/${P}-unbundle.patch + ) + +src_prepare() { + # jsoncpp API change + # xdrf != xdrfile + rm -rvf src/3rdparty/{inchi,khronos,lemon,rapidxml} || die + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCHEMKIT_BUILD_PLUGIN_BABEL=on + -DUSE_SYSTEM_INCHI=ON + -DUSE_SYSTEM_JSONCPP=OFF + -DUSE_SYSTEM_RAPIDXML=ON + -DUSE_SYSTEM_XDRF=OFF + $(cmake-utils_use applications CHEMKIT_BUILD_APPS) + $(cmake-utils_use applications CHEMKIT_BUILD_QT_DESIGNER_PLUGINS) + $(cmake-utils_use examples CHEMKIT_BUILD_EXAMPLES) + $(cmake-utils_use examples CHEMKIT_BUILD_DEMOS) + $(cmake-utils_use python CHEMKIT_BUILD_BINDINGS_PYTHON) + $(cmake-utils_use test CHEMKIT_BUILD_TESTS) + ) + cmake-utils_src_configure +} + +src_test() { + VIRTUALX_COMMAND="cmake-utils_src_test" + virtualmake +} + +src_install() { + use examples && \ + dobin \ + "${BUILD_DIR}"/demos/*-viewer/*-viewer \ + "${BUILD_DIR}"/examples/uff-energy/uff-energy + + cmake-utils_src_install +} diff --git a/sci-libs/chemkit/files/chemkit-0.1-multilib.patch b/sci-libs/chemkit/files/chemkit-0.1-multilib.patch new file mode 100644 index 000000000000..b6a61d58ed8c --- /dev/null +++ b/sci-libs/chemkit/files/chemkit-0.1-multilib.patch @@ -0,0 +1,90 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e531be4..e0d6b2d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ configure_file( + "${CMAKE_MODULE_PATH}/ChemkitConfig.cmake.in" + "${CMAKE_BINARY_DIR}/ChemkitConfig.cmake" + IMMEDIATE @ONLY) +-install(FILES ${CMAKE_BINARY_DIR}/ChemkitConfig.cmake DESTINATION lib/chemkit) ++install(FILES ${CMAKE_BINARY_DIR}/ChemkitConfig.cmake DESTINATION lib${LIB_SUFFIX}/chemkit) + + # Create a ChemkitBuildTreeSettings.cmake file for the use from the build tree + configure_file( +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 88c6b5f..1100c3b 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -8,12 +8,12 @@ macro(add_chemkit_library library_name) + add_library(${library_name} SHARED ${ARGN}) + + # add install target +- install(TARGETS ${library_name} DESTINATION lib) ++ install(TARGETS ${library_name} DESTINATION lib${LIB_SUFFIX}) + + # copy library into build directory + get_target_property(library_location ${library_name} LOCATION) + get_filename_component(library_filename ${library_location} NAME) +- add_custom_command(TARGET ${library_name} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy ${library_location} ${CMAKE_BINARY_DIR}/lib/${library_filename}) ++ add_custom_command(TARGET ${library_name} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy ${library_location} ${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/${library_filename}) + + endmacro(add_chemkit_library) + +diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt +index dc8970f..77029b7 100644 +--- a/src/plugins/CMakeLists.txt ++++ b/src/plugins/CMakeLists.txt +@@ -3,7 +3,7 @@ macro(add_chemkit_plugin plugin_name) + add_library(${plugin_name} SHARED ${ARGN}) + + # add install target +- install(TARGETS ${plugin_name} DESTINATION lib/chemkit/plugins/) ++ install(TARGETS ${plugin_name} DESTINATION lib${LIB_SUFFIX}/chemkit/plugins/) + + # remove 'lib' prefix + set_target_properties(${plugin_name} PROPERTIES PREFIX "") +@@ -11,15 +11,15 @@ macro(add_chemkit_plugin plugin_name) + # copy plugin into build directory + get_target_property(plugin_location ${plugin_name} LOCATION) + get_filename_component(plugin_filename ${plugin_location} NAME) +- add_custom_command(TARGET ${plugin_name} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy ${plugin_location} ${CMAKE_BINARY_DIR}/lib/chemkit/plugins/${plugin_filename}) ++ add_custom_command(TARGET ${plugin_name} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy ${plugin_location} ${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/chemkit/plugins/${plugin_filename}) + + # plugin data + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/data) + # copy plugin data into build directory +- file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data/ DESTINATION ${CMAKE_BINARY_DIR}/lib/chemkit/plugins/data/${plugin_name}/) ++ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data/ DESTINATION ${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/chemkit/plugins/data/${plugin_name}/) + + # install plugin data directory +- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/ DESTINATION lib/chemkit/plugins/data/${plugin_name}) ++ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/ DESTINATION lib${LIB_SUFFIX}/chemkit/plugins/data/${plugin_name}) + endif() + endmacro(add_chemkit_plugin) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index b191b82..a4ea0b0 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -4,7 +4,7 @@ endif() + + macro(add_chemkit_test test_name test_executable) + add_test(NAME ${test_name} COMMAND ${test_executable}) +- set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "CHEMKIT_PLUGIN_PATH=${CMAKE_BINARY_DIR}/lib/chemkit/plugins/") ++ set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "CHEMKIT_PLUGIN_PATH=${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/chemkit/plugins/") + endmacro(add_chemkit_test) + + add_subdirectory(auto) +diff --git a/tests/auto/bindings/python/CMakeLists.txt b/tests/auto/bindings/python/CMakeLists.txt +index 9859867..70da693 100644 +--- a/tests/auto/bindings/python/CMakeLists.txt ++++ b/tests/auto/bindings/python/CMakeLists.txt +@@ -5,7 +5,7 @@ endif() + macro(add_chemkit_python_test test_name test_script) + add_test(${test_name} ${PYTHON_EXECUTABLE} ${test_script}) + set_tests_properties(${test_name} PROPERTIES +- ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/bindings/python/;CHEMKIT_PLUGIN_PATH=${CMAKE_BINARY_DIR}/lib/chemkit/plugins") ++ ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/bindings/python/;CHEMKIT_PLUGIN_PATH=${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/chemkit/plugins") + endmacro(add_chemkit_python_test) + + add_chemkit_python_test(python.Atom ${CMAKE_CURRENT_SOURCE_DIR}/atomtest.py) diff --git a/sci-libs/chemkit/files/chemkit-0.1-unbundle.patch b/sci-libs/chemkit/files/chemkit-0.1-unbundle.patch new file mode 100644 index 000000000000..e8c9d18dca6e --- /dev/null +++ b/sci-libs/chemkit/files/chemkit-0.1-unbundle.patch @@ -0,0 +1,191 @@ + CMakeLists.txt | 21 +++++++++++++++++++++ + src/plugins/chemjson/CMakeLists.txt | 6 +++++- + src/plugins/chemjson/chemjsonfileformat.cpp | 4 ++++ + src/plugins/cml/cmlfileformat.h | 4 ++++ + src/plugins/inchi/CMakeLists.txt | 4 +++- + src/plugins/inchi/inchikeylineformat.cpp | 4 ++++ + src/plugins/inchi/inchilineformat.cpp | 4 ++++ + src/plugins/pdb/pdbmlfileformat.cpp | 4 ++++ + src/plugins/xtc/CMakeLists.txt | 9 +++++++-- + src/plugins/xtc/xtcfileformat.cpp | 4 ++++ + 10 files changed, 60 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e531be4..622ea9d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,6 +55,27 @@ configure_file( + # export the Chemkit package + export(PACKAGE Chemkit) + ++option(USE_SYSTEM_INCHI "Use inchi installed in system" OFF) ++option(USE_SYSTEM_JSONCPP "Use json cpp installed in system" OFF) ++option(USE_SYSTEM_RAPIXML "Use rapidxml installed in system" OFF) ++option(USE_SYSTEM_XDRF "Use xdrflib installed in system" OFF) ++ ++if(USE_SYSTEM_INCHI) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSYSTEM_INCHI") ++endif() ++ ++if(USE_SYSTEM_JSONCPP) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSYSTEM_JSONCPP") ++endif() ++ ++if(USE_SYSTEM_RAPIDXML) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSYSTEM_RAPIDXML") ++endif() ++ ++if(USE_SYSTEM_XDRF) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSYSTEM_XDRF") ++endif() ++ + # build options + option(CHEMKIT_WITH_GRAPHICS "Build the chemkit-graphics library." ON) + option(CHEMKIT_WITH_IO "Build the chemkit-io library." ON) +diff --git a/src/plugins/chemjson/CMakeLists.txt b/src/plugins/chemjson/CMakeLists.txt +index 0e115b5..a5e6f48 100644 +--- a/src/plugins/chemjson/CMakeLists.txt ++++ b/src/plugins/chemjson/CMakeLists.txt +@@ -10,7 +10,11 @@ set(SOURCES + chemjsonplugin.cpp + ) + +-aux_source_directory(../../3rdparty/jsoncpp/ JSONCPP_SOURCES) ++if(NOT USE_SYSTEM_JSONCPP) ++ aux_source_directory(../../3rdparty/jsoncpp/ JSONCPP_SOURCES) ++else() ++ target_link_libraries(chemjson jsoncpp) ++endif() + + add_chemkit_plugin(chemjson ${SOURCES} ${JSONCPP_SOURCES}) + target_link_libraries(chemjson ${CHEMKIT_LIBRARIES}) +diff --git a/src/plugins/chemjson/chemjsonfileformat.cpp b/src/plugins/chemjson/chemjsonfileformat.cpp +index a0d271e..3cd5827 100644 +--- a/src/plugins/chemjson/chemjsonfileformat.cpp ++++ b/src/plugins/chemjson/chemjsonfileformat.cpp +@@ -43,7 +43,11 @@ + #include + #include + ++#ifdef SYSTEM_JSONCPP ++#include ++#else + #include "../../3rdparty/jsoncpp/json/json.h" ++#endif + + namespace { + +diff --git a/src/plugins/cml/cmlfileformat.h b/src/plugins/cml/cmlfileformat.h +index e813223..61a547d 100644 +--- a/src/plugins/cml/cmlfileformat.h ++++ b/src/plugins/cml/cmlfileformat.h +@@ -38,7 +38,11 @@ + + #include + ++#ifdef SYSTEM_RAPIDXML ++#include ++#else + #include "../../3rdparty/rapidxml/rapidxml.hpp" ++#endif + + class CmlFileFormat : public chemkit::MoleculeFileFormat + { +diff --git a/src/plugins/inchi/CMakeLists.txt b/src/plugins/inchi/CMakeLists.txt +index 2b25d9b..5f45f8a 100644 +--- a/src/plugins/inchi/CMakeLists.txt ++++ b/src/plugins/inchi/CMakeLists.txt +@@ -7,7 +7,9 @@ set(SOURCES + inchiplugin.cpp + ) + +-aux_source_directory(../../3rdparty/inchi/ IUPAC_INCHI_SOURCES) ++if(NOT USE_SYSTEM_INCHI) ++ aux_source_directory(../../3rdparty/inchi/ IUPAC_INCHI_SOURCES) ++endif() + + add_chemkit_plugin(inchi ${SOURCES} ${IUPAC_INCHI_SOURCES}) + target_link_libraries(inchi ${CHEMKIT_LIBRARIES}) +diff --git a/src/plugins/inchi/inchikeylineformat.cpp b/src/plugins/inchi/inchikeylineformat.cpp +index 2682f95..cec0a17 100644 +--- a/src/plugins/inchi/inchikeylineformat.cpp ++++ b/src/plugins/inchi/inchikeylineformat.cpp +@@ -38,7 +38,11 @@ + #include + + #include "inchilineformat.h" ++#ifdef SYSTEM_INCHI ++#include ++#else + #include "../../3rdparty/inchi/inchi_api.h" ++#endif + + InchiKeyLineFormat::InchiKeyLineFormat() + : chemkit::LineFormat("inchikey") +diff --git a/src/plugins/inchi/inchilineformat.cpp b/src/plugins/inchi/inchilineformat.cpp +index 5b9bc42..ea5977c 100644 +--- a/src/plugins/inchi/inchilineformat.cpp ++++ b/src/plugins/inchi/inchilineformat.cpp +@@ -42,7 +42,11 @@ + + #include + ++#ifdef SYSTEM_INCHI ++#include ++#else + #include "../../3rdparty/inchi/inchi_api.h" ++#endif + + #include + #include +diff --git a/src/plugins/pdb/pdbmlfileformat.cpp b/src/plugins/pdb/pdbmlfileformat.cpp +index 081a4ec..2ca4269 100644 +--- a/src/plugins/pdb/pdbmlfileformat.cpp ++++ b/src/plugins/pdb/pdbmlfileformat.cpp +@@ -35,7 +35,11 @@ + + #include "pdbmlfileformat.h" + ++#ifdef SYSTEM_RAPIDXML ++#include ++#else + #include "../../3rdparty/rapidxml/rapidxml.hpp" ++#endif + + #include + #include +diff --git a/src/plugins/xtc/CMakeLists.txt b/src/plugins/xtc/CMakeLists.txt +index 98d8ba7..8c09e64 100644 +--- a/src/plugins/xtc/CMakeLists.txt ++++ b/src/plugins/xtc/CMakeLists.txt +@@ -13,7 +13,12 @@ set(SOURCES + xtcplugin.cpp + ) + +-aux_source_directory(../../3rdparty/xdrf/ XDRF_SOURCES) ++ ++if(USE_SYSTEM_XDRF) ++ find_library(XDRF_LIBRARY NAMES xdrfile libxdrfile) ++else() ++ aux_source_directory(../../3rdparty/xdrf/ XDRF_SOURCES) ++endif() + + add_chemkit_plugin(xtc ${SOURCES} ${XDRF_SOURCES}) +-target_link_libraries(xtc ${CHEMKIT_LIBRARIES} ${Boost_LIBRARIES}) ++target_link_libraries(xtc ${CHEMKIT_LIBRARIES} ${Boost_LIBRARIES} ${XDRF_LIBRARY} ) +diff --git a/src/plugins/xtc/xtcfileformat.cpp b/src/plugins/xtc/xtcfileformat.cpp +index 0f00cb6..f8659ca 100644 +--- a/src/plugins/xtc/xtcfileformat.cpp ++++ b/src/plugins/xtc/xtcfileformat.cpp +@@ -47,7 +47,11 @@ + #include + #include + ++#ifdef SYSTEM_XDRF ++#include ++#else + #include "../../3rdparty/xdrf/xdrf.h" ++#endif + + XtcFileFormat::XtcFileFormat() + : chemkit::TrajectoryFileFormat("xtc") diff --git a/sci-libs/chemkit/metadata.xml b/sci-libs/chemkit/metadata.xml new file mode 100644 index 000000000000..d2802f9728df --- /dev/null +++ b/sci-libs/chemkit/metadata.xml @@ -0,0 +1,14 @@ + + + + + sci-chemistry@gentoo.org + Gentoo Chemistry Project + + + Build also applications not only the libraries + + + chemkit + + -- cgit v1.2.3