mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2025-10-02 02:14:59 +00:00
Merge branch 'add-fallout' into 'master'
nongnu: Add fallout1-ce and fallout2-ce. See merge request nonguix/nonguix!622
This commit is contained in:
commit
6a5f6787a9
3 changed files with 143 additions and 0 deletions
|
@ -8,7 +8,10 @@
|
|||
#:use-module (srfi srfi-1)
|
||||
#:use-module ((nonguix licenses) :prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (nongnu packages)
|
||||
#: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 download)
|
||||
#:use-module (guix gexp)
|
||||
|
@ -17,6 +20,7 @@
|
|||
#:use-module ((guix licenses) :prefix license:)
|
||||
#:use-module (gnu packages audio)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages gcc)
|
||||
#:use-module (gnu packages gl)
|
||||
#:use-module (gnu packages gtk)
|
||||
|
@ -232,6 +236,110 @@ with game files or or put @file{.grp} game files manually in
|
|||
(list license:gpl2
|
||||
(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
|
||||
(package/inherit eduke32
|
||||
(name "fury")
|
||||
|
|
18
nongnu/packages/patches/fallout1-ce-unbundle-fpattern.patch
Normal file
18
nongnu/packages/patches/fallout1-ce-unbundle-fpattern.patch
Normal 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})
|
||||
|
17
nongnu/packages/patches/fallout2-ce-unbundle-fpattern.patch
Normal file
17
nongnu/packages/patches/fallout2-ce-unbundle-fpattern.patch
Normal 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})
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue