summaryrefslogtreecommitdiff
path: root/rodion
diff options
context:
space:
mode:
authorRodion Goritskov <rodion.goritskov@gmail.com>2024-05-12 02:35:54 +0400
committerRodion Goritskov <rodion.goritskov@gmail.com>2024-05-12 02:35:54 +0400
commitbe613dd7154f163bde2ce53e7d0e3f80a269d79a (patch)
tree51ac893f60b3d181b7bfc946d1b2cb81249d8184 /rodion
parentbd9c7dc46bc3fbe63dc2e5e848c42656415e2ce4 (diff)
gnu: Add fallout-ce.
* rodion/packages/fonts.scm (fpattern): New variable. * rodion/packages/fonts.scm (fallout-ce): New variable.
Diffstat (limited to 'rodion')
-rw-r--r--rodion/packages/fonts.scm3
-rw-r--r--rodion/packages/fpattern.patch15
-rw-r--r--rodion/packages/games.scm70
3 files changed, 86 insertions, 2 deletions
diff --git a/rodion/packages/fonts.scm b/rodion/packages/fonts.scm
index 2db6bbb..0081423 100644
--- a/rodion/packages/fonts.scm
+++ b/rodion/packages/fonts.scm
@@ -41,7 +41,6 @@
(description
"Font Awesome is a full suite of pictographic icons for easy scalable
vector graphics.")
- (license license:silofl1.1)
- ))
+ (license license:silofl1.1)))
diff --git a/rodion/packages/fpattern.patch b/rodion/packages/fpattern.patch
new file mode 100644
index 0000000..d2772c5
--- /dev/null
+++ b/rodion/packages/fpattern.patch
@@ -0,0 +1,15 @@
+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})
+
diff --git a/rodion/packages/games.scm b/rodion/packages/games.scm
new file mode 100644
index 0000000..749806f
--- /dev/null
+++ b/rodion/packages/games.scm
@@ -0,0 +1,70 @@
+(define-module (rodion packages games)
+ #:use-module (guix packages)
+ #:use-module (guix build-system copy)
+ #:use-module (guix build-system cmake)
+ #:use-module (guix git-download)
+ #:use-module (guix gexp)
+ #:use-module (gnu packages sdl)
+ #:use-module ((guix licenses) #:prefix license:))
+
+(define-public fpattern
+ (package
+ (name "fpattern")
+ (version "1.9")
+ (build-system copy-build-system)
+ (home-page "https://github.com/Loadmaster/fpattern")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Loadmaster/fpattern")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "0lm5afk18a6m4wib4xvslik9zz00r36zvdrrgjbwd8d8550cq2zx"))))
+ (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/"))))
+ (license license:expat)
+ (description "Filename pattern matching library functions")
+ (synopsis "Filename pattern matching library functions for DOS, Windows, and Unix.
+
+Functions for matching filename patterns to filenames. Written in C. Provided as an object file (fpattern.obj) and a header include source file (fpattern.h).
+
+Filename patterns are composed of regular (printable) characters which may comprise a filename, as well as special pattern matching characters. A filename patterns is a special kind of regular expression, except that it is not as general and is designed to match only file and directory names instead of arbitrary text strings. The syntax is borrowed from Unix, and is a superset of the MS-DOS and Windows syntax.")))
+
+(define-public fallout-ce
+ (package
+ (name "fallout-ce")
+ (version "1.1.0")
+ (build-system cmake-build-system)
+ (home-page "https://github.com/alexbatalov/fallout1-ce")
+ (inputs (list sdl2
+ fpattern))
+ (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 "/fallout-ce"))))))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alexbatalov/fallout1-ce")
+ (commit (string-append "v" version))))
+ (patches `(,(local-file "./fpattern.patch")))
+ (sha256
+ (base32 "0c11zbvja42s0z8zqfm6gf981m0v2vwxvhqas46lplwbfhbnh836"))))
+ (license license:expat)
+ (description "Fallout")
+ (synopsis "Fallout")))