diff options
Diffstat (limited to 'games/apricots')
-rw-r--r-- | games/apricots/Makefile | 64 | ||||
-rw-r--r-- | games/apricots/distinfo | 5 | ||||
-rw-r--r-- | games/apricots/files/apricots.in | 16 | ||||
-rw-r--r-- | games/apricots/files/patch-apricots-init.cpp | 29 | ||||
-rw-r--r-- | games/apricots/files/patch-apricots-sampleio.cpp | 45 | ||||
-rw-r--r-- | games/apricots/files/patch-apricots_all.cpp | 11 | ||||
-rw-r--r-- | games/apricots/files/patch-apricots_init.cpp | 20 | ||||
-rw-r--r-- | games/apricots/files/patch-configure.ac | 11 | ||||
-rw-r--r-- | games/apricots/pkg-descr | 2 | ||||
-rw-r--r-- | games/apricots/pkg-plist | 3 |
10 files changed, 75 insertions, 131 deletions
diff --git a/games/apricots/Makefile b/games/apricots/Makefile index c190e7a75ff2..61e5582e6dc1 100644 --- a/games/apricots/Makefile +++ b/games/apricots/Makefile @@ -1,53 +1,41 @@ PORTNAME= apricots -PORTVERSION= 0.2.6 -PORTREVISION= 6 +DISTVERSIONPREFIX= v +DISTVERSION= 0.2.7 CATEGORIES= games -MASTER_SITES= http://www.fishies.org.uk/ \ - http://mirror.amdmi3.ru/distfiles/ MAINTAINER= amdmi3@FreeBSD.org COMMENT= Fly a little plane around and shoot things and drop bombs -USES= dos2unix sdl -USE_SDL= sdl -USE_CXXSTD= c++98 -DOS2UNIX_GLOB= *.cpp -SUB_FILES= ${PORTNAME} +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= autoreconf compiler:c++17-lang gmake openal:al,alut sdl +USE_GITHUB= yes +GH_ACCOUNT= moggers87 +GNU_CONFIGURE= yes +USE_SDL= sdl2 + +LDFLAGS_i386= -Wl,-znotext -PLIST_FILES= bin/${PORTNAME} libexec/${PORTNAME} PORTDATA= * PORTDOCS= * -CPPFLAGS+= -DAP_PATH="\"${DATADIR}/\"" -LDFLAGS_i386= -Wl,-znotext -DESKTOP_ENTRIES="Apricots" \ - "${COMMENT}" \ - "" \ - "${PORTNAME}" \ - "Game;ArcadeGame;" \ - false - -OPTIONS_DEFINE= DOCS OPENAL -OPTIONS_DEFAULT=OPENAL - -OPENAL_USES= compiler:c++11-lang openal:al,alut -OPENAL_CPPFLAGS=-DAP_AUDIO_OPENAL -OPENAL_LDFLAGS= -L${LOCALBASE}/lib -lopenal -lalut - -do-build: - cd ${WRKSRC}/apricots && ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} \ - `${SDL_CONFIG} --cflags --libs` *.cpp -o ${PORTNAME} - -do-install: - ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/apricots/${PORTNAME} ${STAGEDIR}${PREFIX}/libexec - @${MKDIR} ${STAGEDIR}${DATADIR} -.for ext in wav shapes psf cfg - ${INSTALL_DATA} ${WRKSRC}/apricots/*.${ext} ${STAGEDIR}${DATADIR} -.endfor +OPTIONS_DEFINE= DOCS + +post-patch: + @${REINPLACE_CMD} -e 's|$$(pkgdatadir)|$${DESTDIR}&|' \ + ${WRKSRC}/apricots/Makefile.am + +post-install: + ${INSTALL_DATA} ${WRKSRC}/contrib/apricots.desktop \ + ${STAGEDIR}${PREFIX}/share/applications/ + ${INSTALL_DATA} ${WRKSRC}/contrib/desktop-icon.png \ + ${STAGEDIR}${PREFIX}/share/pixmaps/apricots.png do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} +.for f in AUTHORS NEWS README.md + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/ +.endfor .include <bsd.port.mk> diff --git a/games/apricots/distinfo b/games/apricots/distinfo index 6244da0df00a..75d359814103 100644 --- a/games/apricots/distinfo +++ b/games/apricots/distinfo @@ -1,2 +1,3 @@ -SHA256 (apricots-0.2.6.tar.gz) = 9c408722abbb0cb925384f12a65fe4f6e2b3373d5ce5d0e5afe3aeb738b9cd8f -SIZE (apricots-0.2.6.tar.gz) = 768568 +TIMESTAMP = 1647376396 +SHA256 (moggers87-apricots-v0.2.7_GH0.tar.gz) = 82b993f5f0a3ed0f3b0e07a11bc955cd175b3738eb66769c01d0e1faacb5a44c +SIZE (moggers87-apricots-v0.2.7_GH0.tar.gz) = 330430 diff --git a/games/apricots/files/apricots.in b/games/apricots/files/apricots.in deleted file mode 100644 index 839cd66a45d2..000000000000 --- a/games/apricots/files/apricots.in +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if [ -z "$XDG_CONFIG_HOME" ]; then - XDG_CONFIG_HOME=$HOME/.config -fi - -DOTDIR="$XDG_CONFIG_HOME/apricots" - -mkdir -p "$DOTDIR" -cd "$DOTDIR" || exit 1 - -if [ ! -f apricots.cfg ]; then - cp %%DATADIR%%/apricots.cfg . -fi - -exec %%PREFIX%%/libexec/apricots "$@" diff --git a/games/apricots/files/patch-apricots-init.cpp b/games/apricots/files/patch-apricots-init.cpp deleted file mode 100644 index a55634717a59..000000000000 --- a/games/apricots/files/patch-apricots-init.cpp +++ /dev/null @@ -1,29 +0,0 @@ ---- apricots/init.cpp.orig 2015-08-19 14:00:09 UTC -+++ apricots/init.cpp -@@ -218,7 +218,7 @@ void init_gameconstants(gamedata &g){ - string getConfig(string config, string name, string defval) - { - // Pull out just the name line -- unsigned int ndx = config.find(name); -+ size_t ndx = config.find(name); - - if (ndx == string::npos) - { -@@ -241,7 +241,7 @@ string getConfig(string config, string n - int getConfig(string config, string name, int defval, int min, int max) - { - // Pull out just the name line -- unsigned int ndx = config.find(name); -+ size_t ndx = config.find(name); - - if (ndx == string::npos) - { -@@ -275,7 +275,7 @@ int getConfig(string config, string name - void init_gamedata(gamedata &g){ - - //--JAM: Read from config file -- string filename(AP_PATH); -+ string filename; - filename += "apricots.cfg"; - ifstream config_stream(filename.c_str()); - string config; diff --git a/games/apricots/files/patch-apricots-sampleio.cpp b/games/apricots/files/patch-apricots-sampleio.cpp deleted file mode 100644 index 0671c664f0ca..000000000000 --- a/games/apricots/files/patch-apricots-sampleio.cpp +++ /dev/null @@ -1,45 +0,0 @@ ---- apricots/sampleio.cpp.orig 2015-08-19 14:00:09 UTC -+++ apricots/sampleio.cpp -@@ -74,28 +74,21 @@ void sampleio :: init(int nsamples, char - alListenerfv(AL_ORIENTATION, front ); - - // Load in samples -- ALvoid* data = malloc(5 * (512 * 3) * 1024); -+ ALvoid* data; - alGenBuffers(numsamples, samples); - - for (int i = 0; i < numsamples; i++){ -- ALsizei freq; -+ ALfloat freq; - ALboolean fileok; - // Evil OpenAL portability fix done here --#ifdef _WIN32 - ALenum format; -- ALboolean trash; -- alutLoadWAVFile(filenames[i],&format,&data,&filelen,&freq,&trash); -- fileok = (alGetError() == AL_NO_ERROR); --#else -- ALsizei format; -- ALsizei trash; -- fileok = alutLoadWAV(filenames[i],&data,&format,&filelen,&trash,&freq); --#endif -- if (!fileok){ -+ data = alutLoadMemoryFromFile(filenames[i], &format, &filelen, &freq); -+ if (!data){ - cerr << "sampleio: could not open " << filenames[i] << endl; - exit(1); - } - alBufferData(samples[i], format, data, filelen, freq); -+ free(data); - } - - // Generate Sources -@@ -107,8 +100,6 @@ void sampleio :: init(int nsamples, char - alSourcefv(sources[j], AL_ORIENTATION, back ); - } - -- free(data); -- - } - - // Clearup routine diff --git a/games/apricots/files/patch-apricots_all.cpp b/games/apricots/files/patch-apricots_all.cpp new file mode 100644 index 000000000000..78fd8236158e --- /dev/null +++ b/games/apricots/files/patch-apricots_all.cpp @@ -0,0 +1,11 @@ +--- apricots/all.cpp.orig 2021-02-12 23:45:58 UTC ++++ apricots/all.cpp +@@ -18,7 +18,7 @@ int wrap(int n, int min, int max) { return ((((n - min + + // Sign function + +-inline int sign(int n) { return (0 < n) - (n < 0); } ++int sign(int n) { return (0 < n) - (n < 0); } + + // Error message for switch statements that shouldn't ever get to default + diff --git a/games/apricots/files/patch-apricots_init.cpp b/games/apricots/files/patch-apricots_init.cpp new file mode 100644 index 000000000000..8e6e3353ef0f --- /dev/null +++ b/games/apricots/files/patch-apricots_init.cpp @@ -0,0 +1,20 @@ +--- apricots/init.cpp.orig 2021-02-12 23:45:58 UTC ++++ apricots/init.cpp +@@ -219,7 +219,7 @@ void init_gameconstants(gamedata &g) { + + string getConfig(string config, string name, string defval) { + // Pull out just the name line +- unsigned int ndx = config.find(name); ++ size_t ndx = config.find(name); + + if (ndx == string::npos) { + return defval; +@@ -240,7 +240,7 @@ string getConfig(string config, string name, string de + + int getConfig(string config, string name, int defval, int min, int max) { + // Pull out just the name line +- unsigned int ndx = config.find(name); ++ size_t ndx = config.find(name); + + if (ndx == string::npos) { + return defval; diff --git a/games/apricots/files/patch-configure.ac b/games/apricots/files/patch-configure.ac new file mode 100644 index 000000000000..168c49c7a892 --- /dev/null +++ b/games/apricots/files/patch-configure.ac @@ -0,0 +1,11 @@ +--- configure.ac.orig 2021-02-12 23:45:58 UTC ++++ configure.ac +@@ -6,7 +6,7 @@ AC_INIT([apricots], [0.2.7], [moggers87+git@moggers87. + AC_CONFIG_SRCDIR([apricots/game.cpp]) + AC_CONFIG_HEADERS([config.h]) + AC_CONFIG_MACRO_DIR([m4]) +-AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects]) ++AM_INIT_AUTOMAKE([-Wall subdir-objects]) + AX_IS_RELEASE([git-directory]) + AX_CHECK_ENABLE_DEBUG() + AX_GENERATE_CHANGELOG diff --git a/games/apricots/pkg-descr b/games/apricots/pkg-descr index 1b709cd3c273..dc3da39213ce 100644 --- a/games/apricots/pkg-descr +++ b/games/apricots/pkg-descr @@ -17,4 +17,4 @@ Please take a look at apricots.cfg file. You will found some good options there. (currently this is the only way of changing game options) -WWW: http://www.fishies.org.uk/apricots.html +WWW: https://github.com/moggers87/apricots diff --git a/games/apricots/pkg-plist b/games/apricots/pkg-plist new file mode 100644 index 000000000000..4f3b20d4d13d --- /dev/null +++ b/games/apricots/pkg-plist @@ -0,0 +1,3 @@ +bin/apricots +share/applications/apricots.desktop +share/pixmaps/apricots.png |