pkgsrc-WIP-changes archive

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

0ad, 0ad-data: fix build, works. some hacks in place.



Module Name:	pkgsrc-wip
Committed By:	nikita <nikita%NetBSD.org@localhost>
Pushed By:	nikita
Date:		Thu May 4 16:09:31 2023 +0200
Changeset:	52b6992eea32aea5ca008e0dd6ab96b8e3a39372

Modified Files:
	0ad-data/Makefile
	0ad-data/PLIST
	0ad/DESCR
	0ad/Makefile
	0ad/PLIST
	0ad/options.mk

Log Message:
0ad, 0ad-data: fix build, works. some hacks in place.

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

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

diffstat:
 0ad-data/Makefile |   2 +-
 0ad-data/PLIST    | 110 +++++++++++++++++++++++++++---------------------------
 0ad/DESCR         |  64 +++++++++++++++++++++++++++----
 0ad/Makefile      |  33 +++++++++++-----
 0ad/PLIST         |   3 ++
 0ad/options.mk    |   6 +++
 6 files changed, 145 insertions(+), 73 deletions(-)

diffs:
diff --git a/0ad-data/Makefile b/0ad-data/Makefile
index dea548ff3d..f1c7fbbaff 100644
--- a/0ad-data/Makefile
+++ b/0ad-data/Makefile
@@ -21,6 +21,6 @@ INSTALLATION_DIRS+=	${DATADIR_0AD}
 NO_BUILD=	yes
 
 do-install:
-	${RUN} cd ${WRKSRC} && ${PAX} -rw . ${DESTDIR}${DATADIR_0AD}
+	${RUN} cd ${WRKSRC}/binaries/data && ${PAX} -rw . ${DESTDIR}${DATADIR_0AD}
 
 .include "../../mk/bsd.pkg.mk"
diff --git a/0ad-data/PLIST b/0ad-data/PLIST
index af81d9af1c..fe0fb47915 100644
--- a/0ad-data/PLIST
+++ b/0ad-data/PLIST
@@ -1,56 +1,56 @@
 @comment $NetBSD$
-share/0ad/binaries/data/config/default.cfg
-share/0ad/binaries/data/config/keys.txt
-share/0ad/binaries/data/mods/mod/mod.zip
-share/0ad/binaries/data/mods/public/mod.json
-share/0ad/binaries/data/mods/public/public.zip
-share/0ad/binaries/data/tools/atlas/buttons/next_s.bmp
-share/0ad/binaries/data/tools/atlas/buttons/pause_s.bmp
-share/0ad/binaries/data/tools/atlas/buttons/play_s.bmp
-share/0ad/binaries/data/tools/atlas/buttons/previous_s.bmp
-share/0ad/binaries/data/tools/atlas/buttons/record_s.bmp
-share/0ad/binaries/data/tools/atlas/buttons/stop_s.bmp
-share/0ad/binaries/data/tools/atlas/help.json
-share/0ad/binaries/data/tools/atlas/icons/ScenarioEditor.ico
-share/0ad/binaries/data/tools/atlas/lists.xml
-share/0ad/binaries/data/tools/atlas/toolbar/alterelevation.png
-share/0ad/binaries/data/tools/atlas/toolbar/alterelevation_s.png
-share/0ad/binaries/data/tools/atlas/toolbar/cinematic.png
-share/0ad/binaries/data/tools/atlas/toolbar/default.png
-share/0ad/binaries/data/tools/atlas/toolbar/default_s.png
-share/0ad/binaries/data/tools/atlas/toolbar/environment.png
-share/0ad/binaries/data/tools/atlas/toolbar/flattenelevation.png
-share/0ad/binaries/data/tools/atlas/toolbar/flattenelevation_s.png
-share/0ad/binaries/data/tools/atlas/toolbar/map.png
-share/0ad/binaries/data/tools/atlas/toolbar/mapsettings.png
-share/0ad/binaries/data/tools/atlas/toolbar/moveobject.png
-share/0ad/binaries/data/tools/atlas/toolbar/moveobject_s.png
-share/0ad/binaries/data/tools/atlas/toolbar/movepath.png
-share/0ad/binaries/data/tools/atlas/toolbar/object.png
-share/0ad/binaries/data/tools/atlas/toolbar/objects.png
-share/0ad/binaries/data/tools/atlas/toolbar/paintterrain.png
-share/0ad/binaries/data/tools/atlas/toolbar/paintterrain_s.png
-share/0ad/binaries/data/tools/atlas/toolbar/player.png
-share/0ad/binaries/data/tools/atlas/toolbar/redo.png
-share/0ad/binaries/data/tools/atlas/toolbar/smoothelevation.png
-share/0ad/binaries/data/tools/atlas/toolbar/terrain.png
-share/0ad/binaries/data/tools/atlas/toolbar/trigger.png
-share/0ad/binaries/data/tools/atlas/toolbar/undo.png
-share/0ad/binaries/data/tools/fontbuilder/fonts/DejaVu-LICENSE.txt
-share/0ad/binaries/data/tools/fontbuilder/fonts/DejaVuSansMono.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/FreeFont-LICENSE.txt
-share/0ad/binaries/data/tools/fontbuilder/fonts/FreeMono.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/FreeSans.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/FreeSansBold.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/FreeSansOblique.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/FreeSerif.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/FreeSerifBold.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/GUST-FONT-LICENSE.txt
-share/0ad/binaries/data/tools/fontbuilder/fonts/LICENSE.txt
-share/0ad/binaries/data/tools/fontbuilder/fonts/LibBiolinum-LICENSE.txt
-share/0ad/binaries/data/tools/fontbuilder/fonts/LinBiolinum_Kah.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/LinBiolinum_RBah.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/LinBiolinum_RIah.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/LinBiolinum_Rah.ttf
-share/0ad/binaries/data/tools/fontbuilder/fonts/texgyrepagella-bold.otf
-share/0ad/binaries/data/tools/fontbuilder/fonts/texgyrepagella-regular.otf
+share/0ad/config/default.cfg
+share/0ad/config/keys.txt
+share/0ad/mods/mod/mod.zip
+share/0ad/mods/public/mod.json
+share/0ad/mods/public/public.zip
+share/0ad/tools/atlas/buttons/next_s.bmp
+share/0ad/tools/atlas/buttons/pause_s.bmp
+share/0ad/tools/atlas/buttons/play_s.bmp
+share/0ad/tools/atlas/buttons/previous_s.bmp
+share/0ad/tools/atlas/buttons/record_s.bmp
+share/0ad/tools/atlas/buttons/stop_s.bmp
+share/0ad/tools/atlas/help.json
+share/0ad/tools/atlas/icons/ScenarioEditor.ico
+share/0ad/tools/atlas/lists.xml
+share/0ad/tools/atlas/toolbar/alterelevation.png
+share/0ad/tools/atlas/toolbar/alterelevation_s.png
+share/0ad/tools/atlas/toolbar/cinematic.png
+share/0ad/tools/atlas/toolbar/default.png
+share/0ad/tools/atlas/toolbar/default_s.png
+share/0ad/tools/atlas/toolbar/environment.png
+share/0ad/tools/atlas/toolbar/flattenelevation.png
+share/0ad/tools/atlas/toolbar/flattenelevation_s.png
+share/0ad/tools/atlas/toolbar/map.png
+share/0ad/tools/atlas/toolbar/mapsettings.png
+share/0ad/tools/atlas/toolbar/moveobject.png
+share/0ad/tools/atlas/toolbar/moveobject_s.png
+share/0ad/tools/atlas/toolbar/movepath.png
+share/0ad/tools/atlas/toolbar/object.png
+share/0ad/tools/atlas/toolbar/objects.png
+share/0ad/tools/atlas/toolbar/paintterrain.png
+share/0ad/tools/atlas/toolbar/paintterrain_s.png
+share/0ad/tools/atlas/toolbar/player.png
+share/0ad/tools/atlas/toolbar/redo.png
+share/0ad/tools/atlas/toolbar/smoothelevation.png
+share/0ad/tools/atlas/toolbar/terrain.png
+share/0ad/tools/atlas/toolbar/trigger.png
+share/0ad/tools/atlas/toolbar/undo.png
+share/0ad/tools/fontbuilder/fonts/DejaVu-LICENSE.txt
+share/0ad/tools/fontbuilder/fonts/DejaVuSansMono.ttf
+share/0ad/tools/fontbuilder/fonts/FreeFont-LICENSE.txt
+share/0ad/tools/fontbuilder/fonts/FreeMono.ttf
+share/0ad/tools/fontbuilder/fonts/FreeSans.ttf
+share/0ad/tools/fontbuilder/fonts/FreeSansBold.ttf
+share/0ad/tools/fontbuilder/fonts/FreeSansOblique.ttf
+share/0ad/tools/fontbuilder/fonts/FreeSerif.ttf
+share/0ad/tools/fontbuilder/fonts/FreeSerifBold.ttf
+share/0ad/tools/fontbuilder/fonts/GUST-FONT-LICENSE.txt
+share/0ad/tools/fontbuilder/fonts/LICENSE.txt
+share/0ad/tools/fontbuilder/fonts/LibBiolinum-LICENSE.txt
+share/0ad/tools/fontbuilder/fonts/LinBiolinum_Kah.ttf
+share/0ad/tools/fontbuilder/fonts/LinBiolinum_RBah.ttf
+share/0ad/tools/fontbuilder/fonts/LinBiolinum_RIah.ttf
+share/0ad/tools/fontbuilder/fonts/LinBiolinum_Rah.ttf
+share/0ad/tools/fontbuilder/fonts/texgyrepagella-bold.otf
+share/0ad/tools/fontbuilder/fonts/texgyrepagella-regular.otf
diff --git a/0ad/DESCR b/0ad/DESCR
index e581dd0fae..98cc06750c 100644
--- a/0ad/DESCR
+++ b/0ad/DESCR
@@ -1,7 +1,57 @@
-0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
-real-time strategy (RTS) game of ancient warfare. In short, it is a
-historically-based war/economy game that allows players to relive or rewrite
-the history of Western civilizations, focusing on the years between 500 B.C.
-and 500 A.D. The project is highly ambitious, involving state-of-the-art 3D
-graphics, detailed artwork, sound, and a flexible and powerful custom-built
-game engine.
+0 A.D. (pronounced "zero-ey-dee") is a free, open-source, historical
+Real Time Strategy (RTS) game currently under development by
+Wildfire Games, a global group of volunteer game developers. As the
+leader of an ancient civilization, you must gather the resources you need
+to raise a military force and dominate your enemies.
+
+History is Yours for the Taking
+
+"0 A.D." is a time period that never actually existed: In the usual
+calendar, one goes from 1 B.C. to 1 A.D. and skips zero. This reflects
+the historical fiction in the game: Who would have won if all the
+factions were pitted against each other when each of them was at its
+prime?
+
+We intend to portray some of the major civilizations over the millennium
+of 500 B.C. to 500 A.D. (Hence the midpoint, zero.) That is an ambitious
+prospect, so in the first edition of 0 A.D. we focus on the last five
+centuries B.C. Perhaps in future expansion packs, more civilizations will
+be added, along with additional gameplay features.
+We put a strong emphasis on historical accuracy while developing 0 A.D.
+We plan all our units and all our buildings based on reconstructions of
+how the units and the buildings might have looked like in the ancient
+world. We even name them in the original languages, such as Greek and
+Latin. But it's worth remembering that any game should be fun to play,
+so, in many cases, we preferred playability over historical accuracy.
+
+0 A.D. is Free of Charge
+
+0 A.D. is completely downloadable at no cost and always will be. No
+"freemium" model, no in-game advertising, no catch. This is our iron-clad
+guarantee.
+Although you might find some people selling copies of 0 A.D. on physical
+media, remember, you will always have the option to download 0 A.D.
+gratis on the internet, directly from the developers.
+
+0 A.D. is Free as in "Freedom"
+
+0 A.D. is freely licensed software, because we believe everyone should
+have access to great games, and that everyone can learn from developing
+them. You can redistribute and modify the game as long as you abide by
+the GPL. And you can even use parts of the art and sound for your own
+projects as long as you abide by CC BY-SA.
+
+0 A.D. is Still Under Development
+
+Work on 0 A.D. began in 2001, first as a mod concept for
+Age of Empires II: The Age of Kings. In 2003 development moved to a
+standalone game with its own engine, Pyrogenesis. In 2009-2010, the game
+was released as free, open-source software and and much of the codebase
+was rewritten.
+Currently, 0 A.D. is still in alpha phase, which means an early
+experimental phase. It is playable, and you can already download and test
+the game, but some features are still missing. When will 0 A.D. be
+released? It is very hard to predict. Even after we are done implementing
+all the features, we will want to conduct extensive beta testing, which
+can take a while. Information about release dates will be released at the
+appropriate time.
diff --git a/0ad/Makefile b/0ad/Makefile
index c6aee0ff2a..c303896334 100644
--- a/0ad/Makefile
+++ b/0ad/Makefile
@@ -14,15 +14,14 @@ WRKSRC=		${WRKDIR}/${DISTNAME:S/-unix-build//}
 GCC_REQD+=	7
 USE_LANGUAGES=	c c++
 
-USE_TOOLS+=	gmake perl bash pkg-config pax tar cmake
+USE_TOOLS+=	cmake bash gmake pax perl pkg-config
 
 PYTHON_VERSIONS_INCOMPATIBLE=	27
 
-# TODO: maybe move into extra distfile instead of separate package?
 DEPENDS+=		0ad-data-${PKGVERSION}:../../wip/0ad-data
 BUILD_DEPENDS+=		premake5-[0-9]*:../../devel/premake5
-BUILD_DEPENDS+=		zip-[0-9]*:../../archivers/zip
 TOOL_DEPENDS+=		python${PYTHON_VERSION_DEFAULT}-[0-9]*:../../lang/python${PYTHON_VERSION_DEFAULT}
+TOOL_DEPENDS+=		patchelf-[0-9]*:../../devel/patchelf
 
 SUBST_CLASSES+=			sysincludedir
 SUBST_MESSAGE.sysincludedir=	Fixing "/usr/local" path assumption
@@ -55,9 +54,14 @@ INSTALLATION_DIRS+=	lib/${PKGBASE}
 INSTALLATION_DIRS+=	${DATADIR}
 INSTALLATION_DIRS+=	${DATADIR}/mods/public
 INSTALLATION_DIRS+=	${DATADIR}/mods/mod
+INSTALLATION_DIRS+=	${DATADIR}/config
 INSTALLATION_DIRS+=	share/applications
 INSTALLATION_DIRS+=	share/pixmaps
 
+.if ${MACHINE_ARCH} == "i386"
+CFLAGS+=	-msse
+.endif
+
 .include "options.mk"
 
 # TODO: needs "wx"
@@ -88,7 +92,15 @@ do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/build/resources/0ad.sh ${DESTDIR}${PREFIX}/bin/0ad
 .if !empty(PKG_OPTIONS:Meditor)
 	${INSTALL_PROGRAM} ${WRKSRC}/binaries/system/ActorEditor ${DESTDIR}${PREFIX}/bin
-	cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} libAtlasUI.a ${DESTDIR}${PREFIX}/lib/${PKGBASE}
+	# why? you have the rpath. don't produce nonsense?
+	${PREFIX}/bin/patchelf --force-rpath --set-rpath \
+		${PREFIX}/lib/${PKGBASE}:${PREFIX}/lib \
+		${DESTDIR}${PREFIX}/bin/ActorEditor
+	${PREFIX}/bin/patchelf --replace-needed \
+		"../../../binaries/system/libAtlasUI.so" libAtlasUI.so \
+		${DESTDIR}${PREFIX}/bin/ActorEditor
+	cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} \
+		libAtlasUI.so libAtlasObject.a ${DESTDIR}${PREFIX}/lib/${PKGBASE}
 .endif
 	# TODO: all of these should be .so.
 	cd ${WRKSRC}/binaries/system && ${INSTALL_LIB} libatlas.a \
@@ -98,18 +110,19 @@ do-install:
 		libsimulation2.a libtinygettext.a libCollada.so \
 		libnvcore.so libnvimage.so libnvmath.so libnvtt.so \
 		${DESTDIR}${PREFIX}/lib/${PKGBASE}
+	# hack. figure out where to set the rpath in the cmake build of the bundled nvtt.
+.for f in libnvcore libnvimage libnvmath libnvtt
+	${PREFIX}/bin/patchelf \
+		--force-rpath \
+		--set-rpath ${PREFIX}/lib/${PKGBASE}:${PREFIX}/lib \
+		${DESTDIR}${PREFIX}/lib/${PKGBASE}/${f}.so
+.endfor
 	${INSTALL_DATA} ${WRKSRC}/build/resources/0ad.desktop ${DESTDIR}${PREFIX}/share/applications
 	${INSTALL_DATA} ${WRKSRC}/build/resources/0ad.png ${DESTDIR}${PREFIX}/share/pixmaps
 	cd ${WRKSRC}/binaries/data && ${PAX} -rw l10n ${DESTDIR}${DATADIR}
 .if !empty(PKG_OPTIONS:Mtests)
 	cd ${WRKSRC}/binaries/data && ${PAX} -rw config tests ${DESTDIR}${DATADIR}
 .endif
-.if !empty(PKG_OPTIONS:Meditor)
-	cd ${WRKSRC}/binaries/data && ${PAX} -rw tools ${DESTDIR}${DATADIR}
-.endif
-	#${TAR} xf ${WRKSRC}/binaries/data/mods/public/public.zip -C ${DESTDIR}${DATADIR}/mods/public --no-same-permissions
-	#${TAR} xf ${WRKSRC}/binaries/data/mods/mod/mod.zip -C ${DESTDIR}${DATADIR}/mods/mod --no-same-permissions
-
 
 .include "../../audio/libvorbis/buildlink3.mk"
 .include "../../audio/openal-soft/buildlink3.mk"
diff --git a/0ad/PLIST b/0ad/PLIST
index af425e6022..e27222c9df 100644
--- a/0ad/PLIST
+++ b/0ad/PLIST
@@ -1,6 +1,9 @@
 @comment $NetBSD$
 bin/0ad
+${PLIST.editor}bin/ActorEditor
 bin/pyrogenesis
+${PLIST.editor}lib/0ad/libAtlasObject.a
+${PLIST.editor}lib/0ad/libAtlasUI.so
 lib/0ad/libCollada.so
 lib/0ad/libatlas.a
 lib/0ad/libengine.a
diff --git a/0ad/options.mk b/0ad/options.mk
index 1f8da28273..c1092ca716 100644
--- a/0ad/options.mk
+++ b/0ad/options.mk
@@ -2,6 +2,8 @@
 PKG_OPTIONS_VAR=	PKG_OPTIONS.0ad
 PKG_SUPPORTED_OPTIONS+=	tests editor
 
+PLIST_VARS+=		editor
+
 .include "../../mk/bsd.options.mk"
 
 .if ${PKG_OPTIONS:Mtests}
@@ -10,8 +12,12 @@ CONFIGURE_TESTS?=		--with-tests
 CONFIGURE_TESTS?=		--without-tests
 .endif
 
+# TODO: not entirely working binary (loads, complains about files not found),
+# something is missing.
 .if ${PKG_OPTIONS:Meditor}
 CONFIGURE_EDITOR?=
+.include "../../x11/wxGTK32/buildlink3.mk"
+PLIST.editor=			yes
 .else
 CONFIGURE_EDITOR?=		--disable-atlas
 .endif


Home | Main Index | Thread Index | Old Index