diff options
author | Justin Lecher <jlec@gentoo.org> | 2010-06-24 20:37:03 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2010-06-24 20:37:03 +0000 |
commit | b76b855c7afe10511f54bcb6cb2fd9ea1f0eb1e9 (patch) | |
tree | ecc2d9dc7ceabcb4817657316097913eeb60eec9 /sci-chemistry | |
parent | add static-libs support (diff) | |
download | gentoo-2-b76b855c7afe10511f54bcb6cb2fd9ea1f0eb1e9.tar.gz gentoo-2-b76b855c7afe10511f54bcb6cb2fd9ea1f0eb1e9.tar.bz2 gentoo-2-b76b855c7afe10511f54bcb6cb2fd9ea1f0eb1e9.zip |
respect LDFLAGS and declarations
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/namd/ChangeLog | 9 | ||||
-rw-r--r-- | sci-chemistry/namd/files/namd-2.7-iml-dec.patch | 24 | ||||
-rw-r--r-- | sci-chemistry/namd/files/namd-2.7-ldflags.patch | 41 | ||||
-rw-r--r-- | sci-chemistry/namd/namd-2.7_beta2-r1.ebuild | 112 | ||||
-rw-r--r-- | sci-chemistry/namd/namd-2.7_beta2.ebuild | 8 |
5 files changed, 190 insertions, 4 deletions
diff --git a/sci-chemistry/namd/ChangeLog b/sci-chemistry/namd/ChangeLog index 019ea0af2f00..4c3f229cbdb3 100644 --- a/sci-chemistry/namd/ChangeLog +++ b/sci-chemistry/namd/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-chemistry/namd # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/namd/ChangeLog,v 1.12 2010/06/24 20:06:06 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/namd/ChangeLog,v 1.13 2010/06/24 20:37:03 jlec Exp $ + +*namd-2.7_beta2-r1 (24 Jun 2010) + + 24 Jun 2010; Justin Lecher <jlec@gentoo.org> namd-2.7_beta2.ebuild, + +namd-2.7_beta2-r1.ebuild, +files/namd-2.7-iml-dec.patch, + +files/namd-2.7-ldflags.patch: + respect LDFLAGS and declarations 24 Jun 2010; Justin Lecher <jlec@gentoo.org> -namd-2.7_beta1.ebuild: Removed unneeded diff --git a/sci-chemistry/namd/files/namd-2.7-iml-dec.patch b/sci-chemistry/namd/files/namd-2.7-iml-dec.patch new file mode 100644 index 000000000000..e5ee3bd6c818 --- /dev/null +++ b/sci-chemistry/namd/files/namd-2.7-iml-dec.patch @@ -0,0 +1,24 @@ +diff --git a/src/flipbinpdb.c b/src/flipbinpdb.c +index 94b71ba..01a2529 100644 +--- a/src/flipbinpdb.c ++++ b/src/flipbinpdb.c +@@ -9,6 +9,7 @@ + #include <sys/mman.h> + #include <fcntl.h> + #include <stdio.h> ++#include <stdlib.h> + + #ifndef MAP_FILE + #define MAP_FILE 0 +diff --git a/src/flipdcd.c b/src/flipdcd.c +index 8ec85b7..1c23433 100644 +--- a/src/flipdcd.c ++++ b/src/flipdcd.c +@@ -13,6 +13,7 @@ + #include <sys/mman.h> + #include <fcntl.h> + #include <stdio.h> ++#include <stdlib.h> + + #ifndef MAP_FILE + #define MAP_FILE 0 diff --git a/sci-chemistry/namd/files/namd-2.7-ldflags.patch b/sci-chemistry/namd/files/namd-2.7-ldflags.patch new file mode 100644 index 000000000000..686eba83a2de --- /dev/null +++ b/sci-chemistry/namd/files/namd-2.7-ldflags.patch @@ -0,0 +1,41 @@ +diff --git a/Makefile b/Makefile +index fd20f12..0821bed 100644 +--- a/Makefile ++++ b/Makefile +@@ -339,7 +339,7 @@ all: $(BINARIES) $(LIBCUDARTSO) + + namd2: $(INCDIR) $(DSTDIR) $(OBJS) $(LIBS) + $(MAKEBUILDINFO) +- $(CHARMC) -verbose -ld++-option \ ++ $(CHARMC) $(LDFLAGS) -verbose -ld++-option \ + "$(COPTI)$(CHARMINC) $(COPTI)$(INCDIR) $(COPTI)$(SRCDIR) $(CXXOPTS)" \ + -module NeighborLB -module commlib -language charm++ \ + $(BUILDINFO).o \ +@@ -394,23 +394,23 @@ charmrun.exe: + $(COPY) $(CHARM)/bin/charmrun.exe charmrun.exe + + psfgen: $(DSTDIR) $(SBOBJS) $(PLUGINOBJS) +- $(CC) $(SBCFLAGS) -o psfgen $(SBOBJS) $(PLUGINOBJS) $(TCLLIB) $(TCLAPPLIB) -lm ++ $(CC) $(SBCFLAGS) $(LDFLAGS) -o psfgen $(SBOBJS) $(PLUGINOBJS) $(TCLLIB) $(TCLAPPLIB) -lm + + psfgen.exe: $(DSTDIR) $(SBOBJS) $(PLUGINOBJS) $(TCLDLL) + $(CC) $(SBCFLAGS) -o psfgen $(SBOBJS) $(PLUGINOBJS) $(TCLLIB) $(TCLAPPLIB) -lm + + flipdcd: $(SRCDIR)/flipdcd.c +- $(CC) $(CFLAGS) -o $@ $(SRCDIR)/flipdcd.c || \ ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRCDIR)/flipdcd.c || \ + echo "#!/bin/sh\necho unavailable on this platform" > $@; \ + chmod +x $@ + + flipbinpdb: $(SRCDIR)/flipbinpdb.c +- $(CC) $(CFLAGS) -o $@ $(SRCDIR)/flipbinpdb.c || \ ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRCDIR)/flipbinpdb.c || \ + echo "#!/bin/sh\necho unavailable on this platform" > $@; \ + chmod +x $@ + + fixdcd: $(SRCDIR)/fixdcd.c +- $(CC) $(CFLAGS) -o fixdcd $(SRCDIR)/fixdcd.c ++ $(CC) $(CFLAGS) $(LDFLAGS) -o fixdcd $(SRCDIR)/fixdcd.c + + dumpdcd: $(SRCDIR)/dumpdcd.c + $(CC) $(CFLAGS) -o dumpdcd $(SRCDIR)/dumpdcd.c diff --git a/sci-chemistry/namd/namd-2.7_beta2-r1.ebuild b/sci-chemistry/namd/namd-2.7_beta2-r1.ebuild new file mode 100644 index 000000000000..3d0115b67590 --- /dev/null +++ b/sci-chemistry/namd/namd-2.7_beta2-r1.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/namd/namd-2.7_beta2-r1.ebuild,v 1.1 2010/06/24 20:37:03 jlec Exp $ + +inherit eutils toolchain-funcs flag-o-matic + +DESCRIPTION="A powerful and highly parallelized molecular dynamics code" +LICENSE="namd" +HOMEPAGE="http://www.ks.uiuc.edu/Research/namd/" + +MY_PN="NAMD" +MY_PV="2.7b2" + +SRC_URI="${MY_PN}_${MY_PV}_Source.tar.gz" + +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RESTRICT="fetch" + +DEPEND=" + app-shells/tcsh + sys-cluster/charm + =sci-libs/fftw-2* + dev-lang/tcl" + +RDEPEND=${DEPEND} + +NAMD_ARCH="Linux-x86_64-g++" + +NAMD_DOWNLOAD="http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=NAMD" + +S="${WORKDIR}/${MY_PN}_${MY_PV}_Source" + +pkg_nofetch() { + echo + einfo "Please download ${MY_PN}_${MY_PV}_Source.tar.gz from" + einfo "${NAMD_DOWNLOAD}" + einfo "after agreeing to the license and then move it to" + einfo "${DISTDIR}" + einfo "Be sure to select the ${MY_PV} version!" + echo +} + +src_unpack() { + unpack ${A} + cd "${S}" + + CHARM_VERSION=$(best_version sys-cluster/charm | cut -d- -f3) + + # apply a few small fixes to make NAMD compile and + # link to the proper libraries + epatch "${FILESDIR}"/namd-2.7_beta2-gentoo.patch + epatch "${FILESDIR}"/namd-2.7-ldflags.patch + epatch "${FILESDIR}"/namd-2.7-iml-dec.patch + sed -e "s:charm-6.1.3:charm-${CHARM_VERSION}:" \ + Make.charm || \ + die + + rm -f charm-6.1.3.tar || die + + # proper compiler and cflags + sed -e "s/g++/$(tc-getCXX)/" \ + -e "s/gcc/$(tc-getCC)/" \ + -e "s/CXXOPTS = -O3 -m64 -fexpensive-optimizations -ffast-math/CXXOPTS = ${CXXFLAGS}/" \ + -e "s/COPTS = -O3 -m64 -fexpensive-optimizations -ffast-math/COPTS = ${CFLAGS}/" \ + -i arch/${NAMD_ARCH}.arch || \ + die "Failed to setup ${NAMD_ARCH}.arch" + + sed -e "s/gentoo-libdir/$(get_libdir)/g" \ + -e "s/gentoo-charm/charm-${CHARM_VERSION}/g" \ + -i Makefile || die "Failed gentooizing Makefile." + sed -e "s/gentoo-libdir/$(get_libdir)/g" -i arch/Linux-x86_64.fftw || \ + die "Failed gentooizing Linux-x86_64.fftw." + sed -e "s/gentoo-libdir/$(get_libdir)/g" -i arch/Linux-x86_64.tcl || \ + die "Failed gentooizing Linux-x86_64.tcl." + + # configure + ./config ${NAMD_ARCH} +} + +src_compile() { + # build namd + cd "${S}/${NAMD_ARCH}" + emake || die "Failed to build namd" +} + +src_install() { + cd "${S}/${NAMD_ARCH}" + + # the binaries + dobin ${PN}2 psfgen flipbinpdb flipdcd || \ + die "Failed to install binaries" + + cd "${S}" + + # some docs + dodoc announce.txt license.txt notes.txt || \ + die "Failed to install docs" +} + +pkg_postinst() { + echo + einfo "For detailed instructions on how to run and configure" + einfo "NAMD please consults the extensive documentation at" + einfo "http://www.ks.uiuc.edu/Research/namd/" + einfo "and the NAMD tutorials available at" + einfo "http://www.ks.uiuc.edu/Training/Tutorials/" + einfo "Have fun :)" + echo +} diff --git a/sci-chemistry/namd/namd-2.7_beta2.ebuild b/sci-chemistry/namd/namd-2.7_beta2.ebuild index b63de6f52789..bc90354b4c61 100644 --- a/sci-chemistry/namd/namd-2.7_beta2.ebuild +++ b/sci-chemistry/namd/namd-2.7_beta2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/namd/namd-2.7_beta2.ebuild,v 1.1 2010/04/24 00:02:02 dberkholz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/namd/namd-2.7_beta2.ebuild,v 1.2 2010/06/24 20:37:03 jlec Exp $ inherit eutils toolchain-funcs flag-o-matic @@ -19,8 +19,8 @@ IUSE="" RESTRICT="fetch" -DEPEND="|| ( app-shells/csh - app-shells/tcsh ) +DEPEND=" + app-shells/tcsh sys-cluster/charm =sci-libs/fftw-2* dev-lang/tcl" @@ -52,6 +52,8 @@ src_unpack() { # apply a few small fixes to make NAMD compile and # link to the proper libraries epatch "${FILESDIR}"/namd-2.7_beta2-gentoo.patch + epatch "${FILESDIR}"/namd-2.7-ldflags.patch + epatch "${FILESDIR}"/namd-2.7-iml-dec.patch sed -e "s:charm-6.1.3:charm-${CHARM_VERSION}:" \ Make.charm || \ die |