summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-sato/puzzles
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-sato/puzzles')
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-Use-labs-instead-of-abs.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch72
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch203
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb73
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb66
7 files changed, 535 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-Use-labs-instead-of-abs.patch b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-Use-labs-instead-of-abs.patch
new file mode 100644
index 000000000..f43d1df6c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-Use-labs-instead-of-abs.patch
@@ -0,0 +1,46 @@
+From 9808dc09e08937c9bffd858d3ded428225a4312a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Sep 2015 09:02:38 +0000
+Subject: [PATCH] Use labs instead of abs
+
+cluevals is array of longs so we have to use labs() instead of abs()
+since abs() returns int
+
+Fixes
+
+keen.c:1458:17: error: absolute value function 'abs' given an argument
+of type 'long' but has parameter of type 'int' which may cause
+truncation of value
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ keen.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/keen.c b/keen.c
+index a6a7238..1631992 100644
+--- a/keen.c
++++ b/keen.c
+@@ -1043,7 +1043,7 @@ done
+ cluevals[j] *= grid[i];
+ break;
+ case C_SUB:
+- cluevals[j] = abs(cluevals[j] - grid[i]);
++ cluevals[j] = labs(cluevals[j] - grid[i]);
+ break;
+ case C_DIV:
+ {
+@@ -1455,7 +1455,7 @@ static int check_errors(const game_state *state, long *errors)
+ cluevals[j] *= state->grid[i];
+ break;
+ case C_SUB:
+- cluevals[j] = abs(cluevals[j] - state->grid[i]);
++ cluevals[j] = labs(cluevals[j] - state->grid[i]);
+ break;
+ case C_DIV:
+ {
+--
+2.5.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
new file mode 100644
index 000000000..5351f8eb4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
@@ -0,0 +1,72 @@
+From 6d8326275802a2e6e61d3e99460af6891ae8362f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jan 2016 23:10:19 -0800
+Subject: [puzzles][PATCH] palisade: Fix warnings with clang on arm
+
+ARM treats 'char' as unsigned char when 'char' is not qualified with
+'signed' or 'unsigned' explicitly.
+
+This results in warnings e.g.
+
+palisade.c:531:22: error: comparison of constant -1 with expression of
+type 'clue' (aka 'char') is always false
+[-Werror,-Wtautological-constant-out-of-range-compare]
+ if (clues[i] == EMPTY) continue;
+
+Therefore, typcast the contant to char in such places to be explicit
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ palisade.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/palisade.c b/palisade.c
+index 984e616..2b9c25c 100644
+--- a/palisade.c
++++ b/palisade.c
+@@ -295,11 +295,11 @@ static void solver_connected_clues_versus_region_size(solver_ctx *ctx)
+ * If p = q = 3 then the region has size exactly 2. */
+
+ for (i = 0; i < wh; ++i) {
+- if (ctx->clues[i] == EMPTY) continue;
++ if (ctx->clues[i] == (char)EMPTY) continue;
+ for (dir = 0; dir < 4; ++dir) {
+ int j = i + dx[dir] + w*dy[dir];
+ if (disconnected(ctx, i, j, dir)) continue;
+- if (ctx->clues[j] == EMPTY) continue;
++ if (ctx->clues[j] == (char)EMPTY) continue;
+ if ((8 - ctx->clues[i] - ctx->clues[j] > ctx->params->k) ||
+ (ctx->clues[i] == 3 && ctx->clues[j] == 3 &&
+ ctx->params->k != 2))
+@@ -317,7 +317,7 @@ static int solver_number_exhausted(solver_ctx *ctx)
+ int changed = FALSE;
+
+ for (i = 0; i < wh; ++i) {
+- if (ctx->clues[i] == EMPTY) continue;
++ if (ctx->clues[i] == (char)EMPTY) continue;
+
+ if (bitcount[(ctx->borders[i] & BORDER_MASK)] == ctx->clues[i]) {
+ for (dir = 0; dir < 4; ++dir) {
+@@ -528,7 +528,7 @@ static int is_solved(const game_params *params, clue *clues,
+ for (i = 0; i < wh; ++i) {
+ if (dsf[i] == UNVISITED) dfs_dsf(i, params->w, border, dsf, TRUE);
+ if (dsf_size(dsf, i) != k) goto error;
+- if (clues[i] == EMPTY) continue;
++ if (clues[i] == (char)EMPTY) continue;
+ if (clues[i] != bitcount[border[i] & BORDER_MASK]) goto error;
+ }
+
+@@ -674,7 +674,7 @@ static char *new_game_desc(const game_params *params, random_state *rs,
+ p = numbers;
+ r = 0;
+ for (i = 0; i < wh; ++i) {
+- if (numbers[i] != EMPTY) {
++ if (numbers[i] != (char)EMPTY) {
+ while (r) {
+ while (r > 26) {
+ *p++ = 'z';
+--
+2.7.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
new file mode 100644
index 000000000..0b971c432
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
@@ -0,0 +1,32 @@
+From 78d6d1706c21ad467520075ff7a8bf15cfbd68b3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Dec 2015 22:13:16 +0000
+Subject: [PATCH] rect: Fix compiler errors about uninitialized use of
+ variables
+
+error: 'r2.x' may be used uninitialized in this function
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ rect.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/rect.c b/rect.c
+index 55667c0..fa3a786 100644
+--- a/rect.c
++++ b/rect.c
+@@ -1317,7 +1317,8 @@ static char *new_game_desc(const game_params *params_in, random_state *rs,
+ if (ndirs > 0) {
+ int which, dir;
+ struct rect r1, r2;
+-
++ memset(&r1, 0, sizeof(struct rect));
++ memset(&r2, 0, sizeof(struct rect));
+ which = random_upto(rs, ndirs);
+ dir = dirs[which];
+
+--
+2.6.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
new file mode 100644
index 000000000..c134acde2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
@@ -0,0 +1,43 @@
+gtk.c: fix compiling failure with option -g -O
+
+There were compiling failure with option -g -O
+...
+././gtk.c: In function 'configure_area':
+././gtk.c:397:2: error: 'cr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ cairo_set_source_rgb(cr,
+ ^
+././gtk.c:384:14: note: 'cr' was declared here
+ cairo_t *cr;
+ ^
+././gtk.c: In function 'main':
+././gtk.c:2911:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ fprintf(stderr, "%s: %s\n", pname, error);
+ ^
+cc1: all warnings being treated as errors
+...
+
+Initialized pointer 'cr' and 'error' with NULL
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gtk.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gtk.c b/gtk.c
+index a2eba2c..c54bf63 100644
+--- a/gtk.c
++++ b/gtk.c
+@@ -2481,7 +2481,7 @@ char *fgetline(FILE *fp)
+ int main(int argc, char **argv)
+ {
+ char *pname = argv[0];
+- char *error;
++ char *error = NULL;
+ int ngenerate = 0, print = FALSE, px = 1, py = 1;
+ int time_generation = FALSE, test_solve = FALSE, list_presets = FALSE;
+ int soln = FALSE, colour = FALSE;
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch
new file mode 100644
index 000000000..7e2c3ab75
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch
@@ -0,0 +1,203 @@
+This patch enable owl menu, which is hidden in the title bar to save space on
+small screen. It has not been used for a long time, rebase needed.
+
+Upstream-Status: Inappropriate [enable feature]
+
+Index: src/gtk.c
+===================================================================
+--- src/gtk.c (revision 22)
++++ src/gtk.c (working copy)
+@@ -28,6 +28,8 @@
+ #include <gdk/gdkx.h>
+ #include <gdk-pixbuf/gdk-pixbuf.h>
+
++#include <libowl/owlwindowmenu.h>
++
+ #include <librsvg/rsvg.h>
+
+ #include <X11/Xlib.h>
+@@ -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 ("<ui><menubar><placeholder name=\"TypePlaceholder\">"
++ xml = g_string_new ("<ui><menubar><menu name=\"TopMenu\" action=\"Top\">"
++ "<placeholder name=\"TypePlaceholder\">"
+ "<menu name=\"SettingsMenu\" action=\"Settings\">");
+
+ for (i = 0; i < midend_num_presets(fe->me); i++) {
+@@ -1359,8 +1365,14 @@
+ "<menuitem name=\"CustomMenu\" action=\"Custom\"/>");
+ }
+
+- g_string_append (xml, "</menu></placeholder></menubar></ui>");
+- gtk_ui_manager_add_ui_from_string (merge, xml->str, -1, NULL);
++ g_string_append (xml, "</menu></placeholder></menu></menubar></ui>");
++
++ 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 = "<ui><menubar><menu name=\"GameMenu\" action=\"Game\">"
++ char *str = "<ui><menubar><menu name=\"TopMenu\" action=\"Top\">"
++ "<menu name=\"GameMenu\" action=\"Game\">"
+ "<placeholder name=\"SolvePlaceholder\">"
+ "<separator name=\"SolveSep\"/>"
+ "<menuitem name=\"SolveMenu\" action=\"Solve\"/>"
+- "</placeholder></menu></menubar></ui>";
++ "</placeholder></menu></menu></menubar></ui>";
+
+- 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 @@
+ <ui>
+ <menubar>
+-<menu name="GameMenu" action="Game">
+- <menuitem name="NewMenu" action="New"/>
+- <menuitem name="RestartMenu" action="Restart"/>
+-<!-- <menuitem name="SpecificMenu" action="Specific"/> -->
+- <menuitem name="RandomMenu" action="Random"/>
+- <separator name="GameSep1"/>
+- <menuitem name="LoadMenu" action="Load"/>
+- <menuitem name="SaveMenu" action="Save"/>
+- <separator name="GameSep2"/>
+- <menuitem name="UndoMenu" action="Undo"/>
+- <menuitem name="RedoMenu" action="Redo"/>
+- <placeholder name="CopyPlaceholder"/>
+- <placeholder name="SolvePlaceholder"/>
+- <separator name="GameSep3"/>
+- <menuitem name="QuitMenu" action="Quit"/>
+-</menu>
++<menu name="TopMenu" action="Top">
++ <menu name="GameMenu" action="Game">
++ <menuitem name="NewMenu" action="New"/>
++ <menuitem name="RestartMenu" action="Restart"/>
++ <!-- <menuitem name="SpecificMenu" action="Specific"/> -->
++ <menuitem name="RandomMenu" action="Random"/>
++ <separator name="GameSep1"/>
++ <menuitem name="LoadMenu" action="Load"/>
++ <menuitem name="SaveMenu" action="Save"/>
++ <separator name="GameSep2"/>
++ <menuitem name="UndoMenu" action="Undo"/>
++ <menuitem name="RedoMenu" action="Redo"/>
++ <placeholder name="CopyPlaceholder"/>
++ <placeholder name="SolvePlaceholder"/>
++ </menu>
+
+-<placeholder name="TypePlaceholder"/>
+-
+-<menu name="HelpMenu" action="Help">
++ <placeholder name="TypePlaceholder"/>
+ <menuitem name="AboutMenu" action="About"/>
++ <menuitem name="QuitMenu" action="Quit"/>
++
+ </menu>
+ </menubar>
+ </ui>
+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/import-layers/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb b/import-layers/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb
new file mode 100644
index 000000000..dfa68a659
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb
@@ -0,0 +1,73 @@
+SUMMARY = "Portable Puzzle Collection"
+HOMEPAGE = "http://o-hand.com/"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+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 gettext-native"
+
+# libowl requires x11 in DISTRO_FEATURES
+DEPENDS_append_poky = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libowl', '', d)}"
+
+# Requires gdk/gdkx.h which is provided by gtk when x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRCREV = "92f1a20e4b72eed7a35b00984d9793b51dc2fb3b"
+PV = "0.2+git${SRCPV}"
+PR = "r10"
+
+SRC_URI = "git://git.yoctoproject.org/${BPN}"
+SRC_URI_append_poky = " file://oh-puzzles-owl-menu.patch;striplevel=0 "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig distro_features_check
+
+bindir = "/usr/games"
+
+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 <<STOP > ${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}-extra = "/usr/games/ /usr/share/applications /etc/gconf/schemas"
+
+python __anonymous () {
+ var = bb.data.expand("FILES_${PN}", d, 1)
+ data = d.getVar(var, True)
+ 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
+ d.setVar(var, data)
+}
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb b/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
new file mode 100644
index 000000000..346f43bc9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
@@ -0,0 +1,66 @@
+SUMMARY = "Simon Tatham's Portable Puzzle Collection"
+HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
+
+DEPENDS = "libxt"
+
+# The libxt requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
+
+SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
+ file://fix-compiling-failure-with-option-g-O.patch \
+ file://0001-Use-labs-instead-of-abs.patch \
+ file://0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch \
+ file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
+"
+SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed"
+PE = "1"
+PV = "0.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep distro_features_check pkgconfig
+
+PACKAGECONFIG ??= "gtk2"
+PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+,"
+PACKAGECONFIG[gtk3] = "--with-gtk=3,,gtk+3,"
+
+do_configure_prepend () {
+ ./mkfiles.pl
+}
+
+FILES_${PN} = "${prefix}/bin/* ${datadir}/applications/*"
+
+do_install () {
+ rm -rf ${D}/*
+ export prefix=${D}
+ export DESTDIR=${D}
+ install -d ${D}/${prefix}/bin/
+ oe_runmake install
+
+
+ install -d ${D}/${datadir}/applications/
+
+ # Create desktop shortcuts
+ cd ${D}/${prefix}/bin
+ 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 <<STOP > ${D}/${datadir}/applications/$prog.desktop
+[Desktop Entry]
+Name=$title
+Exec=${prefix}/bin/$prog
+Icon=applications-games
+Terminal=false
+Type=Application
+Categories=Game;
+StartupNotify=true
+X-MB-SingleInstance=true
+STOP
+ fi
+ done
+}
OpenPOWER on IntegriCloud