diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-24 13:35:34 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-24 14:03:38 +0000 |
commit | 3172b7afa02420d1f05bb256ac0c3e888d0f89b6 (patch) | |
tree | 6d7f66d2afe8f57b3521754e055a31831ef8a504 /main/webkitgtk/APKBUILD | |
parent | fb9ea65b4bb1da892034040939730153d28345c1 (diff) | |
download | aports-3172b7afa02420d1f05bb256ac0c3e888d0f89b6.tar.bz2 aports-3172b7afa02420d1f05bb256ac0c3e888d0f89b6.tar.xz |
main/webkitgtk: build for gtk2 too
Diffstat (limited to 'main/webkitgtk/APKBUILD')
-rw-r--r-- | main/webkitgtk/APKBUILD | 70 |
1 files changed, 53 insertions, 17 deletions
diff --git a/main/webkitgtk/APKBUILD b/main/webkitgtk/APKBUILD index 30bfa89cbd..4cc8c7429b 100644 --- a/main/webkitgtk/APKBUILD +++ b/main/webkitgtk/APKBUILD @@ -1,13 +1,14 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=webkitgtk pkgver=2.4.5 -pkgrel=0 +pkgrel=1 pkgdesc="portable web rendering engine WebKit for GTK+" url="http://webkitgtk.org/" arch="all" license="LGPL2+ BSD" depends="" -depends_dev="gtk+3.0-dev libsoup-dev gstreamer1-dev gst-plugins-base1-dev" +depends_dev="gtk+2.0-dev gtk+3.0-dev libsoup-dev gstreamer1-dev + gst-plugins-base1-dev" makedepends="$depends_dev autoconf automake libtool bison @@ -17,7 +18,6 @@ makedepends="$depends_dev gnutls-dev gobject-introspection-dev gperf - gtk+2.0-dev gtk-doc icu-dev libgcrypt-dev @@ -44,7 +44,7 @@ makedepends="$depends_dev " install= replaces="webkit" -subpackages="$pkgname-dev $pkgname-lang" +subpackages="$pkgname-dev $pkgname-lang webkitgtk2" source="http://webkitgtk.org/releases/webkitgtk-$pkgver.tar.xz webkit-gtk-1.7.90-parallel-make-hack.patch webkitgtk-1.10-textrels.patch @@ -65,22 +65,25 @@ prepare() { ;; esac done - libtoolize --force && aclocal -I Source/autotools && autoconf && automake --force || return 1 + libtoolize --force && aclocal -I Source/autotools \ + && autoconf && automake --force || return 1 } -build() { - cd "$_builddir" - ./configure \ +_build() { + local _ver=$1 + shift + ../configure $@\ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ + --libexecdir=/usr/lib/webkitgtk-$_ver \ --disable-geolocation \ - --disable-webkit2 \ - --with-gtk=3.0 \ --enable-introspection \ + --with-gtk=$_ver \ + --disable-webkit2 \ || return 1 # fight overlinking @@ -95,15 +98,48 @@ build() { && make || return 1 } +build() { + cd "$_builddir" + mkdir -p build-2.0 + msg "building for gtk2" + (cd build-2.0 && _build 2.0) || return 1 + + msg "building for gtk3" + mkdir -p build-3.0 + (cd build-3.0 && _build 3.0) || return 1 +} + + package() { cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 - rm -f "$pkgdir"/usr/lib/*.la - # verify so we don't have textrels - if scanelf -qRt "$pkgdir" | grep TEXTREL; then - error "found textrels" - return 1 - fi + for i in 2.0 3.0; do + cd build-$i + make DESTDIR="$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib/*.la + # verify so we dont have textrels + if scanelf -qRt "$pkgdir" | grep TEXTREL; then + error "found textrels" + return 1 + fi + cd .. + done +} + +webkitgtk2() { + pkgdesc="portable web rendering engine WebKit for GTK+2" + local dir + mkdir -p "$subpkgdir"/usr/share \ + "$subpkgdir"/usr/lib \ + "$subpkgdir"/usr/lib/girepository-1.0 \ + "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/share/webkitgtk-1.0 "$subpkgdir"/usr/share/ \ + || return 1 + mv "$pkgdir"/usr/lib/girepository-1.0/*-1.0* \ + "$subpkgdir"/usr/lib/girepository-1.0/ || return 1 + mv "$pkgdir"/usr/lib/lib*-1.0* \ + "$subpkgdir"/usr/lib/ || return 1 + mv "$pkgdir"/usr/bin/jsc-1 \ + "$subpkgdir"/usr/bin/ || return 1 } md5sums="c2e1687bb0314a0948fbf78e2d1e931f webkitgtk-2.4.5.tar.xz |