From 29d6678fd546377459ef75cf54abeef5b969b5cf Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 27 Aug 2010 15:14:24 +0100 Subject: Major layout change to the packages directory Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie --- .../recipes-sato/puzzles/files/makedist_hack.patch | 17 ++ .../puzzles/files/oh-puzzles-owl-menu.patch | 198 +++++++++++++++++++++ meta/recipes-sato/puzzles/oh-puzzles_svn.bb | 69 +++++++ meta/recipes-sato/puzzles/puzzles_r7593.bb | 53 ++++++ 4 files changed, 337 insertions(+) create mode 100644 meta/recipes-sato/puzzles/files/makedist_hack.patch create mode 100644 meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch create mode 100644 meta/recipes-sato/puzzles/oh-puzzles_svn.bb create mode 100644 meta/recipes-sato/puzzles/puzzles_r7593.bb (limited to 'meta/recipes-sato/puzzles') diff --git a/meta/recipes-sato/puzzles/files/makedist_hack.patch b/meta/recipes-sato/puzzles/files/makedist_hack.patch new file mode 100644 index 0000000000..d07e066026 --- /dev/null +++ b/meta/recipes-sato/puzzles/files/makedist_hack.patch @@ -0,0 +1,17 @@ +--- + makedist.sh | 2 ++ + 1 file changed, 2 insertions(+) + +Index: puzzles/makedist.sh +=================================================================== +--- puzzles.orig/makedist.sh 2007-05-17 11:49:59.000000000 +0100 ++++ puzzles/makedist.sh 2007-05-17 12:07:39.000000000 +0100 +@@ -30,6 +30,8 @@ fi + + perl mkfiles.pl + ++exit 0 ++ + mkdir tmp.$$ + mkdir tmp.$$/puzzles$arcsuffix + diff --git a/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch b/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch new file mode 100644 index 0000000000..61da9191a8 --- /dev/null +++ b/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch @@ -0,0 +1,198 @@ +Index: src/gtk.c +=================================================================== +--- src/gtk.c (revision 22) ++++ src/gtk.c (working copy) +@@ -28,6 +28,8 @@ + #include + #include + ++#include ++ + #include + + #include +@@ -1237,6 +1239,7 @@ + } + } + ++#if 0 + static void + add_widget (GtkUIManager *merge, + GtkWidget *widget, +@@ -1247,10 +1250,11 @@ + gtk_box_pack_start (box, widget, FALSE, FALSE, 0); + + toplevel = gtk_widget_get_toplevel (GTK_WIDGET (box)); +- gtk_widget_show_all (toplevel); + } ++#endif + + static GtkActionEntry toplevel_actions[] = { ++ { "Top", NULL, "" }, + { "Game", NULL, N_("Game") }, + { "Settings", NULL, N_("Settings") }, + { "Help", NULL, N_("Help") }, +@@ -1303,11 +1307,13 @@ + frontend *fe) + { + GString *xml; ++ GError *error = NULL; + gboolean presets = FALSE; + GSList *radio_group = NULL; + int i; + +- xml = g_string_new ("" ++ xml = g_string_new ("" ++ "" + ""); + + for (i = 0; i < midend_num_presets(fe->me); i++) { +@@ -1359,8 +1365,14 @@ + ""); + } + +- g_string_append (xml, ""); +- gtk_ui_manager_add_ui_from_string (merge, xml->str, -1, NULL); ++ g_string_append (xml, ""); ++ ++ gtk_ui_manager_add_ui_from_string (merge, xml->str, -1, &error); ++ if (error != NULL) { ++ g_warning ("Error adding custom: %s", error->message); ++ g_error_free (error); ++ } ++ + g_string_free (xml, TRUE); + } + +@@ -1434,6 +1446,7 @@ + new_window(char *arg, char **error) + { + frontend *fe; ++ GError *err = NULL; + GtkBox *vbox; + GtkUIManager *merge; + GtkActionGroup *actions; +@@ -1496,8 +1509,6 @@ + gtk_window_add_accel_group(GTK_WINDOW(fe->window), fe->accelgroup); + + merge = gtk_ui_manager_new (); +- g_signal_connect (G_OBJECT (merge), "add_widget", +- G_CALLBACK (add_widget), vbox); + + actions = gtk_action_group_new ("PuzzleActions"); + gtk_action_group_add_actions (actions, toplevel_actions, +@@ -1509,22 +1520,39 @@ + + gtk_ui_manager_insert_action_group (merge, actions, 0); + +- gtk_ui_manager_add_ui_from_file (merge, DATADIR "/oh-puzzles/ui/menu.xml", NULL); ++ gtk_ui_manager_add_ui_from_file (merge, DATADIR "/oh-puzzles/ui/menu.xml", ++ &err); ++ if (err != NULL) { ++ g_warning ("Error making UI: %s", err->message); ++ g_error_free (err); ++ err = NULL; ++ } + + if (thegame.can_solve) { +- char *str = "" ++ char *str = "" ++ "" + "" + "" + "" +- ""; ++ ""; + +- gtk_ui_manager_add_ui_from_string (merge, str, -1, NULL); ++ gtk_ui_manager_add_ui_from_string (merge, str, -1, &err); ++ if (err != NULL) { ++ g_warning ("Error adding solve. %s", err->message); ++ g_error_free (err); ++ } + } + + if ((n = midend_num_presets(fe->me)) > 0 || thegame.can_configure) { + generate_settings_menu (merge, actions, fe); + } + ++ /* Do this so that the menu is packed now instead of in the idle loop */ ++ gtk_ui_manager_ensure_update (merge); ++ ++ owl_set_window_menu_item (GTK_WINDOW (fe->window), ++ GTK_MENU_ITEM (gtk_ui_manager_get_widget (merge, "/menubar/TopMenu"))); ++ + setup_colours (fe); + setup_pixbufs (fe); + +@@ -1572,7 +1600,7 @@ + GDK_BUTTON_RELEASE_MASK | + GDK_BUTTON_MOTION_MASK); + +- /* The window is shown once the menubar has been added */ ++ gtk_widget_show_all (fe->window); + return fe; + } + +Index: src/menu.xml +=================================================================== +--- src/menu.xml (revision 22) ++++ src/menu.xml (working copy) +@@ -1,26 +1,25 @@ + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- +- +- ++ + ++ ++ + + + +Index: src/Makefile.am +=================================================================== +--- src/Makefile.am (revision 22) ++++ src/Makefile.am (working copy) +@@ -10,7 +10,7 @@ + lightup loopy map mines net netslide pattern pegs rect samegame \ + sixteen slant solo tents twiddle untangle + +-libpuzzles_la_LIBADD = $(PUZZLES_LIBS) ++libpuzzles_la_LIBADD = $(PUZZLES_LIBS) -lowl + libpuzzles_la_SOURCES = combi.c \ + configuration.c \ + drawing.c \ diff --git a/meta/recipes-sato/puzzles/oh-puzzles_svn.bb b/meta/recipes-sato/puzzles/oh-puzzles_svn.bb new file mode 100644 index 0000000000..5fcea24b37 --- /dev/null +++ b/meta/recipes-sato/puzzles/oh-puzzles_svn.bb @@ -0,0 +1,69 @@ +DESCRIPTION = "Portable Puzzle Collection" +HOMEPAGE = "http://o-hand.com/" +BUGTRACKER = "http://bugzilla.openedhand.com/" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENCE;md5=f56ec6772dd1c7c367067bbea8ea1675 \ + file://src/tree234.h;endline=28;md5=a188e6d250430ca094a54a82f48472a7 \ + file://src/tree234.c;endline=28;md5=b4feb1976feebf8f1379093ed52f2945" + +SECTION = "x11" +DEPENDS = "gtk+ gconf intltool-native librsvg" +DEPENDS_append_poky = " libowl" + +PV = "0.1+svnr${SRCREV}" +PR = "r10" + +bindir = "/usr/games" + +inherit autotools pkgconfig + +SRC_URI = "svn://svn.o-hand.com/repos/;module=oh-puzzles;proto=http" +SRC_URI_append_poky = " file://oh-puzzles-owl-menu.patch;patch=1;pnum=0 " + +S = "${WORKDIR}/${PN}" + +EXTRA_OEMAKE += "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1" + +do_install_append () { + install -d ${D}/${datadir}/applications/ + + cd ${D}/${prefix}/games + for prog in *; do + if [ -x $prog ]; then + # Convert prog to Title Case + title=$(echo $prog | sed 's/\(^\| \)./\U&/g') + echo "making ${D}/${datadir}/applications/$prog.desktop" + cat < ${D}/${datadir}/applications/$prog.desktop +[Desktop Entry] +Name=$title +Exec=${prefix}/games/$prog +Icon=applications-games +Terminal=false +Type=Application +Categories=Game; +StartupNotify=true +X-MB-SingleInstance=true +Comment=Play $title. +STOP + fi + done +} + +PACKAGES += ${PN}-extra +RDEPENDS_${PN}-extra += "oh-puzzles" + +FILES_${PN} = "/usr/share/pixmaps /usr/share/oh-puzzles/" +FILES_${PN}-dbg += "/usr/games/.debug/*" +FILES_${PN}-extra = "/usr/games/ /usr/share/applications /etc/gconf/schemas" + +python __anonymous () { + import bb + var = bb.data.expand("FILES_${PN}", d, 1) + data = bb.data.getVar(var, d, 1) + for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"): + data = data + " /usr/games/%s" % name + data = data + " /usr/share/applications/%s.desktop" % name + data = data + " /etc/gconf/schemas/%s.schemas" % name + bb.data.setVar(var, data, d) +} diff --git a/meta/recipes-sato/puzzles/puzzles_r7593.bb b/meta/recipes-sato/puzzles/puzzles_r7593.bb new file mode 100644 index 0000000000..eb1e009353 --- /dev/null +++ b/meta/recipes-sato/puzzles/puzzles_r7593.bb @@ -0,0 +1,53 @@ + +DEPENDS = "gtk+ libxt" +PR = "r8" +MOD_PV = "${@bb.data.getVar('PV',d,1)[1:]}" + +#SRC_URI = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${PV}.tar.gz" +SRC_URI = "svn://ixion.tartarus.org/main;module=puzzles;rev=${MOD_PV} \ + file://makedist_hack.patch;patch=1" + +S = "${WORKDIR}/${PN}" + +do_configure () { + ./makedist.sh ${MOD_PV} +} + +do_compile_prepend = " \ + export XLDFLAGS='${LDFLAGS} `${STAGING_BINDIR_NATIVE}/pkg-config gtk+-2.0 --libs`'; \ + export CFLAGS='${CFLAGS} -I./ `${STAGING_BINDIR_NATIVE}/pkg-config gtk+-2.0 --cflags`'; " + +FILES_${PN} = "${prefix}/games/* ${datadir}/applications/*" +FILES_${PN}-dbg += "${prefix}/games/.debug" + +do_install () { + rm -rf ${D}/* + export prefix=${D} + export DESTDIR=${D} + install -d ${D}/${prefix}/ + install -d ${D}/${prefix}/games/ + oe_runmake install + + install -d ${D}/${datadir}/ + install -d ${D}/${datadir}/applications/ + + cd ${D}/${prefix}/games + for prog in *; do + if [ -x $prog ]; then + # Convert prog to Title Case + title=$(echo $prog | sed 's/\(^\| \)./\U&/g') + echo "making ${D}/${datadir}/applications/$prog.desktop" + cat < ${D}/${datadir}/applications/$prog.desktop +[Desktop Entry] +Name=$title +Exec=${prefix}/games/$prog +Icon=applications-games +Terminal=false +Type=Application +Categories=Game; +StartupNotify=true +X-MB-SingleInstance=true +STOP + fi + done +} -- cgit v1.2.3-54-g00ecf