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)
13 sha256sums=('dffcb6be71296fff4b7f8840eb1b510178f57aa2eb236b20da41182009242c02')
16 cmake -B build-gtk3 -S wxWidgets-$pkgver \
17 -DCMAKE_INSTALL_PREFIX=/usr \
18 -DCMAKE_BUILD_TYPE=None \
19 -DwxBUILD_TOOLKIT=gtk3 \
28 -DwxUSE_LIBMSPACK=ON \
29 -DwxUSE_PRIVATE_FONTS=ON \
31 cmake --build build-gtk3
33 cmake -B build-qt5 -S wxWidgets-$pkgver \
34 -DCMAKE_INSTALL_PREFIX=/usr \
35 -DCMAKE_BUILD_TYPE=None \
36 -DwxBUILD_TOOLKIT=qt \
45 -DwxUSE_LIBMSPACK=ON \
46 -DwxUSE_PRIVATE_FONTS=ON
47 cmake --build build-qt5
49 # Run configure to generate the Makefile, cmake doesn't install translations
51 ./configure --prefix=/usr
54 package_wxwidgets-common() {
55 pkgdesc='Common libraries and headers for wxwidgets'
56 depends=(expat pcre2 libsecret)
57 conflicts=(wxgtk-common)
58 replaces=(wxgtk-common)
60 DESTDIR="$pkgdir" cmake --install build-gtk3
61 rm -r "$pkgdir"/usr/{bin/wx-config,lib/{cmake,wx,libwx_gtk*}}
62 install -Dm644 wxWidgets-$pkgver/wxwin.m4 -t "$pkgdir"/usr/share/aclocal
63 # Install translations
64 make DESTDIR="$pkgdir" -C wxWidgets-$pkgver locale_install
66 install -Dm644 wxWidgets-$pkgver/docs/licence.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
69 package_wxwidgets-gtk3() {
70 pkgdesc='GTK+3 implementation of wxWidgets API for GUI'
71 depends=(gtk3 gst-plugins-base-libs libsm wxwidgets-common libnotify libmspack sdl2)
72 optdepends=('webkit2gtk: for webview support')
74 provides=(wxgtk3 wxwidgets)
77 DESTDIR="$pkgdir" cmake --install build-gtk3
78 rm -r "$pkgdir"/usr/{include,lib/libwx_base*,bin/wxrc*}
80 install -Dm644 wxWidgets-$pkgver/docs/licence.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
83 package_wxwidgets-qt5() {
84 pkgdesc='Qt5 implementation of wxWidgets API for GUI'
85 depends=(qt5-base wxwidgets-common libmspack sdl2 libtiff)
88 DESTDIR="$pkgdir" cmake --install build-qt5
89 rm -r "$pkgdir"/usr/{include,lib/libwx_base*,bin/wxrc*}
90 mv "$pkgdir"/usr/bin/wx-config{,-qt} # Conflicts with wx-gtk3
91 # Rename cmake files for coinstallability
92 mv "$pkgdir"/usr/lib/cmake/wxWidgets{,Qt}
93 for _f in "$pkgdir"/usr/lib/cmake/wxWidgetsQt/*; do
94 mv $_f $(dirname $_f)/$(basename $_f | sed -e 's/wxWidgets/wxWidgetsQt/')
97 install -Dm644 wxWidgets-$pkgver/docs/licence.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE