diff options
author | Christopher R. Nelson <christopher.nelson@languidnights.com> | 2025-07-20 13:42:01 -0400 |
---|---|---|
committer | Christopher R. Nelson <christopher.nelson@languidnights.com> | 2025-07-20 13:42:01 -0400 |
commit | fa8310b6048e527e23b3ccd1fecf2d05c03d6aaf (patch) | |
tree | bcbff128f95fadf5da2a4093c709d6f56e4060ef /crn | |
parent | 26c6a378a0f4733a4d5d77624eac5cdb192c9a5e (diff) |
add patch (courtesy of Adrian Bunk for debian) to allow black-box
Diffstat (limited to 'crn')
-rw-r--r-- | crn/packages/games.scm | 6 | ||||
-rw-r--r-- | crn/packages/patches/blackbox_c_warnings.patch | 46 | ||||
-rw-r--r-- | crn/packages/patches/cpplint-pytest-version.patch | 13 |
3 files changed, 51 insertions, 14 deletions
diff --git a/crn/packages/games.scm b/crn/packages/games.scm index c41106a..a9ba239 100644 --- a/crn/packages/games.scm +++ b/crn/packages/games.scm @@ -1,4 +1,5 @@ (define-module (crn packages games) + #:use-module (crn packages) #:use-module (gnu packages) #:use-module (gnu packages sdl) #:use-module ((guix licenses) #:prefix license:) @@ -18,7 +19,8 @@ (method url-fetch) (uri (string-append "https://www.linux-games.com/" name "/" name "-" version ".tar.gz")) (sha256 - (base32 "1gbkkf05qy6zz0s2v1yyjrhrnw0nxl1ldzm4fdlwi1z4jqda7xlw")))) + (base32 "1gbkkf05qy6zz0s2v1yyjrhrnw0nxl1ldzm4fdlwi1z4jqda7xlw")) + (patches (crn/search-patches "blackbox_c_warnings.patch")))) (build-system gnu-build-system) (arguments `(#:phases @@ -37,3 +39,5 @@ crystals are reflecting the shots. You have to guess where the crystals are hidden, by watching your shots.") (home-page "https://www.linux-games.com/black-box/") (license license:gpl2+))) + +black-box diff --git a/crn/packages/patches/blackbox_c_warnings.patch b/crn/packages/patches/blackbox_c_warnings.patch new file mode 100644 index 0000000..2c57daa --- /dev/null +++ b/crn/packages/patches/blackbox_c_warnings.patch @@ -0,0 +1,46 @@ +Description: Fix compiler warnings in blackbox.c +Author: Adrian Bunk <bunk@debian.org> + +--- black-box-1.4.8.orig/src/blackbox.c ++++ black-box-1.4.8/src/blackbox.c +@@ -27,6 +27,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <time.h> + #include <SDL.h> + #include <SDL_image.h> + #include <SDL_timer.h> +@@ -553,6 +554,11 @@ void show_real() + SDL_UpdateRect(screen,0,0,0,0); + } + ++static int abrand(int a,int b) //random number between a and b (inclusive) ++{ ++ return(a+(rand() % (b-a+1))); ++} ++ + void generate_field() + { + int x,y; +@@ -852,11 +858,6 @@ void click() + this_turn_demo=0; + } + +-int abrand(int a,int b) //random number between a and b (inclusive) +-{ +- return(a+(rand() % (b-a+1))); +-} +- + void get_click() + { + while ( SDL_WaitEvent(&event) >= 0 ) { +@@ -895,7 +896,7 @@ void init_sound() + } + } + +-main(int argc, char *argv[]) ++int main(int argc, char *argv[]) + { + printf("\nBlack-Box version %s, Copyright (C) 2000-2008 Karl Bartel\n",VERSION); + printf("Black-Box comes with ABSOLUTELY NO WARRANTY; for details see COPYING'.\n"); diff --git a/crn/packages/patches/cpplint-pytest-version.patch b/crn/packages/patches/cpplint-pytest-version.patch deleted file mode 100644 index a388d4a..0000000 --- a/crn/packages/patches/cpplint-pytest-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup.py b/setup.py -index 0297e74..357adcb 100755 ---- a/setup.py -+++ b/setup.py -@@ -75,7 +75,7 @@ setup(name='cpplint', - long_description=open('README.rst').read(), - license='BSD-3-Clause', - setup_requires=[ -- "pytest-runner==5.2" -+ "pytest-runner" - ], - tests_require=test_required, - # extras_require allow pip install .[dev] |