Hello ports@,
During fosdem I was told that there was a new 0ad release. So here's my
attempt at updating. Quite a few things appear not needed (anymore), but
I hope I haven't overlooked some edgecase. Some light playtesting shows
no problems.
- I haven't hit any WXNEEDED, or NOBTCFI issues, so I've removed these.
- The build.sh scripts use tar directly with unsupported flags. make
them use gtar instead.
- Atlas (map builder) seems to run fine now, so enable it. This
requires wxWidgets-gtk3.
- Somewhere in the library build process -L/usr/local/lib disappears,
so set it explicitly via LDFLAGS.
- The 0006-disable_gethostname_r.diff for premake comes from
premake5-beta4
Removed patches (omitted in diff for brevity):
games/0ad/base/patches/patch-build_premake_premake5_build_gmake2_bsd_Premake5_make
games/0ad/base/patches/patch-build_workspaces_update-workspaces_sh
games/0ad/base/patches/patch-libraries_source_fcollada_src_FColladaPlugins_FArchiveXML_FArchiveXML_cpp
games/0ad/base/patches/patch-libraries_source_fcollada_src_FCollada_FUtils_FUXmlDocument_cpp
games/0ad/base/patches/patch-libraries_source_fcollada_src_Makefile
games/0ad/base/patches/patch-libraries_source_spidermonkey_0001-Python-Build-Use-r-instead-of-rU-file-read-modes_patch
games/0ad/base/patches/patch-libraries_source_spidermonkey_FixNewClang.diff
games/0ad/base/patches/patch-libraries_source_spidermonkey_mozjs_virtualenv_patch
games/0ad/base/patches/patch-libraries_source_spidermonkey_patch_sh
games/0ad/base/patches/patch-source_collada_CommonConvert_cpp
games/0ad/base/patches/patch-source_collada_XMLFix_cpp
games/0ad/base/patches/patch-source_network_NetMessage_cpp
games/0ad/base/patches/patch-source_ps_XML_RelaxNG_cpp
games/0ad/base/patches/patch-source_ps_XML_Xeromyces_cpp
games/0ad/base/patches/patch-source_simulation2_serialization_BinarySerializer_cpp
OK?
martijn@
diff /usr/ports
path + /usr/ports
commit - bda08b2b6dce33b396a82f6383070ae4c6b9d1d1
blob - 77eb3e609fc458ada66c0767165c24880e3115c7
file + games/0ad/Makefile.inc
--- games/0ad/Makefile.inc
+++ games/0ad/Makefile.inc
@@ -2,7 +2,7 @@ ONLY_FOR_ARCHS = amd64 i386
CATEGORIES = games
-V ?= 0.0.26
+V ?= 0.27.0
HOMEPAGE = https://play0ad.com/
@@ -12,4 +12,4 @@ SITES = https://releases.wildfiregames.com/ \
# GPLv2+, MIT for libs, CC-BY-SA for data
PERMIT_PACKAGE = Yes
-WRKDIST = ${WRKDIR}/0ad-${V}-alpha
+WRKDIST = ${WRKDIR}/0ad-${V}
commit - bda08b2b6dce33b396a82f6383070ae4c6b9d1d1
blob - 9388a46af4817b36aecf270ce17306e1748d4d60
file + games/0ad/base/Makefile
--- games/0ad/base/Makefile
+++ games/0ad/base/Makefile
@@ -1,28 +1,20 @@
-BROKEN = venv for spidermonkey (mozjs) outdated and fails with Python 3.12
-
COMMENT = historical real-time strategy game
-DISTNAME = 0ad-${V}-alpha-unix-build
+DISTNAME = 0ad-${V}-unix-build
PKGNAME = 0ad-${V}
-REVISION = 7
-USE_WXNEEDED = Yes
-USE_NOBTCFI = Yes
+SO_VERSION = 0.0
+SHARED_LIBS += mozjs115-release ${SO_VERSION}
-SO_VERSION = 0.0
-SHARED_LIBS += mozjs78-ps-release ${SO_VERSION}
-
WANTLIB += ${MODRUST_WANTLIB} ${COMPILER_LIBCXX} SDL2 X11 boost_filesystem
WANTLIB += boost_system crypto curl enet execinfo fmt freetype gloox iconv
WANTLIB += icudata icui18n icuuc idn m miniupnpc ogg openal
WANTLIB += png sodium ssl vorbis vorbisfile xml2 z
-BUILD_DEPENDS = archivers/zip \
+BUILD_DEPENDS = archivers/gtar \
+ archivers/zip \
+ devel/cmake \
shells/bash
-# used offline, to apply binary patch: see
-# patch-libraries_source_spidermonkey_mozjs_virtualenv_patch
-# patch-libraries_source_spidermonkey_patch_sh
-BUILD_DEPENDS += devel/git
LIB_DEPENDS = audio/libvorbis \
audio/openal \
@@ -39,7 +31,8 @@ LIB_DEPENDS = audio/libvorbis \
textproc/icu4c \
textproc/libxml
RUN_DEPENDS = devel/desktop-file-utils \
- games/0ad/data=${V}
+ games/0ad/data=${V} \
+ x11/wxWidgets
MODULES = lang/python \
lang/rust
@@ -53,51 +46,37 @@ MAKE_ENV = CC="${CC}" \
CXX="${CXX}" \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS} -I${X11BASE}/include" \
- LDFLAGS="-liconv"
+ LDFLAGS="-L/usr/local/lib -liconv"
-FIX_CRLF_FILES = build/premake/premake5/build/gmake.bsd/Premake5.make
-
USE_GMAKE = Yes
-# libraries/source/spidermonkey/mozjs-*/python/mach/mach/mixin/process.py
-# checks this var and errors out if undefined:
-# Exception: Could not detect environment shell!
-CONFIGURE_ENV += SHELL=sh
+# Library build.sh scripts require gtar specific flags.
+CONFIGURE_ENV += TAR=gtar
# XXX don't use --with-native-mozjs because 0ad needs to stay in sync
# with it: updates to mozjs could break the multiplayer.
CONFIGURE_ARGS += -j${MAKE_JOBS} \
- --without-nvtt \
--datadir=${PREFIX}/share/0ad \
--libdir=${PREFIX}/lib \
--minimal-flags
-# XXX atlas (the level editor) requires threaded libxml
-CONFIGURE_ARGS += --disable-atlas
-
WRKSRC = ${WRKDIST}/build/workspaces/gcc
-# most tests fail without nvtt
-CONFIGURE_ARGS += --without-tests
-# XXX built and packaged even without tests
-MAKE_FLAGS += mocks_test_config=''
-
-post-extract:
- # remove unused bundled sources
- rm -rf ${WRKSRC}/libraries/source/{cxxtest-4.4,enet,miniupnpc,nvtt,valgrind}
-
do-build:
ln -fs ${MODPY_BIN} ${WRKDIR}/bin/python3 # ensure correct version binary is used
+ cd ${WRKDIST}/libraries && \
+ ${SETENV} CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" SO_VERSION="${SO_VERSION}" \
+ ${CONFIGURE_ENV} verbose=1 \
+ ./build-source-libs.sh
+
cd ${WRKDIST}/build/workspaces && \
${SETENV} CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" SO_VERSION="${SO_VERSION}" \
${CONFIGURE_ENV} verbose=1 \
./update-workspaces.sh ${CONFIGURE_ARGS}
- cd ${WRKDIST}/libraries/source/fcollada/src && \
- ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \
- -f ${MAKE_FILE} ${ALL_TARGET}
cd ${WRKSRC} &&\
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \
-f ${MAKE_FILE} ${ALL_TARGET}
commit - bda08b2b6dce33b396a82f6383070ae4c6b9d1d1
blob - 5964b7c7876ceaa85ba1c7d62b4ac5096d5216b0
file + games/0ad/base/distinfo
--- games/0ad/base/distinfo
+++ games/0ad/base/distinfo
@@ -1,2 +1,2 @@
-SHA256 (0ad-0.0.26-alpha-unix-build.tar.gz) = SpkFAE4iDXdP8H/TH+XKqzraOAfut79mSykEWDcRQhw=
-SIZE (0ad-0.0.26-alpha-unix-build.tar.gz) = 78065537
+SHA256 (0ad-0.27.0-unix-build.tar.gz) = b97A4N780ipdu8L3fpTPEGA7qozQgch2N1olVF1MoGg=
+SIZE (0ad-0.27.0-unix-build.tar.gz) = 153796770
commit - bda08b2b6dce33b396a82f6383070ae4c6b9d1d1
blob - 8dc6982a7590cdcec77e0591ccb43313eee27ea1
file + games/0ad/base/patches/patch-build_premake_extern_libs5_lua
--- games/0ad/base/patches/patch-build_premake_extern_libs5_lua
+++ games/0ad/base/patches/patch-build_premake_extern_libs5_lua
@@ -1,7 +1,7 @@
Index: build/premake/extern_libs5.lua
--- build/premake/extern_libs5.lua.orig
+++ build/premake/extern_libs5.lua
-@@ -675,7 +675,7 @@ extern_lib_defs = {
+@@ -723,7 +723,7 @@ extern_lib_defs = {
-- TODO: We need to force linking with these as currently
-- they need to be loaded explicitly on execution
add_default_links({
commit - 19533b28c657eea0040a6890ee74b1fb67a9e1d7
blob - /dev/null
file + games/0ad/base/patches/patch-libraries_build-source-libs_sh (mode 644)
--- /dev/null
+++ games/0ad/base/patches/patch-libraries_build-source-libs_sh
@@ -0,0 +1,12 @@
+Index: libraries/build-source-libs.sh
+--- libraries/build-source-libs.sh.orig
++++ libraries/build-source-libs.sh
+@@ -62,7 +62,7 @@ while [ "$#" -gt 0 ]; do
+ --with-system-cxxtest) with_system_cxxtest=true ;;
+ --with-system-nvtt) with_system_nvtt=true ;;
+ --with-system-mozjs) with_system_mozjs=true ;;
+- --with-system-premake) with_system_mozjs=true ;;
++ --with-system-premake) with_system_premake=true ;;
+ --with-spirv-reflect) with_spirv_reflect=true ;;
+ -j*) JOBS="$1" ;;
+ *)
commit - 19533b28c657eea0040a6890ee74b1fb67a9e1d7
blob - /dev/null
file + games/0ad/base/patches/patch-libraries_source_cxxtest-4_4_build_sh (mode 644)
--- /dev/null
+++ games/0ad/base/patches/patch-libraries_source_cxxtest-4_4_build_sh
@@ -0,0 +1,12 @@
+Index: libraries/source/cxxtest-4.4/build.sh
+--- libraries/source/cxxtest-4.4/build.sh.orig
++++ libraries/source/cxxtest-4.4/build.sh
+@@ -40,7 +40,7 @@ fi
+
+ # unpack
+ rm -Rf "cxxtest-${PV}"
+-tar -xf "cxxtest-${PV}.tar.gz"
++tar -xzf "cxxtest-${PV}.tar.gz"
+
+ # patch
+ patch -d "cxxtest-${PV}" -p1 <patches/0001-Add-Debian-python3-patch.patch
commit - 19533b28c657eea0040a6890ee74b1fb67a9e1d7
blob - /dev/null
file + games/0ad/base/patches/patch-libraries_source_fcollada_build_sh (mode 644)
--- /dev/null
+++ games/0ad/base/patches/patch-libraries_source_fcollada_build_sh
@@ -0,0 +1,20 @@
+Index: libraries/source/fcollada/build.sh
+--- libraries/source/fcollada/build.sh.orig
++++ libraries/source/fcollada/build.sh
+@@ -5,6 +5,7 @@ cd "$(dirname "$0")"
+
+ PV=28209
+ LIB_VERSION=${PV}
++TAR=${TAR:-tar}
+
+ fetch()
+ {
+@@ -42,7 +43,7 @@ fi
+
+ # unpack
+ rm -Rf fcollada-${PV}
+-tar xf fcollada-${PV}.tar.xz
++$TAR xf fcollada-${PV}.tar.xz
+
+ # build
+ (
commit - 19533b28c657eea0040a6890ee74b1fb67a9e1d7
blob - /dev/null
file + games/0ad/base/patches/patch-libraries_source_nvtt_build_sh (mode 644)
--- /dev/null
+++ games/0ad/base/patches/patch-libraries_source_nvtt_build_sh
@@ -0,0 +1,20 @@
+Index: libraries/source/nvtt/build.sh
+--- libraries/source/nvtt/build.sh.orig
++++ libraries/source/nvtt/build.sh
+@@ -5,6 +5,7 @@ cd "$(dirname "$0")"
+
+ PV=28209
+ LIB_VERSION=${PV}
++TAR=${TAR:-tar}
+
+ fetch()
+ {
+@@ -42,7 +43,7 @@ fi
+
+ # unpack
+ rm -Rf nvtt-${PV}
+-tar xf nvtt-${PV}.tar.xz
++$TAR xf nvtt-${PV}.tar.xz
+
+ # build
+ (
commit - 19533b28c657eea0040a6890ee74b1fb67a9e1d7
blob - /dev/null
file + games/0ad/base/patches/patch-libraries_source_premake-core_build_sh (mode 644)
--- /dev/null
+++ games/0ad/base/patches/patch-libraries_source_premake-core_build_sh
@@ -0,0 +1,29 @@
+Index: libraries/source/premake-core/build.sh
+--- libraries/source/premake-core/build.sh.orig
++++ libraries/source/premake-core/build.sh
+@@ -9,6 +9,7 @@ cd "$(dirname "$0")"
+
+ PV=5.0.0-beta3
+ LIB_VERSION=${PV}+wfg1
++TAR=${TAR:-tar}
+
+ fetch()
+ {
+@@ -44,7 +45,7 @@ fi
+
+ # unpack
+ rm -Rf "premake-core-${PV}"
+-tar -xf "premake-core-${PV}.tar.gz"
++$TAR -xf "premake-core-${PV}.tar.gz"
+
+ # patch
+ # ffcb7790f013bdceacc14ba5fda1c5cd107aac08
+@@ -57,6 +58,8 @@ patch -d "premake-core-${PV}" -p1 <patches/0003-Add-su
+ patch -d "premake-core-${PV}" -p1 <patches/0004-Add-support-for-loongarch64-2363.patch
+ # 5c524b6d53307bcb4ba7b02c9dba20100df68943
+ patch -d "premake-core-${PV}" -p1 <patches/0005-premake.h-added-e2k-definition-2349.patch
++
++patch -d "premake-core-${PV}" <patches/0006-disable_gethostname_r.diff
+
+ #build
+ (
commit - 19533b28c657eea0040a6890ee74b1fb67a9e1d7
blob - /dev/null
file + games/0ad/base/patches/patch-libraries_source_premake-core_patches_0006-disable_gethostname_r_diff (mode 644)
--- /dev/null
+++ games/0ad/base/patches/patch-libraries_source_premake-core_patches_0006-disable_gethostname_r_diff
@@ -0,0 +1,16 @@
+Index: libraries/source/premake-core/patches/0006-disable_gethostname_r.diff
+--- libraries/source/premake-core/patches/0006-disable_gethostname_r.diff.orig
++++ libraries/source/premake-core/patches/0006-disable_gethostname_r.diff
+@@ -0,0 +1,12 @@
++--- contrib/curl/lib/config-linux.h.orig Tue Feb 4 18:37:46 2025
+++++ contrib/curl/lib/config-linux.h Tue Feb 4 18:38:14 2025
++@@ -185,7 +185,9 @@
++ #define HAVE_GETHOSTBYNAME 1
++
++ /* Define to 1 if you have the gethostbyname_r function. */
+++#if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__sun__)
++ #define HAVE_GETHOSTBYNAME_R 1
+++
No comments:
Post a Comment