frozen-bubble: add version 2.2.0
authorwoglinde <heinold@inf.fu-berlin.de>
Tue, 20 Jan 2009 16:15:12 +0000 (17:15 +0100)
committerwoglinde <heinold@inf.fu-berlin.de>
Tue, 20 Jan 2009 16:17:15 +0000 (17:17 +0100)
* not default version yet we need to workaround the messie
  perl buildystem in one case
* recipe orginal from GNUtoo
* closes BUG 4965

conf/checksums.ini
packages/frozen-bubble/frozen-bubble-2.2.0/Makefile.PL.patch [new file with mode: 0644]
packages/frozen-bubble/frozen-bubble-2.2.0/Makefile.patch [new file with mode: 0644]
packages/frozen-bubble/frozen-bubble-2.2.0/Makefile_top.patch [new file with mode: 0644]
packages/frozen-bubble/frozen-bubble-2.2.0/localespath-fix.patch [new file with mode: 0644]
packages/frozen-bubble/frozen-bubble_2.2.0.bb [new file with mode: 0644]

index 8cee8a3..d7ebec3 100644 (file)
@@ -5878,6 +5878,10 @@ sha256=f831eae9182e4a1407a34cb1098a4f5ad5ad6c6632e34eed734b9601a06a764b
 md5=2be5ead2aee72adc3fb643630a774b59
 sha256=fe7e46e529c7c3c969946c41efb519462f98dd5c280e247bd98ff629dcca1433
 
+[http://www.frozen-bubble.org/data/frozen-bubble-2.2.0.tar.bz2]
+md5=f7987201470d6755ed309762d348e0dd
+sha256=dada92322ef3adb75df7a4270b2e76c572c3f8e42006ed3a5aaeefa68fcaa5b7
+
 [http://heim.ifi.uio.no/~jorgenam/h5400/fsi-client-20040803.tar.gz]
 md5=99adcf3275943c109d27a781addf7d63
 sha256=b0474b223a130e9412bb88f464138f40921e84f63b6024bf2ce5b32bd78d4bd8
diff --git a/packages/frozen-bubble/frozen-bubble-2.2.0/Makefile.PL.patch b/packages/frozen-bubble/frozen-bubble-2.2.0/Makefile.PL.patch
new file mode 100644 (file)
index 0000000..7b8035b
--- /dev/null
@@ -0,0 +1,32 @@
+Index: frozen-bubble-2.2.0/c_stuff/Makefile.PL
+===================================================================
+--- frozen-bubble-2.2.0.orig/c_stuff/Makefile.PL
++++ frozen-bubble-2.2.0/c_stuff/Makefile.PL
+@@ -16,8 +16,8 @@ $main;
+ }
+ EOTEST
+       close(CTEST);
+-      $r = system("$Config{cc} -o $fname $fname.c $cflags $libs 2>/dev/null 1>/dev/null");
+-      warn("RUNNING: $Config{cc} -o $fname $fname.c $cflags $libs\n") if $ENV{VERBOSE};
++      $r = system("$ENV{CC} $ENV{CFLAGS} $ENV{LDFLAGS} -o $fname $fname.c $cflags $libs 2>/dev/null 1>/dev/null");
++      warn("RUNNING: $ENV{CC} $ENV{CFLAGS} $ENV{LDFLAGS} -o $fname $fname.c $cflags $libs\n") if $ENV{VERBOSE};
+       unlink($fname, "$fname.c");
+       return $r == 0;
+ }
+@@ -70,13 +70,13 @@ ccompile('#include <SDL_Pango.h>',
+   die_ 'Frozen-Bubble patches are needed in SDL_Pango (impossible to create an executable calling the function SDLPango_CreateContext_GivenFontDesc)';
+-
++ 
+ WriteMakefile(
+     'NAME'         => 'fb_c_stuff',
+-    'LIBS'         => [ '-lm ' . chomp_(`sdl-config --libs`) . ' -lSDL_mixer ' . chomp_(`pkg-config SDL_Pango --libs`)],
++    'LIBS'         => [ $ENV{LDFLAGS} . " " . '-lm ' . chomp_(`sdl-config --libs`) . ' -lSDL_mixer ' . chomp_(`pkg-config SDL_Pango --libs`)],
+     'VERSION_FROM' => 'fb_c_stuff.pm', # finds VERSION
+     'OBJECT'       => 'fb_c_stuff.o',
+-    'INC'          => chomp_(`sdl-config --cflags`) . ' ' . chomp_(`pkg-config SDL_Pango --cflags`) . ' -I.',
++    'INC'          => $ENV{CFLAGS} . " " . chomp_(`sdl-config --cflags`) . ' ' . chomp_(`pkg-config SDL_Pango --cflags`) . ' -I.',
+     'OPTIMIZE'     => '-O2 -Wall',
+     'MAKEFILE'     => 'Makefile_c',
+ );
diff --git a/packages/frozen-bubble/frozen-bubble-2.2.0/Makefile.patch b/packages/frozen-bubble/frozen-bubble-2.2.0/Makefile.patch
new file mode 100644 (file)
index 0000000..d3a370c
--- /dev/null
@@ -0,0 +1,13 @@
+Index: frozen-bubble-2.2.0/c_stuff/Makefile
+===================================================================
+--- frozen-bubble-2.2.0.orig/c_stuff/Makefile
++++ frozen-bubble-2.2.0/c_stuff/Makefile
+@@ -51,7 +51,7 @@ PERL_MAKE_OPTS = $(PMO_PREFIX) $(PMO_INS
+     $(PMO_INSTALLMAN1DIR) $(PMO_INSTALLMAN3DIR)
+ Makefile_c: Makefile.PL
+-      perl Makefile.PL $(PERL_MAKE_OPTS) INSTALLDIRS=$(INSTALLDIRS)
++      perl Makefile.PL $(PERL_MAKE_OPTS) INSTALLDIRS=$(INSTALLDIRS) CC="$(CC)" LD="$(LD)"
+ fb_c_stuff: %: %.xs Makefile_c
+       $(MAKE) -f Makefile_c
diff --git a/packages/frozen-bubble/frozen-bubble-2.2.0/Makefile_top.patch b/packages/frozen-bubble/frozen-bubble-2.2.0/Makefile_top.patch
new file mode 100644 (file)
index 0000000..2dfc4e8
--- /dev/null
@@ -0,0 +1,15 @@
+Index: frozen-bubble-2.2.0/Makefile
+===================================================================
+--- frozen-bubble-2.2.0.orig/Makefile
++++ frozen-bubble-2.2.0/Makefile
+@@ -14,8 +14,8 @@ prepare:
+       perl -ne "print \$$1 if m|\\\$$version = '(.*)';|" c_stuff/lib/fb_stuff.pm > VERSION
+ dirs:
+-      @if ! perl -e 'use SDL'; then echo -e "\n    *** I need perl-SDL installed"; false; fi
+-      @if ! perl -e 'use SDL; ($$mj, $$mn, $$mc) = split /\./, $$SDL::VERSION; exit 0 if $$mj > 1 || $$mn >= 19; exit 1'; then echo -e "\n    *** I need perl-SDL version 1.19.0 or upper"; false; fi
++#     @if ! perl -e 'use SDL'; then echo -e "\n    *** I need perl-SDL installed"; false; fi
++#     @if ! perl -e 'use SDL; ($$mj, $$mn, $$mc) = split /\./, $$SDL::VERSION; exit 0 if $$mj > 1 || $$mn >= 19; exit 1'; then echo -e "\n    *** I need perl-SDL version 1.19.0 or upper"; false; fi
+       @for n in . $(DIRS); do \
+               [ "$$n" = "." ] || $(MAKE) -C $$n || exit $$? ;\
+       done
diff --git a/packages/frozen-bubble/frozen-bubble-2.2.0/localespath-fix.patch b/packages/frozen-bubble/frozen-bubble-2.2.0/localespath-fix.patch
new file mode 100644 (file)
index 0000000..c083b29
--- /dev/null
@@ -0,0 +1,11 @@
+Index: frozen-bubble-2.2.0/settings.mk
+===================================================================
+--- frozen-bubble-2.2.0.orig/settings.mk
++++ frozen-bubble-2.2.0/settings.mk
+@@ -1,4 +1,5 @@
+-PREFIX = /usr/local
++
++PREFIX = /usr
+ DATADIR = $(PREFIX)/share
+ LIBDIR = $(PREFIX)/lib
+ BINDIR = $(PREFIX)/bin
diff --git a/packages/frozen-bubble/frozen-bubble_2.2.0.bb b/packages/frozen-bubble/frozen-bubble_2.2.0.bb
new file mode 100644 (file)
index 0000000..27afc64
--- /dev/null
@@ -0,0 +1,79 @@
+DESCRIPTION="A Puzzle Bubble clone written in perl (now with network support)"
+LICENSE = "GPL"
+SECTION = "games"
+DEPENDS = "sdlpango libsdl-mixer perl"
+RDEPENDS_${PN} = "${PN}-data perl sdl-perl \
+                 perl-module-strict perl-module-vars \
+                 perl-module-getopt-long perl-module-exporter-heavy \
+                 perl-module-data-dumper \
+                 perl-module-bytes liblocale-gettext-perl \
+                 perl-module-dynaloader perl-module-posix \
+                 perl-module-math-trig \
+                 perl-module-io-file perl-module-io \
+                  perl-module-file-spec-unix perl-module-time-hires \
+                  perl-module-io-socket perl-module-io-select \
+                  perl-module-file-glob \
+                "
+
+PR="r0"
+
+DEFAULT_PREFERENCE = "-1"
+
+inherit cpan-base
+
+S=${WORKDIR}/frozen-bubble-2.2.0/
+
+PERL_VERSION = ${@get_perl_version(d)}
+
+SRC_URI = "http://www.frozen-bubble.org/data/frozen-bubble-${PV}.tar.bz2 \
+          file://Makefile.PL.patch;patch=1 \
+          file://Makefile.patch;patch=1 \
+          file://Makefile_top.patch;patch=1 \
+          file://localespath-fix.patch;patch=1 \
+         "
+
+#permit the installation of the locales in ${datadir}/locales otherwise they are installed in /usr/local/share/locales
+
+# The Makefile needs to be patched to look in STAGING_LIBDIR/perl/... - It's looking in i686-linux/lib at the moment, regardless of arch
+BROKEN = "1"
+
+
+do_compile() {
+        oe_runmake OPTIMIZE="${CFLAGS}" PREFIX="${prefix}" INSTALLSITELIB="${D}/${libdir}/perl/${PERL_VERSION}/" LOCALEDIR="${datadir}/locale"
+}
+
+do_install() {
+        oe_runmake PREFIX="${prefix}" DESTDIR="${D}" DATADIR="${datadir}" LOCALEDIR="${datadir}/locale" install 
+}
+
+PACKAGES += "${PN}-editor ${PN}-data ${PN}-server"
+
+
+DESCRIPTION_${PN}-editor = "Map Editor for Frozen Bubble"
+DESCRIPTION_${PN}-data = "Mandatory data package for Frozen Bubble"
+DESCRIPTION_${PN}-server = "Server for Frozen Bubble"
+
+FILES_${PN} = "\
+  ${bindir}/frozen-bubble \
+  ${libdir}/perl/${PERL_VERSION}/auto/fb_c_stuff/fb_c_stuff.* \
+  ${libdir}/perl/${PERL_VERSION}/fb* \
+  ${libdir}/perl/${PERL_VERSION}/perllocal.pod \
+  ${libdir}/perl/${PERL_VERSION}/FBLE.pm \
+"
+
+FILES_${PN}-dbg += " \
+ ${libdir}/perl/${PERL_VERSION}/auto/fb_c_stuff/.debug \
+ ${libdir}/${PN}/.debug \
+"
+
+FILES_${PN}-editor = "\
+  ${bindir}/frozen-bubble-editor \
+"
+
+FILES_${PN}-data = "\
+  ${datadir}/frozen-bubble \
+"
+
+FILES_${PN}-server = " \
+ ${libdir}/${PN}/fb-server \
+"