summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-arcade/cervi/ChangeLog10
-rw-r--r--games-arcade/cervi/Manifest5
-rw-r--r--games-arcade/cervi/cervi-0.0.4.ebuild30
-rw-r--r--games-arcade/cervi/files/cervi-0.0.4-gentoo-gtk2-esd.patch250
-rw-r--r--games-arcade/cervi/metadata.xml5
5 files changed, 300 insertions, 0 deletions
diff --git a/games-arcade/cervi/ChangeLog b/games-arcade/cervi/ChangeLog
new file mode 100644
index 000000000..f3f7e2611
--- /dev/null
+++ b/games-arcade/cervi/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for games-arcade/cervi
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*cervi-0.0.4 (19 Mar 2012)
+
+ 19 Mar 2012; hasufell <julian.ospald@googlemail.com> +cervi-0.0.4.ebuild,
+ +files/cervi-0.0.4-gentoo-gtk2-esd.patch, +metadata.xml:
+ New Ebuild for bug 408909 thanks to ssuominen and binki
+
diff --git a/games-arcade/cervi/Manifest b/games-arcade/cervi/Manifest
new file mode 100644
index 000000000..4ebce6a89
--- /dev/null
+++ b/games-arcade/cervi/Manifest
@@ -0,0 +1,5 @@
+AUX cervi-0.0.4-gentoo-gtk2-esd.patch 5949 RMD160 a637cf8b2a321cbe541d392c4bed3517420d51b3 SHA1 40ba13f2aadcfffefd6b22910514d56a120f5400 SHA256 7e7857af925022db213f65499372dd45fe3d833ba3bd8b1f495f9e00d5319dc5
+DIST cervi-0.0.4.tar.gz 23276 RMD160 d2dd8e7147a363092ca376fb05d2f9a211effbd0 SHA1 932c244f1db26684f94b0e694d4bd9682f8c4fd1 SHA256 36b0d18dcf0445cd31b78aae61565c76d3979f46704c138e44ef939613c7aa6a
+EBUILD cervi-0.0.4.ebuild 546 RMD160 a87ea1014a9a9523c8d3083d6e6c977566756c9a SHA1 d1bee4b08c45544ea60166a8620b9895efd9e774 SHA256 7788b828664cad5550a0ef28e557aa416fa9bb349ecb3afb22296f6f3320ad93
+MISC ChangeLog 341 RMD160 bf286358bc38f9b9a66c83640583cf4fca32f461 SHA1 c85adf3f35075d31a16c1dcc33cd9619dd9eab2d SHA256 93d58d5b44bfac8c76caeda0039de2682cbdce4de0882971428edc01e8374dc1
+MISC metadata.xml 208 RMD160 c18611400760e42bdd001905be0a63c2e963bcea SHA1 595816105cac477cb85792a182e15888029118a1 SHA256 c4841c87f0c2b9b5e679a27dc72180be8d508fb3f5df0fbab2ec2c805c0a6d82
diff --git a/games-arcade/cervi/cervi-0.0.4.ebuild b/games-arcade/cervi/cervi-0.0.4.ebuild
new file mode 100644
index 000000000..79ac87896
--- /dev/null
+++ b/games-arcade/cervi/cervi-0.0.4.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+
+inherit eutils games
+
+DESCRIPTION="GTK Cervi clone"
+HOMEPAGE="http://tomi.nomi.cz/"
+SRC_URI="http://nomi.cz/download/releases/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo-gtk2-esd.patch
+}
+
+src_install() {
+ dogamesbin ${PN} || die
+ dodoc README || die
+ prepgamesdirs
+}
diff --git a/games-arcade/cervi/files/cervi-0.0.4-gentoo-gtk2-esd.patch b/games-arcade/cervi/files/cervi-0.0.4-gentoo-gtk2-esd.patch
new file mode 100644
index 000000000..83f6a62a5
--- /dev/null
+++ b/games-arcade/cervi/files/cervi-0.0.4-gentoo-gtk2-esd.patch
@@ -0,0 +1,250 @@
+Creator: Julian Ospald <julian.ospald@googlemail.com>
+Date: Thu Mar 15 22:33:16 CET 2012
+
+fix build system
+remove all sound/esound references
+port to gtk+:2
+
+--- Makefile
++++ Makefile
+@@ -5,8 +5,6 @@
+ # See file COPYRIGHT and COPYING
+
+ # This you may want to change
+-RELEASE=no
+-DEBUG=no
+ prefix=/opt/cervi
+ incdir=$(prefix)/include
+ bindir=$(prefix)/bin
+@@ -18,64 +16,35 @@
+ export
+ VERSION=0.0.4
+ PACKAGE=cervi
+-CFLAGS=
+-CXXFLAGS=
+ CFLAGS+=-Wall -D_GNU_SOURCE -D_REENTRANT -DVERSION=\"$(VERSION)\" \
+- $(shell gtk-config --cflags) $(shell pkg-config --cflags esound) \
++ $(shell pkg-config --cflags gtk+-2.0) \
+ -DDATADIR=\"$(datadir)\"
+ CXXFLAGS+=-Wall -D_GNU_SOURCE -D_REENTRANT -DVERSION=\"$(VERSION)\" \
+- $(shell gtk-config --cflags) $(shell pkg-config --cflags esound) \
++ $(shell pkg-config --cflags gtk+-2.0) \
+ -DDATADIR=\"$(datadir)\"
+-CPPFLAGS=
+-LDFLAGS=
+-LDLIBS=-lm $(shell gtk-config --libs) $(shell pkg-config --libs esound) \
++LDLIBS=-lm $(shell pkg-config --libs gtk+-2.0) \
+ -lpthread
+ LINK.o=$(CXX) $(LDFLAGS) $(TARGET_ARCH)
+ MAIN=cervi
+ INSTALL=install -c -m 644
+ INSTALL_BIN=install -c -m 755 -D
+
+-ifeq ($(RELEASE),yes)
+- CFLAGS += -O2
+- CXXFLAGS += -O2
+- LDFLAGS += -s -Wl,-O,2
+-endif
+-
+-ifeq ($(DEBUG),yes)
+- CFLAGS += -g -DDEBUG
+- CXXFLAGS += -g -DDEBUG
+-else
+- CFLAGS += -DNDEBUG
+- CXXFLAGS += -DNDEBUG
+-endif
+-
+-.PHONY: all backup clean tags DEBUG RELEASE install clean-music \
+- install-music all-music
+-all: all-music $(MAIN)
+-all-music:
+- $(MAKE) -C music
++.PHONY: all backup clean tags install
++
++all: $(MAIN)
+ backup:
+ ./backup.sh $(PACKAGE)-$(VERSION)
+-clean: clean-music
++clean:
+ $(RM) $(MAIN) *.o
+-clean-music:
+- $(MAKE) -C music clean
+ tags:
+ ctags -R .
+-DEBUG: clean
+- $(MAKE) DEBUG=yes
+-RELEASE: clean
+- $(MAKE) RELEASE=yes
+-install: all install-music
++install: all
+ $(INSTALL_BIN) $(MAIN) $(DESTDIR)/$(bindir)/$(MAIN)
+-install-music: all-music
+- $(MAKE) -C music install
+
+-$(MAIN): main.o keymap.o game.o field.o music.o
++$(MAIN): main.o keymap.o game.o field.o
+ $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
+-main.o: main.cc field.h game.h music.h
++main.o: main.cc field.h game.h
+ keymap.o: keymap.cc keymap.h
+-game.o: game.cc game.h field.h keymap.h music.h
++game.o: game.cc game.h field.h keymap.h
+ game.h: keymap.h field.h
+ field.o: field.cc field.h
+-music.o: music.cc music.h
+--- game.cc
++++ game.cc
+@@ -13,7 +13,6 @@
+ #include <cmath>
+ #include <gdk/gdkkeysyms.h>
+ #include "game.h"
+-#include "music.h"
+
+ /*
+ * TODO:
+@@ -22,9 +21,6 @@
+ * or bounce.
+ */
+
+-// from main.cc for signalling music thread
+-extern void signal_mt();
+-
+ namespace std {
+ // colors of cerv's
+ unsigned int colors[] = {
+@@ -107,10 +103,6 @@
+ }
+ }
+
+- m.reset(); // reset music to initial state
+- m.speed = speed();
+- m.play = true;
+- signal_mt(); // signal it
+ }
+
+ // delete all cervi
+@@ -119,8 +111,6 @@
+ for (int i=0; i<n_cervi; i++) {
+ delete cervi[i];
+ }
+- m.play = false;
+- signal_mt();
+ }
+
+ // darken color
+@@ -216,7 +206,6 @@
+ cervi[i]->_speed += (ncollision - _ncollided) * 20;
+ cervi[i]->_rotspeed -= (ncollision - _ncollided);
+ }
+- m.speed = speed();
+ }
+
+ // set place numbers
+@@ -243,8 +232,6 @@
+ for (int i=0; i<n_cervi; i++) {
+ if (!cervi[i]->_collision) {
+ cervi[i]->_collision = true;
+- m.play = false;
+- signal_mt();
+ }
+ }
+ }
+@@ -310,7 +297,6 @@
+ _cspeed += _speed * ticks / 1000;
+ if (_cspeed > _speed)
+ _cspeed = _speed;
+- m.speed = _game->speed();
+ }
+
+ if (_x < 1) {
+--- main.cc
++++ main.cc
+@@ -21,7 +21,6 @@
+ #include <stdint.h>
+ #include "field.h"
+ #include "game.h"
+-#include "music.h"
+ using namespace std;
+
+ // delete and set to NULL
+@@ -66,7 +65,6 @@
+ void chspeed(gpointer, gpointer n);
+ void updatefsize();
+ void chfsize(gpointer, gpointer n);
+-void chmusic(gpointer, gpointer n);
+ void about();
+ void quit();
+
+@@ -104,7 +102,6 @@
+ { "/Options/Field 1580x1100", NULL, A chfsize, 4,
+ "/Options/Field 600x410"},
+ { "/Options/sep3", NULL, NULL, 0, "<Separator>" },
+- { "/Options/Mute music", NULL, A chmusic, 0, "<ToggleItem>"},
+ { "/_Help", NULL, NULL, 0, "<LastBranch>" },
+ { "/_Help/_About...", NULL, about, 0, NULL }
+ };
+@@ -334,11 +331,6 @@
+ updatefsize();
+ }
+
+-void chmusic(gpointer, gpointer n)
+-{
+- m.playmusic = !m.playmusic;
+-}
+-
+ // create backing pixmap (and show about)
+ gint configure_event(GtkWidget *widget, GdkEventConfigure *event)
+ {
+@@ -471,21 +463,6 @@
+ return;
+ }
+
+-// music thread
+-pthread_t mt;
+-void* music_t(void*)
+-{
+- signal(SIGUSR1,sigusr1);
+- m.thread();
+- return 0;
+-}
+-
+-// signal music thread to stop waiting
+-void signal_mt()
+-{
+- pthread_kill(mt,SIGUSR1);
+-}
+-
+ // all loved C main function
+ int main(int argc, char *argv[])
+ {
+@@ -502,19 +479,16 @@
+ // when everything is stable
+ //gdk_key_repeat_disable();
+
+- // music thread init
+- pthread_create(&mt,0,music_t,0);
+-
+ window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title(GTK_WINDOW(window), "GTK Cervi");
+ gtk_window_set_policy(GTK_WINDOW(window),0,0,1);
+
+ // set up fonts
+ bigfont = gdk_font_load("-*-helvetica-bold-r-normal--34-*");
+- if (!bigfont) bigfont = gdk_font_ref(window->style->font);
++ if (!bigfont) bigfont = gtk_style_get_font(window->style);
+
+ medfont = gdk_font_load("-misc-fixed-medium-r-normal--14-*");
+- if (!medfont) medfont = gdk_font_ref(window->style->font);
++ if (!medfont) medfont = gtk_style_get_font(window->style);
+ medfontheight = gdk_string_height(medfont,"GNU Iy") + 3;
+
+ vbox = gtk_vbox_new(0, 0);
+@@ -569,7 +543,7 @@
+ for (int x=0; x<8; x++)
+ for (int y=0; y<8; y++)
+ gdk_image_put_pixel(im,x,y,gdk_rgb_xpixel_from_rgb(colors[i]));
+- label = gtk_image_new(im,0);
++ label = gtk_image_new_from_image(im,0);
+ gtk_box_pack_end(GTK_BOX(status), label, 0, 0, 0);
+ gtk_widget_show(label);
+
diff --git a/games-arcade/cervi/metadata.xml b/games-arcade/cervi/metadata.xml
new file mode 100644
index 000000000..31dc017fa
--- /dev/null
+++ b/games-arcade/cervi/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-wanted@gentoo.org</email></maintainer>
+</pkgmetadata>