summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-06-24 16:03:06 +0000
committerJustin Lecher <jlec@gentoo.org>2010-06-24 16:03:06 +0000
commit92bf7bde813b7fee48cac98ea7b27d09ca5a09e3 (patch)
tree8a297c6db115d725dd95ce9bf9c1ac97fd5ddd38 /sci-chemistry/molden
parentMarked ~hppa too. (diff)
downloadgentoo-2-92bf7bde813b7fee48cac98ea7b27d09ca5a09e3.tar.gz
gentoo-2-92bf7bde813b7fee48cac98ea7b27d09ca5a09e3.tar.bz2
gentoo-2-92bf7bde813b7fee48cac98ea7b27d09ca5a09e3.zip
Fix for glibc-2.11, fix for bug 315595
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/molden')
-rw-r--r--sci-chemistry/molden/ChangeLog11
-rw-r--r--sci-chemistry/molden/files/molden-4.7-glibc-2.11.patch116
-rw-r--r--sci-chemistry/molden/files/molden-4.7-implicit-dec.patch12
-rw-r--r--sci-chemistry/molden/files/molden-4.7-ldflags.patch13
-rw-r--r--sci-chemistry/molden/files/molden-4.8-ldflags.patch17
-rw-r--r--sci-chemistry/molden/molden-4.7-r1.ebuild67
-rw-r--r--sci-chemistry/molden/molden-4.8-r1.ebuild68
7 files changed, 297 insertions, 7 deletions
diff --git a/sci-chemistry/molden/ChangeLog b/sci-chemistry/molden/ChangeLog
index 9611cf06b4e4..5dfa153285bb 100644
--- a/sci-chemistry/molden/ChangeLog
+++ b/sci-chemistry/molden/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sci-chemistry/molden
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molden/ChangeLog,v 1.32 2010/02/26 05:33:34 markusle Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molden/ChangeLog,v 1.33 2010/06/24 16:03:06 jlec Exp $
+
+*molden-4.8-r1 (24 Jun 2010)
+*molden-4.7-r1 (24 Jun 2010)
+
+ 24 Jun 2010; Justin Lecher <jlec@gentoo.org> +molden-4.7-r1.ebuild,
+ +files/molden-4.7-glibc-2.11.patch, +files/molden-4.7-implicit-dec.patch,
+ +files/molden-4.7-ldflags.patch, +molden-4.8-r1.ebuild,
+ files/molden-4.8-ldflags.patch:
+ Fix for glibc-2.11, fix for bug #315595
*molden-4.8 (26 Feb 2010)
diff --git a/sci-chemistry/molden/files/molden-4.7-glibc-2.11.patch b/sci-chemistry/molden/files/molden-4.7-glibc-2.11.patch
new file mode 100644
index 000000000000..70125518c330
--- /dev/null
+++ b/sci-chemistry/molden/files/molden-4.7-glibc-2.11.patch
@@ -0,0 +1,116 @@
+diff --git a/xwin.c b/xwin.c
+index d38f87c..d328ee6 100644
+--- a/xwin.c
++++ b/xwin.c
+@@ -3776,7 +3776,7 @@ static int imoptm = 0;
+ static int ibopth = 0;
+ static int iboptl = 0;
+ static int iboptm = 0;
+-static int linkat = 0;
++static int lnkat = 0;
+
+ static QBOXSTRU IANZboxes[MAXAT];
+ static QBOXSTRU IZboxes[MAXAT][4];
+@@ -19234,7 +19234,7 @@ int i;
+ if (ioniom == 1) {
+ int ism, isl;
+
+- linkat = 0;
++ lnkat = 0;
+
+ /* Counting the number of Link atoms between H and lower
+ levels*/
+@@ -19247,10 +19247,10 @@ int i;
+ if (ionij != 0) continue;
+ nconn = xyzp->iconn[j*(MXCON+1)];
+ for (k=1;k<=nconn;k++) {
+- if (xyzp->ityp[xyzp->iconn[j*(MXCON+1)+k]-1]/10000 > 0) linkat++;
++ if (xyzp->ityp[xyzp->iconn[j*(MXCON+1)+k]-1]/10000 > 0) lnkat++;
+ }
+ }
+- linkat += 20000;
++ lnkat += 20000;
+ jobcom->itotc = jobcom->icopth;
+ jobcom->imult = jobcom->ispopth;
+ if (CheckChargeMult()) {
+@@ -19271,7 +19271,7 @@ int i;
+
+ } else if (ioniom == 2) {
+
+- linkat = 0;
++ lnkat = 0;
+
+ /* Counting the number of Link atoms between H and
+ lower levels*/
+@@ -19281,10 +19281,10 @@ int i;
+ if(ionij != 0) continue;
+ nconn = xyzp->iconn[j*(MXCON+1)];
+ for (k=1;k<=nconn;k++) {
+- if (xyzp->ityp[xyzp->iconn[j*(MXCON+1)+k]-1]/10000 > 0) linkat++;
++ if (xyzp->ityp[xyzp->iconn[j*(MXCON+1)+k]-1]/10000 > 0) lnkat++;
+ }
+ }
+- linkat += 20000;
++ lnkat += 20000;
+ jobcom->itotc = jobcom->icopth;
+ jobcom->imult = jobcom->ispopth;
+ if (CheckChargeMult()) {
+@@ -19296,7 +19296,7 @@ int i;
+ break;
+ */
+ }
+- linkat = 0;
++ lnkat = 0;
+
+ /* Counting the number of Link atoms between H+M and
+ lower levels*/
+@@ -19306,10 +19306,10 @@ int i;
+ if (ionij == 2) continue;
+ nconn = xyzp->iconn[j*(MXCON+1)];
+ for (k=1;k<=nconn;k++) {
+- if (xyzp->ityp[xyzp->iconn[j*(MXCON+1)+k]-1]/10000 == 2) linkat++;
++ if (xyzp->ityp[xyzp->iconn[j*(MXCON+1)+k]-1]/10000 == 2) lnkat++;
+ }
+ }
+- linkat += 20000;
++ lnkat += 20000;
+ jobcom->itotc = jobcom->icoptm;
+ jobcom->imult = jobcom->ispoptm;
+ if (CheckChargeMult()) {
+@@ -19324,7 +19324,7 @@ int i;
+ icopt = jobcom->icoptl+3;
+ ispopt = jobcom->ispoptl-1;
+ }
+- linkat = 0;
++ lnkat = 0;
+ jobcom->itotc = icopt - 3;
+ jobcom->imult = ispopt + 1;
+ jobcom->ito = itopt[jmode] + 1;
+@@ -19576,10 +19576,10 @@ int CheckChargeMult()
+ ionil = 0;
+
+ if (ioniom) {
+- ionil = 3 - (linkat / 10000);
+- linkat -= (linkat / 10000) * 10000;
++ ionil = 3 - (lnkat / 10000);
++ lnkat -= (lnkat / 10000) * 10000;
+ } else {
+- linkat = 0;
++ lnkat = 0;
+ }
+
+ if (*zmptrp->ihaszm) {
+@@ -19602,10 +19602,10 @@ int CheckChargeMult()
+ }
+ }
+ /*
+- fprintf(stderr,"ionil %d ne %d itotc %d linkat %d mult %d\n",
+- ionil,ne,jobcom->itotc,linkat,jobcom->imult);
++ fprintf(stderr,"ionil %d ne %d itotc %d lnkat %d mult %d\n",
++ ionil,ne,jobcom->itotc,lnkat,jobcom->imult);
+ */
+- ne = ne - jobcom->itotc + linkat;
++ ne = ne - jobcom->itotc + lnkat;
+ if (ne % 2 == jobcom->imult % 2) return(1);
+ return(0);
+ }
diff --git a/sci-chemistry/molden/files/molden-4.7-implicit-dec.patch b/sci-chemistry/molden/files/molden-4.7-implicit-dec.patch
new file mode 100644
index 000000000000..dd5aba4f17da
--- /dev/null
+++ b/sci-chemistry/molden/files/molden-4.7-implicit-dec.patch
@@ -0,0 +1,12 @@
+diff --git a/silly.c b/silly.c
+index 57d07e8..102156a 100644
+--- a/silly.c
++++ b/silly.c
+@@ -13,6 +13,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
++#include <string.h>
+
+ #ifndef WIN32
+ #include <GL/gl.h>
diff --git a/sci-chemistry/molden/files/molden-4.7-ldflags.patch b/sci-chemistry/molden/files/molden-4.7-ldflags.patch
new file mode 100644
index 000000000000..2dc3f94c1b72
--- /dev/null
+++ b/sci-chemistry/molden/files/molden-4.7-ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/makefile b/makefile
+index 410ca25..30dd5e1 100644
+--- a/makefile
++++ b/makefile
+@@ -265,7 +265,7 @@ short_wrl: short_wrl.o
+ # Moldens OpenGL helper program
+
+ moldenogl: oglmol.o silly.o
+- $(CC) -o moldenogl oglmol.o silly.o $(LIBSOGL)
++ $(CC) $(LDFLAGS) -o moldenogl oglmol.o silly.o $(LIBSOGL)
+
+ # conversion of CADPAC output to molden format
+
diff --git a/sci-chemistry/molden/files/molden-4.8-ldflags.patch b/sci-chemistry/molden/files/molden-4.8-ldflags.patch
index 3759f1406f00..92fa6c665f3f 100644
--- a/sci-chemistry/molden/files/molden-4.8-ldflags.patch
+++ b/sci-chemistry/molden/files/molden-4.8-ldflags.patch
@@ -1,7 +1,8 @@
-diff -Naur molden4.8.old/makefile molden4.8/makefile
---- molden4.8.old/makefile 2009-09-21 12:01:33.000000000 -0400
-+++ molden4.8/makefile 2010-02-26 00:11:28.000000000 -0500
-@@ -224,7 +224,7 @@
+diff --git a/makefile b/makefile
+index 81147a3..9e2353e 100644
+--- a/makefile
++++ b/makefile
+@@ -224,10 +224,10 @@ all: molden gmolden ambfor/ambfor ambfor/ambmd surf/surf
molden: $(OBJS) mpdum.o xwin.o
@@ -9,8 +10,12 @@ diff -Naur molden4.8.old/makefile molden4.8/makefile
+ $(LDR) $(LDFLAGS) -o molden $(OBJS) mpdum.o xwin.o $(LIBS)
gmolden: $(OBJS) mpdum.o xwingl.o
- $(LDR) -o gmolden $(OBJS) mpdum.o xwingl.o $(LIBSG)
-@@ -269,7 +269,7 @@
+- $(LDR) -o gmolden $(OBJS) mpdum.o xwingl.o $(LIBSG)
++ $(LDR) $(LDFLAGS) -o gmolden $(OBJS) mpdum.o xwingl.o $(LIBSG)
+
+ ambfor/ambfor: ambfor/*.f ambfor/*.c
+ $(MAKE) -C ambfor FC=${FC} FFLAGS="${FFLAGS}" LDR="${LDR}" CFLAGS="${CFLAGS}"
+@@ -269,7 +269,7 @@ short_wrl: short_wrl.o
# Moldens OpenGL helper program
moldenogl: oglmol.o silly.o
diff --git a/sci-chemistry/molden/molden-4.7-r1.ebuild b/sci-chemistry/molden/molden-4.7-r1.ebuild
new file mode 100644
index 000000000000..70362d28567e
--- /dev/null
+++ b/sci-chemistry/molden/molden-4.7-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molden/molden-4.7-r1.ebuild,v 1.1 2010/06/24 16:03:06 jlec Exp $
+
+EAPI="3"
+
+inherit eutils flag-o-matic fortran toolchain-funcs
+
+FORTRAN="g77 gfortran"
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Display molecular density from GAMESS-UK, GAMESS-US, GAUSSIAN and Mopac/Ampac."
+HOMEPAGE="http://www.cmbi.kun.nl/~schaft/molden/molden.html"
+SRC_URI="ftp://ftp.cmbi.kun.nl/pub/molgraph/${PN}/${MY_P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~x86"
+IUSE="opengl"
+
+RDEPEND="
+ x11-libs/libXmu
+ opengl? (
+ virtual/glut
+ virtual/opengl )"
+DEPEND="${RDEPEND}
+ app-editors/vim"
+ # vim provides ex, which the build system uses (surf/Makefile, at least)
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-glibc-2.11.patch
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+ epatch "${FILESDIR}"/${P}-implicit-dec.patch
+ sed 's:makedepend:gccmakedep:g' -i surf/Makefile
+}
+
+src_compile() {
+ # Use -mieee on alpha, according to the Makefile
+ use alpha && append-flags -mieee
+
+ # Honor CC, CFLAGS, FC, and FFLAGS from environment;
+ # unfortunately a bash bug prevents us from doing typeset and
+ # assignment on the same line.
+ typeset -a args
+ args=( CC="$(tc-getCC) ${CFLAGS}" \
+ FC="${FORTRANC}" LDR="${FORTRANC} ${LDFLAGS}" FFLAGS="${FFLAGS}" )
+
+ einfo "Building Molden..."
+ emake -j1 "${args[@]}" || die "molden emake failed"
+ if use opengl ; then
+ einfo "Building Molden OpenGL helper..."
+ emake -j1 "${args[@]}" moldenogl || die "moldenogl emake failed"
+ fi
+}
+
+src_install() {
+ dobin ${PN} g${PN} || die "failed to install molden executable."
+ if use opengl ; then
+ dobin ${PN}ogl || die "failed to install moldenogl."
+ fi
+
+ dodoc HISTORY README REGISTER || die "failed to install docs."
+ cd doc
+ uncompress * && dodoc * || die "failed to install docs."
+}
diff --git a/sci-chemistry/molden/molden-4.8-r1.ebuild b/sci-chemistry/molden/molden-4.8-r1.ebuild
new file mode 100644
index 000000000000..52bbc291e319
--- /dev/null
+++ b/sci-chemistry/molden/molden-4.8-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/molden/molden-4.8-r1.ebuild,v 1.1 2010/06/24 16:03:06 jlec Exp $
+
+EAPI="3"
+
+inherit eutils flag-o-matic fortran toolchain-funcs
+
+FORTRAN="g77 gfortran"
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Display molecular density from GAMESS-UK, GAMESS-US, GAUSSIAN and Mopac/Ampac."
+HOMEPAGE="http://www.cmbi.kun.nl/~schaft/molden/molden.html"
+SRC_URI="ftp://ftp.cmbi.kun.nl/pub/molgraph/${PN}/${MY_P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~x86"
+IUSE="opengl"
+
+RDEPEND="
+ x11-libs/libXmu
+ opengl? (
+ virtual/glut
+ virtual/opengl )"
+DEPEND="${RDEPEND}
+ app-editors/vim"
+ # vim provides ex, which the build system uses (surf/Makefile, at least)
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ambfor.patch
+ epatch "${FILESDIR}"/${P}-overflow.patch
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+ epatch "${FILESDIR}"/${PN}-4.7-implicit-dec.patch
+ sed 's:makedepend:gccmakedep:g' -i surf/Makefile
+}
+
+src_compile() {
+ # Use -mieee on alpha, according to the Makefile
+ use alpha && append-flags -mieee
+
+ # Honor CC, CFLAGS, FC, and FFLAGS from environment;
+ # unfortunately a bash bug prevents us from doing typeset and
+ # assignment on the same line.
+ typeset -a args
+ args=( CC="$(tc-getCC) ${CFLAGS}" \
+ FC="${FORTRANC}" LDR="${FORTRANC}" FFLAGS="${FFLAGS}" )
+
+ einfo "Building Molden..."
+ emake -j1 "${args[@]}" || die "molden emake failed"
+ if use opengl ; then
+ einfo "Building Molden OpenGL helper..."
+ emake -j1 "${args[@]}" moldenogl || die "moldenogl emake failed"
+ fi
+}
+
+src_install() {
+ dobin ${PN} g${PN} || die "failed to install molden executable."
+ if use opengl ; then
+ dobin ${PN}ogl || die "failed to install moldenogl."
+ fi
+
+ dodoc HISTORY README REGISTER || die "failed to install docs."
+ cd doc
+ uncompress * && dodoc * || die "failed to install docs."
+}