diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2021-01-16 04:00:00 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-01-17 01:17:13 +0000 |
commit | 9f45cfa2083bf7a6ab3f92241096c11f5adf7691 (patch) | |
tree | a07363a0e19aa6b8b44b7e4358f65aa3a4a0680d /games-strategy | |
parent | sys-cluster/kube-scheduler: 1.18.15 bump (diff) | |
download | gentoo-9f45cfa2083bf7a6ab3f92241096c11f5adf7691.tar.gz gentoo-9f45cfa2083bf7a6ab3f92241096c11f5adf7691.tar.bz2 gentoo-9f45cfa2083bf7a6ab3f92241096c11f5adf7691.zip |
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@Apache.Org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-strategy')
-rw-r--r-- | games-strategy/0ad/0ad-0.0.24_alpha_pre20210116040036.ebuild | 157 | ||||
-rw-r--r-- | games-strategy/0ad/Manifest | 1 | ||||
-rw-r--r-- | games-strategy/0ad/files/0ad-0.0.24_alpha_pre20210116040036-build.patch | 105 |
3 files changed, 263 insertions, 0 deletions
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 000000000000..efaa45777743 --- /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 2edf2ff884b8..de55f5659878 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 000000000000..1e643adb41a9 --- /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` |