Github messages for voidlinux
 help / color / mirror / Atom feed
From: mcneb10 <mcneb10@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] New package: OpenArena-0.8.8
Date: Tue, 26 Dec 2023 03:38:06 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47904@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]

There is a new pull request by mcneb10 against master on the void-packages repository

https://github.com/mcneb10/void-packages master
https://github.com/void-linux/void-packages/pull/47904

New package: OpenArena-0.8.8


#### Testing the changes
- I tested the changes in this PR: **YES**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**


#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl

#### Notes
This is open arena build with the latest commit of the OpenArena engine fork, which is why i'm making it a draft. While this game can run on other Quake III engine forks (Quake3e, ioquake3, etc) the OpenArena version has some modifications which don't seem to affect the game's functionality but may be important and were not written by the people who made OpenArena. The latest source code release for OpenArena (2012!) has some bugs and does not support some architectures such as arm, which is why the the latest upstream version is used in this draft. Would another Quake3 engine fork be accepted in it's place?


A patch file from https://github.com/void-linux/void-packages/pull/47904.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-47904.patch --]
[-- Type: text/x-diff, Size: 5312 bytes --]

From 4c523ca4e4cb5d95620461758c13c054f3961723 Mon Sep 17 00:00:00 2001
From: mcneb10 <mcneb10@yahoo.com>
Date: Mon, 25 Dec 2023 19:57:47 -0600
Subject: [PATCH] New package: OpenArena-0.8.8

---
 .../openarena/files/openarena-server.desktop  | 11 ++++
 srcpkgs/openarena/files/openarena.desktop     | 11 ++++
 .../patches/add_usr_share_search_path.patch   | 17 ++++++
 .../add_usr_share_search_path.patch.args      |  1 +
 srcpkgs/openarena/template                    | 58 +++++++++++++++++++
 5 files changed, 98 insertions(+)
 create mode 100644 srcpkgs/openarena/files/openarena-server.desktop
 create mode 100644 srcpkgs/openarena/files/openarena.desktop
 create mode 100644 srcpkgs/openarena/patches/add_usr_share_search_path.patch
 create mode 100644 srcpkgs/openarena/patches/add_usr_share_search_path.patch.args
 create mode 100644 srcpkgs/openarena/template

diff --git a/srcpkgs/openarena/files/openarena-server.desktop b/srcpkgs/openarena/files/openarena-server.desktop
new file mode 100644
index 0000000000000..85fcf9574d73f
--- /dev/null
+++ b/srcpkgs/openarena/files/openarena-server.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Version=2.5
+Encoding=UTF-8
+Name=OpenArena Dedicated Server
+Comment=Dedicated server for OpenArena
+Icon=/usr/share/pixmaps/openarena.png
+Exec=/usr/bin/oa-ded
+Terminal=false
+StartupNotify=false
+Categories=Game;
diff --git a/srcpkgs/openarena/files/openarena.desktop b/srcpkgs/openarena/files/openarena.desktop
new file mode 100644
index 0000000000000..0c9e29e24ddb2
--- /dev/null
+++ b/srcpkgs/openarena/files/openarena.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Version=2.5
+Encoding=UTF-8
+Name=OpenArena
+Comment=Open source multiplayer ioquake3-based FPS
+Icon=/usr/share/pixmaps/openarena.png
+Exec=/usr/bin/openarena
+Terminal=false
+StartupNotify=false
+Categories=Game;
diff --git a/srcpkgs/openarena/patches/add_usr_share_search_path.patch b/srcpkgs/openarena/patches/add_usr_share_search_path.patch
new file mode 100644
index 0000000000000..c8f4636ec2ce6
--- /dev/null
+++ b/srcpkgs/openarena/patches/add_usr_share_search_path.patch
@@ -0,0 +1,17 @@
+diff --git a/code/qcommon/files.c b/code/qcommon/files.c
+index c0630412..774d8166 100644
+--- a/code/qcommon/files.c
++++ b/code/qcommon/files.c
+@@ -3263,6 +3263,12 @@ static void FS_Startup( const char *gameName )
+ 	if (fs_basepath->string[0]) {
+ 		FS_AddGameDirectory( fs_basepath->string, gameName );
+ 	}
++
++#ifdef __linux__
++	// Try to look in /usr/share
++	FS_AddGameDirectory("/usr/share/openarena", gameName);
++#endif
++
+ 	// fs_homepath is somewhat particular to *nix systems, only add if relevant
+ 
+ #ifdef MACOS_X
diff --git a/srcpkgs/openarena/patches/add_usr_share_search_path.patch.args b/srcpkgs/openarena/patches/add_usr_share_search_path.patch.args
new file mode 100644
index 0000000000000..c73191a039b2b
--- /dev/null
+++ b/srcpkgs/openarena/patches/add_usr_share_search_path.patch.args
@@ -0,0 +1 @@
+-Np1 -d engine
diff --git a/srcpkgs/openarena/template b/srcpkgs/openarena/template
new file mode 100644
index 0000000000000..faa1a83307973
--- /dev/null
+++ b/srcpkgs/openarena/template
@@ -0,0 +1,58 @@
+# Template file for 'openarena'
+pkgname=openarena
+version=0.8.8
+# Version with no punctuation
+_relversion=${version//.}
+revision=1
+hostmakedepends="pkg-config unzip wget git make"
+makedepends="SDL-devel libxmp-devel libvorbis-devel"
+depends="SDL curl libopenal libxmp libvorbis"
+short_desc="Open source multiplayer ioquake3-based FPS"
+maintainer="mcneb10 <mcneb10@yahoo.com>"
+license="GPL-2.0-only"
+homepage="https://openarena.ws"
+_zip_filename="openarena-${version}.zip"
+_asset_url="http://download.tuxfamily.org/openarena/rel/${_relversion}/${_zip_filename}"
+_asset_checksum=5a8faf7f5b51f351b0a1618c06b6b98a5f1a6758f1d39818de2c87df2a0bac4a
+_engine_git_repo="https://github.com/OpenArena/engine.git"
+_oa_arch=$(uname -m | sed -e s/i.86/x86/)
+
+do_fetch() {
+	mkdir -p $wrksrc
+	cd $wrksrc
+	wget "${_asset_url}"
+	_actual_asset_sum=`sha256sum ${_zip_filename}`
+	if [[ ! ${_actual_asset_sum} =~ ${_asset_checksum} ]]; then
+		echo -e "Failed to verify openarena assets!\nExpected sha256sum ${_asset_checksum}\n but got ${_actual_asset_sum}"
+		exit 1
+	fi
+	git clone "${_engine_git_repo}"
+}
+
+do_extract() {
+	unzip "${_zip_filename}"
+}
+
+do_build() {
+	cd "$wrksrc/engine"
+	make ${makejobs} CFLAGS="$(pkg-config --cflags sdl vorbisfile)" LDFLAGS="$(pkg-config --libs sdl vorbisfile)"
+}
+
+do_install() {
+	# The name of this folder is dependent on the architecture
+	cd "$wrksrc/engine/build/release-linux-${_oa_arch}"
+	vmkdir usr/share/openarena
+	# Again these filenames are architecture depedendent
+	vbin "oa_ded.${_oa_arch}"
+	vbin "openarena.${_oa_arch}"
+	ln -s "/usr/bin/oa_ded.${_oa_arch}" "$DESTDIR/usr/bin/oa_ded"
+	ln -s "/usr/bin/openarena.${_oa_arch}" "$DESTDIR/usr/bin/openarena"
+	# Go back to copy assets
+	cd "$wrksrc/openarena-${version}/"
+	vcopy baseoa usr/share/openarena
+	vcopy missionpack usr/share/openarena
+	# Install the .desktop entry, icon, and stuff
+	vinstall "$wrksrc/engine/misc/quake3.png" 644 usr/share/pixmaps openarena.png
+	vinstall $FILESDIR/openarena.desktop 644 usr/share/applications
+	vinstall $FILESDIR/openarena-server.desktop 644 usr/share/applications
+}

             reply	other threads:[~2023-12-26  2:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-26  2:38 mcneb10 [this message]
2024-03-26  1:44 ` github-actions
2024-04-01  0:18 ` [PR PATCH] [Updated] " mcneb10
2024-04-01  0:18 ` [PR PATCH] [Closed]: " mcneb10

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47904@inbox.vuxu.org \
    --to=mcneb10@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).