blob: 8e3f3f28cffa2efe8600cceed568dad511da8304 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
# Maintainer: envolution
# Contributor: Jan Cholasta <grubber at grubber cz>
# shellcheck shell=bash disable=SC2034,SC2154
pkgname=slade-git
pkgver=3.2.7+r3092+g3baac1241
pkgrel=4
pkgdesc='SLADE3 Doom editor (git version)'
arch=('i686' 'x86_64')
url='http://slade.mancubus.net/'
license=('GPL')
depends=('bzip2'
'fluidsynth'
'freeimage'
'ftgl'
'glu'
'libgl'
'lua'
'mpg123'
'sfml'
'webkit2gtk-4.1'
'wxwidgets-gtk3'
'zlib')
makedepends=('cmake'
'git'
'p7zip')
provides=('slade')
conflicts=('slade')
source=('slade::git+https://github.com/sirjuddington/SLADE.git')
sha256sums=('SKIP'
'b4f2e8ebac43c0fc351a3c94b6fad6862d8cc9cdb55f7a224747d1066a2e09f5')
#wxwidgets -------------------
makedepends+=(cmake
git
glu
gst-plugins-base
nanosvg
qt5-base
webkit2gtk-4.1)
depends+=(bash
cairo
fontconfig
gcc-libs
gdk-pixbuf2
glib2
glibc
gst-plugins-bad-libs
gstreamer
gtk3
libglvnd
libjpeg-turbo
libnotify
libmspack
libpng
libsm # cmake target
libtiff
libx11
libxkbcommon
libxtst
pango
sdl2
wayland
wxwidgets-common)
source+=(git+https://github.com/wxWidgets/wxWidgets#tag=v3.2.6)
#</wxwidgets>
build() {
# Build wxwidgets-gtk
cd "$srcdir"
cmake -B build-wxwidgets -S wxWidgets \
-DCMAKE_INSTALL_PREFIX=/usr/share/slade3 \
-DCMAKE_BUILD_TYPE=None \
-DwxBUILD_TOOLKIT=gtk3 \
-DwxUSE_OPENGL=ON \
-DwxUSE_REGEX=sys -DwxUSE_ZLIB=sys \
-DwxUSE_EXPAT=sys -DwxUSE_LIBJPEG=sys \
-DwxUSE_LIBPNG=sys -DwxUSE_LIBTIFF=sys \
-DwxUSE_LIBLZMA=sys -DwxUSE_NANOSVG=sys \
-DwxUSE_LIBMSPACK=ON -DwxUSE_PRIVATE_FONTS=ON \
-DwxUSE_GTKPRINT=ON -DwxUSE_GLCANVAS_EGL=OFF
cmake --build build-wxwidgets
# Generate translation files (Makefile needed for this step)
cd wxWidgets
./configure --prefix=/usr --disable-tests
make -C locale allmo
cd "$srcdir"
# Build slade
export WX_CONFIG="$srcdir/build-wxwidgets/wx-config"
export PKG_CONFIG_PATH="$srcdir/build-wxwidgets/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$srcdir/build-wxwidgets/lib:$LD_LIBRARY_PATH"
cd slade
cmake -B build -S . \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_RPATH=/usr/share/slade3/lib \
-DwxWidgets_CONFIG_EXECUTABLE="$WX_CONFIG"
cmake --build build
}
package() {
# Install slade
cd "$srcdir/slade/build"
make install DESTDIR="$pkgdir"
# Install wxwidgets to /usr/share/slade3
cd "$srcdir"
DESTDIR="$pkgdir" cmake --install build-wxwidgets
rm -rf "$pkgdir/usr/share/slade3/include"
rm -rf "$pkgdir/usr/share/slade3/lib/cmake"
rm -rf "$pkgdir/usr/share/slade3/lib/wx/config"
rm -rf "$pkgdir/usr/share/slade3/lib/pkgconfig"
# Rename slade executable and create wrapper script
mv "$pkgdir/usr/bin/slade" "$pkgdir/usr/bin/slade3.bin"
cat >"$pkgdir/usr/bin/slade" <<'EOF'
#!/bin/sh
GDK_BACKEND=x11 exec /usr/bin/slade3.bin "$@"
EOF
chmod 755 "$pkgdir/usr/bin/slade"
}
|