Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 89911 Details for
Bug 137730
cernlib-2005.ebuild (new package)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
CERNLIB ebuild
cernlib-2005.ebuild (text/plain), 6.72 KB, created by
Hamlet
on 2006-06-23 06:51:27 UTC
(
hide
)
Description:
CERNLIB ebuild
Filename:
MIME Type:
Creator:
Hamlet
Created:
2006-06-23 06:51:27 UTC
Size:
6.72 KB
patch
obsolete
># Copyright 1999-2006 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ ># ># This ebuild is made splitting the suggested start_cern script provided ># as ${HOMEPAGE}/cernlib/install/start_cern ># ># Currently an error is presented by strip trying to strip a script (bin/paw). ># ># Use flags: ># - symlink : creates /opt/cern/current symbolic link to current CERN libraries ># - sources : they are installed in /opt/cern/$VERSION/src if required ># ># Updating and next versions: ># If a newer version of CERNLIB will ever be published, it should be sufficient ># to change the ebuild name to reflect the new year version; all patches in ># files directory with the name starting with the year are applies in no defined ># order (in src_unpack()). ># ># Note: version 2005 requires about 350 MB of free space in portage build ># directory. ># ># Known bugs: ># - minuit32, mathlib32, gcalor are not supported ># - it seems to work, but uses the linux.cf provided, which is not optimal ># > >inherit eutils > >YEAR=$PV >SRC_URI_BASE="http://cernlib.web.cern.ch/cernlib/download/${YEAR}_source/tar" > >DESCRIPTION="CERN libraries (plus PAW, GEANT 3...)" >HOMEPAGE="http://cernlib.web.cern.ch" >SRC_URI="${SRC_URI_BASE}/include.tar.gz > ${SRC_URI_BASE}/src_Imakefile.tar.gz > ${SRC_URI_BASE}/src_car.tar.gz > ${SRC_URI_BASE}/src_cfortran.tar.gz > ${SRC_URI_BASE}/src_cmz.tar.gz > ${SRC_URI_BASE}/src_config.tar.gz > ${SRC_URI_BASE}/src_geant321.tar.gz > ${SRC_URI_BASE}/src_graflib.tar.gz > ${SRC_URI_BASE}/src_include.tar.gz > ${SRC_URI_BASE}/src_mathlib.tar.gz > ${SRC_URI_BASE}/src_mclibs.tar.gz > ${SRC_URI_BASE}/src_packlib.tar.gz > ${SRC_URI_BASE}/src_patchy.tar.gz > ${SRC_URI_BASE}/src_pawlib.tar.gz > ${SRC_URI_BASE}/src_phtools.tar.gz > ${SRC_URI_BASE}/src_scripts.tar.gz" > ># ${SRC_URI_BASE}/gcalor.tar.gz ># ${SRC_URI_BASE}/mathlib32_src.tar.gz ># ${SRC_URI_BASE}/minuit32_src.tar.gz > ># ># FIXME License for FLUKA is not GPL-2 ># >LICENSE="GPL-2" ># ># TODO do I really want to allow multiple CERNLIB installations? probably I do ># >SLOT="$YEAR" >KEYWORDS="~x86" >IUSE="symlink sources" > ># ># CERNLIB requires imake (in Gentoo's x11 package), GNU make, a C preprocessor ># (cpp), a FORTRAN and a C compiler and the archiver ar. ># I'm currently assuming that any sane (Gentoo) distriibution has all of them ># by default, except for imake . >DEPEND="virtual/x11 sci-libs/blas >=sci-libs/lapack-3*" > ># ># Default installation procedure of CERNLIB is done in /cern/$YEAR directory; ># although it's probably not mandatory, I prefer not to change that too ># radically (the whole process still happens in WORKDIR) ># >S="${WORKDIR}/cern" > ># name of symlink created in /opt/cern >CURRENT="current" > >CERN_LEVEL=$YEAR >CERN="$S" >CERN_ROOT="$CERN/$CERN_LEVEL" >CVSCOSRC="$CERN_ROOT/src" >PATH="$CERN_ROOT/bin:$PATH" > >DATETAG=`date +%m%d` >LOGDIR="$CERN_ROOT/build/log" > >src_unpack() { > mkdir -p "$S" > cd "$S" > unpack ${A} || die "Error unpacking sources" > if ls "${FILESDIR}/${YEAR}"*.patch >& /dev/null ; then > cd "$YEAR" > epatch "${FILESDIR}/${YEAR}"*.patch || die "patching failed" > fi >} > > >src_compile() { > > # Establish the environment variables for the build procedures > export CERN > export CERN_LEVEL > export CERN_ROOT > export CVSCOSRC > export PATH > > # Create the build directory structure > cd "$CERN_ROOT" > mkdir -p bin lib build/log > > # Create the top level Makefile with imake > echo "Creating top level makefile..." > cd "$CERN_ROOT/build" > "$CVSCOSRC/config/imake_boot" || die "Makefiles creation failed" > > > # Install kuipc and the scripts (cernlib, paw and gxint) in $CERN_ROOT/bin; > # probably here bin/kuipc is stripped, which at last portage QA will stress > # scripts are stripped too, which provokes an error; I ask make to ignore > # errors for that run, so that scripts are installed (they are not executable > # yet). > echo "Installing kuipc..." > make bin/kuipc 2>&1 | tee "$LOGDIR/kuipc.$DATETAG" || die "can't build kuipc" > echo "Creating scripts makefiles..." > make scripts/Makefile 2>&1 | tee "$LOGDIR/scripts.$DATETAG" \ > || die "can't build script makefile" > cd "$CERN_ROOT/build/scripts" > make -k install.bin 2>&1 | tee -a "$LOGDIR/scripts.$DATETAG" > chmod 755 "$CERN_ROOT"/bin/* > > # Install the libraries > cd "$CERN_ROOT/build" > make 2>&1 | tee "$LOGDIR/scripts.$DATETAG" || die "error building libraries" > > > # Install pawX11 and paw++ executables in $CERN_ROOT/bin > ln -s /usr/lib/libblas.a "$CERN_ROOT/lib/libblas.a" > ln -s /usr/lib/liblapack.a "$CERN_ROOT/lib/liblapack3.a" > echo "Building paw..." > cd "$CERN_ROOT/build/pawlib" > make install.bin > "$LOGDIR/pawpgm.$DATETAG" 2>&1 \ > || die "error building paw libraries" > > # Install packlib executables in $CERN_ROOT/bin > echo "Building packlib" > cd "$CERN_ROOT/build/packlib" > make install.bin > "$LOGDIR/packpgm.$DATETAG" 2>&1 \ > || die "error building pack libraries" > > rm "$CERN_ROOT/lib/liblapack3.a" "$CERN_ROOT/lib/libblas.a" >} > >src_test() { > export CERN > export CERN_LEVEL > export CERN_ROOT > export CVSCOSRC > export PATH > > cd "$CERN_ROOT/build/packlib" > make test PACKAGE_LIB="$CERN_ROOT/lib/libpacklib.a" \ > > "$LOGDIR/t_packlib.$DATETAG" 2>&1 || die "packlib test failed!" > cd "$CERN_ROOT/build/mathlib" > make test > "$LOGDIR/mathlib.$DATETAG" 2>&1 \ > || die "mathlib test failed!" >} > > >src_install() { >// einfo >// echo "Installing CERNLIB from '$S' to '$D'..." > > # There is no real installation for CERNLIB: just move all directories > # except for the build directory into destination place; this is not the > # most elegant use of Gentoo helpers, but doins seems not to support > # installing whole directories. This could be prone to bugs if portage has > # dropped root privileges and has build stuff as portage user; we therefore > # change all (!) file owners, which will take forever > CERN_ROOT="/opt/cern/$YEAR" > dodir "$CERN_ROOT" || die "couldn't create '$CERN_ROOT' directory" > mv "$S"/$YEAR/{bin,lib,include} "$D/$CERN_ROOT" \ > || die "'moving $S/$YEAR/*' to '$D/$CERN_ROOT' failed" > use "sources" && mv "$S/$YEAR/src" "$D/$CERNROOT" > chown -R root:root "$D" ># insinto "$CERN_ROOT" ># doins $YEAR/{bin,lib,src,include} \ ># || die "installation of directories failed" > chmod 755 "$D/$CERN_ROOT/bin"/* > > if use "symlink" ; then > dosym "$YEAR" "/opt/cern/$CURRENT" \ > || ewarn "Couldn't create '/opt/cern/$CURRENT' symbolic link" > else > CURRENT=$YEAR > fi > > # just add an environment script to use this stuff > cat > "$T/98cernlib" <<EOS >CERN="/opt/cern" >CERN_LEVEL="$YEAR" >CERNLIB="\$CERN/$CURRENT" >CERN_ROOT="\$CERNLIB" >PATH="\${CERNLIB}/bin" >LDPATH="\${CERNLIB}/lib" >EOS > doenvd "$T/98cernlib" > > einfo "A QA warning is expected since some binaries have been stripped already" > > einfo "New CERNLIB environment variables have not been loaded yet.\n"\ > "They will available on new shells. If you want to use CERNLIB tools"\ > " in an already open shell, do first: \n\n"\ > "source /etc/profile\n" > >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 137730
: 89911 |
89913