summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-03-30 19:55:26 +0000
committerJustin Lecher <jlec@gentoo.org>2010-03-30 19:55:26 +0000
commitd53a21027a2a20096aef53643a7bb06d15768290 (patch)
treea7dbf11e3ef5c0559f07f5023d644762a7f9cf98 /sci-chemistry/molmol
parentVersion bump KDE 4.4.2 (diff)
downloadgentoo-2-d53a21027a2a20096aef53643a7bb06d15768290.tar.gz
gentoo-2-d53a21027a2a20096aef53643a7bb06d15768290.tar.bz2
gentoo-2-d53a21027a2a20096aef53643a7bb06d15768290.zip
Ldflags fix and prefix fix
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/molmol')
-rw-r--r--sci-chemistry/molmol/ChangeLog8
-rw-r--r--sci-chemistry/molmol/files/ldflags.patch13
-rw-r--r--sci-chemistry/molmol/files/prefix.patch22
-rw-r--r--sci-chemistry/molmol/molmol-2k_p2-r2.ebuild77
4 files changed, 119 insertions, 1 deletions
diff --git a/sci-chemistry/molmol/ChangeLog b/sci-chemistry/molmol/ChangeLog
index 97ef0cc90dde..457597cafeb4 100644
--- a/sci-chemistry/molmol/ChangeLog
+++ b/sci-chemistry/molmol/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-chemistry/molmol
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molmol/ChangeLog,v 1.18 2010/03/07 11:19:03 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molmol/ChangeLog,v 1.19 2010/03/30 19:55:26 jlec Exp $
+
+*molmol-2k_p2-r2 (30 Mar 2010)
+
+ 30 Mar 2010; Justin Lecher <jlec@gentoo.org> molmol-2k_p2-r1.ebuild,
+ +molmol-2k_p2-r2.ebuild, +files/ldflags.patch, +files/prefix.patch:
+ Respecting LDFLAGS and fixes for prefix
*molmol-2k_p2-r1 (07 Mar 2010)
diff --git a/sci-chemistry/molmol/files/ldflags.patch b/sci-chemistry/molmol/files/ldflags.patch
new file mode 100644
index 000000000000..ff6e06ef490c
--- /dev/null
+++ b/sci-chemistry/molmol/files/ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/src/main/Makefile b/src/main/Makefile
+index 74530fa..102d1b7 100644
+--- a/src/main/Makefile
++++ b/src/main/Makefile
+@@ -22,7 +22,7 @@ SRC = $(OBJ:.o=.c)
+ default: $(PROGRAM)
+
+ $(PROGRAM): $(OBJ) $(LIBS) $(SGLIB) $(TOOLSLIB)
+- $(CC) -o $@ $(CFLAGS) $(OBJ) $(LIBS) $(SGLIB) $(TOOLSLIB) $(SYSLIB)
++ $(CC) $(CFLAGS) ${LDFLAGS} -o $@ $(OBJ) $(LIBS) $(SGLIB) $(TOOLSLIB) $(SYSLIB)
+
+ clean:
+ rm -f $(OBJ) $(PROGRAM) core *.ps
diff --git a/sci-chemistry/molmol/files/prefix.patch b/sci-chemistry/molmol/files/prefix.patch
new file mode 100644
index 000000000000..89f17b2e984e
--- /dev/null
+++ b/sci-chemistry/molmol/files/prefix.patch
@@ -0,0 +1,22 @@
+diff --git a/molmol b/molmol
+index e774abf..9f10558 100755
+--- a/molmol
++++ b/molmol
+@@ -57,7 +57,7 @@ if [ $ostype = "SunOS" ]; then
+ elif [ $ostype = "HP-UX" ]; then
+ xdpy=/usr/contrib/bin/X11/xdpyinfo
+ else
+- xdpy=/usr/bin/X11/xdpyinfo
++ xdpy=@GENTOO_PORTAGE_EPREFIX@/usr/bin/xdpyinfo
+ fi
+
+ printUsage () {
+@@ -119,7 +119,7 @@ while [ -n "$*" ]; do
+ esac
+ done
+
+-magictmp=/tmp/molmol_magic$$
++magictmp=@GENTOO_PORTAGE_EPREFIX@/tmp/molmol_magic$$
+
+ if [ ! -d $HOME/molmol ]; then
+ mkdir $HOME/molmol
diff --git a/sci-chemistry/molmol/molmol-2k_p2-r2.ebuild b/sci-chemistry/molmol/molmol-2k_p2-r2.ebuild
new file mode 100644
index 000000000000..5e6d3ba2cae3
--- /dev/null
+++ b/sci-chemistry/molmol/molmol-2k_p2-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molmol/molmol-2k_p2-r2.ebuild,v 1.1 2010/03/30 19:55:26 jlec Exp $
+
+EAPI="3"
+
+inherit eutils toolchain-funcs multilib prefix
+
+MY_PV="${PV/_p/.}.0"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Publication-quality molecular visualization package"
+HOMEPAGE="http://hugin.ethz.ch/wuthrich/software/molmol/index.html"
+SRC_URI="ftp://ftp.mol.biol.ethz.ch/software/MOLMOL/unix-gzip/${MY_P}-src.tar.gz
+ ftp://ftp.mol.biol.ethz.ch/software/MOLMOL/unix-gzip/${MY_P}-doc.tar.gz"
+LICENSE="molmol"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+DEPEND="
+ media-libs/mesa[motif]
+ media-libs/jpeg
+ media-libs/tiff
+ media-libs/libpng
+ sys-libs/zlib
+ x11-apps/xdpyinfo
+ x11-libs/openmotif
+ x11-libs/libXpm"
+# Run-time dependencies, same as DEPEND if RDEPEND isn't defined:
+#RDEPEND=""
+# Yeah, the gz's aren't in a subdir.
+S="${WORKDIR}"
+
+MMDIR="/usr/$(get_libdir)/molmol"
+
+src_prepare() {
+ rm -rf tiff*
+ # Patch from http://pjf.net/science/molmol.html, where src.rpm is provided
+ epatch "${FILESDIR}"/pjf_RH9_molmol2k2.diff
+
+ epatch "${FILESDIR}"/prefix.patch
+ eprefixify molmol
+
+ epatch "${FILESDIR}"/ldflags.patch
+
+ ln -s makedef.lnx "${S}"/makedef
+
+ # 1) The Korn shell is only taken by default because the Bourne shell
+ # on DEC systems cannot handle the script.
+ # We don't want this needless dependency.
+ # 2) Fix up MOLMOLHOME, which determines the directory the binary's in.
+ sed -i \
+ -e "s:/bin/ksh:${EPREFIX}/bin/sh:" \
+ -e "s:^MOLMOLHOME.*:MOLMOLHOME=${EPREFIX}/${MMDIR}:" \
+ "${S}"/molmol
+ # 1) Set CFLAGS.
+ # 2) Set compiler.
+ sed -i \
+ -e "s:^MCFLAGS.*:MCFLAGS = ${CFLAGS}:" \
+ -e "s:^CC.*:CC = $(tc-getCC):" \
+ "${S}"/makedef
+}
+
+src_compile() {
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ dobin molmol || die
+
+ exeinto ${MMDIR}
+ newexe src/main/molmol molmol.lnx || die
+ insinto ${MMDIR}
+ doins -r auxil help macros man setup tips || die
+
+ dodoc HISTORY README || die
+}