Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Simon Tatham's Portable Puzzle Collection" |
| 2 | HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/" |
| 3 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 4 | DEPENDS = "libxt" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 5 | |
| 6 | # The libxt requires x11 in DISTRO_FEATURES |
| 7 | REQUIRED_DISTRO_FEATURES = "x11" |
| 8 | |
| 9 | LICENSE = "MIT" |
| 10 | LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc" |
| 11 | |
| 12 | SRC_URI = "git://git.tartarus.org/simon/puzzles.git \ |
| 13 | file://fix-compiling-failure-with-option-g-O.patch \ |
| 14 | file://0001-Use-labs-instead-of-abs.patch \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 15 | file://0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch \ |
| 16 | file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | " |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 18 | SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | PE = "1" |
| 20 | PV = "0.0+git${SRCPV}" |
| 21 | |
| 22 | S = "${WORKDIR}/git" |
| 23 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 24 | inherit autotools-brokensep distro_features_check pkgconfig |
| 25 | |
| 26 | PACKAGECONFIG ??= "gtk2" |
| 27 | PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+," |
| 28 | PACKAGECONFIG[gtk3] = "--with-gtk=3,,gtk+3," |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | |
| 30 | do_configure_prepend () { |
| 31 | ./mkfiles.pl |
| 32 | } |
| 33 | |
| 34 | FILES_${PN} = "${prefix}/bin/* ${datadir}/applications/*" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | |
| 36 | do_install () { |
| 37 | rm -rf ${D}/* |
| 38 | export prefix=${D} |
| 39 | export DESTDIR=${D} |
| 40 | install -d ${D}/${prefix}/bin/ |
| 41 | oe_runmake install |
| 42 | |
| 43 | |
| 44 | install -d ${D}/${datadir}/applications/ |
| 45 | |
| 46 | # Create desktop shortcuts |
| 47 | cd ${D}/${prefix}/bin |
| 48 | for prog in *; do |
| 49 | if [ -x $prog ]; then |
| 50 | # Convert prog to Title Case |
| 51 | title=$(echo $prog | sed 's/\(^\| \)./\U&/g') |
| 52 | echo "making ${D}/${datadir}/applications/$prog.desktop" |
| 53 | cat <<STOP > ${D}/${datadir}/applications/$prog.desktop |
| 54 | [Desktop Entry] |
| 55 | Name=$title |
| 56 | Exec=${prefix}/bin/$prog |
| 57 | Icon=applications-games |
| 58 | Terminal=false |
| 59 | Type=Application |
| 60 | Categories=Game; |
| 61 | StartupNotify=true |
| 62 | X-MB-SingleInstance=true |
| 63 | STOP |
| 64 | fi |
| 65 | done |
| 66 | } |