Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Simon Tatham's Portable Puzzle Collection" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 2 | DESCRIPTION = "Collection of small computer programs which implement one-player puzzle games." |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3 | HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 4 | LICENSE = "MIT" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://LICENCE;md5=6e7d24cf1c949887ee9447a1e2a4a24c" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 7 | # gtk support includes a bunch of x11 headers |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | REQUIRED_DISTRO_FEATURES = "x11" |
| 9 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 10 | SRC_URI = "git://git.tartarus.org/simon/puzzles.git;branch=main \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | file://fix-compiling-failure-with-option-g-O.patch \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 12 | file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 13 | file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \ |
| 14 | file://fix-ki-uninitialized.patch \ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 15 | file://0001-malloc-Check-for-excessive-values-to-malloc.patch \ |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 16 | file://0001-map-Fix-stringop-overflow-warning.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 17 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 18 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | UPSTREAM_CHECK_COMMITS = "1" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 20 | SRCREV = "8f3413c31ffd43c4ebde40894ac1b2f7cdf222c3" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 21 | PE = "2" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | PV = "0.0+git${SRCPV}" |
| 23 | |
| 24 | S = "${WORKDIR}/git" |
| 25 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 26 | inherit cmake features_check pkgconfig |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 27 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 28 | DEPENDS += "gtk+3" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 30 | do_install:append () { |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 31 | # net conflicts with Samba, so rename it |
| 32 | mv ${D}${bindir}/net ${D}${bindir}/puzzles-net |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | |
| 34 | # Create desktop shortcuts |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 35 | install -d ${D}/${datadir}/applications/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | cd ${D}/${prefix}/bin |
| 37 | for prog in *; do |
| 38 | if [ -x $prog ]; then |
| 39 | # Convert prog to Title Case |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 40 | title=$(echo $prog | sed 's/puzzles-//' | sed 's/\(^\| \)./\U&/g') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | echo "making ${D}/${datadir}/applications/$prog.desktop" |
| 42 | cat <<STOP > ${D}/${datadir}/applications/$prog.desktop |
| 43 | [Desktop Entry] |
| 44 | Name=$title |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 45 | Exec=${bindir}/$prog |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 46 | Icon=applications-games |
| 47 | Terminal=false |
| 48 | Type=Application |
| 49 | Categories=Game; |
| 50 | StartupNotify=true |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | STOP |
| 52 | fi |
| 53 | done |
| 54 | } |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 55 | |