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

Antonio Rojas arojas at archlinux.org
Sun Jun 4 22:33:08 UTC 2017


    Date: Sunday, June 4, 2017 @ 22:33:07
  Author: arojas
Revision: 297789

First attempt at adding a GTK3 version

Modified:
  wxgtk/trunk/PKGBUILD

----------+
 PKGBUILD |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 53 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-06-04 22:31:40 UTC (rev 297788)
+++ PKGBUILD	2017-06-04 22:33:07 UTC (rev 297789)
@@ -1,16 +1,15 @@
 # $Id$
 # Maintainer: Eric Bélanger <eric at archlinux.org>
 
-pkgname=wxgtk
+pkgbase=wxgtk
+pkgname=(wxgtk2 wxgtk3 wxgtk-common)
 pkgver=3.0.3.1
-pkgrel=1
+pkgrel=2
 pkgdesc="GTK+ implementation of wxWidgets API for GUI"
 arch=('i686' 'x86_64')
 url="https://wxwidgets.org"
 license=('custom:wxWindows')
-depends=('gtk2' 'gst-plugins-base-libs' 'libsm')
-makedepends=('gst-plugins-base' 'gconf' 'webkitgtk2' 'glu')
-optdepends=('webkitgtk2: for webview support')
+makedepends=('gst-plugins-base' 'gconf' 'webkitgtk2' 'glu' 'webkitgtk' 'libnotify')
 options=('!emptydirs')
 source=(https://github.com/wxWidgets/wxWidgets/releases/download/v$pkgver/wxWidgets-$pkgver.tar.bz2
         make-abicheck-non-fatal.patch)
@@ -23,6 +22,9 @@
   # C++ ABI check is too strict and breaks with GCC 5.1
   # https://bugzilla.redhat.com/show_bug.cgi?id=1200611
   patch -Np1 -i ../make-abicheck-non-fatal.patch
+
+  cd ..
+  cp -r wxWidgets-${pkgver} wxWidgets-${pkgver}-gtk3
 }
 
 build() {
@@ -34,10 +36,55 @@
     --disable-precomp-headers
   make
   make -C locale allmo
+
+  cd ../wxWidgets-${pkgver}-gtk3
+  ./autogen.sh
+  ./configure --prefix=/usr --libdir=/usr/lib --with-gtk=3 --with-opengl --enable-unicode \
+    --enable-graphics_ctx --enable-mediactrl --enable-webview --with-regex=builtin \
+    --with-libpng=sys --with-libxpm=sys --with-libjpeg=sys --with-libtiff=sys \
+    --disable-precomp-headers
+  make
 }
 
-package() {
+package_wxgtk-common() {
+  depends=('zlib' 'gcc-libs' 'expat')
+
   cd wxWidgets-${pkgver}
   make DESTDIR="${pkgdir}" install
+  rm -r "$pkgdir"/usr/{bin,lib/{wx,libwx_gtk*}}
+
   install -D -m644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }
+
+package_wxgtk2() {
+  depends=('gtk2' 'gst-plugins-base-libs' 'libsm' 'wxgtk-common' 'libnotify')
+  optdepends=('webkitgtk2: for webview support')
+  conflicts=('wxgtk')
+  provides=('wxgtk')
+  replaces=('wxgtk')
+
+  cd wxWidgets-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  rm -r "$pkgdir"/usr/{include,share,lib/libwx_base*}
+  
+  install -D -m644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_wxgtk3() {
+  depends=('gtk3' 'gst-plugins-base-libs' 'libsm' 'wxgtk-common' 'libnotify')
+  optdepends=('webkitgtk: for webview support')
+  conflicts=('wxgtk<3.0.3.1-2')
+
+  cd wxWidgets-${pkgver}-gtk3
+  make DESTDIR="${pkgdir}" install  
+  rm -r "$pkgdir"/usr/{include,share,lib/libwx_base*}
+  for _i in wx-config wxrc-3.0
+  do
+    mv "$pkgdir"/usr/bin/{${_i},${_i}-gtk3}
+  done
+  rm "$pkgdir"/usr/bin/wxrc
+  ln -s wxrc-3.0-gtk3 "$pkgdir"/usr/bin/wxrc-gtk3
+   
+  install -D -m644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+



More information about the arch-commits mailing list