From 512cec264164ff2c48c4237137f04cf990873256 Mon Sep 17 00:00:00 2001 From: Max Brazhnikov Date: Thu, 16 Nov 2023 16:13:56 +0300 Subject: [PATCH] games/glob2: Update to 0.9.5.0 snapshot - Update to the latest snapshot. 'glob2 --version' reports 0.9.5.0 - Clean up Makefile, drop stale patches, remove useless pkg-message. - Switch to SDL2. - Depend on libportaudio unconditionally. --- games/glob2/Makefile | 76 +++++------------- games/glob2/distinfo | 3 + games/glob2/files/patch-src__ConfigFiles.h | 6 +- games/glob2/pkg-descr | 2 - games/glob2/pkg-plist | 90 +++++++++++++--------- 5 files changed, 78 insertions(+), 99 deletions(-) create mode 100644 games/glob2/distinfo diff --git a/games/glob2/Makefile b/games/glob2/Makefile index 0cd514a64b7ef..8cde8d771067d 100644 --- a/games/glob2/Makefile +++ b/games/glob2/Makefile @@ -1,80 +1,42 @@ -# Created by: thierry@pompo.net -# $FreeBSD$ - PORTNAME= glob2 -PORTVERSION= 0.9.4.4 -PORTREVISION= 29 +PORTVERSION= 0.9.5.0.g20230613 CATEGORIES= games -MASTER_SITES= SAVANNAH/${PORTNAME}/${PORTVERSION:R}/ -MAINTAINER= ports@FreeBSD.org -COMMENT= Globulation 2, free and innovative strategy game +MAINTAINER= makc@FreeBSD.org +COMMENT= Globulation 2, real-time strategy game +WWW= https://globulation2.org/ LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libvorbis.so:audio/libvorbis \ + libportaudio.so:audio/portaudio \ libspeex.so:audio/speex \ libfribidi.so:converters/fribidi \ - libboost_thread.so:devel/boost-libs \ - libfreetype.so:print/freetype2 - -OPTIONS_DEFINE= DOCS PORTAUDIO + libboost_thread.so:devel/boost-libs -USES= compiler:c++11-lang gl gnome pkgconfig scons:python2 sdl -USE_SDL= image net sdl ttf +USES= compiler:c++14-lang gl localbase:ldflags pkgconfig scons sdl +USE_SDL= image2 net2 sdl2 ttf2 USE_GL= gl glu +USE_CXXSTD= c++14 +USE_GITHUB= yes +GH_ACCOUNT= Globulation2 +GH_TAGNAME= 39980149 + MAKE_ARGS= CCFLAGS="${CFLAGS}" \ LINKFLAGS="${LDFLAGS}" \ BINDIR="${STAGEDIR}${PREFIX}/bin" \ INSTALLDIR="${STAGEDIR}${PREFIX}/share" \ - DATADIR="${DATADIR}" -INSTALLS_ICONS= yes - -CFLAGS+= -I${LOCALBASE}/include -Wno-return-type -LDFLAGS+= -lpthread -L${LOCALBASE}/lib + DATADIR="${DATADIR}" \ + --portaudio=true -PORTDOCS= README -SUB_FILES= pkg-message - -.include - -.if ${PORT_OPTIONS:MPORTAUDIO} -LIB_DEPENDS+= libportaudio.so:audio/portaudio -MAKE_ARGS+= --portaudio=true -.else -MAKE_ARGS+= --portaudio=false -.endif - -pre-configure: - ${REINPLACE_CMD} -e \ - 's|"-g"|""|' \ - ${WRKSRC}/SConstruct - ${REINPLACE_CMD} -e \ - '/^Icon/s|=.*|=${PORTNAME}|' \ - ${WRKSRC}/data/${PORTNAME}.desktop - ${REINPLACE_CMD} -e \ - '/(PACKAGE_SOURCE_DIR)/s|^|//|' \ +post-patch: + ${REINPLACE_CMD} '/addDir(PACKAGE_SOURCE_DIR)/d' \ ${WRKSRC}/libgag/src/FileManager.cpp -manual-regression-test: -# Don't enable these tests on pointyhat, they take too long. -.if defined(MAINTAINER_MODE) - (cd ${WRKSRC}/src && ./glob2 -test-games) -.else - (cd ${WRKSRC}/src && ./glob2 -test-games-nox) -.endif - post-install: -.for s in 16 24 32 48 64 128 - ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps - (cd ${WRKSRC}/data/icons && ${INSTALL_DATA} glob2-icon-${s}x${s}.png \ - ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/${PORTNAME}.png) -.endfor - ${RLN} ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \ - ${STAGEDIR}${PREFIX}/share/pixmaps - ${MKDIR} ${STAGEDIR}${DOCSDIR} - (cd ${WRKSRC} && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR}) +# workaround broken install: *.txt are required for game to run + ${INSTALL_DATA} ${WRKSRC}/data/*.txt ${STAGEDIR}${DATADIR}/data/ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/glob2 .include diff --git a/games/glob2/distinfo b/games/glob2/distinfo new file mode 100644 index 0000000000000..d9c85ad881bba --- /dev/null +++ b/games/glob2/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1700085390 +SHA256 (Globulation2-glob2-0.9.5.0.g20230613-39980149_GH0.tar.gz) = 7a638d9f9d8b6a33eb8bfaea345bda18cd3ec1640a99e0c21539b12ac8cee5cd +SIZE (Globulation2-glob2-0.9.5.0.g20230613-39980149_GH0.tar.gz) = 15901135 diff --git a/games/glob2/files/patch-src__ConfigFiles.h b/games/glob2/files/patch-src__ConfigFiles.h index 8f1c30ca2069e..d0e3af2f65deb 100644 --- a/games/glob2/files/patch-src__ConfigFiles.h +++ b/games/glob2/files/patch-src__ConfigFiles.h @@ -1,6 +1,6 @@ ---- ./src/ConfigFiles.h.orig 2009-06-14 12:11:34.000000000 +0200 -+++ ./src/ConfigFiles.h 2013-10-28 01:26:26.000000000 +0100 -@@ -178,7 +178,11 @@ +--- src/ConfigFiles.h.orig 2023-06-13 07:14:47 UTC ++++ src/ConfigFiles.h +@@ -178,7 +178,11 @@ class ConfigVector (public) else { std::cerr << "ConfigVector::get(" << static_cast(id) << ") : warning : id is not valid, returning default" << std::endl; diff --git a/games/glob2/pkg-descr b/games/glob2/pkg-descr index 371eb74a2c245..5af576a3570a2 100644 --- a/games/glob2/pkg-descr +++ b/games/glob2/pkg-descr @@ -8,5 +8,3 @@ It can be played alone, through your Local Area Network [LAN], or through Internet thanks to Ysagoon Online Game [YOG], a meta-server. It also features a scripting language for versatile gameplay or tutorials and an integrated map editor. - -WWW: http://globulation2.org/ diff --git a/games/glob2/pkg-plist b/games/glob2/pkg-plist index f3772c10391da..38cfa8c385e81 100644 --- a/games/glob2/pkg-plist +++ b/games/glob2/pkg-plist @@ -10,30 +10,30 @@ share/applications/glob2.desktop %%DATADIR%%/data/buildings.txt %%DATADIR%%/data/fonts/sans.ttf %%DATADIR%%/data/gfx/IntroMN.png -%%DATADIR%%/data/gfx/area0.png -%%DATADIR%%/data/gfx/area1.png -%%DATADIR%%/data/gfx/area10.png -%%DATADIR%%/data/gfx/area11.png -%%DATADIR%%/data/gfx/area12.png -%%DATADIR%%/data/gfx/area13.png -%%DATADIR%%/data/gfx/area14.png -%%DATADIR%%/data/gfx/area15.png -%%DATADIR%%/data/gfx/area16.png -%%DATADIR%%/data/gfx/area17.png -%%DATADIR%%/data/gfx/area18.png -%%DATADIR%%/data/gfx/area19.png -%%DATADIR%%/data/gfx/area2.png -%%DATADIR%%/data/gfx/area20.png -%%DATADIR%%/data/gfx/area21.png -%%DATADIR%%/data/gfx/area22.png -%%DATADIR%%/data/gfx/area23.png -%%DATADIR%%/data/gfx/area3.png -%%DATADIR%%/data/gfx/area4.png -%%DATADIR%%/data/gfx/area5.png -%%DATADIR%%/data/gfx/area6.png -%%DATADIR%%/data/gfx/area7.png -%%DATADIR%%/data/gfx/area8.png -%%DATADIR%%/data/gfx/area9.png +%%DATADIR%%/data/gfx/area-clearing0.png +%%DATADIR%%/data/gfx/area-clearing1.png +%%DATADIR%%/data/gfx/area-clearing2.png +%%DATADIR%%/data/gfx/area-clearing3.png +%%DATADIR%%/data/gfx/area-clearing4.png +%%DATADIR%%/data/gfx/area-clearing5.png +%%DATADIR%%/data/gfx/area-clearing6.png +%%DATADIR%%/data/gfx/area-clearing7.png +%%DATADIR%%/data/gfx/area-forbidden0.png +%%DATADIR%%/data/gfx/area-forbidden1.png +%%DATADIR%%/data/gfx/area-forbidden2.png +%%DATADIR%%/data/gfx/area-forbidden3.png +%%DATADIR%%/data/gfx/area-forbidden4.png +%%DATADIR%%/data/gfx/area-forbidden5.png +%%DATADIR%%/data/gfx/area-forbidden6.png +%%DATADIR%%/data/gfx/area-forbidden7.png +%%DATADIR%%/data/gfx/area-guard0.png +%%DATADIR%%/data/gfx/area-guard1.png +%%DATADIR%%/data/gfx/area-guard2.png +%%DATADIR%%/data/gfx/area-guard3.png +%%DATADIR%%/data/gfx/area-guard4.png +%%DATADIR%%/data/gfx/area-guard5.png +%%DATADIR%%/data/gfx/area-guard6.png +%%DATADIR%%/data/gfx/area-guard7.png %%DATADIR%%/data/gfx/barracks0b0.png %%DATADIR%%/data/gfx/barracks0b0r.png %%DATADIR%%/data/gfx/barracks1b0.png @@ -332,7 +332,21 @@ share/applications/glob2.desktop %%DATADIR%%/data/gfx/gamegui41.png %%DATADIR%%/data/gfx/gamegui42.png %%DATADIR%%/data/gfx/gamegui43.png +%%DATADIR%%/data/gfx/gamegui44.png +%%DATADIR%%/data/gfx/gamegui45.png +%%DATADIR%%/data/gfx/gamegui46.png +%%DATADIR%%/data/gfx/gamegui47.png +%%DATADIR%%/data/gfx/gamegui48.png +%%DATADIR%%/data/gfx/gamegui49.png %%DATADIR%%/data/gfx/gamegui5.png +%%DATADIR%%/data/gfx/gamegui50.png +%%DATADIR%%/data/gfx/gamegui51.png +%%DATADIR%%/data/gfx/gamegui52.png +%%DATADIR%%/data/gfx/gamegui53.png +%%DATADIR%%/data/gfx/gamegui54.png +%%DATADIR%%/data/gfx/gamegui55.png +%%DATADIR%%/data/gfx/gamegui56.png +%%DATADIR%%/data/gfx/gamegui57.png %%DATADIR%%/data/gfx/gamegui6.png %%DATADIR%%/data/gfx/gamegui7.png %%DATADIR%%/data/gfx/gamegui8.png @@ -1682,8 +1696,11 @@ share/applications/glob2.desktop %%DATADIR%%/data/texts.de.txt %%DATADIR%%/data/texts.dk.txt %%DATADIR%%/data/texts.en.txt +%%DATADIR%%/data/texts.eo.txt %%DATADIR%%/data/texts.es.txt %%DATADIR%%/data/texts.eu.txt +%%DATADIR%%/data/texts.fa.txt +%%DATADIR%%/data/texts.fi.txt %%DATADIR%%/data/texts.fr.txt %%DATADIR%%/data/texts.gr.txt %%DATADIR%%/data/texts.hu.txt @@ -1701,38 +1718,38 @@ share/applications/glob2.desktop %%DATADIR%%/data/texts.sr.txt %%DATADIR%%/data/texts.sv.txt %%DATADIR%%/data/texts.tr.txt +%%DATADIR%%/data/texts.zh-cn.txt %%DATADIR%%/data/texts.zh-tw.txt %%DATADIR%%/data/units.txt %%DATADIR%%/data/unitsSkins.txt -%%DATADIR%%/data/zik/a1.ogg -%%DATADIR%%/data/zik/a2.ogg -%%DATADIR%%/data/zik/a3.ogg %%DATADIR%%/data/zik/intro.ogg %%DATADIR%%/data/zik/menu.ogg +%%DATADIR%%/data/zik/original/a1.ogg +%%DATADIR%%/data/zik/original/a2.ogg +%%DATADIR%%/data/zik/original/a3.ogg %%DATADIR%%/maps/A_big_pond.map +%%DATADIR%%/maps/Archipelago.map %%DATADIR%%/maps/Centerfolds_2.map +%%DATADIR%%/maps/Dejans.map %%DATADIR%%/maps/Easy_Three.map %%DATADIR%%/maps/FourSquares1.map %%DATADIR%%/maps/G2.map %%DATADIR%%/maps/Garden_3.map %%DATADIR%%/maps/Holiday_Island_2.map +%%DATADIR%%/maps/Island_of_the_Renfur.map %%DATADIR%%/maps/Isles.map +%%DATADIR%%/maps/Mazury.map %%DATADIR%%/maps/Migration.map %%DATADIR%%/maps/Muka.map -%%DATADIR%%/maps/One_on_One.map +%%DATADIR%%/maps/Oazis.map %%DATADIR%%/maps/Playground.map -%%DATADIR%%/maps/Scarse_Supply.map +%%DATADIR%%/maps/Sand_River.map %%DATADIR%%/maps/SmallForTwo.map -%%DATADIR%%/maps/Tower_Defense_for_2.map %%DATADIR%%/maps/Triangle.map -%%DATADIR%%/maps/WaterInTheDesert.map %%DATADIR%%/maps/Wild_River.map -%%DATADIR%%/maps/a_new_try.map -%%DATADIR%%/maps/newislands_green_blue.map -%%DATADIR%%/maps/stone_bases.map +%%DATADIR%%/maps/balanced.map +%%DATADIR%%/maps/balanced_for_2.map %%DATADIR%%/maps/strange2.map -%%DATADIR%%/maps/the_sand_square.map -%%DATADIR%%/maps/weakness.map %%DATADIR%%/scripts/tutorial_part1.sgsl %%DATADIR%%/scripts/tutorial_part2.sgsl %%DATADIR%%/scripts/tutorial_part3.sgsl @@ -1743,4 +1760,3 @@ share/icons/hicolor/24x24/apps/glob2.png share/icons/hicolor/32x32/apps/glob2.png share/icons/hicolor/48x48/apps/glob2.png share/icons/hicolor/64x64/apps/glob2.png -share/pixmaps/glob2.png