diff --git a/srcpkgs/anura-data b/srcpkgs/anura-data new file mode 120000 index 00000000000..817874290e2 --- /dev/null +++ b/srcpkgs/anura-data @@ -0,0 +1 @@ +anura \ No newline at end of file diff --git a/srcpkgs/anura/patches/makefile-config.patch b/srcpkgs/anura/patches/makefile-config.patch new file mode 100644 index 00000000000..8c8d7f07a36 --- /dev/null +++ b/srcpkgs/anura/patches/makefile-config.patch @@ -0,0 +1,59 @@ +--- Makefile 2015-11-03 09:17:30.000000000 +0100 ++++ Makefile 2015-11-06 14:26:08.884827907 +0100 +@@ -37,6 +37,11 @@ + SANITIZE_ADDRESS= + endif + ++SANITIZE_UNDEFINED?= ++ifneq ($(SANITIZE_UNDEFINED), yes) ++SANITIZE_UNDEFINED= ++endif ++ + ifeq ($(OPTIMIZE),yes) + BASE_CXXFLAGS += -O2 + endif +@@ -56,7 +61,7 @@ + GCC_GTEQ_490 := $(shell expr `$(CXX) -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40900) + BASE_CXXFLAGS += -Wno-literal-suffix -Wno-sign-compare + ifeq "$(GCC_GTEQ_490)" "1" +-BASE_CXXFLAGS += -fdiagnostics-color=auto -fsanitize=undefined ++BASE_CXXFLAGS += -fdiagnostics-color=auto + endif + endif + +@@ -88,6 +93,11 @@ + LDFLAGS += -fsanitize=address + endif + ++# Check for sanitize-undefined option ++ifeq ($(SANITIZE_UNDEFINED), yes) ++BASE_CXXFLAGS += -fsanitize=undefined ++endif ++ + # Compiler include options, used after CXXFLAGS and CPPFLAGS. + INC := -isystem external/include $(shell pkg-config --cflags x11 sdl2 glew SDL2_image SDL2_ttf libpng zlib freetype2 cairo) + +@@ -162,6 +172,23 @@ + $(LIBS) -lboost_regex -lboost_system -lboost_filesystem -lpthread -fthreadsafe-statics + + checkdirs: $(BUILD_DIR) ++ @echo -e \ ++ " OPTIMIZE : $(OPTIMIZE)\n" \ ++ "USE_CCACHE : $(USE_CCACHE)\n" \ ++ "CCACHE : $(CCACHE)\n" \ ++ "SANITIZE_ADDRESS : $(SANITIZE_ADDRESS)\n" \ ++ "SANITIZE_UNDEFINED : $(SANITIZE_UNDEFINED)\n" \ ++ "USE_DB_CLIENT : $(USE_DB_CLIENT)\n" \ ++ "USE_BOX2D : $(USE_BOX2D)\n" \ ++ "USE_LIBVPX : $(USE_LIBVPX)\n" \ ++ "USE_LUA : $(USE_LUA)\n" \ ++ "USE_SDL2 : $(USE_SDL2)\n" \ ++ "CXX : $(CXX)\n" \ ++ "BASE_CXXFLAGS : $(BASE_CXXFLAGS)\n" \ ++ "CXXFLAGS : $(CXXFLAGS)\n" \ ++ "LDFLAGS : $(LDFLAGS)\n" \ ++ "LIBS : $(LIBS)" ++ + + $(BUILD_DIR): + @mkdir -p $@ diff --git a/srcpkgs/anura/patches/musl-stacktrace.patch b/srcpkgs/anura/patches/musl-stacktrace.patch new file mode 100644 index 00000000000..90c7b820324 --- /dev/null +++ b/srcpkgs/anura/patches/musl-stacktrace.patch @@ -0,0 +1,30 @@ +Disable and backtrace(3) if not GNU libc + +--- src/stacktrace.hpp 2015-11-03 09:17:30.000000000 +0100 ++++ src/stacktrace.hpp 2015-11-06 11:03:32.001951469 +0100 +@@ -5,7 +5,9 @@ + + #include + #include ++#if defined(__GLIBC__) + #include ++#endif + #include + + #include "SDL.h" +@@ -13,6 +15,7 @@ + /** Print a demangled stack backtrace of the caller function to FILE* out. */ + static inline void print_stacktrace(unsigned int max_frames = 63) + { ++#if defined(__GLIBC__) + SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "%s\n", "stack trace:"); + + // storage array for stack trace address data +@@ -79,4 +82,7 @@ + + free(funcname); + free(symbollist); ++#else ++ SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "%s\n", "stack trace is not available for your architecture"); ++#endif + } diff --git a/srcpkgs/anura/template b/srcpkgs/anura/template new file mode 100644 index 00000000000..e9720b48e29 --- /dev/null +++ b/srcpkgs/anura/template @@ -0,0 +1,53 @@ +# Template file for 'anura' +pkgname=anura +version=0.0.20151103 +revision=1 +_gitrev=074ec21eab10c3425f6713f286eb39f49686572a +wrksrc=${pkgname}-${_gitrev} +build_style=gnu-makefile +make_build_args="USE_DB_CLIENT=no" +hostmakedepends="pkg-config" +makedepends="boost-devel glew-devel cairo-devel lua52-devel + SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel libvpx-devel" +depends="anura-data" +short_desc="Fully featured game engine for Frogatto & Friends" +maintainer="Jürgen Buchmüller " +license="BSD, MIT" +homepage="https://github.com/anura-engine/anura" +distfiles="https://github.com/anura-engine/anura/archive/074ec21eab10c3425f6713f286eb39f49686572a.tar.gz>${pkgname}-${version}.tar.gz" +checksum=f12a065fb951f0d047dd56510f6202437ef90d70f7914dca348835b4260e9c3e + +case "$XBPS_TARGET_MACHINE" in + aarch64*|*-musl) + # Don't treat warnings as errors + CXXFLAGS="-Wno-error -Wno-sign-compare" + make_build_args+=" SANITIZE_ADDRESS=no" + make_build_args+=" SANITIZE_UNDEFINED=no" + ;; + *) makedepends+=" libsanitizer-devel" + make_build_args+=" SANITIZE_ADDRESS=yes" + make_build_args+=" SANITIZE_UNDEFINED=yes" + ;; +esac + +pre_build() { + # Use the system installed boost header files + rm -fr external/include/boost +} + +do_install() { + vlicense LICENSE + vinstall anura 755 usr/lib/anura +} + +anura-data_package() { + short_desc+=" - data files" + noarch=yes + pkg_install() { + local f + vmkdir usr/share/anura + for f in data images music modules; do + vcopy $f usr/share/anura + done + } +} diff --git a/srcpkgs/four-in-a-row/template b/srcpkgs/four-in-a-row/template index a7dbb529b51..f61d7cbde24 100644 --- a/srcpkgs/four-in-a-row/template +++ b/srcpkgs/four-in-a-row/template @@ -1,6 +1,6 @@ # Template file for 'four-in-a-row' pkgname=four-in-a-row -version=3.18.1 +version=3.18.2 revision=1 build_style=gnu-configure hostmakedepends="glib-devel intltool itstool pkg-config" @@ -10,4 +10,4 @@ maintainer="Jürgen Buchmüller " license="GPL-2" homepage="https://wiki.gnome.org/Apps/Four-in-a-row" distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=40b5642c9d01cfec0d0e94de5e4cbdda63c0be15b7b1b6781923cebd22c19462 +checksum=458fa0ba35a2640248b3b4a2f162ded27bd6056e146c521760e0ef06961b8356 diff --git a/srcpkgs/frogatto/files/frogatto.desktop b/srcpkgs/frogatto/files/frogatto.desktop new file mode 100644 index 00000000000..9c239d17b33 --- /dev/null +++ b/srcpkgs/frogatto/files/frogatto.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Frogatto & Friends +GenericName=Frogatto +Comment=Action adventure game, starring a certain quixotic frog +Exec=frogatto +Terminal=false +MultipleArgs=false +Type=Application +Icon=frogatto +Categories=Game;ArcadeGame; diff --git a/srcpkgs/frogatto/files/frogatto.sh b/srcpkgs/frogatto/files/frogatto.sh new file mode 100644 index 00000000000..913ebfd069e --- /dev/null +++ b/srcpkgs/frogatto/files/frogatto.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# +# Startup script for anura using the frogatto module +# +cd /usr/share/anura +exec /usr/lib/anura/anura --config-path=~/.frogatto $* diff --git a/srcpkgs/frogatto/template b/srcpkgs/frogatto/template new file mode 100644 index 00000000000..cf388a97c3a --- /dev/null +++ b/srcpkgs/frogatto/template @@ -0,0 +1,32 @@ +# Template file for 'frogatto' +pkgname=frogatto +version=1.3.20151106 +revision=1 +_gitrev=dc45d685fa78c362cc6a6f8444f3fe549ada4aed +wrksrc=${pkgname}-${_gitrev} +depends="anura" +short_desc="Action adventure game, starring a certain quixotic frog" +maintainer="Jürgen Buchmüller " +license="Custom" +repository="nonfree" +homepage="http://www.frogatto.com/" +distfiles="https://github.com/frogatto/frogatto/archive/${_gitrev}.tar.gz>${pkgname}-${version}.tar.gz" +checksum=e1695728271c0f8ab6eba43c4571499697278ef822f5535c01f68f8ee7b782e5 +noarch=yes + +do_install() { + local f + vlicense LICENSE + + # Startup script, desktop and icon + vbin ${FILESDIR}/frogatto.sh frogatto + vinstall ${FILESDIR}/frogatto.desktop 644 usr/share/applications + vinstall images/window-icon.png 644 usr/share/pixmaps frogatto.png + + vmkdir usr/share/anura/modules/frogatto + # Remove unused cruft + rm -rf music/Unused sounds/unused images/os/mac + # Shared data + cp -a *.cfg data images locale music sounds \ + ${DESTDIR}/usr/share/anura/modules/frogatto +}