summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2013-06-06 19:16:54 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2013-06-06 19:16:54 +0000
commitd58de96125b524ba48bba6c3500491314587c37e (patch)
treef14942f4362c1764b575a9b57a2195f9db00d377 /sci-physics/geant-python
parentAdd kicad documentation license. (diff)
downloadgentoo-2-d58de96125b524ba48bba6c3500491314587c37e.tar.gz
gentoo-2-d58de96125b524ba48bba6c3500491314587c37e.tar.bz2
gentoo-2-d58de96125b524ba48bba6c3500491314587c37e.zip
Version bump. Switch to EAPI5 and python-r1. Respect flags and compiler, turn compilation verbose. Remove old versions which do not build anymore, and closing bug #472466
(Portage version: 2.2.01.21938-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'sci-physics/geant-python')
-rw-r--r--sci-physics/geant-python/ChangeLog12
-rw-r--r--sci-physics/geant-python/files/geant-python-4.9.5-build.patch39
-rw-r--r--sci-physics/geant-python/files/geant-python-4.9.5-vis-fix.patch31
-rw-r--r--sci-physics/geant-python/geant-python-4.9.5.ebuild66
-rw-r--r--sci-physics/geant-python/geant-python-4.9.5_p02.ebuild83
-rw-r--r--sci-physics/geant-python/geant-python-4.9.6_p02.ebuild120
-rw-r--r--sci-physics/geant-python/metadata.xml6
7 files changed, 134 insertions, 223 deletions
diff --git a/sci-physics/geant-python/ChangeLog b/sci-physics/geant-python/ChangeLog
index aac9e812ad5e..3af2fb6acec4 100644
--- a/sci-physics/geant-python/ChangeLog
+++ b/sci-physics/geant-python/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sci-physics/geant-python
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant-python/ChangeLog,v 1.7 2013/05/12 03:32:16 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant-python/ChangeLog,v 1.8 2013/06/06 19:16:54 bicatali Exp $
+
+*geant-python-4.9.6_p02 (06 Jun 2013)
+
+ 06 Jun 2013; Sébastien Fabbro <bicatali@gentoo.org>
+ +geant-python-4.9.6_p02.ebuild, -files/geant-python-4.9.5-build.patch,
+ -files/geant-python-4.9.5-vis-fix.patch, -geant-python-4.9.5.ebuild,
+ -geant-python-4.9.5_p02.ebuild, metadata.xml:
+ Version bump. Switch to EAPI5 and python-r1. Respect flags and compiler, turn
+ compilation verbose. Remove old versions which do not build anymore, and
+ closing bug #472466
*geant-python-4.9.5_p02 (12 May 2013)
diff --git a/sci-physics/geant-python/files/geant-python-4.9.5-build.patch b/sci-physics/geant-python/files/geant-python-4.9.5-build.patch
deleted file mode 100644
index 94f5dd260804..000000000000
--- a/sci-physics/geant-python/files/geant-python-4.9.5-build.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-make configure respect --with-python-incdir
-reported upstream at http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1316
-diff --git a/configure b/configure
-index 2d755b1..3db111f 100755
---- a/configure
-+++ b/configure
-@@ -330,18 +330,21 @@ echo "lib${clhep_lib}.${shlib}"
- # ---
- echo $ac_n "Checking for Python include dir (pyconfig.h) ... $ac_c"
- # check version
--if [ $with_python3 = 0 ]; then
-- set python python2.7 python2.6 python2.5 python2.4 python2.3 python2.2
--else
-- set python3.1 python3.0
-+if [ ! -d "$python_incdir" ]
-+then
-+ if [ $with_python3 = 0 ]; then
-+ set python python2.7 python2.6 python2.5 python2.4 python2.3 python2.2
-+ else
-+ set python3.1 python3.0
-+ fi
-+ for aincdir in $*
-+ do
-+ if [ -d /usr/include/"$aincdir" ]; then
-+ python_incdir=/usr/include/$aincdir
-+ break
-+ fi
-+ done
- fi
--for aincdir in $*
--do
-- if [ -d /usr/include/"$aincdir" ]; then
-- python_incdir=/usr/include/$aincdir
-- break
-- fi
--done
-
- if [ ! -f "$python_incdir"/pyconfig.h ]; then
- echo "no"
diff --git a/sci-physics/geant-python/files/geant-python-4.9.5-vis-fix.patch b/sci-physics/geant-python/files/geant-python-4.9.5-vis-fix.patch
deleted file mode 100644
index 1826764b2996..000000000000
--- a/sci-physics/geant-python/files/geant-python-4.9.5-vis-fix.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-fix the C++ signature, upstream http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1318
-diff --git a/source/visualization/pyG4VisManager.cc b/source/visualization/pyG4VisManager.cc
-index 33bb0d4..bbd9e0a 100644
---- a/source/visualization/pyG4VisManager.cc
-+++ b/source/visualization/pyG4VisManager.cc
-@@ -39,7 +39,7 @@ using namespace boost::python;
- // ====================================================================
- // wrappers
- // ====================================================================
--class PyG4VisManager : public G4VisManager {
-+struct PyG4VisManager : G4VisManager, wrapper<G4VisManager> {
- public:
- PyG4VisManager() { SetVerboseLevel(quiet); }
- ~PyG4VisManager() { }
-@@ -62,7 +62,7 @@ void (PyG4VisManager::*f1_SetVerboseLevel)(G4int)
- = &PyG4VisManager::SetVerboseLevel;
- void (PyG4VisManager::*f2_SetVerboseLevel)(const G4String&)
- = &PyG4VisManager::SetVerboseLevel;
-- void (PyG4VisManager::*f3_SetVerboseLevel)(G4VisManager::Verbosity)
-+void (PyG4VisManager::*f3_SetVerboseLevel)(G4VisManager::Verbosity)
- = &PyG4VisManager::SetVerboseLevel;
-
- }
-@@ -87,6 +87,7 @@ void export_G4VisManager()
- .def("SetVerboseLevel", f2_SetVerboseLevel)
- .def("SetVerboseLevel", f3_SetVerboseLevel)
- .def("GetVerbosity", &PyG4VisManager::GetVerbosity)
-+ .staticmethod("GetVerbosity")
- .def("Initialize", &PyG4VisManager::Initialize)
- .def("RegisterGraphicsSystem", &PyG4VisManager::RegisterGraphicsSystem)
- ;
diff --git a/sci-physics/geant-python/geant-python-4.9.5.ebuild b/sci-physics/geant-python/geant-python-4.9.5.ebuild
deleted file mode 100644
index 176358254280..000000000000
--- a/sci-physics/geant-python/geant-python-4.9.5.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant-python/geant-python-4.9.5.ebuild,v 1.3 2012/07/12 02:13:34 heroxbd Exp $
-
-EAPI=4
-
-inherit python versionator
-
-MYP="geant$(replace_version_separator 3 .)"
-
-DESCRIPTION="Python binding for geant"
-HOMEPAGE="http://geant4.cern.ch/"
-SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-
-LICENSE="geant4"
-SLOT="0"
-IUSE="examples"
-
-RDEPEND="=sci-physics/geant-${PV}* \
- dev-libs/boost[python]"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/${MYP}/environments/g4py"
-
-src_prepare() {
- # DISTDIR and python path patch
- epatch "${FILESDIR}"/${PN}-4.9.5-build.patch
-
- # fix the visManager wrapper
- epatch "${FILESDIR}"/${PN}-4.9.5-vis-fix.patch
-}
-
-src_configure() {
- case ${CHOST} in
- x86_64-pc-linux-gnu)
- ARG=linux64
- ;;
- i?86-pc-linux-gnu)
- ARG=linux
- ;;
- *)
- die "platform unknown"
- ;;
- esac
-
- ./configure ${ARG} \
- --prefix="${EPREFIX}/usr" \
- --libdir="${ED}/$(python_get_sitedir)" \
- --with-g4-incdir="${EPREFIX}/usr/include/Geant4" \
- --with-g4-libdir="${EPREFIX}/usr/lib" \
- --with-clhep-incdir="${EPREFIX}/usr/include" \
- --with-clhep-libdir="${EPREFIX}/usr/lib" \
- --with-python-incdir="${EPREFIX}$(python_get_includedir)" \
- --with-python-libdir="${EPREFIX}$(python_get_libdir)" \
- --with-boost-incdir="${EPREFIX}/usr/include" \
- --with-boost-libdir="${EPREFIX}/usr/lib" \
- || die "configure failed"
-}
-
-src_install() {
- emake DESTDIR="${ED}" install
- insinto /usr/share/doc/${PF}
- dodoc 00README History AUTHORS
- use examples && doins -r examples
-}
diff --git a/sci-physics/geant-python/geant-python-4.9.5_p02.ebuild b/sci-physics/geant-python/geant-python-4.9.5_p02.ebuild
deleted file mode 100644
index 482ca75fb21c..000000000000
--- a/sci-physics/geant-python/geant-python-4.9.5_p02.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant-python/geant-python-4.9.5_p02.ebuild,v 1.1 2013/05/12 03:32:16 patrick Exp $
-
-EAPI=4
-
-inherit python versionator
-
-MYP="geant$(replace_version_separator 3 .)"
-
-DESCRIPTION="Python binding for geant"
-HOMEPAGE="http://geant4.cern.ch/"
-SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-
-LICENSE="geant4"
-SLOT="0"
-IUSE="examples"
-
-RDEPEND="=sci-physics/geant-${PV}* \
- dev-libs/boost[python]"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/${MYP}/environments/g4py"
-
-src_prepare() {
- # DISTDIR and python path patch
- epatch "${FILESDIR}"/${PN}-4.9.5-build.patch
-
- # set to the highest verbose for visManager
- epatch "${FILESDIR}"/${PN}-4.9.5-visverbose.patch
-
- # let Geant4 module installed into python sitedir instead of default
- sed -i "/G4PY_LIBDIR :=/cG4PY_LIBDIR := $\(DESTDIR\)$(python_get_sitedir)/Geant4" \
- config/install.gmk || die "sed failed on config/install.gmk"
- for mfile in source/python{3,}/GNUmakefile
- do
- sed -i "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/Geant4" \
- "${mfile}" || die "sed failed on ${mfile}"
- done
-
- # let g4py module installed into python sitedir instead of default
- sed -i "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/g4py" \
- config/site-install.gmk || die "sed failed on config/site-install.gmk"
- for mfile in {processes/emcalculator,utils/MCScore}/{python3/,}GNUmakefile python/GNUmakefile
- do
- sed -i "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/g4py" \
- "site-modules/${mfile}" || die "sed failed on site-modules/${mfile}"
- done
-}
-
-src_configure() {
- case ${CHOST} in
- x86_64-pc-linux-gnu)
- ARG=linux64
- ;;
- i?86-pc-linux-gnu)
- ARG=linux
- ;;
- *)
- die "platform unknown"
- ;;
- esac
-
- ./configure ${ARG} \
- --prefix="${EPREFIX}/usr" \
- --with-g4-incdir="${EPREFIX}/usr/include/Geant4" \
- --with-g4-libdir="${EPREFIX}/usr/lib" \
- --with-clhep-incdir="${EPREFIX}/usr/include" \
- --with-clhep-libdir="${EPREFIX}/usr/lib" \
- --with-python-incdir="${EPREFIX}$(python_get_includedir)" \
- --with-python-libdir="${EPREFIX}$(python_get_libdir)" \
- --with-boost-incdir="${EPREFIX}/usr/include" \
- --with-boost-libdir="${EPREFIX}/usr/lib" \
- || die "configure failed"
-}
-
-src_install() {
- emake DESTDIR="${ED}" install
- insinto /usr/share/doc/${PF}
- dodoc 00README History AUTHORS
- use examples && doins -r examples
-}
diff --git a/sci-physics/geant-python/geant-python-4.9.6_p02.ebuild b/sci-physics/geant-python/geant-python-4.9.6_p02.ebuild
new file mode 100644
index 000000000000..a8314fa6da00
--- /dev/null
+++ b/sci-physics/geant-python/geant-python-4.9.6_p02.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant-python/geant-python-4.9.6_p02.ebuild,v 1.1 2013/06/06 19:16:54 bicatali Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} )
+
+inherit python-r1 versionator multilib
+
+MYP="geant$(replace_version_separator 3 .)"
+
+DESCRIPTION="Python bindings for Geant4"
+HOMEPAGE="http://geant4.cern.ch/"
+SRC_URI="http://geant4.cern.ch/support/source/${MYP}.tar.gz"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+LICENSE="geant4"
+SLOT="0"
+IUSE="examples"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-libs/boost[${PYTHON_USEDEP}]
+ dev-libs/xerces-c
+ =sci-physics/geant-${PV}*"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MYP}/environments/g4py"
+
+pkg_setup() {
+ if use amd64; then
+ ARG=linux64
+ elif use x86; then
+ ARG=linux
+ else
+ die "platform unknown"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.9.5-visverbose.patch
+ sed -i -e "s/lib64/$(get_libdir)/g" configure || die
+ sed -i -e 's/-lG4clhep/-lCLHEP/g' config/g4py.gmk || die
+ # respect user toolchain and flags
+ sed -i \
+ -e '/^CXX.*:=/d' \
+ -e '/CXXFLAGS/s/-f\(template-depth-255\|inline-functions\|permissive\)//g' \
+ -e "/CXXFLAGS/s/-O2/${CXXFLAGS}/g" \
+ -e '/^rpathflag/s|:\($(rpath.)\)| -Wl,-rpath,\1 |g' \
+ -e "s/\$(rpathflag)/\$(LDFLAGS) \$(rpathflag)/g" \
+ config/sys/linux* || die
+ python_copy_sources
+
+ run_sed() {
+ sed -i -e "s/\(python_exe=\)python/\1${EPYTHON}/" configure || die
+ [[ ${EPYTHON} == python3* ]] && sed -i -e "s/with_python3=0/with_python3=1/" configure
+ # let Geant4 module installed into python sitedir instead of default
+ sed -i \
+ -e "/G4PY_LIBDIR :=/cG4PY_LIBDIR := $\(DESTDIR\)$(python_get_sitedir)/Geant4" \
+ config/install.gmk || die "sed failed on config/install.gmk"
+
+ local mfile
+ for mfile in source/python{3,}/GNUmakefile
+ do
+ sed -i \
+ -e "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/Geant4" \
+ "${mfile}" || die "sed failed on ${mfile}"
+ done
+
+ # let g4py module installed into python sitedir instead of default
+ sed -i \
+ -e "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/g4py" \
+ config/site-install.gmk || die "sed failed on config/site-install.gmk"
+ for mfile in {processes/emcalculator,utils/MCScore}/{python3/,}GNUmakefile python/GNUmakefile
+ do
+ sed -i \
+ -e "/install_dir :=/cinstall_dir := $\(DESTDIR\)$(python_get_sitedir)/g4py" \
+ "site-modules/${mfile}" || die "sed failed on site-modules/${mfile}"
+ done
+
+ }
+ python_foreach_impl run_in_build_dir run_sed
+}
+
+src_configure() {
+ run_configure() {
+ # not the autotools configure
+ ./configure ${ARG} \
+ --prefix="${EPREFIX}/usr" \
+ --with-g4install-dir="${EPREFIX}/usr" \
+ --with-python-incdir="$(python_get_includedir)" \
+ --with-python-libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --with-boost-incdir="${EPREFIX}/usr/include" \
+ --with-boost-libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --with-boost-python-lib="boost_python-${EPYTHON#python}" \
+ --with-xercesc-incdir="${EPREFIX}/usr/include" \
+ --with-xercesc-libdir="${EPREFIX}/usr/$(get_libdir)" \
+ || die "configure failed"
+ }
+ python_foreach_impl run_in_build_dir run_configure
+}
+
+src_compile() {
+ python_foreach_impl run_in_build_dir emake CPPVERBOSE=1
+}
+
+src_test() {
+ run_test() {
+ emake -C tests
+ }
+ python_foreach_impl run_in_build_dir run_test
+}
+
+src_install() {
+ python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install
+ dodoc README.md History
+ insinto /usr/share/doc/${PF}
+ use examples && doins -r examples
+}
diff --git a/sci-physics/geant-python/metadata.xml b/sci-physics/geant-python/metadata.xml
index c7e8266dc599..182d59e5d7a2 100644
--- a/sci-physics/geant-python/metadata.xml
+++ b/sci-physics/geant-python/metadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>sci-physics</herd>
- <longdescription lang="en">
-Python binding to Geant 4.
+<herd>sci-physics</herd>
+<longdescription lang="en">
+ Python binding to Geant 4.
</longdescription>
</pkgmetadata>