blob: 69c3faadcf95076ad8991135ccb1fe1cab686d02 [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"
William A. Kennington IIIac69b482021-06-02 12:28:27 -07005LIC_FILES_CHKSUM = "file://LICENCE;md5=93c2525113e094a4a744cf14d4de07e2"
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"
William A. Kennington IIIac69b482021-06-02 12:28:27 -070020SRCREV = "c0da615a933a6676e2c6b957368067ca1bc10abd"
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 Williamsc0f7c042017-02-23 20:41:17 -060030do_install_append () {
31 # 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