Merge pull request #71814 from puckipedia/frozen-bubble

frozen-bubble: init at 2.212
This commit is contained in:
Michael Raskin 2019-11-04 06:00:43 +00:00 committed by GitHub
commit d690c20efd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 354 additions and 5 deletions

View file

@ -1,7 +1,8 @@
diff -ru3 SDL-1.2.15/sdl-config.in SDL-1.2.15-new/sdl-config.in
--- SDL-1.2.15/sdl-config.in 2012-01-19 10:30:06.000000000 +0400
+++ SDL-1.2.15-new/sdl-config.in 2016-08-22 05:32:52.716397920 +0300
@@ -42,7 +42,11 @@
diff --git a/sdl-config.in b/sdl-config.in
index e0fcc0c..bf7928a 100644
--- a/sdl-config.in
+++ b/sdl-config.in
@@ -42,14 +42,18 @@ while test $# -gt 0; do
echo @SDL_VERSION@
;;
--cflags)
@ -13,4 +14,13 @@ diff -ru3 SDL-1.2.15/sdl-config.in SDL-1.2.15-new/sdl-config.in
+ echo $SDL_CFLAGS @SDL_CFLAGS@
;;
@ENABLE_SHARED_TRUE@ --libs)
@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
-@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
+@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ $SDL_LIB_PATH
@ENABLE_SHARED_TRUE@ ;;
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
-@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@
+@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ $SDL_LIB_PATH
@ENABLE_STATIC_TRUE@ ;;
*)
echo "${usage}" 1>&2

View file

@ -1,6 +1,7 @@
addSDLPath () {
if [ -e "$1/include/SDL" ]; then
export SDL_PATH="$SDL_PATH $1/include/SDL"
export SDL_LIB_PATH="$SDL_LIB_PATH -L$1/lib"
fi
}

View file

@ -0,0 +1,32 @@
{ stdenv, fetchpatch, fetchurl, SDL, autoreconfHook, pango, pkgconfig }:
stdenv.mkDerivation rec {
pname = "SDL_Pango";
version = "0.1.2";
src = fetchurl {
url = "mirror://sourceforge/sdlpango/${pname}-${version}.tar.gz";
sha256 = "197baw1dsg0p4pljs5k0fshbyki00r4l49m1drlpqw6ggawx6xbz";
};
patches = [
(fetchpatch {
url = https://sources.debian.org/data/main/s/sdlpango/0.1.2-6/debian/patches/api_additions.patch;
sha256 = "00p5ry5gd3ixm257p9i2c4jg0qj8ipk8nf56l7c9fma8id3zxyld";
})
./fixes.patch
];
preConfigure = "autoreconf -i -f";
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [ SDL pango ];
meta = with stdenv.lib; {
description = "Connects the Pango rendering engine to SDL";
license = licenses.lgpl21Plus;
platforms = platforms.all;
homepage = http://sdlpango.sourceforge.net/;
maintainers = with maintainers; [ puckipedia ];
};
}

View file

@ -0,0 +1,148 @@
diff --git a/SDL_Pango.pc.in b/SDL_Pango.pc.in
index 750d091..3af38ff 100644
--- a/SDL_Pango.pc.in
+++ b/SDL_Pango.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
Name: SDL_Pango
Description: SDL library for internationalized text rendering
Version: @VERSION@
-Requires: pango
+Requires: pango pangoft2
Libs: -L${libdir} -lSDL_Pango
Cflags: -I${includedir}
\ No newline at end of file
diff --git a/src/SDL_Pango.c b/src/SDL_Pango.c
index b969bc1..cc2c3f5 100644
--- a/src/SDL_Pango.c
+++ b/src/SDL_Pango.c
@@ -231,6 +231,41 @@
#include "SDL_Pango.h"
+const SDLPango_Matrix _MATRIX_WHITE_BACK
+ = {255, 0, 0, 0,
+ 255, 0, 0, 0,
+ 255, 0, 0, 0,
+ 255, 255, 0, 0,};
+const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
+
+const SDLPango_Matrix _MATRIX_BLACK_BACK
+ = {0, 255, 0, 0,
+ 0, 255, 0, 0,
+ 0, 255, 0, 0,
+ 255, 255, 0, 0,};
+const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
+
+const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
+ = {0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 255, 0, 0,};
+const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
+
+const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
+ = {255, 255, 0, 0,
+ 255, 255, 0, 0,
+ 255, 255, 0, 0,
+ 0, 255, 0, 0,};
+const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
+
+const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
+ = {255, 255, 0, 0,
+ 255, 255, 0, 0,
+ 255, 255, 0, 0,
+ 0, 0, 0, 0,};
+const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
+
//! non-zero if initialized
static int IS_INITIALIZED = 0;
diff --git a/src/SDL_Pango.h b/src/SDL_Pango.h
index 6ebdf78..b7e5e58 100644
--- a/src/SDL_Pango.h
+++ b/src/SDL_Pango.h
@@ -47,57 +47,32 @@ typedef struct _SDLPango_Matrix {
Uint8 m[4][4]; /*! Matrix variables */
} SDLPango_Matrix;
-const SDLPango_Matrix _MATRIX_WHITE_BACK
- = {255, 0, 0, 0,
- 255, 0, 0, 0,
- 255, 0, 0, 0,
- 255, 255, 0, 0,};
/*!
Specifies white back and black letter.
*/
-const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
+extern const SDLPango_Matrix *MATRIX_WHITE_BACK;
-const SDLPango_Matrix _MATRIX_BLACK_BACK
- = {0, 255, 0, 0,
- 0, 255, 0, 0,
- 0, 255, 0, 0,
- 255, 255, 0, 0,};
/*!
Specifies black back and white letter.
*/
-const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
+extern const SDLPango_Matrix *MATRIX_BLACK_BACK;
-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
- = {0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 255, 0, 0,};
/*!
Specifies transparent back and black letter.
*/
-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
+extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
- = {255, 255, 0, 0,
- 255, 255, 0, 0,
- 255, 255, 0, 0,
- 0, 255, 0, 0,};
/*!
Specifies transparent back and white letter.
*/
-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
+extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
- = {255, 255, 0, 0,
- 255, 255, 0, 0,
- 255, 255, 0, 0,
- 0, 0, 0, 0,};
/*!
Specifies transparent back and transparent letter.
This is useful for KARAOKE like rendering.
*/
-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
+extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
/*!
Specifies direction of text. See Pango reference for detail
@@ -186,7 +161,8 @@ extern DECLSPEC void SDLCALL SDLPango_SetBaseDirection(
SDLPango_Direction direction);
-#ifdef __FT2_BUILD_UNIX_H__
+
+#ifdef __PANGO_H__
extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(
const FT_Bitmap *bitmap,
@@ -194,11 +170,8 @@ extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(
const SDLPango_Matrix *matrix,
SDL_Rect *rect);
-#endif /* __FT2_BUILD_UNIX_H__ */
-#ifdef __PANGO_H__
-
extern DECLSPEC PangoFontMap* SDLCALL SDLPango_GetPangoFontMap(
SDLPango_Context *context);

View file

@ -0,0 +1,30 @@
diff --git a/inc/My/Builder/Unix.pm b/inc/My/Builder/Unix.pm
index 15291d5..5c5ab24 100644
--- a/inc/My/Builder/Unix.pm
+++ b/inc/My/Builder/Unix.pm
@@ -48,7 +48,7 @@ sub get_additional_libs {
sub can_build_binaries_from_sources {
my $self = shift;
- return 1; # yes we can
+ return 0; # no we can't
}
sub build_binaries {
diff --git a/t/004_get_header_version.t b/t/004_get_header_version.t
index d4146ff..27f53ea 100644
--- a/t/004_get_header_version.t
+++ b/t/004_get_header_version.t
@@ -1,8 +1,11 @@
# t/004_config.t
-use Test::More tests => 1;
+use Test::More;
use Alien::SDL;
+Test::More::plan( skip_all => 'NixOS doesn\'t have SDL headers in this location' );
+
+
like( Alien::SDL->get_header_version('SDL_version.h'), qr/([0-9]+\.)*[0-9]+/, "Testing SDL_version.h" );
#like( Alien::SDL->get_header_version('SDL_net.h'), qr/([0-9]+\.)*[0-9]+/, "Testing SDL_net.h" );
#like( Alien::SDL->get_header_version('SDL_image.h'), qr/([0-9]+\.)*[0-9]+/, "Testing SDL_image.h" );

View file

@ -0,0 +1,25 @@
{ stdenv, fetchurl, perlPackages, pkgconfig, SDL, SDL_mixer, SDL_Pango, glib }:
perlPackages.buildPerlModule {
pname = "frozen-bubble";
version = "2.212";
src = fetchurl {
url = "mirror://cpan/authors/id/K/KT/KTHAKORE/Games-FrozenBubble-2.212.tar.gz";
sha256 = "721e04ff69c5233060656bfbf4002aa1aeadd96c95351f0c57bb85b6da35a305";
};
patches = [ ./fix-compilation.patch ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ glib SDL SDL_mixer SDL_Pango perlPackages.SDL perlPackages.FileSlurp ];
propagatedBuildInputs = with perlPackages; [ AlienSDL CompressBzip2 FileShareDir FileWhich IPCSystemSimple LocaleMaketextLexicon ];
perlPreHook = "export LD=$CC";
meta = {
description = "Puzzle with Bubbles";
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ puckipedia ];
};
}

View file

@ -0,0 +1,33 @@
diff --git a/Build.PL b/Build.PL
index b029d1e..8737395 100644
--- a/Build.PL
+++ b/Build.PL
@@ -16,13 +16,14 @@ use Games::FrozenBubble;
my $prefix = Alien::SDL->config('prefix');
my $cflags = '-I'
. File::Spec->catfile( $prefix, 'include' )
+ . ' ' . `pkg-config --cflags SDL_mixer`
;
$cflags .= ' -fnested-functions' if $^O =~ /darwin/;
###!!! this looks strange, you perhaps meant "$cflags .= ..."
###!!! I intended Alien::SDL to add -I$prefix/include automatically, please tell me when it does not work (kmx)
my $devnull = File::Spec->devnull();
my @cflags = ExtUtils::CBuilder->new->split_like_shell( $cflags );
-my @linkers = ( ExtUtils::CBuilder->new->split_like_shell( Alien::SDL->config('libs', '-lSDL_mixer', '-lSDL_Pango') ) );
+my @linkers = ( ExtUtils::CBuilder->new->split_like_shell( Alien::SDL->config('libs', '-lSDL_Pango',`pkg-config --libs SDL_mixer`) ) );
push @linkers, '-liconv'
if $^O =~ /win/i; ###!!! really only Win needs this? ; BEWARE this matches also 'darwin', 'cygwin'!!!!
diff --git a/inc/My/Builder.pm b/inc/My/Builder.pm
index 2ebaf91..c420b9a 100644
--- a/inc/My/Builder.pm
+++ b/inc/My/Builder.pm
@@ -123,7 +123,7 @@ sub ACTION_server {
push @ofiles, $cbuilder->compile(
source => catfile($server_directory, $cfile),
extra_compiler_flags => [
- qw(-g -Wall -Werror -pipe), # verbatim from Makefile
+ qw(-g -pipe), # verbatim from Makefile
'-I' . $server_directory, # does not seem to be necessary
$cbuilder->split_like_shell(`pkg-config glib-2.0 --cflags`),
$cbuilder->split_like_shell(`pkg-config glib-2.0 --libs`),

View file

@ -13734,6 +13734,8 @@ in
SDL_net = callPackage ../development/libraries/SDL_net { };
SDL_Pango = callPackage ../development/libraries/SDL_Pango {};
SDL_sound = callPackage ../development/libraries/SDL_sound { };
SDL_stretch= callPackage ../development/libraries/SDL_stretch { };
@ -22446,6 +22448,8 @@ in
frogatto = callPackage ../games/frogatto { };
frozen-bubble = callPackage ../games/frozen-bubble { };
fsg = callPackage ../games/fsg {
wxGTK = wxGTK28.override { unicode = false; };
};

View file

@ -209,6 +209,27 @@ let
};
};
AlienSDL = buildPerlModule {
pname = "Alien-SDL";
version = "1.446";
src = fetchurl {
url = "mirror://cpan/authors/id/F/FR/FROGGS/Alien-SDL-1.446.tar.gz";
sha256 = "c9aa2c9dc3c63d89773c7d7203f2a46d1b924d0c72d9f801af147a3dc8bc512a";
};
patches = [ ../development/perl-modules/alien-sdl.patch ];
installPhase = "./Build install --prefix $out";
SDL_INST_DIR = pkgs.SDL.dev;
buildInputs = [ ArchiveExtract ArchiveZip TextPatch pkgs.SDL ];
propagatedBuildInputs = [ CaptureTiny FileShareDir FileWhich ];
meta = {
description = "Get, Build and Use SDL libraries";
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
};
};
AlienTidyp = buildPerlModule {
pname = "Alien-Tidyp";
version = "1.4.7";
@ -15415,6 +15436,24 @@ let
};
};
SDL = buildPerlModule {
pname = "SDL";
version = "2.548";
src = fetchurl {
url = "mirror://cpan/authors/id/F/FR/FROGGS/SDL-2.548.tar.gz";
sha256 = "252a192bfa9c2070a4883707d139c3a45d9c4518ccd66a1e699b5b7959bd4fb5";
};
perlPreHook = "export LD=$CC";
preCheck = "rm t/core_audiospec.t";
buildInputs = [ AlienSDL CaptureTiny TestDeep TestDifferences TestException TestMost TestWarn ]
++ (with pkgs; [ SDL SDL_gfx SDL_mixer SDL_image SDL_ttf SDL_Pango SDL_net ] );
propagatedBuildInputs = [ FileShareDir TieSimple ];
meta = {
description = "SDL bindings to Perl";
license = stdenv.lib.licenses.lgpl21Plus;
};
};
SerealDecoder = buildPerlPackage {
pname = "Sereal-Decoder";
version = "4.007";
@ -18667,6 +18706,20 @@ let
};
};
TextPatch = buildPerlPackage {
pname = "Text-Patch";
version = "1.8";
src = fetchurl {
url = "mirror://cpan/authors/id/C/CA/CADE/Text-Patch-1.8.tar.gz";
sha256 = "eaf18e61ba6a3e143846a7cc66f08ce58a0c4fbda92acb31aede25cb3b5c3dcc";
};
propagatedBuildInputs = [ TextDiff ];
meta = {
description = "Patches text with given patch";
license = stdenv.lib.licenses.gpl2;
};
};
TextPDF = buildPerlPackage {
pname = "Text-PDF";
version = "0.31";
@ -19122,6 +19175,19 @@ let
};
};
TieSimple = buildPerlPackage {
pname = "Tie-Simple";
version = "1.04";
src = fetchurl {
url = "mirror://cpan/authors/id/H/HA/HANENKAMP/Tie-Simple-1.04.tar.gz";
sha256 = "29e9e2133951046c78f205f1b3e8df62c90e114f0e08fa06b817766a0f808b12";
};
meta = {
description = "Variable ties made much easier: much, much, much easier..";
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
};
};
TieSub = buildPerlPackage {
pname = "Tie-Sub";
version = "1.001";