[arch-commits] Commit in (5 files)

Brett Cornwall ainola at archlinux.org
Wed Dec 5 00:53:49 UTC 2018


    Date: Wednesday, December 5, 2018 @ 00:53:35
  Author: ainola
Revision: 411237

Add Nexuiz from AUR (34 votes)

Added:
  nexuiz/
  nexuiz/repos/
  nexuiz/trunk/
  nexuiz/trunk/PKGBUILD
  nexuiz/trunk/libpng14.patch

----------------+
 PKGBUILD       |   78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 libpng14.patch |   39 +++++++++++++++++++++++++++
 2 files changed, 117 insertions(+)

Added: nexuiz/trunk/PKGBUILD
===================================================================
--- nexuiz/trunk/PKGBUILD	                        (rev 0)
+++ nexuiz/trunk/PKGBUILD	2018-12-05 00:53:35 UTC (rev 411237)
@@ -0,0 +1,78 @@
+# Maintainer:  Ainola
+# Contributor: Sven-Hendrik Haase
+# Contributor: Xyne
+# Contributor: Rick Chen (stuffcorpse)
+# Contributor: Jaroslaw Swierczynski
+# Contributor: Roman Kyrylych
+# Contributor: Camille Moncelier
+
+pkgname=nexuiz
+pkgver=2.5.2
+pkgrel=9
+arch=('x86_64')
+pkgdesc="Fast-paced multiplayer first-person shooter."
+url="https://www.alientrap.com/games/nexuiz/"
+license=("GPL2")
+makedepends=('libicns' 'gendesk')
+depends=('libgl' 'alsa-lib' 'libjpeg>=8' 'libxpm' 'libxxf86dga' 'hicolor-icon-theme' 'sdl')
+source=("https://downloads.sourceforge.net/$pkgname/${pkgname}-${pkgver//./}.zip"
+        "libpng14.patch")
+sha256sums=('a5e27ebcc9775c4a490d0d3536c32e4a8f8f96b038c0b6a78d1823c37a962000'
+            '327c45a56faa1963fa08a590694fd0c23bed448282f9473c2d483447df9a6e1f')
+
+prepare() {
+    gendesk -f -n --pkgname="$pkgname-sdl" \
+        --name="Nexuiz (SDL)" \
+        --pkgdesc="$pkgdesc" \
+        --exec=/usr/bin/nexuiz-sdl \
+        --categories='Game;Shooter'
+
+    gendesk -f -n --pkgname="$pkgname-glx" \
+        --name="Nexuiz (GLX)" \
+        --pkgdesc="$pkgdesc" \
+        --exec=/usr/bin/nexuiz-glx \
+        --categories='Game;Shooter'
+
+    # Remove unneeded cruft
+    find Nexuiz -name "*_windows.bat" -exec rm {} +
+    find Nexuiz -name "*_mac.sh" -exec rm {} +
+
+    cd Nexuiz
+    bsdtar -x -f "sources/enginesource20091001.zip"
+    cd darkplaces
+    patch -p1 < "$srcdir/libpng14.patch"
+
+    cd "$srcdir/Nexuiz/Nexuiz.app/Contents/Resources"
+    icns2png -x Nexuiz.icns
+}
+
+build(){
+    cd Nexuiz/darkplaces
+    # Build the binaries separately instead to avoid truncated files
+    make CPUOPTIMIZATIONS="$CFLAGS" DP_FS_BASEDIR=/usr/share/nexuiz/ DP_LINK_TO_LIBJPEG=1 cl-nexuiz
+    make CPUOPTIMIZATIONS="$CFLAGS" DP_FS_BASEDIR=/usr/share/nexuiz/ DP_LINK_TO_LIBJPEG=1 sdl-nexuiz
+    make CPUOPTIMIZATIONS="$CFLAGS" DP_FS_BASEDIR=/usr/share/nexuiz/ DP_LINK_TO_LIBJPEG=1 sv-nexuiz
+}
+
+package(){
+    install -Dm755 Nexuiz/darkplaces/nexuiz-{dedicated,glx,sdl} -t "$pkgdir/usr/bin/"
+    install -Dm644 *.desktop -t "$pkgdir/usr/share/applications/"
+
+    # Documentation
+    install -dm755 "$pkgdir/usr/share/doc/nexuiz/"
+    mv Nexuiz/Docs/* "$pkgdir/usr/share/doc/nexuiz/"
+    find "$pkgdir/usr/share/doc/nexuiz" -type d -exec chmod 755 {} +
+    find "$pkgdir/usr/share/doc/nexuiz" -type f -exec chmod 644 {} +
+
+    # Game Data
+    install -dm755 "$pkgdir/usr/share/nexuiz"
+    mv Nexuiz/{data,havoc,server} "$pkgdir/usr/share/nexuiz/"
+    find "$pkgdir/usr/share/nexuiz/" -type d -exec chmod 755 {} +
+    find "$pkgdir/usr/share/nexuiz/" -type f -exec chmod 644 {} +
+
+    cd Nexuiz/Nexuiz.app/Contents/Resources
+    for size in 16 32 128 256 512; do
+        install -Dm644 "Nexuiz_${size}x${size}x32.png" \
+            "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/nexuiz.png"
+    done
+}

Added: nexuiz/trunk/libpng14.patch
===================================================================
--- nexuiz/trunk/libpng14.patch	                        (rev 0)
+++ nexuiz/trunk/libpng14.patch	2018-12-05 00:53:35 UTC (rev 411237)
@@ -0,0 +1,39 @@
+diff -Nur darkplaces.old/image_png.c darkplaces/image_png.c
+--- darkplaces.old/image_png.c	2009-09-15 06:08:02.000000000 +0300
++++ darkplaces/image_png.c	2010-01-28 01:23:24.000000000 +0200
+@@ -36,7 +36,7 @@
+ static void*			(*qpng_create_info_struct)	(void*);
+ static void				(*qpng_read_info)			(void*, void*);
+ static void				(*qpng_set_expand)			(void*);
+-static void				(*qpng_set_gray_1_2_4_to_8)	(void*);
++static void				(*qpng_set_expand_gray_1_2_4_to_8)	(void*);
+ static void				(*qpng_set_palette_to_rgb)	(void*);
+ static void				(*qpng_set_tRNS_to_alpha)	(void*);
+ static void				(*qpng_set_gray_to_rgb)		(void*);
+@@ -61,7 +61,7 @@
+ 	{"png_create_info_struct",	(void **) &qpng_create_info_struct},
+ 	{"png_read_info",			(void **) &qpng_read_info},
+ 	{"png_set_expand",			(void **) &qpng_set_expand},
+-	{"png_set_gray_1_2_4_to_8",	(void **) &qpng_set_gray_1_2_4_to_8},
++	{"png_set_expand_gray_1_2_4_to_8",	(void **) &qpng_set_expand_gray_1_2_4_to_8},
+ 	{"png_set_palette_to_rgb",	(void **) &qpng_set_palette_to_rgb},
+ 	{"png_set_tRNS_to_alpha",	(void **) &qpng_set_tRNS_to_alpha},
+ 	{"png_set_gray_to_rgb",		(void **) &qpng_set_gray_to_rgb},
+@@ -110,7 +110,7 @@
+ #elif defined(MACOSX)
+ 		"libpng12.0.dylib",
+ #else
+-		"libpng12.so.0",
++		"libpng14.so.0",
+ 		"libpng.so", // FreeBSD
+ #endif
+ 		NULL
+@@ -311,7 +311,7 @@
+ 	{
+ 		qpng_set_gray_to_rgb(png);
+ 		if (my_png.BitDepth < 8)
+-			qpng_set_gray_1_2_4_to_8(png);
++			qpng_set_expand_gray_1_2_4_to_8(png);
+ 	}
+ 
+ 	if (qpng_get_valid(png, pnginfo, PNG_INFO_tRNS))


More information about the arch-commits mailing list