git: fa55c4392ac2 - main - games/SpaceCadetPinball-devel: Add port

From: Neel Chauhan <nc_at_FreeBSD.org>
Date: Thu, 13 Jan 2022 19:45:48 UTC
The branch main has been updated by nc:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fa55c4392ac2a22e34ee55fb8646f3fe58820bfb

commit fa55c4392ac2a22e34ee55fb8646f3fe58820bfb
Author:     Neel Chauhan <nc@FreeBSD.org>
AuthorDate: 2022-01-13 19:46:01 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-01-13 19:46:01 +0000

    games/SpaceCadetPinball-devel: Add port
---
 games/Makefile                                     |  1 +
 games/SpaceCadetPinball-devel/Makefile             | 22 +++++++++++++++++++++
 games/SpaceCadetPinball-devel/distinfo             |  3 +++
 .../files/patch-CMakeLists.txt                     | 23 ++++++++++++++++++++++
 games/SpaceCadetPinball-devel/pkg-descr            |  3 +++
 games/SpaceCadetPinball-devel/pkg-message          | 13 ++++++++++++
 games/SpaceCadetPinball-devel/pkg-plist            |  8 ++++++++
 7 files changed, 73 insertions(+)

diff --git a/games/Makefile b/games/Makefile
index 19b2dd19e22c..ef175a2876b0 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -21,6 +21,7 @@
     SUBDIR += OpenTomb
     SUBDIR += SRB2
     SUBDIR += SpaceCadetPinball
+    SUBDIR += SpaceCadetPinball-devel
     SUBDIR += abbayedesmorts
     SUBDIR += abe
     SUBDIR += abstreet
diff --git a/games/SpaceCadetPinball-devel/Makefile b/games/SpaceCadetPinball-devel/Makefile
new file mode 100644
index 000000000000..80f1dd129939
--- /dev/null
+++ b/games/SpaceCadetPinball-devel/Makefile
@@ -0,0 +1,22 @@
+PORTNAME=	SpaceCadetPinball
+PORTVERSION=	2.0.1.20220113
+DISTVERSIONPREFIX=	Release_
+CATEGORIES=	games
+PKGNAMESUFFIX=	-devel
+
+MAINTAINER=	nc@FreeBSD.org
+COMMENT=	Decompilation of 3D Pinball for Windows (development version)
+
+LICENSE=	MIT
+
+USES=		cmake sdl xorg
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	k4zmu2a
+GH_PROJECT=	SpaceCadetPinball
+GH_TAGNAME=	8f34829b1e4756472ce6889f31eb875ce343fb05
+
+USE_SDL=	mixer2 sdl2
+USE_XORG=	ice sm x11 xext
+
+.include <bsd.port.mk>
diff --git a/games/SpaceCadetPinball-devel/distinfo b/games/SpaceCadetPinball-devel/distinfo
new file mode 100644
index 000000000000..a8ef7f0fa7cf
--- /dev/null
+++ b/games/SpaceCadetPinball-devel/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1642102782
+SHA256 (k4zmu2a-SpaceCadetPinball-Release_2.0.1.20220113-8f34829b1e4756472ce6889f31eb875ce343fb05_GH0.tar.gz) = 0d99329179bd952e91fa08e2b39a5a3561ae9e29990c6501c6a5e69ebb23235f
+SIZE (k4zmu2a-SpaceCadetPinball-Release_2.0.1.20220113-8f34829b1e4756472ce6889f31eb875ce343fb05_GH0.tar.gz) = 1883796
diff --git a/games/SpaceCadetPinball-devel/files/patch-CMakeLists.txt b/games/SpaceCadetPinball-devel/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..fec30ec3f594
--- /dev/null
+++ b/games/SpaceCadetPinball-devel/files/patch-CMakeLists.txt
@@ -0,0 +1,23 @@
+--- CMakeLists.txt.orig	2022-01-12 14:26:31 UTC
++++ CMakeLists.txt
+@@ -24,8 +24,10 @@ set(SDL2_BUILDING_LIBRARY ON)
+ 
+ find_package(SDL2 REQUIRED)
+ FIND_PACKAGE(SDL2_mixer REQUIRED)
++find_package(X11 REQUIRED)
++link_libraries(${X11_LIBRARIES})
+ 
+-include_directories(${SDL2_INCLUDE_DIR} ${SDL2_MIXER_INCLUDE_DIR})
++include_directories(${SDL2_INCLUDE_DIR} ${SDL2_MIXER_INCLUDE_DIR} ${X11_INCLUDE_DIR})
+ get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
+ foreach(dir ${dirs})
+   message(STATUS "Include dir='${dir}'")
+@@ -200,6 +202,8 @@ if(${CMAKE_VERSION} VERSION_GREATER "3.16.0" OR ${CMAK
+ endif()
+ 
+ target_link_libraries(SpaceCadetPinball ${SDL2_LIBRARY} ${SDL2_MIXER_LIBRARY})
++
++install(TARGETS SpaceCadetPinball DESTINATION bin)
+ 
+ # On Windows, copy DLL to output
+ if(WIN32)
diff --git a/games/SpaceCadetPinball-devel/pkg-descr b/games/SpaceCadetPinball-devel/pkg-descr
new file mode 100644
index 000000000000..7631a457c5f7
--- /dev/null
+++ b/games/SpaceCadetPinball-devel/pkg-descr
@@ -0,0 +1,3 @@
+Decompilation of Space Cadet - 3D Pinball for Windows.
+
+WWW: https://github.com/k4zmu2a/SpaceCadetPinball
diff --git a/games/SpaceCadetPinball-devel/pkg-message b/games/SpaceCadetPinball-devel/pkg-message
new file mode 100644
index 000000000000..d8bf387cdc10
--- /dev/null
+++ b/games/SpaceCadetPinball-devel/pkg-message
@@ -0,0 +1,13 @@
+[
+{ type: install
+  message: <<EOM
+Note: The Space Cadet Pinball game resources are not included with this
+port. In order to obtain them, you will need a copy of Microsoft Windows
+between Windows NT 4.0 or 98 and Windows XP, or Full Tilt! Pinball, and
+copy the game resources into a folder where you will execute the
+SpaceCadetPinball binary from the command line.
+
+The resources are not included as they are copyrighted.
+EOM
+}
+]
diff --git a/games/SpaceCadetPinball-devel/pkg-plist b/games/SpaceCadetPinball-devel/pkg-plist
new file mode 100644
index 000000000000..7d33894f6ff9
--- /dev/null
+++ b/games/SpaceCadetPinball-devel/pkg-plist
@@ -0,0 +1,8 @@
+bin/SpaceCadetPinball
+share/applications/SpaceCadetPinball.desktop
+share/icons/hicolor/128x128/apps/SpaceCadetPinball.png
+share/icons/hicolor/16x16/apps/SpaceCadetPinball.png
+share/icons/hicolor/192x192/apps/SpaceCadetPinball.png
+share/icons/hicolor/32x32/apps/SpaceCadetPinball.png
+share/icons/hicolor/48x48/apps/SpaceCadetPinball.png
+share/metainfo/SpaceCadetPinball.metainfo.xml