Merge pull request #65493 from virusdave/dnicponski/scratch/add_dcss
games/crawl: add support for MacOS/Darwin builds for Dungeon Crawl
This commit is contained in:
commit
bca933e217
@ -1,6 +1,19 @@
|
|||||||
diff -ru3 crawl-ref-0.23.2-src-old/crawl-ref/source/Makefile crawl-ref-0.23.2-src-new/crawl-ref/source/Makefile
|
diff -ru3 crawl-ref-0.23.2-src-old/crawl-ref/source/Makefile crawl-ref-0.23.2-src-new/crawl-ref/source/Makefile
|
||||||
--- crawl-ref-0.23.2-src-old/crawl-ref/source/Makefile 1970-01-01 03:00:01.000000000 +0300
|
--- crawl-ref-0.23.2-src-old/crawl-ref/source/Makefile 1970-01-01 03:00:01.000000000 +0300
|
||||||
+++ crawl-ref-0.23.2-src-new/crawl-ref/source/Makefile 2017-07-27 14:45:34.611221571 +0300
|
+++ crawl-ref-0.23.2-src-new/crawl-ref/source/Makefile 2017-07-27 14:45:34.611221571 +0300
|
||||||
|
@@ -224,9 +224,9 @@
|
||||||
|
STRIP := strip -x
|
||||||
|
NEED_APPKIT = YesPlease
|
||||||
|
LIBNCURSES_IS_UNICODE = Yes
|
||||||
|
- NO_PKGCONFIG = Yes
|
||||||
|
- BUILD_SQLITE = YesPlease
|
||||||
|
- BUILD_ZLIB = YesPlease
|
||||||
|
+ #NO_PKGCONFIG = Yes
|
||||||
|
+ #BUILD_SQLITE = YesPlease
|
||||||
|
+ #BUILD_ZLIB = YesPlease
|
||||||
|
ifdef TILES
|
||||||
|
EXTRA_LIBS += -framework AppKit -framework AudioUnit -framework CoreAudio -framework ForceFeedback -framework Carbon -framework IOKit -framework OpenGL -framework AudioToolbox -framework CoreVideo contrib/install/$(ARCH)/lib/libSDL2main.a
|
||||||
|
BUILD_FREETYPE = YesPlease
|
||||||
@@ -286,13 +286,7 @@
|
@@ -286,13 +286,7 @@
|
||||||
LIBZ := contrib/install/$(ARCH)/lib/libz.a
|
LIBZ := contrib/install/$(ARCH)/lib/libz.a
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, which, sqlite, lua5_1, perl, python3, zlib, pkgconfig, ncurses
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, which, sqlite, lua5_1, perl, python3, zlib, pkgconfig, ncurses
|
||||||
, dejavu_fonts, libpng, SDL2, SDL2_image, SDL2_mixer, libGLU_combined, freetype, pngcrush, advancecomp
|
, dejavu_fonts, libpng, SDL2, SDL2_image, SDL2_mixer, libGLU_combined, freetype, pngcrush, advancecomp
|
||||||
, tileMode ? false, enableSound ? tileMode
|
, tileMode ? false, enableSound ? tileMode
|
||||||
|
|
||||||
|
# MacOS / Darwin builds
|
||||||
|
, darwin ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -15,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./crawl_purify.patch # Patch hard-coded paths
|
./crawl_purify.patch # Patch hard-coded paths and remove force library builds
|
||||||
(fetchpatch { # Use a nice high-res app icon
|
(fetchpatch { # Use a nice high-res app icon
|
||||||
url = "https://github.com/crawl/crawl/commit/2aa1166087e44e6585b26cedf1fe81b3f3ba547f.patch";
|
url = "https://github.com/crawl/crawl/commit/2aa1166087e44e6585b26cedf1fe81b3f3ba547f.patch";
|
||||||
sha256 = "1jqrdv4wy18shg1fdabdb421232hg5micphkixcyzxd1lrmvadg0";
|
sha256 = "1jqrdv4wy18shg1fdabdb421232hg5micphkixcyzxd1lrmvadg0";
|
||||||
@ -28,7 +31,13 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ lua5_1 zlib sqlite ncurses ]
|
buildInputs = [ lua5_1 zlib sqlite ncurses ]
|
||||||
++ (with python3.pkgs; [ pyyaml ])
|
++ (with python3.pkgs; [ pyyaml ])
|
||||||
++ lib.optionals tileMode [ libpng SDL2 SDL2_image freetype libGLU_combined ]
|
++ lib.optionals tileMode [ libpng SDL2 SDL2_image freetype libGLU_combined ]
|
||||||
++ lib.optional enableSound SDL2_mixer;
|
++ lib.optional enableSound SDL2_mixer
|
||||||
|
++ (lib.optionals stdenv.isDarwin (
|
||||||
|
assert (lib.assertMsg (darwin != null) "Must have darwin frameworks available for darwin builds");
|
||||||
|
with darwin.apple_sdk.frameworks; [
|
||||||
|
AppKit AudioUnit CoreAudio ForceFeedback Carbon IOKit OpenGL
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
cd crawl-ref/source
|
cd crawl-ref/source
|
||||||
@ -64,7 +73,7 @@ stdenv.mkDerivation rec {
|
|||||||
with dangerous and unfriendly monsters in a quest to rescue the
|
with dangerous and unfriendly monsters in a quest to rescue the
|
||||||
mystifyingly fabulous Orb of Zot.
|
mystifyingly fabulous Orb of Zot.
|
||||||
'';
|
'';
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
license = with licenses; [ gpl2Plus bsd2 bsd3 mit licenses.zlib cc0 ];
|
license = with licenses; [ gpl2Plus bsd2 bsd3 mit licenses.zlib cc0 ];
|
||||||
maintainers = [ maintainers.abbradar ];
|
maintainers = [ maintainers.abbradar ];
|
||||||
};
|
};
|
||||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||||||
description = ''A set of tools to optimize deflate-compressed files'';
|
description = ''A set of tools to optimize deflate-compressed files'';
|
||||||
license = licenses.gpl3 ;
|
license = licenses.gpl3 ;
|
||||||
maintainers = [ maintainers.raskin ];
|
maintainers = [ maintainers.raskin ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
homepage = https://github.com/amadvance/advancecomp;
|
homepage = https://github.com/amadvance/advancecomp;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user