summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-02-18 22:42:17 +0100
committerDavid Seifert <soap@gentoo.org>2017-02-18 22:43:21 +0100
commite5fd41f69eb53628ce2006345f72990b48e6cb88 (patch)
tree59059d5d2053abf95b84d87c1a5cc0bcb8c294e3 /sci-chemistry/viewmol
parentmedia-sound/codecgraph: python-single-r1, EAPI=6 (diff)
downloadgentoo-e5fd41f69eb53628ce2006345f72990b48e6cb88.tar.gz
gentoo-e5fd41f69eb53628ce2006345f72990b48e6cb88.tar.bz2
gentoo-e5fd41f69eb53628ce2006345f72990b48e6cb88.zip
sci-chemistry/viewmol: Port to python-single-r1
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sci-chemistry/viewmol')
-rw-r--r--sci-chemistry/viewmol/files/2.4.1-change-default-paths.patch8
-rw-r--r--sci-chemistry/viewmol/files/2.4.1-remove-icc-check.patch5
-rw-r--r--sci-chemistry/viewmol/viewmol-2.4.1-r3.ebuild91
3 files changed, 97 insertions, 7 deletions
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
index 16a3d7ef7e38..4b1edef7ef8b 100644
--- a/sci-chemistry/viewmol/files/2.4.1-change-default-paths.patch
+++ b/sci-chemistry/viewmol/files/2.4.1-change-default-paths.patch
@@ -1,7 +1,7 @@
diff --git a/source/getrc.c b/source/getrc.c
index a39b436..c130096 100644
---- a/source/getrc.c
-+++ b/source/getrc.c
+--- a/getrc.c
++++ b/getrc.c
@@ -87,7 +87,7 @@ extern XtAppContext app;
static char viewmolpath[MAXLENLINE];
@@ -13,8 +13,8 @@ index a39b436..c130096 100644
{
diff --git a/source/install b/source/install
index 580865b..f136af3 100755
---- a/source/install
-+++ b/source/install
+--- a/install
++++ b/install
@@ -54,24 +54,27 @@ fi
cp $dirorig/viewmol $ROOT/bin
chmod 711 $ROOT/bin/viewmol
diff --git a/sci-chemistry/viewmol/files/2.4.1-remove-icc-check.patch b/sci-chemistry/viewmol/files/2.4.1-remove-icc-check.patch
index c328e9cc79ab..fd91e0a5a434 100644
--- a/sci-chemistry/viewmol/files/2.4.1-remove-icc-check.patch
+++ b/sci-chemistry/viewmol/files/2.4.1-remove-icc-check.patch
@@ -1,6 +1,5 @@
-diff -urN viewmol-2.4.1.orig/source/getmachine viewmol-2.4.1/source/getmachine
---- viewmol-2.4.1.orig/source/getmachine 2004-08-29 08:04:09.000000000 -0700
-+++ viewmol-2.4.1/source/getmachine 2005-12-02 09:30:49.000000000 -0800
+--- a/getmachine
++++ b/getmachine
@@ -269,19 +269,11 @@
makedir
cat ../.config.$os > makefile
diff --git a/sci-chemistry/viewmol/viewmol-2.4.1-r3.ebuild b/sci-chemistry/viewmol/viewmol-2.4.1-r3.ebuild
new file mode 100644
index 000000000000..5673ca31a614
--- /dev/null
+++ b/sci-chemistry/viewmol/viewmol-2.4.1-r3.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="tk(-)"
+
+inherit prefix python-single-r1 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="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ media-libs/libpng:0=
+ media-libs/tiff:0
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXt
+ x11-libs/motif:0
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ x11-proto/inputproto
+ x11-proto/xproto"
+
+S="${WORKDIR}/${P}/source"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-remove-icc-check.patch
+ "${FILESDIR}"/${PV}-change-default-paths.patch
+)
+
+src_prepare() {
+ default
+
+ eprefixify getrc.c
+ sed "s:GENTOOLIBDIR:$(get_libdir):g" -i install getrc.c || die
+ sed "s:GENTOODOCDIR:${PF}:g" -i install || die
+
+ mkdir "$(uname -s)" || die
+ cd "$(uname -s)" || die
+
+ cat >> ".config.$(uname -s)" <<- EOF || die
+ LIBTIFF = -L"${EPREFIX}/usr/$(get_libdir)"
+ TIFFINCLUDE = "${EPREFIX}/usr/include"
+
+ LIBPNG = -L"${EPREFIX}/usr/$(get_libdir)"
+ PNGINCLUDE = "${EPREFIX}/usr/include"
+
+ PYTHONVERSION = ${EPYTHON}
+ PYTHONINCLUDE = $(python_get_CFLAGS)
+ PYTHONLIB = $(python_get_LIBS)
+
+ COMPILER = $(tc-getCC)
+ CFLAGS = ${CFLAGS} -DLINUX
+ LDFLAGS = ${LDFLAGS}
+ SCANDIR=
+ INCLUDE=\$(TIFFINCLUDE) -I\$(PNGINCLUDE) \$(PYTHONINCLUDE)
+ LIBRARY=\$(LIBTIFF) \$(LIBPNG) \$(PYTHONLIB)
+ LIBS=-L"${EPREFIX}/usr/$(get_libdir)" -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 || die
+ cat ../Makefile >> makefile || die
+}
+
+src_compile() {
+ emake -C "$(uname -s)" viewmol_ tm_ bio_ readgamess_ readgauss_ readmopac_ readpdb_
+ "${EPREFIX}"/bin/bash makeTranslations || die
+}
+
+src_install() {
+ ./install "${ED%/}"/usr || die
+
+ # fix broken layout
+ mv "${ED%/}"/usr/{usr/share,} || die
+ rm -rf "${ED%/}"/usr/usr || die
+ mv "${ED%/}"/usr/{$(get_libdir)/${PN}/locale,share} || die
+ mv "${ED%/}"/usr/{$(get_libdir),libexec} || die
+}