summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2008-11-07 01:00:09 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2008-11-07 01:00:09 +0000
commit6ee8d94e0e4b2bef01954005c49dec3c0ab0bad3 (patch)
tree4b480b358fb4d2de3fdd32c0363e02f0d5626ca7 /sci-chemistry
parentSet MY_FORTRAN correctly when only FC and not F77 or F2C are set. (diff)
downloadgentoo-2-6ee8d94e0e4b2bef01954005c49dec3c0ab0bad3.tar.gz
gentoo-2-6ee8d94e0e4b2bef01954005c49dec3c0ab0bad3.tar.bz2
gentoo-2-6ee8d94e0e4b2bef01954005c49dec3c0ab0bad3.zip
Add OpenMP support.
(Portage version: 2.2_rc12/cvs/Linux 2.6.28-rc3 x86_64)
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/shelx/ChangeLog8
-rw-r--r--sci-chemistry/shelx/shelx-20060317-r1.ebuild78
2 files changed, 85 insertions, 1 deletions
diff --git a/sci-chemistry/shelx/ChangeLog b/sci-chemistry/shelx/ChangeLog
index 8e6411f711ba..15a847bda6b8 100644
--- a/sci-chemistry/shelx/ChangeLog
+++ b/sci-chemistry/shelx/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-chemistry/shelx
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/shelx/ChangeLog,v 1.11 2008/08/06 15:40:19 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/shelx/ChangeLog,v 1.12 2008/11/07 01:00:09 dberkholz Exp $
+
+*shelx-20060317-r1 (07 Nov 2008)
+
+ 07 Nov 2008; Donnie Berkholz <dberkholz@gentoo.org>;
+ +shelx-20060317-r1.ebuild:
+ Add OpenMP support.
06 Aug 2008; Ulrich Mueller <ulm@gentoo.org> metadata.xml:
Add USE flag description to metadata wrt GLEP 56.
diff --git a/sci-chemistry/shelx/shelx-20060317-r1.ebuild b/sci-chemistry/shelx/shelx-20060317-r1.ebuild
new file mode 100644
index 000000000000..98a76dc212e1
--- /dev/null
+++ b/sci-chemistry/shelx/shelx-20060317-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/shelx/shelx-20060317-r1.ebuild,v 1.1 2008/11/07 01:00:09 dberkholz Exp $
+
+inherit autotools eutils flag-o-matic fortran
+
+DESCRIPTION="Programs for crystal structure determination from single-crystal diffraction data"
+HOMEPAGE="http://shelx.uni-ac.gwdg.de/SHELX/"
+SRC_URI="${P}.tgz
+ openmp? ( ${P}-mp.tgz )"
+RESTRICT="fetch"
+LICENSE="free-noncomm"
+SLOT="0"
+KEYWORDS="~ppc ~x86"
+IUSE="dosformat openmp"
+RDEPEND=""
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/unix"
+
+FORTRAN="ifc gfortran"
+
+pkg_nofetch() {
+ einfo "Go to ${HOMEPAGE}"
+ einfo "Fill out the application form, and send it in."
+ einfo "Download unix.tgz, rename it to ${P}.tgz,"
+ use openmp && einfo "download mp.tgz, rename it to ${P}-mp.tgz,"
+ einfo "and place renamed tarballs in ${DISTDIR}."
+}
+
+src_unpack() {
+ unpack ${A}
+ epatch ${FILESDIR}/${PV}-autotool.patch
+ epatch ${FILESDIR}/${PV}-gfortran.patch
+
+ if use openmp; then
+ for i in shelxh shelxlv; do
+ cp mp/${i}_omp.f unix/${i}.f
+ done
+ fi
+
+ sed -i \
+ -e "s:CIFDIR='/usr/local/bin/':CIFDIR='/usr/share/${PN}/':g" \
+ "${S}"/ciftab.f
+
+ if use dosformat; then
+ sed -i \
+ -e "s/KD=CHAR(32)/KD=CHAR(13)/g" \
+ "${S}"/*f
+ fi
+
+ cd "${S}"
+ eautoreconf
+}
+
+src_compile() {
+ case $(tc-getF77) in
+ gfortran) append-flags -fopenmp ;;
+ ifort) append-flags -openmp ;;
+ *) ewarn "Please add any necessary OpenMP build flags to F77FLAGS." ;;
+ esac
+
+ econf \
+ FC="${FORTRANC}" \
+ || die "configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+}
+
+pkg_info() {
+ use openmp && einfo "Set OMP_NUM_THREADS to the number of threads you want."
+}
+
+pkg_postinst() {
+ pkg_info
+}