aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authormarkusle <markusle@32389bae-6d03-0410-99cf-db05cde120eb>2008-05-26 17:50:18 +0000
committermarkusle <markusle@32389bae-6d03-0410-99cf-db05cde120eb>2008-05-26 17:50:18 +0000
commitee4ac39b50f6f269d6f6c30516048c2648110835 (patch)
tree61bddc0d41d9106e29a4661a9f92cdad6829626b /eclass
parentasciidata: version bump (diff)
downloadsci-ee4ac39b50f6f269d6f6c30516048c2648110835.tar.gz
sci-ee4ac39b50f6f269d6f6c30516048c2648110835.tar.bz2
sci-ee4ac39b50f6f269d6f6c30516048c2648110835.zip
Compilation and installation now properly takes place in
src_compile and src_install. Also, make the compile and install phases more verbose. git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1093 32389bae-6d03-0410-99cf-db05cde120eb
Diffstat (limited to 'eclass')
-rw-r--r--eclass/octave-forge.eclass50
1 files changed, 28 insertions, 22 deletions
diff --git a/eclass/octave-forge.eclass b/eclass/octave-forge.eclass
index 9f545235b..bba265cb9 100644
--- a/eclass/octave-forge.eclass
+++ b/eclass/octave-forge.eclass
@@ -3,7 +3,7 @@
# $Header
#
-# Version: 0.09 (2008-03-24)
+# Version: 0.10 (2008-05-26)
# Authors: Markus Dittrich <markusle@gentoo.org>
#
# The octave-forge eclass installs and manages the split
@@ -48,7 +48,7 @@ OCT_PKG_NAME=${PN#octave-forge-}
OCT_PKG_TARBALL="${OCT_PKG}.tar.gz"
OCT_INSTALL_ROOT=/usr/share/octave
OCT_INSTALL_PKG="${OCT_INSTALL_ROOT}/packages/${OCT_PKG}"
-OCT_INSTALL_PATH="${D}usr/share/octave/packages"
+OCT_INSTALL_PATH="/usr/share/octave/packages"
OCT_BINARY=$(type -p octave)
OCT_DATABASE="${OCT_INSTALL_ROOT}/octave_packages"
OCT_DESC="${OCT_INSTALL_PKG}/packinfo/DESCRIPTION"
@@ -227,30 +227,15 @@ octave-forge_src_unpack() {
else
cp "${DISTDIR}/${OCT_PKG_TARBALL}" ./
fi
-
-
}
####################################################################
-# we explicitly override src_compile to make sure nothing is
-# being done here since all compilation (if needed) is done
-# by octave's pkg manager in src_install
+# use octave's pkg add command to do the compilation
####################################################################
octave-forge_src_compile() {
- echo "octave will now start compiling ..."
-}
-
-####################################################################
-# install *.m and *.oct/*.mex files if present into the locations
-# where octave expects them.
-####################################################################
-octave-forge_src_install() {
cd "${WORKDIR}"
- # create image install directory to make octave happy
- mkdir -p "${OCT_INSTALL_PATH}"
-
# securely generate tmp file
OCT_TMP=$(mktemp /tmp/octave-install.XXXXXXXXXX) || \
die "Failed to generate temporary file."
@@ -258,14 +243,13 @@ octave-forge_src_install() {
# generate octave code to remove relevant entry from
# global file
cat >> "${OCT_TMP}" <<-EOF
- pkg prefix "${OCT_INSTALL_PATH}" "${OCT_INSTALL_PATH}"
+ pkg prefix "${WORKDIR}" "${WORKDIR}"
pkg install -verbose -local ${OCT_PKG_TARBALL}
EOF
# let octave do the final setup of the database file
- echo "Compiling ${P}. Please be patient ...."
- "${OCT_BINARY}" -q "${OCT_TMP}" >& /dev/null \
- || die "Failed to compile package"
+ einfo "Compiling ${P}. Please be patient ...."
+ "${OCT_BINARY}" -q "${OCT_TMP}" || die "Failed to compile package"
# remove the temporary octave file
rm -f "${OCT_TMP}" \
@@ -273,6 +257,28 @@ octave-forge_src_install() {
}
+####################################################################
+# install the compiled files
+####################################################################
+octave-forge_src_install() {
+ cd "${WORKDIR}"
+ insinto ${OCT_INSTALL_PATH}
+ doins -r ${OCT_PKG} || die "Failed to install files."
+
+ # make .oct, .mex, *.so file exectutable
+ # we don't die after the finds since chmod will complain
+ # if there aren't any files to act on
+ target="${D}"${OCT_INSTALL_PATH}/${OCT_PKG}
+ find ${target} -type f -name "*.oct" -print0 \
+ | xargs -0 chmod 0755 >& /dev/null
+ find ${target} -type f -name "*.mex" -print0 \
+ | xargs -0 chmod 0755 >& /dev/null
+ find ${target} -type f -name "*.so" -print0 \
+ | xargs -0 chmod 0755 >& /dev/null
+}
+
+
+
##################################################################
# after installing add package to global octave database
##################################################################