diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2008-03-24 19:45:25 +0000 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2008-03-24 19:45:25 +0000 |
commit | eff1cf1b464150699170f98af7c33424ceaa5327 (patch) | |
tree | 10c5b842ea8e7b4618e87fd991daa19cb231a4c4 /sys-cluster/pvm | |
parent | Reversion things so old is old #191088. (diff) | |
download | gentoo-2-eff1cf1b464150699170f98af7c33424ceaa5327.tar.gz gentoo-2-eff1cf1b464150699170f98af7c33424ceaa5327.tar.bz2 gentoo-2-eff1cf1b464150699170f98af7c33424ceaa5327.zip |
Actually respect the user's compiler and CFLAGS. Build libpvm3.a PIC so that other apps can link against it on architectures such as amd64.
(Portage version: 2.1.4.4)
Diffstat (limited to 'sys-cluster/pvm')
-rw-r--r-- | sys-cluster/pvm/ChangeLog | 9 | ||||
-rw-r--r-- | sys-cluster/pvm/files/pvm-3.4.5-respect-cflags.patch | 15 | ||||
-rw-r--r-- | sys-cluster/pvm/pvm-3.4.5-r3.ebuild | 103 |
3 files changed, 126 insertions, 1 deletions
diff --git a/sys-cluster/pvm/ChangeLog b/sys-cluster/pvm/ChangeLog index f7a17914fe04..68ae81d11699 100644 --- a/sys-cluster/pvm/ChangeLog +++ b/sys-cluster/pvm/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-cluster/pvm # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvm/ChangeLog,v 1.36 2008/01/31 07:01:18 dberkholz Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvm/ChangeLog,v 1.37 2008/03/24 19:45:24 dberkholz Exp $ + +*pvm-3.4.5-r3 (24 Mar 2008) + + 24 Mar 2008; Donnie Berkholz <dberkholz@gentoo.org>; + +files/pvm-3.4.5-respect-cflags.patch, +pvm-3.4.5-r3.ebuild: + Actually respect the user's compiler and CFLAGS. Build libpvm3.a PIC so + that other apps can link against it on architectures such as amd64. 31 Jan 2008; Donnie Berkholz <dberkholz@gentoo.org>; -pvm-3.4.4-r2.ebuild: Clean up. diff --git a/sys-cluster/pvm/files/pvm-3.4.5-respect-cflags.patch b/sys-cluster/pvm/files/pvm-3.4.5-respect-cflags.patch new file mode 100644 index 000000000000..31ba5e33e12c --- /dev/null +++ b/sys-cluster/pvm/files/pvm-3.4.5-respect-cflags.patch @@ -0,0 +1,15 @@ +diff -ur pvm3.orig/Makefile.aimk pvm3/Makefile.aimk +--- pvm3.orig/Makefile.aimk 2008-03-24 12:37:29.000000000 -0700 ++++ pvm3/Makefile.aimk 2008-03-24 12:37:42.000000000 -0700 +@@ -34,9 +34,9 @@ + # + + PVMOPTS = CC="$(CC)" \ +- F77="$(F77)" ++ F77="$(F77)" \ ++ CFLOPTS="$(CFLOPTS)" + +-# CFLOPTS="$(CFLOPTS)" + # FFLOPTS="$(FFLOPTS)" + # PVMDIR=$(PVMDIR) + diff --git a/sys-cluster/pvm/pvm-3.4.5-r3.ebuild b/sys-cluster/pvm/pvm-3.4.5-r3.ebuild new file mode 100644 index 000000000000..7a13f2976586 --- /dev/null +++ b/sys-cluster/pvm/pvm-3.4.5-r3.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvm/pvm-3.4.5-r3.ebuild,v 1.1 2008/03/24 19:45:24 dberkholz Exp $ + +inherit eutils multilib flag-o-matic toolchain-funcs + +MY_P="${P/-}" +DESCRIPTION="PVM: Parallel Virtual Machine" +HOMEPAGE="http://www.epm.ornl.gov/pvm/pvm_home.html" +SRC_URI="ftp://ftp.netlib.org/pvm3/${MY_P}.tgz " +IUSE="crypt" +DEPEND="" +RDEPEND="virtual/libc" +SLOT="0" +LICENSE="as-is" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +S="${WORKDIR}/${MY_P%%.*}" + +src_unpack() { + unpack ${A} + cd ${S} + # Patches from Red Hat + epatch ${FILESDIR}/${P}-envvars.patch || die + epatch ${FILESDIR}/${P}-strerror.patch || die + epatch ${FILESDIR}/${P}-extra-arches.patch || die + epatch ${FILESDIR}/${P}-x86_64-segfault.patch || die + epatch ${FILESDIR}/${P}-gcc-4.1.patch || die + epatch ${FILESDIR}/${P}-bug_147337.patch || die + +# setup def files for other archs + cp conf/LINUX64.def conf/LINUXPPC64.def + cp conf/LINUX64.m4 conf/LINUXPPC64.m4 + + epatch ${FILESDIR}/${P}-ppc64.patch || die + epatch ${FILESDIR}/${P}-respect-cflags.patch || die + +# s390 should go in this list if there is ever interest +# Patch the 64bit def files to look in lib64 dirs as well for libraries. + for I in 64 PPC64; do + sed -i -e "s|ARCHDLIB =|ARCHDLIB = -L/usr/lib64 -L/usr/X11R6/lib64 |" conf/LINUX${I}.def || die "Failed to fix 64-bit" + sed -i -e "s|ARCHLIB =|ARCHLIB = -L/usr/lib64 -L/usr/X11R6/lib64 |" conf/LINUX${I}.def || die "Failed to fix 64-bit" + done + + if use crypt; then + for i in ${S}/conf/LINUX*def; do + sed -i.orig -e '/^ARCHCFLAGS/s~/usr/bin/rsh~/usr/bin/ssh~' "${i}" || + die "Failed to set ssh instead of rsh" + done + fi + +} + +src_compile() { + unset PVM_ARCH + + export PVM_ROOT="${S}" + + # libpvm3.a needs to be PIC so other apps can link against it. The + # build system sucks, so it's a huge pain to try to make only the + # library PIC. + if [[ $(get_libdir) = lib64 ]]; then + append-flags -fPIC + fi + + emake \ + CC=$(tc-getCC) \ + CFLOPTS="${CFLAGS}" \ + || die +} + +src_install() { + dodir /usr/share/man + rm man/man1 -fr + mv man/man3 ${D}/usr/share/man/ + + dodoc Readme + + #installs the rest of pvm + dodir /usr/share/pvm3 + cp -r * ${D}/usr/share/pvm3 + dodir /usr/bin + + # (#132711) Symlink to the right spot on multilib systems + local linuxdir + if [[ $(get_libdir) = lib64 ]]; then + linuxdir="LINUX64" + else + linuxdir="LINUX" + fi + ln -s /usr/share/pvm3/lib/${linuxdir}/pvm ${D}/usr/bin/pvm + ln -s /usr/share/pvm3/lib/${linuxdir}/pvmd3 ${D}/usr/bin/pvmd3 + ln -s /usr/share/pvm3/lib/${linuxdir}/pvmgs ${D}/usr/bin/pvmgs + + #environment variables: + echo PVM_ROOT=/usr/share/pvm3 > ${T}/98pvm + echo PVM_ARCH=$(${D}/usr/share/pvm3/lib/pvmgetarch) >> ${T}/98pvm + doenvd ${T}/98pvm +} + +pkg_postinst() { + ewarn "Environment variables have changed. Do not forget to run etc-update," + ewarn "reboot or perform . /etc/profile before using pvm!" +} |