From 10c0c686fa149b228c89ad837c9bb9df4bc5072a Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Sat, 18 Jan 2020 15:18:46 -0600 Subject: [PATCH] New package: opensurge-0.5.1.2 Closes #18381 --- srcpkgs/opensurge-data | 1 + .../opensurge/patches/fix-installdir.patch | 11 ++++++++++ srcpkgs/opensurge/patches/fix_ssize_t.patch | 18 +++++++++++++++ srcpkgs/opensurge/template | 22 +++++++++++++++++++ 4 files changed, 52 insertions(+) create mode 120000 srcpkgs/opensurge-data create mode 100644 srcpkgs/opensurge/patches/fix-installdir.patch create mode 100644 srcpkgs/opensurge/patches/fix_ssize_t.patch create mode 100644 srcpkgs/opensurge/template diff --git a/srcpkgs/opensurge-data b/srcpkgs/opensurge-data new file mode 120000 index 0000000000..6ba599f1d3 --- /dev/null +++ b/srcpkgs/opensurge-data @@ -0,0 +1 @@ +opensurge \ No newline at end of file diff --git a/srcpkgs/opensurge/patches/fix-installdir.patch b/srcpkgs/opensurge/patches/fix-installdir.patch new file mode 100644 index 0000000000..e1bdf99d0a --- /dev/null +++ b/srcpkgs/opensurge/patches/fix-installdir.patch @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig ++++ CMakeLists.txt +@@ -651,7 +651,7 @@ + # Installing on *nix + IF(UNIX) + INSTALL(CODE "MESSAGE(\"Installing ${GAME_NAME} ${GAME_VERSION}... Make sure that you have the appropriate privileges.\")") +- INSTALL(TARGETS "${GAME_UNIXNAME}" RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}") ++ INSTALL(TARGETS "${GAME_UNIXNAME}" RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") + INSTALL(FILES LICENSE README.md CHANGES.md logo.png surge.png surge.rocks DESTINATION "${GAME_DATADIR}") + INSTALL(DIRECTORY characters scripts sprites config images levels musics quests samples scripts themes languages fonts licenses DESTINATION "${GAME_DATADIR}" PATTERN ".git" EXCLUDE) + IF(DESKTOP_INSTALL) diff --git a/srcpkgs/opensurge/patches/fix_ssize_t.patch b/srcpkgs/opensurge/patches/fix_ssize_t.patch new file mode 100644 index 0000000000..b586a48ef4 --- /dev/null +++ b/srcpkgs/opensurge/patches/fix_ssize_t.patch @@ -0,0 +1,18 @@ +--- src/core/zip/zip.h.orig ++++ src/core/zip/zip.h +@@ -19,15 +19,6 @@ + extern "C" { + #endif + +-#if !defined(_SSIZE_T_DEFINED) && !defined(_SSIZE_T_DEFINED_) && \ +- !defined(_SSIZE_T) && !defined(_SSIZE_T_) && \ +- !defined(__ssize_t_defined) && !defined(ssize_t) && \ +- !defined(_SSIZE_T_DECLARED) && !defined(HAVE_SSIZE_T) +-#define _SSIZE_T +-#define __ssize_t_defined +-typedef long ssize_t; /* byte count or error */ +-#endif +- + #ifndef MAX_PATH + #define MAX_PATH 32767 /* # chars in a path name including NULL */ + #endif diff --git a/srcpkgs/opensurge/template b/srcpkgs/opensurge/template new file mode 100644 index 0000000000..4a5ede9041 --- /dev/null +++ b/srcpkgs/opensurge/template @@ -0,0 +1,22 @@ +# Template file for 'opensurge' +pkgname=opensurge +version=0.5.1.2 +revision=1 +build_style=cmake +hostmakedepends="pkg-config" +makedepends="allegro5-devel surgescript-devel" +depends="opensurge-data>=0" +short_desc="Retro platformer inspired by Sonic" +maintainer="Andrew Benson " +license="GPL-3.0-or-later" +homepage="https://opensurge2d.org/" +distfiles="https://github.com/alemart/opensurge/archive/v${version}.tar.gz" +checksum=d060e3215231741ce0b4e5b897af52f8755c57660c8a33856bf921c83af18ba2 + +opensurge-data_package() { + short_desc+=" - game data" + archs=noarch + pkg_install() { + vmove usr/share/games + } +}