summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-chemistry/openbabel-perl
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-chemistry/openbabel-perl')
-rw-r--r--sci-chemistry/openbabel-perl/Manifest1
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-makefile.patch28
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-swig.patch25
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.1-makefile.patch9
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-bindings_only.patch108
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-trunk_cmake.patch41
-rw-r--r--sci-chemistry/openbabel-perl/metadata.xml15
-rw-r--r--sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild65
8 files changed, 292 insertions, 0 deletions
diff --git a/sci-chemistry/openbabel-perl/Manifest b/sci-chemistry/openbabel-perl/Manifest
new file mode 100644
index 000000000000..082e5b029843
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/Manifest
@@ -0,0 +1 @@
+DIST openbabel-2.3.2.tar.gz 20509105 SHA256 4eaca26679aa6cc85ebf96af19191472ac63ca442c36b0427b369c3a25705188 SHA512 d0e1f8b758ffdd65ec6c31d988bffe3279355e286ce69fad12c5905b3b832e2b73ee95b1061b1576aba1ee9fe4da5e31ec30350c473be17493c657dc80caf919 WHIRLPOOL 74eff18b73d24c8f702e5573a58ba6afba8402e9ce8782de95dc0568575a7d2d632dbc8e8a98b3cd25efdfa7379494f7dcd449342c81ddf73f42a387bce77aaa
diff --git a/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-makefile.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-makefile.patch
new file mode 100644
index 000000000000..597c9a79c103
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-makefile.patch
@@ -0,0 +1,28 @@
+ scripts/CMakeLists.txt | 2 +-
+ scripts/perl/Makefile.PL | 1 +
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
+index bf2527b..3c45111 100644
+--- a/scripts/CMakeLists.txt
++++ b/scripts/CMakeLists.txt
+@@ -223,7 +223,7 @@ if (DO_PERL_BINDINGS)
+ COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/Makefile.PL ${openbabel_BINARY_DIR}/scripts/perl
+ COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm ${openbabel_BINARY_DIR}/scripts/perl
+ COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp ${openbabel_BINARY_DIR}/scripts/perl
+- COMMAND PERL5LIB=${openbabel_SOURCE_DIR}/scripts/perl/inc SRC_DIR=${openbabel_SOURCE_DIR} OBJ_DIR=${openbabel_BINARY_DIR} ${PERL_EXECUTABLE} ${openbabel_BINARY_DIR}/scripts/perl/Makefile.PL ${PERL_PREFIX_TEXT}
++ COMMAND PERL5LIB=${openbabel_SOURCE_DIR}/scripts/perl/inc SRC_DIR=${openbabel_SOURCE_DIR} OBJ_DIR=${openbabel_BINARY_DIR} ${PERL_EXECUTABLE} ${openbabel_BINARY_DIR}/scripts/perl/Makefile.PL INSTALLDIRS=vendor ${PERL_PREFIX_TEXT}
+ COMMAND PERL5LIB=${openbabel_SOURCE_DIR}/scripts/perl/inc make
+ DEPENDS ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp
+ WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts/perl
+diff --git a/scripts/perl/Makefile.PL b/scripts/perl/Makefile.PL
+index a3a2116..44ad27d 100644
+--- a/scripts/perl/Makefile.PL
++++ b/scripts/perl/Makefile.PL
+@@ -32,5 +32,6 @@ WriteMakefile(
+ 'CC' => $CC,
+ 'LD' => '$(CC)',
+ 'INC' => '-I../../include -I'.$cmakesrcdir.'/include',
++ 'DESTDIR' => @ENV{"D"},
+ 'OBJECT' => 'openbabel-perl.o'
+ );
diff --git a/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-swig.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-swig.patch
new file mode 100644
index 000000000000..6beacf74880c
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-swig.patch
@@ -0,0 +1,25 @@
+ scripts/CMakeLists.txt | 6 +-----
+ 1 files changed, 1 insertions(+), 5 deletions(-)
+
+diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
+index bf2527b..16feeb4 100644
+--- a/scripts/CMakeLists.txt
++++ b/scripts/CMakeLists.txt
+@@ -8,16 +8,12 @@ if (RUN_SWIG)
+ # SWIG_EXECUTABLE - the path to the swig executable
+ # SWIG_VERSION - the version number of the swig executable
+
+- find_package(SWIG)
++ find_package(SWIG 2.0.0)
+ if (NOT SWIG_FOUND)
+ message(STATUS "SWIG NOT found")
+ return()
+ endif (NOT SWIG_FOUND)
+ message(STATUS "SWIG version is ${SWIG_VERSION}")
+- if (NOT ${SWIG_VERSION} STREQUAL "2.0.0" AND NOT ${SWIG_VERSION} STREQUAL "2.0.1")
+- message(STATUS "SWIG version 2.0.0 exactly is required")
+- return()
+- endif (NOT ${SWIG_VERSION} STREQUAL "2.0.0" AND NOT ${SWIG_VERSION} STREQUAL "2.0.1")
+ endif (RUN_SWIG)
+
+ ###################
diff --git a/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.1-makefile.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.1-makefile.patch
new file mode 100644
index 000000000000..88248b4432f1
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.1-makefile.patch
@@ -0,0 +1,9 @@
+--- scripts/perl/Makefile.PL
++++ scripts/perl/Makefile.PL
+@@ -37,5 +37,6 @@ 'LDFROM' => $ldfrom,
+ 'CC' => $CC,
+ 'LD' => '$(CC)',
+ 'INC' => '-I../../include -I'.$cmakesrcdir.'/include',
++ 'DESTDIR' => @ENV{"D"},
+ 'OBJECT' => 'openbabel-perl.o'
+ );
diff --git a/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-bindings_only.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-bindings_only.patch
new file mode 100644
index 000000000000..92e126a77d86
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-bindings_only.patch
@@ -0,0 +1,108 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 449f4b4..1c9ad00 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -252,7 +252,8 @@ if(NOT MSVC)
+ }
+ " SCANDIR_NEEDS_CONST)
+
+- set(OB_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${OB_PLUGIN_INSTALL_DIR}")
++ set(OB_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${OB_PLUGIN_INSTALL_DIR}"
++ CACHE PATH "Set to system install for bindings only build")
+ add_definitions(-DOB_MODULE_PATH="\\"${OB_MODULE_PATH}\\"")
+
+ # Add some visibility support when using GCC
+@@ -380,7 +381,8 @@ if(UNIX AND BUILD_SHARED)
+ if(APPLE)
+ set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR})
+ else()
+- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
++ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}"
++ CACHE PATH "Set sane rpath")
+ set(CMAKE_SKIP_BUILD_RPATH FALSE)
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+@@ -477,6 +479,13 @@ endif()
+ # Should the language bindings be regenereted?
+ option(RUN_SWIG "Generate language bindings with SWIG" OFF)
+
++# Build bindings only
++option(BINDINGS_ONLY "Build bindings only" OFF)
++
++# Point to library if building bindings only
++set(BABEL_SYSTEM_LIBRARY ${BABEL_LIBRARY}
++ CACHE PATH "Point to openbabel library if building bindings only")
++
+ # Should all bindings be built?
+ option(ALL_BINDINGS "Build all languages bindings" OFF)
+
+diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
+index 16e9000..8f92e91 100644
+--- a/scripts/CMakeLists.txt
++++ b/scripts/CMakeLists.txt
+@@ -92,16 +92,30 @@ if (DO_PYTHON_BINDINGS)
+ endif(RUN_SWIG)
+
+ add_library(bindings_python MODULE ${openbabel_SOURCE_DIR}/scripts/python/openbabel-python.cpp)
+- target_link_libraries(bindings_python ${PYTHON_LIBRARIES} ${BABEL_LIBRARY})
++ if(BINDINGS_ONLY)
++ target_link_libraries(bindings_python ${PYTHON_LIBRARIES} ${BABEL_SYSTEM_LIBRARY})
++ else()
++ target_link_libraries(bindings_python ${PYTHON_LIBRARIES} ${BABEL_LIBRARY})
++ endif()
++
+ if(NOT WIN32)
+ set_target_properties(bindings_python PROPERTIES
+ OUTPUT_NAME _openbabel
+ PREFIX ""
+ SUFFIX .so )
+- add_dependencies(bindings_python openbabel)
+- install(TARGETS bindings_python LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+- install(FILES ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py DESTINATION ${LIB_INSTALL_DIR})
+- install(FILES ${openbabel_SOURCE_DIR}/scripts/python/pybel.py DESTINATION ${LIB_INSTALL_DIR})
++ if(NOT BINDINGS_ONLY)
++ add_dependencies(bindings_python openbabel)
++ endif()
++
++ install(TARGETS bindings_python
++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
++ COMPONENT bindings_python)
++ install(FILES ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py
++ DESTINATION ${LIB_INSTALL_DIR}
++ COMPONENT bindings_python)
++ install(FILES ${openbabel_SOURCE_DIR}/scripts/python/pybel.py
++ DESTINATION ${LIB_INSTALL_DIR}
++ COMPONENT bindings_python)
+ else(NOT WIN32)
+ set_target_properties(bindings_python PROPERTIES
+ OUTPUT_NAME _openbabel
+@@ -231,13 +245,25 @@ if (DO_PERL_BINDINGS)
+ endif (RUN_SWIG)
+
+ add_library(bindings_perl MODULE ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp)
+- target_link_libraries(bindings_perl ${PERL_LIBRARY} ${BABEL_LIBRARY} ${PERL_EXTRA_LINK_FLAGS})
++ if(BINDINGS_ONLY)
++ target_link_libraries(bindings_perl ${PERL_LIBRARY} ${BABEL_SYSTEM_LIBRARY} ${PERL_EXTRA_LINK_FLAGS})
++ else()
++ target_link_libraries(bindings_perl ${PERL_LIBRARY} ${BABEL_LIBRARY} ${PERL_EXTRA_LINK_FLAGS})
++ endif()
++
+ set_target_properties(bindings_perl PROPERTIES
+ PREFIX ""
+ OUTPUT_NAME OpenBabel)
+- add_dependencies(bindings_perl openbabel)
+- install(TARGETS bindings_perl LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+- install(FILES ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm DESTINATION ${LIB_INSTALL_DIR})
++ if(NOT BINDINGS_ONLY)
++ add_dependencies(bindings_perl openbabel)
++ endif()
++
++ install(TARGETS bindings_perl
++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}/auto/Chemistry/OpenBabel/
++ COMPONENT bindings_perl)
++ install(FILES ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm
++ DESTINATION ${LIB_INSTALL_DIR}/Chemistry/
++ COMPONENT bindings_perl)
+
+ endif (DO_PERL_BINDINGS)
+
diff --git a/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-trunk_cmake.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-trunk_cmake.patch
new file mode 100644
index 000000000000..b72a622a3afb
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-trunk_cmake.patch
@@ -0,0 +1,41 @@
+diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
+index e7298ce..16e9000 100644
+--- a/scripts/CMakeLists.txt
++++ b/scripts/CMakeLists.txt
+@@ -231,36 +239,6 @@ if (DO_PERL_BINDINGS)
+ install(TARGETS bindings_perl LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+ install(FILES ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm DESTINATION ${LIB_INSTALL_DIR})
+
+- set(PERL_INSTALLDIRS_TEXT "")
+- if (OBPERL_INSTALLDIRS)
+- set(PERL_INSTALLDIRS_TEXT "INSTALLDIRS=${OBPERL_INSTALLDIRS}")
+- endif (OBPERL_INSTALLDIRS)
+-
+- if (NOT MSVC)
+- add_custom_target(pre_bindings_perl ALL
+- # Create the scripts/perl directory; we cannot do this inside
+- # bindings_perl as the WORKING_DIRECTORY needs to already exist!
+- COMMAND ${CMAKE_COMMAND} -E make_directory ${openbabel_BINARY_DIR}/scripts/perl
+- )
+- add_custom_target(bindings_perl ALL
+- COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/Makefile.PL ${openbabel_BINARY_DIR}/scripts/perl
+- COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm ${openbabel_BINARY_DIR}/scripts/perl
+- COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp ${openbabel_BINARY_DIR}/scripts/perl
+- COMMAND PERL5LIB=${openbabel_SOURCE_DIR}/scripts/perl/inc SRC_DIR=${openbabel_SOURCE_DIR} OBJ_DIR=${openbabel_BINARY_DIR} ${PERL_EXECUTABLE} ${openbabel_BINARY_DIR}/scripts/perl/Makefile.PL ${PERL_PREFIX_TEXT} ${PERL_INSTALLDIRS_TEXT}
+- COMMAND PERL5LIB=${openbabel_SOURCE_DIR}/scripts/perl/inc make
+- DEPENDS openbabel ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp
+- WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts/perl
+- )
+- add_dependencies(bindings_perl pre_bindings_perl openbabel)
+- install(CODE "execute_process(COMMAND make install DESTDIR=\$ENV{DESTDIR} WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts/perl)")
+-
+- else (NOT MSVC)
+- add_library(bindings_perl MODULE ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp)
+- target_link_libraries(bindings_perl ${PERL_LIBRARY} ${BABEL_LIBRARY})
+- set_target_properties(bindings_perl PROPERTIES
+- OUTPUT_NAME openbabel_perl )
+- endif(NOT MSVC)
+-
+ endif (DO_PERL_BINDINGS)
+
+ ###################
diff --git a/sci-chemistry/openbabel-perl/metadata.xml b/sci-chemistry/openbabel-perl/metadata.xml
new file mode 100644
index 000000000000..068b6b2c4442
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <longdescription>
+OpenBabel is a chemical toolbox designed to speak the many languages of
+chemical data. It's an open, collaborative project allowing anyone to
+search, convert, analyze, or store data from molecular modeling, chemistry,
+solid-state materials, biochemistry, or related areas.
+This package enables to access OpenBabel library from Perl programs.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">openbabel</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild b/sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild
new file mode 100644
index 000000000000..71a41ba76d7d
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils eutils perl-module
+
+DESCRIPTION="Perl bindings for OpenBabel"
+HOMEPAGE="http://openbabel.sourceforge.net/"
+SRC_URI="mirror://sourceforge/openbabel/openbabel-${PV}.tar.gz"
+
+KEYWORDS="amd64 ~arm ppc x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE=""
+
+RDEPEND="
+ dev-lang/perl:=
+ ~sci-chemistry/openbabel-${PV}"
+DEPEND="${RDEPEND}
+ >=dev-util/cmake-2.4.8
+ >=dev-lang/swig-2"
+
+S="${WORKDIR}/openbabel-${PV}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-trunk_cmake.patch \
+ "${FILESDIR}"/${P}-bindings_only.patch
+ perl_set_version
+}
+
+src_configure() {
+ local mycmakeargs="${mycmakeargs}
+ -DCMAKE_INSTALL_RPATH=
+ -DBINDINGS_ONLY=ON
+ -DBABEL_SYSTEM_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libopenbabel.so"
+ -DOB_MODULE_PATH="${EPREFIX}/usr/$(get_libdir)/openbabel/${PV}"
+ -DLIB_INSTALL_DIR="${D}/${VENDOR_ARCH}"
+ -DPERL_BINDINGS=ON
+ -DRUN_SWIG=ON"
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile bindings_perl
+}
+
+src_test() {
+ mkdir "${CMAKE_BUILD_DIR}/$(get_libdir)/Chemistry"
+ cp \
+ "${CMAKE_USE_DIR}/scripts/perl/OpenBabel.pm" \
+ "${CMAKE_BUILD_DIR}/$(get_libdir)/Chemistry/"
+ for i in "${CMAKE_USE_DIR}"/scripts/perl/t/*; do
+ einfo "Running test: ${i}"
+ perl -I"${CMAKE_BUILD_DIR}/$(get_libdir)" "${i}" || die
+ done
+}
+
+src_install() {
+ cd "${CMAKE_BUILD_DIR}"
+ cmake -DCOMPONENT=bindings_perl -P cmake_install.cmake
+}