pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

openhexagon: include 'Assets' module from github



Module Name:	pkgsrc-wip
Committed By:	Iain Hibbert <plunky%netbsd.org@localhost>
Pushed By:	plunky
Date:		Mon May 4 12:46:23 2020 +0100
Changeset:	f47490afac1df56c7958dd3c273f847b8482d581

Modified Files:
	openhexagon/Makefile
	openhexagon/PLIST
	openhexagon/TODO
	openhexagon/distinfo
	openhexagon/files/openhexagon.sh

Log Message:
openhexagon: include 'Assets' module from github

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f47490afac1df56c7958dd3c273f847b8482d581

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 openhexagon/Makefile             | 35 ++++++++++++++++++++++++++---------
 openhexagon/PLIST                | 22 ++++++++++++++++++++++
 openhexagon/TODO                 | 10 +++++-----
 openhexagon/distinfo             | 12 ++++++++----
 openhexagon/files/openhexagon.sh |  2 +-
 5 files changed, 62 insertions(+), 19 deletions(-)

diffs:
diff --git a/openhexagon/Makefile b/openhexagon/Makefile
index 99edd37d9d..145db6ab02 100644
--- a/openhexagon/Makefile
+++ b/openhexagon/Makefile
@@ -3,41 +3,58 @@
 
 DISTNAME=	openhexagon-2.0
 CATEGORIES=	games
-MASTER_SITES=	${MASTER_SITE_GITHUB:=SuperV1234/}
-GITHUB_PROJECT=	SSVOpenHexagon
-GITHUB_TAG=	2.0-preview
+EXTRACT_SUFX=	.tar.gz
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	https://vittorioromeo.info/projects.html
 COMMENT=	Open-source clone of the game "Super Hexagon by Terry Cavanagh"
 LICENSE=	afl-3.0
 
+GITHUB_MODULES= \
+	SSVOpenHexagon		2.0-preview \
+	SSVOpenHexagonAssets	1d125de695be2e74c9f2ad3198e8b5b29911d010
+
+# EXTRACT_SUFX must be defined here otherwise we cannot
+# set the SITES.* variables correctly
+
+.for mod tag in ${GITHUB_MODULES}
+DISTFILES+=	${mod}-${tag}${EXTRACT_SUFX}
+SITES.${mod}-${tag}${EXTRACT_SUFX}+= \
+	-http://github.com/SuperV1234/${mod}/archive/${tag}${EXTRACT_SUFX}
+MODULES+=	${mod}-${tag}
+.endfor
+
 USE_LANGUAGES=	c c++14
 USE_CMAKE=	yes
+USE_TOOLS+=	pax sed
 
 SUBST_CLASSES+=		wrap
 SUBST_STAGE.wrap=	pre-configure
 SUBST_MESSAGE.wrap=	Adjusting wrapper
 SUBST_FILES.wrap=	${PKGBASE}
-SUBST_VARS.wrap=	PREFIX PKGBASE GITHUB_PROJECT
+SUBST_VARS.wrap=	PREFIX PKGBASE
 
 CMAKE_ARGS+=	-DLUA_LIBRARY=${PREFIX}/lib/liblua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.so
 CMAKE_ARGS+=	-DLUA_INCLUDE_DIR=${PREFIX}/${LUA_INCDIR}
 CMAKE_ARGS+=	-DMODULE_PATH=${PREFIX}/lib/cmake
 CMAKE_ARGS+=	-DPKGBASE=${PKGBASE}
 
+WRKSRC=	${WRKDIR}/${MODULES:MSSVOpenHexagon-*}
+
 INSTALLATION_DIRS+=	games lib/${PKGBASE}
 
 post-extract:
 	${CP} ${FILESDIR}/${PKGBASE}.sh ${WRKSRC}/${PKGBASE}
 
+post-build:
+	for p in ${WRKDIR}/${MODULES:MSSVOpenHexagonAssets-*}/_RELEASE/Packs/*; do \
+	    echo "{ \"name\":\"$${p##*/}\", \"priority\":0 }" >$${p}/pack.json; \
+	done
+
 post-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/${PKGBASE} ${DESTDIR}${PREFIX}/games
-
-# Dependencies
-#
-# perhaps also some assets, see wget-assets.sh
-# seems to be a couple of packs with large music files are they important?
+	cd ${WRKDIR}/${MODULES:MSSVOpenHexagonAssets-*}/_RELEASE && \
+	    ${PAX} -rwpm Assets Packs ${DESTDIR}${PREFIX}/lib/${PKGBASE}
 
 .include "../../wip/sfml+/buildlink3.mk"
 .include "../../wip/SSVJsonCpp/buildlink3.mk"
diff --git a/openhexagon/PLIST b/openhexagon/PLIST
index c9462c5350..ecbb0f4502 100644
--- a/openhexagon/PLIST
+++ b/openhexagon/PLIST
@@ -137,6 +137,28 @@ lib/openhexagon/Packs/VeeNext/Styles/acceleradiant.json
 lib/openhexagon/Packs/VeeNext/Styles/incongruence.json
 lib/openhexagon/Packs/VeeNext/Styles/polyhedrug.json
 lib/openhexagon/Packs/VeeNext/pack.json
+lib/openhexagon/Packs/cube/Music/callMeKatla.ogg
+lib/openhexagon/Packs/cube/Music/captainCool.ogg
+lib/openhexagon/Packs/cube/Music/commandoSteve.ogg
+lib/openhexagon/Packs/cube/Music/drFinkelfracken.ogg
+lib/openhexagon/Packs/cube/Music/jackRussel.ogg
+lib/openhexagon/Packs/cube/Music/mazeOfMayonnaise.ogg
+lib/openhexagon/Packs/cube/Music/milkyWays.ogg
+lib/openhexagon/Packs/cube/Music/starshipShowdown.ogg
+lib/openhexagon/Packs/cube/Music/steampunkWarlord.ogg
+lib/openhexagon/Packs/cube/Sounds/test.ogg
+lib/openhexagon/Packs/cube/pack.json
+lib/openhexagon/Packs/hypercube/Music/cpumood.ogg
+lib/openhexagon/Packs/hypercube/Music/dischipo.ogg
+lib/openhexagon/Packs/hypercube/Music/flirtFlirt.ogg
+lib/openhexagon/Packs/hypercube/Music/gmoomh.ogg
+lib/openhexagon/Packs/hypercube/Music/johnnyDerp.ogg
+lib/openhexagon/Packs/hypercube/Music/massacrev2.ogg
+lib/openhexagon/Packs/hypercube/Music/minimal.ogg
+lib/openhexagon/Packs/hypercube/Music/mrGawne.ogg
+lib/openhexagon/Packs/hypercube/Music/pep.ogg
+lib/openhexagon/Packs/hypercube/Music/tengil.ogg
+lib/openhexagon/Packs/hypercube/pack.json
 lib/openhexagon/SSVOpenHexagon
 lib/openhexagon/_DOCUMENTATION/README.html
 lib/openhexagon/_DOCUMENTATION/README_CONFIGOVERRIDES.html
diff --git a/openhexagon/TODO b/openhexagon/TODO
index 7754e8404c..910ca745b4 100644
--- a/openhexagon/TODO
+++ b/openhexagon/TODO
@@ -12,11 +12,6 @@ This seems to be working if slow on my computer
   submodules need to be built before we run cmake here so
   have packaged them separately
 
-- there are some 'Assets' which a script can fetch using
-  wget, it seems to be some music files for packs don't
-  know if important or if possible to download in pkgsrc
-  framework
-
 - I have written a wrapper script which sets up a
   $HOME/.openhexagon dir with symlinks to the assets etc
   it kind of works but could be better, particularly
@@ -24,6 +19,11 @@ This seems to be working if slow on my computer
   it is only the Profiles/ folder which needs to be written
   in which case that could be ~/.openhexagon
 
+- I added the Assets which the wget-assets.sh fetches, but
+  openhexagon crashes because the assets don't contain a
+  pack.json file. However, openhexagon-2.0-preview is older
+  than the SSVOpenHexagonAssets on github
+
 - the game itself bombs out sometimes complaining that it
   is too slow. is this simply to do with lack of GL ?
 
diff --git a/openhexagon/distinfo b/openhexagon/distinfo
index 76c72e0c3f..dd8a0eec23 100644
--- a/openhexagon/distinfo
+++ b/openhexagon/distinfo
@@ -1,7 +1,11 @@
 $NetBSD$
 
-SHA1 (openhexagon-2.0.tar.gz) = 6bb86de3a194e816957d8cdd55fc423259c2c000
-RMD160 (openhexagon-2.0.tar.gz) = 7feefde13a795d687dbe09b96062e149851f5d5c
-SHA512 (openhexagon-2.0.tar.gz) = 0836b6b477227ee768ce43f411b065b1b25fff6ba16401d5ebde1443cde3f03e36d9bb1d11043e958a3f4a38e9af2f0b801aecd39b4edb31007c45c9ce074fdb
-Size (openhexagon-2.0.tar.gz) = 317548 bytes
+SHA1 (SSVOpenHexagon-2.0-preview.tar.gz) = 6bb86de3a194e816957d8cdd55fc423259c2c000
+RMD160 (SSVOpenHexagon-2.0-preview.tar.gz) = 7feefde13a795d687dbe09b96062e149851f5d5c
+SHA512 (SSVOpenHexagon-2.0-preview.tar.gz) = 0836b6b477227ee768ce43f411b065b1b25fff6ba16401d5ebde1443cde3f03e36d9bb1d11043e958a3f4a38e9af2f0b801aecd39b4edb31007c45c9ce074fdb
+Size (SSVOpenHexagon-2.0-preview.tar.gz) = 317548 bytes
+SHA1 (SSVOpenHexagonAssets-1d125de695be2e74c9f2ad3198e8b5b29911d010.tar.gz) = 10e28692d4c97218587b9c381fb811128964d6ae
+RMD160 (SSVOpenHexagonAssets-1d125de695be2e74c9f2ad3198e8b5b29911d010.tar.gz) = c4d0a272df325b2475a59fa12eeb3d1ab0828fd9
+SHA512 (SSVOpenHexagonAssets-1d125de695be2e74c9f2ad3198e8b5b29911d010.tar.gz) = 616491b2378031f0b1ca124ecfb54448ad19a13979927ac58a588b6aa7af1ac4059194cfc2ee78739352938b843f09df8564e6dcd82201e8ccadae3cd7523d2e
+Size (SSVOpenHexagonAssets-1d125de695be2e74c9f2ad3198e8b5b29911d010.tar.gz) = 43488512 bytes
 SHA1 (patch-CMakeLists.txt) = be352f48dd9285853e2cacf89e81df9baed6fca9
diff --git a/openhexagon/files/openhexagon.sh b/openhexagon/files/openhexagon.sh
index 55d62874b9..c5b6108b88 100644
--- a/openhexagon/files/openhexagon.sh
+++ b/openhexagon/files/openhexagon.sh
@@ -31,4 +31,4 @@ do
 	fi
 done
 
-exec @PREFIX@/lib/@PKGBASE@/@GITHUB_PROJECT@
+exec @PREFIX@/lib/@PKGBASE@/SSVOpenHexagon


Home | Main Index | Thread Index | Old Index