Compare commits

...

4 commits

Author SHA1 Message Date
Rodion Goritskov
6a5f6787a9 Merge branch 'add-fallout' into 'master'
nongnu: Add fallout1-ce and fallout2-ce.

See merge request nonguix/nonguix!622
2025-09-11 22:55:30 +00:00
Rodion Goritskov
007be48174
nongnu: Add fallout2-ce.
* nongnu/packages/game-development.scm (fallout2-ce): New variable.
2025-04-10 21:59:29 +02:00
Rodion Goritskov
b456314d9f
nongnu: Add fallout1-ce.
* nongnu/packages/game-development.scm (fallout1-ce): New variable.
2025-04-10 21:59:29 +02:00
Rodion Goritskov
0738986220
nongnu: Add fpattern.
* nongnu/packages/game-development.scm (fpattern): New variable.
2025-04-10 21:59:25 +02:00
3 changed files with 143 additions and 0 deletions

View file

@ -8,7 +8,10 @@
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module ((nonguix licenses) :prefix license:) #:use-module ((nonguix licenses) :prefix license:)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (nongnu packages)
#:use-module (nonguix build-system binary) #:use-module (nonguix build-system binary)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix gexp) #:use-module (guix gexp)
@ -17,6 +20,7 @@
#:use-module ((guix licenses) :prefix license:) #:use-module ((guix licenses) :prefix license:)
#:use-module (gnu packages audio) #:use-module (gnu packages audio)
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages gcc) #:use-module (gnu packages gcc)
#:use-module (gnu packages gl) #:use-module (gnu packages gl)
#:use-module (gnu packages gtk) #:use-module (gnu packages gtk)
@ -232,6 +236,110 @@ with game files or or put @file{.grp} game files manually in
(list license:gpl2 (list license:gpl2
(license:nonfree "file://package/common/buildlic.txt"))))) (license:nonfree "file://package/common/buildlic.txt")))))
(define-public fallout1-ce
(package
(name "fallout1-ce")
(version "1.1.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/alexbatalov/fallout1-ce")
(commit (string-append "v" version))))
(patches (nongnu-patches "fallout1-ce-unbundle-fpattern.patch"))
(sha256
(base32 "0c11zbvja42s0z8zqfm6gf981m0v2vwxvhqas46lplwbfhbnh836"))))
(build-system cmake-build-system)
(arguments
(list
#:tests? #f
#:phases #~(modify-phases %standard-phases
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(mkdir-p bin)
(copy-file "fallout-ce"
(string-append bin "/fallout1-ce"))))))))
(inputs (list sdl2 fpattern))
(home-page "https://github.com/alexbatalov/fallout1-ce")
(synopsis
"Fallout Community Edition is an engine rewrite for modern OS")
(description
"Fallout Community Edition is a fully working re-implementation of Fallout,
with the same original gameplay, engine bugfixes, and some quality of life
improvements, that works (mostly) hassle-free on multiple platforms.")
(license
(license:nonfree
"https://raw.githubusercontent.com/alexbatalov/fallout1-ce/main/LICENSE.md"))))
(define-public fallout2-ce
(package
(name "fallout2-ce")
(version "1.3.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/alexbatalov/fallout2-ce")
(commit (string-append "v" version))))
(patches (nongnu-patches "fallout2-ce-unbundle-fpattern.patch"))
(sha256
(base32 "15b30i2ixq0w01qxrymd1qs1awj8kijbqzac8wvfrpm85fdnfnmg"))))
(build-system cmake-build-system)
(arguments
(list
#:tests? #f
#:phases #~(modify-phases %standard-phases
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(mkdir-p bin)
(copy-file "fallout2-ce"
(string-append bin "/fallout2-ce"))))))))
(inputs (list sdl2 fpattern zlib))
(home-page "https://github.com/alexbatalov/fallout2-ce")
(synopsis
"Fallout 2 Community Edition is an engine rewrite for modern OS")
(description
"Fallout 2 Community Edition is a fully working re-implementation of
Fallout 2, with the same original gameplay, engine bugfixes, and some quality of
life improvements, that works (mostly) hassle-free on multiple platforms.")
(license
(license:nonfree
"https://raw.githubusercontent.com/alexbatalov/fallout2-ce/main/LICENSE.md"))))
(define-public fpattern
(package
(name "fpattern")
(version "1.9")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Loadmaster/fpattern")
(commit (string-append "v" version))))
(sha256
(base32 "0lm5afk18a6m4wib4xvslik9zz00r36zvdrrgjbwd8d8550cq2zx"))))
(build-system copy-build-system)
(arguments
(list
#:phases #~(modify-phases %standard-phases
(add-before 'install 'build-library
(lambda* (#:key inputs #:allow-other-keys)
(invoke "gcc" "-c" "-Wall" "-fpic" "fpattern.c")
(invoke "gcc" "-shared" "-o" "libfpattern.so"
"fpattern.o"))))
#:install-plan ''(("libfpattern.so" "lib/")
("fpattern.h" "include/"))))
(home-page "https://github.com/Loadmaster/fpattern")
(synopsis "Filename pattern matching library functions for C")
(description
"Functions for matching filename patterns to filenames. Written in C.
Provided as an object file (fpattern.so) and a header include source file.")
(license license:expat)))
(define-public fury (define-public fury
(package/inherit eduke32 (package/inherit eduke32
(name "fury") (name "fury")

View file

@ -0,0 +1,18 @@
Originally fallout1-ce has the fpattern library bundled in the repo.
This patch unbundles it.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bd50a9e..afdb04c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -353,7 +353,9 @@ else()
find_package(SDL2)
endif()
-add_subdirectory("third_party/fpattern")
+find_path(FPATTERN_INCLUDE_DIR fpattern.h)
+find_library(FPATTERN_LIBRARY libfpattern.so)
+
target_link_libraries(${EXECUTABLE_NAME} ${FPATTERN_LIBRARY})
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${FPATTERN_INCLUDE_DIR})

View file

@ -0,0 +1,17 @@
Originally fallout2-ce has the fpattern library bundled in the repo.
This patch unbundles it.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2de2af1..f6c6ace 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -360,7 +360,8 @@ if(APPLE)
set(MACOSX_BUNDLE_BUNDLE_VERSION "1.3.0")
endif()
-add_subdirectory("third_party/fpattern")
+find_library(FPATTERN_LIBRARY libfpattern.so)
+find_path(FPATTERN_INCLUDE_DIR fpattern.h)
target_link_libraries(${EXECUTABLE_NAME} ${FPATTERN_LIBRARY})
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${FPATTERN_INCLUDE_DIR})