OCaml 4.14.0 rebuild
[arch-packages.git] / wxwidgets / trunk / PKGBUILD
blob81b9788320abd7e815e531a452bcab8fa38a4a7a
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Contributor: Eric BĂ©langer <eric@archlinux.org>
4 pkgbase=wxwidgets
5 pkgname=(wxwidgets-gtk3 wxwidgets-qt5 wxwidgets-common)
6 pkgver=3.2.0
7 pkgrel=4
8 arch=(x86_64)
9 url='https://wxwidgets.org'
10 license=(custom:wxWindows)
11 makedepends=(cmake gst-plugins-base glu webkit2gtk libnotify qt5-base sdl2 libmspack)
12 source=(https://github.com/wxWidgets/wxWidgets/releases/download/v$pkgver/wxWidgets-$pkgver.tar.bz2
13         destdir.patch)
14 sha256sums=('356e9b55f1ae3d58ae1fed61478e9b754d46b820913e3bfbc971c50377c1903a'
15             'cb4a7ca0d40b090d5d40d77790828a26766c6b496b3a5f5351fa30b3a6b42bd9')
16 options=(debug)
18 prepare() {
19   patch -d wxWidgets-$pkgver -p1 < destdir.patch # Honor DESTDIR
22 build() {
23   cmake -B build-gtk3 -S wxWidgets-$pkgver \
24     -DCMAKE_INSTALL_PREFIX=/usr \
25     -DCMAKE_BUILD_TYPE=None \
26     -DwxBUILD_TOOLKIT=gtk3 \
27     -DwxUSE_OPENGL=ON \
28     -DwxUSE_REGEX=sys\
29     -DwxUSE_ZLIB=sys \
30     -DwxUSE_EXPAT=sys \
31     -DwxUSE_LIBJPEG=sys \
32     -DwxUSE_LIBPNG=sys \
33     -DwxUSE_LIBTIFF=sys \
34     -DwxUSE_LIBLZMA=sys \
35     -DwxUSE_LIBMSPACK=ON \
36     -DwxUSE_PRIVATE_FONTS=ON
37   cmake --build build-gtk3
39   cmake -B build-qt5 -S wxWidgets-$pkgver \
40     -DCMAKE_INSTALL_PREFIX=/usr \
41     -DCMAKE_BUILD_TYPE=None \
42     -DwxBUILD_TOOLKIT=qt \
43     -DwxUSE_OPENGL=ON \
44     -DwxUSE_REGEX=sys \
45     -DwxUSE_ZLIB=sys \
46     -DwxUSE_EXPAT=sys \
47     -DwxUSE_LIBJPEG=sys \
48     -DwxUSE_LIBPNG=sys \
49     -DwxUSE_LIBTIFF=sys \
50     -DwxUSE_LIBLZMA=sys \
51     -DwxUSE_LIBMSPACK=ON \
52     -DwxUSE_PRIVATE_FONTS=ON
53   cmake --build build-qt5
55 # Run configure to generate the Makefile, cmake doesn't install translations
56   cd wxWidgets-$pkgver
57   ./configure --prefix=/usr
60 package_wxwidgets-common() {
61   pkgdesc='Common libraries and headers for wxwidgets'
62   depends=(expat pcre2 libsecret)
63   conflicts=(wxgtk-common)
64   replaces=(wxgtk-common)
66   DESTDIR="$pkgdir" cmake --install build-gtk3
67   rm -r "$pkgdir"/usr/{bin/wx-config,lib/{wx,libwx_gtk*}}
68   install -Dm644 wxWidgets-$pkgver/wxwin.m4 -t "$pkgdir"/usr/share/aclocal
69 # Install translations
70   make DESTDIR="$pkgdir" -C wxWidgets-$pkgver locale_install  
72   install -Dm644 wxWidgets-$pkgver/docs/licence.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
75 package_wxwidgets-gtk3() {
76   pkgdesc='GTK+3 implementation of wxWidgets API for GUI'
77   depends=(gtk3 gst-plugins-base-libs libsm wxwidgets-common libnotify libmspack sdl2)
78   optdepends=('webkit2gtk: for webview support')
79   conflicts=(wxgtk3)
80   provides=(wxgtk3 wxwidgets)
81   replaces=(wxgtk3)
83   DESTDIR="$pkgdir" cmake --install build-gtk3
84   rm -r "$pkgdir"/usr/{include,lib/cmake,lib/libwx_base*,bin/wxrc*}
85   
86   install -Dm644 wxWidgets-$pkgver/docs/licence.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
89 package_wxwidgets-qt5() {
90   pkgdesc='Qt5 implementation of wxWidgets API for GUI'
91   depends=(qt5-base wxwidgets-common libmspack sdl2)
92   provides=(wxwidgets)
94   DESTDIR="$pkgdir" cmake --install build-qt5
95   rm -r "$pkgdir"/usr/{include,lib/cmake,lib/libwx_base*,bin/wxrc*}
96   mv "$pkgdir"/usr/bin/wx-config{,-qt} # Conflicts with wx-gtk3
98   install -Dm644 wxWidgets-$pkgver/docs/licence.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE