From 291b4dc39d94b703935a64a85a0cf4eed36fcd8a Mon Sep 17 00:00:00 2001 From: Alexander Pavlov Date: Sun, 26 Nov 2023 13:58:10 +0300 Subject: [PATCH] Added BSD templates. --- .../freebsd/ports/serioussam-vk/Makefile | 62 ++++++++++++++++ .../freebsd/ports/serioussam-vk/distinfo | 3 + .../files/patch-SamTFE_Sources_CMakeLists.txt | 14 ++++ .../files/patch-SamTSE_Sources_CMakeLists.txt | 14 ++++ .../freebsd/ports/serioussam-vk/pkg-descr | 24 +++++++ .../freebsd/ports/serioussam-vk/pkg-plist | 32 +++++++++ .../openbsd/ports/serioussam-vk/Makefile | 72 +++++++++++++++++++ .../openbsd/ports/serioussam-vk/distinfo | 2 + .../patch-SamTFE_Sources_CMakeLists.txt | 14 ++++ .../patch-SamTSE_Sources_CMakeLists.txt | 14 ++++ .../openbsd/ports/serioussam-vk/pkg/DESCR | 9 +++ .../openbsd/ports/serioussam-vk/pkg/PLIST | 38 ++++++++++ .../openbsd/ports/serioussam-vk/pkg/README | 19 +++++ 13 files changed, 317 insertions(+) create mode 100644 templates/freebsd/ports/serioussam-vk/Makefile create mode 100644 templates/freebsd/ports/serioussam-vk/distinfo create mode 100644 templates/freebsd/ports/serioussam-vk/files/patch-SamTFE_Sources_CMakeLists.txt create mode 100644 templates/freebsd/ports/serioussam-vk/files/patch-SamTSE_Sources_CMakeLists.txt create mode 100644 templates/freebsd/ports/serioussam-vk/pkg-descr create mode 100644 templates/freebsd/ports/serioussam-vk/pkg-plist create mode 100644 templates/openbsd/ports/serioussam-vk/Makefile create mode 100644 templates/openbsd/ports/serioussam-vk/distinfo create mode 100644 templates/openbsd/ports/serioussam-vk/patches/patch-SamTFE_Sources_CMakeLists.txt create mode 100644 templates/openbsd/ports/serioussam-vk/patches/patch-SamTSE_Sources_CMakeLists.txt create mode 100644 templates/openbsd/ports/serioussam-vk/pkg/DESCR create mode 100644 templates/openbsd/ports/serioussam-vk/pkg/PLIST create mode 100644 templates/openbsd/ports/serioussam-vk/pkg/README diff --git a/templates/freebsd/ports/serioussam-vk/Makefile b/templates/freebsd/ports/serioussam-vk/Makefile new file mode 100644 index 00000000..a17f57fd --- /dev/null +++ b/templates/freebsd/ports/serioussam-vk/Makefile @@ -0,0 +1,62 @@ +PORTNAME= serioussam-vk +DISTNAME= SeriousSamClassic-VK +DISTVERSION= 1.10.6b +PORTREVISION= 1 +CATEGORIES= games + +MAINTAINER= YOUR@MAIL +COMMENT= Serious Sam Classic is open source game engine with vulkan support +WWW= https://github.com/tx00100xt/SeriousSamClassic-VK + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE + +# The source code also contains definitions for +# architectures riscv64 s390x powerpc64le. +# Building code for them workd. +# Work on real hardware has been +# tested for architectures: armv7 aaarch64 under Linux +ONLY_FOR_ARCHS= amd64 i386 + +BUILD_DEPENDS= flex:textproc/flex \ + vulkan-headers>0:graphics/vulkan-headers \ + convert:graphics/ImageMagick7 + +# Libraries loaded with dlopen(3) +LIB_DEPENDS= libogg.so:audio/libogg \ + libvorbis.so:audio/libvorbis \ + libvorbisfile.so:audio/libvorbis \ + libvulkan.so:graphics/vulkan-loader + +USES= bison:build cmake compiler:c++11-lang sdl desktop-file-utils +USE_CXXSTD= c++14 +USE_SDL= sdl2 + +CONFLICTS= serioussam + +GH_ACCOUNT= tx00100xt +GH_PROJECT= SeriousSamClassic-VK +USE_GITHUB= yes + +CMAKE_ARGS= -DRPI4:BOOL=FALSE -DUSE_ASM:BOOL=TRUE \ + -DUSE_SYSTEM_INSTALL:BOOL=TRUE -DUSE_I386_NASM_ASM:BOOL=FALSE + +post-install: + ${INSTALL_MAN} ${WRKSRC}/man/bsd/serioussam-vk.1 ${STAGEDIR}${PREFIX}/man/man1/serioussam-vk.1 + ${INSTALL_MAN} ${WRKSRC}/man/bsd/serioussamclassic-vk.1 ${STAGEDIR}${PREFIX}/man/man1/serioussamclassic-vk.1 + +.include + +# Unocmment this for aarch64 and armv7 architectures +#.if ${ARCH} == aarch64 || ${ARCH} == armv7 +#CMAKE_ON= RPI4 +#.endif + +.if ${ARCH} == i386 +CMAKE_ON= USE_I386_NASM_ASM +BUILD_DEPENDS+= nasm:devel/nasm +CFLAGS+= -mmmx +CXXFLAGS+= -mmmx +.endif + +.include diff --git a/templates/freebsd/ports/serioussam-vk/distinfo b/templates/freebsd/ports/serioussam-vk/distinfo new file mode 100644 index 00000000..9fa3a87c --- /dev/null +++ b/templates/freebsd/ports/serioussam-vk/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1700987196 +SHA256 (tx00100xt-SeriousSamClassic-VK-1.10.6b_GH0.tar.gz) = 02445f20e3b56cd5440d1904d5a6eb6f2bbdb6d411bddd99f937b9b4b91ed3ad +SIZE (tx00100xt-SeriousSamClassic-VK-1.10.6b_GH0.tar.gz) = 21943260 diff --git a/templates/freebsd/ports/serioussam-vk/files/patch-SamTFE_Sources_CMakeLists.txt b/templates/freebsd/ports/serioussam-vk/files/patch-SamTFE_Sources_CMakeLists.txt new file mode 100644 index 00000000..e2aad7cc --- /dev/null +++ b/templates/freebsd/ports/serioussam-vk/files/patch-SamTFE_Sources_CMakeLists.txt @@ -0,0 +1,14 @@ +--- SamTFE/Sources/CMakeLists.txt.orig 2023-11-16 16:32:55 UTC ++++ SamTFE/Sources/CMakeLists.txt +@@ -265,9 +265,9 @@ + add_compile_options(-mpowerpc64) + else() + if(LOCAL_INSTALL) +- add_compile_options(-march=native) ++ add_compile_options(-mtune=generic) + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i586|i686|x86|AMD64|x86_64") +- add_compile_options(-march=native) # set mtune=generic if nedded ++ add_compile_options(-mtune=generic) # set mtune=generic if nedded + endif() + endif() + endif diff --git a/templates/freebsd/ports/serioussam-vk/files/patch-SamTSE_Sources_CMakeLists.txt b/templates/freebsd/ports/serioussam-vk/files/patch-SamTSE_Sources_CMakeLists.txt new file mode 100644 index 00000000..6c139074 --- /dev/null +++ b/templates/freebsd/ports/serioussam-vk/files/patch-SamTSE_Sources_CMakeLists.txt @@ -0,0 +1,14 @@ +--- SamTSE/Sources/CMakeLists.txt.orig 2023-11-16 16:32:55 UTC ++++ SamTSE/Sources/CMakeLists.txt +@@ -265,9 +265,9 @@ + add_compile_options(-mpowerpc64) + else() + if(LOCAL_INSTALL) +- add_compile_options(-march=native) ++ add_compile_options(-mtune=generic) + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i586|i686|x86|AMD64|x86_64") +- add_compile_options(-march=native) # set mtune=generic if nedded ++ add_compile_options(-mtune=generic) # set mtune=generic if nedded + endif() + endif() + endif diff --git a/templates/freebsd/ports/serioussam-vk/pkg-descr b/templates/freebsd/ports/serioussam-vk/pkg-descr new file mode 100644 index 00000000..6ef7e37f --- /dev/null +++ b/templates/freebsd/ports/serioussam-vk/pkg-descr @@ -0,0 +1,24 @@ +Open source game engine version developed by Croteam for +Serious Sam Classic included First and Second Encounter with vulkan support. + +Serious Sam: is a high-adrenaline action-arcade shooter heavily focused +on frantic arcade-style single player action. In a world where cyberpunk +meets fantasy-fiction and advanced technology is mixed with black magic +and psycho-powers, Sam travels through the beautiful world of ancient Egypt +and several diverse planets, confronting countless Mental's minions on his way +to the Mental's base. + +Playing Serious Sam: The First and Second Encounter still requires Steam or +GOG or CD copy of the game. +This implementation of the source code provides for installation in the system, +in the /usr/local/bin, /usr/local/lib, /usr/local/share directories. + +Copy all content of the games Serious Sam Classic First Encounter and +Serious Sam Classic Second Encounter to the appropriate directories: + +~/.local/share/Serious-Engine/serioussam/ - for TFE +~/.local/share/Serious-Engine/serioussamse/ - for TSE + +They'll be here user data, such as game settings, log, saves, demos. +For more information, see: +https://github.com/tx00100xt/SeriousSamClassic/wiki diff --git a/templates/freebsd/ports/serioussam-vk/pkg-plist b/templates/freebsd/ports/serioussam-vk/pkg-plist new file mode 100644 index 00000000..15632ecf --- /dev/null +++ b/templates/freebsd/ports/serioussam-vk/pkg-plist @@ -0,0 +1,32 @@ +bin/serioussam +lib/serioussam/libShaders.so +lib/serioussam/libGame.so +lib/serioussam/libEntities.so +lib/libEngine.so +bin/serioussam-ded +bin/serioussam-mkfont +lib/serioussam/libamp11lib.so +share/serioussam/SE1_10b.gro +share/applications/serioussam.desktop +share/icons/hicolor/16x16/apps/serioussam.png +share/icons/hicolor/32x32/apps/serioussam.png +share/icons/hicolor/48x48/apps/serioussam.png +share/icons/hicolor/64x64/apps/serioussam.png +share/icons/hicolor/128x128/apps/serioussam.png +bin/serioussamse +lib/serioussamse/libShaders.so +lib/serioussamse/libGameMP.so +lib/serioussamse/libEntitiesMP.so +lib/libEngineMP.so +bin/serioussamse-ded +bin/serioussamse-mkfont +lib/serioussamse/libamp11lib.so +share/serioussamse/SE1_10b.gro +share/applications/serioussamse.desktop +share/icons/hicolor/16x16/apps/serioussamse.png +share/icons/hicolor/32x32/apps/serioussamse.png +share/icons/hicolor/48x48/apps/serioussamse.png +share/icons/hicolor/64x64/apps/serioussamse.png +share/icons/hicolor/128x128/apps/serioussamse.png +man/man1/serioussam-vk.1.gz +man/man1/serioussamclassic-vk.1.gz diff --git a/templates/openbsd/ports/serioussam-vk/Makefile b/templates/openbsd/ports/serioussam-vk/Makefile new file mode 100644 index 00000000..eeb7954a --- /dev/null +++ b/templates/openbsd/ports/serioussam-vk/Makefile @@ -0,0 +1,72 @@ +# The source code also contains definitions for +# architectures riscv64 s390x powerpc64le. +# Building code for them workd. +# Work on real hardware has been +# tested for architectures: armv7 aaarch64 under Linux + +ONLY_FOR_ARCHS = amd64 i386 + +GH_ACCOUNT = tx00100xt +GH_PROJECT = SeriousSamClassic-VK +GH_TAGNAME = 1.10.6b + +COMMENT = Open source version Serious Sam Classic with vulkan support +N= serioussam-vk +V= 1.10.6b +PKGNAME = ${N}-${V} +DISTNAME = SeriousSamClassic-VK-${V} +CATEGORIES = games +REVISION = 1 + +HOMEPAGE = https://github.com/tx00100xt/SeriousSamClassic-VK + +MAINTAINER = YOUR NAME + +# GPLv2 +PERMIT_PACKAGE = Yes + +WANTLIB += ${COMPILER_LIBCXX} SDL2 c m z ogg \ + pthread vorbis vorbisfile +# pthread vorbis vorbisfile vulkan + +MODULES = devel/cmake + +COMPILER = base-clang ports-gcc + +CONFIGURE_ARGS += -DUSE_SYSTEM_INSTALL=ON + +BUILD_DEPENDS = devel/sdl2 \ + devel/bison \ + audio/libvorbis \ + audio/libogg \ + graphics/vulkan-headers \ + graphics/ImageMagick + +# Libraries loaded with dlopen(3) +LIB_DEPENDS = devel/sdl2 \ + audio/libvorbis \ + audio/libogg \ + graphics/vulkan-loader + +NO_TEST = Yes + +# Unocmment this for aarch64 and armv7 architectures +#.if ${MACHINE_ARCH} == aarch64 || ${MACHINE_ARCH} == armv7 +#CONFIGURE_ARGS += -DRPI4=ON +#.endif + +.if ${MACHINE_ARCH} == amd64 +CONFIGURE_ARGS += -DUSE_ASM=ON +CXXFLAGS += -Wno-nullability-completeness +.endif + +.if ${MACHINE_ARCH}== i386 +CXXFLAGS += -Wno-nullability-completeness +CONFIGURE_ARGS += -DUSE_ASM=ON -DUSE_I386_NASM_ASM=ON +.endif + +post-install: + ${INSTALL_MAN} ${WRKSRC}/man/bsd/serioussam-vk.1 ${PREFIX}/man/man1/serioussam-vk.1 + ${INSTALL_MAN} ${WRKSRC}/man/bsd/serioussamclassic-vk.1 ${PREFIX}/man/man1/serioussamclassic-vk.1 + +.include diff --git a/templates/openbsd/ports/serioussam-vk/distinfo b/templates/openbsd/ports/serioussam-vk/distinfo new file mode 100644 index 00000000..d1d726ba --- /dev/null +++ b/templates/openbsd/ports/serioussam-vk/distinfo @@ -0,0 +1,2 @@ +SHA256 (SeriousSamClassic-VK-1.10.6b.tar.gz) = /FWzlahe6vltD5SxXFoKDpC4dmGDIKXUKgRZ/gcJY0c= +SIZE (SeriousSamClassic-VK-1.10.6b.tar.gz) = 47882250 diff --git a/templates/openbsd/ports/serioussam-vk/patches/patch-SamTFE_Sources_CMakeLists.txt b/templates/openbsd/ports/serioussam-vk/patches/patch-SamTFE_Sources_CMakeLists.txt new file mode 100644 index 00000000..e2aad7cc --- /dev/null +++ b/templates/openbsd/ports/serioussam-vk/patches/patch-SamTFE_Sources_CMakeLists.txt @@ -0,0 +1,14 @@ +--- SamTFE/Sources/CMakeLists.txt.orig 2023-11-16 16:32:55 UTC ++++ SamTFE/Sources/CMakeLists.txt +@@ -265,9 +265,9 @@ + add_compile_options(-mpowerpc64) + else() + if(LOCAL_INSTALL) +- add_compile_options(-march=native) ++ add_compile_options(-mtune=generic) + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i586|i686|x86|AMD64|x86_64") +- add_compile_options(-march=native) # set mtune=generic if nedded ++ add_compile_options(-mtune=generic) # set mtune=generic if nedded + endif() + endif() + endif diff --git a/templates/openbsd/ports/serioussam-vk/patches/patch-SamTSE_Sources_CMakeLists.txt b/templates/openbsd/ports/serioussam-vk/patches/patch-SamTSE_Sources_CMakeLists.txt new file mode 100644 index 00000000..6c139074 --- /dev/null +++ b/templates/openbsd/ports/serioussam-vk/patches/patch-SamTSE_Sources_CMakeLists.txt @@ -0,0 +1,14 @@ +--- SamTSE/Sources/CMakeLists.txt.orig 2023-11-16 16:32:55 UTC ++++ SamTSE/Sources/CMakeLists.txt +@@ -265,9 +265,9 @@ + add_compile_options(-mpowerpc64) + else() + if(LOCAL_INSTALL) +- add_compile_options(-march=native) ++ add_compile_options(-mtune=generic) + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i586|i686|x86|AMD64|x86_64") +- add_compile_options(-march=native) # set mtune=generic if nedded ++ add_compile_options(-mtune=generic) # set mtune=generic if nedded + endif() + endif() + endif diff --git a/templates/openbsd/ports/serioussam-vk/pkg/DESCR b/templates/openbsd/ports/serioussam-vk/pkg/DESCR new file mode 100644 index 00000000..a48ded49 --- /dev/null +++ b/templates/openbsd/ports/serioussam-vk/pkg/DESCR @@ -0,0 +1,9 @@ +Open source game engine version developed by Croteam for +Serious Sam Classic included First and Second Encounter with vulkan support. + +Serious Sam: is a high-adrenaline action-arcade shooter heavily +focused on frantic arcade-style single player action. In a world where cyberpunk +meets fantasy-fiction and advanced technology is mixed with black magic +and psycho-powers, Sam travels through the beautiful world of ancient Egypt +and several diverse planets, confronting countless Mental's minions on his way +to the Mental's base. diff --git a/templates/openbsd/ports/serioussam-vk/pkg/PLIST b/templates/openbsd/ports/serioussam-vk/pkg/PLIST new file mode 100644 index 00000000..c2df7bb3 --- /dev/null +++ b/templates/openbsd/ports/serioussam-vk/pkg/PLIST @@ -0,0 +1,38 @@ +@conflict serioussam-* +@bin bin/serioussam +@bin bin/serioussam-ded +@bin bin/serioussam-mkfont +@so lib/libEngine.so +lib/serioussam/ +@so lib/serioussam/libShaders.so +@so lib/serioussam/libGame.so +@so lib/serioussam/libEntities.so +@so lib/serioussam/libamp11lib.so +share/serioussam/ +share/serioussam/SE1_10b.gro +share/applications/serioussam.desktop +share/icons/hicolor/16x16/apps/serioussam.png +share/icons/hicolor/32x32/apps/serioussam.png +share/icons/hicolor/48x48/apps/serioussam.png +share/icons/hicolor/64x64/apps/serioussam.png +share/icons/hicolor/128x128/apps/serioussam.png +@bin bin/serioussamse +@bin bin/serioussamse-ded +@bin bin/serioussamse-mkfont +@so lib/libEngineMP.so +lib/serioussamse/ +@so lib/serioussamse/libShaders.so +@so lib/serioussamse/libGameMP.so +@so lib/serioussamse/libEntitiesMP.so +@so lib/serioussamse/libamp11lib.so +share/serioussamse/ +share/serioussamse/SE1_10b.gro +share/applications/serioussamse.desktop +share/icons/hicolor/16x16/apps/serioussamse.png +share/icons/hicolor/32x32/apps/serioussamse.png +share/icons/hicolor/48x48/apps/serioussamse.png +share/icons/hicolor/64x64/apps/serioussamse.png +share/icons/hicolor/128x128/apps/serioussamse.png +man/man1/serioussam-vk.1 +man/man1/serioussamclassic-vk.1 +share/doc/pkg-readmes/${PKGSTEM} diff --git a/templates/openbsd/ports/serioussam-vk/pkg/README b/templates/openbsd/ports/serioussam-vk/pkg/README new file mode 100644 index 00000000..4d4faaba --- /dev/null +++ b/templates/openbsd/ports/serioussam-vk/pkg/README @@ -0,0 +1,19 @@ ++----------------------------------------------------------------------- +| Running ${PKGSTEM} on OpenBSD ++----------------------------------------------------------------------- + +Playing Serious Sam: The First and Second Encounter still requires Steam +or GOG or CD copy of the game. This implementation of the source code +provides for installation in the system, in the +/usr/local/bin, /usr/local/lib, /usr/local/share directories. + +Copy all content of the games Serious Sam Classic First Encounter and +Serious Sam Classic Second Encounter to the appropriate directories: + +~/.local/share/Serious-Engine/serioussam/ - for TFE +~/.local/share/Serious-Engine/serioussamse/ - for TSE + +They'll be here user data, such as game settings, log, saves, demos. + +For more information, see: +https://github.com/tx00100xt/SeriousSamClassic-VK/wiki