packages: chromium-browser/chromium-browser.spec, chromium-browser/clean-so...
glen
glen at pld-linux.org
Sat Dec 3 18:35:09 CET 2011
Author: glen Date: Sat Dec 3 17:35:09 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- move source cleanup to external script, so it can be reused when creating
tarball or extracting tarball
---- Files affected:
packages/chromium-browser:
chromium-browser.spec (1.157 -> 1.158) , clean-source.sh (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/chromium-browser/chromium-browser.spec
diff -u packages/chromium-browser/chromium-browser.spec:1.157 packages/chromium-browser/chromium-browser.spec:1.158
--- packages/chromium-browser/chromium-browser.spec:1.157 Sat Dec 3 16:35:39 2011
+++ packages/chromium-browser/chromium-browser.spec Sat Dec 3 18:35:04 2011
@@ -65,6 +65,7 @@
Source3: %{name}.desktop
Source4: find-lang.sh
Source5: update-source.sh
+Source6: clean-source.sh
Patch0: system-libs.patch
Patch1: plugin-searchdirs.patch
Patch2: gyp-system-minizip.patch
@@ -203,6 +204,7 @@
< %{PATCH8} | %{__patch} -p1
%{__sed} -e 's, at localedir@,%{_libdir}/%{name},' %{SOURCE4} > find-lang.sh
+ln -s %{SOURCE6} src
%patch0 -p1
%patch1 -p1
@@ -215,48 +217,8 @@
%patch9 -p1
cd ..
-# drop bundled libs, from gentoo
-remove_bundled_lib() {
- echo "Removing bundled library $1 ..."
- local out
- out=$(find $1 -mindepth 1 ! -iname '*.gyp' -print -delete)
- if [ -z "$out" ]; then
- echo >&2 "No files matched when removing bundled library $1"
- exit 1
- fi
-}
-
cd src
-rm -v third_party/expat/files/lib/expat.h
-remove_bundled_lib "third_party/bzip2"
-remove_bundled_lib "third_party/icu"
-remove_bundled_lib "third_party/libevent"
-remove_bundled_lib "third_party/libjpeg"
-remove_bundled_lib "third_party/libpng"
-# third_party/libvpx/libvpx.h should be kept
-#remove_bundled_lib "third_party/libvpx"
-remove_bundled_lib "third_party/libxml"
-remove_bundled_lib "third_party/libxslt"
-remove_bundled_lib "third_party/zlib"
-# third_party/yasm/source/patched-yasm/modules/arch/x86/gen_x86_insn.py', needed by `out/Release/obj/gen/third_party/yasm/x86insns.c'. Stop.
-#remove_bundled_lib "third_party/yasm"
-
-%if %{with system_v8}
-# Remove bundled v8.
-find v8 -type f \! -iname '*.gyp*' -delete
-
-# The implementation files include v8 headers with full path,
-# like #include "v8/include/v8.h". Make sure the system headers
-# will be used.
-rmdir v8/include
-ln -s %{_includedir} v8/include
-%endif
-
-%if %{with nacl}
-# NOTE: here is always x86_64
-rm -rf native_client/toolchain/linux_x86_newlib
-ln -s %{_prefix}/x86_64-nacl-newlib native_client/toolchain/linux_x86_newlib
-%endif
+sh -x clean-source.sh %{?with_system_v8:v8=1} %{?with_nacl:nacl=1}
%build
cd src
@@ -412,6 +374,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.158 2011/12/03 17:35:04 glen
+- move source cleanup to external script, so it can be reused when creating
+ tarball or extracting tarball
+
Revision 1.157 2011/12/03 15:35:39 glen
- use system expat
================================================================
Index: packages/chromium-browser/clean-source.sh
diff -u /dev/null packages/chromium-browser/clean-source.sh:1.1
--- /dev/null Sat Dec 3 18:35:09 2011
+++ packages/chromium-browser/clean-source.sh Sat Dec 3 18:35:04 2011
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# import options
+eval "$@"
+
+# drop bundled libs, from gentoo
+remove_bundled_lib() {
+ set +x
+ echo "Removing bundled library $1 ..."
+ local out
+ out=$(find $1 -mindepth 1 ! -iname '*.gyp' -print -delete)
+ if [ -z "$out" ]; then
+ echo >&2 "No files matched when removing bundled library $1"
+ exit 1
+ fi
+}
+
+rm -v third_party/expat/files/lib/expat.h
+remove_bundled_lib "third_party/bzip2"
+remove_bundled_lib "third_party/icu"
+remove_bundled_lib "third_party/libevent"
+remove_bundled_lib "third_party/libjpeg"
+remove_bundled_lib "third_party/libpng"
+# third_party/libvpx/libvpx.h should be kept
+#remove_bundled_lib "third_party/libvpx"
+remove_bundled_lib "third_party/libxml"
+remove_bundled_lib "third_party/libxslt"
+remove_bundled_lib "third_party/zlib"
+# third_party/yasm/source/patched-yasm/modules/arch/x86/gen_x86_insn.py', needed by `out/Release/obj/gen/third_party/yasm/x86insns.c'. Stop.
+#remove_bundled_lib "third_party/yasm"
+
+if [ $v8 = 1 ]; then
+ # Remove bundled v8.
+ find v8 -type f \! -iname '*.gyp*' -delete
+
+ # The implementation files include v8 headers with full path,
+ # like #include "v8/include/v8.h". Make sure the system headers
+ # will be used.
+ rmdir v8/include
+ ln -s /usr/include v8/include
+fi
+
+if [ "$nacl" = 1 ]; 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
+fi
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/chromium-browser/chromium-browser.spec?r1=1.157&r2=1.158&f=u
More information about the pld-cvs-commit
mailing list