Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Portable Puzzle Collection" |
| 2 | HOMEPAGE = "http://o-hand.com/" |
| 3 | BUGTRACKER = "http://bugzilla.yoctoproject.org/" |
| 4 | |
| 5 | LICENSE = "MIT" |
| 6 | LIC_FILES_CHKSUM = "file://LICENCE;md5=f56ec6772dd1c7c367067bbea8ea1675 \ |
| 7 | file://src/tree234.h;endline=28;md5=a188e6d250430ca094a54a82f48472a7 \ |
| 8 | file://src/tree234.c;endline=28;md5=b4feb1976feebf8f1379093ed52f2945" |
| 9 | |
| 10 | SECTION = "x11" |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 11 | DEPENDS = "gtk+ gconf intltool-native librsvg gettext-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | |
| 13 | # libowl requires x11 in DISTRO_FEATURES |
| 14 | DEPENDS_append_poky = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libowl', '', d)}" |
| 15 | |
| 16 | # Requires gdk/gdkx.h which is provided by gtk when x11 in DISTRO_FEATURES |
| 17 | REQUIRED_DISTRO_FEATURES = "x11" |
| 18 | |
| 19 | SRCREV = "92f1a20e4b72eed7a35b00984d9793b51dc2fb3b" |
| 20 | PV = "0.2+git${SRCPV}" |
| 21 | PR = "r10" |
| 22 | |
| 23 | SRC_URI = "git://git.yoctoproject.org/${BPN}" |
| 24 | SRC_URI_append_poky = " file://oh-puzzles-owl-menu.patch;striplevel=0 " |
| 25 | |
| 26 | S = "${WORKDIR}/git" |
| 27 | |
| 28 | inherit autotools pkgconfig distro_features_check |
| 29 | |
| 30 | bindir = "/usr/games" |
| 31 | |
| 32 | EXTRA_OEMAKE += "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1" |
| 33 | |
| 34 | do_install_append () { |
| 35 | install -d ${D}/${datadir}/applications/ |
| 36 | |
| 37 | cd ${D}/${prefix}/games |
| 38 | for prog in *; do |
| 39 | if [ -x $prog ]; then |
| 40 | # Convert prog to Title Case |
| 41 | title=$(echo $prog | sed 's/\(^\| \)./\U&/g') |
| 42 | echo "making ${D}/${datadir}/applications/$prog.desktop" |
| 43 | cat <<STOP > ${D}/${datadir}/applications/$prog.desktop |
| 44 | [Desktop Entry] |
| 45 | Name=$title |
| 46 | Exec=${prefix}/games/$prog |
| 47 | Icon=applications-games |
| 48 | Terminal=false |
| 49 | Type=Application |
| 50 | Categories=Game; |
| 51 | StartupNotify=true |
| 52 | X-MB-SingleInstance=true |
| 53 | Comment=Play $title. |
| 54 | STOP |
| 55 | fi |
| 56 | done |
| 57 | } |
| 58 | |
| 59 | PACKAGES += "${PN}-extra" |
| 60 | RDEPENDS_${PN}-extra += "oh-puzzles" |
| 61 | |
| 62 | FILES_${PN} = "/usr/share/pixmaps /usr/share/oh-puzzles/" |
| 63 | FILES_${PN}-dbg += "/usr/games/.debug/*" |
| 64 | FILES_${PN}-extra = "/usr/games/ /usr/share/applications /etc/gconf/schemas" |
| 65 | |
| 66 | python __anonymous () { |
| 67 | var = bb.data.expand("FILES_${PN}", d, 1) |
| 68 | data = d.getVar(var, True) |
| 69 | for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"): |
| 70 | data = data + " /usr/games/%s" % name |
| 71 | data = data + " /usr/share/applications/%s.desktop" % name |
| 72 | data = data + " /etc/gconf/schemas/%s.schemas" % name |
| 73 | d.setVar(var, data) |
| 74 | } |