blob: 298e29f55992b823232a562ca15353fd22cbbc44 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Simon Tatham's Portable Puzzle Collection"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "Collection of small computer programs which implement one-player puzzle games."
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08004LICENSE = "MIT"
Andrew Geissler09036742021-06-25 14:25:14 -05005LIC_FILES_CHKSUM = "file://LICENCE;md5=6e7d24cf1c949887ee9447a1e2a4a24c"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
William A. Kennington IIIac69b482021-06-02 12:28:27 -07007# gtk support includes a bunch of x11 headers
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008REQUIRED_DISTRO_FEATURES = "x11"
9
William A. Kennington IIIac69b482021-06-02 12:28:27 -070010SRC_URI = "git://git.tartarus.org/simon/puzzles.git;branch=main \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011 file://fix-compiling-failure-with-option-g-O.patch \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050012 file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
Brad Bishop19323692019-04-05 15:28:33 -040013 file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \
14 file://fix-ki-uninitialized.patch \
Andrew Geissler6ce62a22020-11-30 19:58:47 -060015 file://0001-malloc-Check-for-excessive-values-to-malloc.patch \
Andrew Geissler90fd73c2021-03-05 15:25:55 -060016 file://0001-map-Fix-stringop-overflow-warning.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017 "
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018
Brad Bishop316dfdd2018-06-25 12:45:53 -040019UPSTREAM_CHECK_COMMITS = "1"
Andrew Geissler09036742021-06-25 14:25:14 -050020SRCREV = "8f3413c31ffd43c4ebde40894ac1b2f7cdf222c3"
Brad Bishop316dfdd2018-06-25 12:45:53 -040021PE = "2"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022PV = "0.0+git${SRCPV}"
23
24S = "${WORKDIR}/git"
25
William A. Kennington IIIac69b482021-06-02 12:28:27 -070026inherit cmake features_check pkgconfig
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050027
William A. Kennington IIIac69b482021-06-02 12:28:27 -070028DEPENDS += "gtk+3"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029
Patrick Williams213cb262021-08-07 19:21:33 -050030do_install:append () {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060031 # net conflicts with Samba, so rename it
32 mv ${D}${bindir}/net ${D}${bindir}/puzzles-net
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033
34 # Create desktop shortcuts
Patrick Williamsc0f7c042017-02-23 20:41:17 -060035 install -d ${D}/${datadir}/applications/
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036 cd ${D}/${prefix}/bin
37 for prog in *; do
38 if [ -x $prog ]; then
39 # Convert prog to Title Case
Patrick Williamsc0f7c042017-02-23 20:41:17 -060040 title=$(echo $prog | sed 's/puzzles-//' | sed 's/\(^\| \)./\U&/g')
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041 echo "making ${D}/${datadir}/applications/$prog.desktop"
42 cat <<STOP > ${D}/${datadir}/applications/$prog.desktop
43[Desktop Entry]
44Name=$title
Patrick Williamsc0f7c042017-02-23 20:41:17 -060045Exec=${bindir}/$prog
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046Icon=applications-games
47Terminal=false
48Type=Application
49Categories=Game;
50StartupNotify=true
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051STOP
52 fi
53 done
54}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080055