aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2009-09-25 15:19:19 +0000
committerAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2009-09-27 00:35:04 +0000
commitaba3a8ea5de879c0beb3ddb2d6571985f105a377 (patch)
tree90697ae0ede6ee8fc293eb5728186826ad98c06c
parent093e74cc37cd5709054144f9dd3a5aefd0f81c67 (diff)
downloadpaludis-aba3a8ea5de879c0beb3ddb2d6571985f105a377.tar.gz
paludis-aba3a8ea5de879c0beb3ddb2d6571985f105a377.tar.xz
Make exheres-0 use LIBDIR for --libdir.
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/build_functions.bash16
-rw-r--r--paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am1
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/exheres-0/dolib60
3 files changed, 66 insertions, 11 deletions
diff --git a/paludis/repositories/e/ebuild/exheres-0/build_functions.bash b/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
index 6c6b36b..7670ec9 100644
--- a/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
@@ -129,14 +129,6 @@ econf()
fi
done
- local libcmd=
- if [[ -n "${ABI}" ]] ; then
- local v="LIBDIR_${ABI}"
- if [[ -n "${!v}" ]] ; then
- libcmd="--libdir=${ECONF_PREFIX}/$(ebuild_get_libdir)"
- fi
- fi
-
echo ${LOCAL_ECONF_WRAPPER} "${ECONF_SOURCE}"/configure \
--prefix=/usr \
--host=${CHOST} \
@@ -147,7 +139,8 @@ econf()
--localstatedir=/var/lib \
--disable-dependency-tracking \
--enable-fast-install \
- ${libcmd} "$@" ${LOCAL_EXTRA_ECONF} 1>&2
+ --libdir=${ECONF_PREFIX}/${LIBDIR:-lib} \
+ "$@" ${LOCAL_EXTRA_ECONF} 1>&2
${LOCAL_ECONF_WRAPPER} "${ECONF_SOURCE}"/configure \
--prefix=/usr \
@@ -159,7 +152,8 @@ econf()
--localstatedir=/var/lib \
--disable-dependency-tracking \
--enable-fast-install \
- ${libcmd} "$@" ${LOCAL_EXTRA_ECONF} || paludis_die_unless_nonfatal "econf failed" || return 247
+ --libdir=${ECONF_PREFIX}/${LIBDIR:-lib} \
+ "$@" ${LOCAL_EXTRA_ECONF} || paludis_die_unless_nonfatal "econf failed" || return 247
else
paludis_die_unless_nonfatal "No configure script for econf" || return 247
@@ -181,7 +175,7 @@ einstall()
cmd="${cmd} datadir=${IMAGE}/usr/share"
cmd="${cmd} sysconfdir=${IMAGE}/etc"
cmd="${cmd} localstatedir=${IMAGE}/var/lib"
- cmd="${cmd} libdir=${IMAGE}/usr/$(ebuild_get_libdir)"
+ cmd="${cmd} libdir=${IMAGE}/usr/${LIBDIR:-lib}"
cmd="${cmd} ${EXTRA_EINSTALL} ${@} install"
echo "${cmd}" 1>&2
${cmd} || paludis_die_unless_nonfatal "einstall failed" || return 247
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am b/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
index 48066b6..59dce24 100644
--- a/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
@@ -6,6 +6,7 @@ libexecprogdir = $(libexecdir)/paludis/utils/exheres-0
libexecprog_SCRIPTS = \
dohard \
dohtml \
+ dolib \
dosed \
donewins \
herebin \
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/dolib b/paludis/repositories/e/ebuild/utils/exheres-0/dolib
new file mode 100755
index 0000000..afd67e5
--- /dev/null
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/dolib
@@ -0,0 +1,60 @@
+#!/usr/bin/env bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006 Stephen Bennett
+#
+# Based in part upon dolib from Portage, which is Copyright 1995-2005
+# Gentoo Foundation and distributed under the terms of the GNU General
+# Public License v2.
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License as published by the Free Software Foundation; either version
+# 2 of the License, or (at your option) any later version.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
+if [[ ! -d ${!PALUDIS_IMAGE_DIR_VAR} ]]; then
+ paludis_die_or_error "\${${PALUDIS_IMAGE_DIR_VAR}} not valid; aborting"
+fi
+
+if [[ ! -d ${PALUDIS_EBUILD_MODULES_DIR} ]]; then
+ paludis_die_or_error "\${PALUDIS_EBUILD_MODULES_DIR} not valid; aborting"
+fi
+
+libdir="${!PALUDIS_IMAGE_DIR_VAR}${DESTTREE}/${LIBDIR:-lib}"
+
+if [[ ${#} -lt 1 ]]; then
+ paludis_die_or_error "at least one argument needed"
+fi
+
+if [[ ! -d ${libdir} ]]; then
+ install -d "${libdir}" || paludis_die_or_error "could not create ${libdir}"
+fi
+
+ret=0
+
+for x in "$@"; do
+ if [[ -e ${x} ]]; then
+ if [[ ! -L ${x} ]]; then
+ install ${LIBOPTIONS} "${x}" "${libdir}" || ret=2
+ else
+ ln -s "$(readlink "${x}")" "${libdir}/$(basename "${x}")" || ret=2
+ fi
+ else
+ echo "${0}: ${x} does not exist"
+ ret=2
+ fi
+done
+
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dolib returned error ${ret}"
+exit ${ret}