Github messages for voidlinux
 help / color / mirror / Atom feed
From: kedodrill <kedodrill@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: OpenJK
Date: Mon, 27 Sep 2021 03:42:20 +0200	[thread overview]
Message-ID: <20210927014220.GTwKN2qk07vdwkVGMVMpoW2sgyj0PbKOYDT_WVe9tgY@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-33137@inbox.vuxu.org>

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

There is an updated pull request by kedodrill against master on the void-packages repository

https://github.com/kedodrill/void-packages openjk
https://github.com/void-linux/void-packages/pull/33137

New package: OpenJK
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

Possible Issue: OpenJK does not have tags or releases on GitHub, [and I don't think they will](https://github.com/JACoders/OpenJK/issues/1102). :/

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

I have built this successfully for i686 and x86_64.

https://github.com/JACoders/OpenJK


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

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

From 756312c85269e251654819a93bad26a41ef6b547 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Sun, 26 Sep 2021 12:59:13 -0500
Subject: [PATCH] New package: OpenJK-0.0.20210922

* Review fixes
---
 srcpkgs/OpenJK/files/OpenJK.desktop           | 10 ++++++
 srcpkgs/OpenJK/files/OpenJKMP.desktop         | 10 ++++++
 srcpkgs/OpenJK/files/OpenJO.desktop           | 10 ++++++
 srcpkgs/OpenJK/files/README.voidlinux         | 12 +++++++
 srcpkgs/OpenJK/files/openjk                   |  9 +++++
 srcpkgs/OpenJK/files/openjk_sp                |  9 +++++
 srcpkgs/OpenJK/files/openjkded                |  9 +++++
 srcpkgs/OpenJK/files/openjo                   |  9 +++++
 .../patches/fix-sdl2-cross-compile.patch      | 34 +++++++++++++++++++
 srcpkgs/OpenJK/template                       | 34 +++++++++++++++++++
 10 files changed, 146 insertions(+)
 create mode 100644 srcpkgs/OpenJK/files/OpenJK.desktop
 create mode 100644 srcpkgs/OpenJK/files/OpenJKMP.desktop
 create mode 100644 srcpkgs/OpenJK/files/OpenJO.desktop
 create mode 100644 srcpkgs/OpenJK/files/README.voidlinux
 create mode 100644 srcpkgs/OpenJK/files/openjk
 create mode 100644 srcpkgs/OpenJK/files/openjk_sp
 create mode 100644 srcpkgs/OpenJK/files/openjkded
 create mode 100644 srcpkgs/OpenJK/files/openjo
 create mode 100644 srcpkgs/OpenJK/patches/fix-sdl2-cross-compile.patch
 create mode 100644 srcpkgs/OpenJK/template

diff --git a/srcpkgs/OpenJK/files/OpenJK.desktop b/srcpkgs/OpenJK/files/OpenJK.desktop
new file mode 100644
index 000000000000..e5c13c5c85d2
--- /dev/null
+++ b/srcpkgs/OpenJK/files/OpenJK.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=OpenJK Jedi Academy Single Player
+Comment="Open Source Implementation of Jedi Knight II and III Engine - Jedi Academy Single Player"
+Exec=openjk_sp
+Icon=OpenJK
+Terminal=false
+StartupNotify=false
+Categories=Game
\ No newline at end of file
diff --git a/srcpkgs/OpenJK/files/OpenJKMP.desktop b/srcpkgs/OpenJK/files/OpenJKMP.desktop
new file mode 100644
index 000000000000..04c25842f89e
--- /dev/null
+++ b/srcpkgs/OpenJK/files/OpenJKMP.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=OpenJK Multi Player
+Comment="Open Source Implementation of Jedi Knight II and III Engine - Multi Player"
+Exec=openjk
+Icon=OpenJK
+Terminal=false
+StartupNotify=false
+Categories=Game
\ No newline at end of file
diff --git a/srcpkgs/OpenJK/files/OpenJO.desktop b/srcpkgs/OpenJK/files/OpenJO.desktop
new file mode 100644
index 000000000000..de1076371d3c
--- /dev/null
+++ b/srcpkgs/OpenJK/files/OpenJO.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=OpenJK Jedi Outcast
+Comment="Open Source Implementation of Jedi Knight II and III Engine - Jedi Outcast"
+Exec=openjo
+Icon=OpenJK
+Terminal=false
+StartupNotify=false
+Categories=Game
\ No newline at end of file
diff --git a/srcpkgs/OpenJK/files/README.voidlinux b/srcpkgs/OpenJK/files/README.voidlinux
new file mode 100644
index 000000000000..01d847cddab7
--- /dev/null
+++ b/srcpkgs/OpenJK/files/README.voidlinux
@@ -0,0 +1,12 @@
+OpenJK requires a copy of Jedi Knight: Jedi Academy.
+You can also use this for Jedi Outcast (singleplayer only), which requires a copy as well.
+The default folder that the game will search for files is
+
+	Jedi Academy: ~/.local/share/openjk
+	Jedi Outcast: ~/.local/share/openjo
+
+You can easily link your game files by doing the following:
+
+	cd ~/.local/share/openjk
+	mkdir base
+	ln -s /path/to/game/GameData/base/* base
\ No newline at end of file
diff --git a/srcpkgs/OpenJK/files/openjk b/srcpkgs/OpenJK/files/openjk
new file mode 100644
index 000000000000..c1ec24d3c55f
--- /dev/null
+++ b/srcpkgs/OpenJK/files/openjk
@@ -0,0 +1,9 @@
+#! /bin/sh
+OJ_ARCH=$(uname -m)
+case "$OJ_ARCH" in
+  arm*) OJ_ARCH=arm;;
+  i*86*) OJ_ARCH=i386;;
+esac
+
+cd /usr/lib/OpenJK/JediAcademy
+exec ./openjk.${OJ_ARCH} "$@"
diff --git a/srcpkgs/OpenJK/files/openjk_sp b/srcpkgs/OpenJK/files/openjk_sp
new file mode 100644
index 000000000000..78f6a756a185
--- /dev/null
+++ b/srcpkgs/OpenJK/files/openjk_sp
@@ -0,0 +1,9 @@
+#! /bin/sh
+OJ_ARCH=$(uname -m)
+case "$OJ_ARCH" in
+  arm*) OJ_ARCH=arm;;
+  i*86*) OJ_ARCH=i386;;
+esac
+
+cd /usr/lib/OpenJK/JediAcademy
+exec ./openjk_sp.${OJ_ARCH} "$@"
diff --git a/srcpkgs/OpenJK/files/openjkded b/srcpkgs/OpenJK/files/openjkded
new file mode 100644
index 000000000000..a9cc159803e7
--- /dev/null
+++ b/srcpkgs/OpenJK/files/openjkded
@@ -0,0 +1,9 @@
+#! /bin/sh
+OJ_ARCH=$(uname -m)
+case "$OJ_ARCH" in
+  arm*) OJ_ARCH=arm;;
+  i*86*) OJ_ARCH=i386;;
+esac
+
+cd /usr/lib/OpenJK/JediAcademy
+exec ./openjkded.${OJ_ARCH} "$@"
diff --git a/srcpkgs/OpenJK/files/openjo b/srcpkgs/OpenJK/files/openjo
new file mode 100644
index 000000000000..7d831d4701c7
--- /dev/null
+++ b/srcpkgs/OpenJK/files/openjo
@@ -0,0 +1,9 @@
+#! /bin/sh
+OJ_ARCH=$(uname -m)
+case "$OJ_ARCH" in
+  arm*) OJ_ARCH=arm;;
+  i*86*) OJ_ARCH=i386;;
+esac
+
+cd /usr/lib/OpenJK/JediOutcast
+exec ./openjo_sp.${OJ_ARCH} "$@"
diff --git a/srcpkgs/OpenJK/patches/fix-sdl2-cross-compile.patch b/srcpkgs/OpenJK/patches/fix-sdl2-cross-compile.patch
new file mode 100644
index 000000000000..2b7a8c387acf
--- /dev/null
+++ b/srcpkgs/OpenJK/patches/fix-sdl2-cross-compile.patch
@@ -0,0 +1,34 @@
+--- a/code/CMakeLists.txt	2021-07-31 22:39:10.000000000 +0200
++++ -	2021-09-26 21:18:25.041345027 +0200
+@@ -90,12 +90,8 @@
+ 			${OpenJKLibDir}/SDL2/include
+ 			)
+ 	else()
+-		find_package(SDL2 REQUIRED CONFIG)
+-		if (TARGET SDL2::SDL2)
+-			set(SDL2_INCLUDE_DIRS "")
+-			set(SDL2_LIBRARIES SDL2::SDL2)
+-		endif()
+-		string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES)
++		include(FindPkgConfig)
++		pkg_search_module(SDL2 REQUIRED sdl2)
+ 		set(SPEngineIncludeDirectories ${SPEngineIncludeDirectories} ${SDL2_INCLUDE_DIRS})
+ 		set(SPEngineLibraries ${SPEngineLibraries} ${SDL2_LIBRARIES})
+ 	endif()
+--- a/codemp/CMakeLists.txt	2021-07-31 22:39:10.000000000 +0200
++++ -	2021-09-26 21:24:38.194600747 +0200
+@@ -396,12 +396,8 @@
+ 			${OpenJKLibDir}/SDL2/include
+ 			)
+ 	else()
+-		find_package(SDL2 REQUIRED CONFIG)
+-		if (TARGET SDL2::SDL2)
+-			set(SDL2_INCLUDE_DIRS "")
+-			set(SDL2_LIBRARIES SDL2::SDL2)
+-		endif()
+-		string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES)
++		include(FindPkgConfig)
++		pkg_search_module(SDL2 REQUIRED sdl2)
+ 		set(MPEngineIncludeDirectories ${MPEngineIncludeDirectories} ${SDL2_INCLUDE_DIRS})
+ 		set(MPEngineLibraries ${MPEngineLibraries} ${SDL2_LIBRARIES})
+ 	endif()
diff --git a/srcpkgs/OpenJK/template b/srcpkgs/OpenJK/template
new file mode 100644
index 000000000000..02175e5dceaf
--- /dev/null
+++ b/srcpkgs/OpenJK/template
@@ -0,0 +1,34 @@
+# Template file for 'OpenJK'
+pkgname=OpenJK
+version=0.0.20210922
+revision=1
+_gitrev=43e9a3da555a487e23081bbd03101e7c926a1e83
+wrksrc="${pkgname}-${_gitrev}"
+build_style=cmake
+configure_args="-DCMAKE_INSTALL_PREFIX=/usr/lib/${pkgname} -DBuildJK2SPEngine=on
+ -DBuildJK2SPGame=on -DBuildJK2SPRdVanilla=on"
+hostmakedepends="pkg-config"
+makedepends="libjpeg-turbo-devel libpng-devel zlib-devel SDL2-devel"
+short_desc="Open Source Implementation of Jedi Knight II and III Engine"
+maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
+license="GPL-2.0-only"
+homepage="https://github.com/JACoders/OpenJK"
+distfiles="https://github.com/JACoders/OpenJK/archive/${_gitrev}.tar.gz"
+checksum=efd2e3d96fe449819c4276dfea7ae7d591591ee0e651167844110e073f2edb3c
+
+post_install() {
+	vbin "${FILESDIR}/openjk"
+	vbin "${FILESDIR}/openjk_sp"
+	vbin "${FILESDIR}/openjkded"
+	vbin "${FILESDIR}/openjo"
+
+	vinstall "${FILESDIR}/OpenJK.desktop" 644 usr/share/applications
+	vinstall "${FILESDIR}/OpenJKMP.desktop" 644 usr/share/applications
+	vinstall "${FILESDIR}/OpenJO.desktop" 644 usr/share/applications
+
+	for size in 16 32 64 128 1024; do
+		vinstall shared/icons/${pkgname}_Icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ OpenJK.png
+	done
+
+	vdoc "${FILESDIR}/README.voidlinux"
+}

  parent reply	other threads:[~2021-09-27  1:42 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 18:15 [PR PATCH] " kedodrill
2021-09-26 18:45 ` [PR REVIEW] " q66
2021-09-26 18:52 ` kedodrill
2021-09-26 18:53 ` q66
2021-09-26 18:53 ` Johnnynator
2021-09-26 18:53 ` Johnnynator
2021-09-26 18:53 ` Johnnynator
2021-09-26 18:53 ` Johnnynator
2021-09-26 18:53 ` Johnnynator
2021-09-26 18:53 ` Johnnynator
2021-09-26 18:53 ` Johnnynator
2021-09-26 18:53 ` q66
2021-09-26 18:53 ` q66
2021-09-26 18:56 ` kedodrill
2021-09-26 18:57 ` kedodrill
2021-09-26 18:58 ` q66
2021-09-26 18:58 ` Johnnynator
2021-09-26 18:58 ` q66
2021-09-26 18:59 ` Johnnynator
2021-09-26 18:59 ` q66
2021-09-26 19:00 ` Johnnynator
2021-09-26 19:02 ` q66
2021-09-26 19:03 ` q66
2021-09-26 19:03 ` q66
2021-09-26 19:03 ` kedodrill
2021-09-26 19:04 ` Johnnynator
2021-09-26 19:05 ` q66
2021-09-26 19:07 ` Johnnynator
2021-09-26 19:15 ` q66
2021-09-26 19:18 ` q66
2021-09-26 19:18 ` q66
2021-09-26 19:30 ` Johnnynator
2021-09-26 19:57 ` [PR PATCH] [Updated] " kedodrill
2021-09-26 20:18 ` [PR REVIEW] " q66
2021-09-26 21:07 ` [PR PATCH] [Updated] " kedodrill
2021-09-26 22:02 ` [PR REVIEW] " q66
2021-09-26 22:02 ` q66
2021-09-26 22:03 ` q66
2021-09-26 22:03 ` q66
2021-09-26 22:11 ` [PR PATCH] [Updated] " kedodrill
2021-09-27  0:41 ` [PR REVIEW] " q66
2021-09-27  1:41 ` kedodrill
2021-09-27  1:42 ` kedodrill [this message]
2021-10-02 16:53 ` [PR PATCH] [Merged]: " Johnnynator
2021-10-02 16:55 ` kedodrill

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=20210927014220.GTwKN2qk07vdwkVGMVMpoW2sgyj0PbKOYDT_WVe9tgY@z \
    --to=kedodrill@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).