diff options
author | 2007-08-13 17:19:36 +0000 | |
---|---|---|
committer | 2007-08-13 17:19:36 +0000 | |
commit | 0d1b5e27f95195541fb9c9d1747c1cf3ac477859 (patch) | |
tree | 2d61f14f717d1b2374d6365dd7f1359c1bdc3a8e | |
parent | add gnustep-apps/azbackground (diff) | |
download | prefix-0d1b5e27f95195541fb9c9d1747c1cf3ac477859.tar.gz prefix-0d1b5e27f95195541fb9c9d1747c1cf3ac477859.tar.bz2 prefix-0d1b5e27f95195541fb9c9d1747c1cf3ac477859.zip |
Merge from overlay, and sed out stupid includes from GNUmakefiles (test)
svn path=/prefix-overlay/; revision=261
-rw-r--r-- | eclass/gnustep-2.eclass | 2 | ||||
-rw-r--r-- | eclass/gnustep-base.eclass | 84 |
2 files changed, 52 insertions, 34 deletions
diff --git a/eclass/gnustep-2.eclass b/eclass/gnustep-2.eclass index 8d9562b..4abf863 100644 --- a/eclass/gnustep-2.eclass +++ b/eclass/gnustep-2.eclass @@ -5,6 +5,8 @@ inherit gnustep-base # Eclass for GNUstep Apps, Frameworks, and Bundles build +# +# maintainer: GNUstep Herd <gnustep@gentoo.org> DEPEND=">=gnustep-base/gnustep-make-2.0 virtual/gnustep-back" diff --git a/eclass/gnustep-base.eclass b/eclass/gnustep-base.eclass index 3acb0e3..398bf8b 100644 --- a/eclass/gnustep-base.eclass +++ b/eclass/gnustep-base.eclass @@ -4,7 +4,10 @@ inherit eutils flag-o-matic -# Inner gnustep eclass, should only be inherited directly by gnustep-base packages +# Inner gnustep eclass, should only be inherited directly by gnustep-base +# packages +# +# maintainer: GNUstep Herd <gnustep@gentoo.org> # IUSE variables across all GNUstep packages # "debug": enable code for debugging @@ -13,20 +16,19 @@ IUSE="debug doc" # packages needed to build any base gnustep package GNUSTEP_CORE_DEPEND="virtual/libc - doc? ( virtual/tetex - =dev-tex/latex2html-2002* - >=app-text/texi2html-1.64 )" + doc? ( virtual/tetex =dev-tex/latex2html-2002* >=app-text/texi2html-1.64 )" # Where to install GNUstep GNUSTEP_PREFIX="${EPREFIX}/usr/GNUstep" +# GNUstep environment array +typeset -a GS_ENV + # Ebuild function overrides gnustep-base_pkg_setup() { - if test_version_info 3.3 - then + if test_version_info 3.3 ; then strip-unsupported-flags - elif test_version_info 3.4 - then + elif test_version_info 3.4 ; then # strict-aliasing is known to break obj-c stuff in gcc-3.4* filter-flags -fstrict-aliasing fi @@ -35,9 +37,24 @@ gnustep-base_pkg_setup() { filter-flags -fomit-frame-pointer } +gnustep-base_src_unpack() { + unpack ${A} + cd "${S}" + + if [[ -f ./GNUmakefile ]] ; then + # kill stupid includes that are simply overdone or useless on normal + # Gentoo, but (may) cause major headaches on Prefixed Gentoo + sed -i \ + -e 's|-I/usr/X11R6/include||g' \ + -e 's|-L/usr/X11R6/lib||g' \ + -e 's|-L/usr/lib||g' \ + GNUmakefile + fi +} + gnustep-base_src_compile() { egnustep_env - if [ -x ./configure ]; then + if [[ -x ./configure ]] ; then econf || die "configure failed" fi egnustep_make @@ -51,16 +68,16 @@ gnustep-base_src_install() { egnustep_doc fi # Copies "convenience scripts" - if [ -f "${FILESDIR}/config-${PN}.sh" ]; then + 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" - if [ -f "${FILESDIR}/config-${PN}.sh" ]; then + 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" elog "as the user you will run the package as." @@ -72,10 +89,10 @@ egnustep_env() { # Get additional variables GNUSTEP_SH_EXPORT_ALL_VARIABLES="true" - if [ -f "${GNUSTEP_PREFIX}/System/Library/Makefiles/GNUstep.sh" ] ; then + if [[ -f ${GNUSTEP_PREFIX}/System/Library/Makefiles/GNUstep.sh ]] ; then # Reset GNUstep variables - . ${GNUSTEP_PREFIX}/System/Library/Makefiles/GNUstep-reset.sh - . ${GNUSTEP_PREFIX}/System/Library/Makefiles/GNUstep.sh + source "${GNUSTEP_PREFIX}"/System/Library/Makefiles/GNUstep-reset.sh + source "${GNUSTEP_PREFIX}"/System/Library/Makefiles/GNUstep.sh # Needed to run installed GNUstep apps in sandbox addpredict "/root/GNUstep" @@ -94,20 +111,19 @@ egnustep_env() { 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 \ - DESTDIR=\"\${D}\" \ + GS_ENV=( AUXILIARY_LDFLAGS="${LDFLAGS}" \ + DESTDIR="${D}" \ + HOME="${T}" \ + GNUSTEP_USER_DIR="${T}" \ + GNUSTEP_USER_DEFAULTS_DIR="${T}"/Defaults \ GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ - TAR_OPTIONS=\"\${TAR_OPTIONS} --no-same-owner\" \ + TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \ messages=yes \ - -j1" + -j1 ) # -j1 is needed as gnustep-make is not parallel-safe if ! use debug ; then - __GS_MAKE_EVAL="${__GS_MAKE_EVAL} debug=no" + GS_ENV=( "${GS_ENV[@]}" "debug=no" ) fi return 0 @@ -117,8 +133,8 @@ egnustep_env() { # Make utilizing GNUstep Makefiles egnustep_make() { - if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then - eval emake ${*} ${__GS_MAKE_EVAL} all || die "package make failed" + if [[ -f ./[mM]akefile || -f ./GNUmakefile ]] ; then + emake ${*} "${GS_ENV[@]}" all || die "package make failed" return 0 fi die "no Makefile found" @@ -127,9 +143,9 @@ egnustep_make() { # Make-install utilizing GNUstep Makefiles egnustep_install() { # avoid problems due to our "weird" prefix, make sure it exists - mkdir -p "${D}${GNUSTEP_SYSTEM_TOOLS}" - if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then - eval emake ${*} ${__GS_MAKE_EVAL} install || die "package install failed" + mkdir -p "${D}"${GNUSTEP_SYSTEM_TOOLS} + if [[ -f ./[mM]akefile || -f ./GNUmakefile ]] ; then + emake ${*} "${GS_ENV[@]}" install || die "package install failed" return 0 fi die "no Makefile found" @@ -137,12 +153,12 @@ egnustep_install() { # Make and install docs using GNUstep Makefiles egnustep_doc() { - if [ -d ./Documentation ]; then + if [[ -d ./Documentation ]] ; then # Check documentation presence - 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" + cd "${S}"/Documentation + if [[ -f ./[mM]akefile || -f ./GNUmakefile ]] ; then + emake "${GS_ENV[@]}" all || die "doc make failed" + emake "${GS_ENV[@]}" install || die "doc install failed" fi cd .. fi |