summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gnustep-base.eclass52
1 files changed, 27 insertions, 25 deletions
diff --git a/eclass/gnustep-base.eclass b/eclass/gnustep-base.eclass
index bc6f824..3acb0e3 100644
--- a/eclass/gnustep-base.eclass
+++ b/eclass/gnustep-base.eclass
@@ -38,14 +38,14 @@ gnustep-base_pkg_setup() {
gnustep-base_src_compile() {
egnustep_env
if [ -x ./configure ]; then
- econf || die
+ econf || die "configure failed"
fi
- egnustep_make || die
+ egnustep_make
}
gnustep-base_src_install() {
egnustep_env
- egnustep_install || die
+ egnustep_install
if use doc ; then
egnustep_env
egnustep_doc
@@ -54,12 +54,12 @@ gnustep-base_src_install() {
if [ -f "${FILESDIR}/config-${PN}.sh" ]; then
dodir ${GNUSTEP_SYSTEM_TOOLS#${EPREFIX}}/Gentoo
exeinto ${GNUSTEP_SYSTEM_TOOLS#${EPREFIX}}/Gentoo
- doexe ${FILESDIR}/config-${PN}.sh
+ doexe "${FILESDIR}/config-${PN}.sh"
fi
}
gnustep-base_pkg_postinst() {
- # Informs user about existence of "convenience script"
+ # Informs user about existence of "convenience script"
if [ -f "${FILESDIR}/config-${PN}.sh" ]; then
elog "Make sure to set happy defaults for this package by executing:"
elog " ${GNUSTEP_SYSTEM_TOOLS}/Gentoo/config-${PN}.sh"
@@ -80,8 +80,22 @@ egnustep_env() {
# Needed to run installed GNUstep apps in sandbox
addpredict "/root/GNUstep"
- # Set up common env vars for make operations
+ # Set rpath in ldflags when available
+ case ${CHOST} in
+ *-linux-gnu|*-solaris*)
+ append-ldflags \
+ -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" \
+ -L"${GNUSTEP_SYSTEM_LIBRARIES}"
+ ;;
+ *)
+ append-ldflags \
+ -L"${GNUSTEP_SYSTEM_LIBRARIES}"
+ ;;
+ esac
+
+ # Set up env vars for make operations
__GS_MAKE_EVAL=" \
+ AUXILIARY_LDFLAGS=\"\${LDFLAGS}\" \
HOME=\"\${T}\" \
GNUSTEP_USER_DIR=\"\${T}\" \
GNUSTEP_USER_DEFAULTS_DIR=\"\${T}\"/Defaults \
@@ -96,30 +110,18 @@ egnustep_env() {
__GS_MAKE_EVAL="${__GS_MAKE_EVAL} debug=no"
fi
- case ${CHOST} in
- *-linux-gnu|*-solaris*)
- append-ldflags \
- -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" \
- -L"${GNUSTEP_SYSTEM_LIBRARIES}"
- ;;
- *)
- append-ldflags \
- -L"${GNUSTEP_SYSTEM_LIBRARIES}"
- ;;
- esac
- __GS_MAKE_EVAL="${__GS_MAKE_EVAL} AUXILIARY_LDFLAGS=\"\${LDFLAGS}\""
- else
- die "gnustep-make not installed!"
+ return 0
fi
+ die "gnustep-make not installed!"
}
# Make utilizing GNUstep Makefiles
egnustep_make() {
if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
eval emake ${*} ${__GS_MAKE_EVAL} all || die "package make failed"
- else
- die "no Makefile found"
+ return 0
fi
+ die "no Makefile found"
}
# Make-install utilizing GNUstep Makefiles
@@ -128,16 +130,16 @@ egnustep_install() {
mkdir -p "${D}${GNUSTEP_SYSTEM_TOOLS}"
if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
eval emake ${*} ${__GS_MAKE_EVAL} install || die "package install failed"
- else
- die "no Makefile found"
+ return 0
fi
+ die "no Makefile found"
}
# Make and install docs using GNUstep Makefiles
egnustep_doc() {
if [ -d ./Documentation ]; then
# Check documentation presence
- cd ${S}/Documentation
+ cd "${S}/Documentation"
if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
eval emake ${__GS_MAKE_EVAL} all || die "doc make failed"
eval emake ${__GS_MAKE_EVAL} install || die "doc install failed"