puzzles_git.bb 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. SUMMARY = "Simon Tatham's Portable Puzzle Collection"
  2. HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
  3. LICENSE = "MIT"
  4. LIC_FILES_CHKSUM = "file://LICENCE;md5=6099f4981f9461d7f411091e69a7f07a"
  5. DEPENDS = "libxt"
  6. # The libxt requires x11 in DISTRO_FEATURES
  7. REQUIRED_DISTRO_FEATURES = "x11"
  8. SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
  9. file://fix-compiling-failure-with-option-g-O.patch \
  10. file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
  11. file://0001-Use-Wno-error-format-overflow-if-the-compiler-suppor.patch \
  12. file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \
  13. file://fix-ki-uninitialized.patch \
  14. "
  15. UPSTREAM_CHECK_COMMITS = "1"
  16. SRCREV = "9aa7b7cdfb2bcd200f45941a58d6ae698882a2d4"
  17. PE = "2"
  18. PV = "0.0+git${SRCPV}"
  19. S = "${WORKDIR}/git"
  20. inherit autotools features_check pkgconfig
  21. PACKAGECONFIG ??= "gtk3"
  22. PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+,"
  23. PACKAGECONFIG[gtk3] = "--with-gtk=3,,gtk+3,"
  24. CFLAGS_append = " -Wno-deprecated-declarations"
  25. ASNEEDED = ""
  26. do_configure_prepend () {
  27. cd ${S}
  28. ./mkfiles.pl
  29. cd ${B}
  30. }
  31. do_install_append () {
  32. # net conflicts with Samba, so rename it
  33. mv ${D}${bindir}/net ${D}${bindir}/puzzles-net
  34. # Create desktop shortcuts
  35. install -d ${D}/${datadir}/applications/
  36. cd ${D}/${prefix}/bin
  37. for prog in *; do
  38. if [ -x $prog ]; then
  39. # Convert prog to Title Case
  40. title=$(echo $prog | sed 's/puzzles-//' | sed 's/\(^\| \)./\U&/g')
  41. echo "making ${D}/${datadir}/applications/$prog.desktop"
  42. cat <<STOP > ${D}/${datadir}/applications/$prog.desktop
  43. [Desktop Entry]
  44. Name=$title
  45. Exec=${bindir}/$prog
  46. Icon=applications-games
  47. Terminal=false
  48. Type=Application
  49. Categories=Game;
  50. StartupNotify=true
  51. STOP
  52. fi
  53. done
  54. }
  55. PACKAGES += "${PN}-extra"
  56. FILES_${PN} = ""
  57. FILES_${PN}-extra = "${prefix}/bin ${datadir}/applications"
  58. python __anonymous () {
  59. var = d.expand("FILES_${PN}")
  60. data = d.getVar(var, False)
  61. for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"):
  62. data = data + " ${bindir}/%s" % name
  63. data = data + " ${datadir}/applications/%s.desktop" % name
  64. d.setVar(var, data)
  65. }