From cd09b941b402a1c494b4d15da23c93bace60089b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 5 Jan 2012 23:03:13 +0000 Subject: [PATCH] - invert clean logic foo=0 means do not remove it, undefined foo means do remove it Changed files: chromium-browser.spec -> 1.167 clean-source.sh -> 1.6 --- chromium-browser.spec | 2 +- clean-source.sh | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/chromium-browser.spec b/chromium-browser.spec index d782737..c4b2a1d 100644 --- a/chromium-browser.spec +++ b/chromium-browser.spec @@ -209,7 +209,7 @@ cd src cd .. cd src -sh -x clean-source.sh %{?with_system_v8:v8=1} %{?with_nacl:nacl=1} +sh -x clean-source.sh %{!?with_system_v8:v8=0} %{!?with_nacl:nacl=0} %build cd src diff --git a/clean-source.sh b/clean-source.sh index fceea35..aced556 100644 --- a/clean-source.sh +++ b/clean-source.sh @@ -3,6 +3,8 @@ set -e set -x # import options +# remove everything unless it's remove has been disabled with "0" +# "v8=0" means "do not remove v8" eval "$@" # drop bundled libs, from gentoo @@ -126,7 +128,7 @@ strip_system_dirs() { for dir in "$@"; do lib=${dir##*/} bcond=$(eval echo \$$lib) - [ "$bcond" = 0 ] && continue + [ "${bcond:-1}" = 0 ] && continue # skip already removed dirs test -d $dir || continue @@ -175,7 +177,7 @@ strip_system_dirs \ rm -vf third_party/expat/files/lib/expat.h -if [ "$v8" = 1 ]; then +if [ "${v8:-1}" != "0" ]; then # The implementation files include v8 headers with full path, # like #include "v8/include/v8.h". Make sure the system headers # will be used. @@ -183,7 +185,7 @@ if [ "$v8" = 1 ]; then ln -s /usr/include v8/include fi -if [ "$nacl" = 1 ]; then +if [ "${nacl:-1}" != "0" ]; then # NOTE: here is always x86_64 rm -rf native_client/toolchain/linux_x86_newlib ln -s /usr/x86_64-nacl-newlib native_client/toolchain/linux_x86_newlib -- 2.44.0