1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Contributor: Eric BĂ©langer <eric@archlinux.org>
5 pkgname=(wxwidgets-gtk3 wxwidgets-qt5 wxwidgets-common)
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
14 sha256sums=('356e9b55f1ae3d58ae1fed61478e9b754d46b820913e3bfbc971c50377c1903a'
15 'cb4a7ca0d40b090d5d40d77790828a26766c6b496b3a5f5351fa30b3a6b42bd9')
19 patch -d wxWidgets-$pkgver -p1 < destdir.patch # Honor DESTDIR
23 cmake -B build-gtk3 -S wxWidgets-$pkgver \
24 -DCMAKE_INSTALL_PREFIX=/usr \
25 -DCMAKE_BUILD_TYPE=None \
26 -DwxBUILD_TOOLKIT=gtk3 \
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 \
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
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')
80 provides=(wxgtk3 wxwidgets)
83 DESTDIR="$pkgdir" cmake --install build-gtk3
84 rm -r "$pkgdir"/usr/{include,lib/cmake,lib/libwx_base*,bin/wxrc*}
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)
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