public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/
@ 2015-08-14 23:10 Julian Ospald
  0 siblings, 0 replies; 10+ messages in thread
From: Julian Ospald @ 2015-08-14 23:10 UTC (permalink / raw
  To: gentoo-commits

commit:     a4a8287805a82348956f05406cda917c5927bf36
Author:     Julian Ospald <hasufell <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 14 22:49:30 2015 +0000
Commit:     Julian Ospald <hasufell <AT> gentoo <DOT> org>
CommitDate: Fri Aug 14 22:49:30 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4a82878

games-strategy/0ad: rm old

 games-strategy/0ad/0ad-0.0.16_alpha-r2.ebuild      | 141 --------------------
 games-strategy/0ad/0ad-0.0.17_alpha.ebuild         | 144 ---------------------
 games-strategy/0ad/Manifest                        |   2 -
 .../0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch       |  42 ------
 .../0ad/files/0ad-0.0.16_alpha-gentoo.patch        |  93 -------------
 .../0ad/files/0ad-0.0.17_alpha-gentoo.patch        | 100 --------------
 6 files changed, 522 deletions(-)

diff --git a/games-strategy/0ad/0ad-0.0.16_alpha-r2.ebuild b/games-strategy/0ad/0ad-0.0.16_alpha-r2.ebuild
deleted file mode 100644
index 2c1be97..0000000
--- a/games-strategy/0ad/0ad-0.0.16_alpha-r2.ebuild
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-WX_GTK_VER="2.8"
-
-inherit eutils wxwidgets toolchain-funcs gnome2-utils games
-
-MY_P=0ad-${PV/_/-}
-DESCRIPTION="A free, real-time strategy game"
-HOMEPAGE="http://play0ad.com/"
-SRC_URI="http://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz"
-
-LICENSE="GPL-2 LGPL-2.1 MIT CC-BY-SA-3.0 ZLIB"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="editor +lobby pch sound test"
-RESTRICT="test"
-
-RDEPEND="
-	dev-lang/spidermonkey:24
-	dev-libs/boost
-	dev-libs/icu:=
-	dev-libs/libxml2
-	~games-strategy/0ad-data-${PV}
-	media-gfx/nvidia-texture-tools
-	media-libs/libpng:0
-	media-libs/libsdl[X,opengl,video]
-	net-libs/enet:1.3
-	net-libs/miniupnpc
-	net-misc/curl
-	sys-libs/zlib
-	virtual/jpeg
-	virtual/opengl
-	x11-libs/libX11
-	x11-libs/libXcursor
-	editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
-	lobby? ( net-libs/gloox )
-	sound? ( media-libs/libogg
-		media-libs/libvorbis
-		media-libs/openal )"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig
-	test? ( dev-lang/perl )"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
-	epatch "${FILESDIR}"/${P}-gentoo.patch \
-		"${FILESDIR}"/${P}-gcc-4.9.patch
-}
-
-src_configure() {
-	local myconf=(
-		--with-system-nvtt
-		--with-system-enet
-		--with-system-miniupnpc
-		--with-system-mozjs24
-		--minimal-flags
-		$(usex pch "" "--without-pch")
-		$(usex test "" "--without-tests")
-		$(usex sound "" "--without-audio")
-		$(usex editor "--atlas" "")
-		$(usex lobby "" "--without-lobby")
-		--collada
-		--bindir="${GAMES_BINDIR}"
-		--libdir="$(games_get_libdir)"/${PN}
-		--datadir="${GAMES_DATADIR}"/${PN}
-		)
-
-	# stock premake4 does not work, use the shipped one
-	emake -C "${S}"/build/premake/premake4/build/gmake.unix
-
-	# regenerate scripts.c so our patch applies
-	cd "${S}"/build/premake/premake4 || die
-	"${S}"/build/premake/premake4/bin/release/premake4 embed || die
-
-	# rebuild premake again... this is the most stupid build system
-	emake -C "${S}"/build/premake/premake4/build/gmake.unix clean
-	emake -C "${S}"/build/premake/premake4/build/gmake.unix
-
-	# run premake to create build scripts
-	cd "${S}"/build/premake || die
-	"${S}"/build/premake/premake4/bin/release/premake4 \
-		--file="premake4.lua" \
-		--outpath="../workspaces/gcc/" \
-		--platform=$(usex amd64 "x64" "x32") \
-		--os=linux \
-		"${myconf[@]}" \
-		gmake || die "Premake failed"
-}
-
-src_compile() {
-	# build 3rd party fcollada
-	emake -C libraries/source/fcollada/src
-
-	# build 0ad
-	emake -C build/workspaces/gcc verbose=1
-}
-
-src_test() {
-	cd binaries/system || die
-	./test -libdir "${S}/binaries/system" || die "test phase failed"
-}
-
-src_install() {
-	dogamesbin binaries/system/pyrogenesis
-	use editor && dogamesbin binaries/system/ActorEditor
-
-	insinto "${GAMES_DATADIR}"/${PN}
-	doins -r binaries/data/l10n
-
-	exeinto "$(games_get_libdir)"/${PN}
-	doexe binaries/system/libCollada.so
-	use editor && doexe binaries/system/libAtlasUI.so
-
-	dodoc binaries/system/readme.txt
-	doicon -s 128 build/resources/${PN}.png
-	games_make_wrapper ${PN} "${GAMES_BINDIR}/pyrogenesis"
-	use editor &&
-		games_make_wrapper ${PN}-ActorEditor "${GAMES_BINDIR}/ActorEditor"
-	make_desktop_entry ${PN}
-
-	prepgamesdirs
-}
-
-pkg_preinst() {
-	games_pkg_preinst
-	gnome2_icon_savelist
-}
-
-pkg_postinst() {
-	games_pkg_postinst
-	gnome2_icon_cache_update
-}
-
-pkg_postrm() {
-	gnome2_icon_cache_update
-}

diff --git a/games-strategy/0ad/0ad-0.0.17_alpha.ebuild b/games-strategy/0ad/0ad-0.0.17_alpha.ebuild
deleted file mode 100644
index c50a532..0000000
--- a/games-strategy/0ad/0ad-0.0.17_alpha.ebuild
+++ /dev/null
@@ -1,144 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-WX_GTK_VER="2.8"
-
-inherit eutils wxwidgets toolchain-funcs gnome2-utils games
-
-MY_P=0ad-${PV/_/-}
-DESCRIPTION="A free, real-time strategy game"
-HOMEPAGE="http://play0ad.com/"
-SRC_URI="mirror://sourceforge/zero-ad/${MY_P}-unix-build.tar.xz"
-
-LICENSE="GPL-2 LGPL-2.1 MIT CC-BY-SA-3.0 ZLIB"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="editor +lobby nvtt pch sound test"
-RESTRICT="test"
-
-RDEPEND="
-	dev-lang/spidermonkey:24[-icu]
-	dev-libs/boost
-	dev-libs/icu:=
-	dev-libs/libxml2
-	~games-strategy/0ad-data-${PV}
-	media-libs/libpng:0
-	media-libs/libsdl2[X,opengl,video]
-	net-libs/enet:1.3
-	net-libs/miniupnpc
-	net-misc/curl
-	sys-libs/zlib
-	virtual/jpeg
-	virtual/opengl
-	x11-libs/libX11
-	x11-libs/libXcursor
-	editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
-	lobby? ( net-libs/gloox )
-	nvtt? ( media-gfx/nvidia-texture-tools )
-	sound? ( media-libs/libvorbis
-		media-libs/openal )"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig
-	test? ( dev-lang/perl )"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
-	epatch "${FILESDIR}"/${P}-gentoo.patch
-}
-
-src_configure() {
-	local myconf=(
-		--with-system-nvtt
-		--with-system-miniupnpc
-		--with-system-mozjs24
-		--minimal-flags
-		--sdl2
-		$(usex nvtt "" "--without-nvtt")
-		$(usex pch "" "--without-pch")
-		$(usex test "" "--without-tests")
-		$(usex sound "" "--without-audio")
-		$(usex editor "--atlas" "")
-		$(usex lobby "" "--without-lobby")
-		--collada
-		--bindir="${GAMES_BINDIR}"
-		--libdir="$(games_get_libdir)"/${PN}
-		--datadir="${GAMES_DATADIR}"/${PN}
-		)
-
-	# stock premake4 does not work, use the shipped one
-	emake -C "${S}"/build/premake/premake4/build/gmake.unix
-
-	# regenerate scripts.c so our patch applies
-	cd "${S}"/build/premake/premake4 || die
-	"${S}"/build/premake/premake4/bin/release/premake4 embed || die
-
-	# rebuild premake again... this is the most stupid build system
-	emake -C "${S}"/build/premake/premake4/build/gmake.unix clean
-	emake -C "${S}"/build/premake/premake4/build/gmake.unix
-
-	# run premake to create build scripts
-	cd "${S}"/build/premake || die
-	"${S}"/build/premake/premake4/bin/release/premake4 \
-		--file="premake4.lua" \
-		--outpath="../workspaces/gcc/" \
-		--platform=$(usex amd64 "x64" "x32") \
-		--os=linux \
-		"${myconf[@]}" \
-		gmake || die "Premake failed"
-}
-
-src_compile() {
-	# build 3rd party fcollada
-	emake -C libraries/source/fcollada/src
-
-	# build 0ad
-	emake -C build/workspaces/gcc verbose=1
-}
-
-src_test() {
-	cd binaries/system || die
-	./test -libdir "${S}/binaries/system" || die "test phase failed"
-}
-
-src_install() {
-	dogamesbin binaries/system/pyrogenesis
-	use editor && dogamesbin binaries/system/ActorEditor
-
-	insinto "${GAMES_DATADIR}"/${PN}
-	doins -r binaries/data/l10n
-
-	exeinto "$(games_get_libdir)"/${PN}
-	doexe binaries/system/libCollada.so
-	use editor && doexe binaries/system/libAtlasUI.so
-
-	dodoc binaries/system/readme.txt
-	doicon -s 128 build/resources/${PN}.png
-	games_make_wrapper ${PN} "${GAMES_BINDIR}/pyrogenesis"
-	use editor &&
-		games_make_wrapper ${PN}-ActorEditor "${GAMES_BINDIR}/ActorEditor"
-	make_desktop_entry ${PN}
-
-	prepgamesdirs
-}
-
-pkg_preinst() {
-	games_pkg_preinst
-	gnome2_icon_savelist
-}
-
-pkg_postinst() {
-	einfo
-	elog "It is advised to compile dev-lang/spidermonkey with the"
-	elog "jit USE flag enabled! Otherwise you might experience slowdowns."
-	einfo
-	games_pkg_postinst
-	gnome2_icon_cache_update
-}
-
-pkg_postrm() {
-	gnome2_icon_cache_update
-}

diff --git a/games-strategy/0ad/Manifest b/games-strategy/0ad/Manifest
index ed1863b..c04c04a 100644
--- a/games-strategy/0ad/Manifest
+++ b/games-strategy/0ad/Manifest
@@ -1,3 +1 @@
-DIST 0ad-0.0.16-alpha-unix-build.tar.xz 20019680 SHA256 cb965ef7e292bc3a2f1f598a9695e16ff4d786398f384a1ec7d5f9bfe2626de5 SHA512 9fe3440233d9827895b91ade1873afe977d62386a5dd6042d8169b153d576b462381bfc97e637f0b183aff034236380ca6d552ea2755cf08398143ad67121031 WHIRLPOOL 0e2f1ac9799a4b4d4588c2370a78195f2cc415fb2043be815ed2a2f9f179ccd856c405e7c0323f2033d3a6a4d63c08d8d5c8a05b50769ae3b9219717218edef6
-DIST 0ad-0.0.17-alpha-unix-build.tar.xz 19327284 SHA256 ef144d44fe8a8abd29a4642999a58a596b8f0d0e1f310065f5ce1dfbe29c3aeb SHA512 21133b7f255df73909e0ba72d455ed8d687cdca4a6d28fb04fb2a786ee941d7f4e207b5c245f9bfff1f3e5e10e2ccc932f49587e227982885eef64b4114d02c6 WHIRLPOOL 662e177293ca7add73ca160b67a526aeda6a7a32e26a68fb577376d25db00df9844fe763a2dfcef70f66fc0edd6d2297158251a517deeaa7d7e8292850a8b444
 DIST 0ad-0.0.18-alpha-unix-build.tar.xz 26179952 SHA256 bd2f04d3269ae9af104626827446a89ea4a0dd4859f89539701fd331cbae0397 SHA512 f332780d38e3fc2665a5952ae9cd25ab89508b3b27d810cf1b386d6c6d636aeed306135c37baf6232ba8c0d0e7923ecb0b4fc127a6de5ce1248dfc38158e0c41 WHIRLPOOL 82af33e3ece02885c97c364838de7ff1efb200ca021c94db40dbd0ef877ee07a96dc6a200113e9b459fa441c8168f863d6f6a10bceb7f00a1bc0511b367621c8

diff --git a/games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch b/games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch
deleted file mode 100644
index 5b17120..0000000
--- a/games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Index: /ps/trunk/source/lib/allocators/headerless.cpp
-===================================================================
---- /ps/trunk/source/lib/allocators/headerless.cpp	(revision 15333)
-+++ /ps/trunk/source/lib/allocators/headerless.cpp	(revision 15334)
-@@ -55,10 +55,12 @@
- 	}
- 
--	FreedBlock(uintptr_t id, size_t size)
--		:  m_magic(s_magic), m_size(size), m_id(id)
--	{
--	}
--
--	~FreedBlock()
-+	void Setup(uintptr_t id, size_t size)
-+	{
-+		m_magic = s_magic;
-+		m_size = size;
-+		m_id = id;
-+	}
-+
-+	void Reset()
- 	{
- 		// clear all fields to prevent accidental reuse
-@@ -411,6 +413,7 @@
- 	FreedBlock* WriteTags(u8* p, size_t size)
- 	{
--		FreedBlock* freedBlock = new(p) FreedBlock(s_headerId, size);
--		(void)new(Footer(freedBlock)) FreedBlock(s_footerId, size);
-+		FreedBlock* freedBlock = (FreedBlock*)p;
-+		freedBlock->Setup(s_headerId, size);
-+		Footer(freedBlock)->Setup(s_footerId, size);
- 
- 		m_freeBlocks++;
-@@ -431,6 +434,6 @@
- 
- 		FreedBlock* footer = Footer(freedBlock);
--		freedBlock->~FreedBlock();
--		footer->~FreedBlock();
-+		freedBlock->Reset();
-+		footer->Reset();
- 	}
- 

diff --git a/games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch b/games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch
deleted file mode 100644
index 30192fb..0000000
--- a/games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From: Julian Ospald <hasufell@gentoo.org>
-Date: Sun Jun 24 18:32:38 UTC 2012
-Subject: build system
-
-respect flags
-let stripping be handled by the system
-
-fix minimal-flags option:
-	leave -fvisibility=hidden active
-	leave conditional -fpc-preprocess active
-
---- build/premake/premake4.lua
-+++ build/premake/premake4.lua
-@@ -145,7 +145,7 @@
- 
- function project_set_build_flags()
- 
--	flags { "Symbols", "NoEditAndContinue" }
-+	flags { "NoEditAndContinue" }
- 	if not _OPTIONS["icc"] and (os.is("windows") or not _OPTIONS["minimal-flags"]) then
- 		-- adds the -Wall compiler flag
- 		flags { "ExtraWarnings" } -- this causes far too many warnings/remarks on ICC
-@@ -337,13 +337,11 @@
- 			end
- 		end
- 
--		if not _OPTIONS["minimal-flags"] then
- 			buildoptions {
- 				-- Hide symbols in dynamic shared objects by default, for efficiency and for equivalence with
- 				-- Windows - they should be exported explicitly with __attribute__ ((visibility ("default")))
- 				"-fvisibility=hidden"
- 			}
--		end
- 
- 		if _OPTIONS["bindir"] then
- 			defines { "INSTALLED_BINDIR=" .. _OPTIONS["bindir"] }
---- libraries/source/fcollada/src/Makefile
-+++ libraries/source/fcollada/src/Makefile
-@@ -9,8 +9,8 @@
- 
- CXX ?= g++
- CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
--CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
--CXXFLAGS_RELEASE := -O1 -DNDEBUG -DRETAIL
-+CXXFLAGS_DEBUG := -D_DEBUG -DRETAIL
-+CXXFLAGS_RELEASE := -DNDEBUG -DRETAIL
- # (-O2 with gcc 4.3 causes linker errors when using this library, for unknown reasons, so stick with -O1 until gcc >4.3 is typical.)
- CXXFLAGS_TEST := -O0 -g -D_DEBUG
- LIBS += `pkg-config libxml-2.0 --libs`
---- build/premake/premake4/src/tools/gcc.lua
-+++ build/premake/premake4/src/tools/gcc.lua
-@@ -136,8 +136,6 @@
- 		if not cfg.flags.Symbols then
- 			if cfg.system == "macosx" then
- 				table.insert(result, "-Wl,-x")
--			else
--				table.insert(result, "-s")
- 			end
- 		end
- 	
---- build/premake/premake4/build/gmake.unix/Premake4.make
-+++ build/premake/premake4/build/gmake.unix/Premake4.make
-@@ -26,9 +26,9 @@
-   DEFINES   += -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
-   INCLUDES  += -I../../src/host/lua-5.1.4/src
-   CPPFLAGS  += -MMD -MP $(DEFINES) $(INCLUDES)
--  CFLAGS    += $(CPPFLAGS) -Wall -Os
--  CXXFLAGS  += $(CPPFLAGS) -Wall -Os
--  LDFLAGS   += -s -rdynamic
-+  CFLAGS    += $(CPPFLAGS) -Wall
-+  CXXFLAGS  += $(CPPFLAGS) -Wall
-+  LDFLAGS   += -rdynamic
-   LIBS      += -lm -ldl 
-   RESFLAGS  += $(DEFINES) $(INCLUDES) 
-   LDDEPS    += 
-@@ -48,8 +48,8 @@
-   DEFINES   += -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
-   INCLUDES  += -I../../src/host/lua-5.1.4/src
-   CPPFLAGS  += -MMD -MP $(DEFINES) $(INCLUDES)
--  CFLAGS    += $(CPPFLAGS) -Wall -g
--  CXXFLAGS  += $(CPPFLAGS) -Wall -g
-+  CFLAGS    += $(CPPFLAGS) -Wall
-+  CXXFLAGS  += $(CPPFLAGS) -Wall
-   LDFLAGS   += -rdynamic
-   LIBS      += -lm -ldl 
-   RESFLAGS  += $(DEFINES) $(INCLUDES) 
-@@ -302,4 +302,4 @@
- 	$(SILENT) $(CC) $(PCHINCLUDES) $(CFLAGS) -MF $(OBJDIR)/lauxlib.d -MT "$@" -o "$@" -c "$<"
- 
- -include $(OBJECTS:%.o=%.d)
---include $(GCH:%.h.gch=%.h.d)
-\ No newline at end of file
-+-include $(GCH:%.h.gch=%.h.d)

diff --git a/games-strategy/0ad/files/0ad-0.0.17_alpha-gentoo.patch b/games-strategy/0ad/files/0ad-0.0.17_alpha-gentoo.patch
deleted file mode 100644
index 45233ab..0000000
--- a/games-strategy/0ad/files/0ad-0.0.17_alpha-gentoo.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From: Julian Ospald <hasufell@gentoo.org>
-Date: Sun Jun 24 18:32:38 UTC 2012
-Subject: build system
-
-respect flags
-let stripping be handled by the system
-
-fix minimal-flags option:
-	leave -fvisibility=hidden active
-	leave conditional -fpc-preprocess active
-
---- build/premake/premake4.lua
-+++ build/premake/premake4.lua
-@@ -177,7 +177,7 @@
- 
- function project_set_build_flags()
- 
--	flags { "Symbols", "NoEditAndContinue" }
-+	flags { "NoEditAndContinue" }
- 	if cc ~= "icc" and (os.is("windows") or not _OPTIONS["minimal-flags"]) then
- 		-- adds the -Wall compiler flag
- 		flags { "ExtraWarnings" } -- this causes far too many warnings/remarks on ICC
-@@ -366,13 +366,11 @@
- 			end
- 		end
- 
--		if not _OPTIONS["minimal-flags"] then
--			buildoptions {
--				-- Hide symbols in dynamic shared objects by default, for efficiency and for equivalence with
--				-- Windows - they should be exported explicitly with __attribute__ ((visibility ("default")))
--				"-fvisibility=hidden"
--			}
--		end
-+		buildoptions {
-+			-- Hide symbols in dynamic shared objects by default, for efficiency and for equivalence with
-+			-- Windows - they should be exported explicitly with __attribute__ ((visibility ("default")))
-+			"-fvisibility=hidden"
-+		}
- 
- 		if _OPTIONS["bindir"] then
- 			defines { "INSTALLED_BINDIR=" .. _OPTIONS["bindir"] }
---- libraries/source/fcollada/src/Makefile
-+++ libraries/source/fcollada/src/Makefile
-@@ -9,9 +9,9 @@
- 
- CXX ?= g++
- CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
--CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
--CXXFLAGS_RELEASE := -O2 -DNDEBUG -DRETAIL
--CXXFLAGS_TEST := -O0 -g -D_DEBUG
-+CXXFLAGS_DEBUG := -D_DEBUG -DRETAIL
-+CXXFLAGS_RELEASE := -DNDEBUG -DRETAIL
-+CXXFLAGS_TEST := -D_DEBUG
- LIBS += `pkg-config libxml-2.0 --libs`
- INCLUDES += -IFCollada `pkg-config libxml-2.0 --cflags`
- INCLUDES_TEST := -IFCollada/FColladaTest $(INCLUDES)
---- build/premake/premake4/src/tools/gcc.lua
-+++ build/premake/premake4/src/tools/gcc.lua
-@@ -136,8 +136,6 @@
- 		if not cfg.flags.Symbols then
- 			if cfg.system == "macosx" then
- 				table.insert(result, "-Wl,-x")
--			else
--				table.insert(result, "-s")
- 			end
- 		end
- 	
---- build/premake/premake4/build/gmake.unix/Premake4.make
-+++ build/premake/premake4/build/gmake.unix/Premake4.make
-@@ -26,9 +26,9 @@
-   DEFINES   += -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
-   INCLUDES  += -I../../src/host/lua-5.1.4/src
-   CPPFLAGS  += -MMD -MP $(DEFINES) $(INCLUDES)
--  CFLAGS    += $(CPPFLAGS) -Wall -Os
--  CXXFLAGS  += $(CPPFLAGS) -Wall -Os
--  LDFLAGS   += -s -rdynamic
-+  CFLAGS    += $(CPPFLAGS) -Wall
-+  CXXFLAGS  += $(CPPFLAGS) -Wall
-+  LDFLAGS   += -rdynamic
-   LIBS      += -lm -ldl 
-   RESFLAGS  += $(DEFINES) $(INCLUDES) 
-   LDDEPS    += 
-@@ -48,8 +48,8 @@
-   DEFINES   += -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
-   INCLUDES  += -I../../src/host/lua-5.1.4/src
-   CPPFLAGS  += -MMD -MP $(DEFINES) $(INCLUDES)
--  CFLAGS    += $(CPPFLAGS) -Wall -g
--  CXXFLAGS  += $(CPPFLAGS) -Wall -g
-+  CFLAGS    += $(CPPFLAGS) -Wall
-+  CXXFLAGS  += $(CPPFLAGS) -Wall
-   LDFLAGS   += -rdynamic
-   LIBS      += -lm -ldl 
-   RESFLAGS  += $(DEFINES) $(INCLUDES) 
-@@ -302,4 +302,4 @@
- 	$(SILENT) $(CC) $(PCHINCLUDES) $(CFLAGS) -MF $(OBJDIR)/lauxlib.d -MT "$@" -o "$@" -c "$<"
- 
- -include $(OBJECTS:%.o=%.d)
---include $(GCH:%.h.gch=%.h.d)
-\ No newline at end of file
-+-include $(GCH:%.h.gch=%.h.d)


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/
@ 2015-08-14 23:10 Julian Ospald
  0 siblings, 0 replies; 10+ messages in thread
From: Julian Ospald @ 2015-08-14 23:10 UTC (permalink / raw
  To: gentoo-commits

commit:     add3c0358e800987db772e55d1837eb52fef9819
Author:     Julian Ospald <hasufell <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 14 22:47:50 2015 +0000
Commit:     Julian Ospald <hasufell <AT> gentoo <DOT> org>
CommitDate: Fri Aug 14 22:47:50 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=add3c035

games-strategy/0ad: version bump to 0.0.18_alpha

 games-strategy/0ad/0ad-0.0.18_alpha.ebuild         | 143 +++++++++++++++++++++
 games-strategy/0ad/Manifest                        |   1 +
 .../0ad/files/0ad-0.0.18_alpha-gentoo.patch        | 101 +++++++++++++++
 3 files changed, 245 insertions(+)

diff --git a/games-strategy/0ad/0ad-0.0.18_alpha.ebuild b/games-strategy/0ad/0ad-0.0.18_alpha.ebuild
new file mode 100644
index 0000000..258645d
--- /dev/null
+++ b/games-strategy/0ad/0ad-0.0.18_alpha.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+
+inherit eutils wxwidgets toolchain-funcs gnome2-utils games
+
+MY_P=0ad-${PV/_/-}
+DESCRIPTION="A free, real-time strategy game"
+HOMEPAGE="http://play0ad.com/"
+SRC_URI="mirror://sourceforge/zero-ad/${MY_P}-unix-build.tar.xz"
+
+LICENSE="GPL-2 LGPL-2.1 MIT CC-BY-SA-3.0 ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="editor +lobby nvtt pch sound test"
+RESTRICT="test"
+
+RDEPEND="
+	dev-libs/boost
+	dev-libs/icu:=
+	dev-libs/libxml2
+	~games-strategy/0ad-data-${PV}
+	media-libs/libpng:0
+	media-libs/libsdl2[X,opengl,video]
+	net-libs/enet:1.3
+	net-libs/miniupnpc
+	net-misc/curl
+	sys-libs/zlib
+	virtual/jpeg:62
+	virtual/opengl
+	x11-libs/libX11
+	x11-libs/libXcursor
+	editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
+	lobby? ( net-libs/gloox )
+	nvtt? ( media-gfx/nvidia-texture-tools )
+	sound? ( media-libs/libvorbis
+		media-libs/openal )"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	test? ( dev-lang/perl )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_configure() {
+	local myconf=(
+		--with-system-nvtt
+		--with-system-miniupnpc
+		--minimal-flags
+		--sdl2
+		$(usex nvtt "" "--without-nvtt")
+		$(usex pch "" "--without-pch")
+		$(usex test "" "--without-tests")
+		$(usex sound "" "--without-audio")
+		$(usex editor "--atlas" "")
+		$(usex lobby "" "--without-lobby")
+		--collada
+		--bindir="${GAMES_BINDIR}"
+		--libdir="$(games_get_libdir)"/${PN}
+		--datadir="${GAMES_DATADIR}"/${PN}
+		)
+
+	# stock premake4 does not work, use the shipped one
+	emake -C "${S}"/build/premake/premake4/build/gmake.unix
+
+	# regenerate scripts.c so our patch applies
+	cd "${S}"/build/premake/premake4 || die
+	"${S}"/build/premake/premake4/bin/release/premake4 embed || die
+
+	# rebuild premake again... this is the most stupid build system
+	emake -C "${S}"/build/premake/premake4/build/gmake.unix clean
+	emake -C "${S}"/build/premake/premake4/build/gmake.unix
+
+	# run premake to create build scripts
+	cd "${S}"/build/premake || die
+	"${S}"/build/premake/premake4/bin/release/premake4 \
+		--file="premake4.lua" \
+		--outpath="../workspaces/gcc/" \
+		--platform=$(usex amd64 "x64" "x32") \
+		--os=linux \
+		"${myconf[@]}" \
+		gmake || die "Premake failed"
+}
+
+src_compile() {
+	tc-export AR
+
+	# build bundled and patched spidermonkey
+	cd libraries/source/spidermonkey || die
+	JOBS="${MAKEOPTS}" ./build.sh || die
+	cd "${S}" || die
+
+	# build 3rd party fcollada
+	emake -C libraries/source/fcollada/src
+
+	# build 0ad
+	emake -C build/workspaces/gcc verbose=1
+}
+
+src_test() {
+	cd binaries/system || die
+	./test -libdir "${S}/binaries/system" || die "test phase failed"
+}
+
+src_install() {
+	newgamesbin binaries/system/pyrogenesis 0ad
+	use editor && newgamesbin binaries/system/ActorEditor 0ad-ActorEditor
+
+	insinto "${GAMES_DATADIR}"/${PN}
+	doins -r binaries/data/l10n
+
+	exeinto "$(games_get_libdir)"/${PN}
+	doexe binaries/system/libCollada.so
+	doexe libraries/source/spidermonkey/lib/*.so
+	use editor && doexe binaries/system/libAtlasUI.so
+
+	dodoc binaries/system/readme.txt
+	doicon -s 128 build/resources/${PN}.png
+	make_desktop_entry ${PN}
+
+	prepgamesdirs
+}
+
+pkg_preinst() {
+	games_pkg_preinst
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	games_pkg_postinst
+	gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+}

diff --git a/games-strategy/0ad/Manifest b/games-strategy/0ad/Manifest
index 6ff6125..ed1863b 100644
--- a/games-strategy/0ad/Manifest
+++ b/games-strategy/0ad/Manifest
@@ -1,2 +1,3 @@
 DIST 0ad-0.0.16-alpha-unix-build.tar.xz 20019680 SHA256 cb965ef7e292bc3a2f1f598a9695e16ff4d786398f384a1ec7d5f9bfe2626de5 SHA512 9fe3440233d9827895b91ade1873afe977d62386a5dd6042d8169b153d576b462381bfc97e637f0b183aff034236380ca6d552ea2755cf08398143ad67121031 WHIRLPOOL 0e2f1ac9799a4b4d4588c2370a78195f2cc415fb2043be815ed2a2f9f179ccd856c405e7c0323f2033d3a6a4d63c08d8d5c8a05b50769ae3b9219717218edef6
 DIST 0ad-0.0.17-alpha-unix-build.tar.xz 19327284 SHA256 ef144d44fe8a8abd29a4642999a58a596b8f0d0e1f310065f5ce1dfbe29c3aeb SHA512 21133b7f255df73909e0ba72d455ed8d687cdca4a6d28fb04fb2a786ee941d7f4e207b5c245f9bfff1f3e5e10e2ccc932f49587e227982885eef64b4114d02c6 WHIRLPOOL 662e177293ca7add73ca160b67a526aeda6a7a32e26a68fb577376d25db00df9844fe763a2dfcef70f66fc0edd6d2297158251a517deeaa7d7e8292850a8b444
+DIST 0ad-0.0.18-alpha-unix-build.tar.xz 26179952 SHA256 bd2f04d3269ae9af104626827446a89ea4a0dd4859f89539701fd331cbae0397 SHA512 f332780d38e3fc2665a5952ae9cd25ab89508b3b27d810cf1b386d6c6d636aeed306135c37baf6232ba8c0d0e7923ecb0b4fc127a6de5ce1248dfc38158e0c41 WHIRLPOOL 82af33e3ece02885c97c364838de7ff1efb200ca021c94db40dbd0ef877ee07a96dc6a200113e9b459fa441c8168f863d6f6a10bceb7f00a1bc0511b367621c8

diff --git a/games-strategy/0ad/files/0ad-0.0.18_alpha-gentoo.patch b/games-strategy/0ad/files/0ad-0.0.18_alpha-gentoo.patch
new file mode 100644
index 0000000..5c48ec8
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.18_alpha-gentoo.patch
@@ -0,0 +1,101 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sun Jun 24 18:32:38 UTC 2012
+Subject: build system
+
+* respect flags
+* disable debug build of spidermonkey
+
+--- libraries/source/fcollada/src/Makefile
++++ libraries/source/fcollada/src/Makefile
+@@ -9,9 +9,9 @@
+ 
+ CXX ?= g++
+ CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
+-CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
+-CXXFLAGS_RELEASE := -O2 -DNDEBUG -DRETAIL
+-CXXFLAGS_TEST := -O0 -g -D_DEBUG
++CXXFLAGS_DEBUG := -D_DEBUG -DRETAIL
++CXXFLAGS_RELEASE := -DNDEBUG -DRETAIL
++CXXFLAGS_TEST := -D_DEBUG
+ LIBS += `pkg-config libxml-2.0 --libs`
+ INCLUDES += -IFCollada `pkg-config libxml-2.0 --cflags`
+ INCLUDES_TEST := -IFCollada/FColladaTest $(INCLUDES)
+--- build/premake/premake4/src/tools/gcc.lua
++++ build/premake/premake4/src/tools/gcc.lua
+@@ -136,8 +136,6 @@
+ 		if not cfg.flags.Symbols then
+ 			if cfg.system == "macosx" then
+ 				table.insert(result, "-Wl,-x")
+-			else
+-				table.insert(result, "-s")
+ 			end
+ 		end
+ 	
+--- build/premake/premake4/build/gmake.unix/Premake4.make
++++ build/premake/premake4/build/gmake.unix/Premake4.make
+@@ -26,9 +26,9 @@
+   DEFINES   += -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+   INCLUDES  += -I../../src/host/lua-5.1.4/src
+   CPPFLAGS  += -MMD -MP $(DEFINES) $(INCLUDES)
+-  CFLAGS    += $(CPPFLAGS) -Wall -Os
+-  CXXFLAGS  += $(CPPFLAGS) -Wall -Os
+-  LDFLAGS   += -s -rdynamic
++  CFLAGS    += $(CPPFLAGS) -Wall
++  CXXFLAGS  += $(CPPFLAGS) -Wall
++  LDFLAGS   += -rdynamic
+   LIBS      += -lm -ldl 
+   RESFLAGS  += $(DEFINES) $(INCLUDES) 
+   LDDEPS    += 
+@@ -48,8 +48,8 @@
+   DEFINES   += -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+   INCLUDES  += -I../../src/host/lua-5.1.4/src
+   CPPFLAGS  += -MMD -MP $(DEFINES) $(INCLUDES)
+-  CFLAGS    += $(CPPFLAGS) -Wall -g
+-  CXXFLAGS  += $(CPPFLAGS) -Wall -g
++  CFLAGS    += $(CPPFLAGS) -Wall
++  CXXFLAGS  += $(CPPFLAGS) -Wall
+   LDFLAGS   += -rdynamic
+   LIBS      += -lm -ldl 
+   RESFLAGS  += $(DEFINES) $(INCLUDES) 
+@@ -302,4 +302,4 @@
+ 	$(SILENT) $(CC) $(PCHINCLUDES) $(CFLAGS) -MF $(OBJDIR)/lauxlib.d -MT "$@" -o "$@" -c "$<"
+ 
+ -include $(OBJECTS:%.o=%.d)
+--include $(GCH:%.h.gch=%.h.d)
+\ No newline at end of file
++-include $(GCH:%.h.gch=%.h.d)
+--- libraries/source/spidermonkey/build.sh
++++ libraries/source/spidermonkey/build.sh
+@@ -92,19 +92,7 @@
+ cd mozjs31/js/src
+ 
+ # Clean up data generated by previous builds that could cause problems
+-rm -rf build-debug
+ rm -rf build-release
+-
+-# We want separate debug/release versions of the library, so we have to change
+-# the LIBRARY_NAME for each build.
+-# (We use perl instead of sed so that it works with MozillaBuild on Windows,
+-# which has an ancient sed.)
+-perl -i.bak -pe 's/(LIBRARY_NAME\s+=).*/$1 '\''mozjs31-ps-debug'\''/' moz.build
+-mkdir -p build-debug
+-cd build-debug
+-CXXFLAGS="${TLCXXFLAGS}" ../configure ${CONF_OPTS} --with-nspr-libs="$NSPR_LIBS" --with-nspr-cflags="$NSPR_INCLUDES" --enable-debug --disable-optimize --enable-js-diagnostics --enable-gczeal # --enable-root-analysis
+-${MAKE} ${MAKE_OPTS}
+-cd ..
+ 
+ perl -i.bak -pe 's/(LIBRARY_NAME\s+=).*/$1 '\''mozjs31-ps-release'\''/' moz.build
+ mkdir -p build-release
+@@ -147,12 +135,9 @@
+ mkdir -p ${INCLUDE_DIR_DEBUG}
+ mkdir -p ${INCLUDE_DIR_RELEASE}
+ cp -R -L mozjs31/js/src/build-release/dist/include/* ${INCLUDE_DIR_RELEASE}/
+-cp -R -L mozjs31/js/src/build-debug/dist/include/* ${INCLUDE_DIR_DEBUG}/
+ 
+ mkdir -p lib/
+-cp -L mozjs31/js/src/build-debug/dist/lib/${LIB_PREFIX}mozjs31-ps-debug${LIB_SRC_SUFFIX} lib/${LIB_PREFIX}mozjs31-ps-debug${LIB_DST_SUFFIX}
+ cp -L mozjs31/js/src/build-release/dist/lib/${LIB_PREFIX}mozjs31-ps-release${LIB_SRC_SUFFIX} lib/${LIB_PREFIX}mozjs31-ps-release${LIB_DST_SUFFIX}
+-cp -L mozjs31/js/src/build-debug/dist/bin/${LIB_PREFIX}mozjs31-ps-debug${DLL_SRC_SUFFIX} ../../../binaries/system/${LIB_PREFIX}mozjs31-ps-debug${DLL_DST_SUFFIX}
+ cp -L mozjs31/js/src/build-release/dist/bin/${LIB_PREFIX}mozjs31-ps-release${DLL_SRC_SUFFIX} ../../../binaries/system/${LIB_PREFIX}mozjs31-ps-release${DLL_DST_SUFFIX}
+ 
+ # Flag that it's already been built successfully so we can skip it next time


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/
@ 2021-01-17  1:17 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2021-01-17  1:17 UTC (permalink / raw
  To: gentoo-commits

commit:     9f45cfa2083bf7a6ab3f92241096c11f5adf7691
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sat Jan 16 04:00:00 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 17 01:17:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f45cfa2

games-strategy/0ad: Version bump (0.0.24_alpha_pre20210116040036).

Using system version of SpiderMonkey 78 to avoid direct dependency on Python.
(SpiderMonkey >=78.6 required due to bug #759985.)

Bug: https://bugs.gentoo.org/735352
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../0ad/0ad-0.0.24_alpha_pre20210116040036.ebuild  | 157 +++++++++++++++++++++
 games-strategy/0ad/Manifest                        |   1 +
 .../0ad-0.0.24_alpha_pre20210116040036-build.patch | 105 ++++++++++++++
 3 files changed, 263 insertions(+)

diff --git a/games-strategy/0ad/0ad-0.0.24_alpha_pre20210116040036.ebuild b/games-strategy/0ad/0ad-0.0.24_alpha_pre20210116040036.ebuild
new file mode 100644
index 00000000000..efaa4577774
--- /dev/null
+++ b/games-strategy/0ad/0ad-0.0.24_alpha_pre20210116040036.ebuild
@@ -0,0 +1,157 @@
+# Copyright 2014-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+WX_GTK_VER="3.0-gtk3"
+
+inherit desktop toolchain-funcs wxwidgets xdg-utils
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+
+	EGIT_REPO_URI="https://github.com/0ad/0ad"
+	ZEROAD_GIT_REVISION=""
+elif [[ ${PV} == *_pre* ]]; then
+	ZEROAD_GIT_REVISION="c7d07d3979f969b969211a5e5748fa775f6768a7"
+else
+	MY_P="0ad-${PV/_/-}"
+fi
+
+DESCRIPTION="A free, real-time strategy game"
+HOMEPAGE="https://play0ad.com/"
+if [[ ${PV} == 9999 ]]; then
+	SRC_URI=""
+elif [[ ${PV} == *_pre* ]]; then
+	SRC_URI="https://github.com/0ad/0ad/archive/${ZEROAD_GIT_REVISION}.tar.gz -> ${P}.tar.gz"
+else
+	SRC_URI="http://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz"
+fi
+
+LICENSE="CC-BY-SA-3.0 GPL-2 LGPL-2.1 MIT ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="editor +lobby nvtt pch test"
+RESTRICT="test"
+
+BDEPEND="virtual/pkgconfig
+	test? ( dev-lang/perl )"
+DEPEND="
+	>=dev-lang/spidermonkey-78.6:78
+	dev-libs/boost:=
+	dev-libs/icu:=
+	dev-libs/libfmt:0=
+	dev-libs/libsodium
+	dev-libs/libxml2
+	media-libs/libpng:0
+	media-libs/libsdl2[X,opengl,video]
+	media-libs/libvorbis
+	media-libs/openal
+	net-libs/enet:1.3
+	net-libs/miniupnpc:=
+	net-misc/curl
+	sys-libs/zlib
+	virtual/opengl
+	x11-libs/libX11
+	editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
+	lobby? ( >=net-libs/gloox-1.0.20 )
+	nvtt? ( media-gfx/nvidia-texture-tools )"
+RDEPEND="${DEPEND}"
+PDEPEND="~games-strategy/0ad-data-${PV}"
+
+if [[ ${PV} == 9999 ]]; then
+	S="${WORKDIR}/${P}"
+elif [[ ${PV} == *_pre* ]]; then
+	S="${WORKDIR}/${PN}-${ZEROAD_GIT_REVISION}"
+else
+	S="${WORKDIR}/${MY_P}"
+fi
+
+PATCHES=(
+	"${FILESDIR}/${PN}-0.0.24_alpha_pre20210116040036-build.patch"
+)
+
+pkg_setup() {
+	use editor && setup-wxwidgets
+}
+
+src_prepare() {
+	default
+
+	# Delete check for minor version of dev-lang/spidermonkey.
+	sed -e "/^#if MOZJS_MINOR_VERSION != [[:digit:]]\+$/,/^#endif$/d" -i source/scriptinterface/ScriptTypes.h || die
+}
+
+src_configure() {
+	local myconf=(
+		--with-system-mozjs
+		--with-system-nvtt
+		--minimal-flags
+		$(usex nvtt "" "--without-nvtt")
+		$(usex pch "" "--without-pch")
+		$(usex test "" "--without-tests")
+		$(usex editor "--atlas" "")
+		$(usex lobby "" "--without-lobby")
+		--bindir="/usr/bin"
+		--libdir="/usr/$(get_libdir)"/${PN}
+		--datadir="/usr/share/${PN}"
+		)
+
+	# stock premake5 does not work, use the shipped one
+	emake -C "${S}"/build/premake/premake5/build/gmake2.unix
+
+	# regenerate scripts.c so our patch applies
+	cd "${S}"/build/premake/premake5 || die
+	"${S}"/build/premake/premake5/bin/release/premake5 embed || die
+
+	# rebuild premake again... this is the most stupid build system
+	emake -C "${S}"/build/premake/premake5/build/gmake2.unix clean
+	emake -C "${S}"/build/premake/premake5/build/gmake2.unix
+
+	# run premake to create build scripts
+	cd "${S}"/build/premake || die
+	"${S}"/build/premake/premake5/bin/release/premake5 \
+		--file="premake5.lua" \
+		--outpath="../workspaces/gcc/" \
+		--os=linux \
+		"${myconf[@]}" \
+		gmake2 || die "Premake failed"
+}
+
+src_compile() {
+	tc-export AR
+
+	# build 3rd party fcollada
+	emake -C libraries/source/fcollada/src
+
+	# build 0ad
+	emake -C build/workspaces/gcc verbose=1
+}
+
+src_test() {
+	cd binaries/system || die
+	./test -libdir "${S}/binaries/system" || die "test phase failed"
+}
+
+src_install() {
+	newbin binaries/system/pyrogenesis 0ad
+	use editor && newbin binaries/system/ActorEditor 0ad-ActorEditor
+
+	insinto /usr/share/${PN}
+	doins -r binaries/data/l10n
+
+	exeinto /usr/$(get_libdir)/${PN}
+	doexe binaries/system/libCollada.so
+	use editor && doexe binaries/system/libAtlasUI.so
+
+	dodoc binaries/system/readme.txt
+	doicon -s 128 build/resources/${PN}.png
+	make_desktop_entry ${PN}
+}
+
+pkg_postinst() {
+	xdg_icon_cache_update
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+}

diff --git a/games-strategy/0ad/Manifest b/games-strategy/0ad/Manifest
index 2edf2ff884b..de55f565987 100644
--- a/games-strategy/0ad/Manifest
+++ b/games-strategy/0ad/Manifest
@@ -1,2 +1,3 @@
 DIST 0ad-0.0.23-alpha-unix-build.tar.xz 31907988 BLAKE2B 567b9e1b5cd653206194e042f4f0859cd4f9afe75d52d3f480a328b76fdcdd746254502fbf284f790b4932c912ff31453bbc8c986c879ad76baa3d2a5db802c9 SHA512 4a1c86b19e0d8ec7d9b8bf75428df0255f95e7f991f419734f9b6ddc288a537405a34c5d7081f1a97475155c49013af85dee5c0265c35c7dbc003b46637a03d7
 DIST 0ad-0.0.23b-alpha-unix-build.tar.xz 31922812 BLAKE2B db7d6bf1a2bb084870b914cf974bfdb19812ff6f9391e5bc5213ae215fc670b77bd4508a5432aa3e47bf327bd37d4bb14961ab3332b165b53327c3f01a935ac1 SHA512 82934313c46c4fd89e3841d5bbf901904abbd2108e9749529d7282bd24ac53b9e6878681c06e6019f4d8ec0e425c28300b0aafc9610a66a331777ffb58ed6135
+DIST 0ad-0.0.24_alpha_pre20210116040036.tar.gz 2562395684 BLAKE2B 03d6655f7aa1f2f91a87536a7f2afa465585856c4209ddc05e666e1e5596416883596331118ac4257ff314b04d8a5c08821eaa6ae76e5d3095146ab04f8c79ed SHA512 e1239a56b184a87708c87fc03ca41190a16d813e495c5d81ee073df98761f1524a23902e5d03a21a1b1f657b496fce6eeee4a5ef22eee30f70fbe3b0dbd44510

diff --git a/games-strategy/0ad/files/0ad-0.0.24_alpha_pre20210116040036-build.patch b/games-strategy/0ad/files/0ad-0.0.24_alpha_pre20210116040036-build.patch
new file mode 100644
index 00000000000..1e643adb41a
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.24_alpha_pre20210116040036-build.patch
@@ -0,0 +1,105 @@
+--- /build/premake/premake5/build/gmake2.bsd/Premake5.make
++++ /build/premake/premake5/build/gmake2.bsd/Premake5.make
+@@ -36,19 +36,19 @@
+ TARGET = $(TARGETDIR)/premake5
+ OBJDIR = obj/Release/Premake5
+ DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+-ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra
+-ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -fno-stack-protector
++ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
++ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -fno-stack-protector
+ LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a -lm
+ LDDEPS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a
+-ALL_LDFLAGS += $(LDFLAGS) -s -rdynamic
++ALL_LDFLAGS += $(LDFLAGS) -rdynamic
+ 
+ else ifeq ($(config),debug)
+ TARGETDIR = ../../bin/debug
+ TARGET = $(TARGETDIR)/premake5
+ OBJDIR = obj/Debug/Premake5
+ DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+-ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
+-ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
++ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
++ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
+ LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a -lm
+ LDDEPS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a
+ ALL_LDFLAGS += $(LDFLAGS) -rdynamic
+--- /build/premake/premake5/build/gmake2.macosx/Premake5.make
++++ /build/premake/premake5/build/gmake2.macosx/Premake5.make
+@@ -45,8 +45,8 @@
+ TARGET = $(TARGETDIR)/premake5
+ OBJDIR = obj/Release/Premake5
+ DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_MACOSX
+-ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra
+-ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -fno-stack-protector
++ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
++ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -fno-stack-protector
+ LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a -framework CoreServices -framework Foundation -framework Security -lreadline
+ LDDEPS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a
+ 
+@@ -55,8 +55,8 @@
+ TARGET = $(TARGETDIR)/premake5
+ OBJDIR = obj/Debug/Premake5
+ DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_MACOSX
+-ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
+-ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
++ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
++ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
+ LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a -framework CoreServices -framework Foundation -framework Security -lreadline
+ LDDEPS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a
+ 
+--- /build/premake/premake5/build/gmake2.unix/Premake5.make
++++ /build/premake/premake5/build/gmake2.unix/Premake5.make
+@@ -36,19 +36,19 @@
+ TARGET = $(TARGETDIR)/premake5
+ OBJDIR = obj/Release/Premake5
+ DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+-ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra
+-ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -fno-stack-protector
++ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
++ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -fno-stack-protector
+ LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a -lm -ldl -lrt
+ LDDEPS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a
+-ALL_LDFLAGS += $(LDFLAGS) -s -rdynamic
++ALL_LDFLAGS += $(LDFLAGS) -rdynamic
+ 
+ else ifeq ($(config),debug)
+ TARGETDIR = ../../bin/debug
+ TARGET = $(TARGETDIR)/premake5
+ OBJDIR = obj/Debug/Premake5
+ DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+-ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
+-ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
++ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
++ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
+ LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a -lm -ldl -lrt
+ LDDEPS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a
+ ALL_LDFLAGS += $(LDFLAGS) -rdynamic
+--- /build/premake/premake5/src/tools/gcc.lua
++++ /build/premake/premake5/src/tools/gcc.lua
+@@ -346,8 +346,7 @@
+ --
+ 
+ 	function gcc.ldsymbols(cfg)
+-		-- OS X has a bug, see http://lists.apple.com/archives/Darwin-dev/2006/Sep/msg00084.html
+-		return iif(table.contains(os.getSystemTags(cfg.system), "darwin"), "-Wl,-x", "-s")
++		return ""
+ 	end
+ 
+ 	gcc.ldflags = {
+--- /libraries/source/fcollada/src/Makefile
++++ /libraries/source/fcollada/src/Makefile
+@@ -9,9 +9,9 @@
+ 
+ CXX ?= g++
+ CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
+-CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
+-CXXFLAGS_RELEASE := -O2 -DNDEBUG -DRETAIL
+-CXXFLAGS_TEST := -O0 -g -D_DEBUG
++CXXFLAGS_DEBUG := -D_DEBUG -DRETAIL
++CXXFLAGS_RELEASE := -DNDEBUG -DRETAIL
++CXXFLAGS_TEST := -D_DEBUG
+ LDFLAGS_TEST= -ldl
+ LIBS += `pkg-config libxml-2.0 --libs`
+ INCLUDES += -IFCollada `pkg-config libxml-2.0 --cflags`


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/
@ 2021-06-17 23:24 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2021-06-17 23:24 UTC (permalink / raw
  To: gentoo-commits

commit:     dbb3bdf4645d0f83d7112620f07500af44e86962
Author:     Nils Freydank <holgersson <AT> posteo <DOT> de>
AuthorDate: Thu Jun 17 20:11:50 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 17 23:23:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbb3bdf4

games-strategy/0ad: Fix stopping the binary with USE="-nvtt"

Closes: https://bugs.gentoo.org/779757
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Nils Freydank <holgersson <AT> posteo.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-strategy/0ad/0ad-0.0.24b_alpha-r1.ebuild     | 229 +++++++++++++++++++++
 ...0.24b_alpha-fix-hang-on-quit-without-nvtt.patch |  98 +++++++++
 2 files changed, 327 insertions(+)

diff --git a/games-strategy/0ad/0ad-0.0.24b_alpha-r1.ebuild b/games-strategy/0ad/0ad-0.0.24b_alpha-r1.ebuild
new file mode 100644
index 00000000000..94bf17e4928
--- /dev/null
+++ b/games-strategy/0ad/0ad-0.0.24b_alpha-r1.ebuild
@@ -0,0 +1,229 @@
+# Copyright 2014-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER="3.0-gtk3"
+PYTHON_COMPAT=( python3_{7..9} )
+inherit desktop toolchain-funcs multiprocessing python-any-r1 wxwidgets xdg
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+
+	EGIT_REPO_URI="https://github.com/0ad/0ad"
+elif [[ ${PV} == *_pre* ]]; then
+	ZEROAD_GIT_REVISION="c7d07d3979f969b969211a5e5748fa775f6768a7"
+else
+	MY_P="0ad-${PV/_/-}"
+fi
+
+DESCRIPTION="A free, real-time strategy game"
+HOMEPAGE="https://play0ad.com/"
+
+if [[ ${PV} == 9999 ]]; then
+	S="${WORKDIR}/${P}"
+elif [[ ${PV} == *_pre* ]]; then
+	SRC_URI="https://github.com/0ad/0ad/archive/${ZEROAD_GIT_REVISION}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/${PN}-${ZEROAD_GIT_REVISION}"
+else
+	SRC_URI="http://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz"
+	SRC_URI+=" https://releases.wildfiregames.com/${MY_P}-unix-data.tar.xz"
+	S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="CC-BY-SA-3.0 GPL-2 LGPL-2.1 MIT ZLIB BitstreamVera LPPL-1.3c"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="editor +lobby nvtt pch test"
+RESTRICT="test"
+
+# virtual/rust is for bundled SpiderMonkey
+# Build-time Python dependency is for SM too
+# TODO: Unbundle premake5
+# See bug #773472 which may help (bump for it)
+BDEPEND="
+	${PYTHON_DEPS}
+	virtual/pkgconfig
+	virtual/rust
+	test? ( dev-lang/perl )
+"
+# Removed dependency on nvtt as we use the bundled one
+# bug #768930
+DEPEND="
+	dev-libs/boost:=
+	dev-libs/icu:=
+	dev-libs/libfmt:0=
+	dev-libs/libsodium
+	dev-libs/libxml2
+	media-libs/libpng:0
+	media-libs/libsdl2[X,opengl,video]
+	media-libs/libvorbis
+	media-libs/openal
+	net-libs/enet:1.3
+	net-libs/miniupnpc:=
+	net-misc/curl
+	sys-libs/zlib
+	virtual/opengl
+	x11-libs/libX11
+	editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
+	lobby? ( >=net-libs/gloox-1.0.20 )
+"
+RDEPEND="
+	${DEPEND}
+	!games-strategy/0ad-data
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.0.24_alpha_pre20210116040036-build.patch
+	"${FILESDIR}"/${PN}-0.0.24b_alpha-rust-1.50.patch
+	"${FILESDIR}"/${PN}-0.0.24b_alpha-respect-tc.patch
+	"${FILESDIR}"/${PN}-0.0.24b_alpha-fix-hang-on-quit-without-nvtt.patch
+)
+
+pkg_setup() {
+	use editor && setup-wxwidgets
+}
+
+src_prepare() {
+	default
+
+	# SpiderMonkey's configure no longer recognises --build for
+	# the build tuple
+	sed -i -e "/--build/d" libraries/source/spidermonkey/build.sh || die
+
+	# Originally from 0ad-data
+	rm binaries/data/tools/fontbuilder/fonts/*.txt || die
+}
+
+src_configure() {
+	local myconf=(
+		--minimal-flags
+		$(usex nvtt "" "--without-nvtt")
+		$(usex pch "" "--without-pch")
+		$(usex test "" "--without-tests")
+		$(usex editor "--atlas" "")
+		$(usex lobby "" "--without-lobby")
+		--bindir="/usr/bin"
+		--libdir="/usr/$(get_libdir)"/${PN}
+		--datadir="/usr/share/${PN}"
+	)
+
+	tc-export AR CC CXX RANLIB
+
+	# Stock premake5 does not work, use the shipped one
+	# TODO: revisit this, see above BDEPEND note re premake5
+	emake -C "${S}"/build/premake/premake5/build/gmake2.unix
+
+	# Regenerate scripts.c so our patch applies
+	cd "${S}"/build/premake/premake5 || die
+	"${S}"/build/premake/premake5/bin/release/premake5 embed || die
+
+	# Rebuild premake again
+	emake -C "${S}"/build/premake/premake5/build/gmake2.unix clean
+	emake -C "${S}"/build/premake/premake5/build/gmake2.unix
+
+	# Run premake to create build scripts
+	cd "${S}"/build/premake || die
+	"${S}"/build/premake/premake5/bin/release/premake5 \
+		--file="premake5.lua" \
+		--outpath="../workspaces/gcc/" \
+		--os=linux \
+		"${myconf[@]}" \
+		gmake2 \
+	|| die "Premake failed"
+}
+
+src_compile() {
+	# Build 3rd party fcollada
+	einfo "Building bundled fcollada"
+	emake -C libraries/source/fcollada/src
+
+	# Build bundled NVTT
+	# nvtt is abandoned upstream and 0ad have forked it and added fixes.
+	# Use their copy. bug #768930
+	if use nvtt ; then
+		cd libraries/source/nvtt || die
+		elog "Building bundled NVTT (bug #768930)"
+		JOBS="-j$(makeopts_jobs)" ./build.sh || die "Failed to build bundled NVTT"
+		cd "${S}" || die
+	fi
+
+	# Build bundled SpiderMonkey
+	# We really can't use the system SpiderMonkey right now.
+	# Breakages occur even on minor bumps in upstream SM,
+	# e.g. bug #768840.
+	cd libraries/source/spidermonkey || die
+	elog "Building bundled SpiderMonkey (bug #768840)"
+	XARGS="${EPREFIX}/usr/bin/xargs" \
+		JOBS="-j$(makeopts_jobs)" \
+		./build.sh \
+	|| die "Failed to build bundled SpiderMonkey"
+
+	cd "${S}" || die
+
+	# Build 0ad itself!
+	elog "Building 0ad"
+	JOBS="-j$(makeopts_jobs)" emake -C build/workspaces/gcc verbose=1
+
+	# Build assets
+	# (We only do this if we're using a snapshot/non-release)
+	# See bug #771147 (comment 3) and the old 0ad-data ebuild
+	# Warning: fragile!
+	if [[ ${PV} == 9999 || ${PV} == *_pre* ]]; then
+		# source/lib/sysdep/os/linux/ldbg.cpp:debug_SetThreadName() tries to open /proc/self/task/${TID}/comm for writing.
+		addpredict /proc/self/task
+
+		# Based on source/tools/dist/build-archives.sh used by source/tools/dist/build.sh.
+		local archivebuild_input archivebuild_output mod_name
+		for archivebuild_input in binaries/data/mods/[A-Za-z0-9]*; do
+			mod_name="${archivebuild_input##*/}"
+			archivebuild_output="archives/${mod_name}"
+
+			mkdir -p "${archivebuild_output}" || die
+
+			einfo pyrogenesis -archivebuild="${archivebuild_input}" -archivebuild-output="${archivebuild_output}/${mod_name}.zip"
+			LD_LIBRARY_PATH="binaries/system" binaries/system/pyrogenesis \
+				-archivebuild="${archivebuild_input}" \
+				-archivebuild-output="${archivebuild_output}/${mod_name}.zip" \
+			|| die "Failed to build assets"
+
+			if [[ -f "${archivebuild_input}/mod.json" ]]; then
+				cp "${archivebuild_input}/mod.json" "${archivebuild_output}" || die
+			fi
+
+			rm -r "${archivebuild_input}" || die
+			mv "${archivebuild_output}" "${archivebuild_input}" || die
+		done
+
+		# Based on source/tools/dist/build-unix-win32.sh used by source/tools/dist/build.sh.
+		rm binaries/data/config/dev.cfg || die
+		rm -r binaries/data/mods/_test.* || die
+	fi
+}
+
+src_test() {
+	cd binaries/system || die
+	./test -libdir "${S}/binaries/system" || die "Failed tests"
+}
+
+src_install() {
+	newbin binaries/system/pyrogenesis 0ad
+	use editor && newbin binaries/system/ActorEditor 0ad-ActorEditor
+
+	# Merged from 0ad-data
+	# bug #771147 (comment 3)
+	insinto /usr/share/${PN}
+	doins -r binaries/data/{l10n,config,mods,tools}
+
+	# Install bundled SpiderMonkey and nvtt
+	# bug #771147 (comment 1)
+	exeinto /usr/$(get_libdir)/${PN}
+	doexe binaries/system/{libCollada,libmozjs78-ps-release}.so
+
+	use nvtt && doexe binaries/system/{libnvtt,libnvcore,libnvimage,libnvmath}.so
+	use editor && doexe binaries/system/libAtlasUI.so
+
+	dodoc binaries/system/readme.txt
+	doicon -s 128 build/resources/${PN}.png
+	make_desktop_entry ${PN}
+}

diff --git a/games-strategy/0ad/files/0ad-0.0.24b_alpha-fix-hang-on-quit-without-nvtt.patch b/games-strategy/0ad/files/0ad-0.0.24b_alpha-fix-hang-on-quit-without-nvtt.patch
new file mode 100644
index 00000000000..fe054eccac5
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.24b_alpha-fix-hang-on-quit-without-nvtt.patch
@@ -0,0 +1,98 @@
+# Nils Freydank <holgersson@posteo.de> (2021-06-17)
+Apply the patch from upstream with minor adoption.
+
+Gentoo bug: https://bugs.gentoo.org/779757
+Upstream Bug: https://trac.wildfiregames.com/ticket/6107
+Upstream Patch: https://trac.wildfiregames.com/changeset/25766
+
+--- a/source/graphics/TextureConverter.cpp	(revision 25765)
++++ b/source/graphics/TextureConverter.cpp	(revision 25766)
+@@ -294,9 +294,8 @@
+ 	m_VFS(vfs), m_HighQuality(highQuality), m_Shutdown(false)
+ {
++#if CONFIG2_NVTT
+ 	// Verify that we are running with at least the version we were compiled with,
+ 	// to avoid bugs caused by ABI changes
+-#if CONFIG2_NVTT
+ 	ENSURE(nvtt::version() >= NVTT_VERSION);
+-#endif
+ 
+ 	m_WorkerThread = std::thread(Threading::HandleExceptions<RunThread>::Wrapper, this);
+@@ -304,8 +303,10 @@
+ 	// Maybe we should share some centralised pool of worker threads?
+ 	// For now we'll just stick with a single thread for this specific use.
++#endif // CONFIG2_NVTT
+ }
+ 
+ CTextureConverter::~CTextureConverter()
+ {
++#if CONFIG2_NVTT
+ 	// Tell the thread to shut down
+ 	{
+@@ -327,4 +328,5 @@
+ 	// Wait for it to shut down cleanly
+ 	m_WorkerThread.join();
++#endif // CONFIG2_NVTT
+ }
+ 
+@@ -477,8 +479,8 @@
+ 	return true;
+ 
+-#else
++#else // CONFIG2_NVTT
+ 	LOGERROR("Failed to convert texture \"%s\" (NVTT not available)", src.string8());
+ 	return false;
+-#endif
++#endif // !CONFIG2_NVTT
+ }
+ 
+@@ -529,22 +531,24 @@
+ 	return true;
+ 
+-#else // #if CONFIG2_NVTT
++#else // CONFIG2_NVTT
+ 	return false;
+-#endif
++#endif // !CONFIG2_NVTT
+ }
+ 
+ bool CTextureConverter::IsBusy()
+ {
++#if CONFIG2_NVTT
+ 	std::lock_guard<std::mutex> lock(m_WorkerMutex);
+ 	return !m_RequestQueue.empty();
++#else // CONFIG2_NVTT
++	return false;
++#endif // !CONFIG2_NVTT
+ }
+ 
+ void CTextureConverter::RunThread(CTextureConverter* textureConverter)
+ {
++#if CONFIG2_NVTT
+ 	debug_SetThreadName("TextureConverter");
+ 	g_Profiler2.RegisterCurrentThread("texconv");
+-
+-#if CONFIG2_NVTT
+-
+ 	// Wait until the main thread wakes us up
+ 	while (true)
+@@ -596,4 +600,4 @@
+ 	std::lock_guard<std::mutex> wait_lock(textureConverter->m_WorkerMutex);
+ 	textureConverter->m_Shutdown = false;
+-#endif
+-}
++#endif // CONFIG2_NVTT
++}
+
+--- a/source/graphics/TextureConverter.h	(revision 25765)
++++ b/source/graphics/TextureConverter.h	(revision 25766)
+@@ -208,7 +208,9 @@
+ 	bool m_HighQuality;
+ 
++#if CONFIG2_NVTT
+ 	std::thread m_WorkerThread;
+ 	std::mutex m_WorkerMutex;
+ 	std::condition_variable m_WorkerCV;
++#endif // CONFIG2_NVTT
+ 
+ 	struct ConversionRequest;


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/
@ 2022-02-07  4:31 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-02-07  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     c5948582c8e35c33b8d6793d6e2c83949b152586
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  7 04:30:43 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb  7 04:30:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5948582

games-strategy/0ad: fix build with newer setuptools

Closes: https://bugs.gentoo.org/826762
Thanks-to: Stephen Cavilia <sac <AT> atomicradi.us>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-strategy/0ad/0ad-0.0.25b_alpha.ebuild        |   3 +-
 .../files/0ad-0.0.25b_alpha-fix-setuptools.patch   | 188 +++++++++++++++++++++
 2 files changed, 190 insertions(+), 1 deletion(-)

diff --git a/games-strategy/0ad/0ad-0.0.25b_alpha.ebuild b/games-strategy/0ad/0ad-0.0.25b_alpha.ebuild
index e01f6242d2cd..d7b282a68f35 100644
--- a/games-strategy/0ad/0ad-0.0.25b_alpha.ebuild
+++ b/games-strategy/0ad/0ad-0.0.25b_alpha.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2014-2021 Gentoo Authors
+# Copyright 2014-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -90,6 +90,7 @@ RDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.0.24b_alpha-respect-tc.patch
+	"${FILESDIR}"/${PN}-0.0.25b_alpha-fix-setuptools.patch
 )
 
 pkg_setup() {

diff --git a/games-strategy/0ad/files/0ad-0.0.25b_alpha-fix-setuptools.patch b/games-strategy/0ad/files/0ad-0.0.25b_alpha-fix-setuptools.patch
new file mode 100644
index 000000000000..ea0626fadadd
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.25b_alpha-fix-setuptools.patch
@@ -0,0 +1,188 @@
+https://bugs.gentoo.org/826762
+https://bugzilla.mozilla.org/show_bug.cgi?id=1665675
+https://phabricator.services.mozilla.com/D90627
+--- a/libraries/source/spidermonkey/patch.sh
++++ b/libraries/source/spidermonkey/patch.sh
+@@ -51,5 +51,7 @@ then
+     # https://svnweb.freebsd.org/ports/head/lang/spidermonkey78/files/patch-third__party_rust_cc_.cargo-checksum.json?view=log
+     patch -p1 < ../FixFreeBSDCargoChecksum.diff
+     # https://svnweb.freebsd.org/ports/head/lang/spidermonkey78/files/patch-third__party_rust_cc_src_lib.rs?view=log
+     patch -p1 < ../FixFreeBSDRustThirdPartyOSDetection.diff
+ fi
++
++patch -p1 < ../FixSysconfigImport.diff
+--- a/libraries/source/spidermonkey/FixSysconfigImport.diff
++++ b/libraries/source/spidermonkey/FixSysconfigImport.diff
+@@ -0,0 +1,171 @@
++diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
++--- a/python/mozbuild/mozbuild/configure/__init__.py
+++++ b/python/mozbuild/mozbuild/configure/__init__.py
++@@ -877,17 +877,56 @@
++ 
++     def _apply_imports(self, func, glob):
++         for _from, _import, _as in self._imports.pop(func, ()):
++-            _from = '%s.' % _from if _from else ''
++-            if _as:
++-                glob[_as] = self._get_one_import('%s%s' % (_from, _import))
+++            self._get_one_import(_from, _import, _as, glob)
+++
+++    def _handle_wrapped_import(self, _from, _import, _as, glob):
+++        """Given the name of a module, "import" a mocked package into the glob
+++        iff the module is one that we wrap (either for the sandbox or for the
+++        purpose of testing). Applies if the wrapped module is exposed by an
+++        attribute of `self`.
+++
+++        For example, if the import statement is `from os import environ`, then
+++        this function will set
+++        glob['environ'] = self._wrapped_os.environ.
+++
+++        Iff this function handles the given import, return True.
+++        """
+++        module = (_from or _import).split('.')[0]
+++        attr = '_wrapped_' + module
+++        wrapped = getattr(self, attr, None)
+++        if wrapped:
+++            if _as or _from:
+++                obj = self._recursively_get_property(
+++                    module, (_from + '.' if _from else '') + _import, wrapped)
+++                glob[_as or _import] = obj
++             else:
++-                what = _import.split('.')[0]
++-                glob[what] = self._get_one_import('%s%s' % (_from, what))
+++                glob[module] = wrapped
+++            return True
+++        else:
+++            return False
+++
+++    def _recursively_get_property(self, module, what, wrapped):
+++        """Traverse the wrapper object `wrapped` (which represents the module
+++        `module`) and return the property represented by `what`, which may be a
+++        series of nested attributes.
+++
+++        For example, if `module` is 'os' and `what` is 'os.path.join',
+++        return `wrapped.path.join`.
+++        """
+++        if what == module:
+++            return wrapped
+++        assert what.startswith(module + '.')
+++        attrs = what[len(module + '.'):].split('.')
+++        for attr in attrs:
+++            wrapped = getattr(wrapped, attr)
+++        return wrapped
++ 
++     @memoized_property
++     def _wrapped_os(self):
++         wrapped_os = {}
++         exec_('from os import *', {}, wrapped_os)
+++        # Special case os and os.environ so that os.environ is our copy of
+++        # the environment.
++         wrapped_os['environ'] = self._environ
++         return ReadOnlyNamespace(**wrapped_os)
++ 
++@@ -913,57 +952,62 @@
++ 
++         return ReadOnlyNamespace(**wrapped_subprocess)
++ 
++-    def _get_one_import(self, what):
++-        # The special `__sandbox__` module gives access to the sandbox
++-        # instance.
++-        if what == '__sandbox__':
++-            return self
+++    @memoized_property
+++    def _wrapped_six(self):
+++        if six.PY3:
+++            return six
+++        wrapped_six = {}
+++        exec_('from six import *', {}, wrapped_six)
+++        wrapped_six_moves = {}
+++        exec_('from six.moves import *', {}, wrapped_six_moves)
+++        wrapped_six_moves_builtins = {}
+++        exec_('from six.moves.builtins import *', {},
+++              wrapped_six_moves_builtins)
+++
++         # Special case for the open() builtin, because otherwise, using it
++         # fails with "IOError: file() constructor not accessible in
++         # restricted mode". We also make open() look more like python 3's,
++         # decoding to unicode strings unless the mode says otherwise.
++-        if what == '__builtin__.open' or what == 'builtins.open':
++-            if six.PY3:
++-                return open
+++        def wrapped_open(name, mode=None, buffering=None):
+++            args = (name,)
+++            kwargs = {}
+++            if buffering is not None:
+++                kwargs['buffering'] = buffering
+++            if mode is not None:
+++                args += (mode,)
+++                if 'b' in mode:
+++                    return open(*args, **kwargs)
+++            kwargs['encoding'] = system_encoding
+++            return codecs.open(*args, **kwargs)
+++
+++        wrapped_six_moves_builtins['open'] = wrapped_open
+++        wrapped_six_moves['builtins'] = ReadOnlyNamespace(
+++            **wrapped_six_moves_builtins)
+++        wrapped_six['moves'] = ReadOnlyNamespace(**wrapped_six_moves)
++ 
++-            def wrapped_open(name, mode=None, buffering=None):
++-                args = (name,)
++-                kwargs = {}
++-                if buffering is not None:
++-                    kwargs['buffering'] = buffering
++-                if mode is not None:
++-                    args += (mode,)
++-                    if 'b' in mode:
++-                        return open(*args, **kwargs)
++-                kwargs['encoding'] = system_encoding
++-                return codecs.open(*args, **kwargs)
++-            return wrapped_open
++-        # Special case os and os.environ so that os.environ is our copy of
++-        # the environment.
++-        if what == 'os.environ':
++-            return self._environ
++-        if what == 'os':
++-            return self._wrapped_os
++-        # And subprocess, so that its functions use our os.environ
++-        if what == 'subprocess':
++-            return self._wrapped_subprocess
++-        if what in ('subprocess.call', 'subprocess.check_call',
++-                    'subprocess.check_output', 'subprocess.Popen'):
++-            return getattr(self._wrapped_subprocess, what[len('subprocess.'):])
+++        return ReadOnlyNamespace(**wrapped_six)
+++
+++    def _get_one_import(self, _from, _import, _as, glob):
+++        """Perform the given import, placing the result into the dict glob."""
+++        if not _from and _import == '__builtin__':
+++            glob[_as or '__builtin__'] = __builtin__
+++            return
+++        if _from == '__builtin__':
+++            _from = 'six.moves.builtins'
+++        # The special `__sandbox__` module gives access to the sandbox
+++        # instance.
+++        if not _from and _import == '__sandbox__':
+++            glob[_as or _import] = self
+++            return
+++        if self._handle_wrapped_import(_from, _import, _as, glob):
+++            return
+++        # If we've gotten this far, we should just do a normal import.
++         # Until this proves to be a performance problem, just construct an
++         # import statement and execute it.
++-        import_line = ''
++-        if '.' in what:
++-            _from, what = what.rsplit('.', 1)
++-            if _from == '__builtin__' or _from.startswith('__builtin__.'):
++-                _from = _from.replace('__builtin__', 'six.moves.builtins')
++-            import_line += 'from %s ' % _from
++-        if what == '__builtin__':
++-            what = 'six.moves.builtins'
++-        import_line += 'import %s as imported' % what
++-        glob = {}
+++        import_line = '%simport %s%s' % (
+++            ('from %s ' % _from) if _from else '', _import,
+++            (' as %s' % _as) if _as else '')
++         exec_(import_line, {}, glob)
++-        return glob['imported']
++ 
++     def _resolve_and_set(self, data, name, value, when=None):
++         # Don't set anything when --help was on the command line
+


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/
@ 2022-02-07  4:31 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-02-07  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     763d3498173d92e9de312fafcf0a5335adf2dd46
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  7 04:21:41 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb  7 04:21:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=763d3498

games-strategy/0ad: drop 0.0.24b_alpha-r1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-strategy/0ad/0ad-0.0.24b_alpha-r1.ebuild     | 231 ---------------------
 games-strategy/0ad/Manifest                        |   2 -
 .../0ad-0.0.24_alpha_pre20210116040036-build.patch | 105 ----------
 ...0.24b_alpha-fix-hang-on-quit-without-nvtt.patch |  98 ---------
 .../0ad/files/0ad-0.0.24b_alpha-rust-1.50.patch    |  82 --------
 5 files changed, 518 deletions(-)

diff --git a/games-strategy/0ad/0ad-0.0.24b_alpha-r1.ebuild b/games-strategy/0ad/0ad-0.0.24b_alpha-r1.ebuild
deleted file mode 100644
index 6307e21c5b2a..000000000000
--- a/games-strategy/0ad/0ad-0.0.24b_alpha-r1.ebuild
+++ /dev/null
@@ -1,231 +0,0 @@
-# Copyright 2014-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-WX_GTK_VER="3.0-gtk3"
-PYTHON_COMPAT=( python3_{7..9} )
-inherit desktop toolchain-funcs multiprocessing python-any-r1 wxwidgets xdg
-
-if [[ ${PV} == 9999 ]]; then
-	inherit git-r3
-
-	EGIT_REPO_URI="https://github.com/0ad/0ad"
-elif [[ ${PV} == *_pre* ]]; then
-	ZEROAD_GIT_REVISION="c7d07d3979f969b969211a5e5748fa775f6768a7"
-else
-	MY_P="0ad-${PV/_/-}"
-fi
-
-DESCRIPTION="A free, real-time strategy game"
-HOMEPAGE="https://play0ad.com/"
-
-if [[ ${PV} == 9999 ]]; then
-	S="${WORKDIR}/${P}"
-elif [[ ${PV} == *_pre* ]]; then
-	SRC_URI="https://github.com/0ad/0ad/archive/${ZEROAD_GIT_REVISION}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/${PN}-${ZEROAD_GIT_REVISION}"
-else
-	SRC_URI="http://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz"
-	SRC_URI+=" https://releases.wildfiregames.com/${MY_P}-unix-data.tar.xz"
-	S="${WORKDIR}/${MY_P}"
-fi
-
-LICENSE="CC-BY-SA-3.0 GPL-2 LGPL-2.1 MIT ZLIB BitstreamVera LPPL-1.3c"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="editor +lobby nvtt pch test"
-RESTRICT="test"
-
-# virtual/rust is for bundled SpiderMonkey
-# Build-time Python dependency is for SM too
-# TODO: Unbundle premake5
-# See bug #773472 which may help (bump for it)
-BDEPEND="
-	${PYTHON_DEPS}
-	virtual/pkgconfig
-	virtual/rust
-	test? ( dev-lang/perl )
-"
-# Removed dependency on nvtt as we use the bundled one
-# bug #768930
-DEPEND="
-	dev-libs/boost:=
-	dev-libs/icu:=
-	dev-libs/libfmt:0=
-	dev-libs/libsodium
-	dev-libs/libxml2
-	media-libs/libpng:0
-	media-libs/libsdl2[X,opengl,video]
-	media-libs/libvorbis
-	media-libs/openal
-	net-libs/enet:1.3
-	net-libs/miniupnpc:=
-	net-misc/curl
-	sys-libs/zlib
-	virtual/opengl
-	x11-libs/libX11
-	editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
-	lobby? ( >=net-libs/gloox-1.0.20 )
-"
-RDEPEND="
-	${DEPEND}
-	!games-strategy/0ad-data
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-0.0.24_alpha_pre20210116040036-build.patch
-	"${FILESDIR}"/${PN}-0.0.24b_alpha-rust-1.50.patch
-	"${FILESDIR}"/${PN}-0.0.24b_alpha-respect-tc.patch
-	"${FILESDIR}"/${PN}-0.0.24b_alpha-fix-hang-on-quit-without-nvtt.patch
-)
-
-pkg_setup() {
-	use editor && setup-wxwidgets
-
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-
-	# SpiderMonkey's configure no longer recognises --build for
-	# the build tuple
-	sed -i -e "/--build/d" libraries/source/spidermonkey/build.sh || die
-
-	# Originally from 0ad-data
-	rm binaries/data/tools/fontbuilder/fonts/*.txt || die
-}
-
-src_configure() {
-	local myconf=(
-		--minimal-flags
-		$(usex nvtt "" "--without-nvtt")
-		$(usex pch "" "--without-pch")
-		$(usex test "" "--without-tests")
-		$(usex editor "--atlas" "")
-		$(usex lobby "" "--without-lobby")
-		--bindir="/usr/bin"
-		--libdir="/usr/$(get_libdir)"/${PN}
-		--datadir="/usr/share/${PN}"
-	)
-
-	tc-export AR CC CXX RANLIB
-
-	# Stock premake5 does not work, use the shipped one
-	# TODO: revisit this, see above BDEPEND note re premake5
-	emake -C "${S}"/build/premake/premake5/build/gmake2.unix
-
-	# Regenerate scripts.c so our patch applies
-	cd "${S}"/build/premake/premake5 || die
-	"${S}"/build/premake/premake5/bin/release/premake5 embed || die
-
-	# Rebuild premake again
-	emake -C "${S}"/build/premake/premake5/build/gmake2.unix clean
-	emake -C "${S}"/build/premake/premake5/build/gmake2.unix
-
-	# Run premake to create build scripts
-	cd "${S}"/build/premake || die
-	"${S}"/build/premake/premake5/bin/release/premake5 \
-		--file="premake5.lua" \
-		--outpath="../workspaces/gcc/" \
-		--os=linux \
-		"${myconf[@]}" \
-		gmake2 \
-	|| die "Premake failed"
-}
-
-src_compile() {
-	# Build 3rd party fcollada
-	einfo "Building bundled fcollada"
-	emake -C libraries/source/fcollada/src
-
-	# Build bundled NVTT
-	# nvtt is abandoned upstream and 0ad have forked it and added fixes.
-	# Use their copy. bug #768930
-	if use nvtt ; then
-		cd libraries/source/nvtt || die
-		elog "Building bundled NVTT (bug #768930)"
-		JOBS="-j$(makeopts_jobs)" ./build.sh || die "Failed to build bundled NVTT"
-		cd "${S}" || die
-	fi
-
-	# Build bundled SpiderMonkey
-	# We really can't use the system SpiderMonkey right now.
-	# Breakages occur even on minor bumps in upstream SM,
-	# e.g. bug #768840.
-	cd libraries/source/spidermonkey || die
-	elog "Building bundled SpiderMonkey (bug #768840)"
-	XARGS="${EPREFIX}/usr/bin/xargs" \
-		JOBS="-j$(makeopts_jobs)" \
-		./build.sh \
-	|| die "Failed to build bundled SpiderMonkey"
-
-	cd "${S}" || die
-
-	# Build 0ad itself!
-	elog "Building 0ad"
-	JOBS="-j$(makeopts_jobs)" emake -C build/workspaces/gcc verbose=1
-
-	# Build assets
-	# (We only do this if we're using a snapshot/non-release)
-	# See bug #771147 (comment 3) and the old 0ad-data ebuild
-	# Warning: fragile!
-	if [[ ${PV} == 9999 || ${PV} == *_pre* ]]; then
-		# source/lib/sysdep/os/linux/ldbg.cpp:debug_SetThreadName() tries to open /proc/self/task/${TID}/comm for writing.
-		addpredict /proc/self/task
-
-		# Based on source/tools/dist/build-archives.sh used by source/tools/dist/build.sh.
-		local archivebuild_input archivebuild_output mod_name
-		for archivebuild_input in binaries/data/mods/[A-Za-z0-9]*; do
-			mod_name="${archivebuild_input##*/}"
-			archivebuild_output="archives/${mod_name}"
-
-			mkdir -p "${archivebuild_output}" || die
-
-			einfo pyrogenesis -archivebuild="${archivebuild_input}" -archivebuild-output="${archivebuild_output}/${mod_name}.zip"
-			LD_LIBRARY_PATH="binaries/system" binaries/system/pyrogenesis \
-				-archivebuild="${archivebuild_input}" \
-				-archivebuild-output="${archivebuild_output}/${mod_name}.zip" \
-			|| die "Failed to build assets"
-
-			if [[ -f "${archivebuild_input}/mod.json" ]]; then
-				cp "${archivebuild_input}/mod.json" "${archivebuild_output}" || die
-			fi
-
-			rm -r "${archivebuild_input}" || die
-			mv "${archivebuild_output}" "${archivebuild_input}" || die
-		done
-
-		# Based on source/tools/dist/build-unix-win32.sh used by source/tools/dist/build.sh.
-		rm binaries/data/config/dev.cfg || die
-		rm -r binaries/data/mods/_test.* || die
-	fi
-}
-
-src_test() {
-	cd binaries/system || die
-	./test -libdir "${S}/binaries/system" || die "Failed tests"
-}
-
-src_install() {
-	newbin binaries/system/pyrogenesis 0ad
-	use editor && newbin binaries/system/ActorEditor 0ad-ActorEditor
-
-	# Merged from 0ad-data
-	# bug #771147 (comment 3)
-	insinto /usr/share/${PN}
-	doins -r binaries/data/{l10n,config,mods,tools}
-
-	# Install bundled SpiderMonkey and nvtt
-	# bug #771147 (comment 1)
-	exeinto /usr/$(get_libdir)/${PN}
-	doexe binaries/system/{libCollada,libmozjs78-ps-release}.so
-
-	use nvtt && doexe binaries/system/{libnvtt,libnvcore,libnvimage,libnvmath}.so
-	use editor && doexe binaries/system/libAtlasUI.so
-
-	dodoc binaries/system/readme.txt
-	doicon -s 128 build/resources/${PN}.png
-	make_desktop_entry ${PN}
-}

diff --git a/games-strategy/0ad/Manifest b/games-strategy/0ad/Manifest
index 923eae80585e..afaaebc4f848 100644
--- a/games-strategy/0ad/Manifest
+++ b/games-strategy/0ad/Manifest
@@ -1,5 +1,3 @@
-DIST 0ad-0.0.24b-alpha-unix-build.tar.xz 75546740 BLAKE2B a724abba6bed4b580670588e9dcfe0f75f6cef0fbde6ad666356e96213c685932edd0a1daafb5dd04206870c2c8222340c9c51e83076ec2911cbb5377ca00666 SHA512 8173d393eb1bc57c38bef0076ba973ef46c877c06644365189c0887cd3152adba51d26b553e42221fd14343e9830a3a275bfcd9b28f66281e282ea3f247730ea
-DIST 0ad-0.0.24b-alpha-unix-data.tar.xz 828553992 BLAKE2B 2081225d88d475ed0899648994a900677bc3280bb2ba6cf92354ece82b90ddcefddb48458fa23e2de97100e58f4db8db408d4b50d0306a8c3efe47d263064bf0 SHA512 d7804d25ddf376028f230a31c6fc1201dfa366b3d5434569a1a7852bb4c400fb14e5c8934c5d6c6295320cf2e62c64be83b1e3c4c27fd116115bfe7d01106726
 DIST 0ad-0.0.25b-alpha-unix-build.tar.xz 75579956 BLAKE2B 674d69d625137709a186f9273607dc353fc99aea68ef3f2ea5031dbe2f684176910d757c3f03c7fbdac475d30708be448b71f5020d27a65c346bf147223bcb9d SHA512 e8069897b97b381099ab5ec5868d27e96c699105b3307054d1bc7bf9236a537f02625ba9034892d91f3e951b4f95c9ce5fb75ed0a7c14b8a294882482fd9c1b4
 DIST 0ad-0.0.25b-alpha-unix-build.tar.xz.minisig 327 BLAKE2B 547a7a1c8a83167fa40976efb2efaf691fc5434eb1be227b481a70d308381b20dcdc90bb4652e190f8e329fb33cc19ebbaab43977329f8971e49436f7f1ce636 SHA512 9d6a235ea50183e1db16f4bf2dc59af9042a52e4e18ccd0c34c481a7e9021f19e2bc370e594aa97911bb7ca33bcc5ebe23a4b206cd74357060371ca06b6010d2
 DIST 0ad-0.0.25b-alpha-unix-data.tar.xz 1249684600 BLAKE2B d77546ba9d21b512f106645c07fa92ecc343e0a01d9a70a83f2a2b3ade912e72d095982f7d4c4cd64e18fb71a67a01c419763744dd4cad1e8c081e5f77ec17c9 SHA512 d6bbe484acb7fbd507d303f5c75f8a2ccbaf8fe9dd30ff408b082f170bfd96eb9235db1b710c15656ef465b44fa5597679a694515e0c153a35fe24c0915f29f1

diff --git a/games-strategy/0ad/files/0ad-0.0.24_alpha_pre20210116040036-build.patch b/games-strategy/0ad/files/0ad-0.0.24_alpha_pre20210116040036-build.patch
deleted file mode 100644
index 1e643adb41a9..000000000000
--- a/games-strategy/0ad/files/0ad-0.0.24_alpha_pre20210116040036-build.patch
+++ /dev/null
@@ -1,105 +0,0 @@
---- /build/premake/premake5/build/gmake2.bsd/Premake5.make
-+++ /build/premake/premake5/build/gmake2.bsd/Premake5.make
-@@ -36,19 +36,19 @@
- TARGET = $(TARGETDIR)/premake5
- OBJDIR = obj/Release/Premake5
- DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
--ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra
--ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -fno-stack-protector
-+ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
-+ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -fno-stack-protector
- LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a -lm
- LDDEPS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a
--ALL_LDFLAGS += $(LDFLAGS) -s -rdynamic
-+ALL_LDFLAGS += $(LDFLAGS) -rdynamic
- 
- else ifeq ($(config),debug)
- TARGETDIR = ../../bin/debug
- TARGET = $(TARGETDIR)/premake5
- OBJDIR = obj/Debug/Premake5
- DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
--ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
--ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
-+ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
-+ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
- LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a -lm
- LDDEPS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a
- ALL_LDFLAGS += $(LDFLAGS) -rdynamic
---- /build/premake/premake5/build/gmake2.macosx/Premake5.make
-+++ /build/premake/premake5/build/gmake2.macosx/Premake5.make
-@@ -45,8 +45,8 @@
- TARGET = $(TARGETDIR)/premake5
- OBJDIR = obj/Release/Premake5
- DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_MACOSX
--ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra
--ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -fno-stack-protector
-+ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
-+ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -fno-stack-protector
- LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a -framework CoreServices -framework Foundation -framework Security -lreadline
- LDDEPS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a
- 
-@@ -55,8 +55,8 @@
- TARGET = $(TARGETDIR)/premake5
- OBJDIR = obj/Debug/Premake5
- DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_MACOSX
--ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
--ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
-+ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
-+ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
- LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a -framework CoreServices -framework Foundation -framework Security -lreadline
- LDDEPS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a
- 
---- /build/premake/premake5/build/gmake2.unix/Premake5.make
-+++ /build/premake/premake5/build/gmake2.unix/Premake5.make
-@@ -36,19 +36,19 @@
- TARGET = $(TARGETDIR)/premake5
- OBJDIR = obj/Release/Premake5
- DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
--ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra
--ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O3 -Wall -Wextra -fno-stack-protector
-+ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
-+ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra -fno-stack-protector
- LIBS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a -lm -ldl -lrt
- LDDEPS += bin/Release/liblua-lib.a bin/Release/libzip-lib.a bin/Release/libzlib-lib.a bin/Release/libcurl-lib.a bin/Release/libmbedtls-lib.a
--ALL_LDFLAGS += $(LDFLAGS) -s -rdynamic
-+ALL_LDFLAGS += $(LDFLAGS) -rdynamic
- 
- else ifeq ($(config),debug)
- TARGETDIR = ../../bin/debug
- TARGET = $(TARGETDIR)/premake5
- OBJDIR = obj/Debug/Premake5
- DEFINES += -DPREMAKE_COMPRESSION -DCURL_STATICLIB -DPREMAKE_CURL -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
--ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
--ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra
-+ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
-+ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wall -Wextra
- LIBS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a -lm -ldl -lrt
- LDDEPS += bin/Debug/liblua-lib.a bin/Debug/libzip-lib.a bin/Debug/libzlib-lib.a bin/Debug/libcurl-lib.a bin/Debug/libmbedtls-lib.a
- ALL_LDFLAGS += $(LDFLAGS) -rdynamic
---- /build/premake/premake5/src/tools/gcc.lua
-+++ /build/premake/premake5/src/tools/gcc.lua
-@@ -346,8 +346,7 @@
- --
- 
- 	function gcc.ldsymbols(cfg)
--		-- OS X has a bug, see http://lists.apple.com/archives/Darwin-dev/2006/Sep/msg00084.html
--		return iif(table.contains(os.getSystemTags(cfg.system), "darwin"), "-Wl,-x", "-s")
-+		return ""
- 	end
- 
- 	gcc.ldflags = {
---- /libraries/source/fcollada/src/Makefile
-+++ /libraries/source/fcollada/src/Makefile
-@@ -9,9 +9,9 @@
- 
- CXX ?= g++
- CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
--CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
--CXXFLAGS_RELEASE := -O2 -DNDEBUG -DRETAIL
--CXXFLAGS_TEST := -O0 -g -D_DEBUG
-+CXXFLAGS_DEBUG := -D_DEBUG -DRETAIL
-+CXXFLAGS_RELEASE := -DNDEBUG -DRETAIL
-+CXXFLAGS_TEST := -D_DEBUG
- LDFLAGS_TEST= -ldl
- LIBS += `pkg-config libxml-2.0 --libs`
- INCLUDES += -IFCollada `pkg-config libxml-2.0 --cflags`

diff --git a/games-strategy/0ad/files/0ad-0.0.24b_alpha-fix-hang-on-quit-without-nvtt.patch b/games-strategy/0ad/files/0ad-0.0.24b_alpha-fix-hang-on-quit-without-nvtt.patch
deleted file mode 100644
index fe054eccac51..000000000000
--- a/games-strategy/0ad/files/0ad-0.0.24b_alpha-fix-hang-on-quit-without-nvtt.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-# Nils Freydank <holgersson@posteo.de> (2021-06-17)
-Apply the patch from upstream with minor adoption.
-
-Gentoo bug: https://bugs.gentoo.org/779757
-Upstream Bug: https://trac.wildfiregames.com/ticket/6107
-Upstream Patch: https://trac.wildfiregames.com/changeset/25766
-
---- a/source/graphics/TextureConverter.cpp	(revision 25765)
-+++ b/source/graphics/TextureConverter.cpp	(revision 25766)
-@@ -294,9 +294,8 @@
- 	m_VFS(vfs), m_HighQuality(highQuality), m_Shutdown(false)
- {
-+#if CONFIG2_NVTT
- 	// Verify that we are running with at least the version we were compiled with,
- 	// to avoid bugs caused by ABI changes
--#if CONFIG2_NVTT
- 	ENSURE(nvtt::version() >= NVTT_VERSION);
--#endif
- 
- 	m_WorkerThread = std::thread(Threading::HandleExceptions<RunThread>::Wrapper, this);
-@@ -304,8 +303,10 @@
- 	// Maybe we should share some centralised pool of worker threads?
- 	// For now we'll just stick with a single thread for this specific use.
-+#endif // CONFIG2_NVTT
- }
- 
- CTextureConverter::~CTextureConverter()
- {
-+#if CONFIG2_NVTT
- 	// Tell the thread to shut down
- 	{
-@@ -327,4 +328,5 @@
- 	// Wait for it to shut down cleanly
- 	m_WorkerThread.join();
-+#endif // CONFIG2_NVTT
- }
- 
-@@ -477,8 +479,8 @@
- 	return true;
- 
--#else
-+#else // CONFIG2_NVTT
- 	LOGERROR("Failed to convert texture \"%s\" (NVTT not available)", src.string8());
- 	return false;
--#endif
-+#endif // !CONFIG2_NVTT
- }
- 
-@@ -529,22 +531,24 @@
- 	return true;
- 
--#else // #if CONFIG2_NVTT
-+#else // CONFIG2_NVTT
- 	return false;
--#endif
-+#endif // !CONFIG2_NVTT
- }
- 
- bool CTextureConverter::IsBusy()
- {
-+#if CONFIG2_NVTT
- 	std::lock_guard<std::mutex> lock(m_WorkerMutex);
- 	return !m_RequestQueue.empty();
-+#else // CONFIG2_NVTT
-+	return false;
-+#endif // !CONFIG2_NVTT
- }
- 
- void CTextureConverter::RunThread(CTextureConverter* textureConverter)
- {
-+#if CONFIG2_NVTT
- 	debug_SetThreadName("TextureConverter");
- 	g_Profiler2.RegisterCurrentThread("texconv");
--
--#if CONFIG2_NVTT
--
- 	// Wait until the main thread wakes us up
- 	while (true)
-@@ -596,4 +600,4 @@
- 	std::lock_guard<std::mutex> wait_lock(textureConverter->m_WorkerMutex);
- 	textureConverter->m_Shutdown = false;
--#endif
--}
-+#endif // CONFIG2_NVTT
-+}
-
---- a/source/graphics/TextureConverter.h	(revision 25765)
-+++ b/source/graphics/TextureConverter.h	(revision 25766)
-@@ -208,7 +208,9 @@
- 	bool m_HighQuality;
- 
-+#if CONFIG2_NVTT
- 	std::thread m_WorkerThread;
- 	std::mutex m_WorkerMutex;
- 	std::condition_variable m_WorkerCV;
-+#endif // CONFIG2_NVTT
- 
- 	struct ConversionRequest;

diff --git a/games-strategy/0ad/files/0ad-0.0.24b_alpha-rust-1.50.patch b/games-strategy/0ad/files/0ad-0.0.24b_alpha-rust-1.50.patch
deleted file mode 100644
index f4436a7b92c4..000000000000
--- a/games-strategy/0ad/files/0ad-0.0.24b_alpha-rust-1.50.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-https://bugs.gentoo.org/773493
---- a/libraries/source/spidermonkey/FixRust150.diff
-+++ b/libraries/source/spidermonkey/FixRust150.diff
-@@ -0,0 +1,65 @@
-+
-+# HG changeset patch
-+# User Emilio Cobos Álvarez <emilio@crisal.io>
-+# Date 1609006565 0
-+# Node ID 0e8f444683cb9c4079d3b2250f32f986043ea582
-+# Parent  55097a5cf353f1b2a2228820bdf26bb69a1372a0
-+Bug 1684261 - Fix build with rust nightly. r=jrmuizel, a=RyanVM
-+
-+Fixes errors like:
-+
-+  dependency (nix) specification is ambiguous. Only one of `branch`, `tag` or `rev` is allowed.
-+
-+I've left the most specific dependency, but for wgpu the rev is not
-+right, so I've kept the branch which effectively preserves behavior.
-+
-+Differential Revision: https://phabricator.services.mozilla.com/D100485
-+
-+diff --git a/.cargo/config.in b/.cargo/config.in
-+--- a/.cargo/config.in
-++++ b/.cargo/config.in
-+@@ -1,16 +1,16 @@
-+ # This file contains vendoring instructions for cargo.
-+ # It was generated by `mach vendor rust`.
-+ # Please do not edit.
-+ 
-+ [source."https://github.com/shravanrn/nix/"]
-+-branch = "r0.13.1"
-+ git = "https://github.com/shravanrn/nix/"
-+ replace-with = "vendored-sources"
-++rev = "4af6c367603869a30fddb5ffb0aba2b9477ba92e"
-+ 
-+ [source."https://github.com/mozilla/rkv"]
-+ git = "https://github.com/mozilla/rkv"
-+ replace-with = "vendored-sources"
-+ rev = "e3c3388e6632cf55e08d773b32e58b1cab9b2731"
-+ 
-+ [source."https://github.com/mozilla/neqo"]
-+ git = "https://github.com/mozilla/neqo"
-+diff --git a/Cargo.lock b/Cargo.lock
-+--- a/Cargo.lock
-++++ b/Cargo.lock
-+@@ -3200,7 +3200,7 @@
-+ [[package]]
-+ name = "nix"
-+ version = "0.13.1"
-+-source = "git+https://github.com/shravanrn/nix/?branch=r0.13.1#4af6c367603869a30fddb5ffb0aba2b9477ba92e"
-++source = "git+https://github.com/shravanrn/nix/?rev=4af6c367603869a30fddb5ffb0aba2b9477ba92e#4af6c367603869a30fddb5ffb0aba2b9477ba92e"
-+ dependencies = [
-+  "bitflags",
-+  "cc",
-+diff --git a/Cargo.toml b/Cargo.toml
-+--- a/Cargo.toml
-++++ b/Cargo.toml
-+@@ -60,8 +60,8 @@
-+ [patch.crates-io]
-+ packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="3541e3818fdc7c2a24f87e3459151a4ce955a67a" }
-+ rlbox_lucet_sandbox = { git = "https://github.com/PLSysSec/rlbox_lucet_sandbox/", rev="d510da5999a744c563b0acd18056069d1698273f" }
-+-nix = { git = "https://github.com/shravanrn/nix/", branch = "r0.13.1", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" }
-+-spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu3", rev = "20191ad2f370afd6d247edcb9ff9da32d3bedb9c" }
-++nix = { git = "https://github.com/shravanrn/nix/", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" }
-++spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu3" }
-+ # failure's backtrace feature might break our builds, see bug 1608157.
-+ failure = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" }
-+ failure_derive = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" }
-+
---- a/libraries/source/spidermonkey/patch.sh
-+++ b/libraries/source/spidermonkey/patch.sh
-@@ -39,6 +39,10 @@
- # https://bugzilla.mozilla.org/show_bug.cgi?id=1536491
- patch -p1 < ../FixRpiUnalignedFpAccess.diff
- 
-+# Bug 1684261 upstreamed from 78.8: https://hg.mozilla.org/releases/mozilla-esr78/rev/0e8f444683cb
-+# Note that this isn't quite the upstream patch to match our version.
-+patch -p1 < ../FixRust150.diff
-+
- # Patch those separately, as they might interfere with normal behaviour.
- if [ "$(uname -s)" = "FreeBSD" ];
- then


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/
@ 2022-06-07  0:41 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-06-07  0:41 UTC (permalink / raw
  To: gentoo-commits

commit:     a1016e0bb4a875a396f1f46aa3cec3037251b934
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  7 00:40:34 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  7 00:41:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1016e0b

games-strategy/0ad: backport build patches

Given how fragile the build system can be, it's worth a revbump.

Closes: https://bugs.gentoo.org/834578
Closes: https://bugs.gentoo.org/845987
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-strategy/0ad/0ad-0.0.25b_alpha-r1.ebuild     | 264 +++++++++++++++++++++
 ...ad-0.0.25b_alpha-fix-name-collision-glibc.patch | 131 ++++++++++
 .../0ad/files/0ad-0.0.25b_alpha-python3.10.patch   | 156 ++++++++++++
 3 files changed, 551 insertions(+)

diff --git a/games-strategy/0ad/0ad-0.0.25b_alpha-r1.ebuild b/games-strategy/0ad/0ad-0.0.25b_alpha-r1.ebuild
new file mode 100644
index 000000000000..0939933bda9d
--- /dev/null
+++ b/games-strategy/0ad/0ad-0.0.25b_alpha-r1.ebuild
@@ -0,0 +1,264 @@
+# Copyright 2014-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+WX_GTK_VER="3.0-gtk3"
+PYTHON_COMPAT=( python3_{8..10} )
+inherit desktop toolchain-funcs multiprocessing python-any-r1 wxwidgets xdg
+
+DESCRIPTION="A free, real-time strategy game"
+HOMEPAGE="https://play0ad.com/"
+LICENSE="BitstreamVera CC-BY-SA-3.0 GPL-2 LGPL-2.1 LPPL-1.3c MIT ZLIB"
+# Upstream signs releases (and only them) with app-crypt/minisign.
+# The (public) key can be found on https://play0ad.com/download/source.
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/0ad/0ad"
+	S="${WORKDIR}/${P}"
+elif [[ ${PV} == *_pre* ]]; then
+	ZEROAD_GIT_REVISION="c7d07d3979f969b969211a5e5748fa775f6768a7"
+	SRC_URI="https://github.com/0ad/0ad/archive/${ZEROAD_GIT_REVISION}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/${PN}-${ZEROAD_GIT_REVISION}"
+else
+	# Trailing whitespace for IUSE append below
+	IUSE="verify-sig "
+	MINISIGN_KEY="RWT0hFWv57I2RFoJwLVjxEr44JOq/RkEx1oT0IA3PPPICnSF7HFKW1CT"
+	MY_P="0ad-${PV/_/-}"
+	SRC_URI="
+		http://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz
+		https://releases.wildfiregames.com/${MY_P}-unix-data.tar.xz
+		verify-sig? (
+			http://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz.minisig
+			http://releases.wildfiregames.com/${MY_P}-unix-data.tar.xz.minisig
+		)
+	"
+	S="${WORKDIR}/${MY_P}"
+fi
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE+="editor +lobby nvtt pch test"
+
+RESTRICT="test"
+CHECKREQS_DISK_BUILD="9000M" # 8769732 KiB (8.3 GiB) for alpha 25
+CHECKREQS_DISK_USR="3500M" # 3545972 KiB (3.3 GiB)
+
+# Premake adds '-s' to some LDFLAGS. Simply sed'ing it out leads to
+# build and/or startup issues.
+QA_PRESTRIPPED="/usr/lib64/0ad/libCollada.so /usr/bin/0ad"
+
+# virtual/rust is for bundled SpiderMonkey.
+# Build-time Python dependency is for SM, too.
+BDEPEND="
+	${PYTHON_DEPS}
+	>=dev-util/premake-5.0.0_alpha12:5
+	virtual/pkgconfig
+	virtual/rust
+	test? ( dev-lang/perl )
+"
+# Upstream uses minisign which is not supported by verify-sign, bug #783066.
+# Signatures are only provided for releases.
+if [[ ( ${PV} != *9999 ) && ( ${PV} != *_p* ) ]]; then
+	BDEPEND+=" app-crypt/minisign"
+fi
+
+# Removed dependency on nvtt as we use the bundled one.
+# bug #768930
+DEPEND="
+	dev-libs/boost:=
+	dev-libs/icu:=
+	dev-libs/libfmt:0=
+	dev-libs/libsodium
+	dev-libs/libxml2
+	media-libs/libpng:0
+	media-libs/libsdl2[X,opengl,video]
+	media-libs/libvorbis
+	media-libs/openal
+	net-libs/enet:1.3
+	net-libs/miniupnpc:=
+	net-misc/curl
+	sys-libs/zlib
+	virtual/opengl
+	x11-libs/libX11
+	editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
+	lobby? ( net-libs/gloox )
+"
+RDEPEND="
+	${DEPEND}
+	!games-strategy/0ad-data
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.0.24b_alpha-respect-tc.patch
+	"${FILESDIR}"/${PN}-0.0.25b_alpha-fix-setuptools.patch
+	"${FILESDIR}"/${PN}-0.0.25b_alpha-python3.10.patch
+	"${FILESDIR}"/${PN}-0.0.25b_alpha-fix-name-collision-glibc.patch
+)
+
+pkg_setup() {
+	use editor && setup-wxwidgets
+
+	python-any-r1_pkg_setup
+}
+
+src_unpack() {
+	if [[ ( ${PV} != *9999 ) && ( ${PV} != *_p* ) ]]; then
+		if use verify-sig; then
+			elog "Verifying both signatures using app-crypt/minisign."
+			minisign -V \
+				-P "${MINISIGN_KEY}" \
+				-x "${DISTDIR}/${MY_P}-unix-build.tar.xz.minisig" \
+				-m "${DISTDIR}/${MY_P}-unix-build.tar.xz" \
+				|| die "Failed to verify engine distfile using minisign!"
+			minisign -V \
+				-P "${MINISIGN_KEY}" \
+				-x "${DISTDIR}/${MY_P}-unix-data.tar.xz.minisig" \
+				-m "${DISTDIR}/${MY_P}-unix-data.tar.xz" \
+				|| die "Failed to verify data distfile using minisign!"
+		fi
+		# Unpack manually until an eclass supports minisign and unpacks
+		# if signatures match.
+		default
+	else
+		# Unpack distfiles without checking as this is no official release.
+		default
+	fi
+}
+
+src_prepare() {
+	default
+
+	# SpiderMonkey's configure no longer recognises --build for
+	# the build tuple
+	sed -i -e "/--build/d" libraries/source/spidermonkey/build.sh || die
+
+	# Originally from 0ad-data
+	rm binaries/data/tools/fontbuilder/fonts/*.txt || die
+}
+
+src_configure() {
+	# 0AD uses premake:5 to generate the Makefiles, so let's
+	# 1. configure the configure args,
+	# 2. export some toolchain args,
+	# 3. configure premake args,
+	# 4. run premake5.
+	local myconf=(
+		--minimal-flags
+		$(usex nvtt "" "--without-nvtt")
+		$(usex pch "" "--without-pch")
+		$(usex test "" "--without-tests")
+		$(usex editor "--atlas" "")
+		$(usex lobby "" "--without-lobby")
+		--bindir="/usr/bin"
+		--libdir="/usr/$(get_libdir)"/${PN}
+		--datadir="/usr/share/${PN}"
+	)
+
+	tc-export AR CC CXX RANLIB
+
+	local mypremakeargs=(
+		--outpath="../workspace/gcc"
+		--os=linux
+		--verbose
+	)
+
+	cd "${S}/build/premake" || die "Could not enter premake directory"
+
+	/usr/bin/premake5 "${mypremakeargs[@]}" "${myconf[@]}" gmake2 \
+		|| die "Premake failed"
+}
+
+src_compile() {
+	# Build 3rd party fcollada
+	einfo "Building bundled fcollada"
+	emake -C libraries/source/fcollada/src
+
+	# Build bundled NVTT
+	# nvtt is abandoned upstream and 0ad has forked it and added fixes.
+	# Use their copy. bug #768930
+	if use nvtt ; then
+		cd libraries/source/nvtt || die
+		elog "Building bundled NVTT (bug #768930)"
+		JOBS="-j$(makeopts_jobs)" ./build.sh || die "Failed to build bundled NVTT"
+		cd "${S}" || die
+	fi
+
+	# Build bundled SpiderMonkey
+	# We really can't use the system SpiderMonkey right now.
+	# Breakages occur even on minor bumps in upstream SM,
+	# e.g. bug #768840.
+	cd libraries/source/spidermonkey || die
+	elog "Building bundled SpiderMonkey (bug #768840)"
+	XARGS="${EPREFIX}/usr/bin/xargs" \
+		JOBS="-j$(makeopts_jobs)" \
+		./build.sh \
+	|| die "Failed to build bundled SpiderMonkey"
+
+	cd "${S}" || die
+
+	# Build 0ad itself!
+	elog "Building 0ad"
+	JOBS="-j$(makeopts_jobs)" emake -C build/workspace/gcc verbose=1
+
+	# Build assets
+	# (We only do this if we're using a snapshot/non-release)
+	# See bug #771147 (comment 3) and the old 0ad-data ebuild
+	# Warning: fragile!
+	if [[ ${PV} == 9999 || ${PV} == *_pre* ]]; then
+		# source/lib/sysdep/os/linux/ldbg.cpp:debug_SetThreadName() tries to open /proc/self/task/${TID}/comm for writing.
+		addpredict /proc/self/task
+
+		# Based on source/tools/dist/build-archives.sh used by source/tools/dist/build.sh.
+		local archivebuild_input archivebuild_output mod_name
+		for archivebuild_input in binaries/data/mods/[A-Za-z0-9]*; do
+			mod_name="${archivebuild_input##*/}"
+			archivebuild_output="archives/${mod_name}"
+
+			mkdir -p "${archivebuild_output}" || die
+
+			einfo pyrogenesis -archivebuild="${archivebuild_input}" -archivebuild-output="${archivebuild_output}/${mod_name}.zip"
+			LD_LIBRARY_PATH="binaries/system" binaries/system/pyrogenesis \
+				-archivebuild="${archivebuild_input}" \
+				-archivebuild-output="${archivebuild_output}/${mod_name}.zip" \
+			|| die "Failed to build assets"
+
+			if [[ -f "${archivebuild_input}/mod.json" ]]; then
+				cp "${archivebuild_input}/mod.json" "${archivebuild_output}" || die
+			fi
+
+			rm -r "${archivebuild_input}" || die
+			mv "${archivebuild_output}" "${archivebuild_input}" || die
+		done
+
+		# Based on source/tools/dist/build-unix-win32.sh used by source/tools/dist/build.sh.
+		rm binaries/data/config/dev.cfg || die
+		rm -r binaries/data/mods/_test.* || die
+	fi
+}
+
+src_test() {
+	cd binaries/system || die
+	./test -libdir "${S}/binaries/system" || die "Failed tests"
+}
+
+src_install() {
+	newbin binaries/system/pyrogenesis 0ad
+	use editor && newbin binaries/system/ActorEditor 0ad-ActorEditor
+
+	# Merged from 0ad-data
+	# bug #771147 (comment 3)
+	insinto /usr/share/${PN}
+	doins -r binaries/data/{l10n,config,mods,tools}
+
+	# Install bundled SpiderMonkey and nvtt
+	# bug #771147 (comment 1)
+	exeinto /usr/$(get_libdir)/${PN}
+	doexe binaries/system/{libCollada,libmozjs78-ps-release}.so
+
+	use nvtt && doexe binaries/system/{libnvtt,libnvcore,libnvimage,libnvmath}.so
+	use editor && doexe binaries/system/libAtlasUI.so
+
+	dodoc binaries/system/readme.txt
+	doicon -s 128 build/resources/${PN}.png
+	make_desktop_entry ${PN}
+}

diff --git a/games-strategy/0ad/files/0ad-0.0.25b_alpha-fix-name-collision-glibc.patch b/games-strategy/0ad/files/0ad-0.0.25b_alpha-fix-name-collision-glibc.patch
new file mode 100644
index 000000000000..e8d88e794c90
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.25b_alpha-fix-name-collision-glibc.patch
@@ -0,0 +1,131 @@
+https://bugs.gentoo.org/834578
+https://trac.wildfiregames.com/changeset/26536/
+​https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103735
+​https://sourceware.org/bugzilla/show_bug.cgi?id=28713
+--- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/Environment.cpp
++++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Environment/Environment.cpp
+@@ -1,3 +1,3 @@
+-/* Copyright (C) 2021 Wildfire Games.
++/* Copyright (C) 2022 Wildfire Games.
+  * This file is part of 0 A.D.
+  *
+@@ -30,6 +30,4 @@
+ static Observable<AtlasMessage::sEnvironmentSettings> g_EnvironmentSettings;
+ 
+-const float M_PIf = 3.14159265f;
+-
+ //////////////////////////////////////////////////////////////////////////
+ 
+@@ -86,10 +84,13 @@
+ 		m_Var(var)
+ 	{
+-		m_Conn = g_EnvironmentSettings.RegisterObserver(0, &VariableListBox::OnSettingsChange, this);
++		m_Conn = g_EnvironmentSettings.RegisterObserver(
++			0, &VariableListBox::OnSettingsChange, this);
+ 
+ 		m_Sizer = new wxStaticBoxSizer(wxVERTICAL, this, label);
+ 		SetSizer(m_Sizer);
+ 
+-		m_Combo = new wxComboBox(this, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY),
++		m_Combo = new wxComboBox(
++			this, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize,
++			wxArrayString(), wxCB_READONLY),
+ 		m_Sizer->Add(m_Combo, wxSizerFlags().Expand());
+ 	}
+@@ -207,6 +208,7 @@
+ }
+ 
+-EnvironmentSidebar::EnvironmentSidebar(ScenarioEditor& scenarioEditor, wxWindow* sidebarContainer, wxWindow* bottomBarContainer)
+-: Sidebar(scenarioEditor, sidebarContainer, bottomBarContainer)
++EnvironmentSidebar::EnvironmentSidebar(
++	ScenarioEditor& scenarioEditor, wxWindow* sidebarContainer, wxWindow* bottomBarContainer)
++	: Sidebar(scenarioEditor, sidebarContainer, bottomBarContainer)
+ {
+ 	wxSizer* scrollSizer = new wxBoxSizer(wxVERTICAL);
+@@ -218,13 +220,22 @@
+ 	wxSizer* waterSizer = new wxStaticBoxSizer(wxVERTICAL, scrolledWindow, _T("Water settings"));
+ 	scrollSizer->Add(waterSizer, wxSizerFlags().Expand());
+-	waterSizer->Add(new wxButton(scrolledWindow, ID_RecomputeWaterData, _("Reset Water Data")), wxSizerFlags().Expand());
+-	waterSizer->Add(m_WaterTypeList = new VariableListBox(scrolledWindow, _("Water Type"), g_EnvironmentSettings.watertype), wxSizerFlags().Expand());
+-	waterSizer->Add(new VariableSliderBox(scrolledWindow, _("Water height"), g_EnvironmentSettings.waterheight, 0.f, 1.2f), wxSizerFlags().Expand());
+-	waterSizer->Add(new wxButton(scrolledWindow, ID_PickWaterHeight, _("Pick Water Height")), wxSizerFlags().Expand());
+-	waterSizer->Add(new VariableSliderBox(scrolledWindow, _("Water waviness"), g_EnvironmentSettings.waterwaviness, 0.f, 10.f), wxSizerFlags().Expand());
+-	waterSizer->Add(new VariableSliderBox(scrolledWindow, _("Water murkiness"), g_EnvironmentSettings.watermurkiness, 0.f, 1.f), wxSizerFlags().Expand());
+-	waterSizer->Add(new VariableSliderBox(scrolledWindow, _("Wind angle"), g_EnvironmentSettings.windangle, -M_PIf, M_PIf), wxSizerFlags().Expand());
+-	waterSizer->Add(new VariableColorBox(scrolledWindow, _("Water color"), g_EnvironmentSettings.watercolor), wxSizerFlags().Expand());
+-	waterSizer->Add(new VariableColorBox(scrolledWindow, _("Water tint"), g_EnvironmentSettings.watertint), wxSizerFlags().Expand());
++	waterSizer->Add(new wxButton(
++		scrolledWindow, ID_RecomputeWaterData, _("Reset Water Data")), wxSizerFlags().Expand());
++	waterSizer->Add(m_WaterTypeList = new VariableListBox(
++		scrolledWindow, _("Water Type"), g_EnvironmentSettings.watertype), wxSizerFlags().Expand());
++	waterSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Water height"), g_EnvironmentSettings.waterheight, 0.f, 1.2f), wxSizerFlags().Expand());
++	waterSizer->Add(new wxButton(
++		scrolledWindow, ID_PickWaterHeight, _("Pick Water Height")), wxSizerFlags().Expand());
++	waterSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Water waviness"), g_EnvironmentSettings.waterwaviness, 0.f, 10.f), wxSizerFlags().Expand());
++	waterSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Water murkiness"), g_EnvironmentSettings.watermurkiness, 0.f, 1.f), wxSizerFlags().Expand());
++	waterSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Wind angle"), g_EnvironmentSettings.windangle, -static_cast<float>(M_PI), static_cast<float>(M_PI)), wxSizerFlags().Expand());
++	waterSizer->Add(new VariableColorBox(
++		scrolledWindow, _("Water color"), g_EnvironmentSettings.watercolor), wxSizerFlags().Expand());
++	waterSizer->Add(new VariableColorBox(
++		scrolledWindow, _("Water tint"), g_EnvironmentSettings.watertint), wxSizerFlags().Expand());
+ 
+ 	std::vector<std::wstring> list;
+@@ -236,23 +247,38 @@
+ 	scrollSizer->Add(sunSizer, wxSizerFlags().Expand().Border(wxTOP, 8));
+ 
+-	sunSizer->Add(new VariableSliderBox(scrolledWindow, _("Sun rotation"), g_EnvironmentSettings.sunrotation, -M_PIf, M_PIf), wxSizerFlags().Expand());
+-	sunSizer->Add(new VariableSliderBox(scrolledWindow, _("Sun elevation"), g_EnvironmentSettings.sunelevation, -M_PIf/2, M_PIf/2), wxSizerFlags().Expand());
+-	sunSizer->Add(new VariableSliderBox(scrolledWindow, _("Sun overbrightness"), g_EnvironmentSettings.sunoverbrightness, 1.0f, 3.0f), wxSizerFlags().Expand());
+-	sunSizer->Add(new LightControl(scrolledWindow, wxSize(150, 150), g_EnvironmentSettings));
+-	sunSizer->Add(new VariableColorBox(scrolledWindow, _("Sun color"), g_EnvironmentSettings.suncolor), wxSizerFlags().Expand());
+-	sunSizer->Add(m_SkyList = new VariableListBox(scrolledWindow, _("Sky set"), g_EnvironmentSettings.skyset), wxSizerFlags().Expand());
+-	sunSizer->Add(new VariableSliderBox(scrolledWindow, _("Fog Factor"), g_EnvironmentSettings.fogfactor, 0.0f, 0.01f), wxSizerFlags().Expand());
+-	sunSizer->Add(new VariableSliderBox(scrolledWindow, _("Fog Thickness"), g_EnvironmentSettings.fogmax, 0.5f, 0.0f), wxSizerFlags().Expand());
+-	sunSizer->Add(new VariableColorBox(scrolledWindow, _("Fog color"), g_EnvironmentSettings.fogcolor), wxSizerFlags().Expand());
+-	sunSizer->Add(new VariableColorBox(scrolledWindow, _("Ambient color"), g_EnvironmentSettings.ambientcolor), wxSizerFlags().Expand());
++	sunSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Sun rotation"), g_EnvironmentSettings.sunrotation, -static_cast<float>(M_PI), static_cast<float>(M_PI)), wxSizerFlags().Expand());
++	sunSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Sun elevation"), g_EnvironmentSettings.sunelevation, -static_cast<float>(M_PI) / 2.0f, static_cast<float>(M_PI) / 2.0f), wxSizerFlags().Expand());
++	sunSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Sun overbrightness"), g_EnvironmentSettings.sunoverbrightness, 1.0f, 3.0f), wxSizerFlags().Expand());
++	sunSizer->Add(new LightControl(
++		scrolledWindow, wxSize(150, 150), g_EnvironmentSettings));
++	sunSizer->Add(new VariableColorBox(
++		scrolledWindow, _("Sun color"), g_EnvironmentSettings.suncolor), wxSizerFlags().Expand());
++	sunSizer->Add(m_SkyList = new VariableListBox(
++		scrolledWindow, _("Sky set"), g_EnvironmentSettings.skyset), wxSizerFlags().Expand());
++	sunSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Fog Factor"), g_EnvironmentSettings.fogfactor, 0.0f, 0.01f), wxSizerFlags().Expand());
++	sunSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Fog Thickness"), g_EnvironmentSettings.fogmax, 0.5f, 0.0f), wxSizerFlags().Expand());
++	sunSizer->Add(new VariableColorBox(
++		scrolledWindow, _("Fog color"), g_EnvironmentSettings.fogcolor), wxSizerFlags().Expand());
++	sunSizer->Add(new VariableColorBox(
++		scrolledWindow, _("Ambient color"), g_EnvironmentSettings.ambientcolor), wxSizerFlags().Expand());
+ 
+ 	wxSizer* postProcSizer = new wxStaticBoxSizer(wxVERTICAL, scrolledWindow, _T("Post-processing settings"));
+ 	scrollSizer->Add(postProcSizer, wxSizerFlags().Expand().Border(wxTOP, 8));
+ 
+-	postProcSizer->Add(m_PostEffectList = new VariableListBox(scrolledWindow, _("Post Effect"), g_EnvironmentSettings.posteffect), wxSizerFlags().Expand());
+-	postProcSizer->Add(new VariableSliderBox(scrolledWindow, _("Brightness"), g_EnvironmentSettings.brightness, -0.5f, 0.5f), wxSizerFlags().Expand());
+-	postProcSizer->Add(new VariableSliderBox(scrolledWindow, _("Contrast (HDR)"), g_EnvironmentSettings.contrast, 0.5f, 1.5f), wxSizerFlags().Expand());
+-	postProcSizer->Add(new VariableSliderBox(scrolledWindow, _("Saturation"), g_EnvironmentSettings.saturation, 0.0f, 2.0f), wxSizerFlags().Expand());
+-	postProcSizer->Add(new VariableSliderBox(scrolledWindow, _("Bloom"), g_EnvironmentSettings.bloom, 0.2f, 0.0f), wxSizerFlags().Expand());
++	postProcSizer->Add(m_PostEffectList = new VariableListBox(
++		scrolledWindow, _("Post Effect"), g_EnvironmentSettings.posteffect), wxSizerFlags().Expand());
++	postProcSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Brightness"), g_EnvironmentSettings.brightness, -0.5f, 0.5f), wxSizerFlags().Expand());
++	postProcSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Contrast (HDR)"), g_EnvironmentSettings.contrast, 0.5f, 1.5f), wxSizerFlags().Expand());
++	postProcSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Saturation"), g_EnvironmentSettings.saturation, 0.0f, 2.0f), wxSizerFlags().Expand());
++	postProcSizer->Add(new VariableSliderBox(
++		scrolledWindow, _("Bloom"), g_EnvironmentSettings.bloom, 0.2f, 0.0f), wxSizerFlags().Expand());
+ 
+ 	m_Conn = g_EnvironmentSettings.RegisterObserver(0, &SendToGame);
+

diff --git a/games-strategy/0ad/files/0ad-0.0.25b_alpha-python3.10.patch b/games-strategy/0ad/files/0ad-0.0.25b_alpha-python3.10.patch
new file mode 100644
index 000000000000..80991e3c7a6e
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.25b_alpha-python3.10.patch
@@ -0,0 +1,156 @@
+https://github.com/0ad/0ad/commit/c2ec217eea6952c4877095969e11900b70c7cda3
+https://bugs.gentoo.org/845987
+
+From: s0600204 <s0600204@3db68df2-c116-0410-a063-a993310a9797>
+Date: Wed, 23 Feb 2022 20:30:38 +0000
+Subject: [PATCH] Fix building spidermonkey on systems with python 3.10
+
+Tested by:
+* Langbart - macOS 10.15.7: `homebrew`ed python 3.9.9 & 3.10.1
+* andy5995 - Manjaro 21.2.3: python 3.10.2
+* s0600204 - ArchLinux: python 3.10.2
+
+Differential Revision: https://code.wildfiregames.com/D4437
+
+
+
+git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@26475 3db68df2-c116-0410-a063-a993310a9797
+--- /dev/null
++++ b/libraries/source/spidermonkey/FixPythonCollectionABC.diff
+@@ -0,0 +1,87 @@
++--- a/python/mach/mach/config.py
+++++ b/python/mach/mach/config.py
++@@ -144,7 +144,7 @@
++     return _
++ 
++ 
++-class ConfigSettings(collections.Mapping):
+++class ConfigSettings(collections.abc.Mapping):
++     """Interface for configuration settings.
++ 
++     This is the main interface to the configuration.
++@@ -190,7 +190,7 @@
++     will result in exceptions being raised.
++     """
++ 
++-    class ConfigSection(collections.MutableMapping, object):
+++    class ConfigSection(collections.abc.MutableMapping, object):
++         """Represents an individual config section."""
++         def __init__(self, config, name, settings):
++             object.__setattr__(self, '_config', config)
++--- a/python/mach/mach/decorators.py
+++++ b/python/mach/mach/decorators.py
++@@ -159,7 +159,7 @@
++               'Conditions argument must take a list ' + \
++               'of functions. Found %s instead.'
++ 
++-        if not isinstance(command.conditions, collections.Iterable):
+++        if not isinstance(command.conditions, collections.abc.Iterable):
++             msg = msg % (command.name, type(command.conditions))
++             raise MachError(msg)
++ 
++--- a/python/mach/mach/main.py
+++++ b/python/mach/mach/main.py
++@@ -16,7 +16,7 @@
++ import sys
++ import traceback
++ import uuid
++-from collections import Iterable
+++from collections.abc import Iterable
++ 
++ from six import string_types
++ 
++--- a/python/mozbuild/mozbuild/backend/configenvironment.py
+++++ b/python/mozbuild/mozbuild/backend/configenvironment.py
++@@ -9,7 +9,8 @@
++ import sys
++ import json
++ 
++-from collections import Iterable, OrderedDict
+++from collections import OrderedDict
+++from collections.abc import Iterable
++ from types import ModuleType
++ 
++ import mozpack.path as mozpath
++--- a/python/mozbuild/mozbuild/makeutil.py
+++++ b/python/mozbuild/mozbuild/makeutil.py
++@@ -7,7 +7,7 @@
++ import os
++ import re
++ import six
++-from collections import Iterable
+++from collections.abc import Iterable
++ 
++ 
++ class Makefile(object):
++--- a/python/mozbuild/mozbuild/util.py
+++++ b/python/mozbuild/mozbuild/util.py
++@@ -782,7 +782,7 @@
++         self._strings = StrictOrderingOnAppendList()
++         self._children = {}
++ 
++-    class StringListAdaptor(collections.Sequence):
+++    class StringListAdaptor(collections.abc.Sequence):
++         def __init__(self, hsl):
++             self._hsl = hsl
++ 
++--- a/testing/mozbase/manifestparser/manifestparser/filters.py
+++++ b/testing/mozbase/manifestparser/manifestparser/filters.py
++@@ -15,1 +15,2 @@
++-from collections import defaultdict, MutableSequence
+++from collections import defaultdict
+++from collections.abc import MutableSequence
++--- a/third_party/python/pipenv/pipenv/vendor/jinja2/sandbox.py
+++++ b/third_party/python/pipenv/pipenv/vendor/jinja2/sandbox.py
++@@ -82,1 +82,1 @@
++-from collections import MutableSet, MutableMapping, MutableSequence
+++from collections.abc import MutableSet, MutableMapping, MutableSequence
+--- /dev/null
++++ b/libraries/source/spidermonkey/FixVirtualenvForPython310.diff
+@@ -0,0 +1,15 @@
++--- a/third_party/python/virtualenv/virtualenv.py
+++++ b/third_party/python/virtualenv/virtualenv.py
++@@ -1804,7 +1804,11 @@
++         pass
++     else:
++         # noinspection PyProtectedMember
++-        if sysconfig._get_default_scheme() == "posix_local":
+++        try: # Python >= 3.10
+++            default_scheme = sysconfig.get_default_scheme()
+++        except: # Python < 3.10
+++            default_scheme = sysconfig._get_default_scheme()
+++        if default_scheme == "posix_local":
++             local_path = os.path.join(home_dir, "local")
++             if not os.path.exists(local_path):
++                 os.mkdir(local_path)
+--- a/libraries/source/spidermonkey/patch.sh
++++ b/libraries/source/spidermonkey/patch.sh
+@@ -52,6 +60,11 @@ patch -p1 < ../FixMSVCRootedVoid.diff
+ # so this patches it to an arbitrarily high Mac OS 11
+ patch -p1 < ../FixMacBuild.diff
+ 
++# In python 3.3, the Collections' Abstract Base Classes were moved from `collections` to
++# `collections.abc`, and aliases were set up for backwards compatibility.
++# In python 3.10, these aliases were removed, requiring all code that used them to update.
++patch -p1 < ../FixPythonCollectionABC.diff
++
+ # Fix FP access breaking compilation on RPI3+
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1526653
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1536491
+
+diff --git a/libraries/source/spidermonkey/patch.sh b/libraries/source/spidermonkey/patch.sh
+index 2a3e165..5dde46f 100644
+--- a/libraries/source/spidermonkey/patch.sh
++++ b/libraries/source/spidermonkey/patch.sh
+@@ -2,6 +2,11 @@
+ # Apply patches if needed
+ # This script gets called from build.sh.
+ 
++# In python 3.10 `sysconfig._get_default_scheme()` was renamed to
++# `sysconfig.get_default_scheme()`. This breaks the version of
++# `virtualenv` bundled with the spidermonkey source code.
++patch -p1 < ../FixVirtualenvForPython310.diff
++
+ # Mozglue symbols need to be linked against static builds.
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1588340
+ patch -p1 < ../FixMozglue.diff


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/
@ 2023-08-22 13:12 Andrew Ammerlaan
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Ammerlaan @ 2023-08-22 13:12 UTC (permalink / raw
  To: gentoo-commits

commit:     bae9991bf1f8354a70841bd292036160e5120e7a
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 13:10:31 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 13:11:53 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bae9991b

games-strategy/0ad: add upstream gcc13 patch

Closes: https://bugs.gentoo.org/912362
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 games-strategy/0ad/0ad-0.0.26_alpha.ebuild         |  4 ++-
 ...-0.0.26_alpha-add-missing-cstdint-include.patch | 29 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/games-strategy/0ad/0ad-0.0.26_alpha.ebuild b/games-strategy/0ad/0ad-0.0.26_alpha.ebuild
index c440f50e1334..49d734e318bd 100644
--- a/games-strategy/0ad/0ad-0.0.26_alpha.ebuild
+++ b/games-strategy/0ad/0ad-0.0.26_alpha.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2014-2022 Gentoo Authors
+# Copyright 2014-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -97,6 +97,8 @@ RDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.0.24b_alpha-respect-tc.patch
 	"${FILESDIR}"/${PN}-0.0.25b_alpha-fix-setuptools.patch
+	# https://code.wildfiregames.com/D4997
+	"${FILESDIR}"/${P}-add-missing-cstdint-include.patch
 )
 
 pkg_setup() {

diff --git a/games-strategy/0ad/files/0ad-0.0.26_alpha-add-missing-cstdint-include.patch b/games-strategy/0ad/files/0ad-0.0.26_alpha-add-missing-cstdint-include.patch
new file mode 100644
index 000000000000..db3fe2ebfc09
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.26_alpha-add-missing-cstdint-include.patch
@@ -0,0 +1,29 @@
+diff --git a/source/tools/atlas/GameInterface/Messages.h b/source/tools/atlas/GameInterface/Messages.h
+index 2fa4780..a486d93 100644
+--- a/source/tools/atlas/GameInterface/Messages.h
++++ b/source/tools/atlas/GameInterface/Messages.h
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2022 Wildfire Games.
++/* Copyright (C) 2023 Wildfire Games.
+  * This file is part of 0 A.D.
+  *
+  * 0 A.D. is free software: you can redistribute it and/or modify
+@@ -18,13 +18,15 @@
+ #ifndef INCLUDED_MESSAGES
+ #define INCLUDED_MESSAGES
+ 
++#include <cstdint>
++#include <string>
++#include <vector>
++
++// Opens namespace AtlasMessage, closes it on second inclusion!
+ #ifndef MESSAGES_SKIP_SETUP
+ #include "MessagesSetup.h"
+ #endif
+ 
+-#include <vector>
+-#include <string>
+-
+ // TODO: organisation, documentation, etc
+ 
+ #ifdef _MSC_VER // (can't use MSC_VERSION here since this file is included by Atlas too)


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/
@ 2024-05-28  1:45 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2024-05-28  1:45 UTC (permalink / raw
  To: gentoo-commits

commit:     9c65c36c3c18a3cbab86b009ff17daccf023c6d6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue May 28 01:11:20 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 28 01:11:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c65c36c

games-strategy/0ad: fix build w/ boost-1.85

Closes: https://bugs.gentoo.org/932254
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild      |  2 ++
 .../0ad/files/0ad-0.0.26_alpha-boost-1.85.patch    | 32 ++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild b/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild
index 14311b6b04fe..7c7373e81a78 100644
--- a/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild
+++ b/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild
@@ -101,6 +101,8 @@ PATCHES=(
 	"${FILESDIR}"/${P}-add-missing-cstdint-include.patch
 	# https://code.wildfiregames.com/D5219
 	"${FILESDIR}"/${P}-libxml2-2.12.patch
+	# https://code.wildfiregames.com/D5267
+	"${FILESDIR}"/${P}-boost-1.85.patch
 )
 
 pkg_setup() {

diff --git a/games-strategy/0ad/files/0ad-0.0.26_alpha-boost-1.85.patch b/games-strategy/0ad/files/0ad-0.0.26_alpha-boost-1.85.patch
new file mode 100644
index 000000000000..cddec5e2a86c
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.26_alpha-boost-1.85.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/932254
+https://code.wildfiregames.com/file/data/ubpvat3mgrfn6gnaquuq/PHID-FILE-d7xwslolc5hv2vwv66tb/D5267.diff
+
+Index: source/graphics/TextureManager.cpp
+===================================================================
+--- a/source/graphics/TextureManager.cpp
++++ b/source/graphics/TextureManager.cpp
+@@ -806,7 +806,7 @@
+ 				files.push_back(f);
+ 			p = p / GetWstringFromWpath(*it);
+ 		}
+-		return m_TextureConverter.ComputeSettings(GetWstringFromWpath(srcPath.leaf()), files);
++		return m_TextureConverter.ComputeSettings(GetWstringFromWpath(srcPath.filename()), files);
+ 	}
+ 
+ 	/**
+Index: source/lib/file/file_system.cpp
+===================================================================
+--- a/source/lib/file/file_system.cpp
++++ b/source/lib/file/file_system.cpp
+@@ -229,7 +229,11 @@
+ 	try
+ 	{
+ 		if(override_if_exists)
++#if BOOST_VERSION >=107400
++			fs::copy_file(fs::path(path.string()), fs::path(newPath.string()), boost::filesystem::copy_options::overwrite_existing);
++#else
+ 			fs::copy_file(fs::path(path.string()), fs::path(newPath.string()), boost::filesystem::copy_option::overwrite_if_exists);
++#endif
+ 		else
+ 			fs::copy_file(fs::path(path.string()), fs::path(newPath.string()));
+ 	}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/
@ 2024-06-16 22:34 James Le Cuirot
  0 siblings, 0 replies; 10+ messages in thread
From: James Le Cuirot @ 2024-06-16 22:34 UTC (permalink / raw
  To: gentoo-commits

commit:     57d4ce1472ddaf7879e4419495c037420155920b
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 16 22:33:50 2024 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Jun 16 22:33:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57d4ce14

games-strategy/0ad: Fix compatibility with miniupnpc 2.2.8 with patch

Thanks to Torsten Kaiser for the patch.

Closes: https://bugs.gentoo.org/934315
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild      |  1 +
 .../0ad/files/0ad-0.0.26_alpha-miniupnpc.patch     | 38 ++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild b/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild
index 7c7373e81a78..e910f14e5bd2 100644
--- a/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild
+++ b/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild
@@ -103,6 +103,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-libxml2-2.12.patch
 	# https://code.wildfiregames.com/D5267
 	"${FILESDIR}"/${P}-boost-1.85.patch
+	"${FILESDIR}"/${P}-miniupnpc.patch
 )
 
 pkg_setup() {

diff --git a/games-strategy/0ad/files/0ad-0.0.26_alpha-miniupnpc.patch b/games-strategy/0ad/files/0ad-0.0.26_alpha-miniupnpc.patch
new file mode 100644
index 000000000000..f17cee4e36f2
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.26_alpha-miniupnpc.patch
@@ -0,0 +1,38 @@
+Adapt to changes from API 18
+
+https://github.com/miniupnp/miniupnp/commit/c0a50ce33e3b99ce8a96fd43049bb5b53ffac62f
+https://bugs.gentoo.org/934315
+
+--- a/source/network/NetServer.cpp	2022-09-23 21:17:14.000000000 +0200
++++ a/source/network/NetServer.cpp	2024-06-14 21:43:26.572418719 +0200
+@@ -302,7 +302,11 @@
+ 	else if ((devlist = upnpDiscover(10000, 0, 0, 0, 0, 0)) != NULL)
+ #endif
+ 	{
++#if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 18
++		ret = UPNP_GetValidIGD(devlist, &urls, &data, internalIPAddress, sizeof(internalIPAddress), NULL, 0);
++#else
+ 		ret = UPNP_GetValidIGD(devlist, &urls, &data, internalIPAddress, sizeof(internalIPAddress));
++#endif
+ 		allocatedUrls = ret != 0; // urls is allocated on non-zero return values
+ 	}
+ 	else
+@@ -321,9 +325,18 @@
+ 		LOGMESSAGE("Net server: found valid IGD = %s", urls.controlURL);
+ 		break;
+ 	case 2:
++#if defined(MINIUPNPC_API_VERSION) && MINIUPNPC_API_VERSION >= 18
++		LOGMESSAGE("Net server: found a valid IGD with a reserved address = %s, will try to continue anyway", urls.controlURL);
++		break;
++	case 3:
++		LOGMESSAGE("Net server: found a valid, not connected IGD = %s, will try to continue anyway", urls.controlURL);
++		break;
++	case 4:
++#else
+ 		LOGMESSAGE("Net server: found a valid, not connected IGD = %s, will try to continue anyway", urls.controlURL);
+ 		break;
+ 	case 3:
++#endif
+ 		LOGMESSAGE("Net server: found a UPnP device unrecognized as IGD = %s, will try to continue anyway", urls.controlURL);
+ 		break;
+ 	default:


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-06-16 22:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 23:10 [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/files/, games-strategy/0ad/ Julian Ospald
  -- strict thread matches above, loose matches on Subject: below --
2024-06-16 22:34 James Le Cuirot
2024-05-28  1:45 Sam James
2023-08-22 13:12 Andrew Ammerlaan
2022-06-07  0:41 Sam James
2022-02-07  4:31 Sam James
2022-02-07  4:31 Sam James
2021-06-17 23:24 Sam James
2021-01-17  1:17 Sam James
2015-08-14 23:10 Julian Ospald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox