Hello,

Here is an updated patch and rationale for depencency versions with some improvements.

I have tested building and running this in a Debian stable (bullseye) chroot and a Debian unstable (sid) chroot. About 12 GiB of disk space is needed for building, and an additional 20 GiB for an OS with necessary packages for building 0ad. Building with an SSD and a quad core desktop CPU requires about 30 minutes.

I have also provided a bash script that shows how to obtain the necessary source code, apply the patch and build the Debian package of 0ad version 0.0.25. You should really start with building and installing version 0.0.25 of 0ad-data, for which a patch and instructions are available in bug #992314.

Notes about the process of building the Debian package for 0ad, version 0.0.25, follow.

If you are asked for a default mirror for pbuilder then the most common response is:

https://deb.debian.org/debian

but a list of local mirrors is available here

https://www.debian.org/mirror/list

I recommend using a mirror that supports HTTPS encryption. You will need to manually test which mirrors support HTTPS, for example with a web browser.

Thanks

--
Dave Kennedy
diff -ur 0ad-0.0.24b-2/debian/changelog 0ad-0.0.25/debian/changelog
--- 0ad-0.0.24b-2/debian/changelog	2021-08-15 17:50:57.379685891 -0500
+++ 0ad-0.0.25/debian/changelog	2021-08-16 12:17:49.089508040 -0500
@@ -1,3 +1,16 @@
+0ad (0.0.25-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * New upstream release. 
+  * d/control: Update required versions of dependencies.
+  * d/rules: Clean up build files for libnvtt and spidermonkey in 
+    dh_auto_clean.
+  * d/rules: Exclude libmozjs78-ps-release.so from dh_dwz in order to work 
+    around a crash in dwz.
+  * d/watch: Update URL for releases.
+
+ -- David W. Kennedy <dave_k AT reasoned DOT us>  Sun, 15 Aug 2021 15:07:54 -0500
+
 0ad (0.0.24b-2) UNRELEASED; urgency=medium
 
   [ Pino Toscano ]
diff -ur 0ad-0.0.24b-2/debian/control 0ad-0.0.25/debian/control
--- 0ad-0.0.24b-2/debian/control	2021-08-15 17:50:57.379685891 -0500
+++ 0ad-0.0.25/debian/control	2021-08-16 12:40:19.474742410 -0500
@@ -7,32 +7,35 @@
  Ludovic Rousseau <rouss...@debian.org>
 Build-Depends:
  autoconf,
+ automake,
  cargo,
  cmake,
  debhelper-compat (= 12),
  dpkg-dev (>= 1.15.5),
- libboost-dev,
- libboost-filesystem-dev,
- libcurl4-gnutls-dev | libcurl4-dev,
+ libboost-dev (>= 1.57.0.1),
+ libboost-filesystem-dev (>= 1.57.0.1),
+ libcurl4-gnutls-dev (>= 7.32.0) | libcurl4-dev (>= 7.32.0),
  libenet-dev (>= 1.3),
- libfmt-dev,
+ libfmt-dev (>= 4.0.0),
  libgloox-dev (>= 1.0.10),
- libicu-dev,
+ libicu-dev (>= 67.1-4~),
  libminiupnpc-dev (>= 1.6),
  libnspr4-dev,
  libogg-dev,
  libopenal-dev,
  libpng-dev,
- libsdl2-dev (>= 2.0.2),
+ libsdl2-dev (>= 2.0.5),
  libsodium-dev (>= 1.0.14),
  libvorbis-dev,
  libwxgtk3.0-gtk3-dev,
  libxcursor-dev,
  libxml2-dev,
+ llvm,
  pkg-config,
  python3,
- rustc,
- zlib1g-dev
+ rustc (>= 1.41),
+ tzdata,
+ zlib1g-dev (>= 1:1.2.3)
 Standards-Version: 4.5.0
 Homepage: http://play0ad.com/
 Vcs-Git: https://salsa.debian.org/games-team/0ad.git
diff -ur 0ad-0.0.24b-2/debian/rules 0ad-0.0.25/debian/rules
--- 0ad-0.0.24b-2/debian/rules	2021-08-15 17:50:57.379685891 -0500
+++ 0ad-0.0.25/debian/rules	2021-08-16 12:19:35.940339723 -0500
@@ -24,10 +24,12 @@
 	find binaries/system/ -type f ! -name readme.txt -delete
 	rm -f libraries/fcollada/lib/*.a
 	rm -f build/premake/.*.tmp
-	rm -f libraries/source/spidermonkey/lib/*
+	rm -rf libraries/source/spidermonkey/lib
 	rm -f libraries/source/cxxtest-4.4/python/cxxtest/*.pyc
 	rm -f libraries/source/fcollada/lib/*
 	rm -rf libraries/source/spidermonkey/include-unix-*
+	rm -rf libraries/source/spidermonkey/mozjs-78.6.0
+	rm -f libraries/source/nvtt/lib/*.so
 	rm -f source/ps/tests/stub_impl_hack.cpp
 	dh_auto_clean
 
@@ -59,3 +61,6 @@
 
 override_dh_makeshlibs:
 	dh_makeshlibs -Xusr/lib/games/0ad
+
+override_dh_dwz:
+	dh_dwz -Xlibmozjs78-ps-release.so
diff -ur 0ad-0.0.24b-2/debian/watch 0ad-0.0.25/debian/watch
--- 0ad-0.0.24b-2/debian/watch	2021-08-15 17:50:57.379685891 -0500
+++ 0ad-0.0.25/debian/watch	2021-08-15 17:50:57.647682959 -0500
@@ -1,2 +1,2 @@
 version=3
-http://sf.net/zero-ad/0ad-([\d\.]+)-.*-unix-build\.tar\.xz
+https://releases.wildfiregames.com/0ad-([\d\.]+)-.*-unix-build\.tar\.gz
#!/bin/sh

echo "This script assumes that you have already installed"
echo "0ad-data_0.0.25-1.1_all.deb and 0ad-data-common_0.0.25-1.1_all.deb"
echo "and run the following commands as root:"
echo " apt-get update"
echo " apt-get install build-essential pbuilder wget locales"
echo " dpkg-reconfigure locales"
echo " # On Debian bullseye (current stable) or sid (unstable), run the following"
echo " #  additional commands as root in order to install the build dependencies that"
echo " #  are specific to 0ad version 0.0.25:"
echo " apt-get install cargo cmake libboost-dev libboost-filesystem-dev libcurl4-gnutls-dev libenet-dev libfmt-dev libgloox-dev libicu-dev libminiupnpc-dev libnspr4-dev libogg-dev libopenal-dev libpng-dev libsdl2-dev libsdl2-dev libsodium-dev libvorbis-dev libwxgtk3.0-gtk3-dev libxcursor-dev libxml2-dev llvm pkg-config rustc zlib1g-dev"
echo ""


if [ \! -r 0ad-0.0.24b-2_salsa_to_0ad-0.0.25-1.1.diff ] ; then
	echo "Please ensure that 0ad-0.0.24b-2_salsa_to_0ad-0.0.25-1.1.diff  is in the current working directory."
	exit
fi

mkdir -p 0ad-0.0.25-1.1_build
cd 0ad-0.0.25-1.1_build
wget https://releases.wildfiregames.com/0ad-0.0.25-alpha-unix-build.tar.gz
mv 0ad-0.0.25-alpha-unix-build.tar.gz 0ad_0.0.25.orig.tar.gz
mkdir 0ad-0.0.25

if [ $? -ne 0 ] ; then
	echo "Directory 0ad-0.0.25 already exists. Remove and try again?"
	exit
fi

tar --strip-components 1 -zxkf 0ad_0.0.25.orig.tar.gz -C 0ad-0.0.25
#git clone https://salsa.debian.org/games-team/0ad.git

# fetch the exact commit of 0ad-0.0.24b-2
mkdir 0ad-0.0.24b-2
if [ $? -eq 0 ] ; then
	cd 0ad-0.0.24b-2
	git init >/dev/null 2>&1
	git remote add origin https://salsa.debian.org/games-team/0ad.git
	git fetch --depth=1 origin a7261e728f7e17e7c084dc81bf7a6d7fcac68de1
	git checkout a7261e728f7e17e7c084dc81bf7a6d7fcac68de1 >/dev/null 2>&1
	cd ..
fi
cp -a 0ad-0.0.24b-2/debian 0ad-0.0.25
cd 0ad-0.0.25
patch -p1 < ../../0ad-0.0.24b-2_salsa_to_0ad-0.0.25-1.1.diff 
tar -Jcf ../0ad_0.0.25-1.1.debian.tar.xz debian
echo ""
echo "Now run the following commands:"
echo " cd 0ad-0.0.25-1.1_build/0ad-0.0.25"
echo " dpkg-checkbuilddeps"
echo " # (install any remaining unmet build dependencies as root)"
echo " # then run the following commands:"
echo " debuild"
echo " cd .."
echo " # then run this command as root, replacing amd64 with your system architecture:"
echo " apt install ./0ad_0.0.25-1.1_amd64.deb
For 0ad version 0.0.25, I updated these depencency package versions
in the debian/control file.

automake; copied from the Build-Deps of Debian package libmozjs-78-0.

libboost-dev (>= 1.57.0.1); based on the upstream build instructions 
for 0ad at this webpage:
https://trac.wildfiregames.com/wiki/BuildInstructions#Dependencies

libboost-filesystem-dev (>= 1.57.0.1); same as libboost-dev

libcurl4-gnutls-dev (>= 7.32.0) | libcurl4-dev (>= 7.32.0); based on
the upstream build instructions for 0ad

libfmt-dev (>= 4.0.0); based on the upstream build instructions 
for 0ad

libicu-dev (>= 67.1-4~); copied from the Build-Deps of Debian package
libmozjs-78-0.  Specifically, see the Debian package libmozjs-78-0
debian changelog entry, version 78.2.0-1, about bumping the build
dependency to ICU 63.1-4. That version number doesn't match. But 
I think that Marco Trevisan meant 67.1-4, as that is where the fix 
for bug 968609 in libicu is implemented.

libsdl2-dev (>= 2.0.5); based on statements from Stan in #0ad IRC
on 2021-08-14 and 2021-08-15 that 0ad version 0.0.25 supports sdl2 
versions from 2.0.5 to 2.0.12. Versions beyond that are not 
necessarily incompatible, just untested so far. Stan said that there 
might be a bug related to alt-tab when using fullscreen mode in sdl 
versions 2.0.13 through 2.0.15. In my testing I haven't seen 
different alt-tab behavior in 0ad using sdl version 2.0.14 or 2.0.16. 
Information about the possible bug is here:
https://github.com/0ad/0ad/commit/4cf4ff4b674a7925e20f4bd40dc8a18f2fcdc8f4

llvm; for llvm-objdump -- added based on the upstream build 
instructions for 0ad

rustc (>= 1.41); based on the dependencies in the Debian packages
of mozjs78 (78.4.0-2, in unstable) and mozjs78 (78.10.1-1, in
experimental)

tzdata; copied from the Build-Deps of Debian package libmozjs-78-0.

zlib1g-dev (>= 1:1.2.3); same basis as that of the version of rustc
required for 0ad

- David W. Kennedy <dave_k AT reasoned DOT us>

Reply via email to