public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-03-10 19:00 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-03-10 19:00 UTC (permalink / raw
  To: gentoo-commits

commit:     b47d033e03fbf2ab1245448221cb307f85e708d9
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 10 11:22:04 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Mar 10 11:22:04 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=b47d033e

defualt for largefile support

---
 eclass/embassy-ng.eclass |  106 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 106 insertions(+), 0 deletions(-)

diff --git a/eclass/embassy-ng.eclass b/eclass/embassy-ng.eclass
new file mode 100644
index 0000000..ad5e6ae
--- /dev/null
+++ b/eclass/embassy-ng.eclass
@@ -0,0 +1,106 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/embassy.eclass,v 1.17 2008/11/03 22:17:50 ribosome Exp $
+
+# Creator of the original eclass
+# Author Olivier Fisette <ofisette@gmail.com>
+#
+# Author of the next generation eclass
+# Justin Lecher <jlec@gentoo.org>
+
+# @ECLASS: versionator.eclass
+# @MAINTAINER:
+# sci-biology@gentoo.org
+# jlec@gentoo.org
+# @BLURB: Use this to easy install EMBASSY programs (EMBOSS add-ons).
+# @DESCRIPTION: The inheriting ebuild should provide a "DESCRIPTION", "KEYWORDS"
+# and, if necessary, add "(R|P)DEPEND"encies. Additionnaly, the inheriting
+# ebuild's name must begin by "embassy-". Also, before inheriting, the ebuild
+# should specify what version of EMBOSS is required by setting EBOV.
+
+EAPI="4"
+
+inherit autotools eutils multilib
+
+DESCRIPTION="Based on the $ECLASS eclass"
+HOMEPAGE="http://emboss.sourceforge.net/"
+LICENSE="LGPL-2 GPL-2"
+
+SLOT="0"
+IUSE+=" doc minimal mysql pdf png postgres static-libs X"
+
+DEPEND="
+	dev-libs/expat
+	dev-libs/libpcre:3
+	sci-libs/plplot
+	sys-libs/zlib
+	mysql? ( dev-db/mysql )
+	pdf? ( media-libs/libharu )
+	png? (
+		sys-libs/zlib
+		media-libs/libpng
+		media-libs/gd
+		)
+	postgres? ( dev-db/postgresql-base )
+	X? ( x11-libs/libXt )"
+
+RDEPEND="${DEPEND}"
+
+if [[ ${PN} == "emboss" ]] ; then
+	DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
+	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz"
+	[[ -n ${EBO_PATCH} ]] && SRC_URI+=" ftp://${PN}.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${MY_PATCH}.gz -> ${P}.patch.gz"
+	IUSE+=" minimal"
+	RDEPEND+=" !sys-devel/cons"
+	PDEPEND="
+		!minimal? (
+				sci-biology/aaindex
+				sci-biology/cutg
+				sci-biology/prints
+				sci-biology/prosite
+				sci-biology/rebase
+				sci-biology/transfac
+				)"
+	S="${WORKDIR}/EMBOSS-${EBOV}"
+else
+	# The EMBASSY package name, retrieved from the inheriting ebuild's name
+	EN=${PN:8}
+	# The full name and version of the EMBASSY package (excluding the Gentoo
+	# revision number)
+	EF="$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}"
+
+	DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
+	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EBOV}-${PN:8}-${PV}.tar.gz"
+	DEPEND+=" =sci-biology/emboss-${EBOV}*[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
+
+	S="${WORKDIR}"/${EF}
+fi
+
+embassy-ng_src_prepare() {
+	[[ -n ${EBO_PATCH} ]] && epatch "${WORKDIR}"/${P}.patch
+	[[ -f "${FILESDIR}"/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch
+	[[ -n ${NO_RECONF} ]] || eautoreconf
+}
+
+embassy-ng_src_configure() {
+	econf \
+		$(use_with X x) \
+		$(use_with png pngdriver "${EPREFIX}/usr") \
+		$(use_with doc docroot "${EPREFIX}/usr") \
+		$(use_with pdf hpdf "${EPREFIX}/usr") \
+		$(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config") \
+		$(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config") \
+		$(use_enable amd64 64) \
+		$(use_enable static-libs static) \
+		--enable-large
+		--without-java \
+		--enable-systemlibs \
+		${EBO_ECONF}
+}
+
+embassy-ng_src_install() {
+	emake DESTDIR="${D}" install
+	nonfatal dodoc AUTHORS ChangeLog FAQ NEWS README THANKS
+}
+
+EXPORT_FUNCTIONS src_prepare src_configure src_install



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-03-10 19:00 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-03-10 19:00 UTC (permalink / raw
  To: gentoo-commits

commit:     0ec40849d2201c1d4a15ce8a73b85dc4408bb953
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 10 16:36:05 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Mar 10 16:36:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0ec40849

embassy-ng.eclass progressing

---
 eclass/embassy-ng.eclass |   91 ++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 80 insertions(+), 11 deletions(-)

diff --git a/eclass/embassy-ng.eclass b/eclass/embassy-ng.eclass
index ad5e6ae..951e5eb 100644
--- a/eclass/embassy-ng.eclass
+++ b/eclass/embassy-ng.eclass
@@ -8,15 +8,52 @@
 # Author of the next generation eclass
 # Justin Lecher <jlec@gentoo.org>
 
-# @ECLASS: versionator.eclass
+# @ECLASS: embassy-ng.eclass
 # @MAINTAINER:
 # sci-biology@gentoo.org
 # jlec@gentoo.org
-# @BLURB: Use this to easy install EMBASSY programs (EMBOSS add-ons).
-# @DESCRIPTION: The inheriting ebuild should provide a "DESCRIPTION", "KEYWORDS"
-# and, if necessary, add "(R|P)DEPEND"encies. Additionnaly, the inheriting
-# ebuild's name must begin by "embassy-". Also, before inheriting, the ebuild
-# should specify what version of EMBOSS is required by setting EBOV.
+# @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
+# @DESCRIPTION:
+# The inheriting ebuild should provide EBOV, EBO_DESCRIPTION and "KEYWORDS",
+# before the inherit line.
+# Additionally "(R|P)DEPEND"encies and other standard ebuild Variables can be set.
+# The inheriting ebuild's name must begin by "embassy-" and must be EAPI=4 conform.
+
+# @ECLASS-VARIABLE: EBOV
+# @DEFAULT_UNSET
+# @REQUIRED
+# @DESCRIPTION:
+# This specifies the minimum Emboss version needed for this package. *DEPEND are set to
+# >=sci-biology/emboss-${EBOV}.
+# This variable must be always set by the ebuild before the inheriting line
+
+# @ECLASS-VARIABLE: EBO_DESCRIPTION
+# @DESCRIPTION:
+# Should be set. Completes the describtion of the embassy module as follows:
+#
+# EMBOSS integrated version of EBO_DESCRIPTION"
+#
+# Defaults to the upstream name of the module.
+
+# @ECLASS-VARIABLE: EBO_PATCH
+# @DEFAULT_UNSET
+# @DESCRIPTION: Specify the patch level of EMBOSS. Only available for the emboss ebuild.
+# The patch wil be fetch from:
+#
+# ftp://emboss.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz.
+#
+# Embassy package should create one patch package and place it in FILESDIR, e.g.
+# "files/embassy-iprscan-4.3.1-r2.patch". The patch will be automatically used during src_prepare
+
+# @ECLASS-VARIABLE: NO_RECONF
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Set this, if you do want to have eautoreconf be run after patching.
+
+# @ECLASS-VARIABLE: EBO_ECONF
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Extra config options passed to econf, similar to EXTRA_ECONF.
 
 EAPI="4"
 
@@ -49,7 +86,7 @@ RDEPEND="${DEPEND}"
 if [[ ${PN} == "emboss" ]] ; then
 	DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
 	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz"
-	[[ -n ${EBO_PATCH} ]] && SRC_URI+=" ftp://${PN}.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${MY_PATCH}.gz -> ${P}.patch.gz"
+	[[ -n ${EBO_PATCH} ]] && SRC_URI+=" ftp://${PN}.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz -> ${P}.patch.gz"
 	IUSE+=" minimal"
 	RDEPEND+=" !sys-devel/cons"
 	PDEPEND="
@@ -68,20 +105,52 @@ else
 	# The full name and version of the EMBASSY package (excluding the Gentoo
 	# revision number)
 	EF="$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}"
-
+	EBO_DESCRIPTION=${EBO_DESCRIPTION:=${EN}}
 	DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
 	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EBOV}-${PN:8}-${PV}.tar.gz"
-	DEPEND+=" =sci-biology/emboss-${EBOV}*[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
+	DEPEND+=" >=sci-biology/emboss-${EBOV}[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
 
 	S="${WORKDIR}"/${EF}
 fi
 
+# @FUNCTION: embassy-ng_src_prepare
+# @USAGE:
+# @RETURN:
+# @MAINTAINER:
+# @DESCRIPTION:
+# Does three things
+#
+#  1. Patches EMBOSS if EBO_PATCH is set
+#  2. Patches, if "${FILESDIR}"/${PF}.patch is a file
+#  3. runs eautoreconf unless NO_RECONF is set
+#
+
 embassy-ng_src_prepare() {
-	[[ -n ${EBO_PATCH} ]] && epatch "${WORKDIR}"/${P}.patch
+	[[ ${PN} == emboss ]] && [[ -n ${EBO_PATCH} ]] && epatch "${WORKDIR}"/${P}.patch
 	[[ -f "${FILESDIR}"/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch
 	[[ -n ${NO_RECONF} ]] || eautoreconf
 }
 
+# @FUNCTION: embassy-ng_src_prepare
+# @USAGE:
+# @RETURN:
+# @MAINTAINER:
+# @DESCRIPTION:
+# runs econf with following options. Extra things can be passed by setting EBO_ECONF
+#
+#  $(use_with X x)
+#  $(use_with png pngdriver "${EPREFIX}/usr")
+#  $(use_with doc docroot "${EPREFIX}/usr")
+#  $(use_with pdf hpdf "${EPREFIX}/usr")
+#  $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
+#  $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
+#  $(use_enable amd64 64)
+#  $(use_enable static-libs static)
+#  --enable-large
+#  --without-java
+#  --enable-systemlibs
+#  ${EBO_ECONF}
+
 embassy-ng_src_configure() {
 	econf \
 		$(use_with X x) \
@@ -92,7 +161,7 @@ embassy-ng_src_configure() {
 		$(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config") \
 		$(use_enable amd64 64) \
 		$(use_enable static-libs static) \
-		--enable-large
+		--enable-large \
 		--without-java \
 		--enable-systemlibs \
 		${EBO_ECONF}



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-03-10 19:00 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-03-10 19:00 UTC (permalink / raw
  To: gentoo-commits

commit:     77ef4fd5852d3310f173871ac4b4a6ce6d4cd319
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 10 18:59:26 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Mar 10 18:59:26 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=77ef4fd5

embassy-ng.eclass respects DOCS

---
 eclass/embassy-ng.eclass |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/eclass/embassy-ng.eclass b/eclass/embassy-ng.eclass
index 951e5eb..ff137a3 100644
--- a/eclass/embassy-ng.eclass
+++ b/eclass/embassy-ng.eclass
@@ -16,7 +16,7 @@
 # @DESCRIPTION:
 # The inheriting ebuild should provide EBOV, EBO_DESCRIPTION and "KEYWORDS",
 # before the inherit line.
-# Additionally "(R|P)DEPEND"encies and other standard ebuild Variables can be set.
+# Additionally "(R|P)DEPEND"encies and other standard ebuild Variables can be extended (FOO+="BAR").
 # The inheriting ebuild's name must begin by "embassy-" and must be EAPI=4 conform.
 
 # @ECLASS-VARIABLE: EBOV
@@ -83,6 +83,10 @@ DEPEND="
 
 RDEPEND="${DEPEND}"
 
+DOCS="AUTHORS ChangeLog NEWS README"
+
+[[ -z ${EBOV} ]] && die "You must set EBOV in the ebuild!"
+
 if [[ ${PN} == "emboss" ]] ; then
 	DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
 	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz"
@@ -99,6 +103,7 @@ if [[ ${PN} == "emboss" ]] ; then
 				sci-biology/transfac
 				)"
 	S="${WORKDIR}/EMBOSS-${EBOV}"
+	DOCS+=" FAQ THANKS"
 else
 	# The EMBASSY package name, retrieved from the inheriting ebuild's name
 	EN=${PN:8}
@@ -167,9 +172,4 @@ embassy-ng_src_configure() {
 		${EBO_ECONF}
 }
 
-embassy-ng_src_install() {
-	emake DESTDIR="${D}" install
-	nonfatal dodoc AUTHORS ChangeLog FAQ NEWS README THANKS
-}
-
-EXPORT_FUNCTIONS src_prepare src_configure src_install
+[[ ${PN} == embassy ]] || EXPORT_FUNCTIONS src_prepare src_configure



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-03-14  9:25 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-03-14  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     0e94cc6a36156187f23cfc58f3b09070edd4b055
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 14 09:25:43 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Mar 14 09:25:43 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0e94cc6a

Last cleanings before review

---
 eclass/embassy-ng.eclass |   47 +++++++++++++++++++++------------------------
 1 files changed, 22 insertions(+), 25 deletions(-)

diff --git a/eclass/embassy-ng.eclass b/eclass/embassy-ng.eclass
index ff137a3..317a08e 100644
--- a/eclass/embassy-ng.eclass
+++ b/eclass/embassy-ng.eclass
@@ -14,19 +14,11 @@
 # jlec@gentoo.org
 # @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
 # @DESCRIPTION:
-# The inheriting ebuild should provide EBOV, EBO_DESCRIPTION and "KEYWORDS",
-# before the inherit line.
-# Additionally "(R|P)DEPEND"encies and other standard ebuild Variables can be extended (FOO+="BAR").
+# The inheriting ebuild should provide EBO_DESCRIPTION before the inherit line.
+# KEYWORDS should set and additional "(R|P)DEPEND"encies and other standard
+# ebuild Variables can be extended (FOO+="BAR").
 # The inheriting ebuild's name must begin by "embassy-" and must be EAPI=4 conform.
 
-# @ECLASS-VARIABLE: EBOV
-# @DEFAULT_UNSET
-# @REQUIRED
-# @DESCRIPTION:
-# This specifies the minimum Emboss version needed for this package. *DEPEND are set to
-# >=sci-biology/emboss-${EBOV}.
-# This variable must be always set by the ebuild before the inheriting line
-
 # @ECLASS-VARIABLE: EBO_DESCRIPTION
 # @DESCRIPTION:
 # Should be set. Completes the describtion of the embassy module as follows:
@@ -48,7 +40,7 @@
 # @ECLASS-VARIABLE: NO_RECONF
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Set this, if you do want to have eautoreconf be run after patching.
+# Set this, if you do not want to have eautoreconf be run after patching.
 
 # @ECLASS-VARIABLE: EBO_ECONF
 # @DEFAULT_UNSET
@@ -60,11 +52,11 @@ EAPI="4"
 inherit autotools eutils multilib
 
 DESCRIPTION="Based on the $ECLASS eclass"
-HOMEPAGE="http://emboss.sourceforge.net/"
+HOMEPAGE="http://emboss.sourceforge.net"
 LICENSE="LGPL-2 GPL-2"
 
 SLOT="0"
-IUSE+=" doc minimal mysql pdf png postgres static-libs X"
+IUSE+=" doc minimal mysql pdf png postgres static-libs X "
 
 DEPEND="
 	dev-libs/expat
@@ -79,21 +71,25 @@ DEPEND="
 		media-libs/gd
 		)
 	postgres? ( dev-db/postgresql-base )
-	X? ( x11-libs/libXt )"
+	X? ( x11-libs/libXt )
+	"
 
-RDEPEND="${DEPEND}"
+RDEPEND="
+	${DEPEND}
+	"
 
 DOCS="AUTHORS ChangeLog NEWS README"
 
-[[ -z ${EBOV} ]] && die "You must set EBOV in the ebuild!"
-
 if [[ ${PN} == "emboss" ]] ; then
+	EBOV="${PV/_p*}"
 	DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
 	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz"
 	[[ -n ${EBO_PATCH} ]] && SRC_URI+=" ftp://${PN}.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz -> ${P}.patch.gz"
-	IUSE+=" minimal"
-	RDEPEND+=" !sys-devel/cons"
-	PDEPEND="
+	IUSE+=" minimal "
+	RDEPEND+="
+		!sys-devel/cons
+		"
+	PDEPEND+="
 		!minimal? (
 				sci-biology/aaindex
 				sci-biology/cutg
@@ -101,9 +97,10 @@ if [[ ${PN} == "emboss" ]] ; then
 				sci-biology/prosite
 				sci-biology/rebase
 				sci-biology/transfac
-				)"
+				)
+		"
 	S="${WORKDIR}/EMBOSS-${EBOV}"
-	DOCS+=" FAQ THANKS"
+	DOCS+=" FAQ THANKS "
 else
 	# The EMBASSY package name, retrieved from the inheriting ebuild's name
 	EN=${PN:8}
@@ -112,8 +109,8 @@ else
 	EF="$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}"
 	EBO_DESCRIPTION=${EBO_DESCRIPTION:=${EN}}
 	DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
-	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EBOV}-${PN:8}-${PV}.tar.gz"
-	DEPEND+=" >=sci-biology/emboss-${EBOV}[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
+	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${PN:8}-${PV}.tar.gz"
+	DEPEND+=" >=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-libs=,X=] "
 
 	S="${WORKDIR}"/${EF}
 fi



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-03-15  7:16 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-03-15  7:16 UTC (permalink / raw
  To: gentoo-commits

commit:     a8eefd318317de24b6579074d52d2f722dea66b4
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 15 07:08:55 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Mar 15 07:08:55 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a8eefd31

renamed embassy-ng -> emboss.eclass

---
 eclass/{embassy-ng.eclass => emboss.eclass} |   35 +++++++++++---------------
 1 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/eclass/embassy-ng.eclass b/eclass/emboss.eclass
similarity index 87%
rename from eclass/embassy-ng.eclass
rename to eclass/emboss.eclass
index 317a08e..cee063d 100644
--- a/eclass/embassy-ng.eclass
+++ b/eclass/emboss.eclass
@@ -8,7 +8,7 @@
 # Author of the next generation eclass
 # Justin Lecher <jlec@gentoo.org>
 
-# @ECLASS: embassy-ng.eclass
+# @ECLASS: emboss.eclass
 # @MAINTAINER:
 # sci-biology@gentoo.org
 # jlec@gentoo.org
@@ -51,12 +51,11 @@ EAPI="4"
 
 inherit autotools eutils multilib
 
-DESCRIPTION="Based on the $ECLASS eclass"
 HOMEPAGE="http://emboss.sourceforge.net"
 LICENSE="LGPL-2 GPL-2"
 
 SLOT="0"
-IUSE+=" doc minimal mysql pdf png postgres static-libs X "
+IUSE="doc mysql pdf png postgres static-libs X "
 
 DEPEND="
 	dev-libs/expat
@@ -65,11 +64,7 @@ DEPEND="
 	sys-libs/zlib
 	mysql? ( dev-db/mysql )
 	pdf? ( media-libs/libharu )
-	png? (
-		sys-libs/zlib
-		media-libs/libpng
-		media-libs/gd
-		)
+	png? ( media-libs/gd[png] )
 	postgres? ( dev-db/postgresql-base )
 	X? ( x11-libs/libXt )
 	"
@@ -78,14 +73,14 @@ RDEPEND="
 	${DEPEND}
 	"
 
-DOCS="AUTHORS ChangeLog NEWS README"
+DOCS="AUTHORS ChangeLog NEWS README "
 
 if [[ ${PN} == "emboss" ]] ; then
-	EBOV="${PV/_p*}"
+	EBOV=${PV/_p*}
 	DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
 	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz"
 	[[ -n ${EBO_PATCH} ]] && SRC_URI+=" ftp://${PN}.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz -> ${P}.patch.gz"
-	IUSE+=" minimal "
+	IUSE+="minimal "
 	RDEPEND+="
 		!sys-devel/cons
 		"
@@ -99,23 +94,23 @@ if [[ ${PN} == "emboss" ]] ; then
 				sci-biology/transfac
 				)
 		"
-	S="${WORKDIR}/EMBOSS-${EBOV}"
-	DOCS+=" FAQ THANKS "
+	S=${WORKDIR}/EMBOSS-${EBOV}
+	DOCS+="FAQ THANKS "
 else
 	# The EMBASSY package name, retrieved from the inheriting ebuild's name
 	EN=${PN:8}
 	# The full name and version of the EMBASSY package (excluding the Gentoo
 	# revision number)
-	EF="$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}"
+	EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
 	EBO_DESCRIPTION=${EBO_DESCRIPTION:=${EN}}
 	DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
 	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${PN:8}-${PV}.tar.gz"
-	DEPEND+=" >=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-libs=,X=] "
+	DEPEND+=">=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-libs=,X=] "
 
-	S="${WORKDIR}"/${EF}
+	S=${WORKDIR}/${EF}
 fi
 
-# @FUNCTION: embassy-ng_src_prepare
+# @FUNCTION: emboss_src_prepare
 # @USAGE:
 # @RETURN:
 # @MAINTAINER:
@@ -127,13 +122,13 @@ fi
 #  3. runs eautoreconf unless NO_RECONF is set
 #
 
-embassy-ng_src_prepare() {
+emboss_src_prepare() {
 	[[ ${PN} == emboss ]] && [[ -n ${EBO_PATCH} ]] && epatch "${WORKDIR}"/${P}.patch
 	[[ -f "${FILESDIR}"/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch
 	[[ -n ${NO_RECONF} ]] || eautoreconf
 }
 
-# @FUNCTION: embassy-ng_src_prepare
+# @FUNCTION: emboss_src_prepare
 # @USAGE:
 # @RETURN:
 # @MAINTAINER:
@@ -153,7 +148,7 @@ embassy-ng_src_prepare() {
 #  --enable-systemlibs
 #  ${EBO_ECONF}
 
-embassy-ng_src_configure() {
+emboss_src_configure() {
 	econf \
 		$(use_with X x) \
 		$(use_with png pngdriver "${EPREFIX}/usr") \



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-03-15  7:25 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-03-15  7:25 UTC (permalink / raw
  To: gentoo-commits

commit:     6e6a28c7ed2a5bc56187fb7605f0ec34b8c40ad7
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 15 07:25:31 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Mar 15 07:25:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=6e6a28c7

Last writing corrections

---
 eclass/emboss.eclass |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/emboss.eclass b/eclass/emboss.eclass
index cee063d..c026749 100644
--- a/eclass/emboss.eclass
+++ b/eclass/emboss.eclass
@@ -15,9 +15,9 @@
 # @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
 # @DESCRIPTION:
 # The inheriting ebuild should provide EBO_DESCRIPTION before the inherit line.
-# KEYWORDS should set and additional "(R|P)DEPEND"encies and other standard
+# KEYWORDS should be set. Additionally "(R|P)DEPEND"encies and other standard
 # ebuild Variables can be extended (FOO+="BAR").
-# The inheriting ebuild's name must begin by "embassy-" and must be EAPI=4 conform.
+# The inheriting ebuild's name must begin with "emboss" or "embassy" and must be EAPI=4 conform.
 
 # @ECLASS-VARIABLE: EBO_DESCRIPTION
 # @DESCRIPTION:
@@ -34,7 +34,7 @@
 #
 # ftp://emboss.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz.
 #
-# Embassy package should create one patch package and place it in FILESDIR, e.g.
+# Embassy packages should create one patch package and place it in FILESDIR, e.g.
 # "files/embassy-iprscan-4.3.1-r2.patch". The patch will be automatically used during src_prepare
 
 # @ECLASS-VARIABLE: NO_RECONF
@@ -118,8 +118,8 @@ fi
 # Does three things
 #
 #  1. Patches EMBOSS if EBO_PATCH is set
-#  2. Patches, if "${FILESDIR}"/${PF}.patch is a file
-#  3. runs eautoreconf unless NO_RECONF is set
+#  2. Patches with "${FILESDIR}"/${PF}.patch, of present
+#  3. Runs eautoreconf unless NO_RECONF is set
 #
 
 emboss_src_prepare() {
@@ -133,7 +133,7 @@ emboss_src_prepare() {
 # @RETURN:
 # @MAINTAINER:
 # @DESCRIPTION:
-# runs econf with following options. Extra things can be passed by setting EBO_ECONF
+# runs econf with following options. Extra options can be passed by setting EBO_ECONF
 #
 #  $(use_with X x)
 #  $(use_with png pngdriver "${EPREFIX}/usr")



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-03-15 10:24 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-03-15 10:24 UTC (permalink / raw
  To: gentoo-commits

commit:     2b548449caec11f02ebc8162197b7b069f24e7bd
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 15 10:24:35 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Mar 15 10:24:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=2b548449

Fixed doc installation path

---
 eclass/emboss.eclass |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/eclass/emboss.eclass b/eclass/emboss.eclass
index c026749..74d9d79 100644
--- a/eclass/emboss.eclass
+++ b/eclass/emboss.eclass
@@ -55,7 +55,7 @@ HOMEPAGE="http://emboss.sourceforge.net"
 LICENSE="LGPL-2 GPL-2"
 
 SLOT="0"
-IUSE="doc mysql pdf png postgres static-libs X "
+IUSE="mysql pdf png postgres static-libs X "
 
 DEPEND="
 	dev-libs/expat
@@ -137,7 +137,6 @@ emboss_src_prepare() {
 #
 #  $(use_with X x)
 #  $(use_with png pngdriver "${EPREFIX}/usr")
-#  $(use_with doc docroot "${EPREFIX}/usr")
 #  $(use_with pdf hpdf "${EPREFIX}/usr")
 #  $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
 #  $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
@@ -152,7 +151,6 @@ emboss_src_configure() {
 	econf \
 		$(use_with X x) \
 		$(use_with png pngdriver "${EPREFIX}/usr") \
-		$(use_with doc docroot "${EPREFIX}/usr") \
 		$(use_with pdf hpdf "${EPREFIX}/usr") \
 		$(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config") \
 		$(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config") \
@@ -164,4 +162,17 @@ emboss_src_configure() {
 		${EBO_ECONF}
 }
 
-[[ ${PN} == embassy ]] || EXPORT_FUNCTIONS src_prepare src_configure
+# @FUNCTION: emboss_src_install
+# @USAGE:
+# @RETURN:
+# @MAINTAINER:
+# @DESCRIPTION:
+# Standard src_install. Takes care of correct position of docs.
+
+emboss_src_install() {
+	default
+	mv "${ED}"/usr/share/EMBOSS/doc/* "${ED}"/usr/share/doc/${PF}/
+	rm -rf "${ED}"/usr/share/EMBOSS/doc
+}
+
+[[ ${PN} == embassy ]] || EXPORT_FUNCTIONS src_prepare src_configure src_install



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-03-20 16:28 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-03-20 16:28 UTC (permalink / raw
  To: gentoo-commits

commit:     bd121a5a1a1386b62f7fb8cebbd550d7e68cf4c6
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 13:20:09 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Mar 20 13:20:09 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=bd121a5a

Updates from review

---
 eclass/emboss.eclass |  152 ++++++++++++++++++-------------------------------
 1 files changed, 56 insertions(+), 96 deletions(-)

diff --git a/eclass/emboss.eclass b/eclass/emboss.eclass
index 74d9d79..e682ab3 100644
--- a/eclass/emboss.eclass
+++ b/eclass/emboss.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/eclass/embassy.eclass,v 1.17 2008/11/03 22:17:50 ribosome Exp $
 
@@ -14,48 +14,55 @@
 # jlec@gentoo.org
 # @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
 # @DESCRIPTION:
-# The inheriting ebuild should provide EBO_DESCRIPTION before the inherit line.
+# The inheriting ebuild must set EAPI=4 and provide EBO_DESCRIPTION before the inherit line.
 # KEYWORDS should be set. Additionally "(R|P)DEPEND"encies and other standard
 # ebuild Variables can be extended (FOO+="BAR").
-# The inheriting ebuild's name must begin with "emboss" or "embassy" and must be EAPI=4 conform.
+# The inheriting ebuild's name must begin with "emboss" or "embassy".
+# Default installation of following DOCS="AUTHORS ChangeLog NEWS README"
+#
+# Example:
+#
+# EAPI="4"
+#
+# EBO_DESCRIPTION="applications from the CBS group"
+#
+# inherit emboss
+#
+# KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
 
 # @ECLASS-VARIABLE: EBO_DESCRIPTION
 # @DESCRIPTION:
-# Should be set. Completes the describtion of the embassy module as follows:
+# Should be set. Completes the generic description of the embassy module as follows:
 #
-# EMBOSS integrated version of EBO_DESCRIPTION"
+# EMBOSS integrated version of ${EBO_DESCRIPTION},
+# e.g.
+# "EMBOSS integrated version of applications from the CBS group"
 #
 # Defaults to the upstream name of the module.
 
-# @ECLASS-VARIABLE: EBO_PATCH
-# @DEFAULT_UNSET
-# @DESCRIPTION: Specify the patch level of EMBOSS. Only available for the emboss ebuild.
-# The patch wil be fetch from:
-#
-# ftp://emboss.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz.
-#
-# Embassy packages should create one patch package and place it in FILESDIR, e.g.
-# "files/embassy-iprscan-4.3.1-r2.patch". The patch will be automatically used during src_prepare
-
-# @ECLASS-VARIABLE: NO_RECONF
-# @DEFAULT_UNSET
+# @ECLASS-VARIABLE: EBO_EAUTORECONF
 # @DESCRIPTION:
-# Set this, if you do not want to have eautoreconf be run after patching.
+# Set to 'no', if you don't want eautoreconf to be run after patching.
+: ${EBO_EAUTORECONF:="yes"}
 
-# @ECLASS-VARIABLE: EBO_ECONF
+# @ECLASS-VARIABLE: EBO_EXTRA_ECONF
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # Extra config options passed to econf, similar to EXTRA_ECONF.
 
-EAPI="4"
+case ${EAPI:-0} in
+	4) ;;
+	*) die "this eclass doesn't support < EAPI 4" ;;
+esac
 
 inherit autotools eutils multilib
 
-HOMEPAGE="http://emboss.sourceforge.net"
+HOMEPAGE="http://emboss.sourceforge.net/"
 LICENSE="LGPL-2 GPL-2"
 
 SLOT="0"
-IUSE="mysql pdf png postgres static-libs X "
+IUSE="mysql pdf png postgres static-libs X"
 
 DEPEND="
 	dev-libs/expat
@@ -66,113 +73,66 @@ DEPEND="
 	pdf? ( media-libs/libharu )
 	png? ( media-libs/gd[png] )
 	postgres? ( dev-db/postgresql-base )
-	X? ( x11-libs/libXt )
-	"
-
-RDEPEND="
-	${DEPEND}
-	"
-
-DOCS="AUTHORS ChangeLog NEWS README "
-
-if [[ ${PN} == "emboss" ]] ; then
-	EBOV=${PV/_p*}
-	DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
-	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz"
-	[[ -n ${EBO_PATCH} ]] && SRC_URI+=" ftp://${PN}.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz -> ${P}.patch.gz"
-	IUSE+="minimal "
-	RDEPEND+="
-		!sys-devel/cons
-		"
-	PDEPEND+="
-		!minimal? (
-				sci-biology/aaindex
-				sci-biology/cutg
-				sci-biology/prints
-				sci-biology/prosite
-				sci-biology/rebase
-				sci-biology/transfac
-				)
-		"
-	S=${WORKDIR}/EMBOSS-${EBOV}
-	DOCS+="FAQ THANKS "
-else
+	X? ( x11-libs/libXt )"
+RDEPEND="${DEPEND}"
+
+if [[ ${PN} == embassy-* ]]; then
 	# The EMBASSY package name, retrieved from the inheriting ebuild's name
 	EN=${PN:8}
 	# The full name and version of the EMBASSY package (excluding the Gentoo
 	# revision number)
 	EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
-	EBO_DESCRIPTION=${EBO_DESCRIPTION:=${EN}}
+	: ${EBO_DESCRIPTION:=${EN}}
 	DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
-	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${PN:8}-${PV}.tar.gz"
-	DEPEND+=">=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-libs=,X=] "
+	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EN}-${PV}.tar.gz"
+	DEPEND+=" >=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
 
-	S=${WORKDIR}/${EF}
+	S="${WORKDIR}"/${EF}
 fi
 
+DOCS="AUTHORS ChangeLog NEWS README"
+
 # @FUNCTION: emboss_src_prepare
-# @USAGE:
-# @RETURN:
-# @MAINTAINER:
 # @DESCRIPTION:
-# Does three things
+# Does following things
 #
-#  1. Patches EMBOSS if EBO_PATCH is set
-#  2. Patches with "${FILESDIR}"/${PF}.patch, of present
-#  3. Runs eautoreconf unless NO_RECONF is set
+#  1. Patches with "${FILESDIR}"/${PF}.patch, of present
+#  2. Runs eautoreconf, unless EBO_EAUTORECONF is set to no
 #
 
 emboss_src_prepare() {
-	[[ ${PN} == emboss ]] && [[ -n ${EBO_PATCH} ]] && epatch "${WORKDIR}"/${P}.patch
 	[[ -f "${FILESDIR}"/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch
-	[[ -n ${NO_RECONF} ]] || eautoreconf
+	[[ ${EBO_EAUTORECONF} == yes ]] && eautoreconf
 }
 
 # @FUNCTION: emboss_src_prepare
-# @USAGE:
-# @RETURN:
-# @MAINTAINER:
 # @DESCRIPTION:
-# runs econf with following options. Extra options can be passed by setting EBO_ECONF
+# runs econf with following options. Extra options can be passed by setting EBO_EXTRA_ECONF
 #
 #  $(use_with X x)
-#  $(use_with png pngdriver "${EPREFIX}/usr")
-#  $(use_with pdf hpdf "${EPREFIX}/usr")
-#  $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
-#  $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
-#  $(use_enable amd64 64)
+#  $(use_with png pngdriver)
+#  $(use_with pdf hpdf)
+#  $(use_with mysql mysql)
+#  $(use_with postgres postgresql)
 #  $(use_enable static-libs static)
 #  --enable-large
 #  --without-java
 #  --enable-systemlibs
-#  ${EBO_ECONF}
+#  ${EBO_EXTRA_ECONF}
 
 emboss_src_configure() {
 	econf \
 		$(use_with X x) \
-		$(use_with png pngdriver "${EPREFIX}/usr") \
-		$(use_with pdf hpdf "${EPREFIX}/usr") \
-		$(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config") \
-		$(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config") \
-		$(use_enable amd64 64) \
+		$(use_with png pngdriver) \
+		$(use_with pdf hpdf) \
+		$(use_with mysql mysql) \
+		$(use_with postgres postgresql) \
 		$(use_enable static-libs static) \
 		--enable-large \
 		--without-java \
 		--enable-systemlibs \
-		${EBO_ECONF}
-}
-
-# @FUNCTION: emboss_src_install
-# @USAGE:
-# @RETURN:
-# @MAINTAINER:
-# @DESCRIPTION:
-# Standard src_install. Takes care of correct position of docs.
-
-emboss_src_install() {
-	default
-	mv "${ED}"/usr/share/EMBOSS/doc/* "${ED}"/usr/share/doc/${PF}/
-	rm -rf "${ED}"/usr/share/EMBOSS/doc
+		--docdir="${EPREFIX}/usr/share/doc/${PF}/" \
+		${EBO_EXTRA_ECONF}
 }
 
-[[ ${PN} == embassy ]] || EXPORT_FUNCTIONS src_prepare src_configure src_install
+EXPORT_FUNCTIONS src_prepare src_configure



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-03-22  6:58 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-03-22  6:58 UTC (permalink / raw
  To: gentoo-commits

commit:     40eeabbfab7653108826329559ba5efcbdec58c4
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 22 06:56:33 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Mar 22 06:56:33 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=40eeabbf

Last cleanup to emboss.eclass

---
 eclass/emboss.eclass |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/eclass/emboss.eclass b/eclass/emboss.eclass
index e682ab3..2c8b67f 100644
--- a/eclass/emboss.eclass
+++ b/eclass/emboss.eclass
@@ -16,8 +16,7 @@
 # @DESCRIPTION:
 # The inheriting ebuild must set EAPI=4 and provide EBO_DESCRIPTION before the inherit line.
 # KEYWORDS should be set. Additionally "(R|P)DEPEND"encies and other standard
-# ebuild Variables can be extended (FOO+="BAR").
-# The inheriting ebuild's name must begin with "emboss" or "embassy".
+# ebuild variables can be extended (FOO+=" bar").
 # Default installation of following DOCS="AUTHORS ChangeLog NEWS README"
 #
 # Example:
@@ -27,9 +26,6 @@
 # EBO_DESCRIPTION="applications from the CBS group"
 #
 # inherit emboss
-#
-# KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
-
 
 # @ECLASS-VARIABLE: EBO_DESCRIPTION
 # @DESCRIPTION:
@@ -44,7 +40,7 @@
 # @ECLASS-VARIABLE: EBO_EAUTORECONF
 # @DESCRIPTION:
 # Set to 'no', if you don't want eautoreconf to be run after patching.
-: ${EBO_EAUTORECONF:="yes"}
+: ${EBO_EAUTORECONF:=yes}
 
 # @ECLASS-VARIABLE: EBO_EXTRA_ECONF
 # @DEFAULT_UNSET
@@ -56,7 +52,7 @@ case ${EAPI:-0} in
 	*) die "this eclass doesn't support < EAPI 4" ;;
 esac
 
-inherit autotools eutils multilib
+inherit autotools eutils
 
 HOMEPAGE="http://emboss.sourceforge.net/"
 LICENSE="LGPL-2 GPL-2"
@@ -101,13 +97,13 @@ DOCS="AUTHORS ChangeLog NEWS README"
 #
 
 emboss_src_prepare() {
-	[[ -f "${FILESDIR}"/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch
+	[[ -f ${FILESDIR}/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch
 	[[ ${EBO_EAUTORECONF} == yes ]] && eautoreconf
 }
 
-# @FUNCTION: emboss_src_prepare
+# @FUNCTION: emboss_src_configure
 # @DESCRIPTION:
-# runs econf with following options. Extra options can be passed by setting EBO_EXTRA_ECONF
+# runs econf with following options.
 #
 #  $(use_with X x)
 #  $(use_with png pngdriver)
@@ -118,6 +114,7 @@ emboss_src_prepare() {
 #  --enable-large
 #  --without-java
 #  --enable-systemlibs
+#  --docdir="${EPREFIX}/usr/share/doc/${PF}"
 #  ${EBO_EXTRA_ECONF}
 
 emboss_src_configure() {
@@ -131,7 +128,7 @@ emboss_src_configure() {
 		--enable-large \
 		--without-java \
 		--enable-systemlibs \
-		--docdir="${EPREFIX}/usr/share/doc/${PF}/" \
+		--docdir="${EPREFIX}/usr/share/doc/${PF}" \
 		${EBO_EXTRA_ECONF}
 }
 



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-04-04 11:18 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-04-04 11:18 UTC (permalink / raw
  To: gentoo-commits

commit:     97c837b3e2206544d575b6bea854c1160bce87f2
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  4 11:18:45 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Apr  4 11:18:45 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=97c837b3

Fixed typo in emboss.eclass

---
 eclass/emboss.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/emboss.eclass b/eclass/emboss.eclass
index 2c8b67f..0431579 100644
--- a/eclass/emboss.eclass
+++ b/eclass/emboss.eclass
@@ -92,7 +92,7 @@ DOCS="AUTHORS ChangeLog NEWS README"
 # @DESCRIPTION:
 # Does following things
 #
-#  1. Patches with "${FILESDIR}"/${PF}.patch, of present
+#  1. Patches with "${FILESDIR}"/${PF}.patch, if present
 #  2. Runs eautoreconf, unless EBO_EAUTORECONF is set to no
 #
 



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-05-19  5:56 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-05-19  5:56 UTC (permalink / raw
  To: gentoo-commits

commit:     e9839c4df0ffa4bed9c1e7764b1d682be5eecf2e
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu May 19 05:44:40 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu May 19 05:44:40 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e9839c4d

fix intel-sdp.eclass for prefix

---
 eclass/intel-sdp.eclass |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 0234520..be74bd1 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -52,7 +52,7 @@ RDEPEND=""
 DEPEND=">=app-arch/rpm2targz-9.0.0.3g"
 INTEL_SDP_YEAR=${INTEL_DPV%_update*}
 INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${INTEL_SDP_YEAR:-${INTEL_PV1}}.${INTEL_PV3}.${INTEL_PV4}"
-INTEL_SDP_EDIR="${EROOT#/}/${INTEL_SDP_DIR}"
+INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
 
 S="${WORKDIR}"
 
@@ -132,15 +132,16 @@ intel-sdp_src_install() {
 	find opt -name \*sh -type f -exec sed -i \
 		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \
 		'{}' \;
+	mkdir -p "${ED:-${D}}"/ || die
 	mv opt "${ED:-${D}}"/ || die "moving files failed"
 }
 
 intel-sdp_pkg_postinst() {
 	# add product registry to intel "database"
 	local l r
-	INTEL_SDP_DB="${EROOT#/}"/opt/intel/intel-sdp-products.db
+	INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
 	for r in ${INTEL_RPMS}; do
-		l="$(ls -1 ${EROOT#/}/opt/intel/.${r}_*.log | head -n 1)"
+		l="$(ls -1 ${EROOT%/}/opt/intel/.${r}_*.log | head -n 1)"
 		echo >> ${INTEL_SDP_DB} \
 			"<:${r%-${INTEL_PV4}*}-${INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>"
 	done



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-12 10:53 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-12 10:53 UTC (permalink / raw
  To: gentoo-commits

commit:     fd2fefc00aa08026238d3f9db27051cadfdd362c
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 10:52:53 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 10:52:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=fd2fefc0

fortran-2.eclass added

---
 eclass/fortran-2.eclass |   63 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
new file mode 100644
index 0000000..6528724
--- /dev/null
+++ b/eclass/fortran-2.eclass
@@ -0,0 +1,63 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# Author Justin Lecher <jlec@gentoo.org>
+
+# @ECLASS: fortran-2.eclass
+# @MAINTAINER:
+# sci@gentoo.org
+# jlec@gentoo.org
+# @BLURB: Packages, which need a frortran compiler should inherit this eclass.
+# @DESCRIPTION:
+# If you need a fortran compiler, inherit this eclass. This eclass tests for
+# working fortran compilers. Optional, check for openmp capability of the
+# current fortran compiler through FCOPENMP=1. Only function exported
+# is pkg_setup.
+
+# @ECLASS-VARIABLE: FCOPENMP
+# @DESCRIPTION:
+# If FCOPNMP=1, FC is tested for openmp capabilities
+#
+# Default is 0
+
+inherit toolchain-funcs
+
+DEPEND="virtual/fortran"
+RDEPEND="${DEPEND}"
+
+_tc-has-fortran() {
+	local base="${T}/test-tc-fortran"
+	cat <<-EOF > "${base}.f"
+	      end
+	EOF
+	$(tc-getFC "$@") "${base}.f" -o "${base}" >&/dev/null
+	local ret=$?
+	rm -f "${base}"*
+	return ${ret}
+}
+
+# See if the toolchain gfortran only supports OpenMP.
+_gfortran-has-openmp() {
+	[[ $(tc-getFC) != *gfortran* ]] && return 0
+	local base="${T}/test-fc-openmp"
+	# leave extra leading space to make sure it works on fortran 77 as well
+	cat <<- EOF > "${base}.f"
+	call omp_get_num_threads
+	end
+	EOF
+	$(tc-getFC "$@") -fopenmp "${base}.f" -o "${base}" >&/dev/null
+	local ret=$?
+	rm -f "${base}"*
+	return ${ret}
+}
+
+fortran-2_pkg_setup() {
+	_tc-has-fortran || \
+		 die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
+	if [[ ${FCOPENMP} == 1 ]]; then
+		_gfortran-has-openmp || die "Please emerge current gcc with USE=openmp"
+	fi
+}
+
+EXPORT_FUNCTIONS pkg_setup



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-12 11:24 Kacper Kowalik
  0 siblings, 0 replies; 169+ messages in thread
From: Kacper Kowalik @ 2011-06-12 11:24 UTC (permalink / raw
  To: gentoo-commits

commit:     48882d18ea1f4413784c3a9e308f6712bde295a2
Author:     Kacper Kowalik (Xarthisius) <xarthisius <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 11:23:59 2011 +0000
Commit:     Kacper Kowalik <xarthisius <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 11:23:59 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=48882d18

[fortran-2.eclass] Fix openmp check to be F77 compliant

---
 eclass/fortran-2.eclass |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 6528724..0eebf3d 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -42,10 +42,10 @@ _gfortran-has-openmp() {
 	[[ $(tc-getFC) != *gfortran* ]] && return 0
 	local base="${T}/test-fc-openmp"
 	# leave extra leading space to make sure it works on fortran 77 as well
-	cat <<- EOF > "${base}.f"
-	call omp_get_num_threads
-	end
-	EOF
+	cat << EOF > "${base}.f"
+       call omp_get_num_threads
+       end
+EOF
 	$(tc-getFC "$@") -fopenmp "${base}.f" -o "${base}" >&/dev/null
 	local ret=$?
 	rm -f "${base}"*



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-12 11:57 Kacper Kowalik
  0 siblings, 0 replies; 169+ messages in thread
From: Kacper Kowalik @ 2011-06-12 11:57 UTC (permalink / raw
  To: gentoo-commits

commit:     e7bf55e8a83cf631299a2af835a7a61630bfb86b
Author:     Kacper Kowalik (Xarthisius) <xarthisius <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 11:57:32 2011 +0000
Commit:     Kacper Kowalik <xarthisius <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 11:57:32 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e7bf55e8

[fortran-2.eclass] tc-has-fortran -> have-valid-fortran, remove some quotes, add checks for openmp support for other compilers

---
 eclass/fortran-2.eclass |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 0eebf3d..dbc0c2d 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -26,8 +26,8 @@ inherit toolchain-funcs
 DEPEND="virtual/fortran"
 RDEPEND="${DEPEND}"
 
-_tc-has-fortran() {
-	local base="${T}/test-tc-fortran"
+_have-valid-fortran() {
+	local base=${T}/test-tc-fortran
 	cat <<-EOF > "${base}.f"
 	      end
 	EOF
@@ -37,26 +37,35 @@ _tc-has-fortran() {
 	return ${ret}
 }
 
-# See if the toolchain gfortran only supports OpenMP.
-_gfortran-has-openmp() {
-	[[ $(tc-getFC) != *gfortran* ]] && return 0
-	local base="${T}/test-fc-openmp"
+# See if the fortran supports OpenMP.
+_fortran-has-openmp() {
+	local flag
+	case "$(tc-getFC)" in
+		*gfortran*|pathf*)
+			flag=-fopenmp ;;
+		ifort)
+			flag=-openmp ;;
+		*)
+			return 0 ;;
+	esac
+	local base=${T}/test-fc-openmp
 	# leave extra leading space to make sure it works on fortran 77 as well
 	cat << EOF > "${base}.f"
        call omp_get_num_threads
        end
 EOF
-	$(tc-getFC "$@") -fopenmp "${base}.f" -o "${base}" >&/dev/null
+	$(tc-getFC "$@") ${flag} "${base}.f" -o "${base}" >&/dev/null
 	local ret=$?
 	rm -f "${base}"*
 	return ${ret}
 }
 
 fortran-2_pkg_setup() {
-	_tc-has-fortran || \
-		 die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
+	_have-valid-fortran || \
+		die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
 	if [[ ${FCOPENMP} == 1 ]]; then
-		_gfortran-has-openmp || die "Please emerge current gcc with USE=openmp"
+		_fortran-has-openmp || \
+		die "Please emerge current gcc with USE=openmp or export FC with compiler that supports OpenMP"
 	fi
 }
 



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-12 12:16 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-12 12:16 UTC (permalink / raw
  To: gentoo-commits

commit:     d5ae4cf4fb0fe55c8cdb01a53334f94fa16da2d4
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 11:59:35 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 11:59:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=d5ae4cf4

fortran-2 some cosmetic changes

---
 eclass/fortran-2.eclass |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 0eebf3d..252ad3e 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -28,7 +28,7 @@ RDEPEND="${DEPEND}"
 
 _tc-has-fortran() {
 	local base="${T}/test-tc-fortran"
-	cat <<-EOF > "${base}.f"
+	cat <<- EOF > "${base}.f"
 	      end
 	EOF
 	$(tc-getFC "$@") "${base}.f" -o "${base}" >&/dev/null
@@ -42,10 +42,10 @@ _gfortran-has-openmp() {
 	[[ $(tc-getFC) != *gfortran* ]] && return 0
 	local base="${T}/test-fc-openmp"
 	# leave extra leading space to make sure it works on fortran 77 as well
-	cat << EOF > "${base}.f"
+	cat <<- EOF > "${base}.f"
        call omp_get_num_threads
        end
-EOF
+	EOF
 	$(tc-getFC "$@") -fopenmp "${base}.f" -o "${base}" >&/dev/null
 	local ret=$?
 	rm -f "${base}"*



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-12 13:41 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-12 13:41 UTC (permalink / raw
  To: gentoo-commits

commit:     e9b97df9fd560ad0c0778438c6dcc5114a519083
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 13:40:47 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 13:40:47 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e9b97df9

fortran-2.eclass, added mpif* cpabilities and get_fcomp function

---
 eclass/fortran-2.eclass |   54 ++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 47 insertions(+), 7 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index dd1da73..ec2c602 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -3,21 +3,22 @@
 # $Header: $
 
 # Author Justin Lecher <jlec@gentoo.org>
+# Test functions provided by Sebastien Fabbro and Kacper Kowalik
 
 # @ECLASS: fortran-2.eclass
 # @MAINTAINER:
-# sci@gentoo.org
 # jlec@gentoo.org
+# sci@gentoo.org
 # @BLURB: Packages, which need a frortran compiler should inherit this eclass.
 # @DESCRIPTION:
 # If you need a fortran compiler, inherit this eclass. This eclass tests for
-# working fortran compilers. Optional, check for openmp capability of the
-# current fortran compiler through FCOPENMP=1. Only function exported
-# is pkg_setup.
+# working fortran compilers. Optional, it checks for openmp capability of the
+# current fortran compiler through FC_NEED_OPENMP=1.
+# Only phase function exported is pkg_setup.
 
-# @ECLASS-VARIABLE: FCOPENMP
+# @ECLASS-VARIABLE: FC_NEED_OPENMP
 # @DESCRIPTION:
-# If FCOPNMP=1, FC is tested for openmp capabilities
+# SET FC_NEED_OPENMP=1 in order to test FC for openmp capabilities
 #
 # Default is 0
 
@@ -26,10 +27,15 @@ inherit toolchain-funcs
 DEPEND="virtual/fortran"
 RDEPEND="${DEPEND}"
 
+# internal function
+#
+# FUNCTION: _have-valid-fortran
+# DESCRIPTION:
+# Check whether FC returns a working fortran compiler
 _have-valid-fortran() {
 	local base=${T}/test-tc-fortran
 	cat <<- EOF > "${base}.f"
-	      end
+	       end
 	EOF
 	$(tc-getFC "$@") "${base}.f" -o "${base}" >&/dev/null
 	local ret=$?
@@ -37,6 +43,10 @@ _have-valid-fortran() {
 	return ${ret}
 }
 
+# internal function
+#
+# FUNCTION: _fortran-has-openmp
+# DESCRIPTION:
 # See if the fortran supports OpenMP.
 _fortran-has-openmp() {
 	local flag
@@ -45,6 +55,10 @@ _fortran-has-openmp() {
 			flag=-fopenmp ;;
 		ifort)
 			flag=-openmp ;;
+		mpi*)
+			local _fcomp=$($(tc-getFC) -show | awk '{print $1}')
+			FC=${_fcomp} _fortran-has-openmp
+			return $? ;;
 		*)
 			return 0 ;;
 	esac
@@ -60,9 +74,35 @@ _fortran-has-openmp() {
 	return ${ret}
 }
 
+# @FUNCTION: get_fcomp
+# @DESCRIPTION:
+# Returns the canonical name or the native compiler of the current fortran compiler
+#
+# e.g.
+#
+# x86_64-linux-gnu-gfortran -> gfortran
+get_fcomp() {
+	case $(tc-getFC) in
+		*gfortran* )
+			echo "gfortran" ;;
+		ifort )
+			echo "ifc" ;;
+		mpi*)
+			local _fcomp=$($(tc-getFC) -show | awk '{print $1}')
+			echo "$(FC=${_fcomp} get_fcomp)";;
+      * )
+			echo $(tc-getFC) ;;
+   esac
+}
+
+# @FUNCTION: fortran-2_pkg_setup
+# @DESCRIPTION:
+# Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support.
 fortran-2_pkg_setup() {
 	_have-valid-fortran || \
 		die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
+	export F77="$(tc-getFC)"
+	export F95="$(tc-getFC)"
 	if [[ ${FCOPENMP} == 1 ]]; then
 		_fortran-has-openmp || \
 		die "Please emerge current gcc with USE=openmp or export FC with compiler that supports OpenMP"



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-12 14:39 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-12 14:39 UTC (permalink / raw
  To: gentoo-commits

commit:     c4f8fb80e9d40d150abbe816bf90b2862ced0b6a
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 14:39:00 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 14:39:00 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=c4f8fb80

Also export F90=$FC

---
 eclass/fortran-2.eclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index ec2c602..263ffb9 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -102,6 +102,7 @@ fortran-2_pkg_setup() {
 	_have-valid-fortran || \
 		die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
 	export F77="$(tc-getFC)"
+	export F90="$(tc-getFC)"
 	export F95="$(tc-getFC)"
 	if [[ ${FCOPENMP} == 1 ]]; then
 		_fortran-has-openmp || \



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-12 14:52 Kacper Kowalik
  0 siblings, 0 replies; 169+ messages in thread
From: Kacper Kowalik @ 2011-06-12 14:52 UTC (permalink / raw
  To: gentoo-commits

commit:     afd3a20a660de240595b9e0102b5ca044cc40c40
Author:     Kacper Kowalik (Xarthisius) <xarthisius <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 14:52:31 2011 +0000
Commit:     Kacper Kowalik <xarthisius <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 14:52:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=afd3a20a

[fortran-2.eclass] add pathscale compiler to get_fcomp, fix tabs

---
 eclass/fortran-2.eclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 263ffb9..de09679 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -87,12 +87,14 @@ get_fcomp() {
 			echo "gfortran" ;;
 		ifort )
 			echo "ifc" ;;
+		pathf*)
+			echo "pathcc" ;;
 		mpi*)
 			local _fcomp=$($(tc-getFC) -show | awk '{print $1}')
 			echo "$(FC=${_fcomp} get_fcomp)";;
-      * )
+		* )
 			echo $(tc-getFC) ;;
-   esac
+	esac
 }
 
 # @FUNCTION: fortran-2_pkg_setup



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-12 15:09 Kacper Kowalik
  0 siblings, 0 replies; 169+ messages in thread
From: Kacper Kowalik @ 2011-06-12 15:09 UTC (permalink / raw
  To: gentoo-commits

commit:     986190fca4b71372f859e3e4f64279ec302c58fa
Author:     Kacper Kowalik (Xarthisius) <xarthisius <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 15:09:27 2011 +0000
Commit:     Kacper Kowalik <xarthisius <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 15:09:27 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=986190fc

[fortran-2.eclass] FCOPENMP -> FC_NEED_OPENMP

---
 eclass/fortran-2.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index de09679..339fe56 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -106,7 +106,7 @@ fortran-2_pkg_setup() {
 	export F77="$(tc-getFC)"
 	export F90="$(tc-getFC)"
 	export F95="$(tc-getFC)"
-	if [[ ${FCOPENMP} == 1 ]]; then
+	if [[ ${FC_NEED_OPENMP} == 1 ]]; then
 		_fortran-has-openmp || \
 		die "Please emerge current gcc with USE=openmp or export FC with compiler that supports OpenMP"
 	fi



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-13  8:20 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-13  8:20 UTC (permalink / raw
  To: gentoo-commits

commit:     8cde4523ae7fe804a5dc209299e7cec780454bd9
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 13 08:20:05 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 08:20:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=8cde4523

fix typos

---
 eclass/fortran-2.eclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 339fe56..0511826 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -9,7 +9,7 @@
 # @MAINTAINER:
 # jlec@gentoo.org
 # sci@gentoo.org
-# @BLURB: Packages, which need a frortran compiler should inherit this eclass.
+# @BLURB: Packages, which need a fortran compiler should inherit this eclass.
 # @DESCRIPTION:
 # If you need a fortran compiler, inherit this eclass. This eclass tests for
 # working fortran compilers. Optional, it checks for openmp capability of the
@@ -18,7 +18,7 @@
 
 # @ECLASS-VARIABLE: FC_NEED_OPENMP
 # @DESCRIPTION:
-# SET FC_NEED_OPENMP=1 in order to test FC for openmp capabilities
+# Set FC_NEED_OPENMP=1 in order to test FC for openmp capabilities
 #
 # Default is 0
 
@@ -103,6 +103,7 @@ get_fcomp() {
 fortran-2_pkg_setup() {
 	_have-valid-fortran || \
 		die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
+	export FC="$(tc-getFC)"
 	export F77="$(tc-getFC)"
 	export F90="$(tc-getFC)"
 	export F95="$(tc-getFC)"



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-13  8:29 Kacper Kowalik
  0 siblings, 0 replies; 169+ messages in thread
From: Kacper Kowalik @ 2011-06-13  8:29 UTC (permalink / raw
  To: gentoo-commits

commit:     6407b4e2939f67c30fe20f1cda71cfd2ea3def5c
Author:     Kacper Kowalik (Xarthisius) <xarthisius.kk <AT> gmail <DOT> com>
AuthorDate: Mon Jun 13 08:28:59 2011 +0000
Commit:     Kacper Kowalik <xarthisius <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 08:28:59 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=6407b4e2

[fortran-2.eclass] remove unnecessary quotes

---
 eclass/fortran-2.eclass |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 0511826..28aed1a 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -50,7 +50,7 @@ _have-valid-fortran() {
 # See if the fortran supports OpenMP.
 _fortran-has-openmp() {
 	local flag
-	case "$(tc-getFC)" in
+	case $(tc-getFC) in
 		*gfortran*|pathf*)
 			flag=-fopenmp ;;
 		ifort)
@@ -91,7 +91,7 @@ get_fcomp() {
 			echo "pathcc" ;;
 		mpi*)
 			local _fcomp=$($(tc-getFC) -show | awk '{print $1}')
-			echo "$(FC=${_fcomp} get_fcomp)";;
+			echo $(FC=${_fcomp} get_fcomp) ;;
 		* )
 			echo $(tc-getFC) ;;
 	esac
@@ -103,10 +103,10 @@ get_fcomp() {
 fortran-2_pkg_setup() {
 	_have-valid-fortran || \
 		die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
-	export FC="$(tc-getFC)"
-	export F77="$(tc-getFC)"
-	export F90="$(tc-getFC)"
-	export F95="$(tc-getFC)"
+	export FC=$(tc-getFC)
+	export F77=$(tc-getFC)
+	export F90=$(tc-getFC)
+	export F95=$(tc-getFC)
 	if [[ ${FC_NEED_OPENMP} == 1 ]]; then
 		_fortran-has-openmp || \
 		die "Please emerge current gcc with USE=openmp or export FC with compiler that supports OpenMP"



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-13 10:27 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-13 10:27 UTC (permalink / raw
  To: gentoo-commits

commit:     f0fcbef01170601bd11820976911296c857332b8
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 13 10:24:24 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 10:24:24 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=f0fcbef0

move to pkg_pretend for EAPI=4

---
 eclass/fortran-2.eclass |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 0511826..8d7c609 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -97,10 +97,10 @@ get_fcomp() {
 	esac
 }
 
-# @FUNCTION: fortran-2_pkg_setup
+# @FUNCTION: fortran-2_pkg_pretend
 # @DESCRIPTION:
 # Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support.
-fortran-2_pkg_setup() {
+fortran-2_pkg_pretend() {
 	_have-valid-fortran || \
 		die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
 	export FC="$(tc-getFC)"
@@ -113,4 +113,18 @@ fortran-2_pkg_setup() {
 	fi
 }
 
-EXPORT_FUNCTIONS pkg_setup
+
+# @FUNCTION: fortran-2_pkg_setup
+# @DESCRIPTION:
+# Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support, used in EAPI < 4.
+fortran-2_pkg_setup() {
+	has ${EAPI:-0} 0 1 2 3 && fortran-2_pkg_pretend
+}
+
+case "${EAPI:-0}" in
+	0|1|2|3)
+		EXPORT_FUNCTIONS pkg_setup;;
+	4)
+		EXPORT_FUNCTIONS pkg_pretend;;
+	*) die "EAPI=${EAPI} is not supported" ;;
+esac



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-15  6:32 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-15  6:32 UTC (permalink / raw
  To: gentoo-commits

commit:     4c92ec7f9e4061c7f772039395d409ff517676b7
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 15 06:31:56 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 06:31:56 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=4c92ec7f

fortan-2.eclass in progress

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/fortran-2.eclass |  114 +++++++++++++++++++++++++++++------------------
 1 files changed, 70 insertions(+), 44 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index e5509be..5ebf8ca 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -13,12 +13,12 @@
 # @DESCRIPTION:
 # If you need a fortran compiler, inherit this eclass. This eclass tests for
 # working fortran compilers. Optional, it checks for openmp capability of the
-# current fortran compiler through FC_NEED_OPENMP=1.
+# current fortran compiler through FORTRAN_NEED_OPENMP=1.
 # Only phase function exported is pkg_setup.
 
-# @ECLASS-VARIABLE: FC_NEED_OPENMP
+# @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP
 # @DESCRIPTION:
-# Set FC_NEED_OPENMP=1 in order to test FC for openmp capabilities
+# Set FORTRAN_NEED_OPENMP=1 in order to test FC for openmp capabilities
 #
 # Default is 0
 
@@ -29,16 +29,45 @@ RDEPEND="${DEPEND}"
 
 # internal function
 #
-# FUNCTION: _have-valid-fortran
+# FUNCTION: _speaks_fortran_generic
 # DESCRIPTION:
-# Check whether FC returns a working fortran compiler
-_have-valid-fortran() {
-	local base=${T}/test-tc-fortran
+# Takes fortran compiler as argument.
+# Checks whether the passed fortran compiler is working
+_speaks_fortran_generic() {
+	local base=${T}/test-fortran-generic
+	local fcomp=${1}
+
+	[[ -z ${fcomp} ]] && die "_speaks_fortran_generic needs one argument"
+
 	cat <<- EOF > "${base}.f"
 	       end
 	EOF
-	$(tc-getFC "$@") "${base}.f" -o "${base}" >&/dev/null
+	${fcomp} "${base}.f" -o "${base}" >&/dev/null
 	local ret=$?
+
+	rm -f "${base}"*
+	return ${ret}
+}
+
+# internal function
+#
+# FUNCTION: _speaks_fortran_2003
+# DESCRIPTION:
+# Takes fortran compiler as argument.
+# Checks whether the passed fortran compiler is working
+_speaks_fortran_2003() {
+	local base=${T}/test-fortran-2003
+	local fcomp=${1}
+
+	[[ -z ${fcomp} ]] && die "_speaks_fortran_2003 needs one argument"
+
+	cat <<- EOF > "${base}.f"
+	       procedure(), pointer :: p
+	       end
+	EOF
+	${fcomp} "${base}.f" -o "${base}" >&/dev/null
+	local ret=$?
+
 	rm -f "${base}"*
 	return ${ret}
 }
@@ -50,26 +79,19 @@ _have-valid-fortran() {
 # See if the fortran supports OpenMP.
 _fortran-has-openmp() {
 	local flag
-	case $(tc-getFC) in
-		*gfortran*|pathf*)
-			flag=-fopenmp ;;
-		ifort)
-			flag=-openmp ;;
-		mpi*)
-			local _fcomp=$($(tc-getFC) -show | awk '{print $1}')
-			FC=${_fcomp} _fortran-has-openmp
-			return $? ;;
-		*)
-			return 0 ;;
-	esac
 	local base=${T}/test-fc-openmp
-	# leave extra leading space to make sure it works on fortran 77 as well
+
 	cat <<- EOF > "${base}.f"
-       call omp_get_num_threads
-       end
+	       call omp_get_num_threads
+	       end
 	EOF
-	$(tc-getFC "$@") ${flag} "${base}.f" -o "${base}" >&/dev/null
-	local ret=$?
+
+	for flag in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do
+		$(tc-getFC "$@") ${flag} "${base}.f" -o "${base}" >&/dev/null
+		local ret=$?
+		(( ${ret} )) || break
+	done
+
 	rm -f "${base}"*
 	return ${ret}
 }
@@ -85,6 +107,8 @@ get_fcomp() {
 	case $(tc-getFC) in
 		*gfortran* )
 			echo "gfortran" ;;
+		*g77* )
+			echo "g77" ;;
 		ifort )
 			echo "ifc" ;;
 		pathf*)
@@ -101,30 +125,32 @@ get_fcomp() {
 # @DESCRIPTION:
 # Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support.
 fortran-2_pkg_pretend() {
-	_have-valid-fortran || \
+	local dialect
+
+	_speaks_fortran_generic $(tc-getFC) || \
+		_speaks_fortran_generic $(tc-getF77) || \
 		die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
-	export FC=$(tc-getFC)
-	export F77=$(tc-getFC)
-	export F90=$(tc-getFC)
-	export F95=$(tc-getFC)
-	if [[ ${FC_NEED_OPENMP} == 1 ]]; then
-		_fortran-has-openmp || \
-		die "Please emerge current gcc with USE=openmp or export FC with compiler that supports OpenMP"
-	fi
-}
 
+	[[ -n ${FORTRAN_STANDARD} ]] || FORTRAN_STANDARD="77"
 
-# @FUNCTION: fortran-2_pkg_setup
-# @DESCRIPTION:
-# Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support, used in EAPI < 4.
-fortran-2_pkg_setup() {
-	has ${EAPI:-0} 0 1 2 3 && fortran-2_pkg_pretend
+	for dialect in ${FORTRAN_STANDARD}; do
+		case ${dialect} in
+			77|90|95) _speaks_fortran_generic $(tc-getFC) || \
+				die "Your fortran compiler does not speak the Fortran ${dialect}" ;;
+			2003) _speaks_fortran_${dialect} $(tc-getFC) ||  \
+				die "Your fortran compiler does not speak the Fortran ${dialect}" ;;
+			2008) die "Future";;
+			*) die "This dialect is not a fortran ";;
+		esac
+	done
+
+	if [[ ${FORTRAN_NEED_OPENMP} == 1 ]]; then
+		_fortran-has-openmp || \
+			die "Please emerge current gcc with USE=openmp or export FC with compiler that supports OpenMP"
+	fi
 }
 
 case "${EAPI:-0}" in
-	0|1|2|3)
-		EXPORT_FUNCTIONS pkg_setup;;
-	4)
-		EXPORT_FUNCTIONS pkg_pretend;;
+	4) EXPORT_FUNCTIONS pkg_pretend;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-15 20:50 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-15 20:50 UTC (permalink / raw
  To: gentoo-commits

commit:     c5e4d2832a36c8b57fb7f0910b5c18500a5a5ff8
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 15 20:49:43 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 20:49:43 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=c5e4d283

fortran-2.eclass nearly finished for review.

---
 eclass/fortran-2.eclass |  149 ++++++++++++++++++++++++++---------------------
 1 files changed, 82 insertions(+), 67 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 5ebf8ca..b758051 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -12,9 +12,10 @@
 # @BLURB: Packages, which need a fortran compiler should inherit this eclass.
 # @DESCRIPTION:
 # If you need a fortran compiler, inherit this eclass. This eclass tests for
-# working fortran compilers. Optional, it checks for openmp capability of the
+# working fortran compilers and exports the variables FC and F77.
+# Optional, it checks for openmp capability of the
 # current fortran compiler through FORTRAN_NEED_OPENMP=1.
-# Only phase function exported is pkg_setup.
+# Only phase function exported is pkg_pretend and pkg_setup.
 
 # @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP
 # @DESCRIPTION:
@@ -22,6 +23,16 @@
 #
 # Default is 0
 
+# @ECLASS-VARIABLE: FORTRAN_STANDARD
+# @DESCRIPTION:
+# Set this, if a special dialect needs to be support. Generally not needed.
+#
+# Valid settings are
+#
+# FORTRAN_STANDARD="77 90 95 2003"
+#
+# Defaults to FORTRAN_STANDARD="77" which is sufficient for most cases.
+
 inherit toolchain-funcs
 
 DEPEND="virtual/fortran"
@@ -29,46 +40,47 @@ RDEPEND="${DEPEND}"
 
 # internal function
 #
-# FUNCTION: _speaks_fortran_generic
-# DESCRIPTION:
-# Takes fortran compiler as argument.
-# Checks whether the passed fortran compiler is working
-_speaks_fortran_generic() {
-	local base=${T}/test-fortran-generic
-	local fcomp=${1}
+# FUNCTION: _write_testsuite
+# DESCRIPTION: writes fortran test code
+_write_testsuite() {
+	local filebase=${T}/test-fortran
 
-	[[ -z ${fcomp} ]] && die "_speaks_fortran_generic needs one argument"
-
-	cat <<- EOF > "${base}.f"
+	# f77 code
+	cat <<- EOF > "${filebase}.f"
 	       end
 	EOF
-	${fcomp} "${base}.f" -o "${base}" >&/dev/null
-	local ret=$?
 
-	rm -f "${base}"*
-	return ${ret}
+	# f90/95 code
+	cat <<- EOF > "${filebase}.f90"
+	end
+	EOF
+
+	# f2003 code
+	cat <<- EOF > "${filebase}.f03"
+	       procedure(), pointer :: p
+	       end
+	EOF
 }
 
 # internal function
 #
-# FUNCTION: _speaks_fortran_2003
+# FUNCTION: _compile_test
 # DESCRIPTION:
-# Takes fortran compiler as argument.
-# Checks whether the passed fortran compiler is working
-_speaks_fortran_2003() {
-	local base=${T}/test-fortran-2003
+# Takes fortran compiler as first argument and dialect as second.
+# Checks whether the passed fortran compiler speaks the fortran dialect
+_compile_test() {
+	local filebase=${T}/test-fortran
 	local fcomp=${1}
+	local fdia=${2}
 
-	[[ -z ${fcomp} ]] && die "_speaks_fortran_2003 needs one argument"
+	[[ -z ${fcomp} ]] && die "_compile_test() needs at least one arg"
 
-	cat <<- EOF > "${base}.f"
-	       procedure(), pointer :: p
-	       end
-	EOF
-	${fcomp} "${base}.f" -o "${base}" >&/dev/null
+	[[ -f "${filebase}.f${fdia}" ]] || _write_testsuite
+
+	${fcomp} "${filebase}.f${fdia}" -o "${filebase}-f${fdia}" >&/dev/null
 	local ret=$?
 
-	rm -f "${base}"*
+	rm -f "${filebase}-f${fdia}"
 	return ${ret}
 }
 
@@ -79,46 +91,35 @@ _speaks_fortran_2003() {
 # See if the fortran supports OpenMP.
 _fortran-has-openmp() {
 	local flag
-	local base=${T}/test-fc-openmp
+	local filebase=${T}/test-fc-openmp
 
-	cat <<- EOF > "${base}.f"
+	cat <<- EOF > "${filebase}.f"
 	       call omp_get_num_threads
 	       end
 	EOF
 
 	for flag in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do
-		$(tc-getFC "$@") ${flag} "${base}.f" -o "${base}" >&/dev/null
+		$(tc-getFC "$@") ${flag} "${filebase}.f" -o "${filebase}" >&/dev/null
 		local ret=$?
 		(( ${ret} )) || break
 	done
 
-	rm -f "${base}"*
+	rm -f "${filebase}"*
 	return ${ret}
 }
 
-# @FUNCTION: get_fcomp
-# @DESCRIPTION:
-# Returns the canonical name or the native compiler of the current fortran compiler
-#
-# e.g.
+# internal
 #
-# x86_64-linux-gnu-gfortran -> gfortran
-get_fcomp() {
-	case $(tc-getFC) in
-		*gfortran* )
-			echo "gfortran" ;;
-		*g77* )
-			echo "g77" ;;
-		ifort )
-			echo "ifc" ;;
-		pathf*)
-			echo "pathcc" ;;
-		mpi*)
-			local _fcomp=$($(tc-getFC) -show | awk '{print $1}')
-			echo $(FC=${_fcomp} get_fcomp) ;;
-		* )
-			echo $(tc-getFC) ;;
-	esac
+# FUNCTION: _die_msg
+# DESCRIPTION: Detailed description how to handle fortran support
+_die_msg() {
+	echo
+	eerror "Please install currently selected gcc version with USE=fortran."
+	eerror "If you intend to use a different compiler then gfortran, please"
+	eerror "set FC variable accordingly and take care that the neccessary"
+	eerror "fortran dialects are support."
+	echo
+	die "Currently no working fortran compiler is available"
 }
 
 # @FUNCTION: fortran-2_pkg_pretend
@@ -127,30 +128,44 @@ get_fcomp() {
 fortran-2_pkg_pretend() {
 	local dialect
 
-	_speaks_fortran_generic $(tc-getFC) || \
-		_speaks_fortran_generic $(tc-getF77) || \
-		die "Please emerge the current gcc with USE=fortran or export FC defining a working fortran compiler"
-
-	[[ -n ${FORTRAN_STANDARD} ]] || FORTRAN_STANDARD="77"
+	[[ -n ${F77} ]] || F77=$(tc-getFC)
 
+	: ${FORTRAN_STANDARD:=77}
 	for dialect in ${FORTRAN_STANDARD}; do
 		case ${dialect} in
-			77|90|95) _speaks_fortran_generic $(tc-getFC) || \
-				die "Your fortran compiler does not speak the Fortran ${dialect}" ;;
-			2003) _speaks_fortran_${dialect} $(tc-getFC) ||  \
-				die "Your fortran compiler does not speak the Fortran ${dialect}" ;;
-			2008) die "Future";;
-			*) die "This dialect is not a fortran ";;
+			77) _compile_test $(tc-getF77) || _die_msg ;;
+			90|95) _compile_test $(tc-getFC) 90 || _die_msg ;;
+			2003) _compile_test $(tc-getFC) 03 || _die_msg ;;
+			2008) die "Future" ;;
+			*) die "${dialect} is not a Fortran dialect." ;;
 		esac
 	done
 
 	if [[ ${FORTRAN_NEED_OPENMP} == 1 ]]; then
 		_fortran-has-openmp || \
-			die "Please emerge current gcc with USE=openmp or export FC with compiler that supports OpenMP"
+			die "Please install current gcc with USE=openmp or set the FC variable to a compiler that supports OpenMP"
+	fi
+}
+
+# @FUNCTION: fortran-2_pkg_setup
+# @DESCRIPTION:
+# In EAPI < 4 it calls the compiler check. This behaviour is deprecated
+# and will be removed at 01-Sep-2011. Please migrate to EAPI=4.
+#
+# Exports the FC and F77 variable according to the compiler checks.
+fortran-2_pkg_setup() {
+	if has ${EAPI:-0} 0 1 2 3; then
+		ewarn "The support for EAPI=${EAPI} by the fortran-2.eclass"
+		ewarn "will be end at 01-Sep-2011"
+		ewarn "Please migrate your package to EAPI=4"
+		fortran-2_pkg_pretend
 	fi
+	[[ -n ${F77} ]] || export F77=$(tc-getFC)
+	[[ -n ${FC} ]] || export FC=$(tc-getFC)
 }
 
 case "${EAPI:-0}" in
-	4) EXPORT_FUNCTIONS pkg_pretend;;
+	1|2|3) EXPORT_FUNCTIONS pkg_setup ;;
+	4) EXPORT_FUNCTIONS pkg_pretend pkg_setup ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-15 21:30 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-15 21:30 UTC (permalink / raw
  To: gentoo-commits

commit:     23f42909a267b7d5d5998e5e1d22c86698cb8004
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 15 21:29:48 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 21:29:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=23f42909

Last changes before review.

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/fortran-2.eclass |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index b758051..b812f50 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -16,6 +16,7 @@
 # Optional, it checks for openmp capability of the
 # current fortran compiler through FORTRAN_NEED_OPENMP=1.
 # Only phase function exported is pkg_pretend and pkg_setup.
+# Need help? Ask the sci team.
 
 # @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP
 # @DESCRIPTION:
@@ -27,7 +28,7 @@
 # @DESCRIPTION:
 # Set this, if a special dialect needs to be support. Generally not needed.
 #
-# Valid settings are
+# Valid settings are any combination of
 #
 # FORTRAN_STANDARD="77 90 95 2003"
 #
@@ -73,7 +74,7 @@ _compile_test() {
 	local fcomp=${1}
 	local fdia=${2}
 
-	[[ -z ${fcomp} ]] && die "_compile_test() needs at least one arg"
+	[[ -z ${fcomp} ]] && die "_compile_test() needs at least one argument"
 
 	[[ -f "${filebase}.f${fdia}" ]] || _write_testsuite
 
@@ -149,7 +150,7 @@ fortran-2_pkg_pretend() {
 
 # @FUNCTION: fortran-2_pkg_setup
 # @DESCRIPTION:
-# In EAPI < 4 it calls the compiler check. This behaviour is deprecated
+# In EAPI < 4 it calls the compiler check. This behavior is deprecated
 # and will be removed at 01-Sep-2011. Please migrate to EAPI=4.
 #
 # Exports the FC and F77 variable according to the compiler checks.



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-20  5:20 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-20  5:20 UTC (permalink / raw
  To: gentoo-commits

commit:     f6c799d92e58dc170ef057ad73e44ef5db3e4f16
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 18 14:53:07 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Jun 18 14:53:07 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=f6c799d9

Mikes suggestions

---
 eclass/fortran-2.eclass |   89 +++++++++++++++++++++++------------------------
 1 files changed, 44 insertions(+), 45 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index b812f50..600d107 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -9,40 +9,37 @@
 # @MAINTAINER:
 # jlec@gentoo.org
 # sci@gentoo.org
-# @BLURB: Packages, which need a fortran compiler should inherit this eclass.
+# @BLURB: Simplify fortran compiler management
 # @DESCRIPTION:
-# If you need a fortran compiler, inherit this eclass. This eclass tests for
-# working fortran compilers and exports the variables FC and F77.
-# Optional, it checks for openmp capability of the
-# current fortran compiler through FORTRAN_NEED_OPENMP=1.
-# Only phase function exported is pkg_pretend and pkg_setup.
-# Need help? Ask the sci team.
+# If you need a fortran compiler, then you should be inheriting this eclass.
+# The eclass tests for working fortran compilers
+# and exports the variables FC and F77.
+# Optionally, it checks for extended capabilities based on
+# the variable options selected in the ebuild
+# The only phase functions exported are pkg_pretend and pkg_setup.
 
 # @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP
 # @DESCRIPTION:
-# Set FORTRAN_NEED_OPENMP=1 in order to test FC for openmp capabilities
-#
-# Default is 0
+# Set to "1" in order to automatically have the eclass abort if the fortran
+# compiler lacks openmp support.
+: ${FORTRAN_NEED_OPENMP:=0}
 
 # @ECLASS-VARIABLE: FORTRAN_STANDARD
 # @DESCRIPTION:
-# Set this, if a special dialect needs to be support. Generally not needed.
-#
-# Valid settings are any combination of
-#
-# FORTRAN_STANDARD="77 90 95 2003"
+# Set this, if a special dialect needs to be supported.
+# Generally not needed as default is sufficient.
 #
-# Defaults to FORTRAN_STANDARD="77" which is sufficient for most cases.
+# Valid settings are any combination of: 77 90 95 2003
+: ${FORTRAN_STANDARD:=77}
 
 inherit toolchain-funcs
 
 DEPEND="virtual/fortran"
 RDEPEND="${DEPEND}"
 
-# internal function
-#
-# FUNCTION: _write_testsuite
-# DESCRIPTION: writes fortran test code
+# @FUNCTION: _write_testsuite
+# @DESCRIPTION: writes fortran test code
+# @INTERNAL
 _write_testsuite() {
 	local filebase=${T}/test-fortran
 
@@ -63,56 +60,58 @@ _write_testsuite() {
 	EOF
 }
 
-# internal function
-#
-# FUNCTION: _compile_test
-# DESCRIPTION:
+# @FUNCTION: _compile_test
+# @DESCRIPTION:
 # Takes fortran compiler as first argument and dialect as second.
 # Checks whether the passed fortran compiler speaks the fortran dialect
+# @INTERNAL
 _compile_test() {
 	local filebase=${T}/test-fortran
 	local fcomp=${1}
 	local fdia=${2}
+	local fcode=${filebase}.f${fdia}
+	local ret
 
-	[[ -z ${fcomp} ]] && die "_compile_test() needs at least one argument"
+	[[ $# -eq 0 ]] && die "_compile_test() needs at least one argument"
 
-	[[ -f "${filebase}.f${fdia}" ]] || _write_testsuite
+	[[ -f ${fcode} ]] || _write_testsuite
 
-	${fcomp} "${filebase}.f${fdia}" -o "${filebase}-f${fdia}" >&/dev/null
-	local ret=$?
+	${fcomp} "${fcode}" -o "${fcode}.x" >&/dev/null
+	ret=$?
 
-	rm -f "${filebase}-f${fdia}"
+	rm -f "${fcode}.x"
 	return ${ret}
 }
 
-# internal function
-#
-# FUNCTION: _fortran-has-openmp
-# DESCRIPTION:
+# @FUNCTION: _fortran-has-openmp
+# @DESCRIPTION:
 # See if the fortran supports OpenMP.
+# @INTERNAL
 _fortran-has-openmp() {
 	local flag
 	local filebase=${T}/test-fc-openmp
+	local fcode=${filebase}.f
+	local ret
+	local _fc=$(tc-getFC)
 
-	cat <<- EOF > "${filebase}.f"
+	cat <<- EOF > "${fcode}"
 	       call omp_get_num_threads
 	       end
 	EOF
 
 	for flag in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do
-		$(tc-getFC "$@") ${flag} "${filebase}.f" -o "${filebase}" >&/dev/null
-		local ret=$?
+		${_fc} ${flag} "${fcode}" -o "${fcode}.x" >&/dev/null
+		ret=$?
 		(( ${ret} )) || break
 	done
 
-	rm -f "${filebase}"*
+	rm -f "${fcode}.x"
 	return ${ret}
 }
 
-# internal
-#
-# FUNCTION: _die_msg
-# DESCRIPTION: Detailed description how to handle fortran support
+# @FUNCTION: _die_msg
+# @DESCRIPTION: Detailed description how to handle fortran support
+# @INTERNAL
 _die_msg() {
 	echo
 	eerror "Please install currently selected gcc version with USE=fortran."
@@ -129,7 +128,7 @@ _die_msg() {
 fortran-2_pkg_pretend() {
 	local dialect
 
-	[[ -n ${F77} ]] || F77=$(tc-getFC)
+	: ${F77:=$(tc-getFC)}
 
 	: ${FORTRAN_STANDARD:=77}
 	for dialect in ${FORTRAN_STANDARD}; do
@@ -151,13 +150,13 @@ fortran-2_pkg_pretend() {
 # @FUNCTION: fortran-2_pkg_setup
 # @DESCRIPTION:
 # In EAPI < 4 it calls the compiler check. This behavior is deprecated
-# and will be removed at 01-Sep-2011. Please migrate to EAPI=4.
+# and will be removed at 01-Okt-2011. Please migrate to EAPI=4.
 #
 # Exports the FC and F77 variable according to the compiler checks.
 fortran-2_pkg_setup() {
 	if has ${EAPI:-0} 0 1 2 3; then
 		ewarn "The support for EAPI=${EAPI} by the fortran-2.eclass"
-		ewarn "will be end at 01-Sep-2011"
+		ewarn "will be end at 01-Okt-2011"
 		ewarn "Please migrate your package to EAPI=4"
 		fortran-2_pkg_pretend
 	fi
@@ -165,7 +164,7 @@ fortran-2_pkg_setup() {
 	[[ -n ${FC} ]] || export FC=$(tc-getFC)
 }
 
-case "${EAPI:-0}" in
+case ${EAPI:-0} in
 	1|2|3) EXPORT_FUNCTIONS pkg_setup ;;
 	4) EXPORT_FUNCTIONS pkg_pretend pkg_setup ;;
 	*) die "EAPI=${EAPI} is not supported" ;;



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-20  5:20 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-20  5:20 UTC (permalink / raw
  To: gentoo-commits

commit:     ca2f2707f362d858813bc5b84ed95c80f683365f
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 20 05:20:21 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Jun 20 05:20:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=ca2f2707

Final changes before move to the main tree.

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/fortran-2.eclass |   27 +++++----------------------
 1 files changed, 5 insertions(+), 22 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 600d107..050e45e 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -16,7 +16,7 @@
 # and exports the variables FC and F77.
 # Optionally, it checks for extended capabilities based on
 # the variable options selected in the ebuild
-# The only phase functions exported are pkg_pretend and pkg_setup.
+# The only phase function exported is fortran-2_pkg_setup.
 
 # @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP
 # @DESCRIPTION:
@@ -122,10 +122,10 @@ _die_msg() {
 	die "Currently no working fortran compiler is available"
 }
 
-# @FUNCTION: fortran-2_pkg_pretend
+# @FUNCTION: fortran-2_pkg_setup
 # @DESCRIPTION:
 # Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support.
-fortran-2_pkg_pretend() {
+fortran-2_pkg_setup() {
 	local dialect
 
 	: ${F77:=$(tc-getFC)}
@@ -145,27 +145,10 @@ fortran-2_pkg_pretend() {
 		_fortran-has-openmp || \
 			die "Please install current gcc with USE=openmp or set the FC variable to a compiler that supports OpenMP"
 	fi
-}
-
-# @FUNCTION: fortran-2_pkg_setup
-# @DESCRIPTION:
-# In EAPI < 4 it calls the compiler check. This behavior is deprecated
-# and will be removed at 01-Okt-2011. Please migrate to EAPI=4.
-#
-# Exports the FC and F77 variable according to the compiler checks.
-fortran-2_pkg_setup() {
-	if has ${EAPI:-0} 0 1 2 3; then
-		ewarn "The support for EAPI=${EAPI} by the fortran-2.eclass"
-		ewarn "will be end at 01-Okt-2011"
-		ewarn "Please migrate your package to EAPI=4"
-		fortran-2_pkg_pretend
-	fi
-	[[ -n ${F77} ]] || export F77=$(tc-getFC)
-	[[ -n ${FC} ]] || export FC=$(tc-getFC)
+	tc-export F77 FC
 }
 
 case ${EAPI:-0} in
-	1|2|3) EXPORT_FUNCTIONS pkg_setup ;;
-	4) EXPORT_FUNCTIONS pkg_pretend pkg_setup ;;
+	1|2|3|4) EXPORT_FUNCTIONS pkg_setup ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-21 11:54 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-06-21 11:54 UTC (permalink / raw
  To: gentoo-commits

commit:     bfd2b190f937a7044231d13a47156cc4afd75274
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 21 10:54:26 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Jun 21 10:54:26 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=bfd2b190

Moved to tree

---
 eclass/fortran-2.eclass |  154 -----------------------------------------------
 1 files changed, 0 insertions(+), 154 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
deleted file mode 100644
index 050e45e..0000000
--- a/eclass/fortran-2.eclass
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# Author Justin Lecher <jlec@gentoo.org>
-# Test functions provided by Sebastien Fabbro and Kacper Kowalik
-
-# @ECLASS: fortran-2.eclass
-# @MAINTAINER:
-# jlec@gentoo.org
-# sci@gentoo.org
-# @BLURB: Simplify fortran compiler management
-# @DESCRIPTION:
-# If you need a fortran compiler, then you should be inheriting this eclass.
-# The eclass tests for working fortran compilers
-# and exports the variables FC and F77.
-# Optionally, it checks for extended capabilities based on
-# the variable options selected in the ebuild
-# The only phase function exported is fortran-2_pkg_setup.
-
-# @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP
-# @DESCRIPTION:
-# Set to "1" in order to automatically have the eclass abort if the fortran
-# compiler lacks openmp support.
-: ${FORTRAN_NEED_OPENMP:=0}
-
-# @ECLASS-VARIABLE: FORTRAN_STANDARD
-# @DESCRIPTION:
-# Set this, if a special dialect needs to be supported.
-# Generally not needed as default is sufficient.
-#
-# Valid settings are any combination of: 77 90 95 2003
-: ${FORTRAN_STANDARD:=77}
-
-inherit toolchain-funcs
-
-DEPEND="virtual/fortran"
-RDEPEND="${DEPEND}"
-
-# @FUNCTION: _write_testsuite
-# @DESCRIPTION: writes fortran test code
-# @INTERNAL
-_write_testsuite() {
-	local filebase=${T}/test-fortran
-
-	# f77 code
-	cat <<- EOF > "${filebase}.f"
-	       end
-	EOF
-
-	# f90/95 code
-	cat <<- EOF > "${filebase}.f90"
-	end
-	EOF
-
-	# f2003 code
-	cat <<- EOF > "${filebase}.f03"
-	       procedure(), pointer :: p
-	       end
-	EOF
-}
-
-# @FUNCTION: _compile_test
-# @DESCRIPTION:
-# Takes fortran compiler as first argument and dialect as second.
-# Checks whether the passed fortran compiler speaks the fortran dialect
-# @INTERNAL
-_compile_test() {
-	local filebase=${T}/test-fortran
-	local fcomp=${1}
-	local fdia=${2}
-	local fcode=${filebase}.f${fdia}
-	local ret
-
-	[[ $# -eq 0 ]] && die "_compile_test() needs at least one argument"
-
-	[[ -f ${fcode} ]] || _write_testsuite
-
-	${fcomp} "${fcode}" -o "${fcode}.x" >&/dev/null
-	ret=$?
-
-	rm -f "${fcode}.x"
-	return ${ret}
-}
-
-# @FUNCTION: _fortran-has-openmp
-# @DESCRIPTION:
-# See if the fortran supports OpenMP.
-# @INTERNAL
-_fortran-has-openmp() {
-	local flag
-	local filebase=${T}/test-fc-openmp
-	local fcode=${filebase}.f
-	local ret
-	local _fc=$(tc-getFC)
-
-	cat <<- EOF > "${fcode}"
-	       call omp_get_num_threads
-	       end
-	EOF
-
-	for flag in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do
-		${_fc} ${flag} "${fcode}" -o "${fcode}.x" >&/dev/null
-		ret=$?
-		(( ${ret} )) || break
-	done
-
-	rm -f "${fcode}.x"
-	return ${ret}
-}
-
-# @FUNCTION: _die_msg
-# @DESCRIPTION: Detailed description how to handle fortran support
-# @INTERNAL
-_die_msg() {
-	echo
-	eerror "Please install currently selected gcc version with USE=fortran."
-	eerror "If you intend to use a different compiler then gfortran, please"
-	eerror "set FC variable accordingly and take care that the neccessary"
-	eerror "fortran dialects are support."
-	echo
-	die "Currently no working fortran compiler is available"
-}
-
-# @FUNCTION: fortran-2_pkg_setup
-# @DESCRIPTION:
-# Setup functionallity, checks for a valid fortran compiler and optionally for its openmp support.
-fortran-2_pkg_setup() {
-	local dialect
-
-	: ${F77:=$(tc-getFC)}
-
-	: ${FORTRAN_STANDARD:=77}
-	for dialect in ${FORTRAN_STANDARD}; do
-		case ${dialect} in
-			77) _compile_test $(tc-getF77) || _die_msg ;;
-			90|95) _compile_test $(tc-getFC) 90 || _die_msg ;;
-			2003) _compile_test $(tc-getFC) 03 || _die_msg ;;
-			2008) die "Future" ;;
-			*) die "${dialect} is not a Fortran dialect." ;;
-		esac
-	done
-
-	if [[ ${FORTRAN_NEED_OPENMP} == 1 ]]; then
-		_fortran-has-openmp || \
-			die "Please install current gcc with USE=openmp or set the FC variable to a compiler that supports OpenMP"
-	fi
-	tc-export F77 FC
-}
-
-case ${EAPI:-0} in
-	1|2|3|4) EXPORT_FUNCTIONS pkg_setup ;;
-	*) die "EAPI=${EAPI} is not supported" ;;
-esac



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-30 16:45 Alexey Shvetsov
  0 siblings, 0 replies; 169+ messages in thread
From: Alexey Shvetsov @ 2011-06-30 16:45 UTC (permalink / raw
  To: gentoo-commits

commit:     a467650990a554f0b68eb8ff051b762d815077ca
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 16:45:12 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 16:45:12 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a4676509

[eclass] Update OFED eclass

---
 eclass/openib.eclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/eclass/openib.eclass b/eclass/openib.eclass
index 8a974f0..914a2a6 100644
--- a/eclass/openib.eclass
+++ b/eclass/openib.eclass
@@ -23,8 +23,9 @@ SLOT="0"
 # @DESCRIPTION:
 # Defines OFED package suffix eg -1.ofed1.4
 
+OFED_BASE_VER=$(get_version_component_range 1-3 ${OFED_VER})
 
-SRC_URI="http://www.openfabrics.org/downloads/OFED/ofed-${OFED_VER}/OFED-${OFED_VER}.tgz"
+SRC_URI="http://www.openfabrics.org/downloads/OFED/ofed-${OFED_BASE_VER}/OFED-${OFED_VER}.tgz"
 
 case ${PN} in
 	openib-files)



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-30 16:47 Alexey Shvetsov
  0 siblings, 0 replies; 169+ messages in thread
From: Alexey Shvetsov @ 2011-06-30 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     62668706b794f0849edb3d2288d8c1b36af926b0
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 16:46:22 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 16:46:22 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=62668706

[eclass] add missing inherit

---
 eclass/openib.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/openib.eclass b/eclass/openib.eclass
index 914a2a6..0530f96 100644
--- a/eclass/openib.eclass
+++ b/eclass/openib.eclass
@@ -7,7 +7,7 @@
 # Purpose:  Simplify working with OFED packages
 #
 
-inherit base eutils rpm
+inherit base eutils rpm versionator
 
 EXPORT_FUNCTIONS src_unpack
 



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-06-30 16:57 Alexey Shvetsov
  0 siblings, 0 replies; 169+ messages in thread
From: Alexey Shvetsov @ 2011-06-30 16:57 UTC (permalink / raw
  To: gentoo-commits

commit:     2c228853efbd3134cdd7b1536c28163a31dda984
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 16:53:04 2011 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 16:53:04 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=2c228853

[eclass] Fix unpack logic

---
 eclass/openib.eclass |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/eclass/openib.eclass b/eclass/openib.eclass
index 0530f96..3705957 100644
--- a/eclass/openib.eclass
+++ b/eclass/openib.eclass
@@ -23,6 +23,10 @@ SLOT="0"
 # @DESCRIPTION:
 # Defines OFED package suffix eg -1.ofed1.4
 
+# @ECLASS-VARIABLE: OFED_SNAPSHOT
+# @DESCRIPTION:
+# Defines if src tarball is git snapshot
+
 OFED_BASE_VER=$(get_version_component_range 1-3 ${OFED_VER})
 
 SRC_URI="http://www.openfabrics.org/downloads/OFED/ofed-${OFED_BASE_VER}/OFED-${OFED_VER}.tgz"
@@ -62,12 +66,9 @@ S="${WORKDIR}/${MY_PN}-${MY_PV}"
 openib_src_unpack() {
 	unpack ${A}
 	rpm_unpack "./OFED-${OFED_VER}/SRPMS/${MY_PN}-${MY_PV}-${OFED_SUFFIX}.src.rpm"
-	case ${MY_PN} in
-		rds-tools)
-			MY_PV="${PV}-${OFED_SUFFIX}"
-			;;
-		*)
-			;;
-	esac
-	unpack ./${MY_PN}-${MY_PV}.${EXT}
+	if [ -z ${OFED_SNAPSHOT} ]; then
+		unpack ./${MY_PN}-${MY_PV}.${EXT}
+	else
+		unpack ./${MY_PN}-${MY_PV}-${OFED_SUFFIX}.${EXT}
+	fi
 }



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-07-17 17:03 Andreas Hüttel
  0 siblings, 0 replies; 169+ messages in thread
From: Andreas Hüttel @ 2011-07-17 17:03 UTC (permalink / raw
  To: gentoo-commits

commit:     1ec63a310dfc5bdcd1cafaae987847450ea942fd
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 17 17:02:55 2011 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 17 17:02:55 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=1ec63a31

Add CMAKE_REMOVE_MODULES feature

---
 eclass/cmake-utils.eclass |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 6a58226..041b636 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -33,6 +33,12 @@ WANT_CMAKE="${WANT_CMAKE:-always}"
 # Specify the minimum required CMake version.  Default is 2.8.1
 CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
 
+# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES
+# @DESCRIPTION:
+# Space-separated list of CMake modules that will be removed in $S during src_prepare, 
+# in order to force packages to use the system version.
+CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-FindBLAS}"
+
 CMAKEDEPEND=""
 case ${WANT_CMAKE} in
 	always)
@@ -46,7 +52,7 @@ inherit toolchain-funcs multilib flag-o-matic base
 
 CMAKE_EXPF="src_compile src_test src_install"
 case ${EAPI:-0} in
-	4|3|2) CMAKE_EXPF+=" src_configure" ;;
+	4|3|2) CMAKE_EXPF+=" src_prepare src_configure" ;;
 	1|0) ;;
 	*) die "Unknown EAPI, Bug eclass maintainers." ;;
 esac
@@ -268,6 +274,15 @@ _modify-cmakelists() {
 	_EOF_
 }
 
+enable_cmake-utils_src_prepare() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local name
+	for name in ${CMAKE_REMOVE_MODULES} ; do
+		find "${S}" -name ${name}.cmake -exec rm -v {} +
+	done
+}
+
 enable_cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
@@ -372,6 +387,7 @@ enable_cmake-utils_src_configure() {
 enable_cmake-utils_src_compile() {
 	debug-print-function ${FUNCNAME} "$@"
 
+	has src_prepare ${CMAKE_EXPF} || cmake-utils_src_prepare
 	has src_configure ${CMAKE_EXPF} || cmake-utils_src_configure
 	cmake-utils_src_make "$@"
 }
@@ -425,6 +441,14 @@ enable_cmake-utils_src_test() {
 	popd > /dev/null
 }
 
+# @FUNCTION: cmake-utils_src_prepare
+# @DESCRIPTION:
+# General function for configuring with cmake. Default behaviour is to start an
+# out-of-source build.
+cmake-utils_src_prepare() {
+	_execute_optionaly "src_prepare" "$@"
+}
+
 # @FUNCTION: cmake-utils_src_configure
 # @DESCRIPTION:
 # General function for configuring with cmake. Default behaviour is to start an



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-07-17 17:03 Andreas Hüttel
  0 siblings, 0 replies; 169+ messages in thread
From: Andreas Hüttel @ 2011-07-17 17:03 UTC (permalink / raw
  To: gentoo-commits

commit:     c71472052ce0ba88995ec5dcde5fce9d498da19c
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 17 16:08:28 2011 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 17 16:08:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=c7147205

Copied eclass from main tree

---
 eclass/cmake-utils.eclass |  467 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 467 insertions(+), 0 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
new file mode 100644
index 0000000..6a58226
--- /dev/null
+++ b/eclass/cmake-utils.eclass
@@ -0,0 +1,467 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.69 2011/06/27 21:11:57 abcd Exp $
+
+# @ECLASS: cmake-utils.eclass
+# @MAINTAINER:
+# kde@gentoo.org
+#
+# @CODE
+# Tomáš Chvátal <scarabeus@gentoo.org>
+# Maciej Mrozowski <reavertm@gentoo.org>
+# (undisclosed contributors)
+# Original author: Zephyrus (zephyrus@mirach.it)
+# @CODE
+# @BLURB: common ebuild functions for cmake-based packages
+# @DESCRIPTION:
+# The cmake-utils eclass is base.eclass(5) wrapper that makes creating ebuilds for
+# cmake-based packages much easier.
+# It provides all inherited features (DOCS, HTML_DOCS, PATCHES) along with out-of-source
+# builds (default), in-source builds and an implementation of the well-known use_enable
+# and use_with functions for CMake.
+
+# @ECLASS-VARIABLE: WANT_CMAKE
+# @DESCRIPTION:
+# Specify if cmake-utils eclass should depend on cmake optionaly or not.
+# This is usefull when only part of aplication is using cmake build system.
+# Valid values are: always [default], optional (where the value is the useflag
+# used for optionality)
+WANT_CMAKE="${WANT_CMAKE:-always}"
+
+# @ECLASS-VARIABLE: CMAKE_MIN_VERSION
+# @DESCRIPTION:
+# Specify the minimum required CMake version.  Default is 2.8.1
+CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
+
+CMAKEDEPEND=""
+case ${WANT_CMAKE} in
+	always)
+		;;
+	*)
+		IUSE+=" ${WANT_CMAKE}"
+		CMAKEDEPEND+="${WANT_CMAKE}? ( "
+		;;
+esac
+inherit toolchain-funcs multilib flag-o-matic base
+
+CMAKE_EXPF="src_compile src_test src_install"
+case ${EAPI:-0} in
+	4|3|2) CMAKE_EXPF+=" src_configure" ;;
+	1|0) ;;
+	*) die "Unknown EAPI, Bug eclass maintainers." ;;
+esac
+EXPORT_FUNCTIONS ${CMAKE_EXPF}
+
+: ${DESCRIPTION:="Based on the ${ECLASS} eclass"}
+
+if [[ ${PN} != cmake ]]; then
+	CMAKEDEPEND+=">=dev-util/cmake-${CMAKE_MIN_VERSION}"
+fi
+
+CMAKEDEPEND+=" userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
+
+[[ ${WANT_CMAKE} = always ]] || CMAKEDEPEND+=" )"
+
+DEPEND="${CMAKEDEPEND}"
+unset CMAKEDEPEND
+
+# Internal functions used by cmake-utils_use_*
+_use_me_now() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local uper capitalised x
+	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
+	if [[ ! -z $3 ]]; then
+		# user specified the use name so use it
+		echo "-D$1$3=$(use $2 && echo ON || echo OFF)"
+	else
+		# use all various most used combinations
+		uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
+		capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
+		for x in $2 $uper $capitalised; do
+			echo "-D$1$x=$(use $2 && echo ON || echo OFF) "
+		done
+	fi
+}
+_use_me_now_inverted() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local uper capitalised x
+	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
+	if [[ ! -z $3 ]]; then
+		# user specified the use name so use it
+		echo "-D$1$3=$(use $2 && echo OFF || echo ON)"
+	else
+		# use all various most used combinations
+		uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
+		capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
+		for x in $2 $uper $capitalised; do
+			echo "-D$1$x=$(use $2 && echo OFF || echo ON) "
+		done
+	fi
+}
+
+# @ECLASS-VARIABLE: CMAKE_BUILD_DIR
+# @DESCRIPTION:
+# Build directory where all cmake processed files should be generated.
+# For in-source build it's fixed to ${CMAKE_USE_DIR}.
+# For out-of-source build it can be overriden, by default it uses
+# ${WORKDIR}/${P}_build.
+
+# @ECLASS-VARIABLE: CMAKE_BUILD_TYPE
+# @DESCRIPTION:
+# Set to override default CMAKE_BUILD_TYPE. Only useful for packages
+# known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)".
+# If about to be set - needs to be set before invoking cmake-utils_src_configure.
+# You usualy do *NOT* want nor need to set it as it pulls CMake default build-type
+# specific compiler flags overriding make.conf.
+: ${CMAKE_BUILD_TYPE:=Gentoo}
+
+# @ECLASS-VARIABLE: CMAKE_IN_SOURCE_BUILD
+# @DESCRIPTION:
+# Set to enable in-source build.
+
+# @ECLASS-VARIABLE: CMAKE_USE_DIR
+# @DESCRIPTION:
+# Sets the directory where we are working with cmake.
+# For example when application uses autotools and only one
+# plugin needs to be done by cmake.
+# By default it uses ${S}.
+
+# @ECLASS-VARIABLE: CMAKE_VERBOSE
+# @DESCRIPTION:
+# Set to enable verbose messages during compilation.
+
+# @ECLASS-VARIABLE: PREFIX
+# @DESCRIPTION:
+# Eclass respects PREFIX variable, though it's not recommended way to set
+# install/lib/bin prefixes.
+# Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead.
+
+# @ECLASS-VARIABLE: CMAKE_BINARY
+# @DESCRIPTION:
+# Eclass can use different cmake binary than the one provided in by system.
+: ${CMAKE_BINARY:=cmake}
+
+# Determine using IN or OUT source build
+_check_build_dir() {
+	: ${CMAKE_USE_DIR:=${S}}
+	if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
+		# we build in source dir
+		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
+	else
+		: ${CMAKE_BUILD_DIR:=${WORKDIR}/${P}_build}
+	fi
+	echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
+}
+# @FUNCTION: cmake-utils_use_with
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_with. See ebuild(5).
+#
+# `cmake-utils_use_with foo FOO` echoes -DWITH_FOO=ON if foo is enabled
+# and -DWITH_FOO=OFF if it is disabled.
+cmake-utils_use_with() { _use_me_now WITH_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_enable
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_enable foo FOO` echoes -DENABLE_FOO=ON if foo is enabled
+# and -DENABLE_FOO=OFF if it is disabled.
+cmake-utils_use_enable() { _use_me_now ENABLE_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_disable
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on inversion of use_enable. See ebuild(5).
+#
+# `cmake-utils_use_enable foo FOO` echoes -DDISABLE_FOO=OFF if foo is enabled
+# and -DDISABLE_FOO=ON if it is disabled.
+cmake-utils_use_disable() { _use_me_now_inverted DISABLE_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_no
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_disable. See ebuild(5).
+#
+# `cmake-utils_use_no foo FOO` echoes -DNO_FOO=OFF if foo is enabled
+# and -DNO_FOO=ON if it is disabled.
+cmake-utils_use_no() { _use_me_now_inverted NO_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_want
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_want foo FOO` echoes -DWANT_FOO=ON if foo is enabled
+# and -DWANT_FOO=OFF if it is disabled.
+cmake-utils_use_want() { _use_me_now WANT_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_build
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_build foo FOO` echoes -DBUILD_FOO=ON if foo is enabled
+# and -DBUILD_FOO=OFF if it is disabled.
+cmake-utils_use_build() { _use_me_now BUILD_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_has
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
+# and -DHAVE_FOO=OFF if it is disabled.
+cmake-utils_use_has() { _use_me_now HAVE_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_use
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_use foo FOO` echoes -DUSE_FOO=ON if foo is enabled
+# and -DUSE_FOO=OFF if it is disabled.
+cmake-utils_use_use() { _use_me_now USE_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use foo FOO` echoes -DFOO=ON if foo is enabled
+# and -DFOO=OFF if it is disabled.
+cmake-utils_use() { _use_me_now "" "$@" ; }
+
+# Internal function for modifying hardcoded definitions.
+# Removes dangerous definitions that override Gentoo settings.
+_modify-cmakelists() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	# Only edit the files once
+	grep -qs "<<< Gentoo configuration >>>" CMakeLists.txt && return 0
+
+	# Comment out all set (<some_should_be_user_defined_variable> value)
+	# TODO Add QA checker - inform when variable being checked for below is set in CMakeLists.txt
+	find "${CMAKE_USE_DIR}" -name CMakeLists.txt \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE.*)/{s/^/#IGNORE /g}' {} + \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_COLOR_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX.*)/{s/^/#IGNORE /g}' {} + \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \
+		|| die "${LINENO}: failed to disable hardcoded settings"
+
+	# NOTE Append some useful summary here
+	cat >> "${CMAKE_USE_DIR}"/CMakeLists.txt <<- _EOF_
+
+		MESSAGE(STATUS "<<< Gentoo configuration >>>
+		Build type      \${CMAKE_BUILD_TYPE}
+		Install path    \${CMAKE_INSTALL_PREFIX}
+		Compiler flags:
+		C               \${CMAKE_C_FLAGS}
+		C++             \${CMAKE_CXX_FLAGS}
+		Linker flags:
+		Executable      \${CMAKE_EXE_LINKER_FLAGS}
+		Module          \${CMAKE_MODULE_LINKER_FLAGS}
+		Shared          \${CMAKE_SHARED_LINKER_FLAGS}\n")
+	_EOF_
+}
+
+enable_cmake-utils_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	_check_build_dir
+
+	# check if CMakeLists.txt exist and if no then die
+	if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then
+		eerror "Unable to locate CMakeLists.txt under:"
+		eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\""
+		eerror "Consider not inheriting the cmake eclass."
+		die "FATAL: Unable to find CMakeLists.txt"
+	fi
+
+	# Remove dangerous things.
+	_modify-cmakelists
+
+	# Fix xdg collision with sandbox
+	export XDG_CONFIG_HOME="${T}"
+
+	# @SEE CMAKE_BUILD_TYPE
+	if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
+		# Handle release builds
+		if ! has debug ${IUSE//+} || ! use debug; then
+			append-cppflags -DNDEBUG
+		fi
+	fi
+
+	# Prepare Gentoo override rules (set valid compiler, append CPPFLAGS)
+	local build_rules=${T}/gentoo_rules.cmake
+	cat > "${build_rules}" <<- _EOF_
+		SET (CMAKE_C_COMPILER $(type -P $(tc-getCC)) CACHE FILEPATH "C compiler" FORCE)
+		SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
+		SET (CMAKE_CXX_COMPILER $(type -P $(tc-getCXX)) CACHE FILEPATH "C++ compiler" FORCE)
+		SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
+	_EOF_
+
+	if use prefix; then
+		cat >> "${build_rules}" <<- _EOF_
+			# in Prefix we need rpath and must ensure cmake gets our default linker path
+			# right ... except for Darwin hosts
+			IF (NOT APPLE)
+			SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
+			SET (CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)"
+			CACHE STRING "" FORCE)
+
+			ELSE ()
+
+			SET(CMAKE_PREFIX_PATH "${EPREFIX}${PREFIX:-/usr}" CACHE STRING ""FORCE)
+			SET(CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE)
+			SET(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
+			SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE CACHE BOOL "" FORCE) 
+			SET(CMAKE_INSTALL_RPATH "${EPREFIX}${PREFIX:-/usr}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE)
+			SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE)
+			SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}${PREFIX:-/usr}/lib" CACHE STRING "" FORCE)
+
+			ENDIF (NOT APPLE)
+		_EOF_
+	fi
+
+	# Common configure parameters (invariants)
+	local common_config=${T}/gentoo_common_config.cmake
+	local libdir=$(get_libdir)
+	cat > "${common_config}" <<- _EOF_
+		SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
+		SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries")
+	_EOF_
+	[[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
+
+	# Convert mycmakeargs to an array, for backwards compatibility
+	# Make the array a local variable since <=portage-2.1.6.x does not
+	# support global arrays (see bug #297255).
+	if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
+		local mycmakeargs_local=(${mycmakeargs})
+	else
+		local mycmakeargs_local=("${mycmakeargs[@]}")
+	fi
+
+	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
+
+	# Common configure parameters (overridable)
+	# NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
+	# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
+	local cmakeargs=(
+		--no-warn-unused-cli
+		-C "${common_config}"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX:-/usr}"
+		"${mycmakeargs_local[@]}"
+		-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
+		-DCMAKE_INSTALL_DO_STRIP=OFF
+		-DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}"
+		"${MYCMAKEARGS}"
+	)
+
+	mkdir -p "${CMAKE_BUILD_DIR}"
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}"
+	echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
+	"${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"
+	popd > /dev/null
+}
+
+enable_cmake-utils_src_compile() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	has src_configure ${CMAKE_EXPF} || cmake-utils_src_configure
+	cmake-utils_src_make "$@"
+}
+
+# @FUNCTION: cmake-utils_src_make
+# @DESCRIPTION:
+# Function for building the package. Automatically detects the build type.
+# All arguments are passed to emake.
+cmake-utils_src_make() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	_check_build_dir
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	# first check if Makefile exist otherwise die
+	[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
+	if [[ -n ${CMAKE_VERBOSE} ]]; then
+		emake VERBOSE=1 "$@" || die "Make failed!"
+	else
+		emake "$@" || die "Make failed!"
+	fi
+	popd > /dev/null
+}
+
+enable_cmake-utils_src_install() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	_check_build_dir
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	base_src_install "$@"
+	popd > /dev/null
+
+	# Backward compatibility, for non-array variables
+	if [[ -n "${DOCS}" ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
+		dodoc ${DOCS} || die "dodoc failed"
+	fi
+	if [[ -n "${HTML_DOCS}" ]] && [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
+		dohtml -r ${HTML_DOCS} || die "dohtml failed"
+	fi
+}
+
+enable_cmake-utils_src_test() {
+	debug-print-function ${FUNCNAME} "$@"
+	local ctestargs
+
+	_check_build_dir
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	[[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; }
+
+	[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
+	ctest ${ctestargs} "$@" || die "Tests failed."
+	popd > /dev/null
+}
+
+# @FUNCTION: cmake-utils_src_configure
+# @DESCRIPTION:
+# General function for configuring with cmake. Default behaviour is to start an
+# out-of-source build.
+cmake-utils_src_configure() {
+	_execute_optionaly "src_configure" "$@"
+}
+
+# @FUNCTION: cmake-utils_src_compile
+# @DESCRIPTION:
+# General function for compiling with cmake. Default behaviour is to check for
+# EAPI and respectively to configure as well or just compile.
+# Automatically detects the build type. All arguments are passed to emake.
+cmake-utils_src_compile() {
+	_execute_optionaly "src_compile" "$@"
+}
+
+# @FUNCTION: cmake-utils_src_install
+# @DESCRIPTION:
+# Function for installing the package. Automatically detects the build type.
+cmake-utils_src_install() {
+	_execute_optionaly "src_install" "$@"
+}
+
+# @FUNCTION: cmake-utils_src_test
+# @DESCRIPTION:
+# Function for testing the package. Automatically detects the build type.
+cmake-utils_src_test() {
+	_execute_optionaly "src_test" "$@"
+}
+
+# Optionally executes phases based on WANT_CMAKE variable/USE flag.
+_execute_optionaly() {
+	local phase="$1" ; shift
+	if [[ ${WANT_CMAKE} = always ]]; then
+		enable_cmake-utils_${phase} "$@"
+	else
+		use ${WANT_CMAKE} && enable_cmake-utils_${phase} "$@"
+	fi
+}



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-07-17 17:53 Andreas Hüttel
  0 siblings, 0 replies; 169+ messages in thread
From: Andreas Hüttel @ 2011-07-17 17:53 UTC (permalink / raw
  To: gentoo-commits

commit:     1e67819a8ac755a1ccd8e78d834227edb6b60fc0
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 17 17:51:40 2011 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 17 17:53:27 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=1e67819a

Same magic for LAPACK

---
 eclass/cmake-utils.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 041b636..20bbf82 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -37,7 +37,7 @@ CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
 # @DESCRIPTION:
 # Space-separated list of CMake modules that will be removed in $S during src_prepare, 
 # in order to force packages to use the system version.
-CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-FindBLAS}"
+CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-FindBLAS FindLAPACK}"
 
 CMAKEDEPEND=""
 case ${WANT_CMAKE} in



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-07-17 18:02 Andreas Hüttel
  0 siblings, 0 replies; 169+ messages in thread
From: Andreas Hüttel @ 2011-07-17 18:02 UTC (permalink / raw
  To: gentoo-commits

commit:     bd658e9f049ad78b19e0c7ee87904f18493eed4f
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 17 18:02:28 2011 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 17 18:02:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=bd658e9f

Move module removal into configure phase (otherwise it might never be called), no src_prepare again

---
 eclass/cmake-utils.eclass |   17 ++---------------
 1 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 20bbf82..4515db1 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -52,7 +52,7 @@ inherit toolchain-funcs multilib flag-o-matic base
 
 CMAKE_EXPF="src_compile src_test src_install"
 case ${EAPI:-0} in
-	4|3|2) CMAKE_EXPF+=" src_prepare src_configure" ;;
+	4|3|2) CMAKE_EXPF+=" src_configure" ;;
 	1|0) ;;
 	*) die "Unknown EAPI, Bug eclass maintainers." ;;
 esac
@@ -274,17 +274,13 @@ _modify-cmakelists() {
 	_EOF_
 }
 
-enable_cmake-utils_src_prepare() {
+enable_cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
 	local name
 	for name in ${CMAKE_REMOVE_MODULES} ; do
 		find "${S}" -name ${name}.cmake -exec rm -v {} +
 	done
-}
-
-enable_cmake-utils_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
 
 	_check_build_dir
 
@@ -387,7 +383,6 @@ enable_cmake-utils_src_configure() {
 enable_cmake-utils_src_compile() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	has src_prepare ${CMAKE_EXPF} || cmake-utils_src_prepare
 	has src_configure ${CMAKE_EXPF} || cmake-utils_src_configure
 	cmake-utils_src_make "$@"
 }
@@ -441,14 +436,6 @@ enable_cmake-utils_src_test() {
 	popd > /dev/null
 }
 
-# @FUNCTION: cmake-utils_src_prepare
-# @DESCRIPTION:
-# General function for configuring with cmake. Default behaviour is to start an
-# out-of-source build.
-cmake-utils_src_prepare() {
-	_execute_optionaly "src_prepare" "$@"
-}
-
 # @FUNCTION: cmake-utils_src_configure
 # @DESCRIPTION:
 # General function for configuring with cmake. Default behaviour is to start an



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-07-17 18:26 Andreas Hüttel
  0 siblings, 0 replies; 169+ messages in thread
From: Andreas Hüttel @ 2011-07-17 18:26 UTC (permalink / raw
  To: gentoo-commits

commit:     c459b2654a9108bd6e2293e164792d205e0a6cf3
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 17 18:25:31 2011 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 17 18:25:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=c459b265

Actually make it possible to disable the module removal

---
 eclass/cmake-utils.eclass |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 4515db1..c33bc33 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -39,6 +39,11 @@ CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
 # in order to force packages to use the system version.
 CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-FindBLAS FindLAPACK}"
 
+# @ECLASS-VARIABLE: CMAKE_REMOVE
+# @DESCRIPTION:
+# Do we want to remove anything? YES or whatever else
+CMAKE_REMOVE="${CMAKE_REMOVE:-YES}"
+
 CMAKEDEPEND=""
 case ${WANT_CMAKE} in
 	always)
@@ -277,10 +282,12 @@ _modify-cmakelists() {
 enable_cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	local name
-	for name in ${CMAKE_REMOVE_MODULES} ; do
-		find "${S}" -name ${name}.cmake -exec rm -v {} +
-	done
+	[[ "${CMAKE_REMOVE}" == "YES" ]] && {
+		local name
+		for name in ${CMAKE_REMOVE_MODULES} ; do
+			find "${S}" -name ${name}.cmake -exec rm -v {} +
+		done
+	}
 
 	_check_build_dir
 



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-07-17 19:55 Andreas Hüttel
  0 siblings, 0 replies; 169+ messages in thread
From: Andreas Hüttel @ 2011-07-17 19:55 UTC (permalink / raw
  To: gentoo-commits

commit:     d5186a4b3323678b0738b3760f6ba0318eec2930
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 17 19:46:20 2011 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 17 19:46:20 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=d5186a4b

Improve variable names

---
 eclass/cmake-utils.eclass |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index c33bc33..f142fdd 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -33,16 +33,16 @@ WANT_CMAKE="${WANT_CMAKE:-always}"
 # Specify the minimum required CMake version.  Default is 2.8.1
 CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
 
-# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES
+# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST
 # @DESCRIPTION:
 # Space-separated list of CMake modules that will be removed in $S during src_prepare, 
 # in order to force packages to use the system version.
-CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-FindBLAS FindLAPACK}"
+CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST:-FindBLAS FindLAPACK}"
 
-# @ECLASS-VARIABLE: CMAKE_REMOVE
+# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES
 # @DESCRIPTION:
-# Do we want to remove anything? YES or whatever else
-CMAKE_REMOVE="${CMAKE_REMOVE:-YES}"
+# Do we want to remove anything? yes or whatever else for no
+CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-yes}"
 
 CMAKEDEPEND=""
 case ${WANT_CMAKE} in
@@ -282,9 +282,9 @@ _modify-cmakelists() {
 enable_cmake-utils_src_configure() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	[[ "${CMAKE_REMOVE}" == "YES" ]] && {
+	[[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] && {
 		local name
-		for name in ${CMAKE_REMOVE_MODULES} ; do
+		for name in ${CMAKE_REMOVE_MODULES_LIST} ; do
 			find "${S}" -name ${name}.cmake -exec rm -v {} +
 		done
 	}



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-07-18  9:09 Andreas Hüttel
  0 siblings, 0 replies; 169+ messages in thread
From: Andreas Hüttel @ 2011-07-18  9:09 UTC (permalink / raw
  To: gentoo-commits

commit:     a7fd57372967535f876a43583f787f82e2d6a8a2
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 18 09:08:49 2011 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Jul 18 09:08:49 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a7fd5737

[eclass] Moved cmake-utils.eclass to main tree

---
 eclass/cmake-utils.eclass |  485 ---------------------------------------------
 1 files changed, 0 insertions(+), 485 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
deleted file mode 100644
index f142fdd..0000000
--- a/eclass/cmake-utils.eclass
+++ /dev/null
@@ -1,485 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.69 2011/06/27 21:11:57 abcd Exp $
-
-# @ECLASS: cmake-utils.eclass
-# @MAINTAINER:
-# kde@gentoo.org
-#
-# @CODE
-# Tomáš Chvátal <scarabeus@gentoo.org>
-# Maciej Mrozowski <reavertm@gentoo.org>
-# (undisclosed contributors)
-# Original author: Zephyrus (zephyrus@mirach.it)
-# @CODE
-# @BLURB: common ebuild functions for cmake-based packages
-# @DESCRIPTION:
-# The cmake-utils eclass is base.eclass(5) wrapper that makes creating ebuilds for
-# cmake-based packages much easier.
-# It provides all inherited features (DOCS, HTML_DOCS, PATCHES) along with out-of-source
-# builds (default), in-source builds and an implementation of the well-known use_enable
-# and use_with functions for CMake.
-
-# @ECLASS-VARIABLE: WANT_CMAKE
-# @DESCRIPTION:
-# Specify if cmake-utils eclass should depend on cmake optionaly or not.
-# This is usefull when only part of aplication is using cmake build system.
-# Valid values are: always [default], optional (where the value is the useflag
-# used for optionality)
-WANT_CMAKE="${WANT_CMAKE:-always}"
-
-# @ECLASS-VARIABLE: CMAKE_MIN_VERSION
-# @DESCRIPTION:
-# Specify the minimum required CMake version.  Default is 2.8.1
-CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.1}"
-
-# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST
-# @DESCRIPTION:
-# Space-separated list of CMake modules that will be removed in $S during src_prepare, 
-# in order to force packages to use the system version.
-CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST:-FindBLAS FindLAPACK}"
-
-# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES
-# @DESCRIPTION:
-# Do we want to remove anything? yes or whatever else for no
-CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-yes}"
-
-CMAKEDEPEND=""
-case ${WANT_CMAKE} in
-	always)
-		;;
-	*)
-		IUSE+=" ${WANT_CMAKE}"
-		CMAKEDEPEND+="${WANT_CMAKE}? ( "
-		;;
-esac
-inherit toolchain-funcs multilib flag-o-matic base
-
-CMAKE_EXPF="src_compile src_test src_install"
-case ${EAPI:-0} in
-	4|3|2) CMAKE_EXPF+=" src_configure" ;;
-	1|0) ;;
-	*) die "Unknown EAPI, Bug eclass maintainers." ;;
-esac
-EXPORT_FUNCTIONS ${CMAKE_EXPF}
-
-: ${DESCRIPTION:="Based on the ${ECLASS} eclass"}
-
-if [[ ${PN} != cmake ]]; then
-	CMAKEDEPEND+=">=dev-util/cmake-${CMAKE_MIN_VERSION}"
-fi
-
-CMAKEDEPEND+=" userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
-
-[[ ${WANT_CMAKE} = always ]] || CMAKEDEPEND+=" )"
-
-DEPEND="${CMAKEDEPEND}"
-unset CMAKEDEPEND
-
-# Internal functions used by cmake-utils_use_*
-_use_me_now() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local uper capitalised x
-	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
-	if [[ ! -z $3 ]]; then
-		# user specified the use name so use it
-		echo "-D$1$3=$(use $2 && echo ON || echo OFF)"
-	else
-		# use all various most used combinations
-		uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
-		capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
-		for x in $2 $uper $capitalised; do
-			echo "-D$1$x=$(use $2 && echo ON || echo OFF) "
-		done
-	fi
-}
-_use_me_now_inverted() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local uper capitalised x
-	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
-	if [[ ! -z $3 ]]; then
-		# user specified the use name so use it
-		echo "-D$1$3=$(use $2 && echo OFF || echo ON)"
-	else
-		# use all various most used combinations
-		uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
-		capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
-		for x in $2 $uper $capitalised; do
-			echo "-D$1$x=$(use $2 && echo OFF || echo ON) "
-		done
-	fi
-}
-
-# @ECLASS-VARIABLE: CMAKE_BUILD_DIR
-# @DESCRIPTION:
-# Build directory where all cmake processed files should be generated.
-# For in-source build it's fixed to ${CMAKE_USE_DIR}.
-# For out-of-source build it can be overriden, by default it uses
-# ${WORKDIR}/${P}_build.
-
-# @ECLASS-VARIABLE: CMAKE_BUILD_TYPE
-# @DESCRIPTION:
-# Set to override default CMAKE_BUILD_TYPE. Only useful for packages
-# known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)".
-# If about to be set - needs to be set before invoking cmake-utils_src_configure.
-# You usualy do *NOT* want nor need to set it as it pulls CMake default build-type
-# specific compiler flags overriding make.conf.
-: ${CMAKE_BUILD_TYPE:=Gentoo}
-
-# @ECLASS-VARIABLE: CMAKE_IN_SOURCE_BUILD
-# @DESCRIPTION:
-# Set to enable in-source build.
-
-# @ECLASS-VARIABLE: CMAKE_USE_DIR
-# @DESCRIPTION:
-# Sets the directory where we are working with cmake.
-# For example when application uses autotools and only one
-# plugin needs to be done by cmake.
-# By default it uses ${S}.
-
-# @ECLASS-VARIABLE: CMAKE_VERBOSE
-# @DESCRIPTION:
-# Set to enable verbose messages during compilation.
-
-# @ECLASS-VARIABLE: PREFIX
-# @DESCRIPTION:
-# Eclass respects PREFIX variable, though it's not recommended way to set
-# install/lib/bin prefixes.
-# Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead.
-
-# @ECLASS-VARIABLE: CMAKE_BINARY
-# @DESCRIPTION:
-# Eclass can use different cmake binary than the one provided in by system.
-: ${CMAKE_BINARY:=cmake}
-
-# Determine using IN or OUT source build
-_check_build_dir() {
-	: ${CMAKE_USE_DIR:=${S}}
-	if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
-		# we build in source dir
-		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
-	else
-		: ${CMAKE_BUILD_DIR:=${WORKDIR}/${P}_build}
-	fi
-	echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
-}
-# @FUNCTION: cmake-utils_use_with
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_with. See ebuild(5).
-#
-# `cmake-utils_use_with foo FOO` echoes -DWITH_FOO=ON if foo is enabled
-# and -DWITH_FOO=OFF if it is disabled.
-cmake-utils_use_with() { _use_me_now WITH_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_enable
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use_enable foo FOO` echoes -DENABLE_FOO=ON if foo is enabled
-# and -DENABLE_FOO=OFF if it is disabled.
-cmake-utils_use_enable() { _use_me_now ENABLE_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_disable
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on inversion of use_enable. See ebuild(5).
-#
-# `cmake-utils_use_enable foo FOO` echoes -DDISABLE_FOO=OFF if foo is enabled
-# and -DDISABLE_FOO=ON if it is disabled.
-cmake-utils_use_disable() { _use_me_now_inverted DISABLE_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_no
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_disable. See ebuild(5).
-#
-# `cmake-utils_use_no foo FOO` echoes -DNO_FOO=OFF if foo is enabled
-# and -DNO_FOO=ON if it is disabled.
-cmake-utils_use_no() { _use_me_now_inverted NO_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_want
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use_want foo FOO` echoes -DWANT_FOO=ON if foo is enabled
-# and -DWANT_FOO=OFF if it is disabled.
-cmake-utils_use_want() { _use_me_now WANT_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_build
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use_build foo FOO` echoes -DBUILD_FOO=ON if foo is enabled
-# and -DBUILD_FOO=OFF if it is disabled.
-cmake-utils_use_build() { _use_me_now BUILD_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_has
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
-# and -DHAVE_FOO=OFF if it is disabled.
-cmake-utils_use_has() { _use_me_now HAVE_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_use
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use_use foo FOO` echoes -DUSE_FOO=ON if foo is enabled
-# and -DUSE_FOO=OFF if it is disabled.
-cmake-utils_use_use() { _use_me_now USE_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use foo FOO` echoes -DFOO=ON if foo is enabled
-# and -DFOO=OFF if it is disabled.
-cmake-utils_use() { _use_me_now "" "$@" ; }
-
-# Internal function for modifying hardcoded definitions.
-# Removes dangerous definitions that override Gentoo settings.
-_modify-cmakelists() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	# Only edit the files once
-	grep -qs "<<< Gentoo configuration >>>" CMakeLists.txt && return 0
-
-	# Comment out all set (<some_should_be_user_defined_variable> value)
-	# TODO Add QA checker - inform when variable being checked for below is set in CMakeLists.txt
-	find "${CMAKE_USE_DIR}" -name CMakeLists.txt \
-		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE.*)/{s/^/#IGNORE /g}' {} + \
-		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_COLOR_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \
-		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX.*)/{s/^/#IGNORE /g}' {} + \
-		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \
-		|| die "${LINENO}: failed to disable hardcoded settings"
-
-	# NOTE Append some useful summary here
-	cat >> "${CMAKE_USE_DIR}"/CMakeLists.txt <<- _EOF_
-
-		MESSAGE(STATUS "<<< Gentoo configuration >>>
-		Build type      \${CMAKE_BUILD_TYPE}
-		Install path    \${CMAKE_INSTALL_PREFIX}
-		Compiler flags:
-		C               \${CMAKE_C_FLAGS}
-		C++             \${CMAKE_CXX_FLAGS}
-		Linker flags:
-		Executable      \${CMAKE_EXE_LINKER_FLAGS}
-		Module          \${CMAKE_MODULE_LINKER_FLAGS}
-		Shared          \${CMAKE_SHARED_LINKER_FLAGS}\n")
-	_EOF_
-}
-
-enable_cmake-utils_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	[[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] && {
-		local name
-		for name in ${CMAKE_REMOVE_MODULES_LIST} ; do
-			find "${S}" -name ${name}.cmake -exec rm -v {} +
-		done
-	}
-
-	_check_build_dir
-
-	# check if CMakeLists.txt exist and if no then die
-	if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then
-		eerror "Unable to locate CMakeLists.txt under:"
-		eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\""
-		eerror "Consider not inheriting the cmake eclass."
-		die "FATAL: Unable to find CMakeLists.txt"
-	fi
-
-	# Remove dangerous things.
-	_modify-cmakelists
-
-	# Fix xdg collision with sandbox
-	export XDG_CONFIG_HOME="${T}"
-
-	# @SEE CMAKE_BUILD_TYPE
-	if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
-		# Handle release builds
-		if ! has debug ${IUSE//+} || ! use debug; then
-			append-cppflags -DNDEBUG
-		fi
-	fi
-
-	# Prepare Gentoo override rules (set valid compiler, append CPPFLAGS)
-	local build_rules=${T}/gentoo_rules.cmake
-	cat > "${build_rules}" <<- _EOF_
-		SET (CMAKE_C_COMPILER $(type -P $(tc-getCC)) CACHE FILEPATH "C compiler" FORCE)
-		SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
-		SET (CMAKE_CXX_COMPILER $(type -P $(tc-getCXX)) CACHE FILEPATH "C++ compiler" FORCE)
-		SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
-	_EOF_
-
-	if use prefix; then
-		cat >> "${build_rules}" <<- _EOF_
-			# in Prefix we need rpath and must ensure cmake gets our default linker path
-			# right ... except for Darwin hosts
-			IF (NOT APPLE)
-			SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
-			SET (CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)"
-			CACHE STRING "" FORCE)
-
-			ELSE ()
-
-			SET(CMAKE_PREFIX_PATH "${EPREFIX}${PREFIX:-/usr}" CACHE STRING ""FORCE)
-			SET(CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE)
-			SET(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
-			SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE CACHE BOOL "" FORCE) 
-			SET(CMAKE_INSTALL_RPATH "${EPREFIX}${PREFIX:-/usr}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE)
-			SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE)
-			SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}${PREFIX:-/usr}/lib" CACHE STRING "" FORCE)
-
-			ENDIF (NOT APPLE)
-		_EOF_
-	fi
-
-	# Common configure parameters (invariants)
-	local common_config=${T}/gentoo_common_config.cmake
-	local libdir=$(get_libdir)
-	cat > "${common_config}" <<- _EOF_
-		SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
-		SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries")
-	_EOF_
-	[[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
-
-	# Convert mycmakeargs to an array, for backwards compatibility
-	# Make the array a local variable since <=portage-2.1.6.x does not
-	# support global arrays (see bug #297255).
-	if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
-		local mycmakeargs_local=(${mycmakeargs})
-	else
-		local mycmakeargs_local=("${mycmakeargs[@]}")
-	fi
-
-	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
-
-	# Common configure parameters (overridable)
-	# NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
-	# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
-	local cmakeargs=(
-		--no-warn-unused-cli
-		-C "${common_config}"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX:-/usr}"
-		"${mycmakeargs_local[@]}"
-		-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
-		-DCMAKE_INSTALL_DO_STRIP=OFF
-		-DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}"
-		"${MYCMAKEARGS}"
-	)
-
-	mkdir -p "${CMAKE_BUILD_DIR}"
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}"
-	echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
-	"${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"
-	popd > /dev/null
-}
-
-enable_cmake-utils_src_compile() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	has src_configure ${CMAKE_EXPF} || cmake-utils_src_configure
-	cmake-utils_src_make "$@"
-}
-
-# @FUNCTION: cmake-utils_src_make
-# @DESCRIPTION:
-# Function for building the package. Automatically detects the build type.
-# All arguments are passed to emake.
-cmake-utils_src_make() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	# first check if Makefile exist otherwise die
-	[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
-	if [[ -n ${CMAKE_VERBOSE} ]]; then
-		emake VERBOSE=1 "$@" || die "Make failed!"
-	else
-		emake "$@" || die "Make failed!"
-	fi
-	popd > /dev/null
-}
-
-enable_cmake-utils_src_install() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	base_src_install "$@"
-	popd > /dev/null
-
-	# Backward compatibility, for non-array variables
-	if [[ -n "${DOCS}" ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
-		dodoc ${DOCS} || die "dodoc failed"
-	fi
-	if [[ -n "${HTML_DOCS}" ]] && [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
-		dohtml -r ${HTML_DOCS} || die "dohtml failed"
-	fi
-}
-
-enable_cmake-utils_src_test() {
-	debug-print-function ${FUNCNAME} "$@"
-	local ctestargs
-
-	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	[[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; }
-
-	[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
-	ctest ${ctestargs} "$@" || die "Tests failed."
-	popd > /dev/null
-}
-
-# @FUNCTION: cmake-utils_src_configure
-# @DESCRIPTION:
-# General function for configuring with cmake. Default behaviour is to start an
-# out-of-source build.
-cmake-utils_src_configure() {
-	_execute_optionaly "src_configure" "$@"
-}
-
-# @FUNCTION: cmake-utils_src_compile
-# @DESCRIPTION:
-# General function for compiling with cmake. Default behaviour is to check for
-# EAPI and respectively to configure as well or just compile.
-# Automatically detects the build type. All arguments are passed to emake.
-cmake-utils_src_compile() {
-	_execute_optionaly "src_compile" "$@"
-}
-
-# @FUNCTION: cmake-utils_src_install
-# @DESCRIPTION:
-# Function for installing the package. Automatically detects the build type.
-cmake-utils_src_install() {
-	_execute_optionaly "src_install" "$@"
-}
-
-# @FUNCTION: cmake-utils_src_test
-# @DESCRIPTION:
-# Function for testing the package. Automatically detects the build type.
-cmake-utils_src_test() {
-	_execute_optionaly "src_test" "$@"
-}
-
-# Optionally executes phases based on WANT_CMAKE variable/USE flag.
-_execute_optionaly() {
-	local phase="$1" ; shift
-	if [[ ${WANT_CMAKE} = always ]]; then
-		enable_cmake-utils_${phase} "$@"
-	else
-		use ${WANT_CMAKE} && enable_cmake-utils_${phase} "$@"
-	fi
-}



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-08-03 23:55 Andrea Arteaga
  0 siblings, 0 replies; 169+ messages in thread
From: Andrea Arteaga @ 2011-08-03 23:55 UTC (permalink / raw
  To: gentoo-commits

commit:     9e277ac959b3cbd1e63591111780d74f92632c1c
Author:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Wed Aug  3 23:54:28 2011 +0000
Commit:     Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Wed Aug  3 23:54:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=9e277ac9

alternatives-2 imported from bicatali and intel-sdp corrected

---
 eclass/alternatives-2.eclass |  157 ++++++++++++++++++++++++++++++++++++++++++
 eclass/intel-sdp.eclass      |    2 +-
 2 files changed, 158 insertions(+), 1 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
new file mode 100644
index 0000000..bbbe6e0
--- /dev/null
+++ b/eclass/alternatives-2.eclass
@@ -0,0 +1,157 @@
+# Copyright 2008, 2009 Bo Ørsted Andresen
+# Copyright 2008, 2009 Mike Kelly
+# Copyright 2009 David Leverton
+# 2010: Adapted for Gentoo by Sebastien Fabbro, who does not like copyrights
+# Distributed under the terms of the GNU General Public License v2
+
+# If your package provides pkg_postinst or pkg_prerm phases, you need to be
+# sure you explicitly run alternatives_pkg_{postinst,prerm} where appropriate.
+
+ALTERNATIVES_DIR="/etc/env.d/alternatives"
+
+DEPEND=">=app-admin/eselect-1.2.15-r1"
+RDEPEND="${DEPEND}
+	!app-admin/eselect-blas
+	!app-admin/eselect-cblas
+	!app-admin/eselect-lapack"
+
+# alternatives_for alternative provider importance source target [ source target [...]]
+alternatives_for() {
+	#echo alternatives_for "${@}"
+
+	(( $# >= 5 )) && (( ($#-3)%2 == 0)) || die "${FUNCNAME} requires exactly 3+N*2 arguments where N>=1"
+	local x dupl alternative=${1} provider=${2} importance=${3} index unique src target ret=0
+	shift 3
+
+	# make sure importance is a signed integer
+	if [[ -n ${importance} ]] && ! [[ ${importance} =~ ^[0-9]+(\.[0-9]+)*$ ]]; then
+		eerror "Invalid importance (${importance}) detected"
+		((ret++))
+	fi
+
+	[[ -d "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}" ]] || dodir "${ALTERNATIVES_DIR}/${alternative}/${provider}"
+
+	# keep track of provided alternatives for use in pkg_{postinst,prerm}. keep a mapping between importance and
+	# provided alternatives and make sure the former is set to only one value
+	if ! has "${alternative}:${provider}" "${ALTERNATIVES_PROVIDED[@]}"; then
+		index=${#ALTERNATIVES_PROVIDED[@]}
+		ALTERNATIVES_PROVIDED+=( "${alternative}:${provider}" )
+		ALTERNATIVES_IMPORTANCE[index]=${importance}
+		[[ -n ${importance} ]] && echo "${importance}" > "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}/_importance"
+	else
+		for((index=0;index<${#ALTERNATIVES_PROVIDED[@]};index++)); do
+			if [[ ${alternative}:${provider} == ${ALTERNATIVES_PROVIDED[index]} ]]; then
+				if [[ -n ${ALTERNATIVES_IMPORTANCE[index]} ]]; then
+					if [[ -n ${importance} && ${ALTERNATIVES_IMPORTANCE[index]} != ${importance} ]]; then
+						eerror "Differing importance (${ALTERNATIVES_IMPORTANCE[index]} != ${importance}) detected"
+						((ret++))
+					fi
+				else
+					ALTERNATIVES_IMPORTANCE[index]=${importance}
+					[[ -n ${importance} ]] && echo "${importance}" > "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}/_importance"
+				fi
+			fi
+		done
+	fi
+
+	while (( $# >= 2 )); do
+		src=${1//+(\/)/\/}; target=${2//+(\/)/\/}
+		if [[ ${src} != /* ]]; then
+			eerror "Source path must be absolute, but got ${src}"
+			((ret++))
+
+		else
+			local reltarget= dir=${ALTERNATIVES_DIR}/${alternative}/${provider}${src%/*}
+			while [[ -n ${dir} ]]; do
+				reltarget+=../
+				dir=${dir%/*}
+			done
+
+			reltarget=${reltarget%/}
+			[[ ${target} == /* ]] || reltarget+=${src%/*}/
+			reltarget+=${target}
+			dodir "${ALTERNATIVES_DIR}/${alternative}/${provider}${src%/*}"
+			dosym "${reltarget}" "${ALTERNATIVES_DIR}/${alternative}/${provider}${src}"
+
+			# say ${ED}/sbin/init exists and links to /bin/systemd (which doesn't exist yet)
+			# the -e test will fail, so check for -L also
+			if [[ -e ${ED}${src} || -L ${ED}${src} ]]; then
+				local fulltarget=${target}
+				[[ ${fulltarget} != /* ]] && fulltarget=${src%/*}/${fulltarget}
+				if [[ -e ${ED}${fulltarget} || -L ${ED}${fulltarget} ]]; then
+					die "${src} defined as provider for ${fulltarget}, but both already exist in \${ED}"
+				else
+					mv "${ED}${src}" "${ED}${fulltarget}" || die
+				fi
+			fi
+		fi
+		shift 2
+	done
+
+	[[ ${ret} -eq 0 ]] || die "Errors detected for ${provider}, provided for ${alternative}"
+}
+
+cleanup_old_alternatives_module() {
+	local alt=${1} old_module="${EROOT}/usr/share/eselect/modules/${alt}.eselect"
+	if [[ -f "${old_module}" && "$(source "${old_module}" &>/dev/null; echo "${ALTERNATIVE}")" == "${alt}" ]]; then
+		local version="$(source "${old_module}" &>/dev/null; echo "${VERSION}")"
+		if [[ "${version}" == "0.1" || "${version}" == "20080924" ]]; then
+			echo rm "${old_module}"
+			rm "${old_module}" || eerror "rm ${old_module} failed"
+		fi
+	fi
+}
+
+alternatives-2_pkg_postinst() {
+	local a alt provider module_version="20090908"
+	for a in "${ALTERNATIVES_PROVIDED[@]}"; do
+		alt="${a%:*}"
+		provider="${a#*:}"
+		if [[ ! -f "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect" \
+			|| "$(source "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect" &>/dev/null; echo "${VERSION}")" \
+				-ne "${module_version}" ]]; then
+			#einfo "Creating alternatives module for ${alt}"
+			if [[ ! -d ${EROOT}/usr/share/eselect/modules/auto ]]; then
+				install -d "${EROOT}"/usr/share/eselect/modules/auto || eerror "Could not create eselect modules dir"
+			fi
+			cat > "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect" <<-EOF
+				# This module was automatically generated by alternatives.eclass
+				DESCRIPTION="Alternatives for ${alt}"
+				VERSION="${module_version}"
+				MAINTAINER="eselect@gentoo.org"
+				ESELECT_MODULE_GROUP="Alternatives"
+
+				ALTERNATIVE="${alt}"
+
+				inherit alternatives
+			EOF
+		fi
+
+		#echo eselect "${alt}" update "${provider}"
+		einfo "Creating ${provider} alternative module for ${alt}"
+		eselect "${alt}" update "${provider}"
+
+		cleanup_old_alternatives_module ${alt}
+	done
+}
+
+alternatives-2_pkg_prerm() {
+	local a alt provider p ignore
+	[[ -n ${REPLACED_BY_ID} ]] || ignore=" --ignore"
+	for a in "${ALTERNATIVES_PROVIDED[@]}"; do
+		alt="${a%:*}"
+		provider="${a#*:}"
+		#echo "Making sure ${alt} has a valid provider"
+		#echo eselect "${alt}" update${ignore} "${provider}"
+		eselect "${alt}" update${ignore} "${provider}" && continue
+		einfo "Removed ${provider} alternative module for ${alt}, current is $(eselect ${alt} show)"
+		if [[ $? -eq 2 ]]; then
+			einfo "Cleaning up unused alternatives module for ${alt}"
+			echo rm "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect"
+			rm "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect" ||
+				eerror rm "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect" failed
+		fi
+	done
+}
+
+EXPORT_FUNCTIONS pkg_postinst pkg_prerm

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index be74bd1..6759185 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -64,7 +64,7 @@ intel-sdp_pkg_setup() {
 	elif use amd64; then
 		arch=x86_64
 		INTEL_ARCH="intel64"
-		if use multilib; then
+		if has_multilib_profile; then
 			arch="x86_64 ${INTEL_X86:-i486}"
 			INTEL_ARCH="intel64 ia32"
 		fi



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-10-05  7:54 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-10-05  7:54 UTC (permalink / raw
  To: gentoo-commits

commit:     039749a63afb43e4e9af6b30bbb3ee235c51cd58
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 19 21:16:18 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Sep 19 21:16:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=039749a6

Download tarballs with package revision

---
 eclass/emboss.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/emboss.eclass b/eclass/emboss.eclass
index 0431579..f8aab54 100644
--- a/eclass/emboss.eclass
+++ b/eclass/emboss.eclass
@@ -80,7 +80,7 @@ if [[ ${PN} == embassy-* ]]; then
 	EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
 	: ${EBO_DESCRIPTION:=${EN}}
 	DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
-	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EN}-${PV}.tar.gz"
+	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EN}-${PVR}.tar.gz"
 	DEPEND+=" >=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
 
 	S="${WORKDIR}"/${EF}



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-10-23 21:53 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-10-23 21:53 UTC (permalink / raw
  To: gentoo-commits

commit:     03fe01b9f5b1d65feccc0b9cce75e2dd8a59337b
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 23 21:45:06 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Oct 23 21:45:06 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=03fe01b9

Fixed usage of check_reqs.eclass

---
 eclass/intel-sdp.eclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 6759185..5ab68a8 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -37,7 +37,8 @@ INTEL_PV3=$(get_version_component_range 3)
 INTEL_PV4=$(get_version_component_range 4)
 INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
 
-SRC_URI="amd64? ( multilib? ( ${INTEL_URI}_${INTEL_DPV}.tgz ) )
+SRC_URI="
+	amd64? ( multilib? ( ${INTEL_URI}_${INTEL_DPV}.tgz ) )
 	amd64? ( !multilib? ( ${INTEL_URI}_${INTEL_DPV}_intel64.tgz ) )
 	x86?  ( ${INTEL_URI}_${INTEL_DPV}_ia32.tgz )"
 
@@ -79,7 +80,7 @@ intel-sdp_pkg_setup() {
 		INTEL_RPMS="${INTEL_RPMS} intel-${p}-${INTEL_PV4}-${INTEL_PV1}.${INTEL_PV2}-${INTEL_PV3}.noarch.rpm"
 	done
 	[[ -z ${CHECKREQS_DISK_BUILD} ]] && CHECKREQS_DISK_BUILD=256
-	check_reqs
+	check_reqs_pkg_setup
 }
 
 intel-sdp_src_unpack() {



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-10-23 21:53 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-10-23 21:53 UTC (permalink / raw
  To: gentoo-commits

commit:     1443c615a76f5bca8703693fe8f670a3e9857915
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 23 21:48:47 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Oct 23 21:48:47 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=1443c615

fixed typo

---
 eclass/intel-sdp.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 5ab68a8..23bc00a 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -80,7 +80,7 @@ intel-sdp_pkg_setup() {
 		INTEL_RPMS="${INTEL_RPMS} intel-${p}-${INTEL_PV4}-${INTEL_PV1}.${INTEL_PV2}-${INTEL_PV3}.noarch.rpm"
 	done
 	[[ -z ${CHECKREQS_DISK_BUILD} ]] && CHECKREQS_DISK_BUILD=256
-	check_reqs_pkg_setup
+	check-reqs_pkg_setup
 }
 
 intel-sdp_src_unpack() {



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2011-10-25 17:16 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2011-10-25 17:16 UTC (permalink / raw
  To: gentoo-commits

commit:     e6e0b71474c052c20da23c4d5ca1e253a742dc0d
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 25 12:19:21 2011 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Oct 25 12:19:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e6e0b714

fix usage of check-reqs.eclass
Adopt changes in new intel tarball

---
 eclass/intel-sdp.eclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 23bc00a..7b03379 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -52,6 +52,7 @@ RESTRICT="mirror"
 RDEPEND=""
 DEPEND=">=app-arch/rpm2targz-9.0.0.3g"
 INTEL_SDP_YEAR=${INTEL_DPV%_update*}
+INTEL_SDP_YEAR=${INTEL_DPV%_sp*}
 INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${INTEL_SDP_YEAR:-${INTEL_PV1}}.${INTEL_PV3}.${INTEL_PV4}"
 INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
 
@@ -79,7 +80,7 @@ intel-sdp_pkg_setup() {
 	for p in ${INTEL_DAT_RPMS}; do
 		INTEL_RPMS="${INTEL_RPMS} intel-${p}-${INTEL_PV4}-${INTEL_PV1}.${INTEL_PV2}-${INTEL_PV3}.noarch.rpm"
 	done
-	[[ -z ${CHECKREQS_DISK_BUILD} ]] && CHECKREQS_DISK_BUILD=256
+	[[ -z ${CHECKREQS_DISK_BUILD} ]] && CHECKREQS_DISK_BUILD=256M
 	check-reqs_pkg_setup
 }
 
@@ -100,6 +101,7 @@ intel-sdp_src_unpack() {
 			mv ${l} opt/intel/ || die "failed moving extract log file"
 		done
 	done
+	mv -v opt/intel/* ${INTEL_SDP_DIR} || die "Correction of INTEL_SDP_DIR failed"
 }
 
 intel_link_eclipse_plugins() {



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-01-31 18:15 Sebastien Fabbro
  0 siblings, 0 replies; 169+ messages in thread
From: Sebastien Fabbro @ 2012-01-31 18:15 UTC (permalink / raw
  To: gentoo-commits

commit:     c43e7530b1b12632c7ec4f73db3a674136ef3e34
Author:     Sébastien Fabbro <sebfabbro <AT> gmail <DOT> com>
AuthorDate: Tue Jan 31 16:36:50 2012 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Tue Jan 31 16:36:50 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=c43e7530

updated eselect dependency

---
 eclass/alternatives-2.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index d39a4af..1180c24 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -9,7 +9,7 @@
 
 ALTERNATIVES_DIR="/etc/env.d/alternatives"
 
-DEPEND=">=app-admin/eselect-1.2.16-r1"
+DEPEND=">=app-admin/eselect-1.3-r1"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-02-16 22:35 Sebastien Fabbro
  0 siblings, 0 replies; 169+ messages in thread
From: Sebastien Fabbro @ 2012-02-16 22:35 UTC (permalink / raw
  To: gentoo-commits

commit:     2ed5df40d51f981370e638e15e794a775a41dcb1
Author:     Sébastien Fabbro <sebfabbro <AT> gmail <DOT> com>
AuthorDate: Thu Feb 16 22:35:38 2012 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Thu Feb 16 22:35:38 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=2ed5df40

eapi4 goodness

---
 eclass/intel-sdp.eclass |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 7b03379..1d986b1 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -58,6 +58,11 @@ INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
 
 S="${WORKDIR}"
 
+intel-sdp_pkg_pretend() {
+	: ${CHECKREQS_DISK_BUILD:=256M}
+	check-reqs_pkg_pretend
+}
+
 intel-sdp_pkg_setup() {
 	local arch a p
 	if use x86; then
@@ -80,8 +85,10 @@ intel-sdp_pkg_setup() {
 	for p in ${INTEL_DAT_RPMS}; do
 		INTEL_RPMS="${INTEL_RPMS} intel-${p}-${INTEL_PV4}-${INTEL_PV1}.${INTEL_PV2}-${INTEL_PV3}.noarch.rpm"
 	done
-	[[ -z ${CHECKREQS_DISK_BUILD} ]] && CHECKREQS_DISK_BUILD=256M
-	check-reqs_pkg_setup
+
+	case "${EAPI:-0}" in
+		0|1|2|3) intel-sdp_pkg_pretend ;;
+	esac
 }
 
 intel-sdp_src_unpack() {
@@ -96,12 +103,12 @@ intel-sdp_src_unpack() {
 			l=.${r}_$(date +'%d%m%y_%H%M%S').log
 			tar xf "${DISTDIR}"/${t} \
 				${rpmdir}/${r} || die "extracting ${r} failed"
-			rpm2tar -O "./${rpmdir}/${r}" | tar xvf - \
-				| sed -e "s:^\.:${EROOT#/}:g" > ${l} || die "failure unpacking ${r}"
+			rpm2tar -O "./${rpmdir}/${r}" | tar xvf - | sed -e \
+				"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
 			mv ${l} opt/intel/ || die "failed moving extract log file"
 		done
 	done
-	mv -v opt/intel/* ${INTEL_SDP_DIR} || die "Correction of INTEL_SDP_DIR failed"
+	mv -v opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
 }
 
 intel_link_eclipse_plugins() {
@@ -163,3 +170,8 @@ intel-sdp_pkg_postrm() {
 }
 
 EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm
+case "${EAPI:-0}" in
+	0|1|2|3) ;;
+	4) EXPORT_FUNCTIONS pkg_pretend ;;
+	*) die "EAPI=${EAPI} is not supported" ;;
+esac



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-04-27 11:42 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-04-27 11:42 UTC (permalink / raw
  To: gentoo-commits

commit:     a0859cc9d2cdaa0d14f8f5b3ef84345f76bb9ab6
Author:     Nicolas Bigaouette <nbigaouette <AT> gmail <DOT> com>
AuthorDate: Wed Apr 25 18:23:53 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Apr 25 19:05:37 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a0859cc9

Don't hardcode "rpm" as being the archive subdirectory where RPMs are to be found. Instead, define "INTEL_RPMS_DIRS" in the ebuild and loop over searching for the RPM. If unset, defaults to "rpm".

---
 eclass/intel-sdp.eclass |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 932466b..7271b30 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -29,6 +29,11 @@
 # @DESCRIPTION: the package sub-directory where it will end-up in /opt/intel
 # To find out its value, you have to do a raw install from the Intel tar ball
 
+# @ECLASS-VARIABLE: INTEL_RPMS_DIRS
+# @DEFAULT_UNSET
+# @DESCRIPTION: a list of subdirectories in the main archive which contains the
+# rpms to extract.
+
 inherit versionator check-reqs multilib
 
 INTEL_PV1=$(get_version_component_range 1)
@@ -97,15 +102,20 @@ intel-sdp_src_unpack() {
 		# TODO: need to find a fast way to find the rpmdir
 		# in some cases rpms are in rpms/, in other cases in rpm/
 		# tar tvf is too slow for 1.4G tar balls
-		rpmdir=${t%%.*}/rpm
 		for r in ${INTEL_RPMS}; do
-			einfo "Unpacking ${r}"
-			l=.${r}_$(date +'%d%m%y_%H%M%S').log
-			tar xf "${DISTDIR}"/${t} \
-				${rpmdir}/${r} || die "extracting ${r} failed"
-			rpm2tar -O "./${rpmdir}/${r}" | tar xvf - | sed -e \
-				"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
-			mv ${l} opt/intel/ || die "failed moving extract log file"
+			# Find which subdirectory of the archive the rpm is in
+			rpm_found="false"
+			for subdir in ${INTEL_RPMS_DIRS:-rpm}; do
+				[[ "${rpm_found}" == "true" ]] && continue
+				rpmdir=${t%%.*}/${subdir}
+				l=.${r}_$(date +'%d%m%y_%H%M%S').log
+				tar xf "${DISTDIR}"/${t} ${rpmdir}/${r} 2> /dev/null || continue
+				einfo "Unpacking ${r}"
+				rpm_found="true"
+				rpm2tar -O "./${rpmdir}/${r}" | tar xvf - | sed -e \
+					"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
+				mv ${l} opt/intel/ || die "failed moving extract log file"
+			done
 		done
 	done
 	mv -v opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-04-27 11:42 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-04-27 11:42 UTC (permalink / raw
  To: gentoo-commits

commit:     13ea9a44e5db8412c10fd40387c4cd4b17b79633
Author:     Nicolas Bigaouette <nbigaouette <AT> gmail <DOT> com>
AuthorDate: Wed Apr 25 18:20:03 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Apr 25 19:05:33 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=13ea9a44

Matching the archive for ".tgz" specifically breaks VTune which has .tar.gz as archive. Instead, remove everything after the first dot (the .tar.gz or .tgz part).

---
 eclass/intel-sdp.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 1d986b1..932466b 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -97,7 +97,7 @@ intel-sdp_src_unpack() {
 		# TODO: need to find a fast way to find the rpmdir
 		# in some cases rpms are in rpms/, in other cases in rpm/
 		# tar tvf is too slow for 1.4G tar balls
-		rpmdir=${t%.tgz}/rpm
+		rpmdir=${t%%.*}/rpm
 		for r in ${INTEL_RPMS}; do
 			einfo "Unpacking ${r}"
 			l=.${r}_$(date +'%d%m%y_%H%M%S').log



^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-07-27 22:10 Sebastien Fabbro
  0 siblings, 0 replies; 169+ messages in thread
From: Sebastien Fabbro @ 2012-07-27 22:10 UTC (permalink / raw
  To: gentoo-commits

commit:     9864e32af6eda42549e952827c4eb28a07063030
Author:     Sebastien Fabbro <sfabbro <AT> uvic <DOT> ca>
AuthorDate: Fri Jul 27 22:10:13 2012 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Fri Jul 27 22:10:13 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=9864e32a

updated min eselect version

---
 eclass/alternatives-2.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 1180c24..b303694 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -9,7 +9,7 @@
 
 ALTERNATIVES_DIR="/etc/env.d/alternatives"
 
-DEPEND=">=app-admin/eselect-1.3-r1"
+DEPEND=">=app-admin/eselect-1.3.1-r1"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-08-09  5:15 Christoph Junghans
  0 siblings, 0 replies; 169+ messages in thread
From: Christoph Junghans @ 2012-08-09  5:15 UTC (permalink / raw
  To: gentoo-commits

commit:     441ca2f5cf8995f75163f286035d3494695dafd9
Author:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  9 05:13:00 2012 +0000
Commit:     Christoph Junghans <kleiner_otti <AT> gmx <DOT> de>
CommitDate: Thu Aug  9 05:15:35 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=441ca2f5

cmake-utils.eclass: added ninja support

---
 eclass/cmake-utils.eclass |  530 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 530 insertions(+), 0 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
new file mode 100644
index 0000000..4ab36d1
--- /dev/null
+++ b/eclass/cmake-utils.eclass
@@ -0,0 +1,530 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.79 2012/05/08 21:27:10 dilfridge Exp $
+
+# @ECLASS: cmake-utils.eclass
+# @MAINTAINER:
+# kde@gentoo.org
+# @AUTHOR:
+# Tomáš Chvátal <scarabeus@gentoo.org>
+# Maciej Mrozowski <reavertm@gentoo.org>
+# (undisclosed contributors)
+# Original author: Zephyrus (zephyrus@mirach.it)
+# @BLURB: common ebuild functions for cmake-based packages
+# @DESCRIPTION:
+# The cmake-utils eclass is base.eclass(5) wrapper that makes creating ebuilds for
+# cmake-based packages much easier.
+# It provides all inherited features (DOCS, HTML_DOCS, PATCHES) along with out-of-source
+# builds (default), in-source builds and an implementation of the well-known use_enable
+# and use_with functions for CMake.
+
+# @ECLASS-VARIABLE: WANT_CMAKE
+# @DESCRIPTION:
+# Specify if cmake-utils eclass should depend on cmake optionaly or not.
+# This is usefull when only part of aplication is using cmake build system.
+# Valid values are: always [default], optional (where the value is the useflag
+# used for optionality)
+WANT_CMAKE="${WANT_CMAKE:-always}"
+
+# @ECLASS-VARIABLE: CMAKE_MIN_VERSION
+# @DESCRIPTION:
+# Specify the minimum required CMake version.  Default is 2.8.4
+CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.4}"
+
+# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST
+# @DESCRIPTION:
+# Space-separated list of CMake modules that will be removed in $S during src_prepare,
+# in order to force packages to use the system version.
+CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST:-FindBLAS FindLAPACK}"
+
+# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES
+# @DESCRIPTION:
+# Do we want to remove anything? yes or whatever else for no
+CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-yes}"
+
+# @ECLASS-VARIABLE: CMAKE_MAKEFILE_GENERATOR
+# @DESCRIPTION:
+# Specify a makefile generator to be used by cmake. At this point only "make"
+# and "ninja" is supported.
+CMAKE_MAKEFILE_GENERATOR="${CMAKE_MAKEFILE_GENERATOR:-make}"
+
+CMAKEDEPEND=""
+case ${WANT_CMAKE} in
+	always)
+		;;
+	*)
+		IUSE+=" ${WANT_CMAKE}"
+		CMAKEDEPEND+="${WANT_CMAKE}? ( "
+		;;
+esac
+inherit toolchain-funcs multilib flag-o-matic base
+
+CMAKE_EXPF="src_compile src_test src_install"
+case ${EAPI:-0} in
+	4|3|2) CMAKE_EXPF+=" src_configure" ;;
+	1|0) ;;
+	*) die "Unknown EAPI, Bug eclass maintainers." ;;
+esac
+EXPORT_FUNCTIONS ${CMAKE_EXPF}
+
+: ${DESCRIPTION:="Based on the ${ECLASS} eclass"}
+
+if [[ ${PN} != cmake ]]; then
+	CMAKEDEPEND+=" >=dev-util/cmake-${CMAKE_MIN_VERSION}"
+fi
+
+CMAKEDEPEND+=" userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
+
+[[ ${WANT_CMAKE} = always ]] || CMAKEDEPEND+=" )"
+
+DEPEND="${CMAKEDEPEND}"
+unset CMAKEDEPEND
+
+# Internal functions used by cmake-utils_use_*
+_use_me_now() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local uper capitalised x
+	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
+	if [[ ! -z $3 ]]; then
+		# user specified the use name so use it
+		echo "-D$1$3=$(use $2 && echo ON || echo OFF)"
+	else
+		# use all various most used combinations
+		uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
+		capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
+		for x in $2 $uper $capitalised; do
+			echo "-D$1$x=$(use $2 && echo ON || echo OFF) "
+		done
+	fi
+}
+_use_me_now_inverted() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local uper capitalised x
+	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
+	if [[ ! -z $3 ]]; then
+		# user specified the use name so use it
+		echo "-D$1$3=$(use $2 && echo OFF || echo ON)"
+	else
+		# use all various most used combinations
+		uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
+		capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
+		for x in $2 $uper $capitalised; do
+			echo "-D$1$x=$(use $2 && echo OFF || echo ON) "
+		done
+	fi
+}
+
+# @ECLASS-VARIABLE: CMAKE_BUILD_DIR
+# @DESCRIPTION:
+# Build directory where all cmake processed files should be generated.
+# For in-source build it's fixed to ${CMAKE_USE_DIR}.
+# For out-of-source build it can be overriden, by default it uses
+# ${WORKDIR}/${P}_build.
+
+# @ECLASS-VARIABLE: CMAKE_BUILD_TYPE
+# @DESCRIPTION:
+# Set to override default CMAKE_BUILD_TYPE. Only useful for packages
+# known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)".
+# If about to be set - needs to be set before invoking cmake-utils_src_configure.
+# You usualy do *NOT* want nor need to set it as it pulls CMake default build-type
+# specific compiler flags overriding make.conf.
+: ${CMAKE_BUILD_TYPE:=Gentoo}
+
+# @ECLASS-VARIABLE: CMAKE_IN_SOURCE_BUILD
+# @DESCRIPTION:
+# Set to enable in-source build.
+
+# @ECLASS-VARIABLE: CMAKE_USE_DIR
+# @DESCRIPTION:
+# Sets the directory where we are working with cmake.
+# For example when application uses autotools and only one
+# plugin needs to be done by cmake.
+# By default it uses ${S}.
+
+# @ECLASS-VARIABLE: CMAKE_VERBOSE
+# @DESCRIPTION:
+# Set to OFF to disable verbose messages during compilation
+: ${CMAKE_VERBOSE:=ON}
+
+# @ECLASS-VARIABLE: PREFIX
+# @DESCRIPTION:
+# Eclass respects PREFIX variable, though it's not recommended way to set
+# install/lib/bin prefixes.
+# Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead.
+: ${PREFIX:=/usr}
+
+# @ECLASS-VARIABLE: CMAKE_BINARY
+# @DESCRIPTION:
+# Eclass can use different cmake binary than the one provided in by system.
+: ${CMAKE_BINARY:=cmake}
+
+# Determine using IN or OUT source build
+_check_build_dir() {
+	: ${CMAKE_USE_DIR:=${S}}
+	if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
+		# we build in source dir
+		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
+	else
+		: ${CMAKE_BUILD_DIR:=${WORKDIR}/${P}_build}
+	fi
+	mkdir -p "${CMAKE_BUILD_DIR}"
+	echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
+}
+
+# Determine which generator to use
+_generator_to_use() {
+	if [[ ${CMAKE_MAKEFILE_GENERATOR} = "ninja" ]]; then
+		has_version dev-util/ninja && echo "Ninja" && return
+	fi
+	echo "Unix Makefiles"
+}
+
+# @FUNCTION: cmake-utils_use_with
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_with. See ebuild(5).
+#
+# `cmake-utils_use_with foo FOO` echoes -DWITH_FOO=ON if foo is enabled
+# and -DWITH_FOO=OFF if it is disabled.
+cmake-utils_use_with() { _use_me_now WITH_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_enable
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_enable foo FOO` echoes -DENABLE_FOO=ON if foo is enabled
+# and -DENABLE_FOO=OFF if it is disabled.
+cmake-utils_use_enable() { _use_me_now ENABLE_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_disable
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on inversion of use_enable. See ebuild(5).
+#
+# `cmake-utils_use_enable foo FOO` echoes -DDISABLE_FOO=OFF if foo is enabled
+# and -DDISABLE_FOO=ON if it is disabled.
+cmake-utils_use_disable() { _use_me_now_inverted DISABLE_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_no
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_disable. See ebuild(5).
+#
+# `cmake-utils_use_no foo FOO` echoes -DNO_FOO=OFF if foo is enabled
+# and -DNO_FOO=ON if it is disabled.
+cmake-utils_use_no() { _use_me_now_inverted NO_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_want
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_want foo FOO` echoes -DWANT_FOO=ON if foo is enabled
+# and -DWANT_FOO=OFF if it is disabled.
+cmake-utils_use_want() { _use_me_now WANT_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_build
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_build foo FOO` echoes -DBUILD_FOO=ON if foo is enabled
+# and -DBUILD_FOO=OFF if it is disabled.
+cmake-utils_use_build() { _use_me_now BUILD_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_has
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
+# and -DHAVE_FOO=OFF if it is disabled.
+cmake-utils_use_has() { _use_me_now HAVE_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use_use
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use_use foo FOO` echoes -DUSE_FOO=ON if foo is enabled
+# and -DUSE_FOO=OFF if it is disabled.
+cmake-utils_use_use() { _use_me_now USE_ "$@" ; }
+
+# @FUNCTION: cmake-utils_use
+# @USAGE: <USE flag> [flag name]
+# @DESCRIPTION:
+# Based on use_enable. See ebuild(5).
+#
+# `cmake-utils_use foo FOO` echoes -DFOO=ON if foo is enabled
+# and -DFOO=OFF if it is disabled.
+cmake-utils_use() { _use_me_now "" "$@" ; }
+
+# Internal function for modifying hardcoded definitions.
+# Removes dangerous definitions that override Gentoo settings.
+_modify-cmakelists() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	# Only edit the files once
+	grep -qs "<<< Gentoo configuration >>>" CMakeLists.txt && return 0
+
+	# Comment out all set (<some_should_be_user_defined_variable> value)
+	# TODO Add QA checker - inform when variable being checked for below is set in CMakeLists.txt
+	find "${CMAKE_USE_DIR}" -name CMakeLists.txt \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE.*)/{s/^/#IGNORE /g}' {} + \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_COLOR_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX.*)/{s/^/#IGNORE /g}' {} + \
+		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \
+		|| die "${LINENO}: failed to disable hardcoded settings"
+
+	# NOTE Append some useful summary here
+	cat >> "${CMAKE_USE_DIR}"/CMakeLists.txt <<- _EOF_
+
+		MESSAGE(STATUS "<<< Gentoo configuration >>>
+		Build type      \${CMAKE_BUILD_TYPE}
+		Install path    \${CMAKE_INSTALL_PREFIX}
+		Compiler flags:
+		C               \${CMAKE_C_FLAGS}
+		C++             \${CMAKE_CXX_FLAGS}
+		Linker flags:
+		Executable      \${CMAKE_EXE_LINKER_FLAGS}
+		Module          \${CMAKE_MODULE_LINKER_FLAGS}
+		Shared          \${CMAKE_SHARED_LINKER_FLAGS}\n")
+	_EOF_
+}
+
+enable_cmake-utils_src_configure() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	[[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] && {
+		local name
+		for name in ${CMAKE_REMOVE_MODULES_LIST} ; do
+			find "${S}" -name ${name}.cmake -exec rm -v {} +
+		done
+	}
+
+	_check_build_dir
+
+	# check if CMakeLists.txt exist and if no then die
+	if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then
+		eerror "Unable to locate CMakeLists.txt under:"
+		eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\""
+		eerror "Consider not inheriting the cmake eclass."
+		die "FATAL: Unable to find CMakeLists.txt"
+	fi
+
+	# Remove dangerous things.
+	_modify-cmakelists
+
+	# Fix xdg collision with sandbox
+	export XDG_CONFIG_HOME="${T}"
+
+	# @SEE CMAKE_BUILD_TYPE
+	if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
+		# Handle release builds
+		if ! has debug ${IUSE//+} || ! use debug; then
+			append-cppflags -DNDEBUG
+		fi
+	fi
+
+	# Prepare Gentoo override rules (set valid compiler, append CPPFLAGS)
+	local build_rules=${CMAKE_BUILD_DIR}/gentoo_rules.cmake
+	cat > "${build_rules}" <<- _EOF_
+		SET (CMAKE_C_COMPILER $(type -P $(tc-getCC)) CACHE FILEPATH "C compiler" FORCE)
+		SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
+		SET (CMAKE_CXX_COMPILER $(type -P $(tc-getCXX)) CACHE FILEPATH "C++ compiler" FORCE)
+		SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
+	_EOF_
+
+	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
+
+	if [[ ${EPREFIX} ]]; then
+		cat >> "${build_rules}" <<- _EOF_
+			# in Prefix we need rpath and must ensure cmake gets our default linker path
+			# right ... except for Darwin hosts
+			IF (NOT APPLE)
+			SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
+			SET (CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)"
+			CACHE STRING "" FORCE)
+
+			ELSE ()
+
+			SET(CMAKE_PREFIX_PATH "${EPREFIX}${PREFIX}" CACHE STRING ""FORCE)
+			SET(CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE)
+			SET(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
+			SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE CACHE BOOL "")
+			SET(CMAKE_INSTALL_RPATH "${EPREFIX}${PREFIX}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE)
+			SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE)
+			SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}${PREFIX}/lib" CACHE STRING "" FORCE)
+
+			ENDIF (NOT APPLE)
+		_EOF_
+	fi
+
+	# Common configure parameters (invariants)
+	local common_config=${CMAKE_BUILD_DIR}/gentoo_common_config.cmake
+	local libdir=$(get_libdir)
+	cat > "${common_config}" <<- _EOF_
+		SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
+		SET (CMAKE_INSTALL_LIBDIR ${PREFIX}/${libdir} CACHE PATH "Output directory for libraries")
+	_EOF_
+	[[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
+
+	# Convert mycmakeargs to an array, for backwards compatibility
+	# Make the array a local variable since <=portage-2.1.6.x does not
+	# support global arrays (see bug #297255).
+	if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
+		local mycmakeargs_local=(${mycmakeargs})
+	else
+		local mycmakeargs_local=("${mycmakeargs[@]}")
+	fi
+
+	# Common configure parameters (overridable)
+	# NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
+	# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
+	local cmakeargs=(
+		--no-warn-unused-cli
+		-C "${common_config}"
+		-G "$(_generator_to_use)"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}"
+		"${mycmakeargs_local[@]}"
+		-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
+		-DCMAKE_INSTALL_DO_STRIP=OFF
+		-DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}"
+		"${MYCMAKEARGS}"
+	)
+
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}"
+	echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
+	"${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"
+	popd > /dev/null
+}
+
+enable_cmake-utils_src_compile() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	has src_configure ${CMAKE_EXPF} || cmake-utils_src_configure
+	cmake-utils_src_make "$@"
+}
+
+# @FUNCTION: cmake-utils_src_make
+# @DESCRIPTION:
+# Function for building the package. Automatically detects the build type.
+# All arguments are passed to emake.
+cmake-utils_src_make() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	_check_build_dir
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	if [[ $(_generator_to_use) = Ninja ]]; then
+		# first check if Makefile exist otherwise die
+		[[ -e build.ninja ]] || die "Makefile not found. Error during configure stage."
+		if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
+			#TODO get load average from portage (-l option)
+			ninja ${MAKEOPTS} -v "$@"
+		else
+			ninja "$@"
+		fi || die "ninja failed!"
+	else
+		# first check if Makefile exist otherwise die
+		[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
+		if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
+			emake VERBOSE=1 "$@" || die "Make failed!"
+		else
+			emake "$@" || die "Make failed!"
+		fi
+	fi
+	popd > /dev/null
+}
+
+enable_cmake-utils_src_install() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	_check_build_dir
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	if [[ $(_generator_to_use) = Ninja ]]; then
+		DESTDIR=${D} ninja install "$@"
+	else
+		base_src_install "$@"
+	fi
+	popd > /dev/null
+
+	# Backward compatibility, for non-array variables
+	if [[ -n "${DOCS}" ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
+		dodoc ${DOCS} || die "dodoc failed"
+	fi
+	if [[ -n "${HTML_DOCS}" ]] && [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
+		dohtml -r ${HTML_DOCS} || die "dohtml failed"
+	fi
+}
+
+enable_cmake-utils_src_test() {
+	debug-print-function ${FUNCNAME} "$@"
+	local ctestargs
+
+	_check_build_dir
+	pushd "${CMAKE_BUILD_DIR}" > /dev/null
+	[[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; }
+
+	[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
+
+	if ctest ${ctestargs} "$@" ; then
+		einfo "Tests succeeded."
+	else
+		if [[ -n "${CMAKE_YES_I_WANT_TO_SEE_THE_TEST_LOG}" ]] ; then
+			# on request from Diego
+			eerror "Tests failed. Test log ${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log follows:"
+			eerror "--START TEST LOG--------------------------------------------------------------"
+			cat "${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log"
+			eerror "--END TEST LOG----------------------------------------------------------------"
+			die "Tests failed."
+		else
+			die "Tests failed. When you file a bug, please attach the following file: \n\t${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log"
+		fi
+	fi
+	popd > /dev/null
+}
+
+# @FUNCTION: cmake-utils_src_configure
+# @DESCRIPTION:
+# General function for configuring with cmake. Default behaviour is to start an
+# out-of-source build.
+cmake-utils_src_configure() {
+	_execute_optionaly "src_configure" "$@"
+}
+
+# @FUNCTION: cmake-utils_src_compile
+# @DESCRIPTION:
+# General function for compiling with cmake. Default behaviour is to check for
+# EAPI and respectively to configure as well or just compile.
+# Automatically detects the build type. All arguments are passed to emake.
+cmake-utils_src_compile() {
+	_execute_optionaly "src_compile" "$@"
+}
+
+# @FUNCTION: cmake-utils_src_install
+# @DESCRIPTION:
+# Function for installing the package. Automatically detects the build type.
+cmake-utils_src_install() {
+	_execute_optionaly "src_install" "$@"
+}
+
+# @FUNCTION: cmake-utils_src_test
+# @DESCRIPTION:
+# Function for testing the package. Automatically detects the build type.
+cmake-utils_src_test() {
+	_execute_optionaly "src_test" "$@"
+}
+
+# Optionally executes phases based on WANT_CMAKE variable/USE flag.
+_execute_optionaly() {
+	local phase="$1" ; shift
+	if [[ ${WANT_CMAKE} = always ]]; then
+		enable_cmake-utils_${phase} "$@"
+	else
+		use ${WANT_CMAKE} && enable_cmake-utils_${phase} "$@"
+	fi
+}


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-08-30  8:38 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-08-30  8:38 UTC (permalink / raw
  To: gentoo-commits

commit:     40efcb7e2072e2e49f02d7451a9ab930775f40a5
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 30 08:21:46 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Aug 30 08:21:46 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=40efcb7e

add license

---
 eclass/ligplot+ |  138 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 138 insertions(+), 0 deletions(-)

diff --git a/eclass/ligplot+ b/eclass/ligplot+
new file mode 100644
index 0000000..7457f66
--- /dev/null
+++ b/eclass/ligplot+
@@ -0,0 +1,138 @@
+LIGPLOT - Automated representation of protein-ligand interactions
+  ----------------------------------------------------------------
+
+			CONFIDENTIALITY AGREEMENT
+			-------------------------
+
+
+
+In regard to the LIGPLOT , specified in the Appendix herewith 
+(the Software) supplied to us, the copyright and other
+intellectual property rights to which belong to the authors, we
+
+
+    __________________________________________________________________
+
+undertake to the authors that we shall be bound by the following terms 
+and conditions:-
+
+1. We will receive the Software and any related documentation in 
+confidence and will not use the same except for the purpose of the
+department's own research. The Software will be used only by such of 
+our officers or employees to whom it must reasonably be communicated 
+to enable us to undertake our research and who agree to be bound by 
+the same confidence.  The department shall procure and enforce such
+agreement from its staff for the benefit of the authors.
+
+2. The publication of research using the Software must reference
+"Wallace A C, Laskowski R A, Thornton J M (1995). LIGPLOT: A program
+to generate schematic diagrams of protein-ligand interactions. Protein 
+Engineering, 8, 127-134."
+
+3. Research shall take place solely at the department's premises at
+
+
+    __________________________________________________________________
+
+4. All forms of the Software will be kept in a reasonably secure place
+ to prevent unauthorised access.
+
+5. Each copy of the Software or, if not practicable then, any package
+associated therewith shall be suitably marked (and such marking 
+maintained) with the following copyright notice: " Copyright 1994
+A C Wallace, R A Laskowski, & J M Thornton All Rights Reserved".
+
+6. The Software may be modified but any changes made shall be made
+available to the authors.
+
+7. The Software shall be used exclusively for academic teaching and
+research. The Software will not be used for any commercial research or
+research associated with an industrial company.
+
+8. The confidentiality obligation in paragraph one shall not apply:
+
+   (i)  to information and data known to the department at the time of
+	receipt hereunder (as evidenced by its written records);
+
+  (ii)	to information and data which was at the time of receipt in the 
+	public domain or thereafter becomes so through no wrongful act of
+	the department;
+
+ (iii)	to information and data which the department receives from a third
+	party not in breach of any obligation of confidentiality owed to
+	the authors.
+
+Please sign this Undertaking and return a copy of it to indicate that you 
+have read, understood and accepted the above terms.
+
+
+
+		      For and on behalf of _____________________________
+
+		      _________________________________________________
+		     
+		      ..................................................
+
+		      Dated ............................................
+
+
+
+e-mail address ___________________________
+
+
+
+Please complete the above form, sign it, and then send it, or fax it, to:-
+
+
+Roman Laskowski
+European Bioinformatics Institute,
+Wellcome Trust Genome Campus,
+Hinxton,
+Cambridge, CB10 1SD,
+United Kingdom
+ 
+Fax:- +44 (0)1223 494 468
+ 
+roman@ebi.ac.uk
+
+
+If you have any problems either installing the software or running it,
+please e-mail your problems to:-
+
+     roman@ebi.ac.uk
+
+
+APPENDIX - Files supplied as part of the LIGPLOT program
+--------------------------------------------------------
+
+Source program files:-
+1. ligplot.c
+2. ligplot.h
+3. hbadd.c
+4. hbadd.h
+5. dimer.c
+6. dimer.h
+
+Script files:-
+1. ligplot.scr
+2. ligonly.scr
+3. dimplot.scr
+4. dimonly.scr
+
+Parameter file:-
+1. ligplot.prm
+
+Installation instructions:-
+1. install.doc
+
+Documentation:-
+1. manual.tar.Z
+2. README
+
+Confidentiality Agreement:-
+1. confid.txt
+
+
+
+                                                   v.4.4.2 - 7 Mar 2003
+


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-09-20 12:45 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-09-20 12:45 UTC (permalink / raw
  To: gentoo-commits

commit:     9a7e54ce3f887be38542ca2a9afac7740ea8bfb9
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 20 12:44:44 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Sep 20 12:44:44 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=9a7e54ce

in Cvs

---
 eclass/intel-sdp.eclass |  187 -----------------------------------------------
 1 files changed, 0 insertions(+), 187 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
deleted file mode 100644
index 7271b30..0000000
--- a/eclass/intel-sdp.eclass
+++ /dev/null
@@ -1,187 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# @ECLASS: intel-sdp.eclass
-# @MAINTAINER: bicatali@gentoo.org
-# @BLURB: simplify Intel Software Development Products package management
-
-# @ECLASS-VARIABLE: INTEL_DPV
-# @DEFAULT_UNSET
-# @DESCRIPTION: the package download version from Intel. It must be defined.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-
-# @ECLASS-VARIABLE: INTEL_DID
-# @DEFAULT_UNSET
-# @DESCRIPTION: the package download ID from Intel. It must be defined.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-
-# @ECLASS-VARIABLE: INTEL_DPN
-# @DEFAULT_UNSET
-# @DESCRIPTION: the package name to download from Intel. It must be defined.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-
-# @ECLASS-VARIABLE: INTEL_SUBDIR
-# @DEFAULT_UNSET
-# @DESCRIPTION: the package sub-directory where it will end-up in /opt/intel
-# To find out its value, you have to do a raw install from the Intel tar ball
-
-# @ECLASS-VARIABLE: INTEL_RPMS_DIRS
-# @DEFAULT_UNSET
-# @DESCRIPTION: a list of subdirectories in the main archive which contains the
-# rpms to extract.
-
-inherit versionator check-reqs multilib
-
-INTEL_PV1=$(get_version_component_range 1)
-INTEL_PV2=$(get_version_component_range 2)
-INTEL_PV3=$(get_version_component_range 3)
-INTEL_PV4=$(get_version_component_range 4)
-INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
-
-SRC_URI="
-	amd64? ( multilib? ( ${INTEL_URI}_${INTEL_DPV}.tgz ) )
-	amd64? ( !multilib? ( ${INTEL_URI}_${INTEL_DPV}_intel64.tgz ) )
-	x86?  ( ${INTEL_URI}_${INTEL_DPV}_ia32.tgz )"
-
-LICENSE="Intel-SDP"
-SLOT="${INTEL_PV1}.${INTEL_PV2}"
-IUSE="multilib"
-KEYWORDS="-* ~amd64 ~x86"
-
-RESTRICT="mirror"
-
-RDEPEND=""
-DEPEND=">=app-arch/rpm2targz-9.0.0.3g"
-INTEL_SDP_YEAR=${INTEL_DPV%_update*}
-INTEL_SDP_YEAR=${INTEL_DPV%_sp*}
-INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${INTEL_SDP_YEAR:-${INTEL_PV1}}.${INTEL_PV3}.${INTEL_PV4}"
-INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
-
-S="${WORKDIR}"
-
-intel-sdp_pkg_pretend() {
-	: ${CHECKREQS_DISK_BUILD:=256M}
-	check-reqs_pkg_pretend
-}
-
-intel-sdp_pkg_setup() {
-	local arch a p
-	if use x86; then
-		arch=${INTEL_X86:-i486}
-		INTEL_ARCH="ia32"
-	elif use amd64; then
-		arch=x86_64
-		INTEL_ARCH="intel64"
-		if has_multilib_profile; then
-			arch="x86_64 ${INTEL_X86:-i486}"
-			INTEL_ARCH="intel64 ia32"
-		fi
-	fi
-	INTEL_RPMS=""
-	for p in ${INTEL_BIN_RPMS}; do
-		for a in ${arch}; do
-			INTEL_RPMS="${INTEL_RPMS} intel-${p}-${INTEL_PV4}-${INTEL_PV1}.${INTEL_PV2}-${INTEL_PV3}.${a}.rpm"
-		done
-	done
-	for p in ${INTEL_DAT_RPMS}; do
-		INTEL_RPMS="${INTEL_RPMS} intel-${p}-${INTEL_PV4}-${INTEL_PV1}.${INTEL_PV2}-${INTEL_PV3}.noarch.rpm"
-	done
-
-	case "${EAPI:-0}" in
-		0|1|2|3) intel-sdp_pkg_pretend ;;
-	esac
-}
-
-intel-sdp_src_unpack() {
-	local l r t rpmdir
-	for t in ${A}; do
-		# TODO: need to find a fast way to find the rpmdir
-		# in some cases rpms are in rpms/, in other cases in rpm/
-		# tar tvf is too slow for 1.4G tar balls
-		for r in ${INTEL_RPMS}; do
-			# Find which subdirectory of the archive the rpm is in
-			rpm_found="false"
-			for subdir in ${INTEL_RPMS_DIRS:-rpm}; do
-				[[ "${rpm_found}" == "true" ]] && continue
-				rpmdir=${t%%.*}/${subdir}
-				l=.${r}_$(date +'%d%m%y_%H%M%S').log
-				tar xf "${DISTDIR}"/${t} ${rpmdir}/${r} 2> /dev/null || continue
-				einfo "Unpacking ${r}"
-				rpm_found="true"
-				rpm2tar -O "./${rpmdir}/${r}" | tar xvf - | sed -e \
-					"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
-				mv ${l} opt/intel/ || die "failed moving extract log file"
-			done
-		done
-	done
-	mv -v opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
-}
-
-intel_link_eclipse_plugins() {
-	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
-	local c f
-	for c in cdt*; do
-		local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
-		if has_version "dev-util/eclipse-sdk:${ev}"; then
-			einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
-			for f in cdt${cv}/eclipse/features/*; do
-				dodir /usr/$(get_libdir)/eclipse-${ev}/features
-				dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
-					/usr/$(get_libdir)/eclipse-${ev}/features/ || die
-			done
-			for f in cdt${cv}/eclipse/plugins/*; do
-				dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
-				dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
-					/usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
-			done
-		fi
-	done
-	popd > /dev/null
-}
-
-intel-sdp_src_install() {
-	[[ -d ${INTEL_SDP_DIR}/eclipse_support ]] && \
-		has eclipse ${IUSE} && \
-		use eclipse && \
-		intel_link_eclipse_plugins
-	einfo "Tagging ${PN}"
-	find opt -name \*sh -type f -exec sed -i \
-		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \
-		'{}' \;
-	mkdir -p "${ED:-${D}}"/ || die
-	mv opt "${ED:-${D}}"/ || die "moving files failed"
-}
-
-intel-sdp_pkg_postinst() {
-	# add product registry to intel "database"
-	local l r
-	INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
-	for r in ${INTEL_RPMS}; do
-		l="$(ls -1 ${EROOT%/}/opt/intel/.${r}_*.log | head -n 1)"
-		echo >> ${INTEL_SDP_DB} \
-			"<:${r%-${INTEL_PV4}*}-${INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>"
-	done
-}
-
-intel-sdp_pkg_postrm() {
-	# remove from intel "database"
-	if [[ -e ${INTEL_SDP_DB} ]]; then
-		local r
-		for r in ${INTEL_RPMS}; do
-			sed -i \
-				-e "/${r}/d" \
-				${INTEL_SDP_DB}
-		done
-	fi
-}
-
-EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm
-case "${EAPI:-0}" in
-	0|1|2|3) ;;
-	4) EXPORT_FUNCTIONS pkg_pretend ;;
-	*) die "EAPI=${EAPI} is not supported" ;;
-esac


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-10-04 14:39 Christoph Junghans
  0 siblings, 0 replies; 169+ messages in thread
From: Christoph Junghans @ 2012-10-04 14:39 UTC (permalink / raw
  To: gentoo-commits

commit:     66c892dee6cdf1fc586ee569745fb9dd5a5908b5
Author:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  4 04:12:56 2012 +0000
Commit:     Christoph Junghans <kleiner_otti <AT> gmx <DOT> de>
CommitDate: Thu Oct  4 04:12:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=66c892de

cmake-utils.eclass got merged in gx86

---
 eclass/cmake-utils.eclass |  530 ---------------------------------------------
 1 files changed, 0 insertions(+), 530 deletions(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
deleted file mode 100644
index 4ab36d1..0000000
--- a/eclass/cmake-utils.eclass
+++ /dev/null
@@ -1,530 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.79 2012/05/08 21:27:10 dilfridge Exp $
-
-# @ECLASS: cmake-utils.eclass
-# @MAINTAINER:
-# kde@gentoo.org
-# @AUTHOR:
-# Tomáš Chvátal <scarabeus@gentoo.org>
-# Maciej Mrozowski <reavertm@gentoo.org>
-# (undisclosed contributors)
-# Original author: Zephyrus (zephyrus@mirach.it)
-# @BLURB: common ebuild functions for cmake-based packages
-# @DESCRIPTION:
-# The cmake-utils eclass is base.eclass(5) wrapper that makes creating ebuilds for
-# cmake-based packages much easier.
-# It provides all inherited features (DOCS, HTML_DOCS, PATCHES) along with out-of-source
-# builds (default), in-source builds and an implementation of the well-known use_enable
-# and use_with functions for CMake.
-
-# @ECLASS-VARIABLE: WANT_CMAKE
-# @DESCRIPTION:
-# Specify if cmake-utils eclass should depend on cmake optionaly or not.
-# This is usefull when only part of aplication is using cmake build system.
-# Valid values are: always [default], optional (where the value is the useflag
-# used for optionality)
-WANT_CMAKE="${WANT_CMAKE:-always}"
-
-# @ECLASS-VARIABLE: CMAKE_MIN_VERSION
-# @DESCRIPTION:
-# Specify the minimum required CMake version.  Default is 2.8.4
-CMAKE_MIN_VERSION="${CMAKE_MIN_VERSION:-2.8.4}"
-
-# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST
-# @DESCRIPTION:
-# Space-separated list of CMake modules that will be removed in $S during src_prepare,
-# in order to force packages to use the system version.
-CMAKE_REMOVE_MODULES_LIST="${CMAKE_REMOVE_MODULES_LIST:-FindBLAS FindLAPACK}"
-
-# @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES
-# @DESCRIPTION:
-# Do we want to remove anything? yes or whatever else for no
-CMAKE_REMOVE_MODULES="${CMAKE_REMOVE_MODULES:-yes}"
-
-# @ECLASS-VARIABLE: CMAKE_MAKEFILE_GENERATOR
-# @DESCRIPTION:
-# Specify a makefile generator to be used by cmake. At this point only "make"
-# and "ninja" is supported.
-CMAKE_MAKEFILE_GENERATOR="${CMAKE_MAKEFILE_GENERATOR:-make}"
-
-CMAKEDEPEND=""
-case ${WANT_CMAKE} in
-	always)
-		;;
-	*)
-		IUSE+=" ${WANT_CMAKE}"
-		CMAKEDEPEND+="${WANT_CMAKE}? ( "
-		;;
-esac
-inherit toolchain-funcs multilib flag-o-matic base
-
-CMAKE_EXPF="src_compile src_test src_install"
-case ${EAPI:-0} in
-	4|3|2) CMAKE_EXPF+=" src_configure" ;;
-	1|0) ;;
-	*) die "Unknown EAPI, Bug eclass maintainers." ;;
-esac
-EXPORT_FUNCTIONS ${CMAKE_EXPF}
-
-: ${DESCRIPTION:="Based on the ${ECLASS} eclass"}
-
-if [[ ${PN} != cmake ]]; then
-	CMAKEDEPEND+=" >=dev-util/cmake-${CMAKE_MIN_VERSION}"
-fi
-
-CMAKEDEPEND+=" userland_GNU? ( >=sys-apps/findutils-4.4.0 )"
-
-[[ ${WANT_CMAKE} = always ]] || CMAKEDEPEND+=" )"
-
-DEPEND="${CMAKEDEPEND}"
-unset CMAKEDEPEND
-
-# Internal functions used by cmake-utils_use_*
-_use_me_now() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local uper capitalised x
-	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
-	if [[ ! -z $3 ]]; then
-		# user specified the use name so use it
-		echo "-D$1$3=$(use $2 && echo ON || echo OFF)"
-	else
-		# use all various most used combinations
-		uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
-		capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
-		for x in $2 $uper $capitalised; do
-			echo "-D$1$x=$(use $2 && echo ON || echo OFF) "
-		done
-	fi
-}
-_use_me_now_inverted() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local uper capitalised x
-	[[ -z $2 ]] && die "cmake-utils_use-$1 <USE flag> [<flag name>]"
-	if [[ ! -z $3 ]]; then
-		# user specified the use name so use it
-		echo "-D$1$3=$(use $2 && echo OFF || echo ON)"
-	else
-		# use all various most used combinations
-		uper=$(echo ${2} | tr '[:lower:]' '[:upper:]')
-		capitalised=$(echo ${2} | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g')
-		for x in $2 $uper $capitalised; do
-			echo "-D$1$x=$(use $2 && echo OFF || echo ON) "
-		done
-	fi
-}
-
-# @ECLASS-VARIABLE: CMAKE_BUILD_DIR
-# @DESCRIPTION:
-# Build directory where all cmake processed files should be generated.
-# For in-source build it's fixed to ${CMAKE_USE_DIR}.
-# For out-of-source build it can be overriden, by default it uses
-# ${WORKDIR}/${P}_build.
-
-# @ECLASS-VARIABLE: CMAKE_BUILD_TYPE
-# @DESCRIPTION:
-# Set to override default CMAKE_BUILD_TYPE. Only useful for packages
-# known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)".
-# If about to be set - needs to be set before invoking cmake-utils_src_configure.
-# You usualy do *NOT* want nor need to set it as it pulls CMake default build-type
-# specific compiler flags overriding make.conf.
-: ${CMAKE_BUILD_TYPE:=Gentoo}
-
-# @ECLASS-VARIABLE: CMAKE_IN_SOURCE_BUILD
-# @DESCRIPTION:
-# Set to enable in-source build.
-
-# @ECLASS-VARIABLE: CMAKE_USE_DIR
-# @DESCRIPTION:
-# Sets the directory where we are working with cmake.
-# For example when application uses autotools and only one
-# plugin needs to be done by cmake.
-# By default it uses ${S}.
-
-# @ECLASS-VARIABLE: CMAKE_VERBOSE
-# @DESCRIPTION:
-# Set to OFF to disable verbose messages during compilation
-: ${CMAKE_VERBOSE:=ON}
-
-# @ECLASS-VARIABLE: PREFIX
-# @DESCRIPTION:
-# Eclass respects PREFIX variable, though it's not recommended way to set
-# install/lib/bin prefixes.
-# Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead.
-: ${PREFIX:=/usr}
-
-# @ECLASS-VARIABLE: CMAKE_BINARY
-# @DESCRIPTION:
-# Eclass can use different cmake binary than the one provided in by system.
-: ${CMAKE_BINARY:=cmake}
-
-# Determine using IN or OUT source build
-_check_build_dir() {
-	: ${CMAKE_USE_DIR:=${S}}
-	if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
-		# we build in source dir
-		CMAKE_BUILD_DIR="${CMAKE_USE_DIR}"
-	else
-		: ${CMAKE_BUILD_DIR:=${WORKDIR}/${P}_build}
-	fi
-	mkdir -p "${CMAKE_BUILD_DIR}"
-	echo ">>> Working in BUILD_DIR: \"$CMAKE_BUILD_DIR\""
-}
-
-# Determine which generator to use
-_generator_to_use() {
-	if [[ ${CMAKE_MAKEFILE_GENERATOR} = "ninja" ]]; then
-		has_version dev-util/ninja && echo "Ninja" && return
-	fi
-	echo "Unix Makefiles"
-}
-
-# @FUNCTION: cmake-utils_use_with
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_with. See ebuild(5).
-#
-# `cmake-utils_use_with foo FOO` echoes -DWITH_FOO=ON if foo is enabled
-# and -DWITH_FOO=OFF if it is disabled.
-cmake-utils_use_with() { _use_me_now WITH_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_enable
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use_enable foo FOO` echoes -DENABLE_FOO=ON if foo is enabled
-# and -DENABLE_FOO=OFF if it is disabled.
-cmake-utils_use_enable() { _use_me_now ENABLE_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_disable
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on inversion of use_enable. See ebuild(5).
-#
-# `cmake-utils_use_enable foo FOO` echoes -DDISABLE_FOO=OFF if foo is enabled
-# and -DDISABLE_FOO=ON if it is disabled.
-cmake-utils_use_disable() { _use_me_now_inverted DISABLE_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_no
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_disable. See ebuild(5).
-#
-# `cmake-utils_use_no foo FOO` echoes -DNO_FOO=OFF if foo is enabled
-# and -DNO_FOO=ON if it is disabled.
-cmake-utils_use_no() { _use_me_now_inverted NO_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_want
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use_want foo FOO` echoes -DWANT_FOO=ON if foo is enabled
-# and -DWANT_FOO=OFF if it is disabled.
-cmake-utils_use_want() { _use_me_now WANT_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_build
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use_build foo FOO` echoes -DBUILD_FOO=ON if foo is enabled
-# and -DBUILD_FOO=OFF if it is disabled.
-cmake-utils_use_build() { _use_me_now BUILD_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_has
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use_has foo FOO` echoes -DHAVE_FOO=ON if foo is enabled
-# and -DHAVE_FOO=OFF if it is disabled.
-cmake-utils_use_has() { _use_me_now HAVE_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use_use
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use_use foo FOO` echoes -DUSE_FOO=ON if foo is enabled
-# and -DUSE_FOO=OFF if it is disabled.
-cmake-utils_use_use() { _use_me_now USE_ "$@" ; }
-
-# @FUNCTION: cmake-utils_use
-# @USAGE: <USE flag> [flag name]
-# @DESCRIPTION:
-# Based on use_enable. See ebuild(5).
-#
-# `cmake-utils_use foo FOO` echoes -DFOO=ON if foo is enabled
-# and -DFOO=OFF if it is disabled.
-cmake-utils_use() { _use_me_now "" "$@" ; }
-
-# Internal function for modifying hardcoded definitions.
-# Removes dangerous definitions that override Gentoo settings.
-_modify-cmakelists() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	# Only edit the files once
-	grep -qs "<<< Gentoo configuration >>>" CMakeLists.txt && return 0
-
-	# Comment out all set (<some_should_be_user_defined_variable> value)
-	# TODO Add QA checker - inform when variable being checked for below is set in CMakeLists.txt
-	find "${CMAKE_USE_DIR}" -name CMakeLists.txt \
-		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE.*)/{s/^/#IGNORE /g}' {} + \
-		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_COLOR_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \
-		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX.*)/{s/^/#IGNORE /g}' {} + \
-		-exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \
-		|| die "${LINENO}: failed to disable hardcoded settings"
-
-	# NOTE Append some useful summary here
-	cat >> "${CMAKE_USE_DIR}"/CMakeLists.txt <<- _EOF_
-
-		MESSAGE(STATUS "<<< Gentoo configuration >>>
-		Build type      \${CMAKE_BUILD_TYPE}
-		Install path    \${CMAKE_INSTALL_PREFIX}
-		Compiler flags:
-		C               \${CMAKE_C_FLAGS}
-		C++             \${CMAKE_CXX_FLAGS}
-		Linker flags:
-		Executable      \${CMAKE_EXE_LINKER_FLAGS}
-		Module          \${CMAKE_MODULE_LINKER_FLAGS}
-		Shared          \${CMAKE_SHARED_LINKER_FLAGS}\n")
-	_EOF_
-}
-
-enable_cmake-utils_src_configure() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	[[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] && {
-		local name
-		for name in ${CMAKE_REMOVE_MODULES_LIST} ; do
-			find "${S}" -name ${name}.cmake -exec rm -v {} +
-		done
-	}
-
-	_check_build_dir
-
-	# check if CMakeLists.txt exist and if no then die
-	if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then
-		eerror "Unable to locate CMakeLists.txt under:"
-		eerror "\"${CMAKE_USE_DIR}/CMakeLists.txt\""
-		eerror "Consider not inheriting the cmake eclass."
-		die "FATAL: Unable to find CMakeLists.txt"
-	fi
-
-	# Remove dangerous things.
-	_modify-cmakelists
-
-	# Fix xdg collision with sandbox
-	export XDG_CONFIG_HOME="${T}"
-
-	# @SEE CMAKE_BUILD_TYPE
-	if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
-		# Handle release builds
-		if ! has debug ${IUSE//+} || ! use debug; then
-			append-cppflags -DNDEBUG
-		fi
-	fi
-
-	# Prepare Gentoo override rules (set valid compiler, append CPPFLAGS)
-	local build_rules=${CMAKE_BUILD_DIR}/gentoo_rules.cmake
-	cat > "${build_rules}" <<- _EOF_
-		SET (CMAKE_C_COMPILER $(type -P $(tc-getCC)) CACHE FILEPATH "C compiler" FORCE)
-		SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
-		SET (CMAKE_CXX_COMPILER $(type -P $(tc-getCXX)) CACHE FILEPATH "C++ compiler" FORCE)
-		SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
-	_EOF_
-
-	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
-
-	if [[ ${EPREFIX} ]]; then
-		cat >> "${build_rules}" <<- _EOF_
-			# in Prefix we need rpath and must ensure cmake gets our default linker path
-			# right ... except for Darwin hosts
-			IF (NOT APPLE)
-			SET (CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
-			SET (CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)"
-			CACHE STRING "" FORCE)
-
-			ELSE ()
-
-			SET(CMAKE_PREFIX_PATH "${EPREFIX}${PREFIX}" CACHE STRING ""FORCE)
-			SET(CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE)
-			SET(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE)
-			SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE CACHE BOOL "")
-			SET(CMAKE_INSTALL_RPATH "${EPREFIX}${PREFIX}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE)
-			SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE)
-			SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}${PREFIX}/lib" CACHE STRING "" FORCE)
-
-			ENDIF (NOT APPLE)
-		_EOF_
-	fi
-
-	# Common configure parameters (invariants)
-	local common_config=${CMAKE_BUILD_DIR}/gentoo_common_config.cmake
-	local libdir=$(get_libdir)
-	cat > "${common_config}" <<- _EOF_
-		SET (LIB_SUFFIX ${libdir/lib} CACHE STRING "library path suffix" FORCE)
-		SET (CMAKE_INSTALL_LIBDIR ${PREFIX}/${libdir} CACHE PATH "Output directory for libraries")
-	_EOF_
-	[[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}"
-
-	# Convert mycmakeargs to an array, for backwards compatibility
-	# Make the array a local variable since <=portage-2.1.6.x does not
-	# support global arrays (see bug #297255).
-	if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
-		local mycmakeargs_local=(${mycmakeargs})
-	else
-		local mycmakeargs_local=("${mycmakeargs[@]}")
-	fi
-
-	# Common configure parameters (overridable)
-	# NOTE CMAKE_BUILD_TYPE can be only overriden via CMAKE_BUILD_TYPE eclass variable
-	# No -DCMAKE_BUILD_TYPE=xxx definitions will be in effect.
-	local cmakeargs=(
-		--no-warn-unused-cli
-		-C "${common_config}"
-		-G "$(_generator_to_use)"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}"
-		"${mycmakeargs_local[@]}"
-		-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
-		-DCMAKE_INSTALL_DO_STRIP=OFF
-		-DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}"
-		"${MYCMAKEARGS}"
-	)
-
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}"
-	echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}"
-	"${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"
-	popd > /dev/null
-}
-
-enable_cmake-utils_src_compile() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	has src_configure ${CMAKE_EXPF} || cmake-utils_src_configure
-	cmake-utils_src_make "$@"
-}
-
-# @FUNCTION: cmake-utils_src_make
-# @DESCRIPTION:
-# Function for building the package. Automatically detects the build type.
-# All arguments are passed to emake.
-cmake-utils_src_make() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	if [[ $(_generator_to_use) = Ninja ]]; then
-		# first check if Makefile exist otherwise die
-		[[ -e build.ninja ]] || die "Makefile not found. Error during configure stage."
-		if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
-			#TODO get load average from portage (-l option)
-			ninja ${MAKEOPTS} -v "$@"
-		else
-			ninja "$@"
-		fi || die "ninja failed!"
-	else
-		# first check if Makefile exist otherwise die
-		[[ -e Makefile ]] || die "Makefile not found. Error during configure stage."
-		if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
-			emake VERBOSE=1 "$@" || die "Make failed!"
-		else
-			emake "$@" || die "Make failed!"
-		fi
-	fi
-	popd > /dev/null
-}
-
-enable_cmake-utils_src_install() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	if [[ $(_generator_to_use) = Ninja ]]; then
-		DESTDIR=${D} ninja install "$@"
-	else
-		base_src_install "$@"
-	fi
-	popd > /dev/null
-
-	# Backward compatibility, for non-array variables
-	if [[ -n "${DOCS}" ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
-		dodoc ${DOCS} || die "dodoc failed"
-	fi
-	if [[ -n "${HTML_DOCS}" ]] && [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1)" != "declare -a"* ]]; then
-		dohtml -r ${HTML_DOCS} || die "dohtml failed"
-	fi
-}
-
-enable_cmake-utils_src_test() {
-	debug-print-function ${FUNCNAME} "$@"
-	local ctestargs
-
-	_check_build_dir
-	pushd "${CMAKE_BUILD_DIR}" > /dev/null
-	[[ -e CTestTestfile.cmake ]] || { echo "No tests found. Skipping."; return 0 ; }
-
-	[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
-
-	if ctest ${ctestargs} "$@" ; then
-		einfo "Tests succeeded."
-	else
-		if [[ -n "${CMAKE_YES_I_WANT_TO_SEE_THE_TEST_LOG}" ]] ; then
-			# on request from Diego
-			eerror "Tests failed. Test log ${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log follows:"
-			eerror "--START TEST LOG--------------------------------------------------------------"
-			cat "${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log"
-			eerror "--END TEST LOG----------------------------------------------------------------"
-			die "Tests failed."
-		else
-			die "Tests failed. When you file a bug, please attach the following file: \n\t${CMAKE_BUILD_DIR}/Testing/Temporary/LastTest.log"
-		fi
-	fi
-	popd > /dev/null
-}
-
-# @FUNCTION: cmake-utils_src_configure
-# @DESCRIPTION:
-# General function for configuring with cmake. Default behaviour is to start an
-# out-of-source build.
-cmake-utils_src_configure() {
-	_execute_optionaly "src_configure" "$@"
-}
-
-# @FUNCTION: cmake-utils_src_compile
-# @DESCRIPTION:
-# General function for compiling with cmake. Default behaviour is to check for
-# EAPI and respectively to configure as well or just compile.
-# Automatically detects the build type. All arguments are passed to emake.
-cmake-utils_src_compile() {
-	_execute_optionaly "src_compile" "$@"
-}
-
-# @FUNCTION: cmake-utils_src_install
-# @DESCRIPTION:
-# Function for installing the package. Automatically detects the build type.
-cmake-utils_src_install() {
-	_execute_optionaly "src_install" "$@"
-}
-
-# @FUNCTION: cmake-utils_src_test
-# @DESCRIPTION:
-# Function for testing the package. Automatically detects the build type.
-cmake-utils_src_test() {
-	_execute_optionaly "src_test" "$@"
-}
-
-# Optionally executes phases based on WANT_CMAKE variable/USE flag.
-_execute_optionaly() {
-	local phase="$1" ; shift
-	if [[ ${WANT_CMAKE} = always ]]; then
-		enable_cmake-utils_${phase} "$@"
-	else
-		use ${WANT_CMAKE} && enable_cmake-utils_${phase} "$@"
-	fi
-}


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-02 19:43 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-02 19:43 UTC (permalink / raw
  To: gentoo-commits

commit:     0f44bb3ff6d136307646fe75b55fff1d6d6cee0b
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  2 19:43:45 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Nov  2 19:43:45 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0f44bb3f

Update Copyright

---
 eclass/alternatives-2.eclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index b303694..499a65b 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -1,7 +1,8 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Copyright 2010 Sebastien Fabbro
 # Copyright 2008, 2009 Bo Ørsted Andresen
 # Copyright 2008, 2009 Mike Kelly
 # Copyright 2009 David Leverton
-# 2010: Adapted for Gentoo by Sebastien Fabbro, who does not like copyrights
 # Distributed under the terms of the GNU General Public License v2
 
 # If your package provides pkg_postinst or pkg_prerm phases, you need to be


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-02 19:46 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-02 19:46 UTC (permalink / raw
  To: gentoo-commits

commit:     04104ab3db51cacedd50111dee484a12056c526d
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  2 19:46:03 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Nov  2 19:46:03 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=04104ab3

Fix DEP on eselect

---
 eclass/alternatives-2.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 499a65b..5518890 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -10,7 +10,7 @@
 
 ALTERNATIVES_DIR="/etc/env.d/alternatives"
 
-DEPEND=">=app-admin/eselect-1.3.1-r1"
+DEPEND=">=app-admin/eselect-1.3.3-r100"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-02 19:54 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-02 19:54 UTC (permalink / raw
  To: gentoo-commits

commit:     f1261ea558bd436a45850c196fac4b53a1bf34cf
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  2 19:54:06 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Nov  2 19:54:06 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=f1261ea5

Revert "Update Copyright"

This reverts commit 0f44bb3ff6d136307646fe75b55fff1d6d6cee0b.

---
 eclass/alternatives-2.eclass |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 5518890..e62b6d4 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -1,8 +1,7 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Copyright 2010 Sebastien Fabbro
 # Copyright 2008, 2009 Bo Ørsted Andresen
 # Copyright 2008, 2009 Mike Kelly
 # Copyright 2009 David Leverton
+# 2010: Adapted for Gentoo by Sebastien Fabbro, who does not like copyrights
 # Distributed under the terms of the GNU General Public License v2
 
 # If your package provides pkg_postinst or pkg_prerm phases, you need to be


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-26 22:02 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-26 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     42a2d15c97b11a40181bff1540965d2a1a5cc0ed
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 15 22:10:02 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Nov 26 14:41:08 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=42a2d15c

preliminary cuda.eclass

---
 eclass/cuda.eclass |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
new file mode 100644
index 0000000..5a72d2f
--- /dev/null
+++ b/eclass/cuda.eclass
@@ -0,0 +1,35 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit toolchain-funcs versionator
+
+# @ECLASS: cuda.eclass
+# @MAINTAINER:
+# Justin Lecher <jlec@gentoo.org>
+# @BLURB: Common functions for cuda packages
+
+#  @ECLASS-VARIABLE: 
+
+
+# @ECLASS-FUNCTION: CUDA_SUPPORTED_GCC
+# @DESCRIPTION:
+# Listing of gcc version slots supported by nvidia cuda tool.
+# Generally only needed py
+
+cuda_pkg_postinst() {
+   if [[ $(tc-getCC) == *gcc* ]] && version_is_at_least 4.7 "$(gcc-version)"; then
+      ewarn "gcc >= 4.6 will not work with CUDA"
+      ewarn "Make sure you set an earlier version of gcc with gcc-config"
+		ewarn "or append --compiler-bindir= to the nvcc compiler flags"
+		ewarn "pointing to a gcc installation dir like"
+		ewarn "${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc4.6"
+   fi
+}
+
+EXPORT_FUNCTIONS pkg_postinst
+case "${EAPI:-0}" in
+   0|1|2|3|4|5) ;;
+   *) die "EAPI=${EAPI} is not supported" ;;
+esac
+


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-26 22:02 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-26 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     379f326a5bf8e98a08e6796cb57a02b683be151c
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 16 15:48:47 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Nov 26 14:41:09 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=379f326a

Add pkg_setup and gcc bindir detection

---
 eclass/cuda.eclass |   91 ++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 84 insertions(+), 7 deletions(-)

diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index 5a72d2f..3672d9e 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -9,16 +9,94 @@ inherit toolchain-funcs versionator
 # Justin Lecher <jlec@gentoo.org>
 # @BLURB: Common functions for cuda packages
 
-#  @ECLASS-VARIABLE: 
+# @ECLASS-VARIABLE: NVCCFLAGS
+# DESCRIPTION:
+# nvcc compiler flags (see nvcc --help)
+: ${NVCCFLAGS:=-O2}
 
+# @ECLASS-VARIABLE: CUDA_VERBOSE
+# DESCRIPTION:
+# Being verbose during compilation to see underlying commands
+: ${CUDA_VERBOSE:=true}
 
-# @ECLASS-FUNCTION: CUDA_SUPPORTED_GCC
+if [[ "${CUDA_VERBOSE}" == true ]]; then
+	NVCCFLAGS+=" -v"
+fi
+
+# @ECLASS-FUNCTION: cuda_gccdir
 # @DESCRIPTION:
-# Listing of gcc version slots supported by nvidia cuda tool.
-# Generally only needed py
+# Helper for determination of the latest bindir supported by nvidia cuda toolkit.
+#
+# Calling plain it returns simply the path, but you probably want to add \"-f\""
+# to get the full flag to add to nvcc call.
+#
+# cuda_gccdir-f
+# -> --compiler-bindir="/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"
+cuda_gccdir() {
+	local _gcc_bindir _ver _args="" _flag _ret
+
+	# Currently we only support the gnu compiler suite
+	if [[ $(tc-getCXX) != *g++* ]]; then
+		return 2
+	fi
+
+	while [ "$1" ]; do
+		case $1 in
+			-f)
+				_flag="--compiler-bindir="
+				;;
+			*)
+				;;
+		esac
+		shift
+	done
+
+	if [[ ! $(type -P cuda-config) ]]; then
+		eerror "Could not execute cuda-config"
+		eerror "Make sure >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 is installed"
+		die "cuda-config not found"
+	else
+		_args="$(version_sort $(cuda-config -s))"
+		if [[ ! -n ${_args} ]]; then
+			die "Could not determine supported gcc versions from cuda-config"
+		fi
+	fi
+
+	for _ver in ${_args}; do
+      has_version sys-devel/gcc:${_ver} && \
+         _gcc_bindir="$(ls -d ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${_ver}* | tail -n 1)"
+   done
+
+   if [[ -n ${_gcc_bindir} ]]; then
+		if [[ -n ${_flag} ]]; then
+			_ret="${_flag}\\\"${_gcc_bindir}\\\""
+		else
+	      _ret="${_gcc_bindir}"
+		fi
+		echo ${_ret}
+		return 0
+	else
+      eerror "Only gcc version(s) ${_args} are supported,"
+		eerror "of which none is installed"
+      die "Only gcc version(s) ${_args} are supported"
+      return 1
+   fi
+}
+
+cuda_pkg_setup() {
+	# Tell nvcc where to find a compatible compiler
+	NVCCFLAGS+=" $(cuda_gccdir -f)"
+
+	# Tell nvcc which flags should be used for underlying C compiler
+	NVCCFLAGS+=" --compiler-options=\"${CXXFLAGS}\""
+
+	export NVCCFLAGS
+}
 
 cuda_pkg_postinst() {
-   if [[ $(tc-getCC) == *gcc* ]] && version_is_at_least 4.7 "$(gcc-version)"; then
+	local a
+	a="$(version_sort $(cuda-config -s))"; a=($a)
+   if [[ $(tc-getCC) == *gcc* ]] && version_is_at_least "$(gcc-version)" ${a[1]}; then
       ewarn "gcc >= 4.6 will not work with CUDA"
       ewarn "Make sure you set an earlier version of gcc with gcc-config"
 		ewarn "or append --compiler-bindir= to the nvcc compiler flags"
@@ -27,9 +105,8 @@ cuda_pkg_postinst() {
    fi
 }
 
-EXPORT_FUNCTIONS pkg_postinst
+EXPORT_FUNCTIONS pkg_setup pkg_postinst
 case "${EAPI:-0}" in
    0|1|2|3|4|5) ;;
    *) die "EAPI=${EAPI} is not supported" ;;
 esac
-


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-26 22:02 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-26 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     e5900921b54bbeea7c60ef7459c25f67602afc90
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 23 17:20:55 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Nov 26 14:41:09 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e5900921

Add comments and streamline

* Adding @.. things for eclass man page creation
* Moving cuda_src_prepare functionality into cuda_sanitize and call it
from there

---
 eclass/cuda.eclass |   58 ++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 43 insertions(+), 15 deletions(-)

diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index 3672d9e..bfb326e 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-20012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
@@ -8,10 +8,20 @@ inherit toolchain-funcs versionator
 # @MAINTAINER:
 # Justin Lecher <jlec@gentoo.org>
 # @BLURB: Common functions for cuda packages
+# @DESCRIPTION:
+# This eclass contains functions to be used with cuda package. Currently its 
+# setting and/or sanitizing NVCCFLAGS, the compiler flags for nvcc. This is
+# automatically done and exported in src_prepare() or manually by calling
+# cuda_sanatize.
+#
+# Common usage:
+#
+# inherit cuda
 
 # @ECLASS-VARIABLE: NVCCFLAGS
 # DESCRIPTION:
-# nvcc compiler flags (see nvcc --help)
+# nvcc compiler flags (see nvcc --help), which should be used like
+# CFLAGS for c compiler
 : ${NVCCFLAGS:=-O2}
 
 # @ECLASS-VARIABLE: CUDA_VERBOSE
@@ -25,18 +35,22 @@ fi
 
 # @ECLASS-FUNCTION: cuda_gccdir
 # @DESCRIPTION:
-# Helper for determination of the latest bindir supported by nvidia cuda toolkit.
+# Helper for determination of the latest gcc bindir supported by 
+# then current nvidia cuda toolkit.
 #
 # Calling plain it returns simply the path, but you probably want to add \"-f\""
 # to get the full flag to add to nvcc call.
 #
-# cuda_gccdir-f
+# Example:
+#
+# cuda_gccdir -f
 # -> --compiler-bindir="/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"
 cuda_gccdir() {
 	local _gcc_bindir _ver _args="" _flag _ret
 
 	# Currently we only support the gnu compiler suite
 	if [[ $(tc-getCXX) != *g++* ]]; then
+        ewarn "Currently we only support the gnu compiler suite"
 		return 2
 	fi
 
@@ -76,14 +90,18 @@ cuda_gccdir() {
 		echo ${_ret}
 		return 0
 	else
-      eerror "Only gcc version(s) ${_args} are supported,"
+        eerror "Only gcc version(s) ${_args} are supported,"
 		eerror "of which none is installed"
-      die "Only gcc version(s) ${_args} are supported"
-      return 1
+        die "Only gcc version(s) ${_args} are supported"
+        return 1
    fi
 }
 
-cuda_pkg_setup() {
+# @ECLASS-FUNCTION: cuda_sanitize
+# @DESCRIPTION:
+# Correct NVCCFLAGS by adding the necessary reference to gcc bindir and
+# passing CXXFLAGS to underlying compiler without disturbing nvcc.
+cuda_sanitize() {
 	# Tell nvcc where to find a compatible compiler
 	NVCCFLAGS+=" $(cuda_gccdir -f)"
 
@@ -93,16 +111,26 @@ cuda_pkg_setup() {
 	export NVCCFLAGS
 }
 
+# @ECLASS-FUNCTION: cuda_pkg_setup
+# @DESCRIPTION:
+# Sanitise NVCCFLAGS by default in pkg_setup
+cuda_pkg_setup() {
+	cuda_sanitize
+}
+
+# @ECLASS-FUNCTION: cuda_pkg_setup
+# @DESCRIPTION:
+# 
 cuda_pkg_postinst() {
 	local a
 	a="$(version_sort $(cuda-config -s))"; a=($a)
-   if [[ $(tc-getCC) == *gcc* ]] && version_is_at_least "$(gcc-version)" ${a[1]}; then
-      ewarn "gcc >= 4.6 will not work with CUDA"
-      ewarn "Make sure you set an earlier version of gcc with gcc-config"
-		ewarn "or append --compiler-bindir= to the nvcc compiler flags"
-		ewarn "pointing to a gcc installation dir like"
-		ewarn "${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc4.6"
-   fi
+	if [[ $(tc-getCC) == *gcc* ]] && version_is_at_least "$(gcc-version)" ${a[1]}; then
+		ewarn "gcc >= ${a[1]} will not work with CUDA"
+		ewarn "Make sure you set an earlier version of gcc with gcc-config"
+		ewarn "or append --compiler-bindir= pointing to a gcc installation dir like"
+		ewarn "${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${a[1]}"
+		ewarn "to the nvcc compiler flags"
+	fi
 }
 
 EXPORT_FUNCTIONS pkg_setup pkg_postinst


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-26 22:02 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-26 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     9a9c461aa9e8d1228db9f2fd6997c25ced09351b
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 25 16:24:29 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Nov 26 14:41:09 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=9a9c461a

Correcting whitespace problem

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/cuda.eclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index fc6fe51..f8ebd81 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -9,7 +9,7 @@ inherit toolchain-funcs versionator
 # Justin Lecher <jlec@gentoo.org>
 # @BLURB: Common functions for cuda packages
 # @DESCRIPTION:
-# This eclass contains functions to be used with cuda package. Currently its 
+# This eclass contains functions to be used with cuda package. Currently it is
 # setting and/or sanitizing NVCCFLAGS, the compiler flags for nvcc. This is
 # automatically done and exported in src_prepare() or manually by calling
 # cuda_sanatize.
@@ -33,7 +33,7 @@ inherit toolchain-funcs versionator
 
 # @ECLASS-FUNCTION: cuda_gccdir
 # @DESCRIPTION:
-# Helper for determination of the latest gcc bindir supported by 
+# Helper for determination of the latest gcc bindir supported by
 # then current nvidia cuda toolkit.
 #
 # Calling plain it returns simply the path, but you probably want to add \"-f\""


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-26 22:02 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-26 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     29b356910d3541e158f36e07d8f3868fb0216835
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 25 16:03:42 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Nov 26 14:41:09 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=29b35691

Minor fixes

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/cuda.eclass |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index 3bb779a..fc6fe51 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -29,9 +29,7 @@ inherit toolchain-funcs versionator
 # Being verbose during compilation to see underlying commands
 : ${CUDA_VERBOSE:=true}
 
-if [[ "${CUDA_VERBOSE}" == true ]]; then
-	NVCCFLAGS+=" -v"
-fi
+[[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v"
 
 # @ECLASS-FUNCTION: cuda_gccdir
 # @DESCRIPTION:
@@ -90,10 +88,10 @@ cuda_gccdir() {
 		echo ${_ret}
 		return 0
 	else
-        eerror "Only gcc version(s) ${_args} are supported,"
+		eerror "Only gcc version(s) ${_args} are supported,"
 		eerror "of which none is installed"
-        die "Only gcc version(s) ${_args} are supported"
-        return 1
+		die "Only gcc version(s) ${_args} are supported"
+		return 1
    fi
 }
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     66c0cf496fa6588bd5df3b4bfaab6063b2676213
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 15 09:40:05 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:21:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=66c0cf49

import from tree

---
 eclass/intel-sdp.eclass |  260 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 260 insertions(+), 0 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
new file mode 100644
index 0000000..baeb2e2
--- /dev/null
+++ b/eclass/intel-sdp.eclass
@@ -0,0 +1,260 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/intel-sdp.eclass,v 1.4 2012/09/20 13:54:56 jlec Exp $
+
+# @ECLASS: intel-sdp.eclass
+# @MAINTAINER:
+# Sébastien Fabbro <bicatali@gentoo.org>
+# Justin Lecher <jlec@gentoo.org>
+# Sci Team <sci@gentoo.org>
+# @BLURB: Handling of Intel's Software Development Products package management
+
+# @ECLASS-VARIABLE: INTEL_DID
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package download ID from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. 2504
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_DPN
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package name to download from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. parallel_studio_xe
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_DPV
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package download version from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. 2011_sp1_update2
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_SUBDIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package sub-directory where it will end-up in /opt/intel
+# To find out its value, you have to do a raw install from the Intel tar ball
+
+# @ECLASS-VARIABLE: INTEL_RPMS_DIRS
+# @DESCRIPTION:
+# List of subdirectories in the main archive which contains the
+# rpms to extract.
+: ${INTEL_RPMS_DIRS:=rpm}
+
+# @ECLASS-VARIABLE: INTEL_X86
+# @DESCRIPTION:
+# 32bit arch in rpm names
+#
+# e.g. i484
+: ${INTEL_X86:=i486}
+
+# @ECLASS-VARIABLE: INTEL_BIN_RPMS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Functional name of rpm without any version/arch tag
+#
+# e.g. compilerprof
+
+# @ECLASS-VARIABLE: INTEL_DAT_RPMS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Functional name of rpm of common data which are arch free
+# without any version tag
+#
+# e.g. openmp
+
+inherit check-reqs multilib versionator
+
+_INTEL_PV1=$(get_version_component_range 1)
+_INTEL_PV2=$(get_version_component_range 2)
+_INTEL_PV3=$(get_version_component_range 3)
+_INTEL_PV4=$(get_version_component_range 4)
+_INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
+
+SRC_URI="
+	amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.tgz ) )
+	amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.tgz ) )
+	x86?  ( ${_INTEL_URI}_${INTEL_DPV}_ia32.tgz )"
+
+LICENSE="Intel-SDP"
+# Future work, #394411
+#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
+SLOT="0"
+IUSE="multilib"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+RESTRICT="mirror"
+
+RDEPEND=""
+DEPEND=">=app-arch/rpm2targz-9.0.0.3g"
+
+_INTEL_SDP_YEAR=${INTEL_DPV%_update*}
+_INTEL_SDP_YEAR=${INTEL_DPV%_sp*}
+
+# @ECLASS-VARIABLE: INTEL_SDP_DIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Full rootless path to installation dir
+
+INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}.${_INTEL_PV3}.${_INTEL_PV4}"
+
+# @ECLASS-VARIABLE: INTEL_SDP_EDIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Full rooted path to installation dir
+
+INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="${INTEL_SDP_DIR}/*"
+
+intel-sdp_pkg_pretend() {
+	: ${CHECKREQS_DISK_BUILD:=256M}
+	check-reqs_pkg_pretend
+}
+
+# @ECLASS-VARIABLE: INTEL_ARCH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Intels internal names of the arches; will be set at runtime accordingly
+#
+# e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
+
+intel-sdp_pkg_setup() {
+	local arch a p
+	if use x86; then
+		arch=${INTEL_X86}
+		INTEL_ARCH="ia32"
+	elif use amd64; then
+		arch=x86_64
+		INTEL_ARCH="intel64"
+		if has_multilib_profile; then
+			arch="x86_64 ${INTEL_X86}"
+			INTEL_ARCH="intel64 ia32"
+		fi
+	fi
+	INTEL_RPMS=""
+	for p in ${INTEL_BIN_RPMS}; do
+		for a in ${arch}; do
+			INTEL_RPMS="${INTEL_RPMS} intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm"
+		done
+	done
+	for p in ${INTEL_DAT_RPMS}; do
+		INTEL_RPMS="${INTEL_RPMS} intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm"
+	done
+
+	case "${EAPI:-0}" in
+		0|1|2|3) intel-sdp_pkg_pretend ;;
+	esac
+}
+
+intel-sdp_src_unpack() {
+	local l r t rpmdir
+	for t in ${A}; do
+		for r in ${INTEL_RPMS}; do
+			# Find which subdirectory of the archive the rpm is in
+			rpm_found="false"
+			for subdir in ${INTEL_RPMS_DIRS}; do
+				[[ "${rpm_found}" == "true" ]] && continue
+				rpmdir=${t%%.*}/${subdir}
+				l=.${r}_$(date +'%d%m%y_%H%M%S').log
+				tar xf "${DISTDIR}"/${t} ${rpmdir}/${r} 2> /dev/null || continue
+				einfo "Unpacking ${r}"
+				rpm_found="true"
+				rpm2tar -O "./${rpmdir}/${r}" | tar xvf - | sed -e \
+					"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
+				mv ${l} opt/intel/ || die "failed moving extract log file"
+			done
+		done
+	done
+	mv -v opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
+}
+
+intel_link_eclipse_plugins() {
+	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
+	local c f
+	for c in cdt*; do
+		local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
+		if has_version "dev-util/eclipse-sdk:${ev}"; then
+			einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
+			for f in cdt${cv}/eclipse/features/*; do
+				dodir /usr/$(get_libdir)/eclipse-${ev}/features
+				dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
+					/usr/$(get_libdir)/eclipse-${ev}/features/ || die
+			done
+			for f in cdt${cv}/eclipse/plugins/*; do
+				dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
+				dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
+					/usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
+			done
+		fi
+	done
+	popd > /dev/null
+}
+
+intel-sdp_src_install() {
+	[[ -d ${INTEL_SDP_DIR}/eclipse_support ]] && \
+		has eclipse ${IUSE} && \
+		use eclipse && \
+		intel_link_eclipse_plugins
+	einfo "Tagging ${PN}"
+	find opt -name \*sh -type f -exec sed -i \
+		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \
+		'{}' \;
+	mkdir -p "${ED:-${D}}"/ || die
+	mv opt "${ED:-${D}}"/ || die "moving files failed"
+}
+
+
+# @ECLASS-VARIABLE: INTEL_SDP_DB
+# @DESCRIPTION:
+# Full path to intel registry db
+INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
+
+intel-sdp_pkg_postinst() {
+	elog "Make sure you have recieved the an Intel license."
+	elog "To receive a non-commercial license, you need to register at:"
+	elog "http://software.intel.com/en-us/articles/non-commercial-software-development/"
+	elog "Install the license file into ${EROOT}opt/intel/licenses."
+
+	# add product registry to intel "database"
+	local l r
+	for r in ${INTEL_RPMS}; do
+		l="$(ls -1 ${EROOT%/}/opt/intel/.${r}_*.log | head -n 1)"
+		echo >> ${INTEL_SDP_DB} \
+			"<:${r%-${_INTEL_PV4}*}-${_INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>"
+	done
+}
+
+intel-sdp_pkg_postrm() {
+	# remove from intel "database"
+	if [[ -e ${INTEL_SDP_DB} ]]; then
+		local r
+		for r in ${INTEL_RPMS}; do
+			sed -i \
+				-e "/${r}/d" \
+				${INTEL_SDP_DB}
+		done
+	fi
+}
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm
+case "${EAPI:-0}" in
+	0|1|2|3) ;;
+	4) EXPORT_FUNCTIONS pkg_pretend ;;
+	*) die "EAPI=${EAPI} is not supported" ;;
+esac


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     9a969dc99214b0dcec3d2137dd997ec0a1ac357f
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 23 18:30:19 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:21:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=9a969dc9

Drop version restriction of rpm2targz

---
 eclass/intel-sdp.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index a58b93f..3577ec8 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -98,7 +98,7 @@ KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
 RESTRICT="mirror"
 
 RDEPEND=""
-DEPEND=">=app-arch/rpm2targz-9.0.0.3g"
+DEPEND="app-arch/rpm2targz"
 
 _INTEL_SDP_YEAR=${INTEL_DPV%_update*}
 _INTEL_SDP_YEAR=${INTEL_DPV%_sp*}


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     9f99559289c34154330b786bee028c8c5233dcd1
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 15 15:50:15 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:21:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=9f995592

Enhancement of intel-sdp.eclass

* Add support for USE="doc examples"
* Check for license before installation

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass |  220 ++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 206 insertions(+), 14 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index baeb2e2..eafb523 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -93,7 +93,7 @@ LICENSE="Intel-SDP"
 # Future work, #394411
 #SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
 SLOT="0"
-IUSE="multilib"
+IUSE="doc examples multilib"
 KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
 
 RESTRICT="mirror"
@@ -135,6 +135,23 @@ intel-sdp_pkg_pretend() {
 # e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
 
 intel-sdp_pkg_setup() {
+	local _warn=1 _dirs i _ret
+	_dirs=(
+		"${INTEL_SDP_EDIR}/licenses"
+		"${INTEL_SDP_EDIR}/Licenses"
+		"${EPREFIX}/opt/intel/licenses"
+		)
+	for ((i = 0; i < ${#_dirs[@]}; i++)); do
+		ebegin "Checking for a license in: ${_dirs[$i]}"
+		[[ $( ls "${_dirs[$i]}"/*lic 2>/dev/null ) ]]; _ret=$?
+		eend ${_ret}
+		if [[ ${_ret} == "0" ]]; then
+			_warn=${_ret}
+			break
+		fi
+	done
+	[[ ${_warn} == "0" ]] || big-warning pre-check
+
 	local arch a p
 	if use x86; then
 		arch=${INTEL_X86}
@@ -164,6 +181,7 @@ intel-sdp_pkg_setup() {
 
 intel-sdp_src_unpack() {
 	local l r t rpmdir
+	debug-print "INTEL_RPMS_DIRS are \"${INTEL_RPMS_DIRS}\""
 	for t in ${A}; do
 		for r in ${INTEL_RPMS}; do
 			# Find which subdirectory of the archive the rpm is in
@@ -179,6 +197,8 @@ intel-sdp_src_unpack() {
 					"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
 				mv ${l} opt/intel/ || die "failed moving extract log file"
 			done
+			[[ "${rpm_found}" == "false" ]] && \
+				debug-print "RPM \"${r}\" not found in ${t}"
 		done
 	done
 	mv -v opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
@@ -207,18 +227,194 @@ intel_link_eclipse_plugins() {
 }
 
 intel-sdp_src_install() {
-	[[ -d ${INTEL_SDP_DIR}/eclipse_support ]] && \
-		has eclipse ${IUSE} && \
-		use eclipse && \
-		intel_link_eclipse_plugins
+	if ! use doc && [[ -d "${INTEL_SDP_DIR}"/Documentation ]]; then
+		ebegin "Cleaning out documentation"
+		find "${INTEL_SDP_DIR}"/Documentation -delete || die
+		eend
+	fi
+	if ! use examples && [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
+		ebegin "Cleaning out examples"
+		find "${INTEL_SDP_DIR}"/Samples -delete || die
+		eend
+	fi
+	if [[ -d "${INTEL_SDP_DIR}"/eclipse_support ]]; then
+		if has eclipse ${IUSE} && use eclipse; then
+			intel_link_eclipse_plugins
+		else
+			ebegin "Cleaning out eclipse plugin"
+			find "${INTEL_SDP_DIR}"/eclipse_support -delete || die
+			eend
+		fi
+	fi
+
+	if [[ -d "${INTEL_SDP_DIR}"/man ]]; then
+		doman "${INTEL_SDP_DIR}"/man/en_US/man1/*
+		[[ ${LINGUAS} == "*ja_JP*" ]] && \
+			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*
+
+		find "${INTEL_SDP_DIR}"/man -delete || die
+	fi
+
 	einfo "Tagging ${PN}"
 	find opt -name \*sh -type f -exec sed -i \
 		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \
-		'{}' \;
-	mkdir -p "${ED:-${D}}"/ || die
-	mv opt "${ED:-${D}}"/ || die "moving files failed"
+		'{}' + || die
+
+	[[ -d "${ED}" ]] || dodir /
+	mv opt "${ED}"/ || die "moving files failed"
+
+	dodir "${INTEL_SDP_EDIR}"/licenses
+	keepdir "${INTEL_SDP_EDIR}"/licenses
 }
 
+# @ECLASS-FUNCTION: big-warning
+# @INTERNAL
+# warn user that we really require a license
+
+big-warning() {
+	case ${1} in
+		test-failed )
+			echo
+			ewarn "Function test failed. Most probably due to an invalid license."
+			ewarn "This means you already tried to bypass the license check once."
+			;;
+	esac
+
+	echo ""
+	ewarn "Make sure you have recieved the an Intel license."
+	ewarn "To receive a non-commercial license, you need to register at:"
+	ewarn "http://software.intel.com/en-us/articles/non-commercial-software-development/"
+	ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
+
+	case ${1} in
+		pre-check )
+			ewarn "before proceeding with installation of ${P}"
+			echo ""
+			;;
+		* )
+			echo ""
+			;;
+	esac
+}
+
+# @ECLASS-FUNCTION: _version_test
+# @INTERNAL
+# Testing for valid license by asking for version information of the compiler
+_version-test() {
+	local _comp _comp_full _arch _file _warn
+	case ${PN} in
+		ifc )
+			_comp=ifort
+			;;
+		icc )
+			_comp=icc
+			;;
+		*)
+			die "${PN} is not supported for testing"
+			;;
+	esac
+
+	for _arch in ${INTEL_ARCH}; do
+		case ${EBUILD_PHASE} in
+			install )
+				_comp_full="${ED}/${INTEL_SDP_DIR}/bin/${_arch}/${_comp}"
+				;;
+			postinst )
+				_comp_full="${INTEL_SDP_EDIR}/bin/${_arch}/${_comp}"
+				;;
+			* )
+				ewarn "Compile test not supported in ${EBUILD_PHASE}"
+				continue
+				;;
+		esac
+
+		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -V"
+
+		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -V &>/dev/null
+			[[ $? -ne 0 ]] && _warn=yes
+	done
+	[[ "${_warn}" == "yes" ]] && big-warning test-failed
+}
+
+# @ECLASS-FUNCTION: _compile-test
+# @INTERNAL
+# Testing for valid license with small compile test
+_compile-test() {
+	local _comp _comp_full _arch _file _warn
+	case ${1} in
+		fortran )
+			_file="${T}/${1}.f"
+			cat > "${_file}" <<- EOF
+			       end
+			EOF
+			_comp=ifort
+			;;
+		c )
+			_file="${T}/${1}.c"
+			cat > "${_file}" <<- EOF
+			main() {
+				;
+			}
+			EOF
+			_comp=icc
+			;;
+		*)
+			die "This ${1} is not supported for testing"
+			;;
+	esac
+
+	for _arch in ${INTEL_ARCH}; do
+		case ${EBUILD_PHASE} in
+			install )
+				_comp_full="${ED}/${INTEL_SDP_DIR}/bin/${_arch}/${_comp}"
+				;;
+			postinst )
+				_comp_full="${INTEL_SDP_EDIR}/bin/${_arch}/${_comp}"
+				;;
+			* )
+				ewarn "Compile test not supported in ${EBUILD_PHASE}"
+				continue
+				;;
+		esac
+
+#		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -c \"${_file}"
+
+#		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -c "${_file}" &>/dev/null
+
+		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -V"
+
+		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -V &>/dev/null
+			[[ $? -ne 0 ]] && _warn=yes
+	done
+	[[ "${_warn}" == "yes" ]] && big-warning test-failed
+}
+
+# @ECLASS-FUNCTION: _compile-fortran
+# @INTERNAL
+# Run fortran compile test
+_compile-fortran() { _compile-test fortran; }
+
+# @ECLASS-FUNCTION: _compile-c
+# @INTERNAL
+# Run c compile test
+_compile-c() { _compile-test c; }
+
+# @ECLASS-FUNCTION: run-test
+# @INTERNAL
+# Test if installed compiler is working
+run-test() {
+	case ${PN} in
+		ifc )
+			debug-print "Testing ifort"
+			_compile-fortran ;;
+		icc )
+			debug-print "Testing icc"
+			_compile-c ;;
+		* )
+			debug-print "No test available for ${PN}"
+			;;
+	esac
+}
 
 # @ECLASS-VARIABLE: INTEL_SDP_DB
 # @DESCRIPTION:
@@ -226,11 +422,6 @@ intel-sdp_src_install() {
 INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
 
 intel-sdp_pkg_postinst() {
-	elog "Make sure you have recieved the an Intel license."
-	elog "To receive a non-commercial license, you need to register at:"
-	elog "http://software.intel.com/en-us/articles/non-commercial-software-development/"
-	elog "Install the license file into ${EROOT}opt/intel/licenses."
-
 	# add product registry to intel "database"
 	local l r
 	for r in ${INTEL_RPMS}; do
@@ -238,6 +429,7 @@ intel-sdp_pkg_postinst() {
 		echo >> ${INTEL_SDP_DB} \
 			"<:${r%-${_INTEL_PV4}*}-${_INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>"
 	done
+	run-test
 }
 
 intel-sdp_pkg_postrm() {
@@ -255,6 +447,6 @@ intel-sdp_pkg_postrm() {
 EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm
 case "${EAPI:-0}" in
 	0|1|2|3) ;;
-	4) EXPORT_FUNCTIONS pkg_pretend ;;
+	4|5) EXPORT_FUNCTIONS pkg_pretend ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     0d6a5a94432ac04cf5afc93b4187c043d00e81bf
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 23 18:35:26 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:21:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0d6a5a94

Use clear += insteat of repeating variables

---
 eclass/intel-sdp.eclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 3577ec8..7ccd270 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -166,11 +166,11 @@ intel-sdp_pkg_setup() {
 	INTEL_RPMS=""
 	for p in ${INTEL_BIN_RPMS}; do
 		for a in ${arch}; do
-			INTEL_RPMS="${INTEL_RPMS} intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm"
+			INTEL_RPMS+=" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm"
 		done
 	done
 	for p in ${INTEL_DAT_RPMS}; do
-		INTEL_RPMS="${INTEL_RPMS} intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm"
+		INTEL_RPMS+=" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm"
 	done
 
 	case "${EAPI:-0}" in


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     ef23bf02c5af76a88cc27d23480d0f7d85bd10ad
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 23 18:38:23 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:21:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=ef23bf02

declare local variables at once

---
 eclass/intel-sdp.eclass |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 7ccd270..b982601 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -134,7 +134,7 @@ intel-sdp_pkg_pretend() {
 # e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
 
 intel-sdp_pkg_setup() {
-	local _warn=1 _dirs i _ret
+	local _warn=1 _dirs i _ret arch a p
 	_dirs=(
 		"${INTEL_SDP_EDIR}/licenses"
 		"${INTEL_SDP_EDIR}/Licenses"
@@ -151,7 +151,6 @@ intel-sdp_pkg_setup() {
 	done
 	[[ ${_warn} == "0" ]] || big-warning pre-check
 
-	local arch a p
 	if use x86; then
 		arch=${INTEL_X86}
 		INTEL_ARCH="ia32"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     fb6a9afe1a59aa13302044fe68f3c391d4368cee
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 23 18:48:37 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:21:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=fb6a9afe

Add descriptions to standard phase functions.

---
 eclass/intel-sdp.eclass |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index b982601..14dba83 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -133,6 +133,14 @@ intel-sdp_pkg_pretend() {
 #
 # e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
 
+# @ ECLASS-FUNCTION: intel-sdp_pkg_setup
+# @DESCRIPTION:
+# The setup finction serves two purposes:
+#
+# * Check that the user has a (valid) license file before going on.
+#
+# * Setting up and sorting some internal variables
+
 intel-sdp_pkg_setup() {
 	local _warn=1 _dirs i _ret arch a p
 	_dirs=(
@@ -177,6 +185,10 @@ intel-sdp_pkg_setup() {
 	esac
 }
 
+# @ ECLASS-FUNCTION: intel-sdp_src_unpack
+# @DESCRIPTION:
+# Unpacking necessary rpms from tarball, extract them and rearrange the output.
+
 intel-sdp_src_unpack() {
 	local l r t rpmdir
 	debug-print "INTEL_RPMS_DIRS are \"${INTEL_RPMS_DIRS}\""
@@ -224,6 +236,10 @@ intel_link_eclipse_plugins() {
 	popd > /dev/null
 }
 
+# @ ECLASS-FUNCTION: intel-sdp_src_install
+# @DESCRIPTION:
+# Install everything
+
 intel-sdp_src_install() {
 	if ! use doc && [[ -d "${INTEL_SDP_DIR}"/Documentation ]]; then
 		ebegin "Cleaning out documentation"
@@ -419,6 +435,10 @@ run-test() {
 # Full path to intel registry db
 INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
 
+# @ECLASS-FUNCTION
+# @DESCRIPTION:
+# Add things to intel database
+
 intel-sdp_pkg_postinst() {
 	# add product registry to intel "database"
 	local l r
@@ -430,6 +450,10 @@ intel-sdp_pkg_postinst() {
 	run-test
 }
 
+# @ECLASS-FUNCTION
+# @DESCRIPTION:
+# Sanitize intel database
+
 intel-sdp_pkg_postrm() {
 	# remove from intel "database"
 	if [[ -e ${INTEL_SDP_DB} ]]; then


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     85f8fc569d35d6691cec47ad5d594629ea9457f2
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 23 19:04:28 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:21:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=85f8fc56

Resort general functions and variables at the beginning

---
 eclass/intel-sdp.eclass |  356 ++++++++++++++++++++++++-----------------------
 1 files changed, 180 insertions(+), 176 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 14dba83..2037ed3 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -75,6 +75,11 @@
 #
 # e.g. openmp
 
+# @ECLASS-VARIABLE: INTEL_SDP_DB
+# @DESCRIPTION:
+# Full path to intel registry db
+INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
+
 inherit check-reqs multilib versionator
 
 _INTEL_PV1=$(get_version_component_range 1)
@@ -133,6 +138,181 @@ intel-sdp_pkg_pretend() {
 #
 # e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
 
+# @ECLASS-FUNCTION: intel_link_eclipse_plugins
+# @DESCRIPTION:
+# Creating necessary links to use intel compiler with eclipse
+intel_link_eclipse_plugins() {
+    local c f
+    pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
+        for c in cdt*; do
+            local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
+            if has_version "dev-util/eclipse-sdk:${ev}"; then
+                einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
+                for f in cdt${cv}/eclipse/features/*; do
+                    dodir /usr/$(get_libdir)/eclipse-${ev}/features
+                    dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
+                        /usr/$(get_libdir)/eclipse-${ev}/features/ || die
+                done
+                for f in cdt${cv}/eclipse/plugins/*; do
+                    dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
+                    dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
+                        /usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
+                done
+            fi
+        done
+    popd > /dev/null
+}
+
+# @ECLASS-FUNCTION: big-warning
+# @INTERNAL
+# warn user that we really require a license
+
+big-warning() {
+    case ${1} in
+        test-failed )
+            echo
+            ewarn "Function test failed. Most probably due to an invalid license."
+            ewarn "This means you already tried to bypass the license check once."
+            ;;
+    esac
+
+    echo ""
+    ewarn "Make sure you have recieved the an Intel license."
+    ewarn "To receive a non-commercial license, you need to register at:"
+    ewarn "http://software.intel.com/en-us/articles/non-commercial-software-development/"
+    ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
+
+    case ${1} in
+        pre-check )
+            ewarn "before proceeding with installation of ${P}"
+            echo ""
+            ;;
+        * )
+            echo ""
+            ;;
+            esac
+}
+
+# @ECLASS-FUNCTION: _version_test
+# @INTERNAL
+# Testing for valid license by asking for version information of the compiler
+_version-test() {
+    local _comp _comp_full _arch _file _warn
+    case ${PN} in
+        ifc )
+            _comp=ifort
+            ;;
+        icc )
+            _comp=icc
+            ;;
+        *)
+            die "${PN} is not supported for testing"
+            ;;
+    esac
+
+    for _arch in ${INTEL_ARCH}; do
+        case ${EBUILD_PHASE} in
+            install )
+                _comp_full="${ED}/${INTEL_SDP_DIR}/bin/${_arch}/${_comp}"
+                ;;
+            postinst )
+                _comp_full="${INTEL_SDP_EDIR}/bin/${_arch}/${_comp}"
+                ;;
+            * )
+                ewarn "Compile test not supported in ${EBUILD_PHASE}"
+                continue
+                ;;
+        esac
+
+        debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -V"
+
+        LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -V &>/dev/null
+        [[ $? -ne 0 ]] && _warn=yes
+    done
+    [[ "${_warn}" == "yes" ]] && big-warning test-failed
+}
+
+# @ECLASS-FUNCTION: _compile-test
+# @INTERNAL
+# Testing for valid license with small compile test
+_compile-test() {
+    local _comp _comp_full _arch _file _warn
+    case ${1} in
+        fortran )
+            _file="${T}/${1}.f"
+            cat > "${_file}" <<- EOF
+            end
+            EOF
+            _comp=ifort
+            ;;
+        c )
+            _file="${T}/${1}.c"
+            cat > "${_file}" <<- EOF
+            main() {
+            ;
+            }
+            EOF
+            _comp=icc
+            ;;
+        *)
+            die "This ${1} is not supported for testing"
+            ;;
+    esac
+
+    for _arch in ${INTEL_ARCH}; do
+        case ${EBUILD_PHASE} in
+            install )
+                _comp_full="${ED}/${INTEL_SDP_DIR}/bin/${_arch}/${_comp}"
+                ;;
+            postinst )
+                _comp_full="${INTEL_SDP_EDIR}/bin/${_arch}/${_comp}"
+                ;;
+            * )
+                ewarn "Compile test not supported in ${EBUILD_PHASE}"
+                continue
+                ;;
+        esac
+
+#		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -c \"${_file}"
+
+#		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -c "${_file}" &>/dev/null
+
+        debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -V"
+
+        LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -V &>/dev/null
+        [[ $? -ne 0 ]] && _warn=yes
+    done
+    [[ "${_warn}" == "yes" ]] && big-warning test-failed
+}
+
+# @ECLASS-FUNCTION: _compile-fortran
+# @INTERNAL
+# Run fortran compile test
+_compile-fortran() { _compile-test fortran; }
+
+# @ECLASS-FUNCTION: _compile-c
+# @INTERNAL
+# Run c compile test
+_compile-c() { _compile-test c; }
+
+# @ECLASS-FUNCTION: run-test
+# @INTERNAL
+# Test if installed compiler is working
+run-test() {
+    case ${PN} in
+        ifc )
+            debug-print "Testing ifort"
+            _compile-fortran ;;
+        icc )
+            debug-print "Testing icc"
+            _compile-c ;;
+        * )
+            debug-print "No test available for ${PN}"
+            ;;
+    esac
+}
+
+
 # @ ECLASS-FUNCTION: intel-sdp_pkg_setup
 # @DESCRIPTION:
 # The setup finction serves two purposes:
@@ -214,28 +394,6 @@ intel-sdp_src_unpack() {
 	mv -v opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
 }
 
-intel_link_eclipse_plugins() {
-	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
-	local c f
-	for c in cdt*; do
-		local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
-		if has_version "dev-util/eclipse-sdk:${ev}"; then
-			einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
-			for f in cdt${cv}/eclipse/features/*; do
-				dodir /usr/$(get_libdir)/eclipse-${ev}/features
-				dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
-					/usr/$(get_libdir)/eclipse-${ev}/features/ || die
-			done
-			for f in cdt${cv}/eclipse/plugins/*; do
-				dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
-				dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
-					/usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
-			done
-		fi
-	done
-	popd > /dev/null
-}
-
 # @ ECLASS-FUNCTION: intel-sdp_src_install
 # @DESCRIPTION:
 # Install everything
@@ -281,160 +439,6 @@ intel-sdp_src_install() {
 	keepdir "${INTEL_SDP_EDIR}"/licenses
 }
 
-# @ECLASS-FUNCTION: big-warning
-# @INTERNAL
-# warn user that we really require a license
-
-big-warning() {
-	case ${1} in
-		test-failed )
-			echo
-			ewarn "Function test failed. Most probably due to an invalid license."
-			ewarn "This means you already tried to bypass the license check once."
-			;;
-	esac
-
-	echo ""
-	ewarn "Make sure you have recieved the an Intel license."
-	ewarn "To receive a non-commercial license, you need to register at:"
-	ewarn "http://software.intel.com/en-us/articles/non-commercial-software-development/"
-	ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
-
-	case ${1} in
-		pre-check )
-			ewarn "before proceeding with installation of ${P}"
-			echo ""
-			;;
-		* )
-			echo ""
-			;;
-	esac
-}
-
-# @ECLASS-FUNCTION: _version_test
-# @INTERNAL
-# Testing for valid license by asking for version information of the compiler
-_version-test() {
-	local _comp _comp_full _arch _file _warn
-	case ${PN} in
-		ifc )
-			_comp=ifort
-			;;
-		icc )
-			_comp=icc
-			;;
-		*)
-			die "${PN} is not supported for testing"
-			;;
-	esac
-
-	for _arch in ${INTEL_ARCH}; do
-		case ${EBUILD_PHASE} in
-			install )
-				_comp_full="${ED}/${INTEL_SDP_DIR}/bin/${_arch}/${_comp}"
-				;;
-			postinst )
-				_comp_full="${INTEL_SDP_EDIR}/bin/${_arch}/${_comp}"
-				;;
-			* )
-				ewarn "Compile test not supported in ${EBUILD_PHASE}"
-				continue
-				;;
-		esac
-
-		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -V"
-
-		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -V &>/dev/null
-			[[ $? -ne 0 ]] && _warn=yes
-	done
-	[[ "${_warn}" == "yes" ]] && big-warning test-failed
-}
-
-# @ECLASS-FUNCTION: _compile-test
-# @INTERNAL
-# Testing for valid license with small compile test
-_compile-test() {
-	local _comp _comp_full _arch _file _warn
-	case ${1} in
-		fortran )
-			_file="${T}/${1}.f"
-			cat > "${_file}" <<- EOF
-			       end
-			EOF
-			_comp=ifort
-			;;
-		c )
-			_file="${T}/${1}.c"
-			cat > "${_file}" <<- EOF
-			main() {
-				;
-			}
-			EOF
-			_comp=icc
-			;;
-		*)
-			die "This ${1} is not supported for testing"
-			;;
-	esac
-
-	for _arch in ${INTEL_ARCH}; do
-		case ${EBUILD_PHASE} in
-			install )
-				_comp_full="${ED}/${INTEL_SDP_DIR}/bin/${_arch}/${_comp}"
-				;;
-			postinst )
-				_comp_full="${INTEL_SDP_EDIR}/bin/${_arch}/${_comp}"
-				;;
-			* )
-				ewarn "Compile test not supported in ${EBUILD_PHASE}"
-				continue
-				;;
-		esac
-
-#		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -c \"${_file}"
-
-#		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -c "${_file}" &>/dev/null
-
-		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -V"
-
-		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -V &>/dev/null
-			[[ $? -ne 0 ]] && _warn=yes
-	done
-	[[ "${_warn}" == "yes" ]] && big-warning test-failed
-}
-
-# @ECLASS-FUNCTION: _compile-fortran
-# @INTERNAL
-# Run fortran compile test
-_compile-fortran() { _compile-test fortran; }
-
-# @ECLASS-FUNCTION: _compile-c
-# @INTERNAL
-# Run c compile test
-_compile-c() { _compile-test c; }
-
-# @ECLASS-FUNCTION: run-test
-# @INTERNAL
-# Test if installed compiler is working
-run-test() {
-	case ${PN} in
-		ifc )
-			debug-print "Testing ifort"
-			_compile-fortran ;;
-		icc )
-			debug-print "Testing icc"
-			_compile-c ;;
-		* )
-			debug-print "No test available for ${PN}"
-			;;
-	esac
-}
-
-# @ECLASS-VARIABLE: INTEL_SDP_DB
-# @DESCRIPTION:
-# Full path to intel registry db
-INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
-
 # @ECLASS-FUNCTION
 # @DESCRIPTION:
 # Add things to intel database


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     cd4f5668d72f6b183ac4717fe2c920853c8a12c9
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 23 21:05:01 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:21:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=cd4f5668

Drop additional blank lines.

---
 eclass/intel-sdp.eclass |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index a7d2c22..b84f05f 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -112,14 +112,12 @@ _INTEL_SDP_YEAR=${INTEL_DPV%_sp*}
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # Full rootless path to installation dir
-
 INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}.${_INTEL_PV3}.${_INTEL_PV4}"
 
 # @ECLASS-VARIABLE: INTEL_SDP_EDIR
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # Full rooted path to installation dir
-
 INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
 
 S="${WORKDIR}"
@@ -166,7 +164,6 @@ intel_link_eclipse_plugins() {
 # @ECLASS-FUNCTION: big-warning
 # @INTERNAL
 # warn user that we really require a license
-
 big-warning() {
     case ${1} in
         test-failed )
@@ -247,7 +244,6 @@ run-test() {
     esac
 }
 
-
 # @ ECLASS-FUNCTION: intel-sdp_pkg_setup
 # @DESCRIPTION:
 # The setup finction serves two purposes:
@@ -255,7 +251,6 @@ run-test() {
 # * Check that the user has a (valid) license file before going on.
 #
 # * Setting up and sorting some internal variables
-
 intel-sdp_pkg_setup() {
 	local _warn=1 _dirs i _ret arch a p
 	_dirs=(
@@ -303,7 +298,6 @@ intel-sdp_pkg_setup() {
 # @ ECLASS-FUNCTION: intel-sdp_src_unpack
 # @DESCRIPTION:
 # Unpacking necessary rpms from tarball, extract them and rearrange the output.
-
 intel-sdp_src_unpack() {
 	local l r t rpmdir
 	debug-print "INTEL_RPMS_DIRS are \"${INTEL_RPMS_DIRS}\""
@@ -332,7 +326,6 @@ intel-sdp_src_unpack() {
 # @ ECLASS-FUNCTION: intel-sdp_src_install
 # @DESCRIPTION:
 # Install everything
-
 intel-sdp_src_install() {
 	if ! use doc && [[ -d "${INTEL_SDP_DIR}"/Documentation ]]; then
 		ebegin "Cleaning out documentation"
@@ -377,7 +370,6 @@ intel-sdp_src_install() {
 # @ECLASS-FUNCTION
 # @DESCRIPTION:
 # Add things to intel database
-
 intel-sdp_pkg_postinst() {
 	# add product registry to intel "database"
 	local l r
@@ -392,7 +384,6 @@ intel-sdp_pkg_postinst() {
 # @ECLASS-FUNCTION
 # @DESCRIPTION:
 # Sanitize intel database
-
 intel-sdp_pkg_postrm() {
 	# remove from intel "database"
 	if [[ -e ${INTEL_SDP_DB} ]]; then


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     768ec2393f689112e3ec0da96d330cd731f182f2
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 25 09:51:00 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:21:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=768ec239

Speed up unpacking #431614

---
 eclass/intel-sdp.eclass |   29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index b84f05f..71fe219 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -299,28 +299,27 @@ intel-sdp_pkg_setup() {
 # @DESCRIPTION:
 # Unpacking necessary rpms from tarball, extract them and rearrange the output.
 intel-sdp_src_unpack() {
-	local l r t rpmdir
-	debug-print "INTEL_RPMS_DIRS are \"${INTEL_RPMS_DIRS}\""
+	local l r subdir rb t list=()
+
 	for t in ${A}; do
 		for r in ${INTEL_RPMS}; do
-			# Find which subdirectory of the archive the rpm is in
-			rpm_found="false"
 			for subdir in ${INTEL_RPMS_DIRS}; do
-				[[ "${rpm_found}" == "true" ]] && continue
 				rpmdir=${t%%.*}/${subdir}
-				l=.${r}_$(date +'%d%m%y_%H%M%S').log
-				tar xf "${DISTDIR}"/${t} ${rpmdir}/${r} 2> /dev/null || continue
-				einfo "Unpacking ${r}"
-				rpm_found="true"
-				rpm2tar -O "./${rpmdir}/${r}" | tar xvf - | sed -e \
-					"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
-				mv ${l} opt/intel/ || die "failed moving extract log file"
+				list+=( ${rpmdir}/${r})
 			done
-			[[ "${rpm_found}" == "false" ]] && \
-				debug-print "RPM \"${r}\" not found in ${t}"
+		done
+		tar xf "${DISTDIR}"/${t} ${list[@]}  2> /dev/null || die
+		for r in ${list[@]}; do
+			rb=$(basename ${r})
+			l=.${rb}_$(date +'%d%m%y_%H%M%S').log
+			einfo "Unpacking ${rb}"
+			rpm2tar -O ${r} | tar xvf - | sed -e \
+				"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
+			mv ${l} opt/intel/ || die "failed moving extract log file"
 		done
 	done
-	mv -v opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
+
+	mv opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
 }
 
 # @ ECLASS-FUNCTION: intel-sdp_src_install


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     0f94319a163310335945a1a5a67890a074163b7c
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 23 19:09:16 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:21:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0f94319a

Drop old testing functions

---
 eclass/intel-sdp.eclass |   73 ++--------------------------------------------
 1 files changed, 4 insertions(+), 69 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 2037ed3..a7d2c22 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -200,9 +200,11 @@ _version-test() {
     local _comp _comp_full _arch _file _warn
     case ${PN} in
         ifc )
+            debug-print "Testing ifort"
             _comp=ifort
             ;;
         icc )
+            debug-print "Testing icc"
             _comp=icc
             ;;
         *)
@@ -232,80 +234,13 @@ _version-test() {
     [[ "${_warn}" == "yes" ]] && big-warning test-failed
 }
 
-# @ECLASS-FUNCTION: _compile-test
-# @INTERNAL
-# Testing for valid license with small compile test
-_compile-test() {
-    local _comp _comp_full _arch _file _warn
-    case ${1} in
-        fortran )
-            _file="${T}/${1}.f"
-            cat > "${_file}" <<- EOF
-            end
-            EOF
-            _comp=ifort
-            ;;
-        c )
-            _file="${T}/${1}.c"
-            cat > "${_file}" <<- EOF
-            main() {
-            ;
-            }
-            EOF
-            _comp=icc
-            ;;
-        *)
-            die "This ${1} is not supported for testing"
-            ;;
-    esac
-
-    for _arch in ${INTEL_ARCH}; do
-        case ${EBUILD_PHASE} in
-            install )
-                _comp_full="${ED}/${INTEL_SDP_DIR}/bin/${_arch}/${_comp}"
-                ;;
-            postinst )
-                _comp_full="${INTEL_SDP_EDIR}/bin/${_arch}/${_comp}"
-                ;;
-            * )
-                ewarn "Compile test not supported in ${EBUILD_PHASE}"
-                continue
-                ;;
-        esac
-
-#		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -c \"${_file}"
-
-#		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -c "${_file}" &>/dev/null
-
-        debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -V"
-
-        LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -V &>/dev/null
-        [[ $? -ne 0 ]] && _warn=yes
-    done
-    [[ "${_warn}" == "yes" ]] && big-warning test-failed
-}
-
-# @ECLASS-FUNCTION: _compile-fortran
-# @INTERNAL
-# Run fortran compile test
-_compile-fortran() { _compile-test fortran; }
-
-# @ECLASS-FUNCTION: _compile-c
-# @INTERNAL
-# Run c compile test
-_compile-c() { _compile-test c; }
-
 # @ECLASS-FUNCTION: run-test
 # @INTERNAL
 # Test if installed compiler is working
 run-test() {
     case ${PN} in
-        ifc )
-            debug-print "Testing ifort"
-            _compile-fortran ;;
-        icc )
-            debug-print "Testing icc"
-            _compile-c ;;
+        ifc | icc )
+            _version_test ;;
         * )
             debug-print "No test available for ${PN}"
             ;;


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-27 19:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-27 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     aaf8c43554e77bc06aa9c2ba99777b9e787ad17d
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 27 19:32:20 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 19:32:20 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=aaf8c435

Drop USE=doc and add static-libs support

Implementing suggestion from g-dev review.
* Dropping USE=doc and rely on FEATURES=nodoc
* Use LINGUAS USE_EXAND for detection of japanese

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 71fe219..a3942ff 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -97,7 +97,7 @@ LICENSE="Intel-SDP"
 # Future work, #394411
 #SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
 SLOT="0"
-IUSE="doc examples multilib"
+IUSE="examples multilib static-libs"
 KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
 
 RESTRICT="mirror"
@@ -326,16 +326,20 @@ intel-sdp_src_unpack() {
 # @DESCRIPTION:
 # Install everything
 intel-sdp_src_install() {
-	if ! use doc && [[ -d "${INTEL_SDP_DIR}"/Documentation ]]; then
-		ebegin "Cleaning out documentation"
-		find "${INTEL_SDP_DIR}"/Documentation -delete || die
-		eend
-	fi
-	if ! use examples && [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
-		ebegin "Cleaning out examples"
-		find "${INTEL_SDP_DIR}"/Samples -delete || die
-		eend
+	dodoc -r "${INTEL_SDP_DIR}"/Documentation/*
+
+	ebegin "Cleaning out documentation"
+	find "${INTEL_SDP_DIR}"/Documentation -delete || die
+	eend
+
+	if use examples && [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
+		insinto /usr/share/${P}/examples/
+		doins -r "${INTEL_SDP_DIR}"/Samples/*
 	fi
+	ebegin "Cleaning out examples"
+	find "${INTEL_SDP_DIR}"/Samples -delete || die
+	eend
+
 	if [[ -d "${INTEL_SDP_DIR}"/eclipse_support ]]; then
 		if has eclipse ${IUSE} && use eclipse; then
 			intel_link_eclipse_plugins
@@ -348,16 +352,20 @@ intel-sdp_src_install() {
 
 	if [[ -d "${INTEL_SDP_DIR}"/man ]]; then
 		doman "${INTEL_SDP_DIR}"/man/en_US/man1/*
-		[[ ${LINGUAS} == "*ja_JP*" ]] && \
+		use linguas_ja && \
 			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*
 
 		find "${INTEL_SDP_DIR}"/man -delete || die
 	fi
 
-	einfo "Tagging ${PN}"
+	use statc-libs || \
+		find opt -type f -name "*.a" -delete || die
+
+	ebegin "Tagging ${PN}"
 	find opt -name \*sh -type f -exec sed -i \
 		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \
 		'{}' + || die
+	eend
 
 	[[ -d "${ED}" ]] || dodir /
 	mv opt "${ED}"/ || die "moving files failed"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-28  5:29 Christoph Junghans
  0 siblings, 0 replies; 169+ messages in thread
From: Christoph Junghans @ 2012-11-28  5:29 UTC (permalink / raw
  To: gentoo-commits

commit:     f2368464e2cfa6042694f26c759a8158384ab3c3
Author:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 28 05:19:44 2012 +0000
Commit:     Christoph Junghans <kleiner_otti <AT> gmx <DOT> de>
CommitDate: Wed Nov 28 05:24:18 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=f2368464

intel-sdp.eclass: fix install on x86 + qa

* only process Samples dir if existing
* typo: _version-test -> _version_test
* qa: check if linguas_ja is in IUSE before using it
* typo: check statc-libs -> static-libs

---
 eclass/intel-sdp.eclass |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index a3942ff..6952516 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -193,7 +193,7 @@ big-warning() {
 # @ECLASS-FUNCTION: _version_test
 # @INTERNAL
 # Testing for valid license by asking for version information of the compiler
-_version-test() {
+_version_test() {
     local _comp _comp_full _arch _file _warn
     case ${PN} in
         ifc )
@@ -332,13 +332,15 @@ intel-sdp_src_install() {
 	find "${INTEL_SDP_DIR}"/Documentation -delete || die
 	eend
 
-	if use examples && [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
-		insinto /usr/share/${P}/examples/
-		doins -r "${INTEL_SDP_DIR}"/Samples/*
+	if [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
+		if use examples ; then
+			insinto /usr/share/${P}/examples/
+			doins -r "${INTEL_SDP_DIR}"/Samples/*
+		fi
+		ebegin "Cleaning out examples"
+		find "${INTEL_SDP_DIR}"/Samples -delete || die
+		eend
 	fi
-	ebegin "Cleaning out examples"
-	find "${INTEL_SDP_DIR}"/Samples -delete || die
-	eend
 
 	if [[ -d "${INTEL_SDP_DIR}"/eclipse_support ]]; then
 		if has eclipse ${IUSE} && use eclipse; then
@@ -352,13 +354,14 @@ intel-sdp_src_install() {
 
 	if [[ -d "${INTEL_SDP_DIR}"/man ]]; then
 		doman "${INTEL_SDP_DIR}"/man/en_US/man1/*
-		use linguas_ja && \
+		if has linguas_ja ${IUSE} && use linguas_ja; then
 			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*
+		fi
 
 		find "${INTEL_SDP_DIR}"/man -delete || die
 	fi
 
-	use statc-libs || \
+	use static-libs || \
 		find opt -type f -name "*.a" -delete || die
 
 	ebegin "Tagging ${PN}"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-28  7:22 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-28  7:22 UTC (permalink / raw
  To: gentoo-commits

commit:     e53156f9c955a50c22dbde620261afae7944e75a
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 28 07:22:11 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Nov 28 07:22:11 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e53156f9

Only handle documentation if present

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 6952516..badb68b 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -326,11 +326,13 @@ intel-sdp_src_unpack() {
 # @DESCRIPTION:
 # Install everything
 intel-sdp_src_install() {
-	dodoc -r "${INTEL_SDP_DIR}"/Documentation/*
+	if [[ -d "${INTEL_SDP_DIR}"/Documentation ]]; then
+		dodoc -r "${INTEL_SDP_DIR}"/Documentation/*
 
-	ebegin "Cleaning out documentation"
-	find "${INTEL_SDP_DIR}"/Documentation -delete || die
-	eend
+		ebegin "Cleaning out documentation"
+		find "${INTEL_SDP_DIR}"/Documentation -delete || die
+		eend
+	fi
 
 	if [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
 		if use examples ; then


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-29  7:03 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-29  7:03 UTC (permalink / raw
  To: gentoo-commits

commit:     366a690925f5cc5e4bdd2ea984d9ccca65d8f996
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 28 10:54:16 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Nov 28 10:54:16 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=366a6909

Be bin package friendly

Move standard call of cuda_sanitize to src_prepapere as it isn't need
for bin packages.

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/cuda.eclass |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index 08cfb72..beac082 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -110,13 +110,23 @@ cuda_sanitize() {
 
 # @FUNCTION: cuda_pkg_setup
 # @DESCRIPTION:
-# Sanitise and export NVCCFLAGS by default
+# Call cuda_src_prepare for EAPIs not supporting src_prepare
 cuda_pkg_setup() {
+	cuda_src_prepare
+}
+
+# @FUNCTION: cuda_src_prepare
+# @DESCRIPTION:
+# Sanitise and export NVCCFLAGS by default
+cuda_src_prepare() {
 	cuda_sanitize
 }
 
-EXPORT_FUNCTIONS pkg_setup
+
 case "${EAPI:-0}" in
-	0|1|2|3|4|5) ;;
+	0|1)
+		EXPORT_FUNCTIONS pkg_setup ;;
+	2|3|4|5)
+		EXPORT_FUNCTIONS src_prepare ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-29  7:03 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-29  7:03 UTC (permalink / raw
  To: gentoo-commits

commit:     07b5a629a7f6e9f163e0dfe9c1927010f527508f
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 28 10:24:51 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Nov 28 10:24:51 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=07b5a629

Fix typo in Copyright year

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/cuda.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index 0b2e084..08cfb72 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-20012 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-29  7:03 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-29  7:03 UTC (permalink / raw
  To: gentoo-commits

commit:     e4eaa4da3b98bbcebcc90a5131ac3f72a7f258d2
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 28 11:58:48 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Nov 28 11:58:48 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e4eaa4da

Implemented comments from g-dev review

* Fix whitespacing
* Fix man pages tags
* rename local functions to somethings which potentionaly doesn't
conflict globally
* remove _ from local variables
* Move checks from pkg_setup to pkg_pretend

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass |  255 +++++++++++++++++++++++++----------------------
 1 files changed, 136 insertions(+), 119 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index badb68b..1b60514 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -91,7 +91,7 @@ _INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${
 SRC_URI="
 	amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.tgz ) )
 	amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.tgz ) )
-	x86?  ( ${_INTEL_URI}_${INTEL_DPV}_ia32.tgz )"
+	x86?	( ${_INTEL_URI}_${INTEL_DPV}_ia32.tgz )"
 
 LICENSE="Intel-SDP"
 # Future work, #394411
@@ -124,11 +124,6 @@ S="${WORKDIR}"
 
 QA_PREBUILT="${INTEL_SDP_DIR}/*"
 
-intel-sdp_pkg_pretend() {
-	: ${CHECKREQS_DISK_BUILD:=256M}
-	check-reqs_pkg_pretend
-}
-
 # @ECLASS-VARIABLE: INTEL_ARCH
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -136,138 +131,160 @@ intel-sdp_pkg_pretend() {
 #
 # e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
 
-# @ECLASS-FUNCTION: intel_link_eclipse_plugins
+# @FUNCTION: _isdp_link_eclipse_plugins
+# @INTERNAL
 # @DESCRIPTION:
 # Creating necessary links to use intel compiler with eclipse
-intel_link_eclipse_plugins() {
-    local c f
-    pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
-        for c in cdt*; do
-            local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
-            if has_version "dev-util/eclipse-sdk:${ev}"; then
-                einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
-                for f in cdt${cv}/eclipse/features/*; do
-                    dodir /usr/$(get_libdir)/eclipse-${ev}/features
-                    dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
-                        /usr/$(get_libdir)/eclipse-${ev}/features/ || die
-                done
-                for f in cdt${cv}/eclipse/plugins/*; do
-                    dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
-                    dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
-                        /usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
-                done
-            fi
-        done
-    popd > /dev/null
+_isdp_link_eclipse_plugins() {
+	local c f
+	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
+		for c in cdt*; do
+			local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
+			if has_version "dev-util/eclipse-sdk:${ev}"; then
+				einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
+				for f in cdt${cv}/eclipse/features/*; do
+					dodir /usr/$(get_libdir)/eclipse-${ev}/features
+					dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
+						/usr/$(get_libdir)/eclipse-${ev}/features/ || die
+				done
+				for f in cdt${cv}/eclipse/plugins/*; do
+					dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
+					dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
+						/usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
+				done
+			fi
+		done
+	popd > /dev/null
 }
 
-# @ECLASS-FUNCTION: big-warning
+# @FUNCTION: _isdp_big-warning
+# @USAGE: [pre-check | test-failed]
 # @INTERNAL
+# @DESCRIPTION:
 # warn user that we really require a license
-big-warning() {
-    case ${1} in
-        test-failed )
-            echo
-            ewarn "Function test failed. Most probably due to an invalid license."
-            ewarn "This means you already tried to bypass the license check once."
-            ;;
-    esac
-
-    echo ""
-    ewarn "Make sure you have recieved the an Intel license."
-    ewarn "To receive a non-commercial license, you need to register at:"
-    ewarn "http://software.intel.com/en-us/articles/non-commercial-software-development/"
-    ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
-
-    case ${1} in
-        pre-check )
-            ewarn "before proceeding with installation of ${P}"
-            echo ""
-            ;;
-        * )
-            echo ""
-            ;;
-            esac
+_isdp_big-warning() {
+	case ${1} in
+		pre-check )
+			echo ""
+			ewarn "License file not found!"
+			;;
+
+		test-failed )
+			echo
+			ewarn "Function test failed. Most probably due to an invalid license."
+			ewarn "This means you already tried to bypass the license check once."
+			;;
+	esac
+
+	echo ""
+	ewarn "Make sure you have recieved the an Intel license."
+	ewarn "To receive a non-commercial license, you need to register at:"
+	ewarn "http://software.intel.com/en-us/articles/non-commercial-software-development/"
+	ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
+
+	case ${1} in
+		pre-check )
+			ewarn "before proceeding with installation of ${P}"
+			echo ""
+			;;
+		* )
+			echo ""
+			;;
+			esac
 }
 
-# @ECLASS-FUNCTION: _version_test
+# @FUNCTION: _isdp_version_test
 # @INTERNAL
+# @DESCRIPTION:
 # Testing for valid license by asking for version information of the compiler
-_version_test() {
-    local _comp _comp_full _arch _file _warn
-    case ${PN} in
-        ifc )
-            debug-print "Testing ifort"
-            _comp=ifort
-            ;;
-        icc )
-            debug-print "Testing icc"
-            _comp=icc
-            ;;
-        *)
-            die "${PN} is not supported for testing"
-            ;;
-    esac
-
-    for _arch in ${INTEL_ARCH}; do
-        case ${EBUILD_PHASE} in
-            install )
-                _comp_full="${ED}/${INTEL_SDP_DIR}/bin/${_arch}/${_comp}"
-                ;;
-            postinst )
-                _comp_full="${INTEL_SDP_EDIR}/bin/${_arch}/${_comp}"
-                ;;
-            * )
-                ewarn "Compile test not supported in ${EBUILD_PHASE}"
-                continue
-                ;;
-        esac
-
-        debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -V"
-
-        LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -V &>/dev/null
-        [[ $? -ne 0 ]] && _warn=yes
-    done
-    [[ "${_warn}" == "yes" ]] && big-warning test-failed
+_isdp_version_test() {
+	local comp comp_full arch warn
+	case ${PN} in
+		ifc )
+			debug-print "Testing ifort"
+			comp=ifort
+			;;
+		icc )
+			debug-print "Testing icc"
+			comp=icc
+			;;
+		*)
+			die "${PN} is not supported for testing"
+			;;
+	esac
+
+	for arch in ${INTEL_ARCH}; do
+		case ${EBUILD_PHASE} in
+			install )
+				comp_full="${ED}/${INTEL_SDP_DIR}/bin/${arch}/${comp}"
+				;;
+			postinst )
+				comp_full="${INTEL_SDP_EDIR}/bin/${arch}/${comp}"
+				;;
+			* )
+				ewarn "Compile test not supported in ${EBUILD_PHASE}"
+				continue
+				;;
+		esac
+
+		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${arch}/\" \"${comp_full}\" -V"
+
+		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${arch}/" "${comp_full}" -V &>/dev/null
+		[[ $? -ne 0 ]] && warn=yes
+	done
+	[[ "${warn}" == "yes" ]] && _isdp_big-warning test-failed
 }
 
-# @ECLASS-FUNCTION: run-test
+# @FUNCTION: _isdp_run-test
 # @INTERNAL
 # Test if installed compiler is working
-run-test() {
-    case ${PN} in
-        ifc | icc )
-            _version_test ;;
-        * )
-            debug-print "No test available for ${PN}"
-            ;;
-    esac
+_isdp_run-test() {
+	case ${PN} in
+		ifc | icc )
+			_isdp_version_test ;;
+		* )
+			debug-print "No test available for ${PN}"
+			;;
+	esac
 }
 
-# @ ECLASS-FUNCTION: intel-sdp_pkg_setup
+# @FUNCTION: intel-sdp_pkg_pretend
 # @DESCRIPTION:
-# The setup finction serves two purposes:
-#
+# @CODE
 # * Check that the user has a (valid) license file before going on.
-#
-# * Setting up and sorting some internal variables
-intel-sdp_pkg_setup() {
-	local _warn=1 _dirs i _ret arch a p
+# * Check for space requirements being fullfilled
+# @CODE
+intel-sdp_pkg_pretend() {
+	local warn=1 dir dirs i ret arch a p
+
+	: ${CHECKREQS_DISK_BUILD:=256M}
+	check-reqs_pkg_pretend
+
 	_dirs=(
 		"${INTEL_SDP_EDIR}/licenses"
 		"${INTEL_SDP_EDIR}/Licenses"
 		"${EPREFIX}/opt/intel/licenses"
 		)
-	for ((i = 0; i < ${#_dirs[@]}; i++)); do
-		ebegin "Checking for a license in: ${_dirs[$i]}"
-		[[ $( ls "${_dirs[$i]}"/*lic 2>/dev/null ) ]]; _ret=$?
-		eend ${_ret}
-		if [[ ${_ret} == "0" ]]; then
-			_warn=${_ret}
+	for dir in "${dirs[@]}" ; do
+		ebegin "Checking for a license in: ${dirs[$i]}"
+		[[ $( ls "${dirs[$i]}"/*lic 2>/dev/null ) ]]; ret=$?
+		eend ${ret}
+		if [[ ${ret} == "0" ]]; then
+			warn=${ret}
 			break
 		fi
 	done
-	[[ ${_warn} == "0" ]] || big-warning pre-check
+	if [[ ${warn} == "1" ]]; then
+		_isdp_big-warning pre-check
+		die "Could not find license file"
+	fi
+}
+
+# @FUNCTION: intel-sdp_pkg_setup
+# @DESCRIPTION:
+# Setting up and sorting some internal variables
+intel-sdp_pkg_setup() {
+	local arch a p
 
 	if use x86; then
 		arch=${INTEL_X86}
@@ -295,7 +312,7 @@ intel-sdp_pkg_setup() {
 	esac
 }
 
-# @ ECLASS-FUNCTION: intel-sdp_src_unpack
+# @FUNCTION: intel-sdp_src_unpack
 # @DESCRIPTION:
 # Unpacking necessary rpms from tarball, extract them and rearrange the output.
 intel-sdp_src_unpack() {
@@ -308,7 +325,7 @@ intel-sdp_src_unpack() {
 				list+=( ${rpmdir}/${r})
 			done
 		done
-		tar xf "${DISTDIR}"/${t} ${list[@]}  2> /dev/null || die
+		tar xf "${DISTDIR}"/${t} ${list[@]}	2> /dev/null || die
 		for r in ${list[@]}; do
 			rb=$(basename ${r})
 			l=.${rb}_$(date +'%d%m%y_%H%M%S').log
@@ -322,7 +339,7 @@ intel-sdp_src_unpack() {
 	mv opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
 }
 
-# @ ECLASS-FUNCTION: intel-sdp_src_install
+# @FUNCTION: intel-sdp_src_install
 # @DESCRIPTION:
 # Install everything
 intel-sdp_src_install() {
@@ -346,7 +363,7 @@ intel-sdp_src_install() {
 
 	if [[ -d "${INTEL_SDP_DIR}"/eclipse_support ]]; then
 		if has eclipse ${IUSE} && use eclipse; then
-			intel_link_eclipse_plugins
+			_isdp_link_eclipse_plugins
 		else
 			ebegin "Cleaning out eclipse plugin"
 			find "${INTEL_SDP_DIR}"/eclipse_support -delete || die
@@ -379,7 +396,7 @@ intel-sdp_src_install() {
 	keepdir "${INTEL_SDP_EDIR}"/licenses
 }
 
-# @ECLASS-FUNCTION
+# @FUNCTION: intel-sdp_pkg_postinst
 # @DESCRIPTION:
 # Add things to intel database
 intel-sdp_pkg_postinst() {
@@ -390,10 +407,10 @@ intel-sdp_pkg_postinst() {
 		echo >> ${INTEL_SDP_DB} \
 			"<:${r%-${_INTEL_PV4}*}-${_INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>"
 	done
-	run-test
+	_isdp_run-test
 }
 
-# @ECLASS-FUNCTION
+# @FUNCTION: intel-sdp_pkg_postrm
 # @DESCRIPTION:
 # Sanitize intel database
 intel-sdp_pkg_postrm() {


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-29  7:03 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-29  7:03 UTC (permalink / raw
  To: gentoo-commits

commit:     7319422dd7c7427cc741e9bdab2f1211b5af1be4
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 28 10:24:16 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Nov 28 10:24:16 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=7319422d

Implemented comments from g-dev review

* Fix whitespacing
* Fix man pages tags
* Try to do things in functions instead of global scope
* remove _ from local variables
* inline check for presents and functionality of cuda-config

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/cuda.eclass |   69 +++++++++++++++++++++++++--------------------------
 1 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index f8ebd81..0b2e084 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -13,49 +13,45 @@ inherit toolchain-funcs versionator
 # setting and/or sanitizing NVCCFLAGS, the compiler flags for nvcc. This is
 # automatically done and exported in src_prepare() or manually by calling
 # cuda_sanatize.
-#
-# Common usage:
-#
+# @EXAMPLE:
 # inherit cuda
 
 # @ECLASS-VARIABLE: NVCCFLAGS
-# DESCRIPTION:
+# @DESCRIPTION:
 # nvcc compiler flags (see nvcc --help), which should be used like
 # CFLAGS for c compiler
 : ${NVCCFLAGS:=-O2}
 
 # @ECLASS-VARIABLE: CUDA_VERBOSE
-# DESCRIPTION:
+# @DESCRIPTION:
 # Being verbose during compilation to see underlying commands
 : ${CUDA_VERBOSE:=true}
 
-[[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v"
-
-# @ECLASS-FUNCTION: cuda_gccdir
+# @FUNCTION: cuda_gccdir
+# @USAGE: [-f]
+# @RETURN: gcc bindir compatible with current cuda, optionally (-f) prefixed with "--compiler-bindir="
 # @DESCRIPTION:
 # Helper for determination of the latest gcc bindir supported by
 # then current nvidia cuda toolkit.
 #
-# Calling plain it returns simply the path, but you probably want to add \"-f\""
-# to get the full flag to add to nvcc call.
-#
 # Example:
-#
+# @CODE
 # cuda_gccdir -f
 # -> --compiler-bindir="/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"
+# @CODE
 cuda_gccdir() {
-	local _gcc_bindir _ver _args="" _flag _ret
+	local gcc_bindir ver args="" flag ret
 
 	# Currently we only support the gnu compiler suite
 	if [[ $(tc-getCXX) != *g++* ]]; then
-        ewarn "Currently we only support the gnu compiler suite"
+		ewarn "Currently we only support the gnu compiler suite"
 		return 2
 	fi
 
 	while [ "$1" ]; do
 		case $1 in
 			-f)
-				_flag="--compiler-bindir="
+				flag="--compiler-bindir="
 				;;
 			*)
 				;;
@@ -63,43 +59,46 @@ cuda_gccdir() {
 		shift
 	done
 
-	if [[ ! $(type -P cuda-config) ]]; then
+	if ! args=$(cuda-config -s); then
 		eerror "Could not execute cuda-config"
 		eerror "Make sure >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 is installed"
 		die "cuda-config not found"
 	else
-		_args="$(version_sort $(cuda-config -s))"
-		if [[ ! -n ${_args} ]]; then
+		args=$(version_sort ${args})
+		if [[ -z ${args} ]]; then
 			die "Could not determine supported gcc versions from cuda-config"
 		fi
 	fi
 
-	for _ver in ${_args}; do
-      has_version sys-devel/gcc:${_ver} && \
-         _gcc_bindir="$(ls -d ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${_ver}* | tail -n 1)"
-   done
+	for ver in ${args}; do
+		has_version sys-devel/gcc:${ver} && \
+		 gcc_bindir="$(ls -d ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver}* | tail -n 1)"
+	done
 
-   if [[ -n ${_gcc_bindir} ]]; then
-		if [[ -n ${_flag} ]]; then
-			_ret="${_flag}\\\"${_gcc_bindir}\\\""
+	if [[ -n ${gcc_bindir} ]]; then
+		if [[ -n ${flag} ]]; then
+			ret="${flag}\\\"${gcc_bindir}\\\""
 		else
-	      _ret="${_gcc_bindir}"
+			ret="${gcc_bindir}"
 		fi
-		echo ${_ret}
+		echo ${ret}
 		return 0
 	else
-		eerror "Only gcc version(s) ${_args} are supported,"
+		eerror "Only gcc version(s) ${args} are supported,"
 		eerror "of which none is installed"
-		die "Only gcc version(s) ${_args} are supported"
+		die "Only gcc version(s) ${args} are supported"
 		return 1
-   fi
+	fi
 }
 
-# @ECLASS-FUNCTION: cuda_sanitize
+# @FUNCTION: cuda_sanitize
 # @DESCRIPTION:
 # Correct NVCCFLAGS by adding the necessary reference to gcc bindir and
 # passing CXXFLAGS to underlying compiler without disturbing nvcc.
 cuda_sanitize() {
+	# Be verbose if wanted
+	[[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v"
+
 	# Tell nvcc where to find a compatible compiler
 	NVCCFLAGS+=" $(cuda_gccdir -f)"
 
@@ -109,15 +108,15 @@ cuda_sanitize() {
 	export NVCCFLAGS
 }
 
-# @ECLASS-FUNCTION: cuda_pkg_setup
+# @FUNCTION: cuda_pkg_setup
 # @DESCRIPTION:
-# Sanitise and export NVCCFLAGS by default in pkg_setup
+# Sanitise and export NVCCFLAGS by default
 cuda_pkg_setup() {
 	cuda_sanitize
 }
 
 EXPORT_FUNCTIONS pkg_setup
 case "${EAPI:-0}" in
-   0|1|2|3|4|5) ;;
-   *) die "EAPI=${EAPI} is not supported" ;;
+	0|1|2|3|4|5) ;;
+	*) die "EAPI=${EAPI} is not supported" ;;
 esac


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-29 21:05 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-29 21:05 UTC (permalink / raw
  To: gentoo-commits

commit:     d30d5fd2a42a37fa8a1692d7836d9c4566aa2df7
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 29 19:01:13 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Nov 29 19:01:13 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=d30d5fd2

Last remaning underscored removed
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 1b60514..bd5035f 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -260,7 +260,7 @@ intel-sdp_pkg_pretend() {
 	: ${CHECKREQS_DISK_BUILD:=256M}
 	check-reqs_pkg_pretend
 
-	_dirs=(
+	dirs=(
 		"${INTEL_SDP_EDIR}/licenses"
 		"${INTEL_SDP_EDIR}/Licenses"
 		"${EPREFIX}/opt/intel/licenses"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-29 21:05 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2012-11-29 21:05 UTC (permalink / raw
  To: gentoo-commits

commit:     109d79c57bdcd3a25ee42e0c1f42433f303ff84c
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 29 19:11:57 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Nov 29 19:11:57 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=109d79c5

Drop stupid static-libs idea again
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index bd5035f..3602b6d 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -97,7 +97,7 @@ LICENSE="Intel-SDP"
 # Future work, #394411
 #SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
 SLOT="0"
-IUSE="examples multilib static-libs"
+IUSE="examples multilib"
 KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
 
 RESTRICT="mirror"
@@ -380,9 +380,6 @@ intel-sdp_src_install() {
 		find "${INTEL_SDP_DIR}"/man -delete || die
 	fi
 
-	use static-libs || \
-		find opt -type f -name "*.a" -delete || die
-
 	ebegin "Tagging ${PN}"
 	find opt -name \*sh -type f -exec sed -i \
 		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2012-11-30  3:31 Christoph Junghans
  0 siblings, 0 replies; 169+ messages in thread
From: Christoph Junghans @ 2012-11-30  3:31 UTC (permalink / raw
  To: gentoo-commits

commit:     cfa327e9178ca019543d81bdddfb2898023e98e0
Author:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 30 03:30:54 2012 +0000
Commit:     Christoph Junghans <kleiner_otti <AT> gmx <DOT> de>
CommitDate: Fri Nov 30 03:30:54 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=cfa327e9

fix typo in intel-sdp_pkg_pretend

---
 eclass/intel-sdp.eclass |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 3602b6d..d80e310 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -255,7 +255,7 @@ _isdp_run-test() {
 # * Check for space requirements being fullfilled
 # @CODE
 intel-sdp_pkg_pretend() {
-	local warn=1 dir dirs i ret arch a p
+	local warn=1 dir dirs ret arch a p
 
 	: ${CHECKREQS_DISK_BUILD:=256M}
 	check-reqs_pkg_pretend
@@ -266,8 +266,9 @@ intel-sdp_pkg_pretend() {
 		"${EPREFIX}/opt/intel/licenses"
 		)
 	for dir in "${dirs[@]}" ; do
-		ebegin "Checking for a license in: ${dirs[$i]}"
-		[[ $( ls "${dirs[$i]}"/*lic 2>/dev/null ) ]]; ret=$?
+		ebegin "Checking for a license in: ${dir}"
+		#maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]]
+		[[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$?
 		eend ${ret}
 		if [[ ${ret} == "0" ]]; then
 			warn=${ret}


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-01-11 20:45 Justin Bronder
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Bronder @ 2013-01-11 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     62fb4a1447fae02ebebececf0d1bc46455ee457c
Author:     Justin Bronder <jbronder <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 11 20:45:18 2013 +0000
Commit:     Justin Bronder <jsbronder <AT> gentoo <DOT> org>
CommitDate: Fri Jan 11 20:45:35 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=62fb4a14

mpi.eclass:  fix whitespace

---
 eclass/mpi.eclass |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index 361b0e7..b411ae9 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -9,11 +9,11 @@ inherit multilib
 #	Justin Bronder <jsbronder@gentoo.org>
 # @BLURB:  Common functions for mpi-pkg.eclass and mpi-imp.eclass
 
-# History:  
-# 	2009-06-26 (jsbronder):  Add ability to require common use flags.
+# History:
+#	2009-06-26 (jsbronder):  Add ability to require common use flags.
 #		Remove dep on eselect-mpi (it's in sys-cluster/empi)
 #		Use virtual/$class to get imp dep in mpi_pkg_deplist.
-# 	2008-11-20 (jsbronder):  Initial rewrite from old mpi.eclass
+#	2008-11-20 (jsbronder):  Initial rewrite from old mpi.eclass
 
 
 #####################
@@ -216,7 +216,7 @@ mpi_imp_deplist() {
 }
 
 mpi_imp_add_eselect() {
-	mpi_classed || return 0	
+	mpi_classed || return 0
 	local c=$(mpi_class)
 	cp "${FILESDIR}"/${MPI_ESELECT_FILE} ${T}/${c}.eselect || die
 	sed -i \
@@ -357,7 +357,7 @@ mpi_pkg_fc()  { _mpi_pkg_compiler "MPI_FC"  "f90 fc";  }
 # @USAGE:
 # @DESCRIPTION:  Adds the correct path(s) to the end of LD_LIBRARY_PATH.  Does
 # nothing if the build is unclassed.
-mpi_pkg_set_ld_library_path() { 
+mpi_pkg_set_ld_library_path() {
 	if mpi_classed; then
 		export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(_get_eselect_var LD_LIBRARY_PATH)"
 	fi
@@ -404,7 +404,7 @@ mpi_pkg_set_env() {
 # @FUNCTION: mpi_pkg_restore_env
 # @USAGE:
 # @DESCRIPTION:  Attempts to undo the damage done by mpi_pkg_set_env
-mpi_pkg_restore_env() {	
+mpi_pkg_restore_env() {
 	if mpi_classed; then
 		export CC=$_mpi_oCC
 		export CXX=$_mpi_oCXX


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-01-15 15:27 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2013-01-15 15:27 UTC (permalink / raw
  To: gentoo-commits

commit:     a81403c2f1c1604835d1f7e47c79f94ccc223f9e
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 15 15:27:06 2013 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Jan 15 15:27:06 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a81403c2

moved to tree
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/cuda.eclass |  132 ----------------------------------------------------
 1 files changed, 0 insertions(+), 132 deletions(-)

diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
deleted file mode 100644
index beac082..0000000
--- a/eclass/cuda.eclass
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-inherit toolchain-funcs versionator
-
-# @ECLASS: cuda.eclass
-# @MAINTAINER:
-# Justin Lecher <jlec@gentoo.org>
-# @BLURB: Common functions for cuda packages
-# @DESCRIPTION:
-# This eclass contains functions to be used with cuda package. Currently it is
-# setting and/or sanitizing NVCCFLAGS, the compiler flags for nvcc. This is
-# automatically done and exported in src_prepare() or manually by calling
-# cuda_sanatize.
-# @EXAMPLE:
-# inherit cuda
-
-# @ECLASS-VARIABLE: NVCCFLAGS
-# @DESCRIPTION:
-# nvcc compiler flags (see nvcc --help), which should be used like
-# CFLAGS for c compiler
-: ${NVCCFLAGS:=-O2}
-
-# @ECLASS-VARIABLE: CUDA_VERBOSE
-# @DESCRIPTION:
-# Being verbose during compilation to see underlying commands
-: ${CUDA_VERBOSE:=true}
-
-# @FUNCTION: cuda_gccdir
-# @USAGE: [-f]
-# @RETURN: gcc bindir compatible with current cuda, optionally (-f) prefixed with "--compiler-bindir="
-# @DESCRIPTION:
-# Helper for determination of the latest gcc bindir supported by
-# then current nvidia cuda toolkit.
-#
-# Example:
-# @CODE
-# cuda_gccdir -f
-# -> --compiler-bindir="/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"
-# @CODE
-cuda_gccdir() {
-	local gcc_bindir ver args="" flag ret
-
-	# Currently we only support the gnu compiler suite
-	if [[ $(tc-getCXX) != *g++* ]]; then
-		ewarn "Currently we only support the gnu compiler suite"
-		return 2
-	fi
-
-	while [ "$1" ]; do
-		case $1 in
-			-f)
-				flag="--compiler-bindir="
-				;;
-			*)
-				;;
-		esac
-		shift
-	done
-
-	if ! args=$(cuda-config -s); then
-		eerror "Could not execute cuda-config"
-		eerror "Make sure >=dev-util/nvidia-cuda-toolkit-4.2.9-r1 is installed"
-		die "cuda-config not found"
-	else
-		args=$(version_sort ${args})
-		if [[ -z ${args} ]]; then
-			die "Could not determine supported gcc versions from cuda-config"
-		fi
-	fi
-
-	for ver in ${args}; do
-		has_version sys-devel/gcc:${ver} && \
-		 gcc_bindir="$(ls -d ${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/${ver}* | tail -n 1)"
-	done
-
-	if [[ -n ${gcc_bindir} ]]; then
-		if [[ -n ${flag} ]]; then
-			ret="${flag}\\\"${gcc_bindir}\\\""
-		else
-			ret="${gcc_bindir}"
-		fi
-		echo ${ret}
-		return 0
-	else
-		eerror "Only gcc version(s) ${args} are supported,"
-		eerror "of which none is installed"
-		die "Only gcc version(s) ${args} are supported"
-		return 1
-	fi
-}
-
-# @FUNCTION: cuda_sanitize
-# @DESCRIPTION:
-# Correct NVCCFLAGS by adding the necessary reference to gcc bindir and
-# passing CXXFLAGS to underlying compiler without disturbing nvcc.
-cuda_sanitize() {
-	# Be verbose if wanted
-	[[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v"
-
-	# Tell nvcc where to find a compatible compiler
-	NVCCFLAGS+=" $(cuda_gccdir -f)"
-
-	# Tell nvcc which flags should be used for underlying C compiler
-	NVCCFLAGS+=" --compiler-options=\"${CXXFLAGS}\""
-
-	export NVCCFLAGS
-}
-
-# @FUNCTION: cuda_pkg_setup
-# @DESCRIPTION:
-# Call cuda_src_prepare for EAPIs not supporting src_prepare
-cuda_pkg_setup() {
-	cuda_src_prepare
-}
-
-# @FUNCTION: cuda_src_prepare
-# @DESCRIPTION:
-# Sanitise and export NVCCFLAGS by default
-cuda_src_prepare() {
-	cuda_sanitize
-}
-
-
-case "${EAPI:-0}" in
-	0|1)
-		EXPORT_FUNCTIONS pkg_setup ;;
-	2|3|4|5)
-		EXPORT_FUNCTIONS src_prepare ;;
-	*) die "EAPI=${EAPI} is not supported" ;;
-esac


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-01-24 19:47 Sebastien Fabbro
  0 siblings, 0 replies; 169+ messages in thread
From: Sebastien Fabbro @ 2013-01-24 19:47 UTC (permalink / raw
  To: gentoo-commits

commit:     0b6eb19575b45a4601e527d6888d4409c79fd8a5
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 24 18:28:55 2013 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Thu Jan 24 18:28:55 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0b6eb195

alternatives-2: update eselect min version

---
 eclass/alternatives-2.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index e62b6d4..3b547fe 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -9,7 +9,7 @@
 
 ALTERNATIVES_DIR="/etc/env.d/alternatives"
 
-DEPEND=">=app-admin/eselect-1.3.3-r100"
+DEPEND=">=app-admin/eselect-1.3.4-r100"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-02-14 16:32 Denis Dupeyron
  0 siblings, 0 replies; 169+ messages in thread
From: Denis Dupeyron @ 2013-02-14 16:32 UTC (permalink / raw
  To: gentoo-commits

commit:     68b75e8da7291f48da953d94b7dfdfbd56cdc857
Author:     Denis Dupeyron <calchan <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 14 16:31:30 2013 +0000
Commit:     Denis Dupeyron <calchan <AT> gentoo <DOT> org>
CommitDate: Thu Feb 14 16:31:30 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=68b75e8d

Fix probable trailing / in EROOT

---
 eclass/alternatives-2.eclass |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 16caa51..7908fe2 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -95,7 +95,7 @@ alternatives_for() {
 }
 
 cleanup_old_alternatives_module() {
-	local alt=${1} old_module="${EROOT}/usr/share/eselect/modules/${alt}.eselect"
+	local alt=${1} old_module="${EROOT%/}/usr/share/eselect/modules/${alt}.eselect"
 	if [[ -f "${old_module}" && "$(source "${old_module}" &>/dev/null; echo "${ALTERNATIVE}")" == "${alt}" ]]; then
 		local version="$(source "${old_module}" &>/dev/null; echo "${VERSION}")"
 		if [[ "${version}" == "0.1" || "${version}" == "20080924" ]]; then
@@ -110,14 +110,14 @@ alternatives-2_pkg_postinst() {
 	for a in "${ALTERNATIVES_PROVIDED[@]}"; do
 		alt="${a%:*}"
 		provider="${a#*:}"
-		if [[ ! -f "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect" \
-			|| "$(source "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect" &>/dev/null; echo "${VERSION}")" \
+		if [[ ! -f "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" \
+			|| "$(source "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" &>/dev/null; echo "${VERSION}")" \
 				-ne "${module_version}" ]]; then
 			#einfo "Creating alternatives module for ${alt}"
-			if [[ ! -d ${EROOT}/usr/share/eselect/modules/auto ]]; then
-				install -d "${EROOT}"/usr/share/eselect/modules/auto || eerror "Could not create eselect modules dir"
+			if [[ ! -d ${EROOT%/}/usr/share/eselect/modules/auto ]]; then
+				install -d "${EROOT%/}"/usr/share/eselect/modules/auto || eerror "Could not create eselect modules dir"
 			fi
-			cat > "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect" <<-EOF
+			cat > "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" <<-EOF
 				# This module was automatically generated by alternatives.eclass
 				DESCRIPTION="Alternatives for ${alt}"
 				VERSION="${module_version}"
@@ -150,9 +150,9 @@ alternatives-2_pkg_prerm() {
 		einfo "Removed ${provider} alternative module for ${alt}, current is $(eselect ${alt} show)"
 		if [[ $? -eq 2 ]]; then
 			einfo "Cleaning up unused alternatives module for ${alt}"
-			echo rm "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect"
-			rm "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect" ||
-				eerror rm "${EROOT}/usr/share/eselect/modules/auto/${alt}.eselect" failed
+			echo rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect"
+			rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" ||
+				eerror rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" failed
 		fi
 	done
 }


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-02-14 16:32 Denis Dupeyron
  0 siblings, 0 replies; 169+ messages in thread
From: Denis Dupeyron @ 2013-02-14 16:32 UTC (permalink / raw
  To: gentoo-commits

commit:     32693a706061ad9f5b6f2863b7d6484d68618a69
Author:     Denis Dupeyron <calchan <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 14 16:24:28 2013 +0000
Commit:     Denis Dupeyron <calchan <AT> gentoo <DOT> org>
CommitDate: Thu Feb 14 16:24:28 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=32693a70

Prepare alternatives-2.eclass for the main tree

Following discussion with the original authors, cleanup header and copyrights to
prepare alternatives-2.eclass to be moved to the main tree. Watch out as repoman
will likely complain about the top copyright being 2010-2013 instead of the
usual 1999-2013. Make sure this 2010 start date stays in place in the future.

---
 eclass/alternatives-2.eclass |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 3b547fe..16caa51 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -1,8 +1,11 @@
+# Copyright 2010-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#  $
+
+# Based in part upon 'alternatives.exlib' from Exherbo, which is:
 # Copyright 2008, 2009 Bo Ørsted Andresen
 # Copyright 2008, 2009 Mike Kelly
 # Copyright 2009 David Leverton
-# 2010: Adapted for Gentoo by Sebastien Fabbro, who does not like copyrights
-# Distributed under the terms of the GNU General Public License v2
 
 # If your package provides pkg_postinst or pkg_prerm phases, you need to be
 # sure you explicitly run alternatives_pkg_{postinst,prerm} where appropriate.


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-07-02  0:09 Justin Bronder
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Bronder @ 2013-07-02  0:09 UTC (permalink / raw
  To: gentoo-commits

commit:     3114d456f07f612f87dfd403ab120819e913fcce
Author:     Justin Bronder <jbronder <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  2 00:09:11 2013 +0000
Commit:     Justin Bronder <jsbronder <AT> gentoo <DOT> org>
CommitDate: Tue Jul  2 00:09:11 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=3114d456

workaround OpenMPI build issue #462602

export FAKEROOTKEY=1 to stop OpenMPI from replacing malloc.

---
 eclass/mpi.eclass | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index b411ae9..76addae 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -10,6 +10,7 @@ inherit multilib
 # @BLURB:  Common functions for mpi-pkg.eclass and mpi-imp.eclass
 
 # History:
+#   2013-07-01 (jsbronder):  Workaround OpenMPI build issue #462602
 #	2009-06-26 (jsbronder):  Add ability to require common use flags.
 #		Remove dep on eselect-mpi (it's in sys-cluster/empi)
 #		Use virtual/$class to get imp dep in mpi_pkg_deplist.
@@ -398,6 +399,10 @@ mpi_pkg_set_env() {
 		export FC=$(mpi_pkg_fc)
 		export PKG_CONFIG_PATH="$(mpi_root)$(get_libdir)/pkgconfig:${PKG_CONFIG_PATH}"
 		mpi_pkg_set_ld_library_path
+
+		if [ "$(mpi_pkg_base_imp)" == "openmpi" ]; then
+			export FAKEROOTKEY=1
+		fi
 	fi
 }
 
@@ -412,6 +417,10 @@ mpi_pkg_restore_env() {
 		export FC=$_mpi_oFC
 		export PKG_CONFIG_PATH=$_mpi_oPCP
 		export LD_LIBRARY_PATH=$_mpi_oLLP
+
+		if [ "$(mpi_pkg_base_imp)" == "openmpi" ]; then
+			unset FAKEROOTKEY
+		fi
 	fi
 }
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-07-02  2:15 Justin Bronder
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Bronder @ 2013-07-02  2:15 UTC (permalink / raw
  To: gentoo-commits

commit:     ad77dd63122d96dda3aaa2eb43e035b471923de1
Author:     Justin Bronder <jbronder <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  2 02:15:30 2013 +0000
Commit:     Justin Bronder <jsbronder <AT> gentoo <DOT> org>
CommitDate: Tue Jul  2 02:15:30 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=ad77dd63

Revert "workaround OpenMPI build issue #462602"

This reverts commit 3114d456f07f612f87dfd403ab120819e913fcce.

---
 eclass/mpi.eclass | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index 76addae..b411ae9 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -10,7 +10,6 @@ inherit multilib
 # @BLURB:  Common functions for mpi-pkg.eclass and mpi-imp.eclass
 
 # History:
-#   2013-07-01 (jsbronder):  Workaround OpenMPI build issue #462602
 #	2009-06-26 (jsbronder):  Add ability to require common use flags.
 #		Remove dep on eselect-mpi (it's in sys-cluster/empi)
 #		Use virtual/$class to get imp dep in mpi_pkg_deplist.
@@ -399,10 +398,6 @@ mpi_pkg_set_env() {
 		export FC=$(mpi_pkg_fc)
 		export PKG_CONFIG_PATH="$(mpi_root)$(get_libdir)/pkgconfig:${PKG_CONFIG_PATH}"
 		mpi_pkg_set_ld_library_path
-
-		if [ "$(mpi_pkg_base_imp)" == "openmpi" ]; then
-			export FAKEROOTKEY=1
-		fi
 	fi
 }
 
@@ -417,10 +412,6 @@ mpi_pkg_restore_env() {
 		export FC=$_mpi_oFC
 		export PKG_CONFIG_PATH=$_mpi_oPCP
 		export LD_LIBRARY_PATH=$_mpi_oLLP
-
-		if [ "$(mpi_pkg_base_imp)" == "openmpi" ]; then
-			unset FAKEROOTKEY
-		fi
 	fi
 }
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-07-09  1:17 Justin Bronder
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Bronder @ 2013-07-09  1:17 UTC (permalink / raw
  To: gentoo-commits

commit:     d2d3b195028595c136ac3946c0325acaf3ef42e2
Author:     Justin Bronder <jbronder <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  9 01:14:18 2013 +0000
Commit:     Justin Bronder <jsbronder <AT> gentoo <DOT> org>
CommitDate: Tue Jul  9 01:14:18 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=d2d3b195

mpi.eclass: add sys-cluster/mpich

upstream renamed mpich2 to mpich.

---
 eclass/mpi.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index b411ae9..21f234e 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -21,9 +21,9 @@ inherit multilib
 #####################
 
 # All known mpi implementations
-__MPI_ALL_IMPLEMENTATION_PNS="mpich2 openmpi lam-mpi openib-mvapich2"
+__MPI_ALL_IMPLEMENTATION_PNS="mpich mpich2 openmpi lam-mpi openib-mvapich2"
 # All mpi implentations that can be classed.
-__MPI_ALL_CLASSABLE_PNS="openmpi mpich2 lam-mpi"
+__MPI_ALL_CLASSABLE_PNS="mpich openmpi mpich2 lam-mpi"
 
 
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-07-19 18:27 Alexey Shvetsov
  0 siblings, 0 replies; 169+ messages in thread
From: Alexey Shvetsov @ 2013-07-19 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     3eb8de499b46294528bb4635ac64880c90e6d684
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 19 14:27:27 2013 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Fri Jul 19 14:27:27 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=3eb8de49

import from tree to fix the full path problem

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass | 479 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 479 insertions(+)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
new file mode 100644
index 0000000..23032bb
--- /dev/null
+++ b/eclass/intel-sdp.eclass
@@ -0,0 +1,479 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/intel-sdp.eclass,v 1.13 2013/07/19 14:00:50 jlec Exp $
+
+# @ECLASS: intel-sdp.eclass
+# @MAINTAINER:
+# Justin Lecher <jlec@gentoo.org>
+# Sci Team <sci@gentoo.org>
+# @BLURB: Handling of Intel's Software Development Products package management
+
+# @ECLASS-VARIABLE: INTEL_DID
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package download ID from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. 2504
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_DPN
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package name to download from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. parallel_studio_xe
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_DPV
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package download version from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. 2011_sp1_update2
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_TARX
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package extention.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. tar.gz
+#
+# Must be defined before inheriting the eclass
+: ${INTEL_TARX:=tgz}
+
+# @ECLASS-VARIABLE: INTEL_SUBDIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package sub-directory where it will end-up in /opt/intel
+# To find out its value, you have to do a raw install from the Intel tar ball
+
+# @ECLASS-VARIABLE: INTEL_SKIP_LICENSE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Possibility to skip the mandatory check for licenses. Only set this if there
+# is really no fix.
+
+# @ECLASS-VARIABLE: INTEL_RPMS_DIRS
+# @DESCRIPTION:
+# List of subdirectories in the main archive which contains the
+# rpms to extract.
+: ${INTEL_RPMS_DIRS:=rpm}
+
+# @ECLASS-VARIABLE: INTEL_X86
+# @DESCRIPTION:
+# 32bit arch in rpm names
+#
+# e.g. i484
+: ${INTEL_X86:=i486}
+
+# @ECLASS-VARIABLE: INTEL_BIN_RPMS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Functional name of rpm without any version/arch tag
+#
+# e.g. compilerprof
+
+# @ECLASS-VARIABLE: INTEL_DAT_RPMS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Functional name of rpm of common data which are arch free
+# without any version tag
+#
+# e.g. openmp
+
+# @ECLASS-VARIABLE: INTEL_SDP_DB
+# @DESCRIPTION:
+# Full path to intel registry db
+INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
+
+inherit check-reqs multilib versionator
+
+_INTEL_PV1=$(get_version_component_range 1)
+_INTEL_PV2=$(get_version_component_range 2)
+_INTEL_PV3=$(get_version_component_range 3)
+_INTEL_PV4=$(get_version_component_range 4)
+_INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
+
+SRC_URI="
+	amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX} ) )
+	amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} ) )
+	x86?	( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )"
+
+LICENSE="Intel-SDP"
+# Future work, #394411
+#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
+SLOT="0"
+IUSE="examples multilib"
+
+RESTRICT="mirror"
+
+RDEPEND=""
+DEPEND="app-arch/rpm2targz"
+
+_INTEL_SDP_YEAR=${INTEL_DPV%_update*}
+_INTEL_SDP_YEAR=${INTEL_DPV%_sp*}
+
+# @ECLASS-VARIABLE: INTEL_SDP_DIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Full rootless path to installation dir
+INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}.${_INTEL_PV3}.${_INTEL_PV4}"
+
+# @ECLASS-VARIABLE: INTEL_SDP_EDIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Full rooted path to installation dir
+INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="${INTEL_SDP_DIR}/*"
+
+# @ECLASS-VARIABLE: INTEL_ARCH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Intels internal names of the arches; will be set at runtime accordingly
+#
+# e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
+
+# @FUNCTION: _isdp_link_eclipse_plugins
+# @INTERNAL
+# @DESCRIPTION:
+# Creating necessary links to use intel compiler with eclipse
+_isdp_link_eclipse_plugins() {
+	local c f
+	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
+		for c in cdt*; do
+			local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
+			if has_version "dev-util/eclipse-sdk:${ev}"; then
+				einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
+				for f in cdt${cv}/eclipse/features/*; do
+					dodir /usr/$(get_libdir)/eclipse-${ev}/features
+					dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
+						/usr/$(get_libdir)/eclipse-${ev}/features/ || die
+				done
+				for f in cdt${cv}/eclipse/plugins/*; do
+					dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
+					dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
+						/usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
+				done
+			fi
+		done
+	popd > /dev/null
+}
+
+# @FUNCTION: _isdp_big-warning
+# @USAGE: [pre-check | test-failed]
+# @INTERNAL
+# @DESCRIPTION:
+# warn user that we really require a license
+_isdp_big-warning() {
+	case ${1} in
+		pre-check )
+			echo ""
+			ewarn "License file not found!"
+			;;
+
+		test-failed )
+			echo
+			ewarn "Function test failed. Most probably due to an invalid license."
+			ewarn "This means you already tried to bypass the license check once."
+			;;
+	esac
+
+	echo ""
+	ewarn "Make sure you have recieved the an Intel license."
+	ewarn "To receive a non-commercial license, you need to register at:"
+	ewarn "http://software.intel.com/en-us/articles/non-commercial-software-development/"
+	ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
+
+	case ${1} in
+		pre-check )
+			ewarn "before proceeding with installation of ${P}"
+			echo ""
+			;;
+		* )
+			echo ""
+			;;
+			esac
+}
+
+# @FUNCTION: _isdp_version_test
+# @INTERNAL
+# @DESCRIPTION:
+# Testing for valid license by asking for version information of the compiler
+_isdp_version_test() {
+	local comp comp_full arch warn
+	case ${PN} in
+		ifc )
+			debug-print "Testing ifort"
+			comp=ifort
+			;;
+		icc )
+			debug-print "Testing icc"
+			comp=icc
+			;;
+		*)
+			die "${PN} is not supported for testing"
+			;;
+	esac
+
+	for arch in ${INTEL_ARCH}; do
+		case ${EBUILD_PHASE} in
+			install )
+				comp_full="${ED}/${INTEL_SDP_DIR}/bin/${arch}/${comp}"
+				;;
+			postinst )
+				comp_full="${INTEL_SDP_EDIR}/bin/${arch}/${comp}"
+				;;
+			* )
+				ewarn "Compile test not supported in ${EBUILD_PHASE}"
+				continue
+				;;
+		esac
+
+		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${arch}/\" \"${comp_full}\" -V"
+
+		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${arch}/" "${comp_full}" -V &>/dev/null
+		[[ $? -ne 0 ]] && warn=yes
+	done
+	[[ "${warn}" == "yes" ]] && _isdp_big-warning test-failed
+}
+
+# @FUNCTION: _isdp_run-test
+# @INTERNAL
+# Test if installed compiler is working
+_isdp_run-test() {
+	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
+		case ${PN} in
+			ifc | icc )
+				_isdp_version_test ;;
+			* )
+				debug-print "No test available for ${PN}"
+				;;
+		esac
+	fi
+}
+
+# @FUNCTION: intel-sdp_pkg_pretend
+# @DESCRIPTION:
+# @CODE
+# * Check that the user has a (valid) license file before going on.
+# * Check for space requirements being fullfilled
+# @CODE
+intel-sdp_pkg_pretend() {
+	local warn=1 dir dirs ret arch a p
+
+	: ${CHECKREQS_DISK_BUILD:=256M}
+	check-reqs_pkg_pretend
+
+	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
+		if echo ${INTEL_LICENSE_FILE} | grep -q @; then
+			einfo "Looks like you are using following license server:"
+			einfo "   ${INTEL_LICENSE_FILE}"
+			return 0
+		fi
+
+		dirs=(
+			"${INTEL_SDP_EDIR}/licenses"
+			"${INTEL_SDP_EDIR}/Licenses"
+			"${EPREFIX}/opt/intel/licenses"
+			)
+		for dir in "${dirs[@]}" ; do
+			ebegin "Checking for a license in: ${dir}"
+			#maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]]
+			[[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$?
+			eend ${ret}
+			if [[ ${ret} == "0" ]]; then
+				warn=${ret}
+				break
+			fi
+		done
+		if [[ ${warn} == "1" ]]; then
+			_isdp_big-warning pre-check
+			die "Could not find license file"
+		fi
+	else
+		eqawarn "The ebuild doesn't check for a license!"
+		eqawarn "This shouldn't be done unless there is a serious reason."
+	fi
+}
+
+# @FUNCTION: intel-sdp_pkg_setup
+# @DESCRIPTION:
+# Setting up and sorting some internal variables
+intel-sdp_pkg_setup() {
+	local arch a p
+
+	if use x86; then
+		arch=${INTEL_X86}
+		INTEL_ARCH="ia32"
+	elif use amd64; then
+		arch=x86_64
+		INTEL_ARCH="intel64"
+		if has_multilib_profile; then
+			arch="x86_64 ${INTEL_X86}"
+			INTEL_ARCH="intel64 ia32"
+		fi
+	fi
+	INTEL_RPMS=""
+	INTEL_RPMS_FULL=""
+	for p in ${INTEL_BIN_RPMS}; do
+		if [ ${p} == $(basename ${p}) ]; then
+			for a in ${arch}; do
+				INTEL_RPMS+=" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm"
+			done
+		else
+			INTEL_RPMS_FULL+=" ${p} "
+		fi
+	done
+	for p in ${INTEL_DAT_RPMS}; do
+		if [ ${p} == $(basename ${p}) ]; then
+			INTEL_RPMS+=" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm"
+		else
+			INTEL_RPMS_FULL+=" ${p} "
+		fi
+	done
+
+	case "${EAPI:-0}" in
+		0|1|2|3) intel-sdp_pkg_pretend ;;
+	esac
+}
+
+# @FUNCTION: intel-sdp_src_unpack
+# @DESCRIPTION:
+# Unpacking necessary rpms from tarball, extract them and rearrange the output.
+intel-sdp_src_unpack() {
+	local l r subdir rb t list=()
+
+	for t in ${A}; do
+		for r in ${INTEL_RPMS}; do
+			for subdir in ${INTEL_RPMS_DIRS}; do
+				rpmdir=${t%%.*}/${subdir}
+				debug-print "Adding to decompression list: ${rpmdir}/${r}"
+				list+=( ${rpmdir}/${r})
+			done
+		done
+
+		for r in ${INTEL_RPMS_FULL}; do
+			debug-print "Adding to decompression list: ${r}"
+			list+=( ${r})
+		done
+
+
+		tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log
+
+		for r in ${list[@]}; do
+			rb=$(basename ${r})
+			l=.${rb}_$(date +'%d%m%y_%H%M%S').log
+			einfo "Unpacking ${rb}"
+			rpm2tar -O ${r} | tar xvf - | sed -e \
+				"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
+			mv ${l} opt/intel/ || die "failed moving extract log file"
+		done
+	done
+
+	mv opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
+}
+
+# @FUNCTION: intel-sdp_src_install
+# @DESCRIPTION:
+# Install everything
+intel-sdp_src_install() {
+	if [[ -d "${INTEL_SDP_DIR}"/Documentation ]]; then
+		dodoc -r "${INTEL_SDP_DIR}"/Documentation/*
+
+		ebegin "Cleaning out documentation"
+		find "${INTEL_SDP_DIR}"/Documentation -delete || die
+		eend
+	fi
+
+	if [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
+		if use examples ; then
+			insinto /usr/share/${P}/examples/
+			doins -r "${INTEL_SDP_DIR}"/Samples/*
+		fi
+		ebegin "Cleaning out examples"
+		find "${INTEL_SDP_DIR}"/Samples -delete || die
+		eend
+	fi
+
+	if [[ -d "${INTEL_SDP_DIR}"/eclipse_support ]]; then
+		if has eclipse ${IUSE} && use eclipse; then
+			_isdp_link_eclipse_plugins
+		else
+			ebegin "Cleaning out eclipse plugin"
+			find "${INTEL_SDP_DIR}"/eclipse_support -delete || die
+			eend
+		fi
+	fi
+
+	if [[ -d "${INTEL_SDP_DIR}"/man ]]; then
+		doman "${INTEL_SDP_DIR}"/man/en_US/man1/*
+		if has linguas_ja ${IUSE} && use linguas_ja; then
+			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*
+		fi
+
+		find "${INTEL_SDP_DIR}"/man -delete || die
+	fi
+
+	ebegin "Tagging ${PN}"
+	find opt -name \*sh -type f -exec sed -i \
+		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \
+		'{}' + || die
+	eend
+
+	[[ -d "${ED}" ]] || dodir /
+	mv opt "${ED}"/ || die "moving files failed"
+
+	dodir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
+	keepdir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
+}
+
+# @FUNCTION: intel-sdp_pkg_postinst
+# @DESCRIPTION:
+# Add things to intel database
+intel-sdp_pkg_postinst() {
+	# add product registry to intel "database"
+	local l r
+	for r in ${INTEL_RPMS}; do
+		l="$(ls -1 ${EROOT%/}/opt/intel/.${r}_*.log | head -n 1)"
+		echo >> ${INTEL_SDP_DB} \
+			"<:${r%-${_INTEL_PV4}*}-${_INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>"
+	done
+	_isdp_run-test
+}
+
+# @FUNCTION: intel-sdp_pkg_postrm
+# @DESCRIPTION:
+# Sanitize intel database
+intel-sdp_pkg_postrm() {
+	# remove from intel "database"
+	if [[ -e ${INTEL_SDP_DB} ]]; then
+		local r
+		for r in ${INTEL_RPMS}; do
+			sed -i \
+				-e "/${r}/d" \
+				${INTEL_SDP_DB}
+		done
+	fi
+}
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm
+case "${EAPI:-0}" in
+	0|1|2|3) ;;
+	4|5) EXPORT_FUNCTIONS pkg_pretend ;;
+	*) die "EAPI=${EAPI} is not supported" ;;
+esac


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-07-22 13:14 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2013-07-22 13:14 UTC (permalink / raw
  To: gentoo-commits

commit:     5605e3fdd4cc0a87c375d2c53dca3d45a546b06b
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 22 13:13:49 2013 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Jul 22 13:13:49 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=5605e3fd

sent for review

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass | 51 +++++++++++++++++++++++++++++--------------------
 1 file changed, 30 insertions(+), 21 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 23032bb..6e715b3 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -65,11 +65,10 @@
 # Possibility to skip the mandatory check for licenses. Only set this if there
 # is really no fix.
 
-# @ECLASS-VARIABLE: INTEL_RPMS_DIRS
+# @ECLASS-VARIABLE: INTEL_RPMS_DIR
 # @DESCRIPTION:
-# List of subdirectories in the main archive which contains the
-# rpms to extract.
-: ${INTEL_RPMS_DIRS:=rpm}
+# Main subdirectory which contains the rpms to extract.
+: ${INTEL_RPMS_DIR:=rpm}
 
 # @ECLASS-VARIABLE: INTEL_X86
 # @DESCRIPTION:
@@ -84,6 +83,11 @@
 # Functional name of rpm without any version/arch tag
 #
 # e.g. compilerprof
+#
+# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
+# specify the full path
+#
+# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
 
 # @ECLASS-VARIABLE: INTEL_DAT_RPMS
 # @DEFAULT_UNSET
@@ -92,6 +96,11 @@
 # without any version tag
 #
 # e.g. openmp
+#
+# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
+# specify the full path
+#
+# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
 
 # @ECLASS-VARIABLE: INTEL_SDP_DB
 # @DESCRIPTION:
@@ -328,22 +337,22 @@ intel-sdp_pkg_setup() {
 			INTEL_ARCH="intel64 ia32"
 		fi
 	fi
-	INTEL_RPMS=""
-	INTEL_RPMS_FULL=""
+	INTEL_RPMS=()
+	INTEL_RPMS_FULL=()
 	for p in ${INTEL_BIN_RPMS}; do
 		if [ ${p} == $(basename ${p}) ]; then
 			for a in ${arch}; do
-				INTEL_RPMS+=" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm"
+				INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
 			done
 		else
-			INTEL_RPMS_FULL+=" ${p} "
+			INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
 		fi
 	done
 	for p in ${INTEL_DAT_RPMS}; do
 		if [ ${p} == $(basename ${p}) ]; then
-			INTEL_RPMS+=" intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm"
+			INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )
 		else
-			INTEL_RPMS_FULL+=" ${p} "
+			INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )
 		fi
 	done
 
@@ -356,22 +365,22 @@ intel-sdp_pkg_setup() {
 # @DESCRIPTION:
 # Unpacking necessary rpms from tarball, extract them and rearrange the output.
 intel-sdp_src_unpack() {
-	local l r subdir rb t list=()
+	local l r subdir rb t list=() debug_list
 
 	for t in ${A}; do
-		for r in ${INTEL_RPMS}; do
-			for subdir in ${INTEL_RPMS_DIRS}; do
-				rpmdir=${t%%.*}/${subdir}
-				debug-print "Adding to decompression list: ${rpmdir}/${r}"
-				list+=( ${rpmdir}/${r})
-			done
+		for r in ${INTEL_RPMS[@]}; do
+			rpmdir=${t%%.*}/${INTEL_RPMS_DIR}
+			list+=( ${rpmdir}/${r} )
 		done
 
-		for r in ${INTEL_RPMS_FULL}; do
-			debug-print "Adding to decompression list: ${r}"
-			list+=( ${r})
+		for r in ${INTEL_RPMS_FULL[@]}; do
+			list+=( ${t%%.*}/${r} )
 		done
 
+		debug_list="$(IFS=$'\n'; echo ${list[@]} )"
+
+		debug-print "Adding to decompression list:"
+		debug-print ${debug_list}
 
 		tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log
 
@@ -380,7 +389,7 @@ intel-sdp_src_unpack() {
 			l=.${rb}_$(date +'%d%m%y_%H%M%S').log
 			einfo "Unpacking ${rb}"
 			rpm2tar -O ${r} | tar xvf - | sed -e \
-				"s:^\.:${EROOT#/}:g" > ${l} || die "unpacking ${r} failed"
+				"s:^\.:${EROOT#/}:g" > ${l}; assert "unpacking ${r} failed"
 			mv ${l} opt/intel/ || die "failed moving extract log file"
 		done
 	done


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-07-24  9:17 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2013-07-24  9:17 UTC (permalink / raw
  To: gentoo-commits

commit:     45abf7a4c3d70af48bfb531b0cd82d87ec069027
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 24 09:16:06 2013 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Jul 24 09:16:06 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=45abf7a4

Add INTEL_SINGLE_ARCH

Set this if only the multilib is provided by upstream

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index cd12122..f5f01d8 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -102,6 +102,11 @@
 #
 # e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
 
+# @ECLASS-VARIABLE: INTEL_SINGLE_ARCH
+# @DESCRIPTION:
+# Unset, if only the multilib package will be provided by intel
+: ${INTEL_SINGLE_ARCH:=true}
+
 # @ECLASS-VARIABLE: INTEL_SDP_DB
 # @DESCRIPTION:
 # Full path to intel registry db
@@ -115,10 +120,14 @@ _INTEL_PV3=$(get_version_component_range 3)
 _INTEL_PV4=$(get_version_component_range 4)
 _INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
 
-SRC_URI="
-	amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX} ) )
-	amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} ) )
-	x86?	( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )"
+if [ ${INTEL_SINGLE_ARCH} == true ]; then
+	SRC_URI="
+		amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX} ) )
+		amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} ) )
+		x86?	( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )"
+else
+	SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}"
+fi
 
 LICENSE="Intel-SDP"
 # Future work, #394411


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-07-24  9:17 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2013-07-24  9:17 UTC (permalink / raw
  To: gentoo-commits

commit:     8744891d65415d6b71b5df7ec0d91e7c680f0bb0
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 24 08:40:22 2013 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Jul 24 08:40:22 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=8744891d

fix the arch logic

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 6e715b3..cd12122 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -340,13 +340,13 @@ intel-sdp_pkg_setup() {
 	INTEL_RPMS=()
 	INTEL_RPMS_FULL=()
 	for p in ${INTEL_BIN_RPMS}; do
-		if [ ${p} == $(basename ${p}) ]; then
-			for a in ${arch}; do
+		for a in ${arch}; do
+			if [ ${p} == $(basename ${p}) ]; then
 				INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
-			done
-		else
-			INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
-		fi
+			else
+				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
+			fi
+		done
 	done
 	for p in ${INTEL_DAT_RPMS}; do
 		if [ ${p} == $(basename ${p}) ]; then


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-11-26  5:28 Sebastien Fabbro
  0 siblings, 0 replies; 169+ messages in thread
From: Sebastien Fabbro @ 2013-11-26  5:28 UTC (permalink / raw
  To: gentoo-commits

commit:     11f978fe619c8aff60fee1ebe81888a94f96380f
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 29 15:33:02 2013 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Tue Oct 29 15:33:02 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=11f978fe

bump eselect dependency

---
 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 7908fe2..3a031ea 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -12,7 +12,7 @@
 
 ALTERNATIVES_DIR="/etc/env.d/alternatives"
 
-DEPEND=">=app-admin/eselect-1.3.4-r100"
+DEPEND=">=app-admin/eselect-1.3.8-r100"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2013-11-26  5:28 Sebastien Fabbro
  0 siblings, 0 replies; 169+ messages in thread
From: Sebastien Fabbro @ 2013-11-26  5:28 UTC (permalink / raw
  To: gentoo-commits

commit:     ec3b65cf26f7f25af38fab23cf8e01765971afb6
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 29 15:33:28 2013 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Tue Oct 29 15:33:28 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=ec3b65cf

in main tree

---
 eclass/intel-sdp.eclass | 497 ------------------------------------------------
 1 file changed, 497 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
deleted file mode 100644
index f5f01d8..0000000
--- a/eclass/intel-sdp.eclass
+++ /dev/null
@@ -1,497 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/intel-sdp.eclass,v 1.13 2013/07/19 14:00:50 jlec Exp $
-
-# @ECLASS: intel-sdp.eclass
-# @MAINTAINER:
-# Justin Lecher <jlec@gentoo.org>
-# Sci Team <sci@gentoo.org>
-# @BLURB: Handling of Intel's Software Development Products package management
-
-# @ECLASS-VARIABLE: INTEL_DID
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package download ID from Intel.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-#
-# e.g. 2504
-#
-# Must be defined before inheriting the eclass
-
-# @ECLASS-VARIABLE: INTEL_DPN
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package name to download from Intel.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-#
-# e.g. parallel_studio_xe
-#
-# Must be defined before inheriting the eclass
-
-# @ECLASS-VARIABLE: INTEL_DPV
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package download version from Intel.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-#
-# e.g. 2011_sp1_update2
-#
-# Must be defined before inheriting the eclass
-
-# @ECLASS-VARIABLE: INTEL_TARX
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package extention.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-#
-# e.g. tar.gz
-#
-# Must be defined before inheriting the eclass
-: ${INTEL_TARX:=tgz}
-
-# @ECLASS-VARIABLE: INTEL_SUBDIR
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package sub-directory where it will end-up in /opt/intel
-# To find out its value, you have to do a raw install from the Intel tar ball
-
-# @ECLASS-VARIABLE: INTEL_SKIP_LICENSE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Possibility to skip the mandatory check for licenses. Only set this if there
-# is really no fix.
-
-# @ECLASS-VARIABLE: INTEL_RPMS_DIR
-# @DESCRIPTION:
-# Main subdirectory which contains the rpms to extract.
-: ${INTEL_RPMS_DIR:=rpm}
-
-# @ECLASS-VARIABLE: INTEL_X86
-# @DESCRIPTION:
-# 32bit arch in rpm names
-#
-# e.g. i484
-: ${INTEL_X86:=i486}
-
-# @ECLASS-VARIABLE: INTEL_BIN_RPMS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Functional name of rpm without any version/arch tag
-#
-# e.g. compilerprof
-#
-# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
-# specify the full path
-#
-# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
-
-# @ECLASS-VARIABLE: INTEL_DAT_RPMS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Functional name of rpm of common data which are arch free
-# without any version tag
-#
-# e.g. openmp
-#
-# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
-# specify the full path
-#
-# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
-
-# @ECLASS-VARIABLE: INTEL_SINGLE_ARCH
-# @DESCRIPTION:
-# Unset, if only the multilib package will be provided by intel
-: ${INTEL_SINGLE_ARCH:=true}
-
-# @ECLASS-VARIABLE: INTEL_SDP_DB
-# @DESCRIPTION:
-# Full path to intel registry db
-INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
-
-inherit check-reqs multilib versionator
-
-_INTEL_PV1=$(get_version_component_range 1)
-_INTEL_PV2=$(get_version_component_range 2)
-_INTEL_PV3=$(get_version_component_range 3)
-_INTEL_PV4=$(get_version_component_range 4)
-_INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
-
-if [ ${INTEL_SINGLE_ARCH} == true ]; then
-	SRC_URI="
-		amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX} ) )
-		amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} ) )
-		x86?	( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )"
-else
-	SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}"
-fi
-
-LICENSE="Intel-SDP"
-# Future work, #394411
-#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
-SLOT="0"
-IUSE="examples multilib"
-
-RESTRICT="mirror"
-
-RDEPEND=""
-DEPEND="app-arch/rpm2targz"
-
-_INTEL_SDP_YEAR=${INTEL_DPV%_update*}
-_INTEL_SDP_YEAR=${INTEL_DPV%_sp*}
-
-# @ECLASS-VARIABLE: INTEL_SDP_DIR
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Full rootless path to installation dir
-INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}.${_INTEL_PV3}.${_INTEL_PV4}"
-
-# @ECLASS-VARIABLE: INTEL_SDP_EDIR
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Full rooted path to installation dir
-INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
-
-S="${WORKDIR}"
-
-QA_PREBUILT="${INTEL_SDP_DIR}/*"
-
-# @ECLASS-VARIABLE: INTEL_ARCH
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Intels internal names of the arches; will be set at runtime accordingly
-#
-# e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
-
-# @FUNCTION: _isdp_link_eclipse_plugins
-# @INTERNAL
-# @DESCRIPTION:
-# Creating necessary links to use intel compiler with eclipse
-_isdp_link_eclipse_plugins() {
-	local c f
-	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
-		for c in cdt*; do
-			local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
-			if has_version "dev-util/eclipse-sdk:${ev}"; then
-				einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
-				for f in cdt${cv}/eclipse/features/*; do
-					dodir /usr/$(get_libdir)/eclipse-${ev}/features
-					dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
-						/usr/$(get_libdir)/eclipse-${ev}/features/ || die
-				done
-				for f in cdt${cv}/eclipse/plugins/*; do
-					dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
-					dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
-						/usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
-				done
-			fi
-		done
-	popd > /dev/null
-}
-
-# @FUNCTION: _isdp_big-warning
-# @USAGE: [pre-check | test-failed]
-# @INTERNAL
-# @DESCRIPTION:
-# warn user that we really require a license
-_isdp_big-warning() {
-	case ${1} in
-		pre-check )
-			echo ""
-			ewarn "License file not found!"
-			;;
-
-		test-failed )
-			echo
-			ewarn "Function test failed. Most probably due to an invalid license."
-			ewarn "This means you already tried to bypass the license check once."
-			;;
-	esac
-
-	echo ""
-	ewarn "Make sure you have recieved the an Intel license."
-	ewarn "To receive a non-commercial license, you need to register at:"
-	ewarn "http://software.intel.com/en-us/articles/non-commercial-software-development/"
-	ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
-
-	case ${1} in
-		pre-check )
-			ewarn "before proceeding with installation of ${P}"
-			echo ""
-			;;
-		* )
-			echo ""
-			;;
-			esac
-}
-
-# @FUNCTION: _isdp_version_test
-# @INTERNAL
-# @DESCRIPTION:
-# Testing for valid license by asking for version information of the compiler
-_isdp_version_test() {
-	local comp comp_full arch warn
-	case ${PN} in
-		ifc )
-			debug-print "Testing ifort"
-			comp=ifort
-			;;
-		icc )
-			debug-print "Testing icc"
-			comp=icc
-			;;
-		*)
-			die "${PN} is not supported for testing"
-			;;
-	esac
-
-	for arch in ${INTEL_ARCH}; do
-		case ${EBUILD_PHASE} in
-			install )
-				comp_full="${ED}/${INTEL_SDP_DIR}/bin/${arch}/${comp}"
-				;;
-			postinst )
-				comp_full="${INTEL_SDP_EDIR}/bin/${arch}/${comp}"
-				;;
-			* )
-				ewarn "Compile test not supported in ${EBUILD_PHASE}"
-				continue
-				;;
-		esac
-
-		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${arch}/\" \"${comp_full}\" -V"
-
-		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${arch}/" "${comp_full}" -V &>/dev/null
-		[[ $? -ne 0 ]] && warn=yes
-	done
-	[[ "${warn}" == "yes" ]] && _isdp_big-warning test-failed
-}
-
-# @FUNCTION: _isdp_run-test
-# @INTERNAL
-# Test if installed compiler is working
-_isdp_run-test() {
-	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
-		case ${PN} in
-			ifc | icc )
-				_isdp_version_test ;;
-			* )
-				debug-print "No test available for ${PN}"
-				;;
-		esac
-	fi
-}
-
-# @FUNCTION: intel-sdp_pkg_pretend
-# @DESCRIPTION:
-# @CODE
-# * Check that the user has a (valid) license file before going on.
-# * Check for space requirements being fullfilled
-# @CODE
-intel-sdp_pkg_pretend() {
-	local warn=1 dir dirs ret arch a p
-
-	: ${CHECKREQS_DISK_BUILD:=256M}
-	check-reqs_pkg_pretend
-
-	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
-		if echo ${INTEL_LICENSE_FILE} | grep -q @; then
-			einfo "Looks like you are using following license server:"
-			einfo "   ${INTEL_LICENSE_FILE}"
-			return 0
-		fi
-
-		dirs=(
-			"${INTEL_SDP_EDIR}/licenses"
-			"${INTEL_SDP_EDIR}/Licenses"
-			"${EPREFIX}/opt/intel/licenses"
-			)
-		for dir in "${dirs[@]}" ; do
-			ebegin "Checking for a license in: ${dir}"
-			#maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]]
-			[[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$?
-			eend ${ret}
-			if [[ ${ret} == "0" ]]; then
-				warn=${ret}
-				break
-			fi
-		done
-		if [[ ${warn} == "1" ]]; then
-			_isdp_big-warning pre-check
-			die "Could not find license file"
-		fi
-	else
-		eqawarn "The ebuild doesn't check for a license!"
-		eqawarn "This shouldn't be done unless there is a serious reason."
-	fi
-}
-
-# @FUNCTION: intel-sdp_pkg_setup
-# @DESCRIPTION:
-# Setting up and sorting some internal variables
-intel-sdp_pkg_setup() {
-	local arch a p
-
-	if use x86; then
-		arch=${INTEL_X86}
-		INTEL_ARCH="ia32"
-	elif use amd64; then
-		arch=x86_64
-		INTEL_ARCH="intel64"
-		if has_multilib_profile; then
-			arch="x86_64 ${INTEL_X86}"
-			INTEL_ARCH="intel64 ia32"
-		fi
-	fi
-	INTEL_RPMS=()
-	INTEL_RPMS_FULL=()
-	for p in ${INTEL_BIN_RPMS}; do
-		for a in ${arch}; do
-			if [ ${p} == $(basename ${p}) ]; then
-				INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
-			else
-				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
-			fi
-		done
-	done
-	for p in ${INTEL_DAT_RPMS}; do
-		if [ ${p} == $(basename ${p}) ]; then
-			INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )
-		else
-			INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )
-		fi
-	done
-
-	case "${EAPI:-0}" in
-		0|1|2|3) intel-sdp_pkg_pretend ;;
-	esac
-}
-
-# @FUNCTION: intel-sdp_src_unpack
-# @DESCRIPTION:
-# Unpacking necessary rpms from tarball, extract them and rearrange the output.
-intel-sdp_src_unpack() {
-	local l r subdir rb t list=() debug_list
-
-	for t in ${A}; do
-		for r in ${INTEL_RPMS[@]}; do
-			rpmdir=${t%%.*}/${INTEL_RPMS_DIR}
-			list+=( ${rpmdir}/${r} )
-		done
-
-		for r in ${INTEL_RPMS_FULL[@]}; do
-			list+=( ${t%%.*}/${r} )
-		done
-
-		debug_list="$(IFS=$'\n'; echo ${list[@]} )"
-
-		debug-print "Adding to decompression list:"
-		debug-print ${debug_list}
-
-		tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log
-
-		for r in ${list[@]}; do
-			rb=$(basename ${r})
-			l=.${rb}_$(date +'%d%m%y_%H%M%S').log
-			einfo "Unpacking ${rb}"
-			rpm2tar -O ${r} | tar xvf - | sed -e \
-				"s:^\.:${EROOT#/}:g" > ${l}; assert "unpacking ${r} failed"
-			mv ${l} opt/intel/ || die "failed moving extract log file"
-		done
-	done
-
-	mv opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
-}
-
-# @FUNCTION: intel-sdp_src_install
-# @DESCRIPTION:
-# Install everything
-intel-sdp_src_install() {
-	if [[ -d "${INTEL_SDP_DIR}"/Documentation ]]; then
-		dodoc -r "${INTEL_SDP_DIR}"/Documentation/*
-
-		ebegin "Cleaning out documentation"
-		find "${INTEL_SDP_DIR}"/Documentation -delete || die
-		eend
-	fi
-
-	if [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
-		if use examples ; then
-			insinto /usr/share/${P}/examples/
-			doins -r "${INTEL_SDP_DIR}"/Samples/*
-		fi
-		ebegin "Cleaning out examples"
-		find "${INTEL_SDP_DIR}"/Samples -delete || die
-		eend
-	fi
-
-	if [[ -d "${INTEL_SDP_DIR}"/eclipse_support ]]; then
-		if has eclipse ${IUSE} && use eclipse; then
-			_isdp_link_eclipse_plugins
-		else
-			ebegin "Cleaning out eclipse plugin"
-			find "${INTEL_SDP_DIR}"/eclipse_support -delete || die
-			eend
-		fi
-	fi
-
-	if [[ -d "${INTEL_SDP_DIR}"/man ]]; then
-		doman "${INTEL_SDP_DIR}"/man/en_US/man1/*
-		if has linguas_ja ${IUSE} && use linguas_ja; then
-			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*
-		fi
-
-		find "${INTEL_SDP_DIR}"/man -delete || die
-	fi
-
-	ebegin "Tagging ${PN}"
-	find opt -name \*sh -type f -exec sed -i \
-		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \
-		'{}' + || die
-	eend
-
-	[[ -d "${ED}" ]] || dodir /
-	mv opt "${ED}"/ || die "moving files failed"
-
-	dodir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
-	keepdir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
-}
-
-# @FUNCTION: intel-sdp_pkg_postinst
-# @DESCRIPTION:
-# Add things to intel database
-intel-sdp_pkg_postinst() {
-	# add product registry to intel "database"
-	local l r
-	for r in ${INTEL_RPMS}; do
-		l="$(ls -1 ${EROOT%/}/opt/intel/.${r}_*.log | head -n 1)"
-		echo >> ${INTEL_SDP_DB} \
-			"<:${r%-${_INTEL_PV4}*}-${_INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>"
-	done
-	_isdp_run-test
-}
-
-# @FUNCTION: intel-sdp_pkg_postrm
-# @DESCRIPTION:
-# Sanitize intel database
-intel-sdp_pkg_postrm() {
-	# remove from intel "database"
-	if [[ -e ${INTEL_SDP_DB} ]]; then
-		local r
-		for r in ${INTEL_RPMS}; do
-			sed -i \
-				-e "/${r}/d" \
-				${INTEL_SDP_DB}
-		done
-	fi
-}
-
-EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm
-case "${EAPI:-0}" in
-	0|1|2|3) ;;
-	4|5) EXPORT_FUNCTIONS pkg_pretend ;;
-	*) die "EAPI=${EAPI} is not supported" ;;
-esac


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-04 18:11 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2014-01-04 18:11 UTC (permalink / raw
  To: gentoo-commits

commit:     46fa2049f52a0c16abd8f25ba5bdce968cf860bb
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  4 18:10:40 2014 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Jan  4 18:10:40 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=46fa2049

Bump eselect verion in deps

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 3a031ea..38a0328 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -12,7 +12,7 @@
 
 ALTERNATIVES_DIR="/etc/env.d/alternatives"
 
-DEPEND=">=app-admin/eselect-1.3.8-r100"
+DEPEND=">=app-admin/eselect-1.4-r100"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-21 19:38 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-21 19:38 UTC (permalink / raw
  To: gentoo-commits

commit:     298f52cea3b60e05a2b851e2ebd745d45045684c
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 21 17:02:36 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 17:02:36 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=298f52ce

fixed a bit removing alternative module with newer eselect

---
 eclass/alternatives-2.eclass | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 38a0328..fe2f55e 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -147,13 +147,18 @@ alternatives-2_pkg_prerm() {
 		#echo "Making sure ${alt} has a valid provider"
 		#echo eselect "${alt}" update${ignore} "${provider}"
 		eselect "${alt}" update${ignore} "${provider}" && continue
-		einfo "Removed ${provider} alternative module for ${alt}, current is $(eselect ${alt} show)"
-		if [[ $? -eq 2 ]]; then
-			einfo "Cleaning up unused alternatives module for ${alt}"
-			echo rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect"
-			rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" ||
-				eerror rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" failed
-		fi
+		einfo "Removing ${provider} alternative module for ${alt}, current is $(eselect ${alt} show)"
+		case $? in
+			0) : ;;
+			2)
+				einfo "Cleaning up unused alternatives module for ${alt}"
+				rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" || \
+					eerror rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" failed
+				;;
+			*)
+				eerror eselect "${alt}" update "${provider}" returned $?
+				;;
+		esac
 	done
 }
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     c8605f784743bafe6b0594ffae879b3e6882c63b
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 16:13:39 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:42:28 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=c8605f78

alternatives-2.eclass: Update copyright

---
 eclass/alternatives-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index fe2f55e..6a99a19 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -1,6 +1,6 @@
-# Copyright 2010-2013 Gentoo Foundation
+# Copyright 2010-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-#  $
+# $Header: $
 
 # Based in part upon 'alternatives.exlib' from Exherbo, which is:
 # Copyright 2008, 2009 Bo Ørsted Andresen


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     4660a767bf3d9376e7ee32738b13138d54878ff9
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 16:16:49 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:42:28 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=4660a767

alternatives-2.eclass: Remove unused variables

---
 eclass/alternatives-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 6a99a19..becc0e4 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -23,7 +23,7 @@ alternatives_for() {
 	#echo alternatives_for "${@}"
 
 	(( $# >= 5 )) && (( ($#-3)%2 == 0)) || die "${FUNCNAME} requires exactly 3+N*2 arguments where N>=1"
-	local x dupl alternative=${1} provider=${2} importance=${3} index unique src target ret=0
+	local alternative=${1} provider=${2} importance=${3} index src target ret=0
 	shift 3
 
 	# make sure importance is a signed integer
@@ -139,7 +139,7 @@ alternatives-2_pkg_postinst() {
 }
 
 alternatives-2_pkg_prerm() {
-	local a alt provider p ignore
+	local a alt provider ignore
 	[[ -n ${REPLACED_BY_ID} ]] || ignore=" --ignore"
 	for a in "${ALTERNATIVES_PROVIDED[@]}"; do
 		alt="${a%:*}"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     1685ac726eee2306c6cb928f731a68d4112ef15a
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 20:18:28 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:59:19 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=1685ac72

alternatives-2.eclass: Fix einfo message in pkg_postinst

---
 eclass/alternatives-2.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 4bf696e..a6c2ef6 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -171,6 +171,7 @@ alternatives-2_pkg_postinst() {
 			if [[ ! -d ${EAUTO} ]]; then
 				install -d "${EAUTO}" || eerror "Could not create eselect modules dir"
 			fi
+			einfo "Creating alternatives eselect module for ${alt}"
 			cat > "${EAUTO}/${alt}.eselect" <<-EOF
 				# This module was automatically generated by alternatives-2.eclass
 				DESCRIPTION="Alternatives for ${alt}"
@@ -184,7 +185,7 @@ alternatives-2_pkg_postinst() {
 			EOF
 		fi
 
-		einfo "Creating ${provider} alternative module for ${alt}"
+		# Set alternative provider if there is no valid provider selected
 		eselect "${alt}" update "${provider}"
 
 		cleanup_old_alternatives_module ${alt}


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     df4c5d00586e4084d5dde40bd94d6c9f8960b913
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 17:20:47 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:59:19 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=df4c5d00

alternatives-2.eclass: Use consistent quoting

---
 eclass/alternatives-2.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 132620e..4bf696e 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -145,7 +145,7 @@ cleanup_old_alternatives_module() {
 	if [[ -f "${old_module}" && "$(source "${old_module}" &>/dev/null; echo "${ALTERNATIVE}")" == "${alt}" ]]; then
 		local version="$(source "${old_module}" &>/dev/null; echo "${VERSION}")"
 		if [[ "${version}" == "0.1" || "${version}" == "20080924" ]]; then
-			echo rm "${old_module}"
+			echo "rm ${old_module}"
 			rm "${old_module}" || eerror "rm ${old_module} failed"
 		fi
 	fi
@@ -212,10 +212,10 @@ alternatives-2_pkg_prerm() {
 			2)
 				einfo "Cleaning up unused alternatives module for ${alt}"
 				rm "${EAUTO}/${alt}.eselect" || \
-					eerror rm "${EAUTO}/${alt}.eselect" failed
+					eerror "rm ${EAUTO}/${alt}.eselect failed"
 				;;
 			*)
-				eerror eselect "${alt}" update "${provider}" returned $?
+				eerror "eselect ${alt} update ${provider} returned $?"
 				;;
 		esac
 	done


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     09491cce3e1d1de7ebbbd5b96bdf5e5c9aca87db
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 16:27:36 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:55:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=09491cce

alternatives-2.eclass: Fix eclass name in comments

---
 eclass/alternatives-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index b053de9..17cc66d 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -8,7 +8,7 @@
 # Copyright 2009 David Leverton
 
 # If your package provides pkg_postinst or pkg_prerm phases, you need to be
-# sure you explicitly run alternatives_pkg_{postinst,prerm} where appropriate.
+# sure you explicitly run alternatives-2_pkg_{postinst,prerm} where appropriate.
 
 ALTERNATIVES_DIR="/etc/env.d/alternatives"
 
@@ -119,7 +119,7 @@ alternatives-2_pkg_postinst() {
 				install -d "${EAUTO}" || eerror "Could not create eselect modules dir"
 			fi
 			cat > "${EAUTO}/${alt}.eselect" <<-EOF
-				# This module was automatically generated by alternatives.eclass
+				# This module was automatically generated by alternatives-2.eclass
 				DESCRIPTION="Alternatives for ${alt}"
 				VERSION="${module_version}"
 				MAINTAINER="eselect@gentoo.org"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     ff8b1ad72e5f30ec5b3f084b87c672f2a7b81c6f
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 16:35:24 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:55:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=ff8b1ad7

alternatives-2.eclass: Add documentation comments

---
 eclass/alternatives-2.eclass | 50 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 46 insertions(+), 4 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index f83c479..bc60108 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -7,6 +7,16 @@
 # Copyright 2008, 2009 Mike Kelly
 # Copyright 2009 David Leverton
 
+# @ECLASS: alternatives-2
+# @MAINTAINER:
+# Gentoo Science Project <sci@gentoo.org>
+# @BLURB: Manage alternative implementations.
+# @DESCRIPTION:
+# Autogenerate eselect modules for alternatives and ensure that valid provider
+# is set.
+#
+# Remove eselect modules when last provider is unmerged.
+#
 # If your package provides pkg_postinst or pkg_prerm phases, you need to be
 # sure you explicitly run alternatives-2_pkg_{postinst,prerm} where appropriate.
 
@@ -21,8 +31,6 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-ALTERNATIVES_DIR="/etc/env.d/alternatives"
-
 DEPEND=">=app-admin/eselect-1.4-r100"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
@@ -31,9 +39,24 @@ RDEPEND="${DEPEND}
 
 EXPORT_FUNCTIONS pkg_postinst pkg_prerm
 
-# alternatives_for alternative provider importance source target [ source target [...]]
-alternatives_for() {
+# @ECLASS-VARIABLE: ALTERNATIVES_DIR
+# @INTERNAL
+# @DESCRIPTION:
+# Alternatives directory with symlinks managed by eselect.
+ALTERNATIVES_DIR="/etc/env.d/alternatives"
 
+# @FUNCTION: alternatives_for
+# @USAGE: alternative provider importance source target [source target [...]]
+# @DESCRIPTION:
+# Set up alternative provider.
+#
+# EXAMPLE:
+# @CODE
+# alternatives_for cblas atlas 0 \
+#     /usr/$(get_libdir)/pkgconfig/cblas.pc atlas-cblas.pc \
+#     /usr/include/cblas.h atlas/cblas.h
+# @CODE
+alternatives_for() {
 	(( $# >= 5 )) && (( ($#-3)%2 == 0)) || die "${FUNCNAME} requires exactly 3+N*2 arguments where N>=1"
 	local alternative=${1} provider=${2} importance=${3} index src target ret=0
 	shift 3
@@ -106,6 +129,10 @@ alternatives_for() {
 	[[ ${ret} -eq 0 ]] || die "Errors detected for ${provider}, provided for ${alternative}"
 }
 
+# @FUNCTION: cleanup_old_alternatives_module
+# @USAGE: alternative
+# @DESCRIPTION:
+# Remove old alternatives module.
 cleanup_old_alternatives_module() {
 	local alt=${1} old_module="${EROOT%/}/usr/share/eselect/modules/${alt}.eselect"
 	if [[ -f "${old_module}" && "$(source "${old_module}" &>/dev/null; echo "${ALTERNATIVE}")" == "${alt}" ]]; then
@@ -117,6 +144,14 @@ cleanup_old_alternatives_module() {
 	fi
 }
 
+# @FUNCTION: alternatives-2_pkg_postinst
+# @DESCRIPTION:
+# Create eselect modules for all provided alternatives if necessary and ensure
+# that valid provider is set.
+#
+# Also remove old eselect modules for provided alternatives.
+#
+# Provided alternatives are set up using alternatives_for().
 alternatives-2_pkg_postinst() {
 	local a alt provider module_version="20090908"
 	local EAUTO="${EROOT%/}/usr/share/eselect/modules/auto"
@@ -149,6 +184,13 @@ alternatives-2_pkg_postinst() {
 	done
 }
 
+# @FUNCTION: alternatives-2_pkg_prerm
+# @DESCRIPTION:
+# Ensure a valid provider is set in case the package is unmerged and
+# remove autogenerated eselect modules for all alternatives when last
+# provider is unmerged.
+#
+# Provided alternatives are set up using alternatives_for().
 alternatives-2_pkg_prerm() {
 	local a alt provider ignore
 	local EAUTO="${EROOT%/}/usr/share/eselect/modules/auto"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     7a000b8718b20cb80c0563aac92202cd87a6b72c
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 16:21:48 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:42:28 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=7a000b87

alternatives-2.eclass: Remove commented-out code

---
 eclass/alternatives-2.eclass | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 053d82c..dd16f6a 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -22,7 +22,6 @@ EXPORT_FUNCTIONS pkg_postinst pkg_prerm
 
 # alternatives_for alternative provider importance source target [ source target [...]]
 alternatives_for() {
-	#echo alternatives_for "${@}"
 
 	(( $# >= 5 )) && (( ($#-3)%2 == 0)) || die "${FUNCNAME} requires exactly 3+N*2 arguments where N>=1"
 	local alternative=${1} provider=${2} importance=${3} index src target ret=0
@@ -115,7 +114,6 @@ alternatives-2_pkg_postinst() {
 		if [[ ! -f "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" \
 			|| "$(source "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" &>/dev/null; echo "${VERSION}")" \
 				-ne "${module_version}" ]]; then
-			#einfo "Creating alternatives module for ${alt}"
 			if [[ ! -d ${EROOT%/}/usr/share/eselect/modules/auto ]]; then
 				install -d "${EROOT%/}"/usr/share/eselect/modules/auto || eerror "Could not create eselect modules dir"
 			fi
@@ -132,7 +130,6 @@ alternatives-2_pkg_postinst() {
 			EOF
 		fi
 
-		#echo eselect "${alt}" update "${provider}"
 		einfo "Creating ${provider} alternative module for ${alt}"
 		eselect "${alt}" update "${provider}"
 
@@ -146,8 +143,6 @@ alternatives-2_pkg_prerm() {
 	for a in "${ALTERNATIVES_PROVIDED[@]}"; do
 		alt="${a%:*}"
 		provider="${a#*:}"
-		#echo "Making sure ${alt} has a valid provider"
-		#echo eselect "${alt}" update${ignore} "${provider}"
 		eselect "${alt}" update${ignore} "${provider}" && continue
 		einfo "Removing ${provider} alternative module for ${alt}, current is $(eselect ${alt} show)"
 		case $? in


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     4aac5c491b54e91e02cbe4282969b168ab7f2e58
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 16:29:52 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:55:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=4aac5c49

alternatives-2.eclass: Add EAPI check

---
 eclass/alternatives-2.eclass | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 17cc66d..f83c479 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -10,6 +10,17 @@
 # If your package provides pkg_postinst or pkg_prerm phases, you need to be
 # sure you explicitly run alternatives-2_pkg_{postinst,prerm} where appropriate.
 
+case "${EAPI:-0}" in
+	0|1|2|3)
+		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
+		;;
+	4|5)
+		;;
+	*)
+		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
+		;;
+esac
+
 ALTERNATIVES_DIR="/etc/env.d/alternatives"
 
 DEPEND=">=app-admin/eselect-1.4-r100"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     aa6de45b01a4c7dbbf9b6e32655eeed16d21089a
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 16:19:18 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:42:28 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=aa6de45b

alternatives-2.eclass: Move EXPORT_FUNCTIONS to top

---
 eclass/alternatives-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index becc0e4..053d82c 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -18,6 +18,8 @@ RDEPEND="${DEPEND}
 	!app-admin/eselect-cblas
 	!app-admin/eselect-lapack"
 
+EXPORT_FUNCTIONS pkg_postinst pkg_prerm
+
 # alternatives_for alternative provider importance source target [ source target [...]]
 alternatives_for() {
 	#echo alternatives_for "${@}"
@@ -161,5 +163,3 @@ alternatives-2_pkg_prerm() {
 		esac
 	done
 }
-
-EXPORT_FUNCTIONS pkg_postinst pkg_prerm


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     c89c79c68411a2c4b097e27833c3af3db2d7d6e9
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 16:24:45 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:55:20 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=c89c79c6

alternatives-2.eclass: Put commonly used path in local variable

---
 eclass/alternatives-2.eclass | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index dd16f6a..b053de9 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -108,16 +108,17 @@ cleanup_old_alternatives_module() {
 
 alternatives-2_pkg_postinst() {
 	local a alt provider module_version="20090908"
+	local EAUTO="${EROOT%/}/usr/share/eselect/modules/auto"
 	for a in "${ALTERNATIVES_PROVIDED[@]}"; do
 		alt="${a%:*}"
 		provider="${a#*:}"
-		if [[ ! -f "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" \
-			|| "$(source "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" &>/dev/null; echo "${VERSION}")" \
+		if [[ ! -f "${EAUTO}/${alt}.eselect" \
+			|| "$(source "${EAUTO}/${alt}.eselect" &>/dev/null; echo "${VERSION}")" \
 				-ne "${module_version}" ]]; then
-			if [[ ! -d ${EROOT%/}/usr/share/eselect/modules/auto ]]; then
-				install -d "${EROOT%/}"/usr/share/eselect/modules/auto || eerror "Could not create eselect modules dir"
+			if [[ ! -d ${EAUTO} ]]; then
+				install -d "${EAUTO}" || eerror "Could not create eselect modules dir"
 			fi
-			cat > "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" <<-EOF
+			cat > "${EAUTO}/${alt}.eselect" <<-EOF
 				# This module was automatically generated by alternatives.eclass
 				DESCRIPTION="Alternatives for ${alt}"
 				VERSION="${module_version}"
@@ -139,6 +140,7 @@ alternatives-2_pkg_postinst() {
 
 alternatives-2_pkg_prerm() {
 	local a alt provider ignore
+	local EAUTO="${EROOT%/}/usr/share/eselect/modules/auto"
 	[[ -n ${REPLACED_BY_ID} ]] || ignore=" --ignore"
 	for a in "${ALTERNATIVES_PROVIDED[@]}"; do
 		alt="${a%:*}"
@@ -149,8 +151,8 @@ alternatives-2_pkg_prerm() {
 			0) : ;;
 			2)
 				einfo "Cleaning up unused alternatives module for ${alt}"
-				rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" || \
-					eerror rm "${EROOT%/}/usr/share/eselect/modules/auto/${alt}.eselect" failed
+				rm "${EAUTO}/${alt}.eselect" || \
+					eerror rm "${EAUTO}/${alt}.eselect" failed
 				;;
 			*)
 				eerror eselect "${alt}" update "${provider}" returned $?


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     5a4baf2fc4f4a1610069e0dafa85ec39aeca8496
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Mon Jan 20 17:14:18 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 19:55:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=5a4baf2f

alternatives-2.eclass: Minor comment changes

---
 eclass/alternatives-2.eclass | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index bc60108..132620e 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -61,22 +61,26 @@ alternatives_for() {
 	local alternative=${1} provider=${2} importance=${3} index src target ret=0
 	shift 3
 
-	# make sure importance is a signed integer
+	# Make sure importance is a signed integer
 	if [[ -n ${importance} ]] && ! [[ ${importance} =~ ^[0-9]+(\.[0-9]+)*$ ]]; then
 		eerror "Invalid importance (${importance}) detected"
 		((ret++))
 	fi
 
+	# Create alternative provider subdirectories under ALTERNATIVES_DIR if needed
 	[[ -d "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}" ]] || dodir "${ALTERNATIVES_DIR}/${alternative}/${provider}"
 
-	# keep track of provided alternatives for use in pkg_{postinst,prerm}. keep a mapping between importance and
-	# provided alternatives and make sure the former is set to only one value
+	# Keep track of provided alternatives for use in pkg_{postinst,prerm}.
+	# Keep a mapping between importance and provided alternatives
+	# and make sure the former is set to only one value.
 	if ! has "${alternative}:${provider}" "${ALTERNATIVES_PROVIDED[@]}"; then
+		# Add new provider and set its importance
 		index=${#ALTERNATIVES_PROVIDED[@]}
 		ALTERNATIVES_PROVIDED+=( "${alternative}:${provider}" )
 		ALTERNATIVES_IMPORTANCE[index]=${importance}
 		[[ -n ${importance} ]] && echo "${importance}" > "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}/_importance"
 	else
+		# Set importance for existing provider
 		for((index=0;index<${#ALTERNATIVES_PROVIDED[@]};index++)); do
 			if [[ ${alternative}:${provider} == ${ALTERNATIVES_PROVIDED[index]} ]]; then
 				if [[ -n ${ALTERNATIVES_IMPORTANCE[index]} ]]; then
@@ -92,6 +96,7 @@ alternatives_for() {
 		done
 	fi
 
+	# Process source-target pairs
 	while (( $# >= 2 )); do
 		src=${1//+(\/)/\/}; target=${2//+(\/)/\/}
 		if [[ ${src} != /* ]]; then
@@ -111,8 +116,9 @@ alternatives_for() {
 			dodir "${ALTERNATIVES_DIR}/${alternative}/${provider}${src%/*}"
 			dosym "${reltarget}" "${ALTERNATIVES_DIR}/${alternative}/${provider}${src}"
 
-			# say ${ED}/sbin/init exists and links to /bin/systemd (which doesn't exist yet)
-			# the -e test will fail, so check for -L also
+			# The -e test will fail if existing symlink points to non-existing target,
+			# so check for -L also.
+			# Say ${ED}/sbin/init exists and links to /bin/systemd (which doesn't exist yet).
 			if [[ -e ${ED}${src} || -L ${ED}${src} ]]; then
 				local fulltarget=${target}
 				[[ ${fulltarget} != /* ]] && fulltarget=${src%/*}/${fulltarget}
@@ -126,6 +132,7 @@ alternatives_for() {
 		shift 2
 	done
 
+	# Stop if there were any errors
 	[[ ${ret} -eq 0 ]] || die "Errors detected for ${provider}, provided for ${alternative}"
 }
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     89fc5b43baf07787a4ad7f66606c2f5c95a641e9
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Tue Jan 21 16:29:57 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 20:05:14 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=89fc5b43

alternatives-2.eclass: Fix check for uninstalling

---
 eclass/alternatives-2.eclass | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index a6c2ef6..217ba4d 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -200,17 +200,21 @@ alternatives-2_pkg_postinst() {
 #
 # Provided alternatives are set up using alternatives_for().
 alternatives-2_pkg_prerm() {
-	local a alt provider ignore
+	local a alt provider ignore ret
 	local EAUTO="${EROOT%/}/usr/share/eselect/modules/auto"
-	[[ -n ${REPLACED_BY_ID} ]] || ignore=" --ignore"
+	# If we are uninstalling, update alternatives to valid provider
+	[[ -n ${REPLACED_BY_VERSION} ]] || ignore="--ignore"
 	for a in "${ALTERNATIVES_PROVIDED[@]}"; do
 		alt="${a%:*}"
 		provider="${a#*:}"
-		eselect "${alt}" update${ignore} "${provider}" && continue
-		einfo "Removing ${provider} alternative module for ${alt}, current is $(eselect ${alt} show)"
-		case $? in
+		eselect "${alt}" update ${ignore} "${provider}"
+		ret=$?
+		[[ -n ${REPLACED_BY_VERSION} ]] || \
+			einfo "Removing ${provider} alternative module for ${alt}, current is $(eselect ${alt} show)"
+		case ${ret} in
 			0) : ;;
 			2)
+				# This was last provider for the alternative, remove eselect module
 				einfo "Cleaning up unused alternatives module for ${alt}"
 				rm "${EAUTO}/${alt}.eselect" || \
 					eerror "rm ${EAUTO}/${alt}.eselect failed"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:09 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:09 UTC (permalink / raw
  To: gentoo-commits

commit:     1ce8f9382dac46e53e5fcd709a20d48c32049afe
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Tue Jan 21 16:30:58 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Tue Jan 21 20:05:14 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=1ce8f938

alternatives-2.eclass: Don't source eselect modules

They can't be sourced because DESCRIPTION from the package ebuild is a
read-only variable and sourcing eselect modules fails since it tries to
set its own description.

Fall back instead to manually grepping for ALTERNATIVE and VERSION
variables. This depends on their values being simple strings.

---
 eclass/alternatives-2.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 217ba4d..42150c0 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -142,8 +142,8 @@ alternatives_for() {
 # Remove old alternatives module.
 cleanup_old_alternatives_module() {
 	local alt=${1} old_module="${EROOT%/}/usr/share/eselect/modules/${alt}.eselect"
-	if [[ -f "${old_module}" && "$(source "${old_module}" &>/dev/null; echo "${ALTERNATIVE}")" == "${alt}" ]]; then
-		local version="$(source "${old_module}" &>/dev/null; echo "${VERSION}")"
+	if [[ -f "${old_module}" && $(grep 'ALTERNATIVE=' "${old_module}" | cut -d '=' -f 2) == "${alt}" ]]; then
+		local version="$(grep 'VERSION=' "${old_module}" | grep -o '[0-9.]\+')"
 		if [[ "${version}" == "0.1" || "${version}" == "20080924" ]]; then
 			echo "rm ${old_module}"
 			rm "${old_module}" || eerror "rm ${old_module} failed"
@@ -166,7 +166,7 @@ alternatives-2_pkg_postinst() {
 		alt="${a%:*}"
 		provider="${a#*:}"
 		if [[ ! -f "${EAUTO}/${alt}.eselect" \
-			|| "$(source "${EAUTO}/${alt}.eselect" &>/dev/null; echo "${VERSION}")" \
+			|| "$(grep '^VERSION=' "${EAUTO}/${alt}.eselect" | grep -o '[0-9]\+')" \
 				-ne "${module_version}" ]]; then
 			if [[ ! -d ${EAUTO} ]]; then
 				install -d "${EAUTO}" || eerror "Could not create eselect modules dir"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-01-22 10:11 Reinis Danne
  0 siblings, 0 replies; 169+ messages in thread
From: Reinis Danne @ 2014-01-22 10:11 UTC (permalink / raw
  To: gentoo-commits

commit:     4d753604688488a81c75352f6ea409f36d8446e2
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Wed Jan 22 10:10:25 2014 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Wed Jan 22 10:10:25 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=4d753604

alternatives-2.eclass: Use saved exit status

---
 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 42150c0..de1d317 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -220,7 +220,7 @@ alternatives-2_pkg_prerm() {
 					eerror "rm ${EAUTO}/${alt}.eselect failed"
 				;;
 			*)
-				eerror "eselect ${alt} update ${provider} returned $?"
+				eerror "eselect ${alt} update ${provider} returned ${ret}"
 				;;
 		esac
 	done


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-05-23  9:14 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2014-05-23  9:14 UTC (permalink / raw
  To: gentoo-commits

commit:     6270426e05075f65ff3e36bf427ade7accedbc10
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri May 23 09:14:28 2014 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri May 23 09:14:28 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=6270426e

Fix dependency on eselect

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index de1d317..dbfaca3 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -31,7 +31,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4-r100"
+DEPEND=">=app-admin/eselect-1.4.1-r100"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-05-26  7:07 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2014-05-26  7:07 UTC (permalink / raw
  To: gentoo-commits

commit:     8a7803dee75972a8380ecff7f713cf72648451fc
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon May 26 06:54:18 2014 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon May 26 06:54:18 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=8a7803de

Fix dependency on eselect

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index dbfaca3..2e54dac 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -31,7 +31,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4.1-r100"
+DEPEND=">=app-admin/eselect-1.4.2-r100"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-09-15 12:01 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2014-09-15 12:01 UTC (permalink / raw
  To: gentoo-commits

commit:     d25c315fa1010650a6e8d46d27fd98a23fe2ad6e
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 15 12:01:18 2014 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Sep 15 12:01:18 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=d25c315f

Update min version of eselect

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 2e54dac..a8b90c5 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -31,7 +31,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4.2-r100"
+DEPEND=">=app-admin/eselect-1.4.3-r100"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-12-02 15:36 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2014-12-02 15:36 UTC (permalink / raw
  To: gentoo-commits

commit:     151b94f8d7582da13ae72606f9b54421e7037e57
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  2 12:20:16 2014 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Dec  2 12:20:16 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=151b94f8

Add single arch rpm support

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 11400c6..a0d3799 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -89,6 +89,16 @@
 #
 # e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
 
+# @ECLASS-VARIABLE: INTEL_AMD64_RPMS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# AMD64 single arch rpms. Same syntax as INTEL_BIN_RPMS
+
+# @ECLASS-VARIABLE: INTEL_X86_RPMS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# X86 single arch rpms. Same syntax as INTEL_BIN_RPMS
+
 # @ECLASS-VARIABLE: INTEL_DAT_RPMS
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -362,6 +372,34 @@ intel-sdp_pkg_setup() {
 			fi
 		done
 	done
+	if use amd64; then
+		if [[ $(declare -p INTEL_AMD64_RPMS) = "declare -a "* ]] ; then
+			_INTEL_AMD64_RPMS=( ${INTEL_AMD64_RPMS[@]} )
+		else
+			read -r -d '' -a _INTEL_AMD64_RPMS <<<"${INTEL_AMD64_RPMS}"
+		fi
+		for p in "${_INTEL_AMD64_RPMS[@]}"; do
+			if [ ${p} == $(basename ${p}) ]; then
+				INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.x86_64.rpm )
+			else
+				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.x86_64.rpm )
+			fi
+
+		done
+	elif use x86; then
+		if [[ $(declare -p INTEL_X86_RPMS) = "declare -a "* ]] ; then
+			_INTEL_X86_RPMS=( ${INTEL_X86_RPMS[@]} )
+		else
+			read -r -d '' -a _INTEL_X86_RPMS <<<"${INTEL_X86_RPMS}"
+		fi
+		for p in "${_INTEL_X86_RPMS[@]}"; do
+			if [ ${p} == $(basename ${p}) ]; then
+				INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.ia32.rpm )
+			else
+				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.ia32.rpm )
+			fi
+		done
+	fi
 	if [[ $(declare -p INTEL_DAT_RPMS) = "declare -a "* ]] ; then
 		_INTEL_DAT_RPMS=( ${INTEL_DAT_RPMS[@]} )
 	else


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-12-02 15:36 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2014-12-02 15:36 UTC (permalink / raw
  To: gentoo-commits

commit:     321d45b30c96de41c4a659ad0bc3dcf3fb985e07
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  2 12:20:06 2014 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Dec  2 12:20:06 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=321d45b3

Import from tree

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass | 514 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 514 insertions(+)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
new file mode 100644
index 0000000..11400c6
--- /dev/null
+++ b/eclass/intel-sdp.eclass
@@ -0,0 +1,514 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/intel-sdp.eclass,v 1.18 2014/09/15 17:54:11 jlec Exp $
+
+# @ECLASS: intel-sdp.eclass
+# @MAINTAINER:
+# Justin Lecher <jlec@gentoo.org>
+# Sci Team <sci@gentoo.org>
+# @BLURB: Handling of Intel's Software Development Products package management
+
+# @ECLASS-VARIABLE: INTEL_DID
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package download ID from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. 2504
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_DPN
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package name to download from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. parallel_studio_xe
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_DPV
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package download version from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. 2011_sp1_update2
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_TARX
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package extention.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. tar.gz
+#
+# Must be defined before inheriting the eclass
+: ${INTEL_TARX:=tgz}
+
+# @ECLASS-VARIABLE: INTEL_SUBDIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package sub-directory where it will end-up in /opt/intel
+# To find out its value, you have to do a raw install from the Intel tar ball
+
+# @ECLASS-VARIABLE: INTEL_SKIP_LICENSE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Possibility to skip the mandatory check for licenses. Only set this if there
+# is really no fix.
+
+# @ECLASS-VARIABLE: INTEL_RPMS_DIR
+# @DESCRIPTION:
+# Main subdirectory which contains the rpms to extract.
+: ${INTEL_RPMS_DIR:=rpm}
+
+# @ECLASS-VARIABLE: INTEL_X86
+# @DESCRIPTION:
+# 32bit arch in rpm names
+#
+# e.g. i484
+: ${INTEL_X86:=i486}
+
+# @ECLASS-VARIABLE: INTEL_BIN_RPMS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Functional name of rpm without any version/arch tag
+#
+# e.g. compilerprof
+#
+# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
+# specify the full path
+#
+# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
+
+# @ECLASS-VARIABLE: INTEL_DAT_RPMS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Functional name of rpm of common data which are arch free
+# without any version tag
+#
+# e.g. openmp
+#
+# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
+# specify the full path
+#
+# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
+
+# @ECLASS-VARIABLE: INTEL_SINGLE_ARCH
+# @DESCRIPTION:
+# Unset, if only the multilib package will be provided by intel
+: ${INTEL_SINGLE_ARCH:=true}
+
+# @ECLASS-VARIABLE: INTEL_SDP_DB
+# @DESCRIPTION:
+# Full path to intel registry db
+INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
+
+inherit check-reqs multilib versionator
+
+_INTEL_PV1=$(get_version_component_range 1)
+_INTEL_PV2=$(get_version_component_range 2)
+_INTEL_PV3=$(get_version_component_range 3)
+_INTEL_PV4=$(get_version_component_range 4)
+_INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
+
+if [ ${INTEL_SINGLE_ARCH} == true ]; then
+	SRC_URI="
+		amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX} ) )
+		amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} ) )
+		x86?	( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )"
+else
+	SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}"
+fi
+
+LICENSE="Intel-SDP"
+# Future work, #394411
+#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
+SLOT="0"
+IUSE="examples multilib"
+
+RESTRICT="mirror"
+
+RDEPEND=""
+DEPEND="app-arch/rpm2targz"
+
+_INTEL_SDP_YEAR=${INTEL_DPV%_update*}
+_INTEL_SDP_YEAR=${INTEL_DPV%_sp*}
+
+# @ECLASS-VARIABLE: INTEL_SDP_DIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Full rootless path to installation dir
+INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}.${_INTEL_PV3}.${_INTEL_PV4}"
+
+# @ECLASS-VARIABLE: INTEL_SDP_EDIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Full rooted path to installation dir
+INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="${INTEL_SDP_DIR}/*"
+
+# @ECLASS-VARIABLE: INTEL_ARCH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Intels internal names of the arches; will be set at runtime accordingly
+#
+# e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
+
+# @FUNCTION: _isdp_link_eclipse_plugins
+# @INTERNAL
+# @DESCRIPTION:
+# Creating necessary links to use intel compiler with eclipse
+_isdp_link_eclipse_plugins() {
+	local c f
+	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
+		for c in cdt*; do
+			local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
+			if has_version "dev-util/eclipse-sdk:${ev}"; then
+				einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
+				for f in cdt${cv}/eclipse/features/*; do
+					dodir /usr/$(get_libdir)/eclipse-${ev}/features
+					dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
+						/usr/$(get_libdir)/eclipse-${ev}/features/ || die
+				done
+				for f in cdt${cv}/eclipse/plugins/*; do
+					dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
+					dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
+						/usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
+				done
+			fi
+		done
+	popd > /dev/null
+}
+
+# @FUNCTION: _isdp_big-warning
+# @USAGE: [pre-check | test-failed]
+# @INTERNAL
+# @DESCRIPTION:
+# warn user that we really require a license
+_isdp_big-warning() {
+	case ${1} in
+		pre-check )
+			echo ""
+			ewarn "License file not found!"
+			;;
+
+		test-failed )
+			echo
+			ewarn "Function test failed. Most probably due to an invalid license."
+			ewarn "This means you already tried to bypass the license check once."
+			;;
+	esac
+
+	echo ""
+	ewarn "Make sure you have recieved the an Intel license."
+	ewarn "To receive a non-commercial license, you need to register at:"
+	ewarn "http://software.intel.com/en-us/articles/non-commercial-software-development/"
+	ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
+
+	case ${1} in
+		pre-check )
+			ewarn "before proceeding with installation of ${P}"
+			echo ""
+			;;
+		* )
+			echo ""
+			;;
+			esac
+}
+
+# @FUNCTION: _isdp_version_test
+# @INTERNAL
+# @DESCRIPTION:
+# Testing for valid license by asking for version information of the compiler
+_isdp_version_test() {
+	local comp comp_full arch warn
+	case ${PN} in
+		ifc )
+			debug-print "Testing ifort"
+			comp=ifort
+			;;
+		icc )
+			debug-print "Testing icc"
+			comp=icc
+			;;
+		*)
+			die "${PN} is not supported for testing"
+			;;
+	esac
+
+	for arch in ${INTEL_ARCH}; do
+		case ${EBUILD_PHASE} in
+			install )
+				comp_full="${ED}/${INTEL_SDP_DIR}/bin/${arch}/${comp}"
+				;;
+			postinst )
+				comp_full="${INTEL_SDP_EDIR}/bin/${arch}/${comp}"
+				;;
+			* )
+				ewarn "Compile test not supported in ${EBUILD_PHASE}"
+				continue
+				;;
+		esac
+
+		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${arch}/\" \"${comp_full}\" -V"
+
+		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${arch}/" "${comp_full}" -V &>/dev/null
+		[[ $? -ne 0 ]] && warn=yes
+	done
+	[[ "${warn}" == "yes" ]] && _isdp_big-warning test-failed
+}
+
+# @FUNCTION: _isdp_run-test
+# @INTERNAL
+# Test if installed compiler is working
+_isdp_run-test() {
+	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
+		case ${PN} in
+			ifc | icc )
+				_isdp_version_test ;;
+			* )
+				debug-print "No test available for ${PN}"
+				;;
+		esac
+	fi
+}
+
+# @FUNCTION: intel-sdp_pkg_pretend
+# @DESCRIPTION:
+# @CODE
+# * Check that the user has a (valid) license file before going on.
+# * Check for space requirements being fullfilled
+# @CODE
+intel-sdp_pkg_pretend() {
+	local warn=1 dir dirs ret arch a p
+
+	: ${CHECKREQS_DISK_BUILD:=256M}
+	check-reqs_pkg_pretend
+
+	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
+		if echo ${INTEL_LICENSE_FILE} | grep -q @; then
+			einfo "Looks like you are using following license server:"
+			einfo "   ${INTEL_LICENSE_FILE}"
+			return 0
+		fi
+
+		dirs=(
+			"${INTEL_SDP_EDIR}/licenses"
+			"${INTEL_SDP_EDIR}/Licenses"
+			"${EPREFIX}/opt/intel/licenses"
+			)
+		for dir in "${dirs[@]}" ; do
+			ebegin "Checking for a license in: ${dir}"
+			#maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]]
+			[[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$?
+			eend ${ret}
+			if [[ ${ret} == "0" ]]; then
+				warn=${ret}
+				break
+			fi
+		done
+		if [[ ${warn} == "1" ]]; then
+			_isdp_big-warning pre-check
+			die "Could not find license file"
+		fi
+	else
+		eqawarn "The ebuild doesn't check for presents of a proper intel license!"
+		eqawarn "This shouldn't be done unless there is a serious reason."
+	fi
+}
+
+# @FUNCTION: intel-sdp_pkg_setup
+# @DESCRIPTION:
+# Setting up and sorting some internal variables
+intel-sdp_pkg_setup() {
+	local arch a p
+
+	if use x86; then
+		arch=${INTEL_X86}
+		INTEL_ARCH="ia32"
+	elif use amd64; then
+		arch=x86_64
+		INTEL_ARCH="intel64"
+		if has_multilib_profile; then
+			arch="x86_64 ${INTEL_X86}"
+			INTEL_ARCH="intel64 ia32"
+		fi
+	fi
+	INTEL_RPMS=()
+	INTEL_RPMS_FULL=()
+	if [[ $(declare -p INTEL_BIN_RPMS) = "declare -a "* ]] ; then
+		_INTEL_BIN_RPMS=( ${INTEL_BIN_RPMS[@]} )
+	else
+		read -r -d '' -a _INTEL_BIN_RPMS <<<"${INTEL_BIN_RPMS}"
+	fi
+	for p in "${_INTEL_BIN_RPMS[@]}"; do
+		for a in ${arch}; do
+			if [ ${p} == $(basename ${p}) ]; then
+				INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
+			else
+				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
+			fi
+		done
+	done
+	if [[ $(declare -p INTEL_DAT_RPMS) = "declare -a "* ]] ; then
+		_INTEL_DAT_RPMS=( ${INTEL_DAT_RPMS[@]} )
+	else
+		read -r -d '' -a _INTEL_DAT_RPMS <<<"${INTEL_DAT_RPMS}"
+	fi
+	for p in "${_INTEL_DAT_RPMS[@]}"; do
+		if [ ${p} == $(basename ${p}) ]; then
+			INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )
+		else
+			INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )
+		fi
+	done
+}
+
+# @FUNCTION: intel-sdp_src_unpack
+# @DESCRIPTION:
+# Unpacking necessary rpms from tarball, extract them and rearrange the output.
+intel-sdp_src_unpack() {
+	local l r subdir rb t list=() debug_list
+
+	for t in ${A}; do
+		for r in "${INTEL_RPMS[@]}"; do
+			rpmdir=${t%%.*}/${INTEL_RPMS_DIR}
+			list+=( ${rpmdir}/${r} )
+		done
+
+		for r in "${INTEL_RPMS_FULL[@]}"; do
+			list+=( ${t%%.*}/${r} )
+		done
+
+		debug_list="$(IFS=$'\n'; echo ${list[@]} )"
+
+		debug-print "Adding to decompression list:"
+		debug-print ${debug_list}
+
+		tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log
+
+		for r in ${list[@]}; do
+			rb=$(basename ${r})
+			l=.${rb}_$(date +'%d%m%y_%H%M%S').log
+			einfo "Unpacking ${rb}"
+			rpm2tar -O ${r} | tar xvf - | sed -e \
+				"s:^\.:${EROOT#/}:g" > ${l}; assert "unpacking ${r} failed"
+			mv ${l} opt/intel/ || die "failed moving extract log file"
+		done
+	done
+
+	mv opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
+}
+
+# @FUNCTION: intel-sdp_src_install
+# @DESCRIPTION:
+# Install everything
+intel-sdp_src_install() {
+	if [[ -d "${INTEL_SDP_DIR}"/Documentation ]]; then
+		dodoc -r "${INTEL_SDP_DIR}"/Documentation/*
+
+		ebegin "Cleaning out documentation"
+		find "${INTEL_SDP_DIR}"/Documentation -delete || die
+		eend
+	fi
+
+	if [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
+		if use examples ; then
+			insinto /usr/share/${P}/examples/
+			doins -r "${INTEL_SDP_DIR}"/Samples/*
+		fi
+		ebegin "Cleaning out examples"
+		find "${INTEL_SDP_DIR}"/Samples -delete || die
+		eend
+	fi
+
+	if [[ -d "${INTEL_SDP_DIR}"/eclipse_support ]]; then
+		if has eclipse ${IUSE} && use eclipse; then
+			_isdp_link_eclipse_plugins
+		else
+			ebegin "Cleaning out eclipse plugin"
+			find "${INTEL_SDP_DIR}"/eclipse_support -delete || die
+			eend
+		fi
+	fi
+
+	if [[ -d "${INTEL_SDP_DIR}"/man ]]; then
+		nonfatal doman "${INTEL_SDP_DIR}"/man/en_US/man1/*
+		nonfatal doman "${INTEL_SDP_DIR}"/man/man1/*
+		if has linguas_ja ${IUSE} && use linguas_ja; then
+			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*
+		fi
+
+		find "${INTEL_SDP_DIR}"/man -delete || die
+	fi
+
+	ebegin "Tagging ${PN}"
+	find opt -name \*sh -type f -exec sed -i \
+		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \
+		'{}' + || die
+	eend
+
+	[[ -d "${ED}" ]] || dodir /
+	mv opt "${ED}"/ || die "moving files failed"
+
+	dodir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
+	keepdir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
+}
+
+# @FUNCTION: intel-sdp_pkg_postinst
+# @DESCRIPTION:
+# Add things to intel database
+intel-sdp_pkg_postinst() {
+	# add product registry to intel "database"
+	local l r
+	for r in ${INTEL_RPMS}; do
+		l="$(ls -1 ${EROOT%/}/opt/intel/.${r}_*.log | head -n 1)"
+		echo >> ${INTEL_SDP_DB} \
+			"<:${r%-${_INTEL_PV4}*}-${_INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>"
+	done
+	_isdp_run-test
+
+	if [[ ${PN} = icc ]] && has_version ">=dev-util/ccache-3.1.9-r2" ; then
+		#add ccache links as icc might get installed after ccache
+		"${EROOT}"/usr/bin/ccache-config --install-links
+	fi
+}
+
+# @FUNCTION: intel-sdp_pkg_postrm
+# @DESCRIPTION:
+# Sanitize intel database
+intel-sdp_pkg_postrm() {
+	# remove from intel "database"
+	if [[ -e ${INTEL_SDP_DB} ]]; then
+		local r
+		for r in ${INTEL_RPMS}; do
+			sed -i \
+				-e "/${r}/d" \
+				${INTEL_SDP_DB}
+		done
+	fi
+
+	if [[ ${PN} = icc ]] && has_version ">=dev-util/ccache-3.1.9-r2" && [[ -z ${REPLACED_BY_VERSION} ]]; then
+		# --remove-links would remove all links, --install-links updates them
+		"${EROOT}"/usr/bin/ccache-config --install-links
+	fi
+}
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend
+case "${EAPI:-0}" in
+	0|1|2|3)die "EAPI=${EAPI} is not supported anymore" ;;
+	4|5) ;;
+	*) die "EAPI=${EAPI} is not supported" ;;
+esac


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2014-12-02 15:36 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2014-12-02 15:36 UTC (permalink / raw
  To: gentoo-commits

commit:     a69b95ea4c3dc428909aba151a0db42ac535b7a3
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  2 15:23:46 2014 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Dec  2 15:23:46 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a69b95ea

Handle versioning better

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/intel-sdp.eclass | 59 +++++++++++++++++++++++++++----------------------
 1 file changed, 33 insertions(+), 26 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index a0d3799..6b2bfc6 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -78,7 +78,6 @@
 : ${INTEL_X86:=i486}
 
 # @ECLASS-VARIABLE: INTEL_BIN_RPMS
-# @DEFAULT_UNSET
 # @DESCRIPTION:
 # Functional name of rpm without any version/arch tag
 #
@@ -88,19 +87,19 @@
 # specify the full path
 #
 # e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
+: ${INTEL_BIN_RPMS:=""}
 
 # @ECLASS-VARIABLE: INTEL_AMD64_RPMS
-# @DEFAULT_UNSET
 # @DESCRIPTION:
 # AMD64 single arch rpms. Same syntax as INTEL_BIN_RPMS
+: ${INTEL_AMD64_RPMS:=""}
 
 # @ECLASS-VARIABLE: INTEL_X86_RPMS
-# @DEFAULT_UNSET
 # @DESCRIPTION:
 # X86 single arch rpms. Same syntax as INTEL_BIN_RPMS
+: ${INTEL_X86_RPMS:=""}
 
 # @ECLASS-VARIABLE: INTEL_DAT_RPMS
-# @DEFAULT_UNSET
 # @DESCRIPTION:
 # Functional name of rpm of common data which are arch free
 # without any version tag
@@ -111,6 +110,7 @@
 # specify the full path
 #
 # e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
+: ${INTEL_DAT_RPMS:=""}
 
 # @ECLASS-VARIABLE: INTEL_SINGLE_ARCH
 # @DESCRIPTION:
@@ -128,6 +128,12 @@ _INTEL_PV1=$(get_version_component_range 1)
 _INTEL_PV2=$(get_version_component_range 2)
 _INTEL_PV3=$(get_version_component_range 3)
 _INTEL_PV4=$(get_version_component_range 4)
+_INTEL_PV=""
+[[ -n ${_INTEL_PV4} ]] && _INTEL_PV+="${_INTEL_PV4}-"
+[[ -n ${_INTEL_PV1} ]] && _INTEL_PV+="${_INTEL_PV1}"
+[[ -n ${_INTEL_PV2} ]] && _INTEL_PV+=".${_INTEL_PV2}"
+[[ -n ${_INTEL_PV3} ]] && _INTEL_PV+="-${_INTEL_PV3}"
+
 _INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
 
 if [ ${INTEL_SINGLE_ARCH} == true ]; then
@@ -150,14 +156,16 @@ RESTRICT="mirror"
 RDEPEND=""
 DEPEND="app-arch/rpm2targz"
 
-_INTEL_SDP_YEAR=${INTEL_DPV%_update*}
-_INTEL_SDP_YEAR=${INTEL_DPV%_sp*}
+_INTEL_SDP_YEAR=${INTEL_DPV}
+_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_sp*}
+_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_update*}
 
 # @ECLASS-VARIABLE: INTEL_SDP_DIR
-# @DEFAULT_UNSET
 # @DESCRIPTION:
 # Full rootless path to installation dir
-INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}.${_INTEL_PV3}.${_INTEL_PV4}"
+INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}"
+[[ -n ${_INTEL_PV3} ]] && INTEL_SDP_DIR+=".${_INTEL_PV3}"
+[[ -n ${_INTEL_PV4} ]] && INTEL_SDP_DIR+=".${_INTEL_PV4}"
 
 # @ECLASS-VARIABLE: INTEL_SDP_EDIR
 # @DEFAULT_UNSET
@@ -366,9 +374,9 @@ intel-sdp_pkg_setup() {
 	for p in "${_INTEL_BIN_RPMS[@]}"; do
 		for a in ${arch}; do
 			if [ ${p} == $(basename ${p}) ]; then
-				INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
+				INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${a}.rpm )
 			else
-				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.${a}.rpm )
+				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${a}.rpm )
 			fi
 		done
 	done
@@ -380,26 +388,25 @@ intel-sdp_pkg_setup() {
 		fi
 		for p in "${_INTEL_AMD64_RPMS[@]}"; do
 			if [ ${p} == $(basename ${p}) ]; then
-				INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.x86_64.rpm )
+				INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.x86_64.rpm )
 			else
-				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.x86_64.rpm )
+				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.x86_64.rpm )
 			fi
 
 		done
-	elif use x86; then
-		if [[ $(declare -p INTEL_X86_RPMS) = "declare -a "* ]] ; then
-			_INTEL_X86_RPMS=( ${INTEL_X86_RPMS[@]} )
+	fi
+	if [[ $(declare -p INTEL_X86_RPMS) = "declare -a "* ]] ; then
+		_INTEL_X86_RPMS=( ${INTEL_X86_RPMS[@]} )
+	else
+		read -r -d '' -a _INTEL_X86_RPMS <<<"${INTEL_X86_RPMS}"
+	fi
+	for p in "${_INTEL_X86_RPMS[@]}"; do
+		if [ ${p} == $(basename ${p}) ]; then
+			INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${INTEL_X86}.rpm )
 		else
-			read -r -d '' -a _INTEL_X86_RPMS <<<"${INTEL_X86_RPMS}"
+			INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${INTEL_X86}.rpm )
 		fi
-		for p in "${_INTEL_X86_RPMS[@]}"; do
-			if [ ${p} == $(basename ${p}) ]; then
-				INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.ia32.rpm )
-			else
-				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.ia32.rpm )
-			fi
-		done
-	fi
+	done
 	if [[ $(declare -p INTEL_DAT_RPMS) = "declare -a "* ]] ; then
 		_INTEL_DAT_RPMS=( ${INTEL_DAT_RPMS[@]} )
 	else
@@ -407,9 +414,9 @@ intel-sdp_pkg_setup() {
 	fi
 	for p in "${_INTEL_DAT_RPMS[@]}"; do
 		if [ ${p} == $(basename ${p}) ]; then
-			INTEL_RPMS+=( intel-${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )
+			INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.noarch.rpm )
 		else
-			INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV4}-${_INTEL_PV1}.${_INTEL_PV2}-${_INTEL_PV3}.noarch.rpm )
+			INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.noarch.rpm )
 		fi
 	done
 }


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-01-10 13:35 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-01-10 13:35 UTC (permalink / raw
  To: gentoo-commits

commit:     37e01e338079815fb54428f8739c54411dd243ac
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 10 13:13:26 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Jan 10 13:13:26 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=37e01e33

Update dev-db/postgresql-base to dev-db/postgresql

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/emboss.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/emboss.eclass b/eclass/emboss.eclass
index f8aab54..aff93df 100644
--- a/eclass/emboss.eclass
+++ b/eclass/emboss.eclass
@@ -68,7 +68,7 @@ DEPEND="
 	mysql? ( dev-db/mysql )
 	pdf? ( media-libs/libharu )
 	png? ( media-libs/gd[png] )
-	postgres? ( dev-db/postgresql-base )
+	postgres? ( dev-db/postgresql )
 	X? ( x11-libs/libXt )"
 RDEPEND="${DEPEND}"
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-01-26  7:19 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-01-26  7:19 UTC (permalink / raw
  To: gentoo-commits

commit:     e82e924fef26d424b125d612f2b8100df563fae1
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 26 07:13:35 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Jan 26 07:13:35 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e82e924f

bumped eselect dependency

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index a8b90c5..53d1881 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -31,7 +31,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4.3-r100"
+DEPEND=">=app-admin/eselect-1.4.4-r100"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-02-05  8:01 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-02-05  8:01 UTC (permalink / raw
  To: gentoo-commits

commit:     ceea399c33cda30f52c4d9edf1535bc0de8fac5b
Author:     Ted Tanberry <ted.tanberry <AT> gmail <DOT> com>
AuthorDate: Thu Feb  5 07:54:59 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Feb  5 07:54:59 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=ceea399c

Fixed emboss-r1.eclass to depend on virtual/mysql and not dev-db/mysql.

---
 eclass/emboss-r1.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/emboss-r1.eclass b/eclass/emboss-r1.eclass
index b185802..e10ec0c 100644
--- a/eclass/emboss-r1.eclass
+++ b/eclass/emboss-r1.eclass
@@ -62,7 +62,7 @@ DEPEND="
 	dev-libs/libpcre:3
 	sci-libs/plplot
 	sys-libs/zlib
-	mysql? ( dev-db/mysql )
+	mysql? ( virtual/mysql )
 	pdf? ( media-libs/libharu )
 	png? ( media-libs/gd[png] )
 	postgres? ( dev-db/postgresql )


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-02-18  9:06 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-02-18  9:06 UTC (permalink / raw
  To: gentoo-commits

commit:     287094685faf979baca9d821c5aa5a5c3903d063
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 18 09:04:51 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Feb 18 09:04:51 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=28709468

Use SLOT operator for dev-db/postgresql

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/emboss-r1.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/emboss-r1.eclass b/eclass/emboss-r1.eclass
index e10ec0c..90b9a8c 100644
--- a/eclass/emboss-r1.eclass
+++ b/eclass/emboss-r1.eclass
@@ -65,7 +65,7 @@ DEPEND="
 	mysql? ( virtual/mysql )
 	pdf? ( media-libs/libharu )
 	png? ( media-libs/gd[png] )
-	postgres? ( dev-db/postgresql )
+	postgres? ( dev-db/postgresql:= )
 	X? ( x11-libs/libXt )"
 RDEPEND="${DEPEND}"
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-02-21 10:01 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-02-21 10:01 UTC (permalink / raw
  To: gentoo-commits

commit:     02a16b01b401dcfe7dea754b93b92b47d6b28c0f
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 21 10:05:23 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Feb 21 10:05:23 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=02a16b01

Fix example text and min embos version

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

---
 eclass/emboss-r1.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/emboss-r1.eclass b/eclass/emboss-r1.eclass
index 90b9a8c..e82b413 100644
--- a/eclass/emboss-r1.eclass
+++ b/eclass/emboss-r1.eclass
@@ -23,7 +23,7 @@
 #
 # EBO_DESCRIPTION="applications from the CBS group"
 #
-# inherit emboss
+# inherit emboss-r1
 
 # @ECLASS-VARIABLE: EBO_DESCRIPTION
 # @DESCRIPTION:
@@ -79,7 +79,7 @@ if [[ ${PN} == embassy-* ]]; then
 	: ${EBO_DESCRIPTION:=${EN}}
 	DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
 	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EN}-${PVR}.tar.gz"
-	DEPEND+=" >=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
+	DEPEND+=" >=sci-biology/emboss-6.6.0[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
 
 	S="${WORKDIR}"/${EF}
 fi


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-03-28 16:41 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-03-28 16:41 UTC (permalink / raw
  To: gentoo-commits

commit:     8ca9c2ff08ed5a61ba427a444be7d51b01aade82
Author:     Ted Tanberry <ted.tanberry <AT> gmail <DOT> com>
AuthorDate: Sat Mar 28 16:37:04 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Mar 28 16:37:04 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=8ca9c2ff

Removed reference to EXTRA_ECONF in emboss-r1.eclass

 eclass/emboss-r1.eclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/eclass/emboss-r1.eclass b/eclass/emboss-r1.eclass
index 00d00f7..fc92ce9 100644
--- a/eclass/emboss-r1.eclass
+++ b/eclass/emboss-r1.eclass
@@ -38,8 +38,7 @@
 # @ECLASS-VARIABLE: EBO_EXTRA_ECONF
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Extra config options passed to econf, similar to EXTRA_ECONF
-# but can be set by the ebuild.
+# Extra config options passed to econf.
 
 case ${EAPI:-0} in
 	5) ;;


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-03-28 18:29 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-03-28 18:29 UTC (permalink / raw
  To: gentoo-commits

commit:     4f3f4bc43e141b4afb302e101a5a3c675fd139d1
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 28 18:27:55 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Mar 28 18:27:55 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=4f3f4bc4

Moved to tree

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/emboss-r1.eclass | 133 ------------------------------------------------
 1 file changed, 133 deletions(-)

diff --git a/eclass/emboss-r1.eclass b/eclass/emboss-r1.eclass
deleted file mode 100644
index fc92ce9..0000000
--- a/eclass/emboss-r1.eclass
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-# @ECLASS: emboss-r1.eclass
-# @MAINTAINER:
-# sci-biology@gentoo.org
-# jlec@gentoo.org
-# ted.tanberry@gmail.com
-# @AUTHOR:
-# Original author: Author Olivier Fisette <ofisette@gmail.com>
-# Next gen author: Justin Lecher <jlec@gentoo.org>
-# Next gen author: Ted Tanberry <ted.tanberry@gmail.com>
-# @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
-# @DESCRIPTION:
-# The inheriting ebuild must set at least EAPI=5 and provide EBO_DESCRIPTION before the inherit line.
-# KEYWORDS should be set. Additionally "(R|P)DEPEND"encies and other standard
-# ebuild variables can be extended (FOO+=" bar").
-#
-# Example:
-#
-# EAPI="5"
-#
-# EBO_DESCRIPTION="applications from the CBS group"
-#
-# inherit emboss-r1
-
-# @ECLASS-VARIABLE: EBO_DESCRIPTION
-# @DESCRIPTION:
-# Should be set. Completes the generic description of the embassy module as follows:
-#
-# EMBOSS integrated version of ${EBO_DESCRIPTION},
-# e.g.
-# "EMBOSS integrated version of applications from the CBS group"
-#
-# Defaults to the upstream name of the module.
-
-# @ECLASS-VARIABLE: EBO_EXTRA_ECONF
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Extra config options passed to econf.
-
-case ${EAPI:-0} in
-	5) ;;
-	*) die "this eclass doesn't support < EAPI 5" ;;
-esac
-
-inherit autotools-utils eutils flag-o-matic
-
-HOMEPAGE="http://emboss.sourceforge.net/"
-LICENSE="LGPL-2 GPL-2"
-
-SLOT="0"
-IUSE="mysql pdf png postgres static-libs X"
-
-DEPEND="
-	dev-libs/expat
-	dev-libs/libpcre:3
-	sci-libs/plplot
-	sys-libs/zlib
-	mysql? ( virtual/mysql )
-	pdf? ( media-libs/libharu )
-	png? ( media-libs/gd[png] )
-	postgres? ( dev-db/postgresql:= )
-	X? ( x11-libs/libXt )"
-RDEPEND="${DEPEND}"
-
-if [[ ${PN} == embassy-* ]]; then
-	EMBASSY_PACKAGE=yes
-	# The EMBASSY package name, retrieved from the inheriting ebuild's name
-	EN=${PN:8}
-	# The full name and version of the EMBASSY package (excluding the Gentoo
-	# revision number)
-	EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
-	: ${EBO_DESCRIPTION:=${EN}}
-	DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
-	SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EN}-${PVR}.tar.gz"
-	DEPEND+=" >=sci-biology/emboss-6.6.0[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
-
-	S="${WORKDIR}"/${EF}
-fi
-
-# @FUNCTION: emboss_src_prepare
-# @DESCRIPTION:
-# Does the following things
-#
-#  1. Renames configure.in to configure.ac, if possible
-#  2. Applies ${PATCHES[@]} and runs autotools via autotools-utils.eclass
-#
-
-emboss-r1_src_prepare() {
-	if [[ -e configure.in ]]; then
-		mv configure.{in,ac} || die
-	fi
-
-	autotools-utils_src_prepare
-}
-
-# @FUNCTION: emboss_src_configure
-# @DESCRIPTION:
-# runs econf with following options.
-#
-#  $(use_with X x)
-#  $(use_with png pngdriver)
-#  $(use_with pdf hpdf)
-#  $(use_with mysql mysql)
-#  $(use_with postgres postgresql)
-#  $(use_enable static-libs static)
-#  --enable-large
-#  --without-java
-#  --enable-systemlibs
-#  ${EBO_EXTRA_ECONF}
-
-emboss-r1_src_configure() {
-	local myeconfargs=(
-		$(use_with X x)
-		$(use_with png pngdriver "${EPREFIX}/usr")
-		$(use_with pdf hpdf "${EPREFIX}/usr")
-		$(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
-		$(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
-		--enable-large
-		--without-java
-		--enable-systemlibs
-		${EBO_EXTRA_ECONF}
-	)
-
-	[[ ${EMBASSY_PACKAGE} == yes ]] && \
-		append-cppflags "-I${EPREFIX}/usr/include/emboss"
-
-	autotools-utils_src_configure
-}
-
-EXPORT_FUNCTIONS src_prepare src_configure


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-05-24  8:14 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-05-24  8:14 UTC (permalink / raw
  To: gentoo-commits

commit:     21ed8ad45d2230598fb31652ba080e4cbb9daa28
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun May 24 07:56:02 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun May 24 07:56:02 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=21ed8ad4

Fix style

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 46 +++++++++++++++++++++++++++++---------------
 1 file changed, 30 insertions(+), 16 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 53d1881..5a7eb6c 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 2010-2014 Gentoo Foundation
+# Copyright 2010-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
@@ -37,8 +37,6 @@ RDEPEND="${DEPEND}
 	!app-admin/eselect-cblas
 	!app-admin/eselect-lapack"
 
-EXPORT_FUNCTIONS pkg_postinst pkg_prerm
-
 # @ECLASS-VARIABLE: ALTERNATIVES_DIR
 # @INTERNAL
 # @DESCRIPTION:
@@ -46,18 +44,20 @@ EXPORT_FUNCTIONS pkg_postinst pkg_prerm
 ALTERNATIVES_DIR="/etc/env.d/alternatives"
 
 # @FUNCTION: alternatives_for
-# @USAGE: alternative provider importance source target [source target [...]]
+# @USAGE: <alternative> <provider> <importance> <source> <target> [<source> <target> [...]]
 # @DESCRIPTION:
 # Set up alternative provider.
 #
 # EXAMPLE:
 # @CODE
-# alternatives_for cblas atlas 0 \
-#     /usr/$(get_libdir)/pkgconfig/cblas.pc atlas-cblas.pc \
-#     /usr/include/cblas.h atlas/cblas.h
+# alternatives_for sh bash 0 \
+#     /usr/bin/sh bash
 # @CODE
 alternatives_for() {
-	(( $# >= 5 )) && (( ($#-3)%2 == 0)) || die "${FUNCNAME} requires exactly 3+N*2 arguments where N>=1"
+	debug-print-function ${FUNCNAME} "${@}"
+
+	(( $# >= 5 )) && (( ($#-3)%2 == 0)) || \
+		die "${FUNCNAME} requires exactly 3+N*2 arguments where N>=1"
 	local alternative=${1} provider=${2} importance=${3} index src target ret=0
 	shift 3
 
@@ -68,7 +68,8 @@ alternatives_for() {
 	fi
 
 	# Create alternative provider subdirectories under ALTERNATIVES_DIR if needed
-	[[ -d "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}" ]] || dodir "${ALTERNATIVES_DIR}/${alternative}/${provider}"
+	[[ -d "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}" ]] || \
+		dodir "${ALTERNATIVES_DIR}/${alternative}/${provider}"
 
 	# Keep track of provided alternatives for use in pkg_{postinst,prerm}.
 	# Keep a mapping between importance and provided alternatives
@@ -78,10 +79,11 @@ alternatives_for() {
 		index=${#ALTERNATIVES_PROVIDED[@]}
 		ALTERNATIVES_PROVIDED+=( "${alternative}:${provider}" )
 		ALTERNATIVES_IMPORTANCE[index]=${importance}
-		[[ -n ${importance} ]] && echo "${importance}" > "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}/_importance"
+		[[ -n ${importance} ]] && \
+			echo "${importance}" > "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}/_importance"
 	else
 		# Set importance for existing provider
-		for((index=0;index<${#ALTERNATIVES_PROVIDED[@]};index++)); do
+		for ((index=0;index<${#ALTERNATIVES_PROVIDED[@]};index++)); do
 			if [[ ${alternative}:${provider} == ${ALTERNATIVES_PROVIDED[index]} ]]; then
 				if [[ -n ${ALTERNATIVES_IMPORTANCE[index]} ]]; then
 					if [[ -n ${importance} && ${ALTERNATIVES_IMPORTANCE[index]} != ${importance} ]]; then
@@ -90,7 +92,8 @@ alternatives_for() {
 					fi
 				else
 					ALTERNATIVES_IMPORTANCE[index]=${importance}
-					[[ -n ${importance} ]] && echo "${importance}" > "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}/_importance"
+					[[ -n ${importance} ]] && \
+						echo "${importance}" > "${ED}${ALTERNATIVES_DIR}/${alternative}/${provider}/_importance"
 				fi
 			fi
 		done
@@ -137,11 +140,14 @@ alternatives_for() {
 }
 
 # @FUNCTION: cleanup_old_alternatives_module
-# @USAGE: alternative
+# @USAGE: <alternative>
 # @DESCRIPTION:
 # Remove old alternatives module.
 cleanup_old_alternatives_module() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	local alt=${1} old_module="${EROOT%/}/usr/share/eselect/modules/${alt}.eselect"
+
 	if [[ -f "${old_module}" && $(grep 'ALTERNATIVE=' "${old_module}" | cut -d '=' -f 2) == "${alt}" ]]; then
 		local version="$(grep 'VERSION=' "${old_module}" | grep -o '[0-9.]\+')"
 		if [[ "${version}" == "0.1" || "${version}" == "20080924" ]]; then
@@ -160,8 +166,11 @@ cleanup_old_alternatives_module() {
 #
 # Provided alternatives are set up using alternatives_for().
 alternatives-2_pkg_postinst() {
-	local a alt provider module_version="20090908"
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local a alt provider module_version="20150521"
 	local EAUTO="${EROOT%/}/usr/share/eselect/modules/auto"
+
 	for a in "${ALTERNATIVES_PROVIDED[@]}"; do
 		alt="${a%:*}"
 		provider="${a#*:}"
@@ -172,7 +181,7 @@ alternatives-2_pkg_postinst() {
 				install -d "${EAUTO}" || eerror "Could not create eselect modules dir"
 			fi
 			einfo "Creating alternatives eselect module for ${alt}"
-			cat > "${EAUTO}/${alt}.eselect" <<-EOF
+			cat > "${EAUTO}/${alt}.eselect" <<- EOF
 				# This module was automatically generated by alternatives-2.eclass
 				DESCRIPTION="Alternatives for ${alt}"
 				VERSION="${module_version}"
@@ -195,13 +204,16 @@ alternatives-2_pkg_postinst() {
 # @FUNCTION: alternatives-2_pkg_prerm
 # @DESCRIPTION:
 # Ensure a valid provider is set in case the package is unmerged and
-# remove autogenerated eselect modules for all alternatives when last
+# remove autogenerated eselect modules for alternative when last
 # provider is unmerged.
 #
 # Provided alternatives are set up using alternatives_for().
 alternatives-2_pkg_prerm() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	local a alt provider ignore ret
 	local EAUTO="${EROOT%/}/usr/share/eselect/modules/auto"
+
 	# If we are uninstalling, update alternatives to valid provider
 	[[ -n ${REPLACED_BY_VERSION} ]] || ignore="--ignore"
 	for a in "${ALTERNATIVES_PROVIDED[@]}"; do
@@ -225,3 +237,5 @@ alternatives-2_pkg_prerm() {
 		esac
 	done
 }
+
+EXPORT_FUNCTIONS pkg_postinst pkg_prerm


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-08-20 23:29 Christoph Junghans
  0 siblings, 0 replies; 169+ messages in thread
From: Christoph Junghans @ 2015-08-20 23:29 UTC (permalink / raw
  To: gentoo-commits

commit:     e509b30fbd0e5d72acdc19aa8dcd8027f4acb012
Author:     Justin Bronder <jbronder <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 12 01:29:49 2013 +0000
Commit:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
CommitDate: Wed Aug 19 00:09:09 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=e509b30f

mpi:  support required threads and use deps for mpi packages

 eclass/mpi.eclass | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index 99685b8..c22940f 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -250,12 +250,23 @@ MPI_PKG_USE_CXX="${MPI_PKG_USE_CXX:-0}"
 # This feature requires EAPI 2 style use dependencies
 MPI_PKG_USE_FC="${MPI_PKG_USE_FC:-0}"
 
-
 # @ECLASS-VARIABLE: MPI_PKG_USE_ROMIO
 # @DESCRIPTION: Require a mpi implementation with romio enabled.
 # This feature requires EAPI 2 style use dependencies
 MPI_PKG_USE_ROMIO="${MPI_PKG_USE_ROMIO:-0}"
 
+# @ECLASS-VARIABLE: MPI_PKG_USE_THREADS
+# @DESCRIPTION: Require a mpi implementation with threads enabled.
+# This feature requires EAPI 2 style use dependencies
+MPI_PKG_USE_THREADS="${MPI_PKG_USE_THREADS:-0}"
+
+# @ECLASS-VARIABLE: MPI_PKG_USE_DEPS
+# @DESCRIPTION: Set the use deps for the virtual mpi package
+# directly.  For instance, if set to 'fortran=,threads?' then a dep on
+# virtual/mpi[fortran=,threads?] will be added.
+# This feature requires EAPI 2 style use dependencies
+MPI_PKG_USE_DEPS="${MPI_PKG_USE_DEPS}"
+
 
 # @FUNCTION: mpi_pkg_deplist
 # @USAGE:
@@ -265,13 +276,17 @@ mpi_pkg_deplist() {
 	local pn pn2 ver usedeps invalid_imps inval
 
 	case "${EAPI}" in
-		2|3|4)
+		2|3|4|5)
 			[[ ${MPI_PKG_USE_CXX} -ne 0 ]] \
 				&& usedeps=",cxx"
 			[[ ${MPI_PKG_USE_FC} -ne 0 ]] \
-				&& usedeps="${use_deps},fortran"
+				&& usedeps="${usedeps},fortran"
 			[[ ${MPI_PKG_USE_ROMIO} -ne 0 ]] \
-				&& usedeps="${use_deps},romio"
+				&& usedeps="${usedeps},romio"
+			[[ "${MPI_PKG_USE_THREADS}" -ne 0 ]] \
+				&& usedeps="${usedeps},threads"
+			[ -n "${MPI_PKG_USE_DEPS}" ] \
+				&& usedeps="${usedeps},${MPI_PKG_USE_DEPS}"
 			;;
 		*)
 			;;


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-11-28 18:59 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-11-28 18:59 UTC (permalink / raw
  To: gentoo-commits

commit:     d215df7d2187828382b0668509874cf85f712118
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 28 18:53:11 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Nov 28 18:53:11 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=d215df7d

Merged into tree

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/fortran-2.eclass | 276 ------------------------------------------------
 1 file changed, 276 deletions(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
deleted file mode 100644
index 5cb6d7d..0000000
--- a/eclass/fortran-2.eclass
+++ /dev/null
@@ -1,276 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# @ECLASS: fortran-2.eclass
-# @MAINTAINER:
-# jlec@gentoo.org
-# sci@gentoo.org
-# @AUTHOR:
-# Author Justin Lecher <jlec@gentoo.org>
-# Test functions provided by Sebastien Fabbro and Kacper Kowalik
-# @BLURB: Simplify fortran compiler management
-# @DESCRIPTION:
-# If you need a fortran compiler, then you should be inheriting this eclass.
-# In case you only need optional support, please export FORTRAN_NEEDED before
-# inheriting the eclass.
-#
-# The eclass tests for working fortran compilers
-# and exports the variables FC and F77.
-# Optionally, it checks for extended capabilities based on
-# the variable options selected in the ebuild
-# The only phase function exported is fortran-2_pkg_setup.
-# @EXAMPLE:
-# FORTRAN_NEEDED="lapack fortran"
-#
-# inherit fortran-2
-#
-# FORTRAN_NEED_OPENMP=1
-
-if [[ ! ${_FORTRAN_2_CLASS} ]]; then
-
-# @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP
-# @DESCRIPTION:
-# Set to "1" in order to automatically have the eclass abort if the fortran
-# compiler lacks openmp support.
-: ${FORTRAN_NEED_OPENMP:=0}
-
-# @ECLASS-VARIABLE: FORTRAN_STANDARD
-# @DESCRIPTION:
-# Set this, if a special dialect needs to be supported.
-# Generally not needed as default is sufficient.
-#
-# Valid settings are any combination of: 77 90 95 2003
-: ${FORTRAN_STANDARD:=77}
-
-# @ECLASS-VARIABLE: FORTRAN_NEEDED
-# @DESCRIPTION:
-# If your package has an optional fortran support, set this variable
-# to the space separated list of USE triggering the fortran
-# dependency.
-#
-# e.g. FORTRAN_NEEDED=lapack would result in
-#
-# DEPEND="lapack? ( virtual/fortran )"
-#
-# If unset, we always depend on virtual/fortran.
-: ${FORTRAN_NEEDED:=always}
-
-inherit eutils toolchain-funcs
-
-for _f_use in ${FORTRAN_NEEDED}; do
-	case ${_f_use} in
-		always)
-			DEPEND+=" virtual/fortran"
-			break
-			;;
-		no)
-			break
-			;;
-		*)
-			DEPEND+=" ${_f_use}? ( virtual/fortran )"
-			;;
-	esac
-done
-RDEPEND="${DEPEND}"
-
-# @FUNCTION: fortran_int64_abi_fflags
-# @DESCRIPTION: Return the Fortran compiler flag to enable 64 bit integers for
-# array indices
-# @CODE
-fortran_int64_abi_fflags() {
-	debug-print-function ${FUNCNAME} "${@}"
-	_FC=$(tc-getFC)
-	if [[ ${_FC} == *gfortran* ]]; then
-		echo "-fdefault-integer-8"
-	elif [[ ${_FC} == ifort ]]; then
-		echo "-integer-size 64"
-	else
-		die "Compiler flag for 64bit interger for ${_FC} unknown"
-	fi
-}
-
-# @FUNCTION: _fortran_write_testsuite
-# @INTERNAL
-# @DESCRIPTION:
-# writes fortran test code
-_fortran_write_testsuite() {
-	local filebase=${T}/test-fortran
-
-	# f77 code
-	cat <<- EOF > "${filebase}.f"
-	       end
-	EOF
-
-	# f90/95 code
-	cat <<- EOF > "${filebase}.f90"
-	end
-	EOF
-
-	# f2003 code
-	cat <<- EOF > "${filebase}.f03"
-	       procedure(), pointer :: p
-	       end
-	EOF
-}
-
-# @FUNCTION: _fortran_compile_test
-# @USAGE: <compiler> [dialect]
-# @INTERNAL
-# @DESCRIPTION:
-# Takes fortran compiler as first argument and dialect as second.
-# Checks whether the passed fortran compiler speaks the fortran dialect
-_fortran_compile_test() {
-	local filebase=${T}/test-fortran
-	local fcomp=${1}
-	local fdia=${2}
-	local fcode=${filebase}.f${fdia}
-	local ret
-
-	[[ $# -lt 1 ]] && \
-		die "_fortran_compile_test() needs at least one argument"
-
-	[[ -f ${fcode} ]] || _fortran_write_testsuite
-
-	${fcomp} "${fcode}" -o "${fcode}.x" \
-		>> "${T}"/_fortran_compile_test.log 2>&1
-	ret=$?
-
-	rm -f "${fcode}.x"
-	return ${ret}
-}
-
-# @FUNCTION: _fortran-has-openmp
-# @RETURN: return code of the compiler
-# @INTERNAL
-# @DESCRIPTION:
-# See if the fortran supports OpenMP.
-_fortran-has-openmp() {
-	local flag
-	local filebase=${T}/test-fc-openmp
-	local fcode=${filebase}.f
-	local ret
-	local _fc=$(tc-getFC)
-
-	cat <<- EOF > "${fcode}"
-	       call omp_get_num_threads
-	       end
-	EOF
-
-	for flag in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do
-		${_fc} ${flag} "${fcode}" -o "${fcode}.x" \
-			&>> "${T}"/_fortran_compile_test.log
-		ret=$?
-		(( ${ret} )) || break
-	done
-
-	rm -f "${fcode}.x"
-	return ${ret}
-}
-
-# @FUNCTION: _fortran_die_msg
-# @INTERNAL
-# @DESCRIPTION:
-# Detailed description how to handle fortran support
-_fortran_die_msg() {
-	echo
-	eerror "Please install currently selected gcc version with USE=fortran."
-	eerror "If you intend to use a different compiler then gfortran, please"
-	eerror "set FC variable accordingly and take care that the necessary"
-	eerror "fortran dialects are supported."
-	echo
-	die "Currently no working fortran compiler is available"
-}
-
-# @FUNCTION: _fortran_test_function
-# @INTERNAL
-# @DESCRIPTION:
-# Internal test function for working fortran compiler.
-# It is called in fortran-2_pkg_setup.
-_fortran_test_function() {
-	local dialect
-
-	: ${F77:=$(tc-getFC)}
-
-	: ${FORTRAN_STANDARD:=77}
-	for dialect in ${FORTRAN_STANDARD}; do
-		case ${dialect} in
-			77) _fortran_compile_test $(tc-getF77) || \
-				_fortran_die_msg ;;
-			90|95) _fortran_compile_test $(tc-getFC) 90 || \
-				_fortran_die_msg ;;
-			2003) _fortran_compile_test $(tc-getFC) 03 || \
-				_fortran_die_msg ;;
-			2008) die "Future" ;;
-			*) die "${dialect} is not a Fortran dialect." ;;
-		esac
-	done
-
-	tc-export F77 FC
-	einfo "Using following Fortran compiler:"
-	einfo "  F77: ${F77}"
-	einfo "  FC:  ${FC}"
-
-	if [[ ${FORTRAN_NEED_OPENMP} == 1 ]]; then
-		if _fortran-has-openmp; then
-			einfo "${FC} has OPENMP support"
-		else
-			die "Please install current gcc with USE=openmp or set the FC variable to a compiler that supports OpenMP"
-		fi
-	fi
-}
-
-# @FUNCTION: _fortran-2_pkg_setup
-# @INTERNAL
-# @DESCRIPTION:
-# _The_ fortran-2_pkg_setup() code
-_fortran-2_pkg_setup() {
-	for _f_use in ${FORTRAN_NEEDED}; do
-	case ${_f_use} in
-		always)
-			_fortran_test_function && break
-			;;
-		no)
-			einfo "Forcing fortran support off"
-			break
-			;;
-		*)
-			if use ${_f_use}; then
-				_fortran_test_function && break
-			else
-				unset FC
-				unset F77
-			fi
-			;;
-		esac
-	done
-}
-
-
-# @FUNCTION: fortran-2_pkg_setup
-# @DESCRIPTION:
-# Setup functionality,
-# checks for a valid fortran compiler and optionally for its openmp support.
-fortran-2_pkg_setup() {
-	case ${EAPI:-0} in
-		0|1|2|3)
-			eqawarn "Support for EAPI < 4 will be removed from the"
-			eqawarn "fortran-2.eclass in until 2013-09-30."
-			eqawarn "Please migrate your package to a higher EAPI"
-			eqawarn "or file a bug at https://bugs.gentoo.org"
-			_fortran-2_pkg_setup ;;
-		4|5)
-			if [[ ${MERGE_TYPE} != binary ]]; then
-				_fortran-2_pkg_setup
-			fi
-			;;
-	esac
-}
-
-case ${EAPI:-0} in
-	0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;;
-	*) die "EAPI=${EAPI} is not supported" ;;
-esac
-
-_FORTRAN_2_ECLASS=1
-fi


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-11-29 10:17 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-11-29 10:17 UTC (permalink / raw
  To: gentoo-commits

commit:     1d2a2edb450658c6e8bcc2d0d5320628e0acf934
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 29 09:46:33 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Nov 29 09:46:33 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=1d2a2edb

alternatives-2.eclass: Bump eselect dep version

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 19e8306..c0edbd7 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -31,7 +31,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4.4-r102"
+DEPEND=">=app-admin/eselect-1.4.5-r102"
 RDEPEND="${DEPEND}
 	!app-admin/eselect-blas
 	!app-admin/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-11-29 10:17 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-11-29 10:17 UTC (permalink / raw
  To: gentoo-commits

commit:     100476f47ffdcc076edab3f319f136cd891c788d
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 29 10:06:37 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Nov 29 10:06:37 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=100476f4

mpi.eclass: Fix documention for man pages

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/mpi.eclass | 110 +++++++++++++++++++++++++++++++++---------------------
 1 file changed, 67 insertions(+), 43 deletions(-)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index c22940f..ce9c671 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -7,7 +7,7 @@ inherit multilib
 # @ECLASS: mpi.eclass
 # @MAINTAINER:
 #	Justin Bronder <jsbronder@gentoo.org>
-# @BLURB:  Common functions for mpi-pkg.eclass and mpi-imp.eclass
+# @BLURB: Common functions for mpi-pkg.eclass and mpi-imp.eclass
 
 # History:
 #	2009-06-26 (jsbronder):  Add ability to require common use flags.
@@ -20,8 +20,15 @@ inherit multilib
 # Private Variables #
 #####################
 
+# @ECLASS-VARIABLE: __MPI_ALL_IMPLEMENTATION_PNS
+# @INTERNAL
+# @DESCRIPTION:
 # All known mpi implementations
 __MPI_ALL_IMPLEMENTATION_PNS="mpich mpich2 openmpi lam-mpi openib-mvapich2"
+
+# @ECLASS-VARIABLE: __MPI_ALL_CLASSABLE_PNS
+# @INTERNAL
+# @DESCRIPTION:
 # All mpi implentations that can be classed.
 __MPI_ALL_CLASSABLE_PNS="mpich openmpi mpich2 lam-mpi"
 
@@ -32,26 +39,25 @@ __MPI_ALL_CLASSABLE_PNS="mpich openmpi mpich2 lam-mpi"
 ###################################################################
 
 # @ECLASS-VARIABLE: MPI_UNCLASSED_DEP_STR
-# @DESCRIPTION: String inserted into the deplist when not using a classed
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# String inserted into the deplist when not using a classed
 # install.
 
 # @FUNCTION: mpi_classed
-# @USAGE:
 # @RETURN: True if this build is classed.
 mpi_classed() {
 	[[ ${CATEGORY} == mpi-* ]]
 }
 
 # @FUNCTION: mpi_class
-# @USAGE:
-# @RETURN:  The name of the current class, or nothing if unclassed.
+# @RETURN: The name of the current class, or nothing if unclassed.
 mpi_class() {
 	mpi_classed && echo "${CATEGORY}"
 }
 
 # @FUNCTION: mpi_root
-# @USAGE:
-# @RETURN:  The root path that packages should start installing to.  In the end,
+# @RETURN: The root path that packages should start installing to.  In the end,
 # the majority of a package will will install to ${ROOT}$(mpi_root).
 mpi_root() {
 	if mpi_classed; then
@@ -62,8 +68,8 @@ mpi_root() {
 }
 
 # @FUNCTION: mpi_econf_args
-# @USAGE:
-# @DESCRIPTION:  If classed, returns a list of arguments for econf that sets the
+# @DESCRIPTION:
+# If classed, returns a list of arguments for econf that sets the
 # default install locations correctly.  Should be first in the list of arguments
 # to econf so that any unsuitable options can be overwritten.
 mpi_econf_args() {
@@ -82,10 +88,12 @@ mpi_econf_args() {
 }
 
 # @FUNCTION: _mpi_do
-# @USAGE: $1 - Standard ebuild command to replicate.
-# @DESCRIPTION: Large wrapping class for all of the {do,new}* commands that need
+# @USAGE: <Standard ebuild command to replicate>
+# @DESCRIPTION:
+# Large wrapping class for all of the {do,new}* commands that need
 # to respect the new root to install to.  Works with unclassed builds as well.
 # Currently supports:
+#
 # @CODE
 # dobin    newbin    dodoc     newdoc
 # doexe    newexe    dohtml    dolib
@@ -94,7 +102,6 @@ mpi_econf_args() {
 # doinfo   dodir     dohard    doins
 # dosym
 # @CODE
-
 _mpi_do() {
 	local rc prefix d
 	local cmd=${1}
@@ -195,7 +202,8 @@ mpi_dosym()     { _mpi_do "dosym"        $*; }
 ###########################################
 
 # @FUNCTION: mpi_imp_deplist
-# @USAGE:
+# @DESCRIPTION:
+# To be written
 # @RETURNS: Returns a deplist that handles the blocking between mpi
 # implementations, and any blockers as specified in MPI_UNCLASSED_DEP_STR
 mpi_imp_deplist() {
@@ -215,6 +223,9 @@ mpi_imp_deplist() {
 	echo "${ver}"
 }
 
+# @FUNCTION: mpi_imp_add_eselect
+# @DESCRIPTION:
+# To be written
 mpi_imp_add_eselect() {
 	mpi_classed || return 0
 	local c=$(mpi_class)
@@ -235,33 +246,39 @@ mpi_imp_add_eselect() {
 ########################################
 
 # @ECLASS-VARIABLE: MPI_PKG_NEED_IMPS
-# @DESCRIPTION: List of package names (${PN}) that this package is compatible
+# @DESCRIPTION:
+# List of package names (${PN}) that this package is compatible
 # with.  Default is the list of all mpi implementations
 MPI_PKG_NEED_IMPS="${MPI_PKG_NEED_IMPS:-${__MPI_ALL_CLASSABLE_PNS}}"
 
 
 # @ECLASS-VARIABLE: MPI_PKG_USE_CXX
-# @DESCRIPTION: Require a mpi implementation with c++ enabled.
+# @DESCRIPTION:
+# Require a mpi implementation with c++ enabled.
 # This feature requires EAPI 2 style use dependencies
 MPI_PKG_USE_CXX="${MPI_PKG_USE_CXX:-0}"
 
 # @ECLASS-VARIABLE: MPI_PKG_USE_FC
-# @DESCRIPTION: Require a mpi implementation with fortran enabled.
+# @DESCRIPTION:
+# Require a mpi implementation with fortran enabled.
 # This feature requires EAPI 2 style use dependencies
 MPI_PKG_USE_FC="${MPI_PKG_USE_FC:-0}"
 
 # @ECLASS-VARIABLE: MPI_PKG_USE_ROMIO
-# @DESCRIPTION: Require a mpi implementation with romio enabled.
+# @DESCRIPTION:
+# Require a mpi implementation with romio enabled.
 # This feature requires EAPI 2 style use dependencies
 MPI_PKG_USE_ROMIO="${MPI_PKG_USE_ROMIO:-0}"
 
 # @ECLASS-VARIABLE: MPI_PKG_USE_THREADS
-# @DESCRIPTION: Require a mpi implementation with threads enabled.
+# @DESCRIPTION:
+# Require a mpi implementation with threads enabled.
 # This feature requires EAPI 2 style use dependencies
 MPI_PKG_USE_THREADS="${MPI_PKG_USE_THREADS:-0}"
 
 # @ECLASS-VARIABLE: MPI_PKG_USE_DEPS
-# @DESCRIPTION: Set the use deps for the virtual mpi package
+# @DESCRIPTION:
+# Set the use deps for the virtual mpi package
 # directly.  For instance, if set to 'fortran=,threads?' then a dep on
 # virtual/mpi[fortran=,threads?] will be added.
 # This feature requires EAPI 2 style use dependencies
@@ -269,7 +286,8 @@ MPI_PKG_USE_DEPS="${MPI_PKG_USE_DEPS}"
 
 
 # @FUNCTION: mpi_pkg_deplist
-# @USAGE:
+# @DESCRIPTION:
+# To be written
 # @RETURN: Returns a deplist comprised of valid implementations and any blockers
 # depending on if this package is building with mpi class support.
 mpi_pkg_deplist() {
@@ -325,8 +343,10 @@ mpi_pkg_deplist() {
 }
 
 # @FUNCTION: mpi_pkg_base_imp
-# @USAGE:
-# @DESCRIPTION: Returns the ${PN} of the package providing mpi support.   Works
+# @DESCRIPTION:
+# To be written
+# @RETURNS:
+# Returns the ${PN} of the package providing mpi support.   Works
 # even when using an unclassed mpi build.
 mpi_pkg_base_imp() {
 	if mpi_classed; then
@@ -342,35 +362,37 @@ mpi_pkg_base_imp() {
 }
 
 # @FUNCTION: mpi_pkg_cc
-# @USAGE:
-# @DESCRIPTION:  Returns the full path to the mpi C compiler.  Trys to find one
+# @DESCRIPTION:
+#  Returns the full path to the mpi C compiler.  Trys to find one
 # even if this build is unclassed.  If return is empty, user should assume the
 # implementation does not support this compiler
+mpi_pkg_cc()  { _mpi_pkg_compiler "MPI_CC"  "cc";      }
+
 # @FUNCTION: mpi_pkg_cxx
-# @USAGE:
-# @DESCRIPTION:  Returns the full path to the mpi C++ compiler.  Trys to find one
+# @DESCRIPTION:
+# Returns the full path to the mpi C++ compiler.  Trys to find one
 # even if this build is unclassed.  If return is empty, user should assume the
 # implementation does not support this compiler
+mpi_pkg_cxx() { _mpi_pkg_compiler "MPI_CXX" "cxx c++"; }
+
 # @FUNCTION: mpi_pkg_fc
-# @USAGE:
-# @DESCRIPTION:  Returns the full path to the mpi f90 compiler.  Trys to find one
+# @DESCRIPTION:
+# Returns the full path to the mpi f90 compiler.  Trys to find one
 # even if this build is unclassed.  If return is empty, user should assume the
 # implementation does not support this compiler
+mpi_pkg_fc()  { _mpi_pkg_compiler "MPI_FC"  "f90 fc";  }
+
 # @FUNCTION: mpi_pkg_f77
-# @USAGE:
-# @DESCRIPTION:  Returns the full path to the mpi f77 compiler.  Trys to find one
+# @DESCRIPTION:
+# Returns the full path to the mpi f77 compiler.  Trys to find one
 # even if this build is unclassed.  If return is empty, user should assume the
 # implementation does not support this compiler
-
-mpi_pkg_cc()  { _mpi_pkg_compiler "MPI_CC"  "cc";      }
-mpi_pkg_cxx() { _mpi_pkg_compiler "MPI_CXX" "cxx c++"; }
 mpi_pkg_f77() { _mpi_pkg_compiler "MPI_F77" "f77";     }
-mpi_pkg_fc()  { _mpi_pkg_compiler "MPI_FC"  "f90 fc";  }
 
 
 # @FUNCTION:  mpi_pkg_set_ld_library_path
-# @USAGE:
-# @DESCRIPTION:  Adds the correct path(s) to the end of LD_LIBRARY_PATH.  Does
+# @DESCRIPTION:
+# Adds the correct path(s) to the end of LD_LIBRARY_PATH.  Does
 # nothing if the build is unclassed.
 mpi_pkg_set_ld_library_path() {
 	if mpi_classed; then
@@ -378,6 +400,8 @@ mpi_pkg_set_ld_library_path() {
 	fi
 }
 
+# @FUNCTION: _mpi_pkg_compiler
+# @DESCRIPTION:
 # If classed, we can ask eselect-mpi.  Otherwise we'll look for some common
 # executable names in ${ROOT}usr/bin.
 _mpi_pkg_compiler() {
@@ -397,8 +421,8 @@ _mpi_pkg_compiler() {
 }
 
 # @FUNCTION: mpi_pkg_set_env
-# @USAGE:
-# @DESCRIPTION:  Exports 'some influential environment variables'.  CC, CXX, F77, FC
+# @DESCRIPTION:
+# Exports 'some influential environment variables'.  CC, CXX, F77, FC
 mpi_pkg_set_env() {
 	if mpi_classed; then
 		_mpi_oCC=$CC
@@ -417,8 +441,8 @@ mpi_pkg_set_env() {
 }
 
 # @FUNCTION: mpi_pkg_restore_env
-# @USAGE:
-# @DESCRIPTION:  Attempts to undo the damage done by mpi_pkg_set_env
+# @DESCRIPTION:
+# Attempts to undo the damage done by mpi_pkg_set_env
 mpi_pkg_restore_env() {
 	if mpi_classed; then
 		export CC=$_mpi_oCC
@@ -433,8 +457,8 @@ mpi_pkg_restore_env() {
 
 
 # @FUNCTION: _get_eselect_var
-# @USAGE: $1 - Variable to get from the class definition
-# @RETURN:  If classed, and given a valid variable, the contents; empty
+# @USAGE: <Variable to get from the class definition>
+# @RETURN: If classed, and given a valid variable, the contents; empty
 # otherwise.
 _get_eselect_var() {
 	if mpi_classed && [ -n "${1}" ]; then


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-11-29 10:17 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-11-29 10:17 UTC (permalink / raw
  To: gentoo-commits

commit:     a9d1f3c418f2e4a499738c15732a7448d3122727
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 29 10:08:39 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Nov 29 10:16:10 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=a9d1f3c4

mpi.eclass: Use case/esac to handle EAPI support

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/mpi.eclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index ce9c671..00686bf 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -2,8 +2,6 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-inherit multilib
-
 # @ECLASS: mpi.eclass
 # @MAINTAINER:
 #	Justin Bronder <jsbronder@gentoo.org>
@@ -15,6 +13,12 @@ inherit multilib
 #		Use virtual/$class to get imp dep in mpi_pkg_deplist.
 #	2008-11-20 (jsbronder):  Initial rewrite from old mpi.eclass
 
+case ${EAPI:-0} in
+	2|3|4|5)
+		inherit multilib
+		;;
+	*) die "EAPI=${EAPI} is not supported" ;;
+esac
 
 #####################
 # Private Variables #


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-11-29 10:17 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-11-29 10:17 UTC (permalink / raw
  To: gentoo-commits

commit:     80afaf4a7425e5fb9efcc92c23c365a8b5fa2862
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 29 10:09:34 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Nov 29 10:16:15 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=80afaf4a

mpi.eclass: Only source once

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/mpi.eclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index 00686bf..af25756 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -13,6 +13,8 @@
 #		Use virtual/$class to get imp dep in mpi_pkg_deplist.
 #	2008-11-20 (jsbronder):  Initial rewrite from old mpi.eclass
 
+if [[ ! ${_MPI_ECLASS} ]]; then
+
 case ${EAPI:-0} in
 	2|3|4|5)
 		inherit multilib
@@ -469,3 +471,6 @@ _get_eselect_var() {
 		echo "$(eselect mpi printvar $(mpi_class) ${1} 2>/dev/null)"
 	fi
 }
+
+_MPI_ECLASS=1
+fi


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-11-29 10:17 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-11-29 10:17 UTC (permalink / raw
  To: gentoo-commits

commit:     c802c1104771c81e25166a1152d7a8942cefdfc3
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 29 10:10:59 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Nov 29 10:16:15 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=c802c110

alternatives-2.eclass: Fix docs string for man pages

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index c0edbd7..4f20187 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -7,7 +7,7 @@
 # Copyright 2008, 2009 Mike Kelly
 # Copyright 2009 David Leverton
 
-# @ECLASS: alternatives-2
+# @ECLASS: alternatives-2.eclass
 # @MAINTAINER:
 # Gentoo Science Project <sci@gentoo.org>
 # @BLURB: Manage alternative implementations.


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-12-03 10:03 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-12-03 10:03 UTC (permalink / raw
  To: gentoo-commits

commit:     ecdd496c665cd85648596863a5b0c08e3dae8a44
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  3 10:01:14 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Dec  3 10:01:14 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=ecdd496c

alternatives-2.eclass: drop debugging

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 2 --
 1 file changed, 2 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 4f20187..4ec9f2b 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -122,7 +122,6 @@ alternatives-2_pkg_prerm() {
 
 	# If we are uninstalling, update alternatives to valid provider
 	[[ -n ${REPLACED_BY_VERSION} ]] || ignore="--ignore"
-set -x
 	for alt in ${ALTERNATIVES_CREATED[@]}; do
 		eselect alternatives update "${alt}"
 		ret=$?
@@ -139,7 +138,6 @@ set -x
 				;;
 		esac
 	done
-set +x
 }
 
 EXPORT_FUNCTIONS pkg_postinst pkg_prerm


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-12-04  7:01 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-12-04  7:01 UTC (permalink / raw
  To: gentoo-commits

commit:     7fd182316f62c5323e034a785bf440f81de2f698
Author:     Benda Xu <heroxbd <AT> gmail <DOT> com>
AuthorDate: Wed Nov 25 14:37:23 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Dec  3 22:41:53 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=7fd18231

eclass/alternatives-2.eclass: support Prefix.

  Use ALTERNATIVESDIR_ROOT for ${D}.

  app-admin/eselect-* has been renamed to app-select/eselect-*.

 eclass/alternatives-2.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 4ec9f2b..a0c18d9 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -33,9 +33,9 @@ esac
 
 DEPEND=">=app-admin/eselect-1.4.5-r102"
 RDEPEND="${DEPEND}
-	!app-admin/eselect-blas
-	!app-admin/eselect-cblas
-	!app-admin/eselect-lapack"
+	!app-eselect/eselect-blas
+	!app-eselect/eselect-cblas
+	!app-eselect/eselect-lapack"
 
 # @ECLASS-VARIABLE: ALTERNATIVES_DIR
 # @INTERNAL
@@ -58,7 +58,7 @@ alternatives_for() {
 
 	dodir /etc/env.d/alternatives
 
-	ALTERNATIVESDIR_ROOTLESS="${ED}/etc/env.d/alternatives" \
+	ALTERNATIVESDIR_ROOT="${D%/}" \
 		eselect alternatives add ${@} || die
 
 	ALTERNATIVES_CREATED+=( ${1} )


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-12-14  7:53 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-12-14  7:53 UTC (permalink / raw
  To: gentoo-commits

commit:     e46d6814190a2905159ff9fadb03f2928df9f4c8
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 14 07:52:53 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Dec 14 07:53:32 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=e46d6814

Raise eselect version requirement

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=563292
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=568038

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index a0c18d9..7c48e13 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -31,7 +31,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4.5-r102"
+DEPEND=">=app-admin/eselect-1.4.5-r103"
 RDEPEND="${DEPEND}
 	!app-eselect/eselect-blas
 	!app-eselect/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-12-27 16:19 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-12-27 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     50d9353a6267a04df6b92093dccb59a741b71e33
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 27 15:20:36 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Dec 27 15:20:36 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=50d9353a

intel-sdp.eclass: Update

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/intel-sdp.eclass | 85 +++++++++++++++++++++++++++++++++++++------------
 1 file changed, 64 insertions(+), 21 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 95e711f..d805a6a 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -8,6 +8,13 @@
 # Sci Team <sci@gentoo.org>
 # @BLURB: Handling of Intel's Software Development Products package management
 
+if [[ ! ${_INTEL_SDP_ECLASS_} ]]; then
+
+case "${EAPI:-0}" in
+	5) ;;
+	*) die "EAPI=${EAPI} is not supported" ;;
+esac
+
 # @ECLASS-VARIABLE: INTEL_DID
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -122,7 +129,9 @@
 # Full path to intel registry db
 INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
 
-inherit check-reqs eutils multilib versionator
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+
+inherit check-reqs eutils multilib-build versionator
 
 _INTEL_PV1=$(get_version_component_range 1)
 _INTEL_PV2=$(get_version_component_range 2)
@@ -138,9 +147,8 @@ _INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${
 
 if [ ${INTEL_SINGLE_ARCH} == true ]; then
 	SRC_URI="
-		amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX} ) )
-		amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} ) )
-		x86?	( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )"
+		abi_x86_32? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )
+		abi_x86_64? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} )"
 else
 	SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}"
 fi
@@ -149,7 +157,7 @@ LICENSE="Intel-SDP"
 # Future work, #394411
 #SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
 SLOT="0"
-IUSE="examples multilib"
+IUSE="examples"
 
 RESTRICT="mirror"
 
@@ -189,6 +197,8 @@ QA_PREBUILT="${INTEL_SDP_DIR}/*"
 # @DESCRIPTION:
 # Creating necessary links to use intel compiler with eclipse
 _isdp_link_eclipse_plugins() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	local c f
 	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null || die
 		for c in cdt*; do
@@ -216,6 +226,8 @@ _isdp_link_eclipse_plugins() {
 # @DESCRIPTION:
 # warn user that we really require a license
 _isdp_big-warning() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	case ${1} in
 		pre-check )
 			echo ""
@@ -251,6 +263,8 @@ _isdp_big-warning() {
 # @DESCRIPTION:
 # Testing for valid license by asking for version information of the compiler
 _isdp_version_test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	local comp comp_full arch warn
 	case ${PN} in
 		ifc )
@@ -292,6 +306,8 @@ _isdp_version_test() {
 # @INTERNAL
 # Test if installed compiler is working
 _isdp_run-test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
 		case ${PN} in
 			ifc | icc )
@@ -303,13 +319,36 @@ _isdp_run-test() {
 	fi
 }
 
-# @FUNCTION: intel-sdp_pkg_pretend
+# @FUNCTION: convert2intel_arch
+# @USAGE: <arch>
+# @DESCRIPTION:
+# Convert between portage arch (e.g. amd64, x86) and intel arch
+# nomenclature (e.g. intel64, ia32)
+convert2intel_arch() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	case $1 in
+		amd64|abi_x86_64|*amd64*)
+			echo "intel64"
+			;;
+		x86|abi_x86_32|*x86*)
+			echo "ia32"
+			;;
+		*)
+			die "Abi \'$1\' is unsupported"
+			;;
+	esac
+}
+
+# @FUNCTION: intel-sdp-r1_pkg_pretend
 # @DESCRIPTION:
 # @CODE
 # * Check that the user has a (valid) license file before going on.
 # * Check for space requirements being fullfilled
 # @CODE
 intel-sdp_pkg_pretend() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	local warn=1 dir dirs ret arch a p
 
 	: ${CHECKREQS_DISK_BUILD:=256M}
@@ -351,18 +390,18 @@ intel-sdp_pkg_pretend() {
 # @DESCRIPTION:
 # Setting up and sorting some internal variables
 intel-sdp_pkg_setup() {
+	debug-print-function ${FUNCNAME} "${@}"
 	local arch a p
 
-	if use x86; then
-		arch=${INTEL_X86}
-		INTEL_ARCH="ia32"
-	elif use amd64; then
-		arch=x86_64
-		INTEL_ARCH="intel64"
-		if has_multilib_profile; then
-			arch="x86_64 ${INTEL_X86}"
-			INTEL_ARCH="intel64 ia32"
-		fi
+	INTEL_ARCH=""
+
+	if use abi_x86_64; then
+		arch+=" x86_64"
+		INTEL_ARCH+=" intel64"
+	fi
+	if use abi_x86_32; then
+		arch+=" ${INTEL_X86}"
+		INTEL_ARCH+=" ia32"
 	fi
 	INTEL_RPMS=()
 	INTEL_RPMS_FULL=()
@@ -461,6 +500,8 @@ intel-sdp_src_unpack() {
 # @DESCRIPTION:
 # Install everything
 intel-sdp_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	if path_exists "${INTEL_SDP_DIR}"/uninstall*; then
 		ebegin "Cleaning out uninstall information"
 		find "${INTEL_SDP_DIR}"/uninstall* -delete || die
@@ -523,6 +564,8 @@ intel-sdp_src_install() {
 # @DESCRIPTION:
 # Add things to intel database
 intel-sdp_pkg_postinst() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	# add product registry to intel "database"
 	local l r
 	for r in ${INTEL_RPMS}; do
@@ -542,6 +585,8 @@ intel-sdp_pkg_postinst() {
 # @DESCRIPTION:
 # Sanitize intel database
 intel-sdp_pkg_postrm() {
+	debug-print-function ${FUNCNAME} "${@}"
+
 	# remove from intel "database"
 	if [[ -e ${INTEL_SDP_DB} ]]; then
 		local r
@@ -559,8 +604,6 @@ intel-sdp_pkg_postrm() {
 }
 
 EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend
-case "${EAPI:-0}" in
-	0|1|2|3)die "EAPI=${EAPI} is not supported anymore" ;;
-	4|5) ;;
-	*) die "EAPI=${EAPI} is not supported" ;;
-esac
+
+_INTEL_SDP_ECLASS_=1
+fi


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-12-27 16:19 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-12-27 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     41eaa7063fa4ddd13481100fa805ed01b6275705
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 27 15:19:36 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Dec 27 15:19:36 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=41eaa706

numeric-int64-multibuild.eclass: Set MULTILIB_COMPAT to supported ABIs

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/numeric-int64-multibuild.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass
index a55db31..6ac7d79 100644
--- a/eclass/numeric-int64-multibuild.eclass
+++ b/eclass/numeric-int64-multibuild.eclass
@@ -24,6 +24,8 @@ case ${EAPI:-0} in
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+
 inherit alternatives-2 eutils fortran-2 multilib-build numeric toolchain-funcs
 
 IUSE="int64"
@@ -327,6 +329,7 @@ numeric-int64-multibuild_install_alternative() {
 		alternatives_for \
 			${alternative} ${module_name} 0 \
 			$(cat "${T}"/alternative-${alternative}.sh) ${@}
+		rm "${T}"/alternative-${alternative}.sh || die
 	}
 	numeric-int64-multibuild_foreach_all_abi_variants pc_file ${@}
 	numeric-int64-multibuild_foreach_int_abi pc_install ${@}
@@ -387,7 +390,6 @@ numeric-int64-multibuild_foreach_all_abi_variants() {
 # @DESCRIPTION:
 # Thin wrapper around multibuild_copy_sources()
 numeric-int64-multibuild_copy_sources() {
-
 	debug-print-function ${FUNCNAME} "${@}"
 	local MULTIBUILD_VARIANTS=( $(numeric-int64_get_all_abi_variants) )
 	multibuild_copy_sources


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2015-12-27 16:19 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2015-12-27 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     7a55959f98fe51f8455297218cf17bc6872ba700
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 27 10:58:03 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Dec 27 10:58:03 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=7a55959f

intel-sdp.eclass: Import latest tree changes

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/intel-sdp.eclass | 35 +++++++++++++++++++++--------------
 1 file changed, 21 insertions(+), 14 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
index 5761973..95e711f 100644
--- a/eclass/intel-sdp.eclass
+++ b/eclass/intel-sdp.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -122,7 +122,7 @@
 # Full path to intel registry db
 INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
 
-inherit check-reqs multilib versionator
+inherit check-reqs eutils multilib versionator
 
 _INTEL_PV1=$(get_version_component_range 1)
 _INTEL_PV2=$(get_version_component_range 2)
@@ -190,7 +190,7 @@ QA_PREBUILT="${INTEL_SDP_DIR}/*"
 # Creating necessary links to use intel compiler with eclipse
 _isdp_link_eclipse_plugins() {
 	local c f
-	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
+	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null || die
 		for c in cdt*; do
 			local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
 			if has_version "dev-util/eclipse-sdk:${ev}"; then
@@ -207,7 +207,7 @@ _isdp_link_eclipse_plugins() {
 				done
 			fi
 		done
-	popd > /dev/null
+	popd > /dev/null || die
 }
 
 # @FUNCTION: _isdp_big-warning
@@ -230,9 +230,9 @@ _isdp_big-warning() {
 	esac
 
 	echo ""
-	ewarn "Make sure you have recieved the an Intel license."
+	ewarn "Make sure you have received an Intel license."
 	ewarn "To receive a non-commercial license, you need to register at:"
-	ewarn "http://software.intel.com/en-us/articles/non-commercial-software-development/"
+	ewarn "https://software.intel.com/en-us/qualify-for-free-software"
 	ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
 
 	case ${1} in
@@ -461,7 +461,13 @@ intel-sdp_src_unpack() {
 # @DESCRIPTION:
 # Install everything
 intel-sdp_src_install() {
-	if [[ -d "${INTEL_SDP_DIR}"/Documentation ]]; then
+	if path_exists "${INTEL_SDP_DIR}"/uninstall*; then
+		ebegin "Cleaning out uninstall information"
+		find "${INTEL_SDP_DIR}"/uninstall* -delete || die
+		eend
+	fi
+
+	if path_exists "${INTEL_SDP_DIR}"/Documentation; then
 		dodoc -r "${INTEL_SDP_DIR}"/Documentation/*
 
 		ebegin "Cleaning out documentation"
@@ -469,7 +475,7 @@ intel-sdp_src_install() {
 		eend
 	fi
 
-	if [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
+	if path_exists "${INTEL_SDP_DIR}"/Samples; then
 		if use examples ; then
 			insinto /usr/share/${P}/examples/
 			doins -r "${INTEL_SDP_DIR}"/Samples/*
@@ -479,7 +485,7 @@ intel-sdp_src_install() {
 		eend
 	fi
 
-	if [[ -d "${INTEL_SDP_DIR}"/eclipse_support ]]; then
+	if path_exists "${INTEL_SDP_DIR}"/eclipse_support; then
 		if has eclipse ${IUSE} && use eclipse; then
 			_isdp_link_eclipse_plugins
 		else
@@ -489,12 +495,13 @@ intel-sdp_src_install() {
 		fi
 	fi
 
-	if [[ -d "${INTEL_SDP_DIR}"/man ]]; then
-		nonfatal doman "${INTEL_SDP_DIR}"/man/en_US/man1/*
-		nonfatal doman "${INTEL_SDP_DIR}"/man/man1/*
-		if has linguas_ja ${IUSE} && use linguas_ja; then
+	if path_exists "${INTEL_SDP_DIR}"/man; then
+		path_exists "${INTEL_SDP_DIR}"/man/en_US/man1/* && \
+			doman "${INTEL_SDP_DIR}"/man/en_US/man1/*
+		path_exists "${INTEL_SDP_DIR}"/man/man1/* && \
+			doman "${INTEL_SDP_DIR}"/man/man1/*
+		has linguas_ja ${IUSE} && use linguas_ja && \
 			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*
-		fi
 
 		find "${INTEL_SDP_DIR}"/man -delete || die
 	fi


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-02-10 18:27 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2016-02-10 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     aeb9c0084d83a72d0fb7468837abcee8f7ff9645
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 10 18:24:07 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Feb 10 18:26:49 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=aeb9c008

mpi.eclass: Enable EAPI=6

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/mpi.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index af25756..b7ace33 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -17,8 +17,8 @@ if [[ ! ${_MPI_ECLASS} ]]; then
 
 case ${EAPI:-0} in
 	2|3|4|5)
-		inherit multilib
-		;;
+		inherit multilib ;;
+	6) ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-02-10 18:27 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2016-02-10 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     c9dcd29fbbfa90e278eadaeb50509b4d2b2e5f14
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 10 18:25:15 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Feb 10 18:27:21 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=c9dcd29f

numeric-int64-multibuild.eclass: Enable EAPI=6

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/numeric-int64-multibuild.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass
index 6ac7d79..a7c8c6c 100644
--- a/eclass/numeric-int64-multibuild.eclass
+++ b/eclass/numeric-int64-multibuild.eclass
@@ -19,8 +19,8 @@ if [[ ! ${_NUMERIC_INT64_MULTILIB_ECLASS} ]]; then
 # EAPI=5 is required for meaningful MULTILIB_USEDEP.
 case ${EAPI:-0} in
 	5)
-		inherit multilib
-		;;
+		inherit multilib ;;
+	6) ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-02-10 18:27 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2016-02-10 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     6df2a888418c43721ef8c11340e036917ed7c0df
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 10 18:24:58 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Feb 10 18:26:56 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=6df2a888

alternatives-2.eclass: Enable EAPI=6

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 7c48e13..a559195 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -24,7 +24,7 @@ case "${EAPI:-0}" in
 	0|1|2|3|4)
 		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
 		;;
-	5)
+	5|6)
 		;;
 	*)
 		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-02-10 18:27 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2016-02-10 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     79a3b201623ba75cd8b185c6da8ceccaf24cfea2
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 10 18:25:27 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Feb 10 18:27:16 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=79a3b201

numeric.eclass: Enable EAPI=6

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/numeric.eclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/numeric.eclass b/eclass/numeric.eclass
index adee3c5..6fe676c 100644
--- a/eclass/numeric.eclass
+++ b/eclass/numeric.eclass
@@ -10,15 +10,15 @@
 # Various functions which make the maintenance  numerical algebra packages
 # easier.
 
+if [[ ! ${_NUMERIC_ECLASS} ]]; then
+
 case ${EAPI:-0} in
-	0|1|2|3|4|5) ;;
+	0|1|2|3|4|5)
+		inherit multilib ;;
+	6) ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
-if [[ ! ${_NUMERIC_ECLASS} ]]; then
-
-inherit multilib
-
 # @VARIABLE: NUMERIC_MODULE_NAME
 # @DESCRIPTION:
 # The base pkg-config module name of the package being built.


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-02-15  8:19 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2016-02-15  8:19 UTC (permalink / raw
  To: gentoo-commits

commit:     fd6a661860c350c1b3bc5f0c4c5bb5cd4f1393a7
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 14 17:26:13 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Feb 14 17:52:59 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=fd6a6618

eclass/intel-sdp-r1.eclass: New eclass to handle intel tools >=2016

 eclass/intel-sdp-r1.eclass | 586 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 586 insertions(+)

diff --git a/eclass/intel-sdp-r1.eclass b/eclass/intel-sdp-r1.eclass
new file mode 100644
index 0000000..14467b7
--- /dev/null
+++ b/eclass/intel-sdp-r1.eclass
@@ -0,0 +1,586 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: intel-sdp-r1.eclass
+# @MAINTAINER:
+# Justin Lecher <jlec@gentoo.org>
+# David Seifert <soap@gentoo.org>
+# Sci Team <sci@gentoo.org>
+# @BLURB: Handling of Intel's Software Development Products package management
+
+if [[ ! ${_INTEL_SDP_R1_ECLASS_} ]]; then
+
+case "${EAPI:-0}" in
+	6) ;;
+	*) die "EAPI=${EAPI} is not supported" ;;
+esac
+
+# @ECLASS-VARIABLE: INTEL_DID
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package download ID from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. 8365
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_DPN
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package name to download from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. parallel_studio_xe
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_DPV
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package download version from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. 2016_update1
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_TARX
+# @DESCRIPTION:
+# The package extention.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. tar.gz
+#
+# Must be defined before inheriting the eclass
+: ${INTEL_TARX:=tgz}
+
+# @ECLASS-VARIABLE: INTEL_SUBDIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package sub-directory where it will end-up in /opt/intel
+# To find out its value, you have to do a raw install from the Intel tar ball
+
+# @ECLASS-VARIABLE: INTEL_SKIP_LICENSE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Possibility to skip the mandatory check for licenses. Only set this if there
+# is really no fix.
+
+# @ECLASS-VARIABLE: INTEL_RPMS_DIR
+# @DESCRIPTION:
+# Main subdirectory which contains the rpms to extract.
+: ${INTEL_RPMS_DIR:=rpm}
+
+# @ECLASS-VARIABLE: INTEL_X86
+# @DESCRIPTION:
+# 32bit arch in rpm names
+#
+# e.g. i486
+: ${INTEL_X86:=i486}
+
+# @ECLASS-VARIABLE: INTEL_BIN_RPMS
+# @DESCRIPTION:
+# Functional name of rpm without any version/arch tag
+# Has to be a bash array
+#
+# e.g. ("icc-l-all-devel")
+#
+# if the rpm is located in a directory other than INTEL_RPMS_DIR you can
+# specify the full path
+#
+# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
+: ${INTEL_BIN_RPMS:=()}
+
+# @ECLASS-VARIABLE: INTEL_AMD64_RPMS
+# @DESCRIPTION:
+# AMD64 single arch rpms. Same syntax as INTEL_BIN_RPMS
+# Has to be a bash array
+: ${INTEL_AMD64_RPMS:=()}
+
+# @ECLASS-VARIABLE: INTEL_X86_RPMS
+# @DESCRIPTION:
+# X86 single arch rpms. Same syntax as INTEL_BIN_RPMS
+# Has to be a bash array
+: ${INTEL_X86_RPMS:=()}
+
+# @ECLASS-VARIABLE: INTEL_DAT_RPMS
+# @DESCRIPTION:
+# Functional name of rpm of common data which are arch free
+# without any version tag
+# Has to be a bash array
+#
+# e.g. ("openmp-l-all-devel")
+#
+# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
+# specify the full path
+#
+# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
+: ${INTEL_DAT_RPMS:=()}
+
+# @ECLASS-VARIABLE: INTEL_SINGLE_ARCH
+# @DESCRIPTION:
+# Unset, if only the multilib package will be provided by intel
+: ${INTEL_SINGLE_ARCH:=true}
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+
+inherit check-reqs eutils multilib-build versionator
+
+_INTEL_PV1=$(get_version_component_range 1)
+_INTEL_PV2=$(get_version_component_range 2)
+_INTEL_PV3=$(get_version_component_range 3)
+_INTEL_PV4=$(get_version_component_range 4)
+_INTEL_PV=""
+[[ -n ${_INTEL_PV4} ]] && _INTEL_PV+="${_INTEL_PV4}-"
+[[ -n ${_INTEL_PV1} ]] && _INTEL_PV+="${_INTEL_PV1}"
+[[ -n ${_INTEL_PV2} ]] && _INTEL_PV+=".${_INTEL_PV2}"
+[[ -n ${_INTEL_PV3} ]] && _INTEL_PV+=".${_INTEL_PV3}"
+[[ -n ${_INTEL_PV4} ]] && _INTEL_PV+="-${_INTEL_PV4}"
+
+_INTEL_URI="http://registrationcenter-download.intel.com/akdlm/irc_nas/${INTEL_DID}/${INTEL_DPN}"
+
+if [ ${INTEL_SINGLE_ARCH} == true ]; then
+	SRC_URI="
+		abi_x86_32? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )
+		abi_x86_64? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} )"
+else
+	SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}"
+fi
+
+LICENSE="Intel-SDP"
+# Future work, #394411
+#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
+SLOT="0"
+
+RESTRICT="mirror"
+
+RDEPEND=""
+DEPEND="app-arch/rpm2targz"
+
+_INTEL_SDP_YEAR=${INTEL_DPV}
+_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_sp*}
+_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_update*}
+
+# @ECLASS-VARIABLE: INTEL_SDP_DIR
+# @DESCRIPTION:
+# Full rootless path to installation dir
+INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}_${_INTEL_SDP_YEAR:-${_INTEL_PV1}}"
+[[ -n ${_INTEL_PV3} ]] && INTEL_SDP_DIR+=".${_INTEL_PV3}"
+[[ -n ${_INTEL_PV4} ]] && INTEL_SDP_DIR+=".${_INTEL_PV4}"
+
+# @ECLASS-VARIABLE: INTEL_SDP_EDIR
+# @DESCRIPTION:
+# Full rooted path to installation dir
+INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="${INTEL_SDP_DIR}/*"
+
+# @ECLASS-VARIABLE: INTEL_ARCH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Intels internal names of the arches; will be set at runtime accordingly
+#
+# e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
+
+# @FUNCTION: _isdp_big-warning
+# @USAGE: [pre-check | test-failed]
+# @INTERNAL
+# @DESCRIPTION:
+# warn user that we really require a license
+_isdp_big-warning() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	case ${1} in
+		pre-check )
+			echo ""
+			ewarn "License file not found!"
+			;;
+
+		test-failed )
+			echo ""
+			ewarn "Function test failed. Most probably due to an invalid license."
+			ewarn "This means you already tried to bypass the license check once."
+			;;
+	esac
+
+	echo ""
+	ewarn "Make sure you have received an Intel license."
+	ewarn "To receive a non-commercial license, you need to register at:"
+	ewarn "https://software.intel.com/en-us/qualify-for-free-software"
+	ewarn "Install the license file into ${EPREFIX}/opt/intel/licenses"
+	ewarn ""
+	ewarn "Beginning with the 2016 suite of tools, license files are keyed"
+	ewarn "to the MAC address of the eth0 interface. In order to retrieve"
+	ewarn "a personalized license file, follow the instructions at"
+	ewarn "https://software.intel.com/en-us/articles/how-do-i-get-my-license-file-for-intel-parallel-studio-xe-2016"
+
+	case ${1} in
+		pre-check )
+			ewarn "before proceeding with installation of ${P}"
+			echo ""
+			;;
+		* )
+			echo ""
+			;;
+			esac
+}
+
+# @FUNCTION: _isdp_version_test
+# @INTERNAL
+# @DESCRIPTION:
+# Testing for valid license by asking for version information of the compiler
+_isdp_version_test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local comp comp_full arch warn
+	case ${PN} in
+		ifc )
+			debug-print "Testing ifort"
+			comp=ifort
+			;;
+		icc )
+			debug-print "Testing icc"
+			comp=icc
+			;;
+		*)
+			die "${PN} is not supported for testing"
+			;;
+	esac
+
+	for arch in ${INTEL_ARCH}; do
+		case ${EBUILD_PHASE} in
+			install )
+				comp_full="${ED}/${INTEL_SDP_DIR}/linux/bin/${arch}/${comp}"
+				;;
+			postinst )
+				comp_full="${INTEL_SDP_EDIR}/linux/bin/${arch}/${comp}"
+				;;
+			* )
+				ewarn "Compile test not supported in ${EBUILD_PHASE}"
+				continue
+				;;
+		esac
+
+		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/linux/bin/${arch}/\" \"${comp_full}\" -V"
+
+		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/linux/bin/${arch}/" "${comp_full}" -V &>/dev/null
+		[[ $? -ne 0 ]] && warn=yes
+	done
+	[[ "${warn}" == "yes" ]] && _isdp_big-warning test-failed
+}
+
+# @FUNCTION: _isdp_run-test
+# @INTERNAL
+# @DESCRIPTION:
+# Test if installed compiler is working
+_isdp_run-test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
+		case ${PN} in
+			ifc | icc )
+				_isdp_version_test ;;
+			* )
+				debug-print "No test available for ${PN}"
+				;;
+		esac
+	fi
+}
+
+# @FUNCTION: convert2intel_arch
+# @USAGE: <arch>
+# @DESCRIPTION:
+# Convert between portage arch (e.g. amd64, x86) and intel arch
+# nomenclature (e.g. intel64, ia32)
+convert2intel_arch() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	case $1 in
+		amd64|abi_x86_64|*amd64*)
+			echo "intel64"
+			;;
+		x86|abi_x86_32|*x86*)
+			echo "ia32"
+			;;
+		*)
+			die "Abi \'$1\' is unsupported"
+			;;
+	esac
+}
+
+# @FUNCTION: intel-sdp-r1_pkg_pretend
+# @DESCRIPTION:
+# @CODE
+# * Check that the user has a (valid) license file before going on.
+# * Check for space requirements being fullfilled
+# @CODE
+intel-sdp-r1_pkg_pretend() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local warn=1 dir dirs ret arch a p
+
+	: ${CHECKREQS_DISK_BUILD:=256M}
+	check-reqs_pkg_pretend
+
+	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
+		if echo ${INTEL_LICENSE_FILE} | grep -q @; then
+			einfo "Looks like you are using following license server:"
+			einfo "   ${INTEL_LICENSE_FILE}"
+			return 0
+		fi
+
+		dirs=(
+			"${EPREFIX}/opt/intel/licenses"
+			"${INTEL_SDP_EDIR}/licenses"
+			"${INTEL_SDP_EDIR}/Licenses"
+			)
+		for dir in "${dirs[@]}" ; do
+			ebegin "Checking for a license in: ${dir}"
+			#maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]]
+			[[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$?
+			eend ${ret}
+			if [[ ${ret} == "0" ]]; then
+				warn=${ret}
+				break
+			fi
+		done
+		if [[ ${warn} == "1" ]]; then
+			_isdp_big-warning pre-check
+			die "Could not find license file"
+		fi
+	else
+		eqawarn "The ebuild doesn't check for presence of a proper intel license!"
+		eqawarn "This shouldn't be done unless there is a very good reason."
+	fi
+}
+
+# @FUNCTION: intel-sdp-r1_pkg_setup
+# @DESCRIPTION:
+# Setting up and sorting some internal variables
+intel-sdp-r1_pkg_setup() {
+	debug-print-function ${FUNCNAME} "${@}"
+	local arch a p
+
+	INTEL_ARCH=""
+
+	if use abi_x86_64; then
+		arch+=" x86_64"
+		INTEL_ARCH+=" intel64"
+	fi
+	if use abi_x86_32; then
+		arch+=" ${INTEL_X86}"
+		INTEL_ARCH+=" ia32"
+	fi
+	INTEL_RPMS=()
+	INTEL_RPMS_FULL=()
+
+	for p in "${INTEL_BIN_RPMS[@]}"; do
+		for a in ${arch}; do
+			if [ ${p} == $(basename ${p}) ]; then
+				# check for variables ending in ".rpm"
+				# these are excluded from version expansion, due to Intel's
+				# idiosyncratic versioning scheme beginning with their 2016
+				# suite of tools.
+				if [[ "${p}" == *.rpm ]]; then
+					INTEL_RPMS+=( intel-${p} )
+				else
+					INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${a}.rpm )
+				fi
+			else
+				if [[ "${p}" == *.rpm ]]; then
+					INTEL_RPMS_FULL+=( ${p} )
+				else
+					INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${a}.rpm )
+				fi
+			fi
+		done
+	done
+
+	if use amd64; then
+		for p in "${INTEL_AMD64_RPMS[@]}"; do
+			if [ ${p} == $(basename ${p}) ]; then
+				if [[ "${p}" == *.rpm ]]; then
+					INTEL_RPMS+=( intel-${p} )
+				else
+					INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.x86_64.rpm )
+				fi
+			else
+				if [[ "${p}" == *.rpm ]]; then
+					INTEL_RPMS_FULL+=( ${p} )
+				else
+					INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.x86_64.rpm )
+				fi
+			fi
+		done
+	fi
+
+	for p in "${INTEL_X86_RPMS[@]}"; do
+		if [ ${p} == $(basename ${p}) ]; then
+			if [[ "${p}" == *.rpm ]]; then
+				INTEL_RPMS+=( intel-${p} )
+			else
+				INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${INTEL_X86}.rpm )
+			fi
+		else
+			if [[ "${p}" == *.rpm ]]; then
+				INTEL_RPMS_FULL+=( ${p} )
+			else
+				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${INTEL_X86}.rpm )
+			fi
+		fi
+	done
+
+	for p in "${INTEL_DAT_RPMS[@]}"; do
+		if [ ${p} == $(basename ${p}) ]; then
+			if [[ "${p}" == *.rpm ]]; then
+				INTEL_RPMS+=( intel-${p} )
+			else
+				INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.noarch.rpm )
+			fi
+		else
+			if [[ "${p}" == *.rpm ]]; then
+				INTEL_RPMS_FULL+=( ${p} )
+			else
+				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.noarch.rpm )
+			fi
+		fi
+	done
+}
+
+# @FUNCTION: intel-sdp-r1_src_unpack
+# @DESCRIPTION:
+# Unpacking necessary rpms from tarball, extract them and rearrange the output.
+intel-sdp-r1_src_unpack() {
+	local l r subdir rb t list=() debug_list
+
+	for t in ${A}; do
+		for r in "${INTEL_RPMS[@]}"; do
+			rpmdir=${t%%.*}/${INTEL_RPMS_DIR}
+			list+=( ${rpmdir}/${r} )
+		done
+
+		for r in "${INTEL_RPMS_FULL[@]}"; do
+			list+=( ${t%%.*}/${r} )
+		done
+
+		debug_list="$(IFS=$'\n'; echo ${list[@]} )"
+
+		debug-print "Adding to decompression list:"
+		debug-print ${debug_list}
+
+		tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log
+
+		for r in ${list[@]}; do
+			rb=$(basename ${r})
+			einfo "Unpacking ${rb}"
+			rpm2tar -O ${r} | tar xvf - | sed -e \
+				"s:^\.:${EROOT#/}:g" > /dev/null; assert "unpacking ${r} failed"
+		done
+	done
+}
+
+# @FUNCTION: intel-sdp-r1_src_install
+# @DESCRIPTION:
+# Install everything
+intel-sdp-r1_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	# remove uninstall information
+	if path_exists opt/intel/"${INTEL_DPN}"*/uninstall; then
+		ebegin "Cleaning out uninstall"
+		rm -r opt/intel/"${INTEL_DPN}"*/uninstall || die
+		eend
+	fi
+
+	# handle documentation
+	if path_exists "opt/intel/documentation_${_INTEL_SDP_YEAR}"; then
+		if path_exists "opt/intel/documentation_${_INTEL_SDP_YEAR}/en/man/common/man1"; then
+			doman opt/intel/documentation_"${_INTEL_SDP_YEAR}"/en/man/common/man1/*
+			rm -r opt/intel/documentation_"${_INTEL_SDP_YEAR}"/en/man || die
+		fi
+
+		if use doc; then
+			if ! use linguas_ja; then
+				rm -r opt/intel/documentation_"${_INTEL_SDP_YEAR}"/ja || die
+			fi
+			dodoc -r opt/intel/documentation_"${_INTEL_SDP_YEAR}"/*
+		fi
+
+		ebegin "Cleaning out documentation"
+		rm -r "opt/intel/documentation_${_INTEL_SDP_YEAR}" || die
+		rm "${INTEL_SDP_DIR}"/linux/{documentation,man} || die
+		eend
+	fi
+
+	# handle examples
+	if path_exists "opt/intel/samples_${_INTEL_SDP_YEAR}"; then
+		if use examples; then
+			if ! use linguas_ja; then
+				rm -r opt/intel/samples_"${_INTEL_SDP_YEAR}"/ja || die
+			fi
+			dodoc -r opt/intel/samples_"${_INTEL_SDP_YEAR}"/*
+		fi
+
+		ebegin "Cleaning out examples"
+		rm -r "opt/intel/samples_${_INTEL_SDP_YEAR}" || die
+		eend
+	fi
+
+	# remove eclipse
+	rm -rf opt/intel/ide_support_* || die
+
+	ebegin "Tagging ${PN}"
+	find opt -name \*sh -type f -exec sed -i \
+		-e "s:<.*DIR>:${INTEL_SDP_EDIR}/linux:g" \
+		'{}' + || die
+	eend
+
+	[[ -d "${ED}" ]] || dodir /
+	mv opt "${ED}"/ || die "moving files failed"
+
+	dodir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
+	keepdir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
+}
+
+# @FUNCTION: intel-sdp-r1_pkg_postinst
+# @DESCRIPTION:
+# Test for all things working
+intel-sdp-r1_pkg_postinst() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	_isdp_run-test
+
+	if [[ ${PN} = icc ]] && has_version ">=dev-util/ccache-3.1.9-r2" ; then
+		#add ccache links as icc might get installed after ccache
+		"${EROOT}"/usr/bin/ccache-config --install-links
+	fi
+
+	elog "Beginning with the 2016 suite of Intel tools, Gentoo has removed"
+	elog "support for the eclipse plugin. If you require the IDE support,"
+	elog "you will have to install the suite on your own, outside portage."
+}
+
+# @FUNCTION: intel-sdp-r1_pkg_postrm
+# @DESCRIPTION:
+# Sanitize cache links
+intel-sdp-r1_pkg_postrm() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	if [[ ${PN} = icc ]] && has_version ">=dev-util/ccache-3.1.9-r2" && [[ -z ${REPLACED_BY_VERSION} ]]; then
+		# --remove-links would remove all links, --install-links updates them
+		"${EROOT}"/usr/bin/ccache-config --install-links
+	fi
+}
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend
+
+_INTEL_SDP_R1_ECLASS_=1
+fi


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-02-15  8:19 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2016-02-15  8:19 UTC (permalink / raw
  To: gentoo-commits

commit:     97ee00337ec21e5fa4393f48bebedc26cad6823e
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 14 17:26:13 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Feb 15 08:06:38 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=97ee0033

eclass/intel-sdp-r1.eclass: New eclass to handle intel tools >=2016

 eclass/intel-sdp-r1.eclass | 586 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 586 insertions(+)

diff --git a/eclass/intel-sdp-r1.eclass b/eclass/intel-sdp-r1.eclass
new file mode 100644
index 0000000..14467b7
--- /dev/null
+++ b/eclass/intel-sdp-r1.eclass
@@ -0,0 +1,586 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: intel-sdp-r1.eclass
+# @MAINTAINER:
+# Justin Lecher <jlec@gentoo.org>
+# David Seifert <soap@gentoo.org>
+# Sci Team <sci@gentoo.org>
+# @BLURB: Handling of Intel's Software Development Products package management
+
+if [[ ! ${_INTEL_SDP_R1_ECLASS_} ]]; then
+
+case "${EAPI:-0}" in
+	6) ;;
+	*) die "EAPI=${EAPI} is not supported" ;;
+esac
+
+# @ECLASS-VARIABLE: INTEL_DID
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package download ID from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. 8365
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_DPN
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package name to download from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. parallel_studio_xe
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_DPV
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package download version from Intel.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. 2016_update1
+#
+# Must be defined before inheriting the eclass
+
+# @ECLASS-VARIABLE: INTEL_TARX
+# @DESCRIPTION:
+# The package extention.
+# To find out its value, see the links to download in
+# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
+#
+# e.g. tar.gz
+#
+# Must be defined before inheriting the eclass
+: ${INTEL_TARX:=tgz}
+
+# @ECLASS-VARIABLE: INTEL_SUBDIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The package sub-directory where it will end-up in /opt/intel
+# To find out its value, you have to do a raw install from the Intel tar ball
+
+# @ECLASS-VARIABLE: INTEL_SKIP_LICENSE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Possibility to skip the mandatory check for licenses. Only set this if there
+# is really no fix.
+
+# @ECLASS-VARIABLE: INTEL_RPMS_DIR
+# @DESCRIPTION:
+# Main subdirectory which contains the rpms to extract.
+: ${INTEL_RPMS_DIR:=rpm}
+
+# @ECLASS-VARIABLE: INTEL_X86
+# @DESCRIPTION:
+# 32bit arch in rpm names
+#
+# e.g. i486
+: ${INTEL_X86:=i486}
+
+# @ECLASS-VARIABLE: INTEL_BIN_RPMS
+# @DESCRIPTION:
+# Functional name of rpm without any version/arch tag
+# Has to be a bash array
+#
+# e.g. ("icc-l-all-devel")
+#
+# if the rpm is located in a directory other than INTEL_RPMS_DIR you can
+# specify the full path
+#
+# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
+: ${INTEL_BIN_RPMS:=()}
+
+# @ECLASS-VARIABLE: INTEL_AMD64_RPMS
+# @DESCRIPTION:
+# AMD64 single arch rpms. Same syntax as INTEL_BIN_RPMS
+# Has to be a bash array
+: ${INTEL_AMD64_RPMS:=()}
+
+# @ECLASS-VARIABLE: INTEL_X86_RPMS
+# @DESCRIPTION:
+# X86 single arch rpms. Same syntax as INTEL_BIN_RPMS
+# Has to be a bash array
+: ${INTEL_X86_RPMS:=()}
+
+# @ECLASS-VARIABLE: INTEL_DAT_RPMS
+# @DESCRIPTION:
+# Functional name of rpm of common data which are arch free
+# without any version tag
+# Has to be a bash array
+#
+# e.g. ("openmp-l-all-devel")
+#
+# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
+# specify the full path
+#
+# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
+: ${INTEL_DAT_RPMS:=()}
+
+# @ECLASS-VARIABLE: INTEL_SINGLE_ARCH
+# @DESCRIPTION:
+# Unset, if only the multilib package will be provided by intel
+: ${INTEL_SINGLE_ARCH:=true}
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+
+inherit check-reqs eutils multilib-build versionator
+
+_INTEL_PV1=$(get_version_component_range 1)
+_INTEL_PV2=$(get_version_component_range 2)
+_INTEL_PV3=$(get_version_component_range 3)
+_INTEL_PV4=$(get_version_component_range 4)
+_INTEL_PV=""
+[[ -n ${_INTEL_PV4} ]] && _INTEL_PV+="${_INTEL_PV4}-"
+[[ -n ${_INTEL_PV1} ]] && _INTEL_PV+="${_INTEL_PV1}"
+[[ -n ${_INTEL_PV2} ]] && _INTEL_PV+=".${_INTEL_PV2}"
+[[ -n ${_INTEL_PV3} ]] && _INTEL_PV+=".${_INTEL_PV3}"
+[[ -n ${_INTEL_PV4} ]] && _INTEL_PV+="-${_INTEL_PV4}"
+
+_INTEL_URI="http://registrationcenter-download.intel.com/akdlm/irc_nas/${INTEL_DID}/${INTEL_DPN}"
+
+if [ ${INTEL_SINGLE_ARCH} == true ]; then
+	SRC_URI="
+		abi_x86_32? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )
+		abi_x86_64? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} )"
+else
+	SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}"
+fi
+
+LICENSE="Intel-SDP"
+# Future work, #394411
+#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
+SLOT="0"
+
+RESTRICT="mirror"
+
+RDEPEND=""
+DEPEND="app-arch/rpm2targz"
+
+_INTEL_SDP_YEAR=${INTEL_DPV}
+_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_sp*}
+_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_update*}
+
+# @ECLASS-VARIABLE: INTEL_SDP_DIR
+# @DESCRIPTION:
+# Full rootless path to installation dir
+INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}_${_INTEL_SDP_YEAR:-${_INTEL_PV1}}"
+[[ -n ${_INTEL_PV3} ]] && INTEL_SDP_DIR+=".${_INTEL_PV3}"
+[[ -n ${_INTEL_PV4} ]] && INTEL_SDP_DIR+=".${_INTEL_PV4}"
+
+# @ECLASS-VARIABLE: INTEL_SDP_EDIR
+# @DESCRIPTION:
+# Full rooted path to installation dir
+INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="${INTEL_SDP_DIR}/*"
+
+# @ECLASS-VARIABLE: INTEL_ARCH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Intels internal names of the arches; will be set at runtime accordingly
+#
+# e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
+
+# @FUNCTION: _isdp_big-warning
+# @USAGE: [pre-check | test-failed]
+# @INTERNAL
+# @DESCRIPTION:
+# warn user that we really require a license
+_isdp_big-warning() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	case ${1} in
+		pre-check )
+			echo ""
+			ewarn "License file not found!"
+			;;
+
+		test-failed )
+			echo ""
+			ewarn "Function test failed. Most probably due to an invalid license."
+			ewarn "This means you already tried to bypass the license check once."
+			;;
+	esac
+
+	echo ""
+	ewarn "Make sure you have received an Intel license."
+	ewarn "To receive a non-commercial license, you need to register at:"
+	ewarn "https://software.intel.com/en-us/qualify-for-free-software"
+	ewarn "Install the license file into ${EPREFIX}/opt/intel/licenses"
+	ewarn ""
+	ewarn "Beginning with the 2016 suite of tools, license files are keyed"
+	ewarn "to the MAC address of the eth0 interface. In order to retrieve"
+	ewarn "a personalized license file, follow the instructions at"
+	ewarn "https://software.intel.com/en-us/articles/how-do-i-get-my-license-file-for-intel-parallel-studio-xe-2016"
+
+	case ${1} in
+		pre-check )
+			ewarn "before proceeding with installation of ${P}"
+			echo ""
+			;;
+		* )
+			echo ""
+			;;
+			esac
+}
+
+# @FUNCTION: _isdp_version_test
+# @INTERNAL
+# @DESCRIPTION:
+# Testing for valid license by asking for version information of the compiler
+_isdp_version_test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local comp comp_full arch warn
+	case ${PN} in
+		ifc )
+			debug-print "Testing ifort"
+			comp=ifort
+			;;
+		icc )
+			debug-print "Testing icc"
+			comp=icc
+			;;
+		*)
+			die "${PN} is not supported for testing"
+			;;
+	esac
+
+	for arch in ${INTEL_ARCH}; do
+		case ${EBUILD_PHASE} in
+			install )
+				comp_full="${ED}/${INTEL_SDP_DIR}/linux/bin/${arch}/${comp}"
+				;;
+			postinst )
+				comp_full="${INTEL_SDP_EDIR}/linux/bin/${arch}/${comp}"
+				;;
+			* )
+				ewarn "Compile test not supported in ${EBUILD_PHASE}"
+				continue
+				;;
+		esac
+
+		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/linux/bin/${arch}/\" \"${comp_full}\" -V"
+
+		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/linux/bin/${arch}/" "${comp_full}" -V &>/dev/null
+		[[ $? -ne 0 ]] && warn=yes
+	done
+	[[ "${warn}" == "yes" ]] && _isdp_big-warning test-failed
+}
+
+# @FUNCTION: _isdp_run-test
+# @INTERNAL
+# @DESCRIPTION:
+# Test if installed compiler is working
+_isdp_run-test() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
+		case ${PN} in
+			ifc | icc )
+				_isdp_version_test ;;
+			* )
+				debug-print "No test available for ${PN}"
+				;;
+		esac
+	fi
+}
+
+# @FUNCTION: convert2intel_arch
+# @USAGE: <arch>
+# @DESCRIPTION:
+# Convert between portage arch (e.g. amd64, x86) and intel arch
+# nomenclature (e.g. intel64, ia32)
+convert2intel_arch() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	case $1 in
+		amd64|abi_x86_64|*amd64*)
+			echo "intel64"
+			;;
+		x86|abi_x86_32|*x86*)
+			echo "ia32"
+			;;
+		*)
+			die "Abi \'$1\' is unsupported"
+			;;
+	esac
+}
+
+# @FUNCTION: intel-sdp-r1_pkg_pretend
+# @DESCRIPTION:
+# @CODE
+# * Check that the user has a (valid) license file before going on.
+# * Check for space requirements being fullfilled
+# @CODE
+intel-sdp-r1_pkg_pretend() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local warn=1 dir dirs ret arch a p
+
+	: ${CHECKREQS_DISK_BUILD:=256M}
+	check-reqs_pkg_pretend
+
+	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
+		if echo ${INTEL_LICENSE_FILE} | grep -q @; then
+			einfo "Looks like you are using following license server:"
+			einfo "   ${INTEL_LICENSE_FILE}"
+			return 0
+		fi
+
+		dirs=(
+			"${EPREFIX}/opt/intel/licenses"
+			"${INTEL_SDP_EDIR}/licenses"
+			"${INTEL_SDP_EDIR}/Licenses"
+			)
+		for dir in "${dirs[@]}" ; do
+			ebegin "Checking for a license in: ${dir}"
+			#maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]]
+			[[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$?
+			eend ${ret}
+			if [[ ${ret} == "0" ]]; then
+				warn=${ret}
+				break
+			fi
+		done
+		if [[ ${warn} == "1" ]]; then
+			_isdp_big-warning pre-check
+			die "Could not find license file"
+		fi
+	else
+		eqawarn "The ebuild doesn't check for presence of a proper intel license!"
+		eqawarn "This shouldn't be done unless there is a very good reason."
+	fi
+}
+
+# @FUNCTION: intel-sdp-r1_pkg_setup
+# @DESCRIPTION:
+# Setting up and sorting some internal variables
+intel-sdp-r1_pkg_setup() {
+	debug-print-function ${FUNCNAME} "${@}"
+	local arch a p
+
+	INTEL_ARCH=""
+
+	if use abi_x86_64; then
+		arch+=" x86_64"
+		INTEL_ARCH+=" intel64"
+	fi
+	if use abi_x86_32; then
+		arch+=" ${INTEL_X86}"
+		INTEL_ARCH+=" ia32"
+	fi
+	INTEL_RPMS=()
+	INTEL_RPMS_FULL=()
+
+	for p in "${INTEL_BIN_RPMS[@]}"; do
+		for a in ${arch}; do
+			if [ ${p} == $(basename ${p}) ]; then
+				# check for variables ending in ".rpm"
+				# these are excluded from version expansion, due to Intel's
+				# idiosyncratic versioning scheme beginning with their 2016
+				# suite of tools.
+				if [[ "${p}" == *.rpm ]]; then
+					INTEL_RPMS+=( intel-${p} )
+				else
+					INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${a}.rpm )
+				fi
+			else
+				if [[ "${p}" == *.rpm ]]; then
+					INTEL_RPMS_FULL+=( ${p} )
+				else
+					INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${a}.rpm )
+				fi
+			fi
+		done
+	done
+
+	if use amd64; then
+		for p in "${INTEL_AMD64_RPMS[@]}"; do
+			if [ ${p} == $(basename ${p}) ]; then
+				if [[ "${p}" == *.rpm ]]; then
+					INTEL_RPMS+=( intel-${p} )
+				else
+					INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.x86_64.rpm )
+				fi
+			else
+				if [[ "${p}" == *.rpm ]]; then
+					INTEL_RPMS_FULL+=( ${p} )
+				else
+					INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.x86_64.rpm )
+				fi
+			fi
+		done
+	fi
+
+	for p in "${INTEL_X86_RPMS[@]}"; do
+		if [ ${p} == $(basename ${p}) ]; then
+			if [[ "${p}" == *.rpm ]]; then
+				INTEL_RPMS+=( intel-${p} )
+			else
+				INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${INTEL_X86}.rpm )
+			fi
+		else
+			if [[ "${p}" == *.rpm ]]; then
+				INTEL_RPMS_FULL+=( ${p} )
+			else
+				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${INTEL_X86}.rpm )
+			fi
+		fi
+	done
+
+	for p in "${INTEL_DAT_RPMS[@]}"; do
+		if [ ${p} == $(basename ${p}) ]; then
+			if [[ "${p}" == *.rpm ]]; then
+				INTEL_RPMS+=( intel-${p} )
+			else
+				INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.noarch.rpm )
+			fi
+		else
+			if [[ "${p}" == *.rpm ]]; then
+				INTEL_RPMS_FULL+=( ${p} )
+			else
+				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.noarch.rpm )
+			fi
+		fi
+	done
+}
+
+# @FUNCTION: intel-sdp-r1_src_unpack
+# @DESCRIPTION:
+# Unpacking necessary rpms from tarball, extract them and rearrange the output.
+intel-sdp-r1_src_unpack() {
+	local l r subdir rb t list=() debug_list
+
+	for t in ${A}; do
+		for r in "${INTEL_RPMS[@]}"; do
+			rpmdir=${t%%.*}/${INTEL_RPMS_DIR}
+			list+=( ${rpmdir}/${r} )
+		done
+
+		for r in "${INTEL_RPMS_FULL[@]}"; do
+			list+=( ${t%%.*}/${r} )
+		done
+
+		debug_list="$(IFS=$'\n'; echo ${list[@]} )"
+
+		debug-print "Adding to decompression list:"
+		debug-print ${debug_list}
+
+		tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log
+
+		for r in ${list[@]}; do
+			rb=$(basename ${r})
+			einfo "Unpacking ${rb}"
+			rpm2tar -O ${r} | tar xvf - | sed -e \
+				"s:^\.:${EROOT#/}:g" > /dev/null; assert "unpacking ${r} failed"
+		done
+	done
+}
+
+# @FUNCTION: intel-sdp-r1_src_install
+# @DESCRIPTION:
+# Install everything
+intel-sdp-r1_src_install() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	# remove uninstall information
+	if path_exists opt/intel/"${INTEL_DPN}"*/uninstall; then
+		ebegin "Cleaning out uninstall"
+		rm -r opt/intel/"${INTEL_DPN}"*/uninstall || die
+		eend
+	fi
+
+	# handle documentation
+	if path_exists "opt/intel/documentation_${_INTEL_SDP_YEAR}"; then
+		if path_exists "opt/intel/documentation_${_INTEL_SDP_YEAR}/en/man/common/man1"; then
+			doman opt/intel/documentation_"${_INTEL_SDP_YEAR}"/en/man/common/man1/*
+			rm -r opt/intel/documentation_"${_INTEL_SDP_YEAR}"/en/man || die
+		fi
+
+		if use doc; then
+			if ! use linguas_ja; then
+				rm -r opt/intel/documentation_"${_INTEL_SDP_YEAR}"/ja || die
+			fi
+			dodoc -r opt/intel/documentation_"${_INTEL_SDP_YEAR}"/*
+		fi
+
+		ebegin "Cleaning out documentation"
+		rm -r "opt/intel/documentation_${_INTEL_SDP_YEAR}" || die
+		rm "${INTEL_SDP_DIR}"/linux/{documentation,man} || die
+		eend
+	fi
+
+	# handle examples
+	if path_exists "opt/intel/samples_${_INTEL_SDP_YEAR}"; then
+		if use examples; then
+			if ! use linguas_ja; then
+				rm -r opt/intel/samples_"${_INTEL_SDP_YEAR}"/ja || die
+			fi
+			dodoc -r opt/intel/samples_"${_INTEL_SDP_YEAR}"/*
+		fi
+
+		ebegin "Cleaning out examples"
+		rm -r "opt/intel/samples_${_INTEL_SDP_YEAR}" || die
+		eend
+	fi
+
+	# remove eclipse
+	rm -rf opt/intel/ide_support_* || die
+
+	ebegin "Tagging ${PN}"
+	find opt -name \*sh -type f -exec sed -i \
+		-e "s:<.*DIR>:${INTEL_SDP_EDIR}/linux:g" \
+		'{}' + || die
+	eend
+
+	[[ -d "${ED}" ]] || dodir /
+	mv opt "${ED}"/ || die "moving files failed"
+
+	dodir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
+	keepdir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
+}
+
+# @FUNCTION: intel-sdp-r1_pkg_postinst
+# @DESCRIPTION:
+# Test for all things working
+intel-sdp-r1_pkg_postinst() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	_isdp_run-test
+
+	if [[ ${PN} = icc ]] && has_version ">=dev-util/ccache-3.1.9-r2" ; then
+		#add ccache links as icc might get installed after ccache
+		"${EROOT}"/usr/bin/ccache-config --install-links
+	fi
+
+	elog "Beginning with the 2016 suite of Intel tools, Gentoo has removed"
+	elog "support for the eclipse plugin. If you require the IDE support,"
+	elog "you will have to install the suite on your own, outside portage."
+}
+
+# @FUNCTION: intel-sdp-r1_pkg_postrm
+# @DESCRIPTION:
+# Sanitize cache links
+intel-sdp-r1_pkg_postrm() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	if [[ ${PN} = icc ]] && has_version ">=dev-util/ccache-3.1.9-r2" && [[ -z ${REPLACED_BY_VERSION} ]]; then
+		# --remove-links would remove all links, --install-links updates them
+		"${EROOT}"/usr/bin/ccache-config --install-links
+	fi
+}
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend
+
+_INTEL_SDP_R1_ECLASS_=1
+fi


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-02-19 10:12 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2016-02-19 10:12 UTC (permalink / raw
  To: gentoo-commits

commit:     44f2fd7fd15e4101c564f8d9f61310cb90dafac9
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 16 23:43:39 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Feb 19 09:56:10 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=44f2fd7f

eclass/intel-sdp-r1.eclass: Improve eclass to match modern QA standards

 eclass/intel-sdp-r1.eclass | 566 ++++++++++++++++++++++++---------------------
 1 file changed, 297 insertions(+), 269 deletions(-)

diff --git a/eclass/intel-sdp-r1.eclass b/eclass/intel-sdp-r1.eclass
index 14467b7..2f06ed3 100644
--- a/eclass/intel-sdp-r1.eclass
+++ b/eclass/intel-sdp-r1.eclass
@@ -9,62 +9,71 @@
 # Sci Team <sci@gentoo.org>
 # @BLURB: Handling of Intel's Software Development Products package management
 
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+
+inherit check-reqs eutils multilib-build versionator
+
+EXPORT_FUNCTIONS src_unpack src_install pkg_postinst pkg_postrm pkg_pretend
+
 if [[ ! ${_INTEL_SDP_R1_ECLASS_} ]]; then
 
-case "${EAPI:-0}" in
+case "${EAPI}" in
 	6) ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
-# @ECLASS-VARIABLE: INTEL_DID
+# @ECLASS-VARIABLE: INTEL_DIST_SKU
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # The package download ID from Intel.
-# To find out its value, see the links to download in
+# To determine its value, see the links to download in
 # https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
 #
 # e.g. 8365
 #
-# Must be defined before inheriting the eclass
+# Must be defined before inheriting the eclass.
 
-# @ECLASS-VARIABLE: INTEL_DPN
-# @DEFAULT_UNSET
+# @ECLASS-VARIABLE: INTEL_DIST_NAME
 # @DESCRIPTION:
 # The package name to download from Intel.
-# To find out its value, see the links to download in
+# To determine its value, see the links to download in
 # https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
 #
 # e.g. parallel_studio_xe
 #
-# Must be defined before inheriting the eclass
+# Must be defined before inheriting the eclass.
+: ${INTEL_DIST_NAME:=parallel_studio_xe}
 
-# @ECLASS-VARIABLE: INTEL_DPV
+# @ECLASS-VARIABLE: INTEL_DIST_PV
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # The package download version from Intel.
-# To find out its value, see the links to download in
+# To determine its value, see the links to download in
 # https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
 #
 # e.g. 2016_update1
 #
-# Must be defined before inheriting the eclass
+# Must be defined before inheriting the eclass.
 
-# @ECLASS-VARIABLE: INTEL_TARX
+# @ECLASS-VARIABLE: INTEL_DIST_TARX
 # @DESCRIPTION:
-# The package extention.
-# To find out its value, see the links to download in
+# The package distfile suffix.
+# To determine its value, see the links to download in
 # https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
 #
-# e.g. tar.gz
+# e.g. tgz
 #
-# Must be defined before inheriting the eclass
-: ${INTEL_TARX:=tgz}
+# Must be defined before inheriting the eclass.
+: ${INTEL_DIST_TARX:=tgz}
 
 # @ECLASS-VARIABLE: INTEL_SUBDIR
-# @DEFAULT_UNSET
 # @DESCRIPTION:
-# The package sub-directory where it will end-up in /opt/intel
-# To find out its value, you have to do a raw install from the Intel tar ball
+# The package sub-directory (without version numbers) where it will end-up in /opt/intel
+#
+# e.g. compilers_and_libraries
+#
+# To determine its value, you have to do a raw install from the Intel tarball.
+: ${INTEL_SUBDIR:=compilers_and_libraries}
 
 # @ECLASS-VARIABLE: INTEL_SKIP_LICENSE
 # @DEFAULT_UNSET
@@ -84,9 +93,9 @@ esac
 # e.g. i486
 : ${INTEL_X86:=i486}
 
-# @ECLASS-VARIABLE: INTEL_BIN_RPMS
+# @ECLASS-VARIABLE: INTEL_DIST_BIN_RPMS
 # @DESCRIPTION:
-# Functional name of rpm without any version/arch tag
+# Functional name of rpm without any version/arch tag.
 # Has to be a bash array
 #
 # e.g. ("icc-l-all-devel")
@@ -94,68 +103,95 @@ esac
 # if the rpm is located in a directory other than INTEL_RPMS_DIR you can
 # specify the full path
 #
-# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
-: ${INTEL_BIN_RPMS:=()}
+# e.g. ("CLI_install/rpm/intel-vtune-amplifier-xe-cli")
+[[ ${INTEL_DIST_BIN_RPMS[@]} ]] || INTEL_DIST_BIN_RPMS=()
 
-# @ECLASS-VARIABLE: INTEL_AMD64_RPMS
+# @ECLASS-VARIABLE: INTEL_DIST_AMD64_RPMS
 # @DESCRIPTION:
-# AMD64 single arch rpms. Same syntax as INTEL_BIN_RPMS
-# Has to be a bash array
-: ${INTEL_AMD64_RPMS:=()}
+# AMD64 single arch rpms. Same syntax as INTEL_DIST_BIN_RPMS.
+# Has to be a bash array.
+[[ ${INTEL_DIST_AMD64_RPMS[@]} ]] || INTEL_DIST_AMD64_RPMS=()
 
-# @ECLASS-VARIABLE: INTEL_X86_RPMS
+# @ECLASS-VARIABLE: INTEL_DIST_X86_RPMS
 # @DESCRIPTION:
-# X86 single arch rpms. Same syntax as INTEL_BIN_RPMS
-# Has to be a bash array
-: ${INTEL_X86_RPMS:=()}
+# X86 single arch rpms. Same syntax as INTEL_DIST_BIN_RPMS.
+# Has to be a bash array.
+[[ ${INTEL_DIST_X86_RPMS[@]} ]] || INTEL_DIST_X86_RPMS=()
 
-# @ECLASS-VARIABLE: INTEL_DAT_RPMS
+# @ECLASS-VARIABLE: INTEL_DIST_DAT_RPMS
 # @DESCRIPTION:
 # Functional name of rpm of common data which are arch free
-# without any version tag
-# Has to be a bash array
+# without any version tag. Has to be a bash array.
 #
 # e.g. ("openmp-l-all-devel")
 #
 # if the rpm is located in a directory different to INTEL_RPMS_DIR you can
 # specify the full path
 #
-# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
-: ${INTEL_DAT_RPMS:=()}
+# e.g. ("CLI_install/rpm/intel-vtune-amplifier-xe-cli-common")
+[[ ${INTEL_DIST_DAT_RPMS[@]} ]] || INTEL_DIST_DAT_RPMS=()
 
-# @ECLASS-VARIABLE: INTEL_SINGLE_ARCH
+# @ECLASS-VARIABLE: INTEL_DIST_SPLIT_ARCH
 # @DESCRIPTION:
-# Unset, if only the multilib package will be provided by intel
-: ${INTEL_SINGLE_ARCH:=true}
+# Set to "true" if arches are to be fetched separately, instead of using
+# the combined tarball.
+: ${INTEL_DIST_SPLIT_ARCH:=false}
 
-MULTILIB_COMPAT=( abi_x86_{32,64} )
+# @FUNCTION: _isdp_get-sdp-full-pv
+# @INTERNAL
+# @DESCRIPTION:
+# Gets the full internal Intel version specifier.
+_isdp_get-sdp-full-pv() {
+	local _intel_pv=($(get_version_components))
+	local _intel_pv_full="${_intel_pv[3]}-${_intel_pv[0]}.${_intel_pv[1]}.${_intel_pv[2]}-${_intel_pv[3]}"
+	echo "${_intel_pv_full}"
+}
 
-inherit check-reqs eutils multilib-build versionator
+# @FUNCTION: _isdp_get-sdp-year
+# @INTERNAL
+# @DESCRIPTION:
+# Gets the year component from INTEL_DIST_PV
+_isdp_get-sdp-year() {
+	local _intel_sdp_year
+	_intel_sdp_year=${INTEL_DIST_PV}
+	_intel_sdp_year=${_intel_sdp_year%_sp*}
+	_intel_sdp_year=${_intel_sdp_year%_update*}
+	echo "${_intel_sdp_year}"
+}
 
-_INTEL_PV1=$(get_version_component_range 1)
-_INTEL_PV2=$(get_version_component_range 2)
-_INTEL_PV3=$(get_version_component_range 3)
-_INTEL_PV4=$(get_version_component_range 4)
-_INTEL_PV=""
-[[ -n ${_INTEL_PV4} ]] && _INTEL_PV+="${_INTEL_PV4}-"
-[[ -n ${_INTEL_PV1} ]] && _INTEL_PV+="${_INTEL_PV1}"
-[[ -n ${_INTEL_PV2} ]] && _INTEL_PV+=".${_INTEL_PV2}"
-[[ -n ${_INTEL_PV3} ]] && _INTEL_PV+=".${_INTEL_PV3}"
-[[ -n ${_INTEL_PV4} ]] && _INTEL_PV+="-${_INTEL_PV4}"
+# @FUNCTION: isdp_get-sdp-dir
+# @DESCRIPTION:
+# Gets the full rootless path to the installation directory
+#
+#     e.g. opt/intel/compilers_and_libraries_2016.1.150
+isdp_get-sdp-dir() {
+	local _intel_sdp_dir="opt/intel/${INTEL_SUBDIR}_$(_isdp_get-sdp-year).$(get_version_component_range 3-4)"
+	echo "${_intel_sdp_dir}"
+}
 
-_INTEL_URI="http://registrationcenter-download.intel.com/akdlm/irc_nas/${INTEL_DID}/${INTEL_DPN}"
+# @FUNCTION: isdp_get-sdp-edir
+# @DESCRIPTION:
+# Gets the full rooted/prefixed path to the installation directory
+#
+#     e.g. /opt/intel/compilers_and_libraries_2016.1.150
+isdp_get-sdp-edir() {
+	local _intel_sdp_edir="${EPREFIX%/}/$(isdp_get-sdp-dir)"
+	echo "${_intel_sdp_edir}"
+}
 
-if [ ${INTEL_SINGLE_ARCH} == true ]; then
-	SRC_URI="
-		abi_x86_32? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )
-		abi_x86_64? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} )"
+_INTEL_URI="http://registrationcenter-download.intel.com/akdlm/irc_nas/${INTEL_DIST_SKU}/${INTEL_DIST_NAME}"
+if [[ "${INTEL_DIST_SPLIT_ARCH}" != true ]]; then
+	SRC_URI="${_INTEL_URI}_${INTEL_DIST_PV}.${INTEL_DIST_TARX}"
 else
-	SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}"
+	SRC_URI="
+		abi_x86_32? ( ${_INTEL_URI}_${INTEL_DIST_PV}_ia32.${INTEL_DIST_TARX} )
+		abi_x86_64? ( ${_INTEL_URI}_${INTEL_DIST_PV}_intel64.${INTEL_DIST_TARX} )"
 fi
+unset _INTEL_URI
 
 LICENSE="Intel-SDP"
+# TODO: Proper slotting
 # Future work, #394411
-#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
 SLOT="0"
 
 RESTRICT="mirror"
@@ -163,32 +199,128 @@ RESTRICT="mirror"
 RDEPEND=""
 DEPEND="app-arch/rpm2targz"
 
-_INTEL_SDP_YEAR=${INTEL_DPV}
-_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_sp*}
-_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_update*}
+S="${WORKDIR}"
 
-# @ECLASS-VARIABLE: INTEL_SDP_DIR
+QA_PREBUILT="$(isdp_get-sdp-dir)/*"
+
+# @FUNCTION: isdp_convert2intel-arch
+# @USAGE: <arch>
 # @DESCRIPTION:
-# Full rootless path to installation dir
-INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}_${_INTEL_SDP_YEAR:-${_INTEL_PV1}}"
-[[ -n ${_INTEL_PV3} ]] && INTEL_SDP_DIR+=".${_INTEL_PV3}"
-[[ -n ${_INTEL_PV4} ]] && INTEL_SDP_DIR+=".${_INTEL_PV4}"
+# Convert between portage arch (e.g. amd64, x86) and intel installed arch
+# nomenclature (e.g. intel64, ia32)
+isdp_convert2intel-arch() {
+	debug-print-function ${FUNCNAME} "${@}"
 
-# @ECLASS-VARIABLE: INTEL_SDP_EDIR
+	case $1 in
+		*amd64*|abi_x86_64)
+			echo "intel64"
+			;;
+		*x86*)
+			echo "ia32"
+			;;
+		*)
+			die "Abi \'$1\' is unsupported"
+			;;
+	esac
+}
+
+# @FUNCTION: isdp_get-native-abi-arch
 # @DESCRIPTION:
-# Full rooted path to installation dir
-INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
+# Determine the the intel arch string of the native ABI
+isdp_get-native-abi-arch() {
+	debug-print-function ${FUNCNAME} "${@}"
 
-S="${WORKDIR}"
+	use amd64 && echo "$(isdp_convert2intel-arch abi_x86_64)"
+	use x86 && echo "$(isdp_convert2intel-arch abi_x86_32)"
+}
 
-QA_PREBUILT="${INTEL_SDP_DIR}/*"
+# @FUNCTION: isdp_get-sdp-installed-arches
+# @DESCRIPTION:
+# Returns a space separated list of the arch suffixes used in directory
+# names for enabled ABIs. Intel uses "ia32" for x86 and "intel64" for
+# amd64. The result would be "ia32 intel64" if both ABIs were enabled.
+isdp_get-sdp-installed-arches() {
+	local arch=()
+	use abi_x86_64 && arch+=($(isdp_convert2intel-arch abi_x86_64))
+	use abi_x86_32 && arch+=($(isdp_convert2intel-arch abi_x86_32))
+	echo "${arch[*]}"
+}
 
-# @ECLASS-VARIABLE: INTEL_ARCH
-# @DEFAULT_UNSET
+# @FUNCTION: _isdp_get-sdp-source-rpm-arches
+# @INTERNAL
 # @DESCRIPTION:
-# Intels internal names of the arches; will be set at runtime accordingly
+# Returns a space separated list of the arch suffixes used in the RPM filenames, e.g.
 #
-# e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
+#    intel-openmp-l-all-150-16.0.1-150.i486.rpm
+#    intel-openmp-l-all-150-16.0.1-150.x86_64.rpm
+#
+# the result would consist of "i486 x86_64".
+_isdp_get-sdp-source-rpm-arches() {
+	local arch=()
+	use abi_x86_64 && arch+=("x86_64")
+	use abi_x86_32 && arch+=("${INTEL_X86}")
+	echo "${arch[*]}"
+}
+
+# @FUNCTION: _isdp_generate-list-install-rpms
+# @INTERNAL
+# @DESCRIPTION:
+# Generates the list of fully expanded RPMs to be extracted.
+_isdp_generate-list-install-rpms() {
+	debug-print-function ${FUNCNAME} "${@}" 
+
+	# Expand components into full RPM filenames
+	expand_component_into_full_rpm() {
+		local deref_var="${1}[@]"
+		local arch="${2}"
+		local p a rpm_prefix rpm_suffix expanded_full_rpms=()
+
+		for p in "${!deref_var}"; do
+			for a in ${arch}; do
+				# check if a directory is prefixed
+				if [[ "${p}" == "${p##*/}" ]]; then
+					rpm_prefix="${INTEL_RPMS_DIR}/intel-"
+				else
+					rpm_prefix=""
+				fi
+
+				# check for variables ending in ".rpm"
+				# these are excluded from version expansion, due to Intel's
+				# idiosyncratic versioning scheme beginning with their 2016
+				# suite of tools. For instance
+				#
+				#     intel-ccompxe-2016.1-056.noarch.rpm
+				#
+				# which is completely unpredictable using versions
+				if [[ "${p}" == *.rpm ]]; then
+					rpm_suffix=""
+				else
+					rpm_suffix="-$(_isdp_get-sdp-full-pv).${a}.rpm"
+				fi
+
+				expanded_full_rpms+=( "${rpm_prefix}${p}${rpm_suffix}" )
+			done
+		done
+		echo ${expanded_full_rpms[*]}
+	}
+
+	local vars_to_expand=("INTEL_DIST_BIN_RPMS" "INTEL_DIST_DAT_RPMS")
+	local vars_to_expand_suffixes=("$(_isdp_get-sdp-source-rpm-arches)" "noarch")
+	if use abi_x86_32; then
+		vars_to_expand+=("INTEL_DIST_X86_RPMS")
+		vars_to_expand_suffixes+=("${INTEL_X86}")
+	fi
+	if use abi_x86_64; then
+		vars_to_expand+=("INTEL_DIST_AMD64_RPMS")
+		vars_to_expand_suffixes+=("x86_64")
+	fi
+
+	local i fully_expanded_intel_rpms=()
+	for ((i=0; i<${#vars_to_expand[@]}; i++)); do
+		fully_expanded_intel_rpms+=($(expand_component_into_full_rpm "${vars_to_expand[i]}" "${vars_to_expand_suffixes[i]}"))
+	done
+	echo ${fully_expanded_intel_rpms[*]}
+}
 
 # @FUNCTION: _isdp_big-warning
 # @USAGE: [pre-check | test-failed]
@@ -200,23 +332,21 @@ _isdp_big-warning() {
 
 	case ${1} in
 		pre-check )
-			echo ""
 			ewarn "License file not found!"
 			;;
 
 		test-failed )
-			echo ""
 			ewarn "Function test failed. Most probably due to an invalid license."
 			ewarn "This means you already tried to bypass the license check once."
 			;;
 	esac
 
-	echo ""
+	ewarn
 	ewarn "Make sure you have received an Intel license."
 	ewarn "To receive a non-commercial license, you need to register at:"
 	ewarn "https://software.intel.com/en-us/qualify-for-free-software"
 	ewarn "Install the license file into ${EPREFIX}/opt/intel/licenses"
-	ewarn ""
+	ewarn
 	ewarn "Beginning with the 2016 suite of tools, license files are keyed"
 	ewarn "to the MAC address of the eth0 interface. In order to retrieve"
 	ewarn "a personalized license file, follow the instructions at"
@@ -225,22 +355,20 @@ _isdp_big-warning() {
 	case ${1} in
 		pre-check )
 			ewarn "before proceeding with installation of ${P}"
-			echo ""
 			;;
 		* )
-			echo ""
 			;;
-			esac
+	esac
 }
 
 # @FUNCTION: _isdp_version_test
 # @INTERNAL
 # @DESCRIPTION:
-# Testing for valid license by asking for version information of the compiler
+# Testing for valid license by asking for version information of the compiler.
 _isdp_version_test() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	local comp comp_full arch warn
+	local comp
 	case ${PN} in
 		ifc )
 			debug-print "Testing ifort"
@@ -255,39 +383,39 @@ _isdp_version_test() {
 			;;
 	esac
 
-	for arch in ${INTEL_ARCH}; do
+	local comp_full arch warn
+	for arch in $(isdp_get-sdp-installed-arches); do
 		case ${EBUILD_PHASE} in
 			install )
-				comp_full="${ED}/${INTEL_SDP_DIR}/linux/bin/${arch}/${comp}"
+				comp_full="${ED%/}/$(isdp_get-sdp-dir)/linux/bin/${arch}/${comp}"
 				;;
 			postinst )
-				comp_full="${INTEL_SDP_EDIR}/linux/bin/${arch}/${comp}"
+				comp_full="$(isdp_get-sdp-edir)/linux/bin/${arch}/${comp}"
 				;;
 			* )
-				ewarn "Compile test not supported in ${EBUILD_PHASE}"
-				continue
+				die "Compile test not supported in ${EBUILD_PHASE}"
 				;;
 		esac
 
-		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/linux/bin/${arch}/\" \"${comp_full}\" -V"
+		debug-print "LD_LIBRARY_PATH=\"$(isdp_get-sdp-edir)/linux/bin/${arch}/\" \"${comp_full}\" -V"
 
-		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/linux/bin/${arch}/" "${comp_full}" -V &>/dev/null
-		[[ $? -ne 0 ]] && warn=yes
+		LD_LIBRARY_PATH="$(isdp_get-sdp-edir)/linux/bin/${arch}/" "${comp_full}" -V &>/dev/null || warn=yes
 	done
-	[[ "${warn}" == "yes" ]] && _isdp_big-warning test-failed
+	[[ ${warn} == yes ]] && _isdp_big-warning test-failed
 }
 
 # @FUNCTION: _isdp_run-test
 # @INTERNAL
 # @DESCRIPTION:
-# Test if installed compiler is working
+# Test if installed compiler is working.
 _isdp_run-test() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
 		case ${PN} in
 			ifc | icc )
-				_isdp_version_test ;;
+				_isdp_version_test
+				;;
 			* )
 				debug-print "No test available for ${PN}"
 				;;
@@ -295,33 +423,13 @@ _isdp_run-test() {
 	fi
 }
 
-# @FUNCTION: convert2intel_arch
-# @USAGE: <arch>
-# @DESCRIPTION:
-# Convert between portage arch (e.g. amd64, x86) and intel arch
-# nomenclature (e.g. intel64, ia32)
-convert2intel_arch() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	case $1 in
-		amd64|abi_x86_64|*amd64*)
-			echo "intel64"
-			;;
-		x86|abi_x86_32|*x86*)
-			echo "ia32"
-			;;
-		*)
-			die "Abi \'$1\' is unsupported"
-			;;
-	esac
-}
-
 # @FUNCTION: intel-sdp-r1_pkg_pretend
 # @DESCRIPTION:
-# @CODE
-# * Check that the user has a (valid) license file before going on.
-# * Check for space requirements being fullfilled
-# @CODE
+#
+# * Check for a (valid) license before proceeding.
+#
+# * Check for space requirements being fulfilled.
+#
 intel-sdp-r1_pkg_pretend() {
 	debug-print-function ${FUNCNAME} "${@}"
 
@@ -331,7 +439,7 @@ intel-sdp-r1_pkg_pretend() {
 	check-reqs_pkg_pretend
 
 	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
-		if echo ${INTEL_LICENSE_FILE} | grep -q @; then
+		if [[ ${INTEL_LICENSE_FILE} == *@* ]]; then
 			einfo "Looks like you are using following license server:"
 			einfo "   ${INTEL_LICENSE_FILE}"
 			return 0
@@ -339,20 +447,15 @@ intel-sdp-r1_pkg_pretend() {
 
 		dirs=(
 			"${EPREFIX}/opt/intel/licenses"
-			"${INTEL_SDP_EDIR}/licenses"
-			"${INTEL_SDP_EDIR}/Licenses"
+			"$(isdp_get-sdp-edir)/licenses"
+			"$(isdp_get-sdp-edir)/Licenses"
 			)
 		for dir in "${dirs[@]}" ; do
 			ebegin "Checking for a license in: ${dir}"
-			#maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]]
-			[[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$?
-			eend ${ret}
-			if [[ ${ret} == "0" ]]; then
-				warn=${ret}
-				break
-			fi
+			path_exists "${dir}"/*lic && warn=0
+			eend ${warn} && break
 		done
-		if [[ ${warn} == "1" ]]; then
+		if [[ ${warn} == 1 ]]; then
 			_isdp_big-warning pre-check
 			die "Could not find license file"
 		fi
@@ -362,127 +465,29 @@ intel-sdp-r1_pkg_pretend() {
 	fi
 }
 
-# @FUNCTION: intel-sdp-r1_pkg_setup
-# @DESCRIPTION:
-# Setting up and sorting some internal variables
-intel-sdp-r1_pkg_setup() {
-	debug-print-function ${FUNCNAME} "${@}"
-	local arch a p
-
-	INTEL_ARCH=""
-
-	if use abi_x86_64; then
-		arch+=" x86_64"
-		INTEL_ARCH+=" intel64"
-	fi
-	if use abi_x86_32; then
-		arch+=" ${INTEL_X86}"
-		INTEL_ARCH+=" ia32"
-	fi
-	INTEL_RPMS=()
-	INTEL_RPMS_FULL=()
-
-	for p in "${INTEL_BIN_RPMS[@]}"; do
-		for a in ${arch}; do
-			if [ ${p} == $(basename ${p}) ]; then
-				# check for variables ending in ".rpm"
-				# these are excluded from version expansion, due to Intel's
-				# idiosyncratic versioning scheme beginning with their 2016
-				# suite of tools.
-				if [[ "${p}" == *.rpm ]]; then
-					INTEL_RPMS+=( intel-${p} )
-				else
-					INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${a}.rpm )
-				fi
-			else
-				if [[ "${p}" == *.rpm ]]; then
-					INTEL_RPMS_FULL+=( ${p} )
-				else
-					INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${a}.rpm )
-				fi
-			fi
-		done
-	done
-
-	if use amd64; then
-		for p in "${INTEL_AMD64_RPMS[@]}"; do
-			if [ ${p} == $(basename ${p}) ]; then
-				if [[ "${p}" == *.rpm ]]; then
-					INTEL_RPMS+=( intel-${p} )
-				else
-					INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.x86_64.rpm )
-				fi
-			else
-				if [[ "${p}" == *.rpm ]]; then
-					INTEL_RPMS_FULL+=( ${p} )
-				else
-					INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.x86_64.rpm )
-				fi
-			fi
-		done
-	fi
-
-	for p in "${INTEL_X86_RPMS[@]}"; do
-		if [ ${p} == $(basename ${p}) ]; then
-			if [[ "${p}" == *.rpm ]]; then
-				INTEL_RPMS+=( intel-${p} )
-			else
-				INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${INTEL_X86}.rpm )
-			fi
-		else
-			if [[ "${p}" == *.rpm ]]; then
-				INTEL_RPMS_FULL+=( ${p} )
-			else
-				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${INTEL_X86}.rpm )
-			fi
-		fi
-	done
-
-	for p in "${INTEL_DAT_RPMS[@]}"; do
-		if [ ${p} == $(basename ${p}) ]; then
-			if [[ "${p}" == *.rpm ]]; then
-				INTEL_RPMS+=( intel-${p} )
-			else
-				INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.noarch.rpm )
-			fi
-		else
-			if [[ "${p}" == *.rpm ]]; then
-				INTEL_RPMS_FULL+=( ${p} )
-			else
-				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.noarch.rpm )
-			fi
-		fi
-	done
-}
-
 # @FUNCTION: intel-sdp-r1_src_unpack
 # @DESCRIPTION:
 # Unpacking necessary rpms from tarball, extract them and rearrange the output.
 intel-sdp-r1_src_unpack() {
-	local l r subdir rb t list=() debug_list
-
+	local t
 	for t in ${A}; do
-		for r in "${INTEL_RPMS[@]}"; do
-			rpmdir=${t%%.*}/${INTEL_RPMS_DIR}
-			list+=( ${rpmdir}/${r} )
-		done
-
-		for r in "${INTEL_RPMS_FULL[@]}"; do
+		local r list=() source_rpms=($(_isdp_generate-list-install-rpms))
+		for r in "${source_rpms[@]}"; do
 			list+=( ${t%%.*}/${r} )
 		done
 
+		local debug_list
 		debug_list="$(IFS=$'\n'; echo ${list[@]} )"
 
 		debug-print "Adding to decompression list:"
 		debug-print ${debug_list}
 
-		tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log
+		tar -xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log
 
 		for r in ${list[@]}; do
-			rb=$(basename ${r})
-			einfo "Unpacking ${rb}"
-			rpm2tar -O ${r} | tar xvf - | sed -e \
-				"s:^\.:${EROOT#/}:g" > /dev/null; assert "unpacking ${r} failed"
+			einfo "Unpacking ${r}"
+			printf "\nUnpacking %s\n" "${r}" >> "${T}"/rpm-extraction.log
+			rpm2tar -O ${r} | tar -xvf - &>> "${T}"/rpm-extraction.log; assert "Unpacking ${r} failed"
 		done
 	done
 }
@@ -493,61 +498,86 @@ intel-sdp-r1_src_unpack() {
 intel-sdp-r1_src_install() {
 	debug-print-function ${FUNCNAME} "${@}"
 
+	local i
 	# remove uninstall information
-	if path_exists opt/intel/"${INTEL_DPN}"*/uninstall; then
-		ebegin "Cleaning out uninstall"
-		rm -r opt/intel/"${INTEL_DPN}"*/uninstall || die
+	ebegin "Cleaning out uninstall"
+	while IFS='\n' read -r -d '' i; do
+		rm -r "${i}" || die
+	done < <(find opt -regextype posix-extended -regex '.*(uninstall|uninstall.sh)$' -print0)
+	eend
+
+	# remove remaining japanese stuff
+	if ! use linguas_ja; then
+		ebegin "Cleaning out japanese language directories"
+		while IFS='\n' read -r -d '' i; do
+			rm -r "${i}" || die
+		done < <(find opt -type d -regextype posix-extended -regex '.*(ja|ja_JP)$' -print0)
 		eend
 	fi
 
 	# handle documentation
-	if path_exists "opt/intel/documentation_${_INTEL_SDP_YEAR}"; then
-		if path_exists "opt/intel/documentation_${_INTEL_SDP_YEAR}/en/man/common/man1"; then
-			doman opt/intel/documentation_"${_INTEL_SDP_YEAR}"/en/man/common/man1/*
-			rm -r opt/intel/documentation_"${_INTEL_SDP_YEAR}"/en/man || die
+	if path_exists "opt/intel/documentation_$(_isdp_get-sdp-year)"; then
+		# normal man pages
+		if path_exists "opt/intel/documentation_$(_isdp_get-sdp-year)/en/man/common/man1"; then
+			doman opt/intel/documentation_"$(_isdp_get-sdp-year)"/en/man/common/man1/*
+			rm -r opt/intel/documentation_"$(_isdp_get-sdp-year)"/en/man || die
 		fi
 
-		if use doc; then
-			if ! use linguas_ja; then
-				rm -r opt/intel/documentation_"${_INTEL_SDP_YEAR}"/ja || die
-			fi
-			dodoc -r opt/intel/documentation_"${_INTEL_SDP_YEAR}"/*
-		fi
+		use doc && dodoc -r opt/intel/documentation_"$(_isdp_get-sdp-year)"/*
 
 		ebegin "Cleaning out documentation"
-		rm -r "opt/intel/documentation_${_INTEL_SDP_YEAR}" || die
-		rm "${INTEL_SDP_DIR}"/linux/{documentation,man} || die
+		rm -r "opt/intel/documentation_$(_isdp_get-sdp-year)" || die
+		rm -rf "$(isdp_get-sdp-dir)"/linux/{documentation,man} || die
 		eend
 	fi
 
+	# MPI man pages
+	if path_exists "$(isdp_get-sdp-dir)/linux/mpi/man/man3"; then
+		doman "$(isdp_get-sdp-dir)"/linux/mpi/man/man3/*
+		rm -r "$(isdp_get-sdp-dir)"/linux/mpi/man || die
+	fi
+
+	# licensing docs
+	if path_exists "$(isdp_get-sdp-dir)/licensing/documentation"; then
+		dodoc -r "$(isdp_get-sdp-dir)/licensing/documentation"/*
+		rm -rf "$(isdp_get-sdp-dir)/licensing/documentation" || die
+	fi
+
+	if path_exists opt/intel/"${INTEL_DIST_NAME}"*/licensing; then
+		dodoc -r opt/intel/"${INTEL_DIST_NAME}"*/licensing
+		rm -rf opt/intel/"${INTEL_DIST_NAME}"* || die
+	fi
+
 	# handle examples
-	if path_exists "opt/intel/samples_${_INTEL_SDP_YEAR}"; then
-		if use examples; then
-			if ! use linguas_ja; then
-				rm -r opt/intel/samples_"${_INTEL_SDP_YEAR}"/ja || die
-			fi
-			dodoc -r opt/intel/samples_"${_INTEL_SDP_YEAR}"/*
-		fi
+	if path_exists "opt/intel/samples_$(_isdp_get-sdp-year)"; then
+		use examples && dodoc -r opt/intel/samples_"$(_isdp_get-sdp-year)"/*
 
 		ebegin "Cleaning out examples"
-		rm -r "opt/intel/samples_${_INTEL_SDP_YEAR}" || die
+		rm -r "opt/intel/samples_$(_isdp_get-sdp-year)" || die
 		eend
 	fi
 
-	# remove eclipse
+	# remove eclipse unconditionally
+	ebegin "Cleaning out eclipse files"
 	rm -rf opt/intel/ide_support_* || die
+	eend
 
+	# repair shell scripts used for sourcing PATH (iccvars.sh and such)
 	ebegin "Tagging ${PN}"
 	find opt -name \*sh -type f -exec sed -i \
-		-e "s:<.*DIR>:${INTEL_SDP_EDIR}/linux:g" \
+		-e "s:<.*DIR>:$(isdp_get-sdp-edir)/linux:g" \
 		'{}' + || die
 	eend
 
-	[[ -d "${ED}" ]] || dodir /
-	mv opt "${ED}"/ || die "moving files failed"
+	ebegin "Removing broken symlinks"
+	while IFS='\n' read -r -d '' i; do
+		rm "${i}" || die
+	done < <(find opt -xtype l -print0)
+	eend
+
+	mv opt "${ED%/}"/ || die "moving files failed"
 
-	dodir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
-	keepdir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
+	keepdir "$(isdp_get-sdp-dir)"/licenses /opt/intel/ism/rm
 }
 
 # @FUNCTION: intel-sdp-r1_pkg_postinst
@@ -580,7 +610,5 @@ intel-sdp-r1_pkg_postrm() {
 	fi
 }
 
-EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend
-
 _INTEL_SDP_R1_ECLASS_=1
 fi


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-02-22 13:25 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2016-02-22 13:25 UTC (permalink / raw
  To: gentoo-commits

commit:     f81cca8a201167e53b218617b479986d7e96cfa8
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 22 12:22:32 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 12:22:32 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=f81cca8a

intel-sdp-r1.eclass: Handle shorter versioning

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/intel-sdp-r1.eclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/eclass/intel-sdp-r1.eclass b/eclass/intel-sdp-r1.eclass
index 2f06ed3..e1ad96d 100644
--- a/eclass/intel-sdp-r1.eclass
+++ b/eclass/intel-sdp-r1.eclass
@@ -143,7 +143,14 @@ esac
 # Gets the full internal Intel version specifier.
 _isdp_get-sdp-full-pv() {
 	local _intel_pv=($(get_version_components))
-	local _intel_pv_full="${_intel_pv[3]}-${_intel_pv[0]}.${_intel_pv[1]}.${_intel_pv[2]}-${_intel_pv[3]}"
+	case ${#_intel_pv[@]} in
+		3)
+			local _intel_pv_full="${_intel_pv[0]}.${_intel_pv[1]}-${_intel_pv[2]}"
+			;;
+		4)
+			local _intel_pv_full="${_intel_pv[3]}-${_intel_pv[0]}.${_intel_pv[1]}.${_intel_pv[2]}-${_intel_pv[3]}"
+			;;
+	esac
 	echo "${_intel_pv_full}"
 }
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-07-31 21:13 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2016-07-31 21:13 UTC (permalink / raw
  To: gentoo-commits

commit:     96d476f065fffde937a6d45f1b2328dc5078a706
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 31 21:11:56 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Jul 31 21:13:09 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=96d476f0

Raise min req for eselect

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index a559195..b29b704 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -31,7 +31,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4.5-r103"
+DEPEND=">=app-admin/eselect-1.4.6-r100"
 RDEPEND="${DEPEND}
 	!app-eselect/eselect-blas
 	!app-eselect/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-08-29 20:45 Justin Bronder
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Bronder @ 2016-08-29 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     8a4ee23dab12892aa93bbb9b3b66ff5763771547
Author:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 27 00:37:45 2016 +0000
Commit:     Justin Bronder <jsbronder <AT> gentoo <DOT> org>
CommitDate: Mon Aug 29 16:47:03 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=8a4ee23d

mpi.eclass: block multilib mpi from gx86 (bug #519700)

 eclass/mpi.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index b7ace33..3c20101 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -56,6 +56,9 @@ mpi_classed() {
 	[[ ${CATEGORY} == mpi-* ]]
 }
 
+#empi has no support for multilib yet
+mpi_classed && [[ ${_MULTILIB_BUILD} ]] && REQUIRED_USE="abi_x86_64? ( !abi_x86_32 )"
+
 # @FUNCTION: mpi_class
 # @RETURN: The name of the current class, or nothing if unclassed.
 mpi_class() {


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2016-12-10 10:51 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2016-12-10 10:51 UTC (permalink / raw
  To: gentoo-commits

commit:     23bf554f66cffae166a4d32a8b6bc5ea8edae166
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 10:51:18 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 10:51:18 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=23bf554f

Bump to latest eselect

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 64b5c8b..3ba1250 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -31,7 +31,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4.7-r100"
+DEPEND=">=app-admin/eselect-1.4.8-r100"
 RDEPEND="${DEPEND}
 	!app-eselect/eselect-blas
 	!app-eselect/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2017-02-24 13:59 Marius Brehler
  0 siblings, 0 replies; 169+ messages in thread
From: Marius Brehler @ 2017-02-24 13:59 UTC (permalink / raw
  To: gentoo-commits

commit:     1c70956ce252680df94134953d0c4dae97223cc9
Author:     Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
AuthorDate: Fri Feb 24 13:56:25 2017 +0000
Commit:     Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
CommitDate: Fri Feb 24 13:56:25 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=1c70956c

depend.php.eclass: Import from main tree, required by ganglia_jobmonarch

Import from:
https://raw.githubusercontent.com/gentoo/gentoo/93a324d308b208d1ae629da846f2d89571a74355/eclass/depend.php.eclass

Was dropped with commit:
https://github.com/gentoo/gentoo/commit/e2d9f131cef171702b7427629a801ad46801bfac

 eclass/depend.php.eclass | 258 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 258 insertions(+)

diff --git a/eclass/depend.php.eclass b/eclass/depend.php.eclass
new file mode 100644
index 000000000..c29cda22c
--- /dev/null
+++ b/eclass/depend.php.eclass
@@ -0,0 +1,258 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @DEAD
+# @ECLASS: depend.php.eclass
+# @MAINTAINER:
+# Gentoo PHP team <php-bugs@gentoo.org>
+# @AUTHOR:
+# Author: Stuart Herbert <stuart@gentoo.org>
+# Author: Luca Longinotti <chtekk@gentoo.org>
+# Author: Jakub Moc <jakub@gentoo.org> (documentation)
+# @BLURB: Functions to allow ebuilds to depend on php5 and check for specific features.
+# @DESCRIPTION:
+# This eclass provides functions that allow ebuilds to depend on php5 and check
+# for specific PHP features, SAPIs etc. Also provides dodoc-php wrapper to install
+# documentation for PHP packages to php-specific location.
+# This eclass is deprecated and is set to be removed 30 days after bug 552836 is resolved
+
+inherit eutils multilib
+
+# PHP5-only depend functions
+
+# @FUNCTION: need_php5
+# @DESCRIPTION:
+# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5
+# (with any SAPI).
+need_php5() {
+	DEPEND="${DEPEND} =dev-lang/php-5*"
+	RDEPEND="${RDEPEND} =dev-lang/php-5*"
+	PHP_VERSION="5"
+	PHP_SHARED_CAT="php5"
+}
+
+# common settings go in here
+uses_php5() {
+	# cache this
+	libdir=$(get_libdir)
+
+	PHPIZE="/usr/${libdir}/php5/bin/phpize"
+	PHPCONFIG="/usr/${libdir}/php5/bin/php-config"
+	PHPCLI="/usr/${libdir}/php5/bin/php"
+	PHPCGI="/usr/${libdir}/php5/bin/php-cgi"
+	PHP_PKG="$(best_version =dev-lang/php-5*)"
+	PHPPREFIX="/usr/${libdir}/php5"
+	EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)"
+
+	einfo
+	einfo "Using ${PHP_PKG}"
+	einfo
+}
+
+# general PHP depend functions
+
+# @FUNCTION: need_php_httpd
+# @DESCRIPTION:
+# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP
+# (any version) with either cgi or apache2 SAPI.
+need_php_httpd() {
+	DEPEND="${DEPEND} virtual/httpd-php"
+	RDEPEND="${RDEPEND} virtual/httpd-php"
+}
+
+# @FUNCTION: need_php
+# @DESCRIPTION:
+# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP
+# (any version with any SAPI).
+need_php() {
+	DEPEND="${DEPEND} dev-lang/php"
+	RDEPEND="${RDEPEND} dev-lang/php"
+	PHP_SHARED_CAT="php"
+}
+
+# @FUNCTION: has_php
+# @DESCRIPTION:
+# Call this function from your pkg_setup, src_compile, src_install etc. if you
+# need to know which PHP version is being used and where the PHP binaries/data
+# are installed.
+has_php() {
+	# Detect which PHP version we have installed
+	if has_version '=dev-lang/php-5*' ; then
+		PHP_VERSION="5"
+	else
+		die "Unable to find an installed dev-lang/php package"
+	fi
+
+	# If we get here, then PHP_VERSION tells us which version of PHP we
+	# want to use
+	uses_php${PHP_VERSION}
+}
+
+# @FUNCTION: require_php_with_use
+# @USAGE: <list of USE flags>
+# @DESCRIPTION:
+# Call this function from pkg_setup if your package requires PHP compiled
+# with specific USE flags. Returns if all of the listed USE flags are enabled.
+# Dies if any of the listed USE flags are disabled.
+
+# @VARIABLE: PHPCHECKNODIE
+# @DESCRIPTION:
+# You can set PHPCHECKNODIE to non-empty value in your ebuild to chain multiple
+# require_php_with_(any)_use checks without making the ebuild die on every failure.
+# This is useful in cases when certain PHP features are only required if specific
+# USE flag(s) are enabled for that ebuild.
+# @CODE
+# Example:
+#
+# local flags="pcre session snmp sockets wddx"
+# use mysql && flags="${flags} mysql"
+# use postgres && flags="${flags} postgres"
+# if ! PHPCHECKNODIE="yes" require_php_with_use ${flags} \
+#	|| ! PHPCHECKNODIE="yes" require_php_with_any_use gd gd-external ; then
+#	die "Re-install ${PHP_PKG} with ${flags} and either gd or gd-external"
+# fi
+# @CODE
+require_php_with_use() {
+	has_php
+
+	local missing_use=""
+	local x
+
+	einfo "Checking for required PHP feature(s) ..."
+
+	for x in $@ ; do
+		case $x in
+			pcre|spl|reflection|mhash)
+				eqawarn "require_php_with_use MUST NOT check for the pcre, spl, mhash or reflection USE flag."
+				eqawarn "These USE flags are removed from >=dev-lang/php-5.3 and your ebuild will break"
+				eqawarn "if you check the USE flags against PHP 5.3 ebuilds."
+				eqawarn "Please use USE dependencies from EAPI 2 instead"
+				;;
+		esac
+
+		if ! built_with_use =${PHP_PKG} ${x} ; then
+			einfo "  Discovered missing USE flag: ${x}"
+			missing_use="${missing_use} ${x}"
+		fi
+	done
+
+	if [[ -z "${missing_use}" ]] ; then
+		if [[ -z "${PHPCHECKNODIE}" ]] ; then
+			return
+		else
+			return 0
+		fi
+	fi
+
+	if [[ -z "${PHPCHECKNODIE}" ]] ; then
+		eerror
+		eerror "${PHP_PKG} needs to be re-installed with all of the following"
+		eerror "USE flags enabled:"
+		eerror
+		eerror "  $@"
+		eerror
+		die "Missing PHP USE flags found"
+	else
+		return 1
+	fi
+}
+
+
+# ========================================================================
+# require_*() functions
+#
+# These functions die() if PHP was built without the required features
+# ========================================================================
+
+# @FUNCTION: require_php_cgi
+# @DESCRIPTION:
+# Determines which installed PHP version has the CGI SAPI enabled.
+# Useful for anything which needs to run PHP scripts depending on the CGI SAPI.
+# @RETURN: die if feature is missing
+require_php_cgi() {
+	# If PHP_PKG is set, then we have remembered our PHP settings
+	# from last time
+	if [[ -n ${PHP_PKG} ]] ; then
+		return
+	fi
+
+	local PHP_PACKAGE_FOUND=""
+
+	if has_version '=dev-lang/php-5*' ; then
+		PHP_PACKAGE_FOUND="1"
+		pkg="$(best_version '=dev-lang/php-5*')"
+		if built_with_use =${pkg} cgi ; then
+			PHP_VERSION="5"
+		fi
+	fi
+
+	if [[ -z ${PHP_PACKAGE_FOUND} ]] ; then
+		die "Unable to find an installed dev-lang/php package"
+	fi
+
+	if [[ -z ${PHP_VERSION} ]] ; then
+		die "No PHP CGI installed. Re-emerge dev-lang/php with USE=cgi."
+	fi
+
+	# If we get here, then PHP_VERSION tells us which version of PHP we
+	# want to use
+	uses_php${PHP_VERSION}
+}
+
+# ========================================================================
+# Misc functions
+#
+# These functions provide miscellaneous checks and functionality.
+# ========================================================================
+
+# @FUNCTION: dodoc-php
+# @USAGE: <list of docs>
+# @DESCRIPTION:
+# Alternative to dodoc function for use in our PHP eclasses and ebuilds.
+# Stored here because depend.php gets always sourced everywhere in the PHP
+# ebuilds and eclasses. It simply is dodoc with a changed path to the docs.
+# NOTE: No support for docinto is provided!
+dodoc-php() {
+if [[ $# -lt 1 ]] ; then
+	echo "$0: at least one argument needed" 1>&2
+	exit 1
+fi
+
+phpdocdir="/usr/share/doc/${CATEGORY}/${PF}/"
+
+for x in $@ ; do
+	if [[ -s "${x}" ]] ; then
+		insinto "${phpdocdir}"
+		doins "${x}"
+		gzip -f -9 "${D}/${phpdocdir}/${x##*/}"
+	elif [[ ! -e "${x}" ]] ; then
+		echo "dodoc-php: ${x} does not exist" 1>&2
+	fi
+done
+}
+
+# @FUNCTION: dohtml-php
+# @USAGE: <list of html docs>
+# @DESCRIPTION:
+# Alternative to dohtml function for use in our PHP eclasses and ebuilds.
+# Stored here because depend.php gets always sourced everywhere in the PHP
+# ebuilds and eclasses. It simply is dohtml with a changed path to the docs.
+# NOTE: No support for [-a|-A|-p|-x] options is provided!
+dohtml-php() {
+if [[ $# -lt 1 ]] ; then
+	echo "$0: at least one argument needed" 1>&2
+	exit 1
+fi
+
+phphtmldir="/usr/share/doc/${CATEGORY}/${PF}/html"
+
+for x in $@ ; do
+	if [[ -s "${x}" ]] ; then
+		insinto "${phphtmldir}"
+		doins "${x}"
+	elif [[ ! -e "${x}" ]] ; then
+		echo "dohtml-php: ${x} does not exist" 1>&2
+	fi
+done
+}


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2017-02-24 14:14 Marius Brehler
  0 siblings, 0 replies; 169+ messages in thread
From: Marius Brehler @ 2017-02-24 14:14 UTC (permalink / raw
  To: gentoo-commits

commit:     2e0e40872ac17823e19daeb038e53699a287c200
Author:     Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
AuthorDate: Fri Feb 24 14:13:01 2017 +0000
Commit:     Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
CommitDate: Fri Feb 24 14:13:01 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=2e0e4087

Revert "depend.php.eclass: Import from main tree, required by ganglia_jobmonarch"

This reverts commit 1c70956ce252680df94134953d0c4dae97223cc9.

 eclass/depend.php.eclass | 258 -----------------------------------------------
 1 file changed, 258 deletions(-)

diff --git a/eclass/depend.php.eclass b/eclass/depend.php.eclass
deleted file mode 100644
index c29cda22c..000000000
--- a/eclass/depend.php.eclass
+++ /dev/null
@@ -1,258 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# @DEAD
-# @ECLASS: depend.php.eclass
-# @MAINTAINER:
-# Gentoo PHP team <php-bugs@gentoo.org>
-# @AUTHOR:
-# Author: Stuart Herbert <stuart@gentoo.org>
-# Author: Luca Longinotti <chtekk@gentoo.org>
-# Author: Jakub Moc <jakub@gentoo.org> (documentation)
-# @BLURB: Functions to allow ebuilds to depend on php5 and check for specific features.
-# @DESCRIPTION:
-# This eclass provides functions that allow ebuilds to depend on php5 and check
-# for specific PHP features, SAPIs etc. Also provides dodoc-php wrapper to install
-# documentation for PHP packages to php-specific location.
-# This eclass is deprecated and is set to be removed 30 days after bug 552836 is resolved
-
-inherit eutils multilib
-
-# PHP5-only depend functions
-
-# @FUNCTION: need_php5
-# @DESCRIPTION:
-# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5
-# (with any SAPI).
-need_php5() {
-	DEPEND="${DEPEND} =dev-lang/php-5*"
-	RDEPEND="${RDEPEND} =dev-lang/php-5*"
-	PHP_VERSION="5"
-	PHP_SHARED_CAT="php5"
-}
-
-# common settings go in here
-uses_php5() {
-	# cache this
-	libdir=$(get_libdir)
-
-	PHPIZE="/usr/${libdir}/php5/bin/phpize"
-	PHPCONFIG="/usr/${libdir}/php5/bin/php-config"
-	PHPCLI="/usr/${libdir}/php5/bin/php"
-	PHPCGI="/usr/${libdir}/php5/bin/php-cgi"
-	PHP_PKG="$(best_version =dev-lang/php-5*)"
-	PHPPREFIX="/usr/${libdir}/php5"
-	EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)"
-
-	einfo
-	einfo "Using ${PHP_PKG}"
-	einfo
-}
-
-# general PHP depend functions
-
-# @FUNCTION: need_php_httpd
-# @DESCRIPTION:
-# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP
-# (any version) with either cgi or apache2 SAPI.
-need_php_httpd() {
-	DEPEND="${DEPEND} virtual/httpd-php"
-	RDEPEND="${RDEPEND} virtual/httpd-php"
-}
-
-# @FUNCTION: need_php
-# @DESCRIPTION:
-# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP
-# (any version with any SAPI).
-need_php() {
-	DEPEND="${DEPEND} dev-lang/php"
-	RDEPEND="${RDEPEND} dev-lang/php"
-	PHP_SHARED_CAT="php"
-}
-
-# @FUNCTION: has_php
-# @DESCRIPTION:
-# Call this function from your pkg_setup, src_compile, src_install etc. if you
-# need to know which PHP version is being used and where the PHP binaries/data
-# are installed.
-has_php() {
-	# Detect which PHP version we have installed
-	if has_version '=dev-lang/php-5*' ; then
-		PHP_VERSION="5"
-	else
-		die "Unable to find an installed dev-lang/php package"
-	fi
-
-	# If we get here, then PHP_VERSION tells us which version of PHP we
-	# want to use
-	uses_php${PHP_VERSION}
-}
-
-# @FUNCTION: require_php_with_use
-# @USAGE: <list of USE flags>
-# @DESCRIPTION:
-# Call this function from pkg_setup if your package requires PHP compiled
-# with specific USE flags. Returns if all of the listed USE flags are enabled.
-# Dies if any of the listed USE flags are disabled.
-
-# @VARIABLE: PHPCHECKNODIE
-# @DESCRIPTION:
-# You can set PHPCHECKNODIE to non-empty value in your ebuild to chain multiple
-# require_php_with_(any)_use checks without making the ebuild die on every failure.
-# This is useful in cases when certain PHP features are only required if specific
-# USE flag(s) are enabled for that ebuild.
-# @CODE
-# Example:
-#
-# local flags="pcre session snmp sockets wddx"
-# use mysql && flags="${flags} mysql"
-# use postgres && flags="${flags} postgres"
-# if ! PHPCHECKNODIE="yes" require_php_with_use ${flags} \
-#	|| ! PHPCHECKNODIE="yes" require_php_with_any_use gd gd-external ; then
-#	die "Re-install ${PHP_PKG} with ${flags} and either gd or gd-external"
-# fi
-# @CODE
-require_php_with_use() {
-	has_php
-
-	local missing_use=""
-	local x
-
-	einfo "Checking for required PHP feature(s) ..."
-
-	for x in $@ ; do
-		case $x in
-			pcre|spl|reflection|mhash)
-				eqawarn "require_php_with_use MUST NOT check for the pcre, spl, mhash or reflection USE flag."
-				eqawarn "These USE flags are removed from >=dev-lang/php-5.3 and your ebuild will break"
-				eqawarn "if you check the USE flags against PHP 5.3 ebuilds."
-				eqawarn "Please use USE dependencies from EAPI 2 instead"
-				;;
-		esac
-
-		if ! built_with_use =${PHP_PKG} ${x} ; then
-			einfo "  Discovered missing USE flag: ${x}"
-			missing_use="${missing_use} ${x}"
-		fi
-	done
-
-	if [[ -z "${missing_use}" ]] ; then
-		if [[ -z "${PHPCHECKNODIE}" ]] ; then
-			return
-		else
-			return 0
-		fi
-	fi
-
-	if [[ -z "${PHPCHECKNODIE}" ]] ; then
-		eerror
-		eerror "${PHP_PKG} needs to be re-installed with all of the following"
-		eerror "USE flags enabled:"
-		eerror
-		eerror "  $@"
-		eerror
-		die "Missing PHP USE flags found"
-	else
-		return 1
-	fi
-}
-
-
-# ========================================================================
-# require_*() functions
-#
-# These functions die() if PHP was built without the required features
-# ========================================================================
-
-# @FUNCTION: require_php_cgi
-# @DESCRIPTION:
-# Determines which installed PHP version has the CGI SAPI enabled.
-# Useful for anything which needs to run PHP scripts depending on the CGI SAPI.
-# @RETURN: die if feature is missing
-require_php_cgi() {
-	# If PHP_PKG is set, then we have remembered our PHP settings
-	# from last time
-	if [[ -n ${PHP_PKG} ]] ; then
-		return
-	fi
-
-	local PHP_PACKAGE_FOUND=""
-
-	if has_version '=dev-lang/php-5*' ; then
-		PHP_PACKAGE_FOUND="1"
-		pkg="$(best_version '=dev-lang/php-5*')"
-		if built_with_use =${pkg} cgi ; then
-			PHP_VERSION="5"
-		fi
-	fi
-
-	if [[ -z ${PHP_PACKAGE_FOUND} ]] ; then
-		die "Unable to find an installed dev-lang/php package"
-	fi
-
-	if [[ -z ${PHP_VERSION} ]] ; then
-		die "No PHP CGI installed. Re-emerge dev-lang/php with USE=cgi."
-	fi
-
-	# If we get here, then PHP_VERSION tells us which version of PHP we
-	# want to use
-	uses_php${PHP_VERSION}
-}
-
-# ========================================================================
-# Misc functions
-#
-# These functions provide miscellaneous checks and functionality.
-# ========================================================================
-
-# @FUNCTION: dodoc-php
-# @USAGE: <list of docs>
-# @DESCRIPTION:
-# Alternative to dodoc function for use in our PHP eclasses and ebuilds.
-# Stored here because depend.php gets always sourced everywhere in the PHP
-# ebuilds and eclasses. It simply is dodoc with a changed path to the docs.
-# NOTE: No support for docinto is provided!
-dodoc-php() {
-if [[ $# -lt 1 ]] ; then
-	echo "$0: at least one argument needed" 1>&2
-	exit 1
-fi
-
-phpdocdir="/usr/share/doc/${CATEGORY}/${PF}/"
-
-for x in $@ ; do
-	if [[ -s "${x}" ]] ; then
-		insinto "${phpdocdir}"
-		doins "${x}"
-		gzip -f -9 "${D}/${phpdocdir}/${x##*/}"
-	elif [[ ! -e "${x}" ]] ; then
-		echo "dodoc-php: ${x} does not exist" 1>&2
-	fi
-done
-}
-
-# @FUNCTION: dohtml-php
-# @USAGE: <list of html docs>
-# @DESCRIPTION:
-# Alternative to dohtml function for use in our PHP eclasses and ebuilds.
-# Stored here because depend.php gets always sourced everywhere in the PHP
-# ebuilds and eclasses. It simply is dohtml with a changed path to the docs.
-# NOTE: No support for [-a|-A|-p|-x] options is provided!
-dohtml-php() {
-if [[ $# -lt 1 ]] ; then
-	echo "$0: at least one argument needed" 1>&2
-	exit 1
-fi
-
-phphtmldir="/usr/share/doc/${CATEGORY}/${PF}/html"
-
-for x in $@ ; do
-	if [[ -s "${x}" ]] ; then
-		insinto "${phphtmldir}"
-		doins "${x}"
-	elif [[ ! -e "${x}" ]] ; then
-		echo "dohtml-php: ${x} does not exist" 1>&2
-	fi
-done
-}


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2017-03-07  7:45 Marius Brehler
  0 siblings, 0 replies; 169+ messages in thread
From: Marius Brehler @ 2017-03-07  7:45 UTC (permalink / raw
  To: gentoo-commits

commit:     528abb412a9d81f621970b7cb811315c6da5a62c
Author:     François Bissey <francois.bissey <AT> canterbury <DOT> ac <DOT> nz>
AuthorDate: Sun Mar  5 01:27:40 2017 +0000
Commit:     Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
CommitDate: Mon Mar  6 18:58:37 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=528abb41

Remove MULTILIB_COMPAT restriction from numeric-int64-multibuild eclass

 eclass/numeric-int64-multibuild.eclass | 2 --
 1 file changed, 2 deletions(-)

diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass
index ec1d731e9..4f4dda3e8 100644
--- a/eclass/numeric-int64-multibuild.eclass
+++ b/eclass/numeric-int64-multibuild.eclass
@@ -23,8 +23,6 @@ case ${EAPI:-0} in
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
-MULTILIB_COMPAT=( abi_x86_{32,64} )
-
 inherit alternatives-2 eutils fortran-2 multilib-build numeric toolchain-funcs
 
 IUSE="int64"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2017-04-30  7:47 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2017-04-30  7:47 UTC (permalink / raw
  To: gentoo-commits

commit:     a80a7eb84c5740517226bf5358d6d94f3d2b12ed
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 30 07:44:32 2017 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Apr 30 07:46:58 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=a80a7eb8

Update dep to latest eselect

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 1e67d9e23..0682240fe 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -30,7 +30,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4.8-r100"
+DEPEND=">=app-admin/eselect-1.4.9-r100"
 RDEPEND="${DEPEND}
 	!app-eselect/eselect-blas
 	!app-eselect/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2017-06-06  4:12 Benda XU
  0 siblings, 0 replies; 169+ messages in thread
From: Benda XU @ 2017-06-06  4:12 UTC (permalink / raw
  To: gentoo-commits

commit:     efaa7c2a861a79513bd80d95d773a8bd6752ba1e
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  6 04:01:34 2017 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Tue Jun  6 04:11:25 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=efaa7c2a

numeric.eclass: use var reference in Libs and Cflags.

Closes: https://github.com/gentoo/sci/issues/709

 eclass/numeric.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/numeric.eclass b/eclass/numeric.eclass
index ec890c5bf..cb7354542 100644
--- a/eclass/numeric.eclass
+++ b/eclass/numeric.eclass
@@ -125,9 +125,9 @@ create_pkgconfig() {
 	Requires: ${pcrequires}
 	Requires.private: ${pcrequirespriv}
 	Conflicts: ${pcconflicts}
-	Libs: -L"${pclibdir}" ${pclibs}
+	Libs: -L\${libdir} ${pclibs}
 	Libs.private: ${pclibspriv}
-	Cflags: -I"${pcincldir}" ${pccflags}
+	Cflags: -I\${includedir} ${pccflags}
 	EOF
 
 	insinto /usr/$(get_libdir)/pkgconfig


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2017-08-23  3:15 Benda XU
  0 siblings, 0 replies; 169+ messages in thread
From: Benda XU @ 2017-08-23  3:15 UTC (permalink / raw
  To: gentoo-commits

commit:     280823319a7e034814cbf139a325d6971d835061
Author:     François Bissey <frp.bissey <AT> gmail <DOT> com>
AuthorDate: Fri Aug  4 10:23:21 2017 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Wed Aug 23 03:14:02 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=28082331

Add necessary variable to allow multilib wrapping of headers

 eclass/numeric-int64-multibuild.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass
index 4f4dda3e8..68cad0500 100644
--- a/eclass/numeric-int64-multibuild.eclass
+++ b/eclass/numeric-int64-multibuild.eclass
@@ -348,6 +348,7 @@ numeric-int64-multibuild_multilib_wrapper() {
 	local v="${MULTIBUILD_VARIANT/_${NUMERIC_INT32_SUFFIX}/}"
 	local v="${v/_${NUMERIC_INT64_SUFFIX}/}"
 	local ABI="${v/_${NUMERIC_STATIC_SUFFIX}/}"
+	local -r MULTILIB_ABI_FLAG="${v%.*}"
 	multilib_toolchain_setup "${ABI}"
 	"${@}" || die
 }


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2017-08-25  6:10 Benda XU
  0 siblings, 0 replies; 169+ messages in thread
From: Benda XU @ 2017-08-25  6:10 UTC (permalink / raw
  To: gentoo-commits

commit:     98b91d0f75109e56cebd9f2db39ed832b40a4f95
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 25 06:05:41 2017 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Fri Aug 25 06:08:06 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=98b91d0f

numeric-int64-multibuild.eclass: MULTILIB_ABI_FLAG should be USE flag

  The multilib-build eclass expects MULTILIB_ABI_FLAG to be USE flags.
  If it is set to be ABI, the headers will not be included.

Bug: 617312

 eclass/numeric-int64-multibuild.eclass | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass
index 68cad0500..1da654c7f 100644
--- a/eclass/numeric-int64-multibuild.eclass
+++ b/eclass/numeric-int64-multibuild.eclass
@@ -267,7 +267,7 @@ numeric-int64_get_all_abi_variants() {
 	debug-print-function ${FUNCNAME} "${@}"
 	local abi ret=() variant
 
-	for abi in $(multilib_get_enabled_abis); do
+	for abi in $(multilib_get_enabled_abi_pairs); do
 		for variant in $(numeric-int64_get_multibuild_variants); do
 			if [[ ${variant} =~ int64 ]]; then
 				[[ ${abi} =~ amd64 ]] && ret+=( ${abi}_${variant} )
@@ -345,11 +345,22 @@ numeric-int64-multibuild_install_alternative() {
 # @CODE
 numeric-int64-multibuild_multilib_wrapper() {
 	debug-print-function ${FUNCNAME} "${@}"
-	local v="${MULTIBUILD_VARIANT/_${NUMERIC_INT32_SUFFIX}/}"
-	local v="${v/_${NUMERIC_INT64_SUFFIX}/}"
-	local ABI="${v/_${NUMERIC_STATIC_SUFFIX}/}"
-	local -r MULTILIB_ABI_FLAG="${v%.*}"
+
+	local v="${MULTIBUILD_VARIANT%_*}"
+	local ABI="${v#*.}"
+	# hack: our int64 and int32 ABIs can correspond to the same ABI
+	# in multilib, resulting in multiple sed replacements of headers
+	# and thus error like "Flag not listed in wrapper template."
+	# Using MULTILIB_ABI_FLAG="${ABI}", the corresponding header
+	# is ignored.
+	if [[ ${MULTIBUILD_VARIANT##*_} == ${NUMERIC_INT32_SUFFIX} ]] ; then
+		local -r MULTILIB_ABI_FLAG="${v%.*}"
+	else
+		local -r MULTILIB_ABI_FLAG="${ABI}"
+	fi
+
 	multilib_toolchain_setup "${ABI}"
+	readonly ABI
 	"${@}" || die
 }
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2017-08-29 13:52 Benda XU
  0 siblings, 0 replies; 169+ messages in thread
From: Benda XU @ 2017-08-29 13:52 UTC (permalink / raw
  To: gentoo-commits

commit:     575f949150dafd0288bf9d28bcf6acc1f6474408
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 29 13:49:05 2017 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Tue Aug 29 13:49:05 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=575f9491

numeric-int64-multibuild.eclass: consider _static build variant.

  _static is considered to be a different variant in this eclass,
  but is no different from its dynamic conterpart in multilib.eclass.

Credit: Tom Daff
Closes: https://github.com/gentoo/sci/issues/809

 eclass/numeric-int64-multibuild.eclass | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass
index 1da654c7f..6403ee79c 100644
--- a/eclass/numeric-int64-multibuild.eclass
+++ b/eclass/numeric-int64-multibuild.eclass
@@ -347,17 +347,23 @@ numeric-int64-multibuild_multilib_wrapper() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	local v="${MULTIBUILD_VARIANT%_*}"
+	# MULTIBUILD_VARIANT could be abi_x86_64.amd64_static_int32
+	v=${v%_${NUMERIC_STATIC_SUFFIX}}
 	local ABI="${v#*.}"
 	# hack: our int64 and int32 ABIs can correspond to the same ABI
 	# in multilib, resulting in multiple sed replacements of headers
 	# and thus error like "Flag not listed in wrapper template."
 	# Using MULTILIB_ABI_FLAG="${ABI}", the corresponding header
 	# is ignored.
-	if [[ ${MULTIBUILD_VARIANT##*_} == ${NUMERIC_INT32_SUFFIX} ]] ; then
-		local -r MULTILIB_ABI_FLAG="${v%.*}"
-	else
-		local -r MULTILIB_ABI_FLAG="${ABI}"
-	fi
+	local MULTILIB_ABI_FLAG
+	case ${MULTIBUILD_VARIANT} in
+	*_${NUMERIC_STATIC_SUFFIX}*|*_${NUMERIC_INT64_SUFFIX})
+		MULTILIB_ABI_FLAG="${ABI}"
+		;;
+	*_${NUMERIC_INT32_SUFFIX})
+		MULTILIB_ABI_FLAG="${v%.*}"
+		;;
+	esac
 
 	multilib_toolchain_setup "${ABI}"
 	readonly ABI


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2017-12-25 20:33 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2017-12-25 20:33 UTC (permalink / raw
  To: gentoo-commits

commit:     6341d2b05ef5107a6792710c1ce11a0644869603
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 25 20:33:19 2017 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Dec 25 20:33:19 2017 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=6341d2b0

eclass: Bump to latest eselect

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 0682240fe..aa697f505 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -30,7 +30,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4.9-r100"
+DEPEND=">=app-admin/eselect-1.4.10-r100"
 RDEPEND="${DEPEND}
 	!app-eselect/eselect-blas
 	!app-eselect/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
  2018-01-27 20:29 [gentoo-commits] proj/sci:jlec/scilab " Justin Lecher
@ 2018-01-27 20:28 ` Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2018-01-27 20:28 UTC (permalink / raw
  To: gentoo-commits

commit:     530dedc9e6ce43b0451dd458ce0781bd0a1662e8
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 27 20:28:39 2018 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Jan 27 20:28:39 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=530dedc9

Convert linguas to l10n

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/intel-sdp-r1.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/intel-sdp-r1.eclass b/eclass/intel-sdp-r1.eclass
index 3889d3cee..6b4e0fa2a 100644
--- a/eclass/intel-sdp-r1.eclass
+++ b/eclass/intel-sdp-r1.eclass
@@ -513,7 +513,7 @@ intel-sdp-r1_src_install() {
 	eend
 
 	# remove remaining japanese stuff
-	if ! use linguas_ja; then
+	if ! use l10n_ja; then
 		ebegin "Cleaning out japanese language directories"
 		while IFS='\n' read -r -d '' i; do
 			rm -r "${i}" || die


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2018-04-02 11:20 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2018-04-02 11:20 UTC (permalink / raw
  To: gentoo-commits

commit:     d9eb606645592f2efb3e84813b4153207202cc08
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  2 11:19:16 2018 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Apr  2 11:20:24 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=d9eb6066

Bump dep version

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index aa697f505..279a6ac39 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -30,7 +30,7 @@ case "${EAPI:-0}" in
 		;;
 esac
 
-DEPEND=">=app-admin/eselect-1.4.10-r100"
+DEPEND=">=app-admin/eselect-1.4.12-r100"
 RDEPEND="${DEPEND}
 	!app-eselect/eselect-blas
 	!app-eselect/eselect-cblas


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2018-04-03 16:44 Matthias Maier
  0 siblings, 0 replies; 169+ messages in thread
From: Matthias Maier @ 2018-04-03 16:44 UTC (permalink / raw
  To: gentoo-commits

commit:     04a32e493c6158eb55aba6593852eb1ec2eae6d3
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  3 15:31:41 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Tue Apr  3 16:44:50 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=04a32e49

eclass/intel-sdp-r1: Maintenance

 * remove IUSE l10n_ja

 * remove obsolete information

 * remove rpm automagic expansion: Intel changes naming and versioning
   convention with every release. Let's just give up and specify the
   full rpm file name in the ebuilds.

 eclass/intel-sdp-r1.eclass | 133 +++++++++------------------------------------
 1 file changed, 25 insertions(+), 108 deletions(-)

diff --git a/eclass/intel-sdp-r1.eclass b/eclass/intel-sdp-r1.eclass
index 6b4e0fa2a..e6d8f3ee7 100644
--- a/eclass/intel-sdp-r1.eclass
+++ b/eclass/intel-sdp-r1.eclass
@@ -21,17 +21,6 @@ case "${EAPI}" in
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
-# @ECLASS-VARIABLE: INTEL_DIST_SKU
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package download ID from Intel.
-# To determine its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-#
-# e.g. 8365
-#
-# Must be defined before inheriting the eclass.
-
 # @ECLASS-VARIABLE: INTEL_DIST_NAME
 # @DESCRIPTION:
 # The package name to download from Intel.
@@ -85,13 +74,6 @@ esac
 # Main subdirectory which contains the rpms to extract.
 : ${INTEL_RPMS_DIR:=rpm}
 
-# @ECLASS-VARIABLE: INTEL_X86
-# @DESCRIPTION:
-# 32bit arch in rpm names
-#
-# e.g. i486
-: ${INTEL_X86:=i486}
-
 # @ECLASS-VARIABLE: INTEL_DIST_BIN_RPMS
 # @DESCRIPTION:
 # Functional name of rpm without any version/arch tag.
@@ -136,23 +118,6 @@ esac
 # the combined tarball.
 : ${INTEL_DIST_SPLIT_ARCH:=false}
 
-# @FUNCTION: _isdp_get-sdp-full-pv
-# @INTERNAL
-# @DESCRIPTION:
-# Gets the full internal Intel version specifier.
-_isdp_get-sdp-full-pv() {
-	local _intel_pv=($(get_version_components))
-	case ${#_intel_pv[@]} in
-		3)
-			local _intel_pv_full="${_intel_pv[0]}.${_intel_pv[1]}-${_intel_pv[2]}"
-			;;
-		4)
-			local _intel_pv_full="${_intel_pv[3]}-${_intel_pv[0]}.${_intel_pv[1]}.${_intel_pv[2]}-${_intel_pv[3]}"
-			;;
-	esac
-	echo "${_intel_pv_full}"
-}
-
 # @FUNCTION: _isdp_get-sdp-year
 # @INTERNAL
 # @DESCRIPTION:
@@ -170,8 +135,9 @@ _isdp_get-sdp-year() {
 # Gets the full rootless path to the installation directory
 #
 #     e.g. opt/intel/compilers_and_libraries_2016.1.150
+#          opt/intel/vtune_amplifier_2018.2.0.551022
 isdp_get-sdp-dir() {
-	local _intel_sdp_dir="opt/intel/${INTEL_SUBDIR}_$(_isdp_get-sdp-year).$(get_version_component_range 3-4)"
+	local _intel_sdp_dir="opt/intel/${INTEL_SUBDIR}_$(_isdp_get-sdp-year).$(get_version_component_range 3-)"
 	echo "${_intel_sdp_dir}"
 }
 
@@ -185,22 +151,13 @@ isdp_get-sdp-edir() {
 	echo "${_intel_sdp_edir}"
 }
 
-_INTEL_URI="http://registrationcenter-download.intel.com/akdlm/irc_nas/${INTEL_DIST_SKU}/${INTEL_DIST_NAME}"
-if [[ "${INTEL_DIST_SPLIT_ARCH}" != true ]]; then
-	SRC_URI="${_INTEL_URI}_${INTEL_DIST_PV}.${INTEL_DIST_TARX}"
-else
-	SRC_URI="
-		abi_x86_32? ( ${_INTEL_URI}_${INTEL_DIST_PV}_ia32.${INTEL_DIST_TARX} )
-		abi_x86_64? ( ${_INTEL_URI}_${INTEL_DIST_PV}_intel64.${INTEL_DIST_TARX} )"
-fi
-unset _INTEL_URI
-
+SRC_URI="${INTEL_DIST_NAME}_${INTEL_DIST_PV}.${INTEL_DIST_TARX}"
 LICENSE="Intel-SDP"
 # TODO: Proper slotting
 # Future work, #394411
 SLOT="0"
 
-RESTRICT="mirror"
+RESTRICT="mirror fetch"
 
 RDEPEND=""
 DEPEND="app-arch/rpm2targz"
@@ -252,78 +209,41 @@ isdp_get-sdp-installed-arches() {
 	echo "${arch[*]}"
 }
 
-# @FUNCTION: _isdp_get-sdp-source-rpm-arches
-# @INTERNAL
-# @DESCRIPTION:
-# Returns a space separated list of the arch suffixes used in the RPM filenames, e.g.
-#
-#    intel-openmp-l-all-150-16.0.1-150.i486.rpm
-#    intel-openmp-l-all-150-16.0.1-150.x86_64.rpm
-#
-# the result would consist of "i486 x86_64".
-_isdp_get-sdp-source-rpm-arches() {
-	local arch=()
-	use abi_x86_64 && arch+=("x86_64")
-	use abi_x86_32 && arch+=("${INTEL_X86}")
-	echo "${arch[*]}"
-}
-
 # @FUNCTION: _isdp_generate-list-install-rpms
 # @INTERNAL
 # @DESCRIPTION:
 # Generates the list of fully expanded RPMs to be extracted.
 _isdp_generate-list-install-rpms() {
-	debug-print-function ${FUNCNAME} "${@}" 
+	debug-print-function ${FUNCNAME} "${@}"
 
 	# Expand components into full RPM filenames
 	expand_component_into_full_rpm() {
 		local deref_var="${1}[@]"
-		local arch="${2}"
-		local p a rpm_prefix rpm_suffix expanded_full_rpms=()
+		local p rpm_prefix expanded_full_rpms=()
 
 		for p in "${!deref_var}"; do
-			for a in ${arch}; do
-				# check if a directory is prefixed
-				if [[ "${p}" == "${p##*/}" ]]; then
-					rpm_prefix="${INTEL_RPMS_DIR}/intel-"
-				else
-					rpm_prefix=""
-				fi
-
-				# check for variables ending in ".rpm"
-				# these are excluded from version expansion, due to Intel's
-				# idiosyncratic versioning scheme beginning with their 2016
-				# suite of tools. For instance
-				#
-				#     intel-ccompxe-2016.1-056.noarch.rpm
-				#
-				# which is completely unpredictable using versions
-				if [[ "${p}" == *.rpm ]]; then
-					rpm_suffix=""
-				else
-					rpm_suffix="-$(_isdp_get-sdp-full-pv).${a}.rpm"
-				fi
-
-				expanded_full_rpms+=( "${rpm_prefix}${p}${rpm_suffix}" )
-			done
+			# check if a directory is prefixed
+			if [[ "${p}" == "${p##*/}" ]]; then
+				rpm_prefix="${INTEL_RPMS_DIR}/intel-"
+			else
+				rpm_prefix=""
+			fi
+			expanded_full_rpms+=( "${rpm_prefix}${p}" )
 		done
 		echo ${expanded_full_rpms[*]}
 	}
 
 	local vars_to_expand=("INTEL_DIST_BIN_RPMS" "INTEL_DIST_DAT_RPMS")
-	local vars_to_expand_suffixes=("$(_isdp_get-sdp-source-rpm-arches)" "noarch")
 	if use abi_x86_32; then
 		vars_to_expand+=("INTEL_DIST_X86_RPMS")
-		vars_to_expand_suffixes+=("${INTEL_X86}")
 	fi
 	if use abi_x86_64; then
 		vars_to_expand+=("INTEL_DIST_AMD64_RPMS")
-		vars_to_expand_suffixes+=("x86_64")
 	fi
 
 	local i fully_expanded_intel_rpms=()
 	for ((i=0; i<${#vars_to_expand[@]}; i++)); do
-		fully_expanded_intel_rpms+=($(expand_component_into_full_rpm "${vars_to_expand[i]}" "${vars_to_expand_suffixes[i]}"))
+		fully_expanded_intel_rpms+=($(expand_component_into_full_rpm "${vars_to_expand[i]}"))
 	done
 	echo ${fully_expanded_intel_rpms[*]}
 }
@@ -352,11 +272,6 @@ _isdp_big-warning() {
 	ewarn "To receive a non-commercial license, you need to register at:"
 	ewarn "https://software.intel.com/en-us/qualify-for-free-software"
 	ewarn "Install the license file into ${EPREFIX}/opt/intel/licenses"
-	ewarn
-	ewarn "Beginning with the 2016 suite of tools, license files are keyed"
-	ewarn "to the MAC address of the eth0 interface. In order to retrieve"
-	ewarn "a personalized license file, follow the instructions at"
-	ewarn "https://software.intel.com/en-us/articles/how-do-i-get-my-license-file-for-intel-parallel-studio-xe-2016"
 
 	case ${1} in
 		pre-check )
@@ -471,6 +386,17 @@ intel-sdp-r1_pkg_pretend() {
 	fi
 }
 
+# @FUNCTION: intel-sdp-r1_pkg_nofetch
+# @DESCRIPTION:
+# Advice user to download the parallel studio tarball
+pkg_nofetch() {
+	einfo "Please download"
+	einfo "    ${SRC_URI}"
+	einfo "from"
+	einfo "    https://registrationcenter.intel.com/RegCenter/MyProducts.aspx"
+	einfo "and place the tarball in your DISTDIR directory."
+}
+
 # @FUNCTION: intel-sdp-r1_src_unpack
 # @DESCRIPTION:
 # Unpacking necessary rpms from tarball, extract them and rearrange the output.
@@ -512,15 +438,6 @@ intel-sdp-r1_src_install() {
 	done < <(find opt -regextype posix-extended -regex '.*(uninstall|uninstall.sh)$' -print0)
 	eend
 
-	# remove remaining japanese stuff
-	if ! use l10n_ja; then
-		ebegin "Cleaning out japanese language directories"
-		while IFS='\n' read -r -d '' i; do
-			rm -r "${i}" || die
-		done < <(find opt -type d -regextype posix-extended -regex '.*(ja|ja_JP)$' -print0)
-		eend
-	fi
-
 	# handle documentation
 	if path_exists "opt/intel/documentation_$(_isdp_get-sdp-year)"; then
 		# normal man pages


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2018-04-03 16:44 Matthias Maier
  0 siblings, 0 replies; 169+ messages in thread
From: Matthias Maier @ 2018-04-03 16:44 UTC (permalink / raw
  To: gentoo-commits

commit:     7f44fa3725a1166bce174561dda0a4e0fc61b50f
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  3 15:42:49 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Tue Apr  3 16:44:52 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=7f44fa37

eclass/intel-sdp: drop

 eclass/intel-sdp.eclass | 608 ------------------------------------------------
 1 file changed, 608 deletions(-)

diff --git a/eclass/intel-sdp.eclass b/eclass/intel-sdp.eclass
deleted file mode 100644
index b8825bea6..000000000
--- a/eclass/intel-sdp.eclass
+++ /dev/null
@@ -1,608 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: intel-sdp.eclass
-# @MAINTAINER:
-# Justin Lecher <jlec@gentoo.org>
-# Sci Team <sci@gentoo.org>
-# @BLURB: Handling of Intel's Software Development Products package management
-
-if [[ ! ${_INTEL_SDP_ECLASS_} ]]; then
-
-case "${EAPI:-0}" in
-	5) ;;
-	*) die "EAPI=${EAPI} is not supported" ;;
-esac
-
-# @ECLASS-VARIABLE: INTEL_DID
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package download ID from Intel.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-#
-# e.g. 2504
-#
-# Must be defined before inheriting the eclass
-
-# @ECLASS-VARIABLE: INTEL_DPN
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package name to download from Intel.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-#
-# e.g. parallel_studio_xe
-#
-# Must be defined before inheriting the eclass
-
-# @ECLASS-VARIABLE: INTEL_DPV
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package download version from Intel.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-#
-# e.g. 2011_sp1_update2
-#
-# Must be defined before inheriting the eclass
-
-# @ECLASS-VARIABLE: INTEL_TARX
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package extention.
-# To find out its value, see the links to download in
-# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
-#
-# e.g. tar.gz
-#
-# Must be defined before inheriting the eclass
-: ${INTEL_TARX:=tgz}
-
-# @ECLASS-VARIABLE: INTEL_SUBDIR
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The package sub-directory where it will end-up in /opt/intel
-# To find out its value, you have to do a raw install from the Intel tar ball
-
-# @ECLASS-VARIABLE: INTEL_SKIP_LICENSE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Possibility to skip the mandatory check for licenses. Only set this if there
-# is really no fix.
-
-# @ECLASS-VARIABLE: INTEL_RPMS_DIR
-# @DESCRIPTION:
-# Main subdirectory which contains the rpms to extract.
-: ${INTEL_RPMS_DIR:=rpm}
-
-# @ECLASS-VARIABLE: INTEL_X86
-# @DESCRIPTION:
-# 32bit arch in rpm names
-#
-# e.g. i484
-: ${INTEL_X86:=i486}
-
-# @ECLASS-VARIABLE: INTEL_BIN_RPMS
-# @DESCRIPTION:
-# Functional name of rpm without any version/arch tag
-#
-# e.g. compilerprof
-#
-# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
-# specify the full path
-#
-# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
-: ${INTEL_BIN_RPMS:=""}
-
-# @ECLASS-VARIABLE: INTEL_AMD64_RPMS
-# @DESCRIPTION:
-# AMD64 single arch rpms. Same syntax as INTEL_BIN_RPMS
-: ${INTEL_AMD64_RPMS:=""}
-
-# @ECLASS-VARIABLE: INTEL_X86_RPMS
-# @DESCRIPTION:
-# X86 single arch rpms. Same syntax as INTEL_BIN_RPMS
-: ${INTEL_X86_RPMS:=""}
-
-# @ECLASS-VARIABLE: INTEL_DAT_RPMS
-# @DESCRIPTION:
-# Functional name of rpm of common data which are arch free
-# without any version tag
-#
-# e.g. openmp
-#
-# if the rpm is located in a directory different to INTEL_RPMS_DIR you can
-# specify the full path
-#
-# e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli-common
-: ${INTEL_DAT_RPMS:=""}
-
-# @ECLASS-VARIABLE: INTEL_SINGLE_ARCH
-# @DESCRIPTION:
-# Unset, if only the multilib package will be provided by intel
-: ${INTEL_SINGLE_ARCH:=true}
-
-# @ECLASS-VARIABLE: INTEL_SDP_DB
-# @DESCRIPTION:
-# Full path to intel registry db
-INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db
-
-MULTILIB_COMPAT=( abi_x86_{32,64} )
-
-inherit check-reqs eutils multilib-build versionator
-
-_INTEL_PV1=$(get_version_component_range 1)
-_INTEL_PV2=$(get_version_component_range 2)
-_INTEL_PV3=$(get_version_component_range 3)
-_INTEL_PV4=$(get_version_component_range 4)
-_INTEL_PV=""
-[[ -n ${_INTEL_PV4} ]] && _INTEL_PV+="${_INTEL_PV4}-"
-[[ -n ${_INTEL_PV1} ]] && _INTEL_PV+="${_INTEL_PV1}"
-[[ -n ${_INTEL_PV2} ]] && _INTEL_PV+=".${_INTEL_PV2}"
-[[ -n ${_INTEL_PV3} ]] && _INTEL_PV+="-${_INTEL_PV3}"
-
-_INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}"
-
-if [ ${INTEL_SINGLE_ARCH} == true ]; then
-	SRC_URI="
-		abi_x86_32? ( ${_INTEL_URI}_${INTEL_DPV}_ia32.${INTEL_TARX} )
-		abi_x86_64? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.${INTEL_TARX} )"
-else
-	SRC_URI="${_INTEL_URI}_${INTEL_DPV}.${INTEL_TARX}"
-fi
-
-LICENSE="Intel-SDP"
-# Future work, #394411
-#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
-SLOT="0"
-IUSE="examples"
-
-RESTRICT="mirror"
-
-RDEPEND=""
-DEPEND="app-arch/rpm2targz"
-
-_INTEL_SDP_YEAR=${INTEL_DPV}
-_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_sp*}
-_INTEL_SDP_YEAR=${_INTEL_SDP_YEAR%_update*}
-
-# @ECLASS-VARIABLE: INTEL_SDP_DIR
-# @DESCRIPTION:
-# Full rootless path to installation dir
-INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}"
-[[ -n ${_INTEL_PV3} ]] && INTEL_SDP_DIR+=".${_INTEL_PV3}"
-[[ -n ${_INTEL_PV4} ]] && INTEL_SDP_DIR+=".${_INTEL_PV4}"
-
-# @ECLASS-VARIABLE: INTEL_SDP_EDIR
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Full rooted path to installation dir
-INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"
-
-S="${WORKDIR}"
-
-QA_PREBUILT="${INTEL_SDP_DIR}/*"
-
-# @ECLASS-VARIABLE: INTEL_ARCH
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Intels internal names of the arches; will be set at runtime accordingly
-#
-# e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"
-
-# @FUNCTION: _isdp_link_eclipse_plugins
-# @INTERNAL
-# @DESCRIPTION:
-# Creating necessary links to use intel compiler with eclipse
-_isdp_link_eclipse_plugins() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local c f
-	pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null || die
-		for c in cdt*; do
-			local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
-			if has_version "dev-util/eclipse-sdk:${ev}"; then
-				einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
-				for f in cdt${cv}/eclipse/features/*; do
-					dodir /usr/$(get_libdir)/eclipse-${ev}/features
-					dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
-						/usr/$(get_libdir)/eclipse-${ev}/features/ || die
-				done
-				for f in cdt${cv}/eclipse/plugins/*; do
-					dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
-					dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
-						/usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
-				done
-			fi
-		done
-	popd > /dev/null || die
-}
-
-# @FUNCTION: _isdp_big-warning
-# @USAGE: [pre-check | test-failed]
-# @INTERNAL
-# @DESCRIPTION:
-# warn user that we really require a license
-_isdp_big-warning() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	case ${1} in
-		pre-check )
-			echo ""
-			ewarn "License file not found!"
-			;;
-
-		test-failed )
-			echo
-			ewarn "Function test failed. Most probably due to an invalid license."
-			ewarn "This means you already tried to bypass the license check once."
-			;;
-	esac
-
-	echo ""
-	ewarn "Make sure you have received an Intel license."
-	ewarn "To receive a non-commercial license, you need to register at:"
-	ewarn "https://software.intel.com/en-us/qualify-for-free-software"
-	ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
-
-	case ${1} in
-		pre-check )
-			ewarn "before proceeding with installation of ${P}"
-			echo ""
-			;;
-		* )
-			echo ""
-			;;
-			esac
-}
-
-# @FUNCTION: _isdp_version_test
-# @INTERNAL
-# @DESCRIPTION:
-# Testing for valid license by asking for version information of the compiler
-_isdp_version_test() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local comp comp_full arch warn
-	case ${PN} in
-		ifc )
-			debug-print "Testing ifort"
-			comp=ifort
-			;;
-		icc )
-			debug-print "Testing icc"
-			comp=icc
-			;;
-		*)
-			die "${PN} is not supported for testing"
-			;;
-	esac
-
-	for arch in ${INTEL_ARCH}; do
-		case ${EBUILD_PHASE} in
-			install )
-				comp_full="${ED}/${INTEL_SDP_DIR}/bin/${arch}/${comp}"
-				;;
-			postinst )
-				comp_full="${INTEL_SDP_EDIR}/bin/${arch}/${comp}"
-				;;
-			* )
-				ewarn "Compile test not supported in ${EBUILD_PHASE}"
-				continue
-				;;
-		esac
-
-		debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${arch}/\" \"${comp_full}\" -V"
-
-		LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${arch}/" "${comp_full}" -V &>/dev/null
-		[[ $? -ne 0 ]] && warn=yes
-	done
-	[[ "${warn}" == "yes" ]] && _isdp_big-warning test-failed
-}
-
-# @FUNCTION: _isdp_run-test
-# @INTERNAL
-# Test if installed compiler is working
-_isdp_run-test() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
-		case ${PN} in
-			ifc | icc )
-				_isdp_version_test ;;
-			* )
-				debug-print "No test available for ${PN}"
-				;;
-		esac
-	fi
-}
-
-# @FUNCTION: convert2intel_arch
-# @USAGE: <arch>
-# @DESCRIPTION:
-# Convert between portage arch (e.g. amd64, x86) and intel arch
-# nomenclature (e.g. intel64, ia32)
-convert2intel_arch() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	case $1 in
-		amd64|abi_x86_64|*amd64*)
-			echo "intel64"
-			;;
-		x86|abi_x86_32|*x86*)
-			echo "ia32"
-			;;
-		*)
-			die "Abi \'$1\' is unsupported"
-			;;
-	esac
-}
-
-# @FUNCTION: intel-sdp-r1_pkg_pretend
-# @DESCRIPTION:
-# @CODE
-# * Check that the user has a (valid) license file before going on.
-# * Check for space requirements being fullfilled
-# @CODE
-intel-sdp_pkg_pretend() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	local warn=1 dir dirs ret arch a p
-
-	: ${CHECKREQS_DISK_BUILD:=256M}
-	check-reqs_pkg_pretend
-
-	if [[ -z ${INTEL_SKIP_LICENSE} ]]; then
-		if echo ${INTEL_LICENSE_FILE} | grep -q @; then
-			einfo "Looks like you are using following license server:"
-			einfo "   ${INTEL_LICENSE_FILE}"
-			return 0
-		fi
-
-		dirs=(
-			"${INTEL_SDP_EDIR}/licenses"
-			"${INTEL_SDP_EDIR}/Licenses"
-			"${EPREFIX}/opt/intel/licenses"
-			)
-		for dir in "${dirs[@]}" ; do
-			ebegin "Checking for a license in: ${dir}"
-			#maybe use nullglob or [[ $(echo ${dir/*lic) != "${dir}/*lic" ]]
-			[[ $( ls "${dir}"/*lic 2>/dev/null ) ]]; ret=$?
-			eend ${ret}
-			if [[ ${ret} == "0" ]]; then
-				warn=${ret}
-				break
-			fi
-		done
-		if [[ ${warn} == "1" ]]; then
-			_isdp_big-warning pre-check
-			die "Could not find license file"
-		fi
-	else
-		eqawarn "The ebuild doesn't check for presents of a proper intel license!"
-		eqawarn "This shouldn't be done unless there is a serious reason."
-	fi
-}
-
-# @FUNCTION: intel-sdp_pkg_setup
-# @DESCRIPTION:
-# Setting up and sorting some internal variables
-intel-sdp_pkg_setup() {
-	debug-print-function ${FUNCNAME} "${@}"
-	local arch a p
-
-	INTEL_ARCH=""
-
-	if use abi_x86_64; then
-		arch+=" x86_64"
-		INTEL_ARCH+=" intel64"
-	fi
-	if use abi_x86_32; then
-		arch+=" ${INTEL_X86}"
-		INTEL_ARCH+=" ia32"
-	fi
-	INTEL_RPMS=()
-	INTEL_RPMS_FULL=()
-	if [[ $(declare -p INTEL_BIN_RPMS) = "declare -a "* ]] ; then
-		_INTEL_BIN_RPMS=( ${INTEL_BIN_RPMS[@]} )
-	else
-		read -r -d '' -a _INTEL_BIN_RPMS <<<"${INTEL_BIN_RPMS}"
-	fi
-	for p in "${_INTEL_BIN_RPMS[@]}"; do
-		for a in ${arch}; do
-			if [ ${p} == $(basename ${p}) ]; then
-				INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${a}.rpm )
-			else
-				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${a}.rpm )
-			fi
-		done
-	done
-	if use amd64; then
-		if [[ $(declare -p INTEL_AMD64_RPMS) = "declare -a "* ]] ; then
-			_INTEL_AMD64_RPMS=( ${INTEL_AMD64_RPMS[@]} )
-		else
-			read -r -d '' -a _INTEL_AMD64_RPMS <<<"${INTEL_AMD64_RPMS}"
-		fi
-		for p in "${_INTEL_AMD64_RPMS[@]}"; do
-			if [ ${p} == $(basename ${p}) ]; then
-				INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.x86_64.rpm )
-			else
-				INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.x86_64.rpm )
-			fi
-
-		done
-	fi
-	if [[ $(declare -p INTEL_X86_RPMS) = "declare -a "* ]] ; then
-		_INTEL_X86_RPMS=( ${INTEL_X86_RPMS[@]} )
-	else
-		read -r -d '' -a _INTEL_X86_RPMS <<<"${INTEL_X86_RPMS}"
-	fi
-	for p in "${_INTEL_X86_RPMS[@]}"; do
-		if [ ${p} == $(basename ${p}) ]; then
-			INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.${INTEL_X86}.rpm )
-		else
-			INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.${INTEL_X86}.rpm )
-		fi
-	done
-	if [[ $(declare -p INTEL_DAT_RPMS) = "declare -a "* ]] ; then
-		_INTEL_DAT_RPMS=( ${INTEL_DAT_RPMS[@]} )
-	else
-		read -r -d '' -a _INTEL_DAT_RPMS <<<"${INTEL_DAT_RPMS}"
-	fi
-	for p in "${_INTEL_DAT_RPMS[@]}"; do
-		if [ ${p} == $(basename ${p}) ]; then
-			INTEL_RPMS+=( intel-${p}-${_INTEL_PV}.noarch.rpm )
-		else
-			INTEL_RPMS_FULL+=( ${p}-${_INTEL_PV}.noarch.rpm )
-		fi
-	done
-}
-
-# @FUNCTION: intel-sdp_src_unpack
-# @DESCRIPTION:
-# Unpacking necessary rpms from tarball, extract them and rearrange the output.
-intel-sdp_src_unpack() {
-	local l r subdir rb t list=() debug_list
-
-	for t in ${A}; do
-		for r in "${INTEL_RPMS[@]}"; do
-			rpmdir=${t%%.*}/${INTEL_RPMS_DIR}
-			list+=( ${rpmdir}/${r} )
-		done
-
-		for r in "${INTEL_RPMS_FULL[@]}"; do
-			list+=( ${t%%.*}/${r} )
-		done
-
-		debug_list="$(IFS=$'\n'; echo ${list[@]} )"
-
-		debug-print "Adding to decompression list:"
-		debug-print ${debug_list}
-
-		tar xvf "${DISTDIR}"/${t} ${list[@]} &> "${T}"/rpm-extraction.log
-
-		for r in ${list[@]}; do
-			rb=$(basename ${r})
-			l=.${rb}_$(date +'%d%m%y_%H%M%S').log
-			einfo "Unpacking ${rb}"
-			rpm2tar -O ${r} | tar xvf - | sed -e \
-				"s:^\.:${EROOT#/}:g" > ${l}; assert "unpacking ${r} failed"
-			mv ${l} opt/intel/ || die "failed moving extract log file"
-		done
-	done
-
-	mv opt/intel/* ${INTEL_SDP_DIR} || die "mv to INTEL_SDP_DIR failed"
-}
-
-# @FUNCTION: intel-sdp_src_install
-# @DESCRIPTION:
-# Install everything
-intel-sdp_src_install() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	if path_exists "${INTEL_SDP_DIR}"/uninstall*; then
-		ebegin "Cleaning out uninstall information"
-		find "${INTEL_SDP_DIR}"/uninstall* -delete || die
-		eend
-	fi
-
-	if path_exists "${INTEL_SDP_DIR}"/Documentation; then
-		dodoc -r "${INTEL_SDP_DIR}"/Documentation/*
-
-		ebegin "Cleaning out documentation"
-		find "${INTEL_SDP_DIR}"/Documentation -delete || die
-		eend
-	fi
-
-	if path_exists "${INTEL_SDP_DIR}"/Samples; then
-		if use examples ; then
-			insinto /usr/share/${P}/examples/
-			doins -r "${INTEL_SDP_DIR}"/Samples/*
-		fi
-		ebegin "Cleaning out examples"
-		find "${INTEL_SDP_DIR}"/Samples -delete || die
-		eend
-	fi
-
-	if path_exists "${INTEL_SDP_DIR}"/eclipse_support; then
-		if has eclipse ${IUSE} && use eclipse; then
-			_isdp_link_eclipse_plugins
-		else
-			ebegin "Cleaning out eclipse plugin"
-			find "${INTEL_SDP_DIR}"/eclipse_support -delete || die
-			eend
-		fi
-	fi
-
-	if path_exists "${INTEL_SDP_DIR}"/man; then
-		path_exists "${INTEL_SDP_DIR}"/man/en_US/man1/* && \
-			doman "${INTEL_SDP_DIR}"/man/en_US/man1/*
-		path_exists "${INTEL_SDP_DIR}"/man/man1/* && \
-			doman "${INTEL_SDP_DIR}"/man/man1/*
-		has linguas_ja ${IUSE} && use linguas_ja && \
-			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*
-
-		find "${INTEL_SDP_DIR}"/man -delete || die
-	fi
-
-	ebegin "Tagging ${PN}"
-	find opt -name \*sh -type f -exec sed -i \
-		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \
-		'{}' + || die
-	eend
-
-	[[ -d "${ED}" ]] || dodir /
-	mv opt "${ED}"/ || die "moving files failed"
-
-	dodir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
-	keepdir "${INTEL_SDP_DIR}"/licenses /opt/intel/ism/rm
-}
-
-# @FUNCTION: intel-sdp_pkg_postinst
-# @DESCRIPTION:
-# Add things to intel database
-intel-sdp_pkg_postinst() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	# add product registry to intel "database"
-	local l r
-	for r in ${INTEL_RPMS}; do
-		l="$(ls -1 ${EROOT%/}/opt/intel/.${r}_*.log | head -n 1)"
-		echo >> ${INTEL_SDP_DB} \
-			"<:${r%-${_INTEL_PV4}*}-${_INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>"
-	done
-	_isdp_run-test
-
-	if [[ ${PN} = icc ]] && has_version ">=dev-util/ccache-3.1.9-r2" ; then
-		#add ccache links as icc might get installed after ccache
-		"${EROOT}"/usr/bin/ccache-config --install-links
-	fi
-}
-
-# @FUNCTION: intel-sdp_pkg_postrm
-# @DESCRIPTION:
-# Sanitize intel database
-intel-sdp_pkg_postrm() {
-	debug-print-function ${FUNCNAME} "${@}"
-
-	# remove from intel "database"
-	if [[ -e ${INTEL_SDP_DB} ]]; then
-		local r
-		for r in ${INTEL_RPMS}; do
-			sed -i \
-				-e "/${r}/d" \
-				${INTEL_SDP_DB}
-		done
-	fi
-
-	if [[ ${PN} = icc ]] && has_version ">=dev-util/ccache-3.1.9-r2" && [[ -z ${REPLACED_BY_VERSION} ]]; then
-		# --remove-links would remove all links, --install-links updates them
-		"${EROOT}"/usr/bin/ccache-config --install-links
-	fi
-}
-
-EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst pkg_postrm pkg_pretend
-
-_INTEL_SDP_ECLASS_=1
-fi


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2018-08-31  3:04 Matthias Maier
  0 siblings, 0 replies; 169+ messages in thread
From: Matthias Maier @ 2018-08-31  3:04 UTC (permalink / raw
  To: gentoo-commits

commit:     ae4963d44f80465b8f31aab5d8656d00293f5e2f
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 31 03:03:31 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri Aug 31 03:04:13 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=ae4963d4

eclass/intel-sdp-r1: Add path_exists workaround

 eclass/intel-sdp-r1.eclass | 48 +++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 41 insertions(+), 7 deletions(-)

diff --git a/eclass/intel-sdp-r1.eclass b/eclass/intel-sdp-r1.eclass
index e6d8f3ee7..12d1f868d 100644
--- a/eclass/intel-sdp-r1.eclass
+++ b/eclass/intel-sdp-r1.eclass
@@ -118,6 +118,40 @@ esac
 # the combined tarball.
 : ${INTEL_DIST_SPLIT_ARCH:=false}
 
+# @FUNCTION: _isdp_path_exists
+# @INTERNAL
+# @USAGE: [-a|-o] <paths>
+# @DESCRIPTION:
+# Check if the specified paths exist.  Works for all types of paths
+# (files/dirs/etc...).  The -a and -o flags control the requirements
+# of the paths.  They correspond to "and" and "or" logic.  So the -a
+# flag means all the paths must exist while the -o flag means at least
+# one of the paths must exist.  The default behavior is "and".  If no
+# paths are specified, then the return value is "false".
+_isdp_path_exists() {
+       local opt=$1
+       [[ ${opt} == -[ao] ]] && shift || opt="-a"
+
+       # no paths -> return false
+       # same behavior as: [[ -e "" ]]
+       [[ $# -eq 0 ]] && return 1
+
+       local p r=0
+       for p in "$@" ; do
+               [[ -e ${p} ]]
+               : $(( r += $? ))
+       done
+
+       case ${opt} in
+               -a) return $(( r != 0 )) ;;
+               -o) return $(( r == $# )) ;;
+       esac
+       eerror "path_exists has been removed.  Please see the following post"
+       eerror "for a replacement snippet:"
+       eerror "https://blogs.gentoo.org/mgorny/2018/08/09/inlining-path_exists/"
+       die "path_exists is banned"
+}
+
 # @FUNCTION: _isdp_get-sdp-year
 # @INTERNAL
 # @DESCRIPTION:
@@ -373,7 +407,7 @@ intel-sdp-r1_pkg_pretend() {
 			)
 		for dir in "${dirs[@]}" ; do
 			ebegin "Checking for a license in: ${dir}"
-			path_exists "${dir}"/*lic && warn=0
+			_isdp_path_exists "${dir}"/*lic && warn=0
 			eend ${warn} && break
 		done
 		if [[ ${warn} == 1 ]]; then
@@ -439,9 +473,9 @@ intel-sdp-r1_src_install() {
 	eend
 
 	# handle documentation
-	if path_exists "opt/intel/documentation_$(_isdp_get-sdp-year)"; then
+	if _isdp_path_exists "opt/intel/documentation_$(_isdp_get-sdp-year)"; then
 		# normal man pages
-		if path_exists "opt/intel/documentation_$(_isdp_get-sdp-year)/en/man/common/man1"; then
+		if _isdp_path_exists "opt/intel/documentation_$(_isdp_get-sdp-year)/en/man/common/man1"; then
 			doman opt/intel/documentation_"$(_isdp_get-sdp-year)"/en/man/common/man1/*
 			rm -r opt/intel/documentation_"$(_isdp_get-sdp-year)"/en/man || die
 		fi
@@ -455,24 +489,24 @@ intel-sdp-r1_src_install() {
 	fi
 
 	# MPI man pages
-	if path_exists "$(isdp_get-sdp-dir)/linux/mpi/man/man3"; then
+	if _isdp_path_exists "$(isdp_get-sdp-dir)/linux/mpi/man/man3"; then
 		doman "$(isdp_get-sdp-dir)"/linux/mpi/man/man3/*
 		rm -r "$(isdp_get-sdp-dir)"/linux/mpi/man || die
 	fi
 
 	# licensing docs
-	if path_exists "$(isdp_get-sdp-dir)/licensing/documentation"; then
+	if _isdp_path_exists "$(isdp_get-sdp-dir)/licensing/documentation"; then
 		dodoc -r "$(isdp_get-sdp-dir)/licensing/documentation"/*
 		rm -rf "$(isdp_get-sdp-dir)/licensing/documentation" || die
 	fi
 
-	if path_exists opt/intel/"${INTEL_DIST_NAME}"*/licensing; then
+	if _isdp_path_exists opt/intel/"${INTEL_DIST_NAME}"*/licensing; then
 		dodoc -r opt/intel/"${INTEL_DIST_NAME}"*/licensing
 		rm -rf opt/intel/"${INTEL_DIST_NAME}"* || die
 	fi
 
 	# handle examples
-	if path_exists "opt/intel/samples_$(_isdp_get-sdp-year)"; then
+	if _isdp_path_exists "opt/intel/samples_$(_isdp_get-sdp-year)"; then
 		use examples && dodoc -r opt/intel/samples_"$(_isdp_get-sdp-year)"/*
 
 		ebegin "Cleaning out examples"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2018-10-28  6:21 Justin Lecher
  0 siblings, 0 replies; 169+ messages in thread
From: Justin Lecher @ 2018-10-28  6:21 UTC (permalink / raw
  To: gentoo-commits

commit:     adbf4bda26a7cd07596d98f51d110cb322ede737
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 28 06:20:48 2018 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Oct 28 06:21:10 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=adbf4bda

Enable EAPI=7

Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 eclass/alternatives-2.eclass           | 2 +-
 eclass/numeric-int64-multibuild.eclass | 2 +-
 eclass/numeric.eclass                  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/alternatives-2.eclass b/eclass/alternatives-2.eclass
index 4263fef8e..7237f0db3 100644
--- a/eclass/alternatives-2.eclass
+++ b/eclass/alternatives-2.eclass
@@ -23,7 +23,7 @@ case "${EAPI:-0}" in
 	0|1|2|3|4)
 		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
 		;;
-	5|6)
+	5|6|7)
 		;;
 	*)
 		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"

diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass
index 6403ee79c..f720356a3 100644
--- a/eclass/numeric-int64-multibuild.eclass
+++ b/eclass/numeric-int64-multibuild.eclass
@@ -19,7 +19,7 @@ if [[ ! ${_NUMERIC_INT64_MULTILIB_ECLASS} ]]; then
 case ${EAPI:-0} in
 	5)
 		inherit multilib ;;
-	6) ;;
+	6|7) ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 

diff --git a/eclass/numeric.eclass b/eclass/numeric.eclass
index cb7354542..431b7afec 100644
--- a/eclass/numeric.eclass
+++ b/eclass/numeric.eclass
@@ -14,7 +14,7 @@ if [[ ! ${_NUMERIC_ECLASS} ]]; then
 case ${EAPI:-0} in
 	0|1|2|3|4|5)
 		inherit multilib ;;
-	6) ;;
+	6|7) ;;
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2020-10-01  1:43 Aisha Tammy
  0 siblings, 0 replies; 169+ messages in thread
From: Aisha Tammy @ 2020-10-01  1:43 UTC (permalink / raw
  To: gentoo-commits

commit:     6a5abf7c66fb9d9ee6b57932d6e5d6296690baa6
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Thu Oct  1 01:41:23 2020 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Thu Oct  1 01:41:23 2020 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=6a5abf7c

eclass/intel-sdp-r1.eclass: restrict bindist

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>

 eclass/intel-sdp-r1.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/intel-sdp-r1.eclass b/eclass/intel-sdp-r1.eclass
index 0fd9ee9d8..9d902395f 100644
--- a/eclass/intel-sdp-r1.eclass
+++ b/eclass/intel-sdp-r1.eclass
@@ -191,7 +191,7 @@ LICENSE="Intel-SDP"
 # Future work, #394411
 SLOT="0"
 
-RESTRICT="mirror fetch"
+RESTRICT="bindist mirror fetch"
 
 RDEPEND=""
 DEPEND="app-arch/rpm2targz"


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2020-12-19 21:36 Aisha Tammy
  0 siblings, 0 replies; 169+ messages in thread
From: Aisha Tammy @ 2020-12-19 21:36 UTC (permalink / raw
  To: gentoo-commits

commit:     58fa9b589bcdae2c7e9bdaa7ac34a0a32a18f631
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Wed Dec 16 12:38:35 2020 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Sat Dec 19 14:53:18 2020 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=58fa9b58

eclass/rpm-extended: add eclass

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
Closes: https://github.com/gentoo/sci/pull/996
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>

 eclass/rpm-extended.eclass | 131 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 131 insertions(+)

diff --git a/eclass/rpm-extended.eclass b/eclass/rpm-extended.eclass
new file mode 100644
index 000000000..a4e334fd7
--- /dev/null
+++ b/eclass/rpm-extended.eclass
@@ -0,0 +1,131 @@
+# Copyright 1999-2020 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: rpm-extended.eclass
+# @MAINTAINER:
+# Andrew Ammerlaan <andrewammerlaan@riseup.net>
+# @AUTHOR:
+# Andrew Ammerlaan <andrewammerlaan@riseup.net>
+# Extension of the rpm.eclass by Alastair Tse <liquidx@gentoo.org>
+# @SUPPORTED_EAPIS: 6 7
+# @BLURB: An eclass that helps automating the creation of ebuilds for software only distributed through rpm
+# @DESCRIPTION:
+# This extends the rpm eclass to also installs *all* files in the rpm,
+# and extracts post/pre(un)install scripts and runs them.
+#
+# This is mostly useful when creating ebuilds for rpm files in bulk.
+# In cases when it is not doable to write a Gentoo specific src_install
+# and pkg_post/pre/install/rm functions for each ebuild.
+
+# The rpm eclass provides the pkg_unpack function we need
+inherit rpm
+
+case "${EAPI:-0}" in
+	0|1|2|3|4|5)
+		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
+		;;
+	6|7)
+		;;
+	*)
+		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
+		;;
+esac
+
+# Need rpm to extract scripts
+if [[ ${EAPI} == [7] ]]; then
+	BDEPEND="app-arch/rpm"
+else
+	DEPEND="app-arch/rpm"
+fi
+
+# Otherwise we get the S does not exist error
+S="${WORKDIR}"
+# Everything in the rpm is prebuilt
+QA_PREBUILT="*"
+
+# @FUNCTION: rpm-extended_src_compile
+# @DESCRIPTION:
+# As everything in the rpm file is prebuilt
+# we do not need to compile anything, therefore
+# we add an empty src_compile function to avoid
+# errors.
+rpm-extended_src_compile() {
+	# Nothing to do here
+	return
+}
+
+# @FUNCTION: rpm-extended_src_install
+# @DESCRIPTION:
+# The rpm has been extracted by the pkg_unpack
+# function from rpm.eclass. Now we just copy
+# everything over to the image directory, while
+# preserving permissions. If something is installed
+# to /usr/share/doc we move everything in there to
+# the correct Gentoo specific location: /usr/share/doc/${PF}
+rpm-extended_src_install() {
+	cp -a "${S}"/* "${ED}"
+	if [ -d "${ED}/usr/share/doc/" ]; then
+		# If this package contains docs, move to gentoo specific dir
+		mkdir "${ED}/usr/share/doc/${PF}" || die
+		for file in "${ED}/usr/share/doc"/* ; do
+			if [[ "${file}" == "${ED}/usr/share/doc/${PF}" ]]; then
+				continue
+			fi
+			mv "${file}" "${ED}/usr/share/doc/${PF}" || die
+		done
+	fi
+}
+
+# @FUNCTION: rpm-extended_pkg_preinst
+# @DESCRIPTION:
+# Some rpm files contain a preinstall script,
+# we extract this script, write it to a file
+# and execute it in the correct phase
+rpm-extended_pkg_preinst() {
+	for x in ${A}; do
+		rpm -qp --scripts "${DISTDIR}/${x}" | sed -n '/preinstall scriptlet (using \/bin\/sh):/,/scriptlet (using \/bin\/sh)/{//!p;}' > "preinst-${x}.sh"
+		chmod +x "preinst-${x}.sh"
+		bash "preinst-${x}.sh"
+	done
+}
+
+# @FUNCTION: rpm-extended_pkg_postinst
+# @DESCRIPTION:
+# Some rpm files contain a postinstall script,
+# we extract this script, write it to a file
+# and execute it in the correct phase
+rpm-extended_pkg_postinst() {
+	for x in ${A}; do
+		rpm -qp --scripts "${DISTDIR}/${x}" | sed -n '/postinstall scriptlet (using \/bin\/sh):/,/scriptlet (using \/bin\/sh)/{//!p;}' > "postinst-${x}.sh"
+		chmod +x "postinst-${x}.sh"
+		bash "postinst-${x}.sh"
+	done
+}
+
+# @FUNCTION: rpm-extended_pkg_prerm
+# @DESCRIPTION:
+# Some rpm files contain a preuninstall script,
+# we extract this script, write it to a file
+# and execute it in the correct phase
+rpm-extended_pkg_prerm() {
+	for x in ${A}; do
+		rpm -qp --scripts "${DISTDIR}/${x}" | sed -n '/preuninstall scriptlet (using \/bin\/sh):/,/scriptlet (using \/bin\/sh)/{//!p;}' > "prerm-${x}.sh"
+		chmod +x "prerm-${x}.sh"
+		bash "prerm-${x}.sh"
+	done
+}
+
+# @FUNCTION: rpm-extended_pkg_postrm
+# @DESCRIPTION:
+# Some rpm files contain a postuninstall script,
+# we extract this script, write it to a file
+# and execute it in the correct phase
+rpm-extended_pkg_postrm() {
+	for x in ${A}; do
+		rpm -qp --scripts "${DISTDIR}/${x}" | sed -n '/postuninstall scriptlet (using \/bin\/sh):/,/scriptlet (using \/bin\/sh)/{//!p;}' > "postrm-${x}.sh"
+		chmod +x "postrm-${x}.sh"
+		bash "postrm-${x}.sh"
+	done
+}
+
+EXPORT_FUNCTIONS src_compile src_install pkg_preinst pkg_postinst pkg_prerm pkg_postrm


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2020-12-19 21:38 Aisha Tammy
  0 siblings, 0 replies; 169+ messages in thread
From: Aisha Tammy @ 2020-12-19 21:38 UTC (permalink / raw
  To: gentoo-commits

commit:     2125a8480f858e6a1dc23441e2cab28152631af1
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Sat Dec 19 21:38:41 2020 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Sat Dec 19 21:38:41 2020 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=2125a848

Revert "eclass/rpm-extended: add eclass"

This reverts commit 58fa9b589bcdae2c7e9bdaa7ac34a0a32a18f631.

Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>

 eclass/rpm-extended.eclass | 131 ---------------------------------------------
 1 file changed, 131 deletions(-)

diff --git a/eclass/rpm-extended.eclass b/eclass/rpm-extended.eclass
deleted file mode 100644
index a4e334fd7..000000000
--- a/eclass/rpm-extended.eclass
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2020 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: rpm-extended.eclass
-# @MAINTAINER:
-# Andrew Ammerlaan <andrewammerlaan@riseup.net>
-# @AUTHOR:
-# Andrew Ammerlaan <andrewammerlaan@riseup.net>
-# Extension of the rpm.eclass by Alastair Tse <liquidx@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7
-# @BLURB: An eclass that helps automating the creation of ebuilds for software only distributed through rpm
-# @DESCRIPTION:
-# This extends the rpm eclass to also installs *all* files in the rpm,
-# and extracts post/pre(un)install scripts and runs them.
-#
-# This is mostly useful when creating ebuilds for rpm files in bulk.
-# In cases when it is not doable to write a Gentoo specific src_install
-# and pkg_post/pre/install/rm functions for each ebuild.
-
-# The rpm eclass provides the pkg_unpack function we need
-inherit rpm
-
-case "${EAPI:-0}" in
-	0|1|2|3|4|5)
-		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
-		;;
-	6|7)
-		;;
-	*)
-		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
-		;;
-esac
-
-# Need rpm to extract scripts
-if [[ ${EAPI} == [7] ]]; then
-	BDEPEND="app-arch/rpm"
-else
-	DEPEND="app-arch/rpm"
-fi
-
-# Otherwise we get the S does not exist error
-S="${WORKDIR}"
-# Everything in the rpm is prebuilt
-QA_PREBUILT="*"
-
-# @FUNCTION: rpm-extended_src_compile
-# @DESCRIPTION:
-# As everything in the rpm file is prebuilt
-# we do not need to compile anything, therefore
-# we add an empty src_compile function to avoid
-# errors.
-rpm-extended_src_compile() {
-	# Nothing to do here
-	return
-}
-
-# @FUNCTION: rpm-extended_src_install
-# @DESCRIPTION:
-# The rpm has been extracted by the pkg_unpack
-# function from rpm.eclass. Now we just copy
-# everything over to the image directory, while
-# preserving permissions. If something is installed
-# to /usr/share/doc we move everything in there to
-# the correct Gentoo specific location: /usr/share/doc/${PF}
-rpm-extended_src_install() {
-	cp -a "${S}"/* "${ED}"
-	if [ -d "${ED}/usr/share/doc/" ]; then
-		# If this package contains docs, move to gentoo specific dir
-		mkdir "${ED}/usr/share/doc/${PF}" || die
-		for file in "${ED}/usr/share/doc"/* ; do
-			if [[ "${file}" == "${ED}/usr/share/doc/${PF}" ]]; then
-				continue
-			fi
-			mv "${file}" "${ED}/usr/share/doc/${PF}" || die
-		done
-	fi
-}
-
-# @FUNCTION: rpm-extended_pkg_preinst
-# @DESCRIPTION:
-# Some rpm files contain a preinstall script,
-# we extract this script, write it to a file
-# and execute it in the correct phase
-rpm-extended_pkg_preinst() {
-	for x in ${A}; do
-		rpm -qp --scripts "${DISTDIR}/${x}" | sed -n '/preinstall scriptlet (using \/bin\/sh):/,/scriptlet (using \/bin\/sh)/{//!p;}' > "preinst-${x}.sh"
-		chmod +x "preinst-${x}.sh"
-		bash "preinst-${x}.sh"
-	done
-}
-
-# @FUNCTION: rpm-extended_pkg_postinst
-# @DESCRIPTION:
-# Some rpm files contain a postinstall script,
-# we extract this script, write it to a file
-# and execute it in the correct phase
-rpm-extended_pkg_postinst() {
-	for x in ${A}; do
-		rpm -qp --scripts "${DISTDIR}/${x}" | sed -n '/postinstall scriptlet (using \/bin\/sh):/,/scriptlet (using \/bin\/sh)/{//!p;}' > "postinst-${x}.sh"
-		chmod +x "postinst-${x}.sh"
-		bash "postinst-${x}.sh"
-	done
-}
-
-# @FUNCTION: rpm-extended_pkg_prerm
-# @DESCRIPTION:
-# Some rpm files contain a preuninstall script,
-# we extract this script, write it to a file
-# and execute it in the correct phase
-rpm-extended_pkg_prerm() {
-	for x in ${A}; do
-		rpm -qp --scripts "${DISTDIR}/${x}" | sed -n '/preuninstall scriptlet (using \/bin\/sh):/,/scriptlet (using \/bin\/sh)/{//!p;}' > "prerm-${x}.sh"
-		chmod +x "prerm-${x}.sh"
-		bash "prerm-${x}.sh"
-	done
-}
-
-# @FUNCTION: rpm-extended_pkg_postrm
-# @DESCRIPTION:
-# Some rpm files contain a postuninstall script,
-# we extract this script, write it to a file
-# and execute it in the correct phase
-rpm-extended_pkg_postrm() {
-	for x in ${A}; do
-		rpm -qp --scripts "${DISTDIR}/${x}" | sed -n '/postuninstall scriptlet (using \/bin\/sh):/,/scriptlet (using \/bin\/sh)/{//!p;}' > "postrm-${x}.sh"
-		chmod +x "postrm-${x}.sh"
-		bash "postrm-${x}.sh"
-	done
-}
-
-EXPORT_FUNCTIONS src_compile src_install pkg_preinst pkg_postinst pkg_prerm pkg_postrm


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2021-01-19 17:02 Andrew Ammerlaan
  0 siblings, 0 replies; 169+ messages in thread
From: Andrew Ammerlaan @ 2021-01-19 17:02 UTC (permalink / raw
  To: gentoo-commits

commit:     b216e0b88fc441ee16821f6c57a4e8ba38db5307
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Tue Jan 19 17:01:42 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Jan 19 17:01:42 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=b216e0b8

eclass/ remove unused eclass

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/mpi.eclass | 478 ------------------------------------------------------
 1 file changed, 478 deletions(-)

diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
deleted file mode 100644
index 3c6537196..000000000
--- a/eclass/mpi.eclass
+++ /dev/null
@@ -1,478 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: mpi.eclass
-# @MAINTAINER:
-#	Justin Bronder <jsbronder@gentoo.org>
-# @BLURB: Common functions for mpi-pkg.eclass and mpi-imp.eclass
-
-# History:
-#	2009-06-26 (jsbronder):  Add ability to require common use flags.
-#		Remove dep on eselect-mpi (it's in sys-cluster/empi)
-#		Use virtual/$class to get imp dep in mpi_pkg_deplist.
-#	2008-11-20 (jsbronder):  Initial rewrite from old mpi.eclass
-
-if [[ ! ${_MPI_ECLASS} ]]; then
-
-case ${EAPI:-0} in
-	2|3|4|5)
-		inherit multilib ;;
-	6) ;;
-	*) die "EAPI=${EAPI} is not supported" ;;
-esac
-
-#####################
-# Private Variables #
-#####################
-
-# @ECLASS-VARIABLE: __MPI_ALL_IMPLEMENTATION_PNS
-# @INTERNAL
-# @DESCRIPTION:
-# All known mpi implementations
-__MPI_ALL_IMPLEMENTATION_PNS="mpich mpich2 openmpi lam-mpi openib-mvapich2"
-
-# @ECLASS-VARIABLE: __MPI_ALL_CLASSABLE_PNS
-# @INTERNAL
-# @DESCRIPTION:
-# All mpi implentations that can be classed.
-__MPI_ALL_CLASSABLE_PNS="mpich openmpi mpich2 lam-mpi"
-
-
-
-###################################################################
-# Generic Functions that are used by Implementations and Packages #
-###################################################################
-
-# @ECLASS-VARIABLE: MPI_UNCLASSED_DEP_STR
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# String inserted into the deplist when not using a classed
-# install.
-
-# @FUNCTION: mpi_classed
-# @RETURN: True if this build is classed.
-mpi_classed() {
-	[[ ${CATEGORY} == mpi-* ]]
-}
-
-#empi has no support for multilib yet
-mpi_classed && [[ ${_MULTILIB_BUILD} ]] && REQUIRED_USE="abi_x86_64? ( !abi_x86_32 )"
-
-# @FUNCTION: mpi_class
-# @RETURN: The name of the current class, or nothing if unclassed.
-mpi_class() {
-	mpi_classed && echo "${CATEGORY}"
-}
-
-# @FUNCTION: mpi_root
-# @RETURN: The root path that packages should start installing to.  In the end,
-# the majority of a package will will install to ${ROOT}$(mpi_root).
-mpi_root() {
-	if mpi_classed; then
-		echo "/usr/$(get_libdir)/mpi/$(mpi_class)/"
-	else
-		echo "/"
-	fi
-}
-
-# @FUNCTION: mpi_econf_args
-# @DESCRIPTION:
-# If classed, returns a list of arguments for econf that sets the
-# default install locations correctly.  Should be first in the list of arguments
-# to econf so that any unsuitable options can be overwritten.
-mpi_econf_args() {
-	if mpi_classed; then
-		local d=$(mpi_root)
-		local c=$(mpi_class)
-		local a="
-			--prefix=${d}usr
-			--mandir=${d}usr/share/man
-			--infodir=${d}usr/share/info
-			--datadir=${d}usr/share
-			--sysconfdir=/etc/${c}
-			--localstatedir=/var/lib/${c}"
-		echo "${a}"
-	fi
-}
-
-# @FUNCTION: _mpi_do
-# @USAGE: <Standard ebuild command to replicate>
-# @DESCRIPTION:
-# Large wrapping class for all of the {do,new}* commands that need
-# to respect the new root to install to.  Works with unclassed builds as well.
-# Currently supports:
-#
-# @CODE
-# dobin    newbin    dodoc     newdoc
-# doexe    newexe    dohtml    dolib
-# dolib.a  newlib.a  dolib.so  newlib.so
-# dosbin   newsbin   doman     newman
-# doinfo   dodir     dohard    doins
-# dosym
-# @CODE
-_mpi_do() {
-	local rc prefix d
-	local cmd=${1}
-	local ran=1
-	local slash=/
-	local mdir="$(mpi_root)"
-
-	if ! mpi_classed; then
-		$*
-		return ${?}
-	fi
-
-	shift
-	if [ "${cmd#do}" != "${cmd}" ]; then
-		prefix="do"; cmd=${cmd#do}
-	elif [ "${cmd#new}" != "${cmd}" ]; then
-		prefix="new"; cmd=${cmd#new}
-	else
-		die "Unknown command passed to _mpi_do: ${cmd}"
-	fi
-	case ${cmd} in
-		bin|lib|lib.a|lib.so|sbin)
-			DESTTREE="${mdir}usr" ${prefix}${cmd} $*
-			rc=$?;;
-		doc)
-			_E_DOCDESTTREE_="../../../../${mdir}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" \
-				${prefix}${cmd} $*
-			rc=$?
-			for d in "/share/doc/${P}" "/share/doc" "/share"; do
-				rmdir ${D}/usr${d} &>/dev/null
-			done
-			;;
-		html)
-			_E_DOCDESTTREE_="../../../../${mdir}usr/share/doc/${PF}/www/${_E_DOCDESTTREE_}" \
-				${prefix}${cmd} $*
-			rc=$?
-			for d in "/share/doc/${P}/html" "/share/doc/${P}" "/share/doc" "/share"; do
-				rmdir ${D}/usr${d} &>/dev/null
-			done
-			;;
-		exe)
-			_E_EXEDESTTREE_="${mdir}${_E_EXEDESTTREE_}" ${prefix}${cmd} $*
-			rc=$?;;
-		man|info)
-			[ -d "${D}"usr/share/${cmd} ] && mv "${D}"usr/share/${cmd}{,-orig}
-			[ ! -d "${D}"${mdir}usr/share/${cmd} ] \
-				&& install -d "${D}"${mdir}usr/share/${cmd}
-			[ ! -d "${D}"usr/share ] \
-				&& install -d "${D}"usr/share
-
-			ln -snf ../../${mdir}usr/share/${cmd} ${D}usr/share/${cmd}
-			${prefix}${cmd} $*
-			rc=$?
-			rm "${D}"usr/share/${cmd}
-			[ -d "${D}"usr/share/${cmd}-orig ] \
-				&& mv "${D}"usr/share/${cmd}{-orig,}
-			[ "$(find "${D}"usr/share/)" == "${D}usr/share/" ] \
-				&& rmdir "${D}usr/share"
-			;;
-		dir)
-			dodir "${@/#${slash}/${mdir}${slash}}"; rc=$?;;
-		hard|sym)
-			${prefix}${cmd} "${mdir}$1" "${mdir}/$2"; rc=$?;;
-		ins)
-			INSDESTTREE="${mdir}${INSTREE}" ${prefix}${cmd} $*; rc=$?;;
-		*)
-			rc=0;;
-	esac
-
-	[[ ${ran} -eq 0 ]] && die "mpi_do passed unknown command: ${cmd}"
-	return ${rc}
-}
-mpi_dobin()     { _mpi_do "dobin"        $*; }
-mpi_newbin()    { _mpi_do "newbin"       $*; }
-mpi_dodoc()     { _mpi_do "dodoc"        $*; }
-mpi_newdoc()    { _mpi_do "newdoc"       $*; }
-mpi_doexe()     { _mpi_do "doexe"        $*; }
-mpi_newexe()    { _mpi_do "newexe"       $*; }
-mpi_dohtml()    { _mpi_do "dohtml"       $*; }
-mpi_dolib()     { _mpi_do "dolib"        $*; }
-mpi_dolib.a()   { _mpi_do "dolib.a"      $*; }
-mpi_newlib.a()  { _mpi_do "newlib.a"     $*; }
-mpi_dolib.so()  { _mpi_do "dolib.so"     $*; }
-mpi_newlib.so() { _mpi_do "newlib.so"    $*; }
-mpi_dosbin()    { _mpi_do "dosbin"       $*; }
-mpi_newsbin()   { _mpi_do "newsbin"      $*; }
-mpi_doman()     { _mpi_do "doman"        $*; }
-mpi_newman()    { _mpi_do "newman"       $*; }
-mpi_doinfo()    { _mpi_do "doinfo"       $*; }
-mpi_dodir()     { _mpi_do "dodir"        $*; }
-mpi_dohard()    { _mpi_do "dohard"       $*; }
-mpi_doins()     { _mpi_do "doins"        $*; }
-mpi_dosym()     { _mpi_do "dosym"        $*; }
-
-
-###########################################
-# Functions for MPI Implementation Builds #
-###########################################
-
-# @FUNCTION: mpi_imp_deplist
-# @DESCRIPTION:
-# To be written
-# @RETURNS: Returns a deplist that handles the blocking between mpi
-# implementations, and any blockers as specified in MPI_UNCLASSED_DEP_STR
-mpi_imp_deplist() {
-	local c="sys-cluster"
-	local pn ver
-
-	mpi_classed && c="${CATEGORY}"
-	ver=""
-	for pn in ${__MPI_ALL_IMPLEMENTATION_PNS}; do
-		ver="${ver} !${c}/${pn}"
-	done
-	if ! mpi_classed && [ -n "${MPI_UNCLASSED_DEP_STR}" ]; then
-		ver="${ver} ${MPI_UNCLASSED_DEP_STR}"
-	else
-		ver="${ver} sys-cluster/empi"
-	fi
-	echo "${ver}"
-}
-
-# @FUNCTION: mpi_imp_add_eselect
-# @DESCRIPTION:
-# To be written
-mpi_imp_add_eselect() {
-	mpi_classed || return 0
-	local c=$(mpi_class)
-	cp "${FILESDIR}"/${MPI_ESELECT_FILE} ${T}/${c}.eselect || die
-	sed -i \
-		-e "s|@ROOT@|$(mpi_root)|g" \
-		-e "s|@LIBDIR@|$(get_libdir)|g" \
-		-e "s|@BASE_IMP@|${PN}|g" \
-		${T}/${c}.eselect || die
-
-	eselect mpi add "${T}"/${c}.eselect || die
-}
-
-
-
-########################################
-# Functions for packages requiring MPI #
-########################################
-
-# @ECLASS-VARIABLE: MPI_PKG_NEED_IMPS
-# @DESCRIPTION:
-# List of package names (${PN}) that this package is compatible
-# with.  Default is the list of all mpi implementations
-MPI_PKG_NEED_IMPS="${MPI_PKG_NEED_IMPS:-${__MPI_ALL_CLASSABLE_PNS}}"
-
-
-# @ECLASS-VARIABLE: MPI_PKG_USE_CXX
-# @DESCRIPTION:
-# Require a mpi implementation with c++ enabled.
-# This feature requires EAPI 2 style use dependencies
-MPI_PKG_USE_CXX="${MPI_PKG_USE_CXX:-0}"
-
-# @ECLASS-VARIABLE: MPI_PKG_USE_FC
-# @DESCRIPTION:
-# Require a mpi implementation with fortran enabled.
-# This feature requires EAPI 2 style use dependencies
-MPI_PKG_USE_FC="${MPI_PKG_USE_FC:-0}"
-
-# @ECLASS-VARIABLE: MPI_PKG_USE_ROMIO
-# @DESCRIPTION:
-# Require a mpi implementation with romio enabled.
-# This feature requires EAPI 2 style use dependencies
-MPI_PKG_USE_ROMIO="${MPI_PKG_USE_ROMIO:-0}"
-
-# @ECLASS-VARIABLE: MPI_PKG_USE_THREADS
-# @DESCRIPTION:
-# Require a mpi implementation with threads enabled.
-# This feature requires EAPI 2 style use dependencies
-MPI_PKG_USE_THREADS="${MPI_PKG_USE_THREADS:-0}"
-
-# @ECLASS-VARIABLE: MPI_PKG_USE_DEPS
-# @DESCRIPTION:
-# Set the use deps for the virtual mpi package
-# directly.  For instance, if set to 'fortran=,threads?' then a dep on
-# virtual/mpi[fortran=,threads?] will be added.
-# This feature requires EAPI 2 style use dependencies
-MPI_PKG_USE_DEPS="${MPI_PKG_USE_DEPS}"
-
-
-# @FUNCTION: mpi_pkg_deplist
-# @DESCRIPTION:
-# To be written
-# @RETURN: Returns a deplist comprised of valid implementations and any blockers
-# depending on if this package is building with mpi class support.
-mpi_pkg_deplist() {
-	local pn pn2 ver usedeps invalid_imps inval
-
-	case "${EAPI}" in
-		2|3|4|5)
-			[[ ${MPI_PKG_USE_CXX} -ne 0 ]] \
-				&& usedeps=",cxx"
-			[[ ${MPI_PKG_USE_FC} -ne 0 ]] \
-				&& usedeps="${usedeps},fortran"
-			[[ ${MPI_PKG_USE_ROMIO} -ne 0 ]] \
-				&& usedeps="${usedeps},romio"
-			[[ "${MPI_PKG_USE_THREADS}" -ne 0 ]] \
-				&& usedeps="${usedeps},threads"
-			[ -n "${MPI_PKG_USE_DEPS}" ] \
-				&& usedeps="${usedeps},${MPI_PKG_USE_DEPS}"
-			;;
-		*)
-			;;
-	esac
-
-	if mpi_classed; then
-		ver="sys-cluster/empi virtual/$(mpi_class)"
-	else
-		ver="virtual/mpi"
-	fi
-
-	if [ -n "${usedeps}" ]; then
-		ver="${ver}[${usedeps:1}]"
-	fi
-
-	if ! mpi_classed && [ -n "${MPI_UNCLASSED_DEP_STR}" ]; then
-		ver="${ver} ${MPI_UNCLASSED_DEP_STR}"
-	fi
-
-	for pn in ${__MPI_ALL_IMPLEMENTATION_PNS}; do
-		inval=1
-		for pn2 in ${MPI_PKG_NEED_IMPS}; do
-			if [ "${pn}" == "${pn2}" ]; then
-				inval=0
-				break;
-			fi
-		done
-		[[ ${inval} -eq 1 ]] \
-			&& invalid_imps="${invalid_imps} ${pn}"
-	done
-
-	for pn in ${inval_imps}; do
-		ver="${ver} !${c}/${pn}"
-	done
-	echo "${ver}"
-}
-
-# @FUNCTION: mpi_pkg_base_imp
-# @DESCRIPTION:
-# To be written
-# @RETURNS:
-# Returns the ${PN} of the package providing mpi support.   Works
-# even when using an unclassed mpi build.
-mpi_pkg_base_imp() {
-	if mpi_classed; then
-		echo "$(_get_eselect_var CLASS_BASE_MPI_IMP)"
-	else
-		local pn
-		for pn in ${MPI_PKG_NEED_IMPS}; do
-			if has_version "sys-cluster/${pn}"; then
-				echo "${PN}"
-			fi
-		done
-	fi
-}
-
-# @FUNCTION: mpi_pkg_cc
-# @DESCRIPTION:
-#  Returns the full path to the mpi C compiler.  Trys to find one
-# even if this build is unclassed.  If return is empty, user should assume the
-# implementation does not support this compiler
-mpi_pkg_cc()  { _mpi_pkg_compiler "MPI_CC"  "cc";      }
-
-# @FUNCTION: mpi_pkg_cxx
-# @DESCRIPTION:
-# Returns the full path to the mpi C++ compiler.  Trys to find one
-# even if this build is unclassed.  If return is empty, user should assume the
-# implementation does not support this compiler
-mpi_pkg_cxx() { _mpi_pkg_compiler "MPI_CXX" "cxx c++"; }
-
-# @FUNCTION: mpi_pkg_fc
-# @DESCRIPTION:
-# Returns the full path to the mpi f90 compiler.  Trys to find one
-# even if this build is unclassed.  If return is empty, user should assume the
-# implementation does not support this compiler
-mpi_pkg_fc()  { _mpi_pkg_compiler "MPI_FC"  "f90 fc";  }
-
-# @FUNCTION: mpi_pkg_f77
-# @DESCRIPTION:
-# Returns the full path to the mpi f77 compiler.  Trys to find one
-# even if this build is unclassed.  If return is empty, user should assume the
-# implementation does not support this compiler
-mpi_pkg_f77() { _mpi_pkg_compiler "MPI_F77" "f77";     }
-
-
-# @FUNCTION:  mpi_pkg_set_ld_library_path
-# @DESCRIPTION:
-# Adds the correct path(s) to the end of LD_LIBRARY_PATH.  Does
-# nothing if the build is unclassed.
-mpi_pkg_set_ld_library_path() {
-	if mpi_classed; then
-		export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(_get_eselect_var LD_LIBRARY_PATH)"
-	fi
-}
-
-# @FUNCTION: _mpi_pkg_compiler
-# @DESCRIPTION:
-# If classed, we can ask eselect-mpi.  Otherwise we'll look for some common
-# executable names in ${ROOT}usr/bin.
-_mpi_pkg_compiler() {
-	if mpi_classed; then
-		echo "$(eselect mpi printvar $(mpi_class) ${1})"
-	else
-		local suffixes=${2}
-		local p
-
-		for p in ${suffixes}; do
-			if [ -x ${ROOT}usr/bin/mpi${p} ]; then
-				echo "${ROOT}usr/bin/mpi${p}"
-				break
-			fi
-		done
-	fi
-}
-
-# @FUNCTION: mpi_pkg_set_env
-# @DESCRIPTION:
-# Exports 'some influential environment variables'.  CC, CXX, F77, FC
-mpi_pkg_set_env() {
-	if mpi_classed; then
-		_mpi_oCC=$CC
-		_mpi_oCXX=$CXX
-		_mpi_oF77=$F77
-		_mpi_oFC=$FC
-		_mpi_oPCP=${PKG_CONFIG_PATH}
-		_mpi_oLLP=${LD_LIBRARY_PATH}
-		export CC=$(mpi_pkg_cc)
-		export CXX=$(mpi_pkg_cxx)
-		export F77=$(mpi_pkg_f77)
-		export FC=$(mpi_pkg_fc)
-		export PKG_CONFIG_PATH="$(mpi_root)$(get_libdir)/pkgconfig:${PKG_CONFIG_PATH}"
-		mpi_pkg_set_ld_library_path
-	fi
-}
-
-# @FUNCTION: mpi_pkg_restore_env
-# @DESCRIPTION:
-# Attempts to undo the damage done by mpi_pkg_set_env
-mpi_pkg_restore_env() {
-	if mpi_classed; then
-		export CC=$_mpi_oCC
-		export CXX=$_mpi_oCXX
-		export F77=$_mpi_oF77
-		export FC=$_mpi_oFC
-		export PKG_CONFIG_PATH=$_mpi_oPCP
-		export LD_LIBRARY_PATH=$_mpi_oLLP
-	fi
-}
-
-
-
-# @FUNCTION: _get_eselect_var
-# @USAGE: <Variable to get from the class definition>
-# @RETURN: If classed, and given a valid variable, the contents; empty
-# otherwise.
-_get_eselect_var() {
-	if mpi_classed && [ -n "${1}" ]; then
-		echo "$(eselect mpi printvar $(mpi_class) ${1} 2>/dev/null)"
-	fi
-}
-
-_MPI_ECLASS=1
-fi


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2021-01-30 10:04 Andrew Ammerlaan
  0 siblings, 0 replies; 169+ messages in thread
From: Andrew Ammerlaan @ 2021-01-30 10:04 UTC (permalink / raw
  To: gentoo-commits

commit:     555121f6fd88b94cc3afacd27841d36f06a08cb6
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Sat Jan 30 10:03:34 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sat Jan 30 10:03:34 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=555121f6

eclass/numeric-int64-multibuild.eclass: use_if_iuse is deprecated

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/numeric-int64-multibuild.eclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass
index f720356a3..6ed9c1158 100644
--- a/eclass/numeric-int64-multibuild.eclass
+++ b/eclass/numeric-int64-multibuild.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: numeric-int64-multilib.eclass
@@ -122,9 +122,9 @@ numeric-int64_get_module_name() {
 	fi
 	# choose posix threads over openmp when the two are set
 	# yet to see the need of having the two profiles simultaneously
-	if use_if_iuse threads; then
+	if in_iuse threads && use threads; then
 		module_name+="-threads"
-	elif use_if_iuse openmp; then
+	elif in_iuse openmp && use openmp; then
 		module_name+="-openmp"
 	fi
 	echo "${module_name}"
@@ -239,7 +239,7 @@ numeric-int64_get_multibuild_int_variants() {
 	debug-print-function ${FUNCNAME} "${@}"
 	local MULTIBUILD_VARIANTS=( int32 ) variant
 
-	use_if_iuse int64 && MULTIBUILD_VARIANTS+=( int64 )
+	in_iuse int64 && use int64 && MULTIBUILD_VARIANTS+=( int64 )
 
 	echo "${MULTIBUILD_VARIANTS[@]}"
 }
@@ -251,7 +251,7 @@ numeric-int64_get_multibuild_int_variants() {
 numeric-int64_get_multibuild_variants() {
 	debug-print-function ${FUNCNAME} "${@}"
 	local MULTIBUILD_VARIANTS=$(numeric-int64_get_multibuild_int_variants)
-	if use_if_iuse static-libs; then
+	if in_iuse static-libs && use static-libs; then
 		for variant in ${MULTIBUILD_VARIANTS[@]}; do
 			MULTIBUILD_VARIANTS+=( static_${variant} )
 		done


^ permalink raw reply related	[flat|nested] 169+ messages in thread

* [gentoo-commits] proj/sci:master commit in: eclass/
@ 2021-01-30 15:24 Andrew Ammerlaan
  0 siblings, 0 replies; 169+ messages in thread
From: Andrew Ammerlaan @ 2021-01-30 15:24 UTC (permalink / raw
  To: gentoo-commits

commit:     3a1954b7558ec11fd93b907643f8f1dd63fa8854
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Sat Jan 30 15:24:33 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sat Jan 30 15:24:33 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=3a1954b7

eclass/numeric-int64-multibuild.eclass: fix @ECLASS variable

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 eclass/numeric-int64-multibuild.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/numeric-int64-multibuild.eclass b/eclass/numeric-int64-multibuild.eclass
index 6ed9c1158..9dd23cebf 100644
--- a/eclass/numeric-int64-multibuild.eclass
+++ b/eclass/numeric-int64-multibuild.eclass
@@ -1,7 +1,7 @@
 # Copyright 1999-2021 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-# @ECLASS: numeric-int64-multilib.eclass
+# @ECLASS: numeric-int64-multibuild.eclass
 # @MAINTAINER:
 # sci team <sci@gentoo.org>
 # @AUTHOR:
@@ -9,7 +9,7 @@
 # Author: Justin Lecher <jlec@gentoo.org>
 # @BLURB: Build functions for Fortran multilib int64 multibuild packages
 # @DESCRIPTION:
-# The numeric-int64-multilib.eclass exports USE flags and utility functions
+# The numeric-int64-multibuild.eclass exports USE flags and utility functions
 # necessary to build packages for multilib int64 multibuild in a clean
 # and uniform manner.
 


^ permalink raw reply related	[flat|nested] 169+ messages in thread

end of thread, other threads:[~2021-01-30 15:24 UTC | newest]

Thread overview: 169+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-10 19:00 [gentoo-commits] proj/sci:master commit in: eclass/ Justin Lecher
  -- strict thread matches above, loose matches on Subject: below --
2021-01-30 15:24 Andrew Ammerlaan
2021-01-30 10:04 Andrew Ammerlaan
2021-01-19 17:02 Andrew Ammerlaan
2020-12-19 21:38 Aisha Tammy
2020-12-19 21:36 Aisha Tammy
2020-10-01  1:43 Aisha Tammy
2018-10-28  6:21 Justin Lecher
2018-08-31  3:04 Matthias Maier
2018-04-03 16:44 Matthias Maier
2018-04-03 16:44 Matthias Maier
2018-04-02 11:20 Justin Lecher
2018-01-27 20:29 [gentoo-commits] proj/sci:jlec/scilab " Justin Lecher
2018-01-27 20:28 ` [gentoo-commits] proj/sci:master " Justin Lecher
2017-12-25 20:33 Justin Lecher
2017-08-29 13:52 Benda XU
2017-08-25  6:10 Benda XU
2017-08-23  3:15 Benda XU
2017-06-06  4:12 Benda XU
2017-04-30  7:47 Justin Lecher
2017-03-07  7:45 Marius Brehler
2017-02-24 14:14 Marius Brehler
2017-02-24 13:59 Marius Brehler
2016-12-10 10:51 Justin Lecher
2016-08-29 20:45 Justin Bronder
2016-07-31 21:13 Justin Lecher
2016-02-22 13:25 Justin Lecher
2016-02-19 10:12 Justin Lecher
2016-02-15  8:19 Justin Lecher
2016-02-15  8:19 Justin Lecher
2016-02-10 18:27 Justin Lecher
2016-02-10 18:27 Justin Lecher
2016-02-10 18:27 Justin Lecher
2016-02-10 18:27 Justin Lecher
2015-12-27 16:19 Justin Lecher
2015-12-27 16:19 Justin Lecher
2015-12-27 16:19 Justin Lecher
2015-12-14  7:53 Justin Lecher
2015-12-04  7:01 Justin Lecher
2015-12-03 10:03 Justin Lecher
2015-11-29 10:17 Justin Lecher
2015-11-29 10:17 Justin Lecher
2015-11-29 10:17 Justin Lecher
2015-11-29 10:17 Justin Lecher
2015-11-29 10:17 Justin Lecher
2015-11-28 18:59 Justin Lecher
2015-08-20 23:29 Christoph Junghans
2015-05-24  8:14 Justin Lecher
2015-03-28 18:29 Justin Lecher
2015-03-28 16:41 Justin Lecher
2015-02-21 10:01 Justin Lecher
2015-02-18  9:06 Justin Lecher
2015-02-05  8:01 Justin Lecher
2015-01-26  7:19 Justin Lecher
2015-01-10 13:35 Justin Lecher
2014-12-02 15:36 Justin Lecher
2014-12-02 15:36 Justin Lecher
2014-12-02 15:36 Justin Lecher
2014-09-15 12:01 Justin Lecher
2014-05-26  7:07 Justin Lecher
2014-05-23  9:14 Justin Lecher
2014-01-22 10:11 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-22 10:09 Reinis Danne
2014-01-21 19:38 Reinis Danne
2014-01-04 18:11 Justin Lecher
2013-11-26  5:28 Sebastien Fabbro
2013-11-26  5:28 Sebastien Fabbro
2013-07-24  9:17 Justin Lecher
2013-07-24  9:17 Justin Lecher
2013-07-22 13:14 Justin Lecher
2013-07-19 18:27 Alexey Shvetsov
2013-07-09  1:17 Justin Bronder
2013-07-02  2:15 Justin Bronder
2013-07-02  0:09 Justin Bronder
2013-02-14 16:32 Denis Dupeyron
2013-02-14 16:32 Denis Dupeyron
2013-01-24 19:47 Sebastien Fabbro
2013-01-15 15:27 Justin Lecher
2013-01-11 20:45 Justin Bronder
2012-11-30  3:31 Christoph Junghans
2012-11-29 21:05 Justin Lecher
2012-11-29 21:05 Justin Lecher
2012-11-29  7:03 Justin Lecher
2012-11-29  7:03 Justin Lecher
2012-11-29  7:03 Justin Lecher
2012-11-29  7:03 Justin Lecher
2012-11-28  7:22 Justin Lecher
2012-11-28  5:29 Christoph Junghans
2012-11-27 19:33 Justin Lecher
2012-11-27 19:33 Justin Lecher
2012-11-27 19:33 Justin Lecher
2012-11-27 19:33 Justin Lecher
2012-11-27 19:33 Justin Lecher
2012-11-27 19:33 Justin Lecher
2012-11-27 19:33 Justin Lecher
2012-11-27 19:33 Justin Lecher
2012-11-27 19:33 Justin Lecher
2012-11-27 19:33 Justin Lecher
2012-11-27 19:33 Justin Lecher
2012-11-26 22:02 Justin Lecher
2012-11-26 22:02 Justin Lecher
2012-11-26 22:02 Justin Lecher
2012-11-26 22:02 Justin Lecher
2012-11-26 22:02 Justin Lecher
2012-11-02 19:54 Justin Lecher
2012-11-02 19:46 Justin Lecher
2012-11-02 19:43 Justin Lecher
2012-10-04 14:39 Christoph Junghans
2012-09-20 12:45 Justin Lecher
2012-08-30  8:38 Justin Lecher
2012-08-09  5:15 Christoph Junghans
2012-07-27 22:10 Sebastien Fabbro
2012-04-27 11:42 Justin Lecher
2012-04-27 11:42 Justin Lecher
2012-02-16 22:35 Sebastien Fabbro
2012-01-31 18:15 Sebastien Fabbro
2011-10-25 17:16 Justin Lecher
2011-10-23 21:53 Justin Lecher
2011-10-23 21:53 Justin Lecher
2011-10-05  7:54 Justin Lecher
2011-08-03 23:55 Andrea Arteaga
2011-07-18  9:09 Andreas Hüttel
2011-07-17 19:55 Andreas Hüttel
2011-07-17 18:26 Andreas Hüttel
2011-07-17 18:02 Andreas Hüttel
2011-07-17 17:53 Andreas Hüttel
2011-07-17 17:03 Andreas Hüttel
2011-07-17 17:03 Andreas Hüttel
2011-06-30 16:57 Alexey Shvetsov
2011-06-30 16:47 Alexey Shvetsov
2011-06-30 16:45 Alexey Shvetsov
2011-06-21 11:54 Justin Lecher
2011-06-20  5:20 Justin Lecher
2011-06-20  5:20 Justin Lecher
2011-06-15 21:30 Justin Lecher
2011-06-15 20:50 Justin Lecher
2011-06-15  6:32 Justin Lecher
2011-06-13 10:27 Justin Lecher
2011-06-13  8:29 Kacper Kowalik
2011-06-13  8:20 Justin Lecher
2011-06-12 15:09 Kacper Kowalik
2011-06-12 14:52 Kacper Kowalik
2011-06-12 14:39 Justin Lecher
2011-06-12 13:41 Justin Lecher
2011-06-12 12:16 Justin Lecher
2011-06-12 11:57 Kacper Kowalik
2011-06-12 11:24 Kacper Kowalik
2011-06-12 10:53 Justin Lecher
2011-05-19  5:56 Justin Lecher
2011-04-04 11:18 Justin Lecher
2011-03-22  6:58 Justin Lecher
2011-03-20 16:28 Justin Lecher
2011-03-15 10:24 Justin Lecher
2011-03-15  7:25 Justin Lecher
2011-03-15  7:16 Justin Lecher
2011-03-14  9:25 Justin Lecher
2011-03-10 19:00 Justin Lecher
2011-03-10 19:00 Justin Lecher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox