template 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Template file for 'textadept'
  2. pkgname=textadept
  3. version=11.1
  4. revision=1
  5. wrksrc="textadept-textadept_${version}"
  6. build_wrksrc="src"
  7. hostmakedepends="tar unzip pkg-config"
  8. makedepends="gtk+3-devel ncurses-devel"
  9. short_desc="Fast, minimalist, and extensible text editor for programmers"
  10. maintainer="reback00 <reback00@protonmail.com>"
  11. license="MIT"
  12. homepage="https://orbitalquark.github.io/textadept/"
  13. # Note: The dependency urls and filenames must be checked and updated manually
  14. # for distfiles and skip_extraction variables on every new release (and
  15. # checksums updated accordingly). This is so that XBPS can cache them. Details:
  16. # https://github.com/void-linux/void-packages/pull/15627#issuecomment-549018252
  17. distfiles="https://github.com/orbitalquark/textadept/archive/textadept_${version}.tar.gz
  18. https://www.scintilla.org/scintilla445.tgz
  19. https://github.com/orbitalquark/scinterm/archive/6a774158d8a3c7bc7ea120bc01cdb016fa351a7e.zip
  20. https://github.com/orbitalquark/scintillua/archive/scintillua_4.4.5-2.zip
  21. https://www.lua.org/ftp/lua-5.3.5.tar.gz
  22. http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz
  23. https://github.com/keplerproject/luafilesystem/archive/v1_8_0.zip
  24. https://github.com/orbitalquark/gtdialog/archive/64587546482a1a6324706d75c80b77d2f87118a4.zip
  25. https://invisible-mirror.net/archives/cdk/cdk-5.0-20200923.tgz
  26. http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.20.tar.gz"
  27. checksum="87d67975b22952344e1bdcb330301b88cdfe8242e7710526cd344ab252499c2a
  28. 4f2168684b4024dc3d6b267320fff1d729192047f4a1b79aeab9ec7c64f733ec
  29. 3b1e3cc3ee48bb158d1d666c7c86d190905c973918914876f6ab3712f8dd7d20
  30. ccd5b3d615116b8c4376086cf1d03b6ef1f67a565e57446b15eba3f39ef0c180
  31. 0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac
  32. 48d66576051b6c78388faad09b70493093264588fcd0f258ddaab1cdd4a15ffe
  33. e3a6beca7a8a90522eed31db6ccdc5ed65a433826500c6862784e27671b9e18a
  34. 093a4f973196083610c4489e8d9272f340ebf82d48c064f1542c6464eda2af82
  35. 007f5de880cb2eebd8556df7e4cd8673d5e64c9970147eee6923a814c29faaed
  36. 6c0d87c94ab9915e76ecd313baec08dedf3bd56de83743d9aa923a081935d2f5"
  37. skip_extraction="scintilla445.tgz
  38. 6a774158d8a3c7bc7ea120bc01cdb016fa351a7e.zip
  39. scintillua_4.4.5-2.zip
  40. lua-5.3.5.tar.gz
  41. lpeg-1.0.2.tar.gz
  42. v1_8_0.zip
  43. 64587546482a1a6324706d75c80b77d2f87118a4.zip
  44. cdk-5.0-20200923.tgz
  45. libtermkey-0.20.tar.gz"
  46. post_extract() {
  47. # We copy the downloaded dep files to src directory so that they are found
  48. # and not downloaded again by the build process. This helps to utilize caching.
  49. echo "${skip_extraction}" | while read archive; do
  50. if [ -f "${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/${archive}" ]; then
  51. cp "${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/${archive}" \
  52. "${wrksrc}/${build_wrksrc}/"
  53. fi
  54. done
  55. }
  56. pre_configure() {
  57. # For cross builds
  58. vsed -i \
  59. -e '/^CC =/d' \
  60. -e '/^CFLAGS =/d' \
  61. -e '/^CXX =/d' \
  62. -e 's/^CXXFLAGS =.*/CXXFLAGS += -std=c++17/' Makefile
  63. }
  64. do_build() {
  65. make deps
  66. make ${makejobs} GTK3=1
  67. make ${makejobs} curses
  68. }
  69. do_install() {
  70. make PREFIX=/usr DESTDIR="${DESTDIR}" install
  71. make curses PREFIX=/usr DESTDIR="${DESTDIR}" install
  72. # Binaries in /usr/share/textadept are not allowed
  73. # So we relocate to /usr/lib/textadept
  74. mv "${DESTDIR}/usr/share/textadept" "${DESTDIR}/usr/lib/textadept"
  75. ln -sf "/usr/lib/textadept/textadept" "${DESTDIR}/usr/bin/textadept"
  76. ln -sf "/usr/lib/textadept/textadept-curses" \
  77. "${DESTDIR}/usr/bin/textadept-curses"
  78. # For icons
  79. mkdir -p "${DESTDIR}/usr/share/pixmaps"
  80. ln -s "/usr/lib/textadept/core/images/textadept.svg" \
  81. "${DESTDIR}/usr/share/pixmaps/textadept.svg"
  82. ln -s "/usr/lib/textadept/core/images/ta_48x48.png" \
  83. "${DESTDIR}/usr/share/pixmaps/textadept.png"
  84. vlicense ../LICENSE
  85. }