|
# Contributer: Eric Bélanger <eric@archlinux.org> |
|
# Contributor: Star Brilliant <echo bTEzMjUzQGhvdG1haWwuY29tCg== | base64 -d> |
|
# Contributor: Mingye Wang <arthur2e5@aosc.xyz> |
|
|
|
pkgbase=wxgui |
|
# note: deptree-break: wxgtk -> wx + wxgtk2 |
|
pkgname=(wxbase wxgui-{gtk2,gtk3,qt,x11}}) |
|
pkgver=3.0.2 |
|
pkgrel=6 |
|
pkgdesc="GTK+ implementation of wxWidgets API for GUI" |
|
arch=('i686' 'x86_64') |
|
url="http://wxwidgets.org" |
|
license=('custom:wxWindows') |
|
options=('!emptydirs') |
|
# tell me, why do you love bzip2 so much? |
|
source=(https://github.com/wxWidgets/wxWidgets/releases/download/v${pkgver}/wxWidgets-${pkgver}.tar.bz2 |
|
make-abicheck-non-fatal.patch) |
|
sha1sums=('6461eab4428c0a8b9e41781b8787510484dea800' |
|
'dfe38650c655395b90bf082b5734c4093508bfa3') |
|
|
|
# backend constants for gtk (move to the funcs) |
|
_gtk_depends=('gtk3' 'gstreamer0.10-base' 'libsm') |
|
_gtk_makedepends=('gstreamer0.10-base-plugins' 'gconf' 'webkitgtk' 'glu') |
|
_gtk_optdepends=('webkitgtk: for webview support') |
|
|
|
prepare() { |
|
cd "wxWidgets-${pkgver}" |
|
|
|
# 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 |
|
} |
|
|
|
##_build_wx_one pkg_suffix configure-flags |
|
# thou shalt use ccache |
|
_build_wx_one(){ |
|
cp -al "wxWidgets-${pkgver}"{,"-$1"} |
|
./configure --prefix=/usr --libdir=/usr/lib --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 "${@:1:}" |
|
make |
|
} |
|
|
|
build() { |
|
_build_wx_one gtk2 --with-gtk=2 |
|
_build_wx_one gtk3 --with-gtk=3 |
|
_build_wx_one qt --with-qt # EXPERIMENTAL UPSTREAM!!!! But someone will want qt. |
|
_build_wx_one x11 --with-x11 --with-universal |
|
_build_wx_one motif --with-motif |
|
|
|
# choose a random one to cd into (for the locales). |
|
cd "wxWidgets-${pkgver}-gtk2" |
|
make -C locale allmo |
|
} |
|
|
|
# basically the complement of whatever we have deleted. |
|
package_wxbase(){ |
|
# this is so dirty |
|
# i like it (not really) |
|
cd "wxWidgets-${pkgver}-gtk2" |
|
make DESTDIR="${pkgdir}" install |
|
# there should be some shopt-tweaking things in makepkg but who cares |
|
shopt -s extglob |
|
rm -rf -- !("${pkgdir}/usr/"{bin,include,share}|"${pkgdir}/usr/lib/libwx_base"*) |
|
install -D -m644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgbase}-$1/LICENSE" |
|
} |
|
|
|
# I am really lazy. we should do it with some... tricks. |
|
_package_wx_one(){ |
|
provides+=('wxgtk' 'wxgui') # two dummy packages, one for backwards compatibility (why not make it three) |
|
# yes, backwards compatibility: goo.gl/j6xKSc (biergaizi told me about the img) |
|
cd "wxWidgets-${pkgver}-$1" |
|
# TODO: find some better makefile targets |
|
make DESTDIR="${pkgdir}" install |
|
rm -rf "${pkgdir}/usr/"{bin,include,share} "${pkgdir}/usr/lib/libwx_base"* |
|
install -D -m644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgbase}-$1/LICENSE" |
|
} |
|
|
|
package_wxgui-gtk2(){ |
|
pkgdesc... |
|
pkgdep... |
|
_package_wx_one gtk2 "$@" |
|
} |
|
|
Submitted to Arch Bug Tracker https://bugs.archlinux.org/task/48145