From c0bbfc142a8e577e5a462d8d681c4b924f68f5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Fri, 30 Oct 2015 00:34:05 +0100 Subject: [PATCH] New package: ufoai-2.5 --- srcpkgs/ufoai-data | 1 + srcpkgs/ufoai-radiant | 1 + srcpkgs/ufoai/patches/musl-execinfo.patch | 11 +++ srcpkgs/ufoai/template | 89 +++++++++++++++++++++++ 4 files changed, 102 insertions(+) create mode 120000 srcpkgs/ufoai-data create mode 120000 srcpkgs/ufoai-radiant create mode 100644 srcpkgs/ufoai/patches/musl-execinfo.patch create mode 100644 srcpkgs/ufoai/template diff --git a/srcpkgs/ufoai-data b/srcpkgs/ufoai-data new file mode 120000 index 0000000000..92362c4dbe --- /dev/null +++ b/srcpkgs/ufoai-data @@ -0,0 +1 @@ +ufoai \ No newline at end of file diff --git a/srcpkgs/ufoai-radiant b/srcpkgs/ufoai-radiant new file mode 120000 index 0000000000..92362c4dbe --- /dev/null +++ b/srcpkgs/ufoai-radiant @@ -0,0 +1 @@ +ufoai \ No newline at end of file diff --git a/srcpkgs/ufoai/patches/musl-execinfo.patch b/srcpkgs/ufoai/patches/musl-execinfo.patch new file mode 100644 index 0000000000..e011495a37 --- /dev/null +++ b/srcpkgs/ufoai/patches/musl-execinfo.patch @@ -0,0 +1,11 @@ +--- src/tools/radiant/radiant/stacktrace.cpp 2014-06-05 06:18:39.000000000 +0200 ++++ src/tools/radiant/radiant/stacktrace.cpp 2015-10-30 10:51:24.956710075 +0100 +@@ -24,7 +24,7 @@ + + #include "environment.h" + +-#ifdef __linux__ ++#ifdef __GLIBC__ + #include + + void write_stack_trace (TextOutputStream& outputStream) diff --git a/srcpkgs/ufoai/template b/srcpkgs/ufoai/template new file mode 100644 index 0000000000..1e3c01c1cf --- /dev/null +++ b/srcpkgs/ufoai/template @@ -0,0 +1,89 @@ +# Template file for 'ufoai' +pkgname=ufoai +version=2.5 +revision=1 +create_wrksrc=yes +build_style=gnu-makefile +hostmakedepends="pkg-config" +makedepends="MesaLib-devel glu-devel libjpeg-turbo-devel + libvorbis-devel libopenal-devel xvidcore-devel libtheora-devel + SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel libcurl-devel + gtkglext-devel gtksourceview2-devel" +depends="ufoai-data>=${version} ca-certificates" +short_desc="UFO Alien Invasion" +maintainer="Jürgen Buchmüller " +license="GPL-2" +homepage="http://ufoai.org/" +distfiles=" + ${SOURCEFORGE_SITE}/${pkgname}/UFO_AI%202.x/${version}/${pkgname}-${version}-source.tar.bz2 + ${SOURCEFORGE_SITE}/${pkgname}/UFO_AI%202.x/${version}/${pkgname}-${version}-data.tar" +checksum=" + 0c7cc3bc9efeb276f71cbe6ee8ff7c76f98d183de79f1a069fa63059cf182a8f + 0d12041cba3aaaba1ce114650c36586d286dcce51c721844c06fdace06e307b8" + +# suppress a lot of warnings +CXXFLAGS="-Wno-cast-align -Wno-cast-qual -Wno-inline" + +post_extract() { + cd ${wrksrc} + mv ufoai-${version}-source/* . +} +do_configure() { + # Further reduce amount of warnings + sed -i build/platforms/linux.mk \ + -e"s;_BSD_SOURCE;_DEFAULT_SOURCE;g" + + # Disable building of maps and models + sed -i Makefile \ + -e "s;include build/maps.mk;#&;" \ + -e "s;include build/models.mk;#&;" + + ./configure --prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share/ufoai \ + --localedir=/usr/share/ufoai/base/i18n \ + --enable-uforadiant \ + --enable-release +} +do_build() { + make ${makejobs} + make ${makejobs} lang + make ${makejobs} uforadiant +} +post_install() { + local f + for f in ufo ufoai ufoai-safe ufoded uforadiant; do + if [ -f debian/$f.desktop ]; then + vinstall debian/$f.desktop 644 usr/share/applications + fi + if [ -f debian/$f.xpm ]; then + vinstall debian/$f.xpm 644 usr/share/pixmaps + fi + if [ -f debian/$f.6 ]; then + vman debian/$f.6 + fi + done + # adjust desktop files + sed -i ${DESTDIR}/usr/share/applications/* -e "s;/usr/games/;;" +} + +ufoai-data_package() { + short_desc+=" - data files" + noarch=yes + pkg_install() { + vmove usr/share/ufoai/base/*.pk3 + vmove usr/share/ufoai/base/i18n + } +} + +ufoai-radiant_package() { + short_desc+=" - map editor" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/bin/uforadiant + vmove usr/share/ufoai/radiant + vmove usr/share/applications/uforadiant.desktop + vmove usr/share/man/man6/uforadiant.6 + vmove usr/share/pixmaps/uforadiant.xpm + } +}