blob: 72da8631415098f038360c2f156314eadf2dc779 (
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
# Maintainer: Wolfspirit Magic <wolfspirit at wolfspirit dot eu>
pkgname=firestorm-git
_src=master
_extension=dev
pkgver=7.2.4.80358
pkgrel=1
pkgdesc="Firestorm is a feature-packed third-party viewer for Second Life and OpenSim grids ($_extension version)"
arch=('x86_64')
url=https://www.firestormviewer.org
license=('LGPL')
install='firestorm.install'
depends=(apr-util dbus-glib glu gtk2 lib32-libidn lib32-libsndfile
lib32-util-linux lib32-zlib libbsd libgl libidn libjpeg-turbo
libpng libxcrypt-compat libxss libxml2 mesa nss openal sdl
vlc zlib)
optdepends=(
'alsa-lib: for ALSA support'
'pepper-flash: for inworld Flash support'
'freealut: for OpenAL support'
'lib32-gst-plugins-good: for voice support'
'lib32-libidn11: for voice support'
'libpulse: for PulseAudio support'
'mesa-libgl: For Intel, Radeon, Nouveau support'
'nvidia-libgl: for NVIDIA support'
'nvidia-utils: for NVIDIA support'
)
makedepends=('cmake' 'python-pip' 'git' 'boost' 'xz')
conflicts=()
provides=("firestorm-$_extension")
source=(
"$pkgname"::"git+https://github.com/FirestormViewer/phoenix-firestorm#branch=${_src}"
"fs-build-variables"::'git+https://github.com/FirestormViewer/fs-build-variables'
'firestorm.desktop'
'firestorm.launcher'
# This patch fixes the fortify check. Arch defines _FORTIFY_SOURCE by default,
# These are in CMAKE_CXX_FLAGS and not in CMAKE_CXX_COMPILER_ARG1,
# so the check for _FORTIFY_SOURCE in CMAKE_CXX_COMPILER_ARG1 fails and the fortify check is not disabled,
# which causes build failures.
'001-fix-fortify-check.patch'
# We want to be able to use the OS version together with the official firestorm-bin version so we want a different config directory for the OS version.
# This patch changes the default config directory to ~/.firestorm_x64-os instead of ~/.firestorm_x64
'002-set-different-config-dir.patch'
)
sha256sums=('SKIP'
'SKIP'
'db34a50f4b7fda4a465cd0536f17a0f6040ff6b2e40c32594b1f244ebe8e2d60'
'465f1611c17f90bba8bc7e7cc3e05ffe8cf20fb9c1b7df59053f54a6bceb8283'
'cbef822d5ce2b1b9eb3bc88bfcaa59dfb2eec2cc698bdcb391b1c332a7ed93fb'
'5eec78e0196e51d58e45078b84dc277353ef635ff160ff61ac58ab5966245011')
# The binaries are already stripped in the build system.
options=(!strip)
pkgver() {
_pkgver=$(cat "$srcdir/$pkgname/indra/newview/VIEWER_VERSION_FS.txt")
cd "$srcdir/$pkgname"
_revnum=$(git rev-list --count HEAD)
printf "%s.%s" $_pkgver $_revnum
}
prepare() {
cd "$srcdir/$pkgname"
for p in "$srcdir"/*.patch; do
# Replace [EXTENSION] with the actual extension in the patch file
sed -i "s/\[EXTENSION\]/$_extension/g" "$p"
echo "Applying patch $(basename "$p")"
patch -Np1 -i "$p" || exit 1
done
}
build() {
# Rename _GLIBCXX_ASSERTIONS to _NO_GLIBCXX_ASSERTION if defined
# The problem is that makepkg might define -D_GLIBCXX_ASSERTIONS.
# There is a bug in FS right now that causes the assertion to trigger a crash so we rename it to NO_GLIBCXX_ASSERTIONS to disable the assertions.
# This is not ideal but it is a workaround until the underlying issue in FS is fixed.
CPPFLAGS=${CPPFLAGS//_GLIBCXX_ASSERTIONS/_NO_GLIBCXX_ASSERTIONS}
CXXFLAGS=${CXXFLAGS//_GLIBCXX_ASSERTIONS/_NO_GLIBCXX_ASSERTIONS}
export CPPFLAGS CXXFLAGS
cd "$pkgname"
export AUTOBUILD_VARIABLES_FILE="$srcdir/fs-build-variables/variables"
# Install Autobuild + python deps into an isolated venv
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
case "$_extension" in
os)
channel="ReleaseOSArchx64"
;;
beta)
channel="BetaOSArchx64"
;;
*)
channel="DevOSArchx64"
;;
esac
# Build the project using Autobuild with the specified options:
# - Package the output for installation to /opt/firestorm-$_extension
# - Enable AVX2 optimizations
# - Don't use Kakadu for JPEG2000 support. KDU Requires license. Falling back to OpenJPEG for JPEG2000 support.
# - Don't use FMOD Studio for audio. FMOD Studio requires an account to download the API. Falling back to OpenAL for audio support.
# - Don't use Havok for physics. Havok requires license. This only affects Mesh uploads.
# - Enable OpenSim support
# - Pass --fresh to cmake to ensure flags are up to date
autobuild build -A 64 -c ReleaseFS -- --chan "$channel" \
--package \
--avx2 \
-DUSE_KDU:BOOL=OFF \
-DUSE_FMODSTUDIO:BOOL=OFF \
-DHAVOK_TPV:BOOL=OFF \
-DOPENSIM:BOOL=ON \
--fresh
# Deactivate the virtual environment after the build is complete
deactivate
}
package() {
mkdir -p "$pkgdir/opt"
mkdir -p "$pkgdir/usr/share/applications"
mkdir -p "$pkgdir/usr/share/icons/hicolor/512x512/apps"
# Install the packaged output to /opt/firestorm-$_extension
mv "$pkgname/build-linux-x86_64/newview/packaged" "$pkgdir/opt/firestorm-$_extension"
install -Dm755 "firestorm.launcher" "$pkgdir/usr/bin/firestorm-$_extension"
install -Dm644 "firestorm.desktop" "$pkgdir/usr/share/applications/firestorm-$_extension.desktop"
# Replace [EXTENSION] with the actual extension in the launcher and desktop file
sed -i "s/\[EXTENSION\]/$_extension/g" "$pkgdir/usr/bin/firestorm-$_extension"
sed -i "s/\[EXTENSION\]/$_extension/g" "$pkgdir/usr/share/applications/firestorm-$_extension.desktop"
install -Dm644 "$pkgdir/opt/firestorm-$_extension/firestorm_icon.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/firestorm-$_extension.png"
# rename "do-not-directly-run-firestorm-bin" to "do-not-directly-run-firestorm-$_extension" in the bin directory
# firestorm uses that as the class name.
# This allows us to have both the OS version and the official version installed at the same time
# The .desktop file needs to match this name in the StartupWMClass field to work properly with the window manager.
mv "$pkgdir/opt/firestorm-$_extension/bin/do-not-directly-run-firestorm-bin" "$pkgdir/opt/firestorm-$_extension/bin/do-not-directly-run-firestorm-$_extension"
# replace "do-not-directly-run-firestorm-bin" with "do-not-directly-run-firestorm-$_extension" in the "firestorm" script
sed -i "s/do-not-directly-run-firestorm-bin/do-not-directly-run-firestorm-$_extension/g" "$pkgdir/opt/firestorm-$_extension/firestorm"
}
|