[arch-commits] Commit in libwebkit/trunk (PKGBUILD)

Jan de Groot jgc at archlinux.org
Wed Feb 16 00:08:05 UTC 2011


    Date: Tuesday, February 15, 2011 @ 19:08:04
  Author: jgc
Revision: 110073

Remove horrible use of source copying by building outside of source directory

Modified:
  libwebkit/trunk/PKGBUILD

----------+
 PKGBUILD |   56 +++++++++++++++++++++++++-------------------------------
 1 file changed, 25 insertions(+), 31 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-02-15 21:50:21 UTC (rev 110072)
+++ PKGBUILD	2011-02-16 00:08:04 UTC (rev 110073)
@@ -17,34 +17,28 @@
 md5sums=('6d4506086fb0d274d1a2c871fcaf851e')
 
 build() {
-  cd "${srcdir}"
+  cd "${srcdir}/webkit-${pkgver}"
+  mkdir build-gtk2
+  pushd build-gtk2
+  PYTHON=/usr/bin/python2 ../configure --prefix=/usr \
+    --enable-video --enable-introspection \
+    --with-font-backend=freetype --enable-gtk-doc \
+    --enable-jit --with-unicode-backend=icu \
+    --enable-3D-transforms --enable-mathml \
+    --with-gtk=2.0
+  make
+  popd
 
-  export PYTHON=/usr/bin/python2
-
-  rm -rf gtk3-build
-  cp -a webkit-${pkgver} gtk3-build
-
-  (
-    cd webkit-$pkgver
-    ./configure --prefix=/usr \
-        --enable-video --enable-introspection \
-        --with-font-backend=freetype --enable-gtk-doc \
-        --enable-jit --with-unicode-backend=icu \
-        --enable-3D-transforms --enable-mathml \
-        --with-gtk=2.0
-    make
-  )
-
-  (
-    cd gtk3-build
-    ./configure --prefix=/usr \
-        --enable-video --enable-introspection \
-        --with-font-backend=freetype --enable-gtk-doc \
-        --enable-jit --with-unicode-backend=icu \
-        --enable-3D-transforms --enable-mathml \
-        --with-gtk=3.0
-    make
-  )
+  mkdir build-gtk3
+  pushd build-gtk3
+  PYTHON=/usr/bin/python2 ../configure --prefix=/usr \
+    --enable-video --enable-introspection \
+    --with-font-backend=freetype --enable-gtk-doc \
+    --enable-jit --with-unicode-backend=icu \
+    --enable-3D-transforms --enable-mathml \
+    --with-gtk=3.0
+  make
+  popd
 }
 
 package_libwebkit() {
@@ -54,16 +48,16 @@
   conflicts=('webkitgtk-svn')
   replaces=('webkitgtk-svn')
 
-  cd "$srcdir/webkit-$pkgver"
+  cd "$srcdir/webkit-$pkgver/build-gtk2"
   make DESTDIR="${pkgdir}" install
-  install -Dm644 Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit/LICENSE"
+  install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit/LICENSE"
 }
 
 package_libwebkit3() {
   pkgdesc+=" (for GTK3)"
   depends+=(gtk3)
 
-  cd "${srcdir}/gtk3-build"
+  cd "${srcdir}/webkit-${pkgver}/build-gtk3"
   make DESTDIR="${pkgdir}" install
-  install -Dm644 Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit3/LICENSE"
+  install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit3/LICENSE"
 }




More information about the arch-commits mailing list