summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-03-10 17:09:29 +0000
committerJustin Lecher <jlec@gentoo.org>2010-03-10 17:09:29 +0000
commit2f7dc4260b4f6556e0e458cbc9ecd05edfcd5845 (patch)
tree9a5c90ac5d7ac4d676db2d651d7b3ab29e48a2e2 /sci-chemistry/viewmol
parentbug reference added (diff)
downloadgentoo-2-2f7dc4260b4f6556e0e458cbc9ecd05edfcd5845.tar.gz
gentoo-2-2f7dc4260b4f6556e0e458cbc9ecd05edfcd5845.tar.bz2
gentoo-2-2f7dc4260b4f6556e0e458cbc9ecd05edfcd5845.zip
Bumped to EAPI=3, princepily prefix ready, adopt to current python situation, fix #308691
(Portage version: 2.2_rc66/cvs/Linux i686)
Diffstat (limited to 'sci-chemistry/viewmol')
-rw-r--r--sci-chemistry/viewmol/ChangeLog11
-rw-r--r--sci-chemistry/viewmol/files/2.4.1-change-default-paths.patch68
-rw-r--r--sci-chemistry/viewmol/viewmol-2.4.1-r1.ebuild79
3 files changed, 156 insertions, 2 deletions
diff --git a/sci-chemistry/viewmol/ChangeLog b/sci-chemistry/viewmol/ChangeLog
index 0af651ea57e8..7dabc128900e 100644
--- a/sci-chemistry/viewmol/ChangeLog
+++ b/sci-chemistry/viewmol/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-chemistry/viewmol
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/viewmol/ChangeLog,v 1.8 2008/06/27 10:32:55 ulm Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/viewmol/ChangeLog,v 1.9 2010/03/10 17:09:14 jlec Exp $
+
+*viewmol-2.4.1-r1 (10 Mar 2010)
+
+ 10 Mar 2010; Justin Lecher (jlec) <jlec@j-schmitz.net>
+ +files/2.4.1-change-default-paths.patch, +viewmol-2.4.1-r1.ebuild:
+ Bumped to EAPI=3, princepily prefix ready, adopt to current python
+ situation, fix #308691
27 Jun 2008; Ulrich Mueller <ulm@gentoo.org> viewmol-2.4.1.ebuild:
Change dependency from virtual/motif to x11-libs/openmotif, bug 224749.
diff --git a/sci-chemistry/viewmol/files/2.4.1-change-default-paths.patch b/sci-chemistry/viewmol/files/2.4.1-change-default-paths.patch
new file mode 100644
index 000000000000..16a3d7ef7e38
--- /dev/null
+++ b/sci-chemistry/viewmol/files/2.4.1-change-default-paths.patch
@@ -0,0 +1,68 @@
+diff --git a/source/getrc.c b/source/getrc.c
+index a39b436..c130096 100644
+--- a/source/getrc.c
++++ b/source/getrc.c
+@@ -87,7 +87,7 @@ extern XtAppContext app;
+
+ static char viewmolpath[MAXLENLINE];
+
+-#define DEFAULTPATH "/usr/local/lib/viewmol"
++#define DEFAULTPATH "@GENTOO_PORTAGE_EPREFIX@/usr/GENTOOLIBDIR/viewmol"
+
+ int getrc(void)
+ {
+diff --git a/source/install b/source/install
+index 580865b..f136af3 100755
+--- a/source/install
++++ b/source/install
+@@ -54,24 +54,27 @@ fi
+ cp $dirorig/viewmol $ROOT/bin
+ chmod 711 $ROOT/bin/viewmol
+
+-# install other files needed in $ROOT/lib/viewmol
+-if [ ! -d $ROOT/lib/viewmol/$dir ]
++# install other files needed in $ROOT/GENTOOLIBDIR/viewmol
++if [ ! -d $ROOT/GENTOOLIBDIR/viewmol/$dir ]
+ then
+- mkdir -p $ROOT/lib/viewmol/$dir
+- chmod 755 $ROOT/lib/viewmol/$dir
++ mkdir -p $ROOT/GENTOOLIBDIR/viewmol/$dir
++ chmod 755 $ROOT/GENTOOLIBDIR/viewmol/$dir
+ fi
+ cd $dirorig
+-cp tm bio readgamess readgauss readmopac readpdb $ROOT/lib/viewmol/$dir
+-chmod 711 $ROOT/lib/viewmol/$dir/*
++cp tm bio readgamess readgauss readmopac readpdb $ROOT/GENTOOLIBDIR/viewmol/$dir
++chmod 711 $ROOT/GENTOOLIBDIR/viewmol/$dir/*
+ cd ../..
+-cp readdmol readdmol.awk readgulp readpqs writecar writegauss.py writemol writetm $ROOT/lib/viewmol
+-chmod 755 $ROOT/lib/viewmol/*
+-cp -r doc examples locale scripts tests $ROOT/lib/viewmol
+-find $ROOT/lib/viewmol -type f -exec chmod a+r {} \;
+-find $ROOT/lib/viewmol -type d -exec chmod a+rx {} \;
+-sed 's/\/source//g' viewmolrc > $ROOT/lib/viewmol/viewmolrc
+-chmod -R 644 $ROOT/lib/viewmol/viewmolrc
+-if [ -d /usr/X11R6/lib/X11/app-defaults ]
++cp readdmol readdmol.awk readgulp readpqs writecar writegauss.py writemol writetm $ROOT/GENTOOLIBDIR/viewmol
++chmod 755 $ROOT/GENTOOLIBDIR/viewmol/*
++mkdir -p $ROOT/usr/share/viewmol $ROOT/usr/share/doc/GENTOODOCDIR/ $ROOT/GENTOOLIBDIR/viewmol/
++cp -r examples scripts tests $ROOT/usr/share/viewmol
++cp -r locale $ROOT/GENTOOLIBDIR/viewmol/
++cp -r doc/* examples scripts tests $ROOT/usr/share/doc/GENTOODOCDIR/
++find $ROOT/GENTOOLIBDIR/viewmol -type f -exec chmod a+r {} \;
++find $ROOT/GENTOOLIBDIR/viewmol -type d -exec chmod a+rx {} \;
++sed 's/\/source//g' viewmolrc > $ROOT/GENTOOLIBDIR/viewmol/viewmolrc
++chmod -R 644 $ROOT/GENTOOLIBDIR/viewmol/viewmolrc
++if [ -d $ROOT/X11R6/GENTOOLIBDIR/X11/app-defaults ]
+ then
+ locale=`echo $LANG | cut -c1-2`
+ if [ "$locale" = "en" ]
+@@ -82,6 +85,6 @@ then
+ # The C locale is defined by default for rpm builds, overwrite it
+ locale="en_US"
+ fi
+- cp locale/${locale}/Viewmol /usr/X11R6/lib/X11/app-defaults
+- chmod a+r /usr/X11R6/lib/X11/app-defaults/Viewmol
++ cp locale/${locale}/Viewmol ${ROOT}/X11R6/GENTOOLIBDIR/X11/app-defaults
++ chmod a+r ${ROOT}/X11R6/GENTOOLIBDIR/X11/app-defaults/Viewmol
+ fi
diff --git a/sci-chemistry/viewmol/viewmol-2.4.1-r1.ebuild b/sci-chemistry/viewmol/viewmol-2.4.1-r1.ebuild
new file mode 100644
index 000000000000..4e2eb952023e
--- /dev/null
+++ b/sci-chemistry/viewmol/viewmol-2.4.1-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/viewmol/viewmol-2.4.1-r1.ebuild,v 1.1 2010/03/10 17:09:14 jlec Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="tk"
+
+inherit eutils multilib prefix python toolchain-funcs
+
+DESCRIPTION="Open-source graphical front end for computational chemistry programs"
+HOMEPAGE="http://viewmol.sourceforge.net/"
+SRC_URI="mirror://sourceforge/viewmol/${P}.src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="
+ media-libs/libpng
+ media-libs/tiff
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXt
+ x11-libs/openmotif"
+DEPEND="${RDEPEND}
+ x11-proto/inputproto
+ x11-proto/xproto"
+
+S="${WORKDIR}/${P}/source"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-remove-icc-check.patch
+ epatch "${FILESDIR}"/${PV}-change-default-paths.patch
+
+ eprefixify getrc.c
+ sed "s:GENTOOLIBDIR:$(get_libdir):g" \
+ -i install getrc.c || die
+ sed "s:GENTOODOCDIR:${PF}:g" -i install || die
+
+ LINKFORSHARED=$($(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')")
+
+ mkdir $(uname -s) && cd $(uname -s)
+
+ cat >> .config.$(uname -s) <<- EOF
+ LIBTIFF = -L${EPREFIX}/usr/$(get_libdir)
+ TIFFINCLUDE = ${EPREFIX}/usr/include
+ LIBPNG = -L${EPREFIX}/usr/$(get_libdir)
+ PNGINCLUDE = ${EPREFIX}/usr/include
+ PYTHONVERSION = $(PYTHON)
+ PYTHONINCLUDE = ${EPREFIX}/$(python_get_includedir)
+ PYTHONLIB = ${EPREFIX}/usr/$(get_libdir)
+ COMPILER = $(tc-getCC)
+ CFLAGS = ${CFLAGS} -DLINUX
+ LDFLAGS = ${LDFLAGS} ${LINKFORSHARED}
+ SCANDIR=
+ INCLUDE=\$(TIFFINCLUDE) -I\$(PNGINCLUDE) -I\$(PYTHONINCLUDE)
+ LIBRARY=\$(LIBTIFF) \$(LIBPNG) -L\$(LIBPYTHON)
+ LIBS=-L${EPREFIX}/$(get_libdir) -l\${PYTHONVERSION} -ltiff -lpng -lz -lGLU -lGL -L${EPREFIX}/usr/X11R6/lib -lXm -lXmu -lXp -lXi -lXext -lXt -lX11 -lpthread -lutil -ldl -lm
+ EOF
+
+ cp .config.$(uname -s) makefile
+ cat ../Makefile >> makefile
+}
+
+src_compile() {
+ pushd $(uname -s)
+ emake viewmol_ tm_ bio_ readgamess_ readgauss_ readmopac_ readpdb_ || die
+ popd
+ ${ERPEFIX}/bin/bash makeTranslations || die
+}
+
+src_install() {
+ ./install ${ED}/usr || die
+}