Index: head/games/Makefile =================================================================== --- head/games/Makefile +++ head/games/Makefile @@ -678,6 +678,7 @@ SUBDIR += opengfx SUBDIR += openglad SUBDIR += openjazz + SUBDIR += openjk SUBDIR += openlierox SUBDIR += openmortal SUBDIR += openmsx Index: head/games/openjk/Makefile =================================================================== --- head/games/openjk/Makefile +++ head/games/openjk/Makefile @@ -0,0 +1,32 @@ +# $FreeBSD$ + +PORTNAME= openjk +PORTVERSION= g20190428 +CATEGORIES= games + +MAINTAINER= pkubaj@FreeBSD.org +COMMENT= Community effort to maintain Jedi Academy + Jedi Outcast + +LICENSE= GPLv2 + +LIB_DEPENDS= libpng.so:graphics/png + +USES= compiler:c++11-lang cmake gl jpeg localbase sdl +USE_GL= gl glu +USE_GITHUB= yes +GH_ACCOUNT= JACoders +GH_PROJECT= OpenJK +GH_TAGNAME= 911c537 +USE_SDL= sdl2 +USE_XORG= x11 + +CXXFLAGS+= -DNDEBUG +PLIST_SUB= ARCH="${ARCH}" +SUB_FILES= jamp \ + jasp +SUB_LIST= ARCH="${ARCH}" + +post-install: + ${INSTALL_SCRIPT} ${WRKDIR}/jamp ${WRKDIR}/jasp ${STAGEDIR}${PREFIX}/bin + +.include Index: head/games/openjk/distinfo =================================================================== --- head/games/openjk/distinfo +++ head/games/openjk/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1556633408 +SHA256 (JACoders-OpenJK-g20190428-911c537_GH0.tar.gz) = df142c5557b4ed31da9056d3cdba0ce376612e346024722530f84f05bfabd66b +SIZE (JACoders-OpenJK-g20190428-911c537_GH0.tar.gz) = 11695891 Index: head/games/openjk/files/jamp.in =================================================================== --- head/games/openjk/files/jamp.in +++ head/games/openjk/files/jamp.in @@ -0,0 +1,3 @@ +#!/bin/sh + +cd %%PREFIX%%/share/JediAcademy && ./openjk.%%ARCH%% Index: head/games/openjk/files/jasp.in =================================================================== --- head/games/openjk/files/jasp.in +++ head/games/openjk/files/jasp.in @@ -0,0 +1,3 @@ +#!/bin/sh + +cd %%PREFIX%%/share/JediAcademy && ./openjk_sp.%%ARCH%% Index: head/games/openjk/files/patch-CMakeModules_InstallConfig.cmake =================================================================== --- head/games/openjk/files/patch-CMakeModules_InstallConfig.cmake +++ head/games/openjk/files/patch-CMakeModules_InstallConfig.cmake @@ -0,0 +1,13 @@ +--- CMakeModules/InstallConfig.cmake.orig 2019-04-07 09:22:21 UTC ++++ CMakeModules/InstallConfig.cmake +@@ -17,8 +17,8 @@ + #============================================================================ + + # Subdirectories to package JK2 and JKA into +-set(JKAInstallDir "JediAcademy") +-set(JK2InstallDir "JediOutcast") ++set(JKAInstallDir "share/JediAcademy") ++set(JK2InstallDir "share/JediOutcast") + + # Install components + set(JKAMPCoreComponent "JKAMPCore") Index: head/games/openjk/pkg-descr =================================================================== --- head/games/openjk/pkg-descr +++ head/games/openjk/pkg-descr @@ -0,0 +1,6 @@ +OpenJK is an effort by the JACoders group to maintain and improve the game +engines on which the Jedi Academy (JA) and Jedi Outcast (JO) games run on, +while maintaining full backwards compatibility with the existing games. +This project does not attempt to rebalance or otherwise modify core gameplay. + +WWW: https://openjk.org Index: head/games/openjk/pkg-message =================================================================== --- head/games/openjk/pkg-message +++ head/games/openjk/pkg-message @@ -0,0 +1,28 @@ +OpenJK requires the original game files from Star Wars: Jedi Knight: +Jedi Academy to work properly. These can come from an original CD or +from GOG.com. + +If using the GOG.com version, you must extract the files from +setup_star_wars_jedi_knight_-_jedi_academy_1.01_(a)_(10331)_(g).exe +using the innoextract package. + +The files will be in a directory named app. Inside the app directory, +there is a GameData directory. Inside the GameData directory, there is +a directory named base. This base directory must be moved to +~/.local/share/openjk + +The easiest way to do this is to follow these steps: +$ mkdir -p ~/.local/share/openjk +$ innoextract setup_star_wars_jedi_knight_-_jedi_academy_1.01_(a)_(10331)_(g).exe +$ cd app/GameData +$ cp -R base ~/.local/share/openjk + +You can then delete everything else that is extracted from the exe, +such as the tmp directory. + +The multiplayer game binary is jamp and the single player game binary +is jasp. + +If you own a copy of Star Wars: Jedi Knight: Jedi Outcast, its game +files may be used to play that game, though upstream makes no +guarantees on your success in playing this game. Index: head/games/openjk/pkg-plist =================================================================== --- head/games/openjk/pkg-plist +++ head/games/openjk/pkg-plist @@ -0,0 +1,14 @@ +bin/jamp +bin/jasp +share/JediAcademy/OpenJK/cgame%%ARCH%%.so +share/JediAcademy/OpenJK/jagame%%ARCH%%.so +share/JediAcademy/OpenJK/jampgame%%ARCH%%.so +share/JediAcademy/OpenJK/ui%%ARCH%%.so +share/JediAcademy/base/cgame%%ARCH%%.so +share/JediAcademy/base/jampgame%%ARCH%%.so +share/JediAcademy/base/ui%%ARCH%%.so +share/JediAcademy/openjk.%%ARCH%% +share/JediAcademy/openjk_sp.%%ARCH%% +share/JediAcademy/openjkded.%%ARCH%% +share/JediAcademy/rd-vanilla_%%ARCH%%.so +share/JediAcademy/rdsp-vanilla_%%ARCH%%.so