3353bf4722
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
61 lines
1.9 KiB
Bash
61 lines
1.9 KiB
Bash
# Template file for 'xonotic'
|
|
pkgname=xonotic
|
|
version=0.8.2
|
|
revision=2
|
|
wrksrc="Xonotic"
|
|
hostmakedepends="unzip automake libtool"
|
|
makedepends="gmp-devel MesaLib-devel SDL2-devel libcurl-devel alsa-lib-devel
|
|
libmodplug-devel libvorbis-devel libXpm-devel libjpeg-turbo-devel"
|
|
depends="desktop-file-utils xonotic-data"
|
|
short_desc="Free, fast-paced crossplatform first-person shooter"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-2.0-or-later, BSD-3-Clause"
|
|
homepage="http://xonotic.org"
|
|
distfiles="http://dl.xonotic.org/xonotic-${version}-source.zip"
|
|
checksum=5e6916f1e6e9e22285bb71ddd075189102857383e74ed0b0a3d27cef08e0bd2b
|
|
nocross=yes
|
|
|
|
do_build() {
|
|
local target
|
|
|
|
make_build_args="SDL_CONFIG=sdl2-config DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1"
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*|x86_64*) ;;
|
|
*) make_build_args+=" CFLAGS_SSE= CFLAGS_SSE2=";;
|
|
esac
|
|
echo $make_build_args
|
|
cd source/darkplaces
|
|
# Inject our $CFLAGS and $LDFLAGS
|
|
sed -i makefile.inc \
|
|
-e "s;^\(CPUOPTIMIZATIONS\)?=\(.*\);\1=${CFLAGS} \2;" \
|
|
-e "s;^\(LDFLAGS_UNIXCOMMON\)=\(.*\);\1=${LDFLAGS} \2;"
|
|
for target in cl sdl sv; do
|
|
make ${makejobs} ${make_build_args} ${target}-release
|
|
done
|
|
|
|
cd ${wrksrc}/source/d0_blind_id
|
|
autoreconf -fi
|
|
./configure --prefix=/usr --disable-rijndael
|
|
make ${makejobs}
|
|
}
|
|
|
|
do_install() {
|
|
# binaries
|
|
vbin source/darkplaces/darkplaces-dedicated xonotic-dedicated
|
|
vbin source/darkplaces/darkplaces-glx xonotic-glx
|
|
vbin source/darkplaces/darkplaces-sdl xonotic-sdl
|
|
|
|
# convenience files
|
|
vmkdir usr/share/applications
|
|
install -Dm644 $FILESDIR/*.desktop -t $DESTDIR/usr/share/applications
|
|
install -Dm644 misc/logos/icons_png/xonotic_512.png \
|
|
$DESTDIR/usr/share/pixmaps/xonotic.png
|
|
|
|
# crypto stuff
|
|
cd source/d0_blind_id
|
|
vlicense COPYING
|
|
make DESTDIR=$DESTDIR install
|
|
|
|
# Remove devel stuff
|
|
rm -rf $DESTDIR/usr/include $DESTDIR/usr/lib/pkgconfig $DESTDIR/usr/lib/*.a
|
|
}
|