summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <zlin@exherbo.org> 2009-11-09 02:54:47 +0000
committerAvatar Bo ├śrsted Andresen <zlin@exherbo.org> 2009-11-10 19:29:27 +0000
commit6c7579af15bd1d1d5755659f566272ac9d50f7c9 (patch)
treec102c079915a27af64ea0a538d416b51c8c979ca
parent2d8d79adbe3f19c4cb481bc8518a331e906c003f (diff)
downloadmozilla-6c7579af15bd1d1d5755659f566272ac9d50f7c9.tar.gz
mozilla-6c7579af15bd1d1d5755659f566272ac9d50f7c9.tar.xz
Use edo. Kill off is-flagq.
-rw-r--r--exlibs/mozilla.exlib25
1 files changed, 11 insertions, 14 deletions
diff --git a/exlibs/mozilla.exlib b/exlibs/mozilla.exlib
index 85c4174..8928727 100644
--- a/exlibs/mozilla.exlib
+++ b/exlibs/mozilla.exlib
@@ -36,19 +36,18 @@ export MOZILLA_OFFICIAL=1
mozilla_src_unpack() {
default
- mkdir -p "${WORK}" || die "creating ${WORK} failed"
+ edo mkdir -p "${WORK}"
}
mozilla_src_prepare() {
default
- sed \
+ edo sed \
-e "/^installdir/ c installdir = /usr/$(get_libdir)/${PN}" \
-e "/^includedir/ c includedir = /usr/include/${PN}" \
-e "/^idldir/ c idldir = /usr/share/idl/${PN}" \
-e "/^sdkdir/ c sdkdir = /usr/$(get_libdir)/${PN}-devel" \
- -i "${WORKBASE}"/mozilla*/config/autoconf.mk.in \
- || die "sed autoconf.mk.in failed"
+ -i "${WORKBASE}"/mozilla*/config/autoconf.mk.in
}
mozilla_src_configure() {
@@ -64,7 +63,7 @@ mozilla_src_configure() {
# http://benjamin.smedbergs.us/blog/2005-10-27/gcc-40-workaround/
export ac_cv_visibility_pragma=no
- local param_optimize
+ local x param_optimize
# Override the default optimization levels of Mozilla projects with the
# value specified by -O from the user's CFLAGS/CXXFLAGS (if -O isn't given
@@ -72,16 +71,14 @@ mozilla_src_configure() {
# option is set.
if exparam -b provide_debug && option debug ; then
param_optimize="--disable-optimize"
- elif is-flagq -O || is-flag -O1 ; then
- param_optimize="--enable-optimize=-O1"
- elif is-flagq -O2 ; then
- param_optimize="--enable-optimize=-O2"
- elif is-flagq -O3 ; then
- param_optimize="--enable-optimize=-O3"
- elif is-flagq -Os ; then
- param_optimize="--enable-optimize=-Os"
else
- param_optimize="--enable-optimize=-O0"
+ for x in ${CFLAGS}; do
+ case ${x} in
+ -O|-O1) param_optimize="--enable-optimize=-O1" ;;
+ -O2|-O3|-Os) param_optimize="--enable-optimize=${x}" ;;
+ esac
+ done
+ [[ -z ${param_optimize} ]] && param_optimize="--enable-optimize=-O0"
fi
# Now filter -O from CFLAGS/CXXFLAGS to avoid a duplicate in the resulting