Advertisement
Guest User

Untitled

a guest
Jan 12th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.75 KB | None | 0 0
  1. # Maintainer: Que Quotion ( quequotion at g mail dot com )
  2. # Contributors: Det, Charles Bos, Xiao-Long Chen, Christopher Reimer, Que Quotion
  3. # Based on gtk3 trunk: https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/gtk3
  4.  
  5. pkgbase=gtk3-ubuntu-multilib
  6. pkgname=("lib32-gtk3-ubuntu-multilib" "gtk3-ubuntu-multilib")
  7. pkgver=3.18.6
  8. _debrel=1ubuntu1
  9. pkgrel=2
  10. pkgdesc="GObject-based multi-platform toolkit (v3) from Ubuntu"
  11. depends=(adwaita-icon-theme gtk-update-icon-cache shared-mime-info)
  12. arch=(i686 x86_64)
  13. url="https://launchpad.net/ubuntu/+source/gtk+3.0/"
  14. license=(LGPL)
  15. source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/${pkgver:0:4}/gtk+-$pkgver.tar.xz
  16.         https://launchpad.net/ubuntu/+archive/primary/+files/gtk+3.0_$pkgver-$_debrel.debian.tar.xz
  17.         settings.ini)
  18. sha256sums=('78cabf0fd5a662f8723f62d5ac633072c76c557c1d700454c9c3deaa37e441ef'
  19.             '61cedf302ec1b64c3489da45931fb1a1813b976b7a2f9982b066780d3c78887f'
  20.             '14369dfd1d325c393e17c105d5d5cc5501663277bd4047ea04a50abb3cfbd119')
  21.  
  22. prepare() {
  23.   cd "gtk+-$pkgver"
  24.  
  25.   # Apply Patches
  26.   for i in $(grep -v '#' "$srcdir/debian/patches/series" | sort); do
  27.     msg2 "Applying $i ..."
  28.     patch -p1 -i "$srcdir/debian/patches/$i"
  29.   done
  30. }
  31.  
  32. build() {
  33.   cd "gtk+-$pkgver"
  34.  
  35.   #Build native libraries
  36.   [[ -d build-x86_64 ]] || mkdir build-x86_64
  37.   pushd build-x86_64
  38.  
  39.   CXX=/bin/false ../autogen.sh --prefix=/usr \
  40.       --sysconfdir=/etc \
  41.       --localstatedir=/var \
  42.       --enable-gtk2-dependency \
  43.       --disable-schemas-compile \
  44.       --enable-{x11,broadway,wayland}-backend
  45.  
  46.   #https://bugzilla.gnome.org/show_bug.cgi?id=655517
  47.   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  48.  
  49.   make
  50.   popd
  51.  
  52.   #Build 32bit libraries
  53.   [[ -d build-i686 ]] || mkdir build-i686
  54.   pushd build-i686
  55.  
  56.   export CC='gcc -m32'
  57.   export CXX='g++ -m32'
  58.   export LDFLAGS+=' -m32'
  59.   export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
  60.  
  61.   export GTK_IM_MODULE_FILE='gtk.immodules-32'
  62.   CXX=/bin/false ../autogen.sh --prefix=/usr \
  63.       --sysconfdir=/etc \
  64.       --localstatedir=/var \
  65.       --enable-gtk2-dependency \
  66.       --disable-schemas-compile \
  67.       --enable-{x11,broadway,wayland}-backend \
  68.       --lib{exec,}dir=/usr/lib32 \
  69.       --build=i686-pc-linux-gnu
  70.  
  71.   #https://bugzilla.gnome.org/show_bug.cgi?id=655517
  72.   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  73.  
  74.   make
  75.   popd
  76. }
  77.  
  78. package_gtk3-ubuntu-multilib() {
  79.   depends+=(atk cairo glib2 pango colord at-spi2-atk wayland lib{cups,x{cursor,inerama,randr,i,composite,damage,kbcommon,11,ext}})
  80.   makedepends=(gobject-introspection python2)
  81.   provides=("gtk3=${pkgver}" "gtk3-ubuntu=${pkgver}" "gtk-update-icon-cache=${pkgver}")
  82.   conflicts=("gtk3=${pkgver}" "gtk3-ubuntu=${pkgver}" "gtk-update-icon-cache=${pkgver}")
  83.   install=gtk3-ubuntu.install
  84.   cd "gtk+-$pkgver/build-x86_64"
  85.   make DESTDIR="$pkgdir" install
  86.   install -Dm644 ../../settings.ini "$pkgdir/usr/share/gtk-3.0/settings.ini"
  87. }
  88.  
  89. package_lib32-gtk3-ubuntu-multilib() {
  90.   pkgdesc+=" (32bit)"
  91.  
  92. depends+=(lib32-{glib2,atk,cairo,pango,colord,at-spi2-atk,wayland,lib{cups,xcursor,xinerama,xrandr,xi,xcomposite,xdamage,xkbcommon,x11,xext}})
  93.   makedepends=(lib32-{gobject-introspection,python2} 'gcc-multilib')
  94.   provides=("lib32-gtk3=${pkgver}" "lib32-gtk3-ubuntu=${pkgver}" "lib32-gtk-update-icon-cache=${pkgver}")
  95.   conflicts=("lib32-gtk3=${pkgver}" "lib32-gtk3-ubuntu=${pkgver}" "lib32-gtk-update-icon-cache=${pkgver}")
  96.   install=lib32-gtk3-ubuntu.install
  97.   cd "gtk+-$pkgver/build-i686"
  98.   make DESTDIR="$pkgdir" install
  99.  
  100.   rm -rf "${pkgdir}"/{etc,usr/{share,include}} # needs bin/
  101.  
  102.   mv "${pkgdir}"/usr/bin/gtk-query-immodules-3.0{,-32}
  103.   find "$pkgdir/usr/bin" -type f -not -name gtk-query-immodules-3.0-32 -delete
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement