From: "Reinis Danne" <rei4dan@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-chemistry/openbabel-perl/, sci-chemistry/openbabel-perl/files/
Date: Fri, 19 Oct 2012 17:04:05 +0000 (UTC) [thread overview]
Message-ID: <1350664897.7c91da989c0f06c156cb2241b438a709316b4ff0.rei4dan@gentoo> (raw)
commit: 7c91da989c0f06c156cb2241b438a709316b4ff0
Author: Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Fri Oct 19 16:41:37 2012 +0000
Commit: Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Fri Oct 19 16:41:37 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=7c91da98
openbabel-perl: Version bump to 2.3.2
---
sci-chemistry/openbabel-perl/ChangeLog | 11 ++
.../files/openbabel-perl-2.3.2-bindings_only.patch | 108 ++++++++++++++++++++
.../files/openbabel-perl-2.3.2-trunk_cmake.patch | 41 ++++++++
sci-chemistry/openbabel-perl/metadata.xml | 12 ++
.../openbabel-perl/openbabel-perl-2.3.2.ebuild | 66 ++++++++++++
5 files changed, 238 insertions(+), 0 deletions(-)
diff --git a/sci-chemistry/openbabel-perl/ChangeLog b/sci-chemistry/openbabel-perl/ChangeLog
new file mode 100644
index 0000000..f1cb357
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sci-chemistry/openbabel-perl
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*openbabel-perl-2.3.2 (19 Oct 2012)
+
+ 19 Oct 2012; Reinis Danne <rei4dan@gmail.com> +openbabel-perl-2.3.2.ebuild,
+ +files/openbabel-perl-2.3.2-bindings_only.patch,
+ +files/openbabel-perl-2.3.2-trunk_cmake.patch, +metadata.xml:
+ Bump to 2.3.2.
+
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 0000000..92e126a
--- /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 0000000..b72a622
--- /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 0000000..8bbdbef
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/metadata.xml
@@ -0,0 +1,12 @@
+<?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>
+</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 0000000..605184e
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+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 ~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"
+ epatch "${FILESDIR}/${P}-bindings_only.patch"
+}
+
+src_configure() {
+ #perl-module_src_configure
+ eval "$(${EPREFIX}/usr/bin/perl -V:installvendorarch)"
+ 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=${ED}/${installvendorarch}
+ -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
+ echo ${i}
+ "${EPREFIX}"/usr/bin/perl -I"${CMAKE_BUILD_DIR}/$(get_libdir)" "${i}" || die
+ done
+}
+
+src_install() {
+ cd "${CMAKE_BUILD_DIR}"
+ cmake -DCOMPONENT=bindings_perl -P cmake_install.cmake
+}
next reply other threads:[~2012-10-19 17:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 17:04 Reinis Danne [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-12-06 17:20 [gentoo-commits] proj/sci:master commit in: sci-chemistry/openbabel-perl/, sci-chemistry/openbabel-perl/files/ Justin Lecher
2011-11-10 13:48 Reinis Danne
2011-03-26 16:03 Justin Lecher
2011-03-25 23:01 Reinis Danne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350664897.7c91da989c0f06c156cb2241b438a709316b4ff0.rei4dan@gentoo \
--to=rei4dan@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox