From nobody Wed Mar 16 13:22:44 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 76E6F1A26CC6; Wed, 16 Mar 2022 13:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KJWD51Yfqz4rkX; Wed, 16 Mar 2022 13:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647436965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CkoaVCxjifeJOjLCT/BlZZh9Q9zQC6X5COgR8t2dfdM=; b=AIKliOGbGLxbo0/usliwvL2DGHZLM90JUCywEFFzWI1M2c17IdsqcfPkL3dxkK8Tyo9iYv apRH9r61vnnfO6D1WISrmIphCuBqmmuE8WxvMOsJ6l7fGme5uHmvEy8TWJfUjcdkuvVpgX +Kar8YsI2vrN5RivgZGRCwa78Cjig0WJn4Anv8o5b8fy9stiW1Zm+L/Rdjjkc+sUQXRvhd ZLipx8Y0DHNkSIQsTOZqppXy8bOWlbeiqbaAUycX/TroxmS/51h5NBLy/cu8pMgpgdpmoO C9Ko2SvSQVuoX+w35SYcf2jUGcXdbpPeBv0YcUlchbGTyup3rixiKHOJ9Da/DA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0ABFC17243; Wed, 16 Mar 2022 13:22:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22GDMiq7022112; Wed, 16 Mar 2022 13:22:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22GDMiNE022111; Wed, 16 Mar 2022 13:22:44 GMT (envelope-from git) Date: Wed, 16 Mar 2022 13:22:44 GMT Message-Id: <202203161322.22GDMiNE022111@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dmitry Marakasov Subject: git: 663461e41e05 - main - =?utf-8?Q?games/apricots: update 0.2.6 =E2=86=92 0.2.7?= List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: amdmi3 X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 663461e41e051b9a657486e6689d2c60aa850010 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647436965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CkoaVCxjifeJOjLCT/BlZZh9Q9zQC6X5COgR8t2dfdM=; b=q/3WVUXiXiwnzEo9sLVcTm4MQ9piuNUSixVdX3T4731euWorV2REEVdQOojhE5thPmA9m4 Lwy8N44qRMyWexgpI0VhhSCKpSGKTsipa1pckFNuKkNPYNO7EZP5rEbdct1b8Y8wPVWjiM CzGKRpL1wbw1ocygeMf++jALWtRX4rm9FJhBQFzAPmt9tHswVKe+6htlhj26iC3DBsL0/0 36NJIj/FFgHD6IdC9d09rg+OS3YD5O9SiNYQrlqbdKPgMHN7kfUfZWuv6zSyVPWOV61Dn6 cgU2PELv3OQQbRYC5Q8KEEKhoOMxFNhC8fQWk216lKN4j91Po6lXhyfs5uYsFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647436965; a=rsa-sha256; cv=none; b=hes2ALziils7eJMwDTHlUPCJYFhC3YKRBozcqS68SOPuHvqcur98UlmybVOA+Q4jlzT7UL TbOr8/84WRkxj4FrJ9F3rLm2NIpLHxdVL2hxhPY3vHd0t2cySW6HoVWMujzThKHNeL8jKR q8kSXEzS2xORvrh7ej8kyajxWs5q39S+CjOySpttiyoCjnxNazRr9cFP34I7prVc0EmS3k C6z7tSvyOBsX2NkCU2wRTbSpjvjXWIqr3RHB9B584Nx9bex1CDDhY69U7cvTc0NGyHVlYk r6cPBnM1VRs1o+/1GJ5rEqmMMlSXbybc03RP/30AwpcBgvYE/i9BVNGxgYsR+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=663461e41e051b9a657486e6689d2c60aa850010 commit 663461e41e051b9a657486e6689d2c60aa850010 Author: Dmitry Marakasov AuthorDate: 2022-03-15 21:13:36 +0000 Commit: Dmitry Marakasov CommitDate: 2022-03-16 12:57:31 +0000 games/apricots: update 0.2.6 → 0.2.7 --- games/apricots/Makefile | 64 ++++++++++-------------- games/apricots/distinfo | 5 +- games/apricots/files/apricots.in | 16 ------ games/apricots/files/patch-apricots-init.cpp | 29 ----------- games/apricots/files/patch-apricots-sampleio.cpp | 45 ----------------- games/apricots/files/patch-apricots_all.cpp | 11 ++++ games/apricots/files/patch-apricots_init.cpp | 20 ++++++++ games/apricots/files/patch-configure.ac | 11 ++++ games/apricots/pkg-descr | 2 +- 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 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