archrelease: copy trunk to extra-x86_64
[arch-packages.git] / wxwidgets / repos / extra-x86_64 / PKGBUILD
blob6ae3370a0da5539bc8fcb3b5ac42f8fbbaa8b927
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.2.1
7 pkgrel=1
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 sha256sums=('dffcb6be71296fff4b7f8840eb1b510178f57aa2eb236b20da41182009242c02')
15 build() {
16   cmake -B build-gtk3 -S wxWidgets-$pkgver \
17     -DCMAKE_INSTALL_PREFIX=/usr \
18     -DCMAKE_BUILD_TYPE=None \
19     -DwxBUILD_TOOLKIT=gtk3 \
20     -DwxUSE_OPENGL=ON \
21     -DwxUSE_REGEX=sys\
22     -DwxUSE_ZLIB=sys \
23     -DwxUSE_EXPAT=sys \
24     -DwxUSE_LIBJPEG=sys \
25     -DwxUSE_LIBPNG=sys \
26     -DwxUSE_LIBTIFF=sys \
27     -DwxUSE_LIBLZMA=sys \
28     -DwxUSE_LIBMSPACK=ON \
29     -DwxUSE_PRIVATE_FONTS=ON \
30     -DwxUSE_GTKPRINT=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 \
37     -DwxUSE_OPENGL=ON \
38     -DwxUSE_REGEX=sys \
39     -DwxUSE_ZLIB=sys \
40     -DwxUSE_EXPAT=sys \
41     -DwxUSE_LIBJPEG=sys \
42     -DwxUSE_LIBPNG=sys \
43     -DwxUSE_LIBTIFF=sys \
44     -DwxUSE_LIBLZMA=sys \
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
50   cd wxWidgets-$pkgver
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')
73   conflicts=(wxgtk3)
74   provides=(wxgtk3 wxwidgets)
75   replaces=(wxgtk3)
77   DESTDIR="$pkgdir" cmake --install build-gtk3
78   rm -r "$pkgdir"/usr/{include,lib/libwx_base*,bin/wxrc*}
79   
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)
86   provides=(wxwidgets)
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/')
95   done
97   install -Dm644 wxWidgets-$pkgver/docs/licence.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE