1 # Maintainer: Giovanni Scafora <giovanni@archlinux.org>
2 # Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
4 pkgname=source-highlight
7 pkgdesc="Convert source code to syntax highlighted document"
9 url="https://www.gnu.org/software/src-highlite/"
11 depends=('bash' 'boost-libs')
12 makedepends=('ctags' 'boost')
13 optdepends=('lesspipe: src-hilite-lesspipe.sh')
14 source=(https://ftp.gnu.org/gnu/src-highlite/${pkgname}-${pkgver}.tar.gz{,.sig}
15 source-highlight-gcc11.patch)
16 validpgpkeys=('E9FE8AE950CB07F5BEB2E805036A75309D33E5B5')
17 sha512sums=('d8e154e9a5d62c77807e4e5d36c0faed5ce2964291be5f8b83e2968a6de52229503689a4ca2109a717ae2632a14b63ec937ca0430c91684c72063f6bc0294195'
19 '55f22121a2e7501c437f305790b34d330b9ad475a87ed4482527386c23424ed2eb8c1a563da41995573f0598e4a5c9096abbf414938f7e1305354bcc720944ec')
22 patch -d $pkgname-$pkgver -p1 < source-highlight-gcc11.patch # Fix build with GCC 11
24 cd ${pkgname}-${pkgver}
25 sed -i 's/lesspipe/lesspipe.sh/' src/src-hilite-lesspipe.sh.in
29 cd ${pkgname}-${pkgver}
31 ./configure --prefix=/usr \
33 --with-bash-completion=/usr/share/bash-completion/completions
38 cd ${pkgname}-${pkgver}
40 make prefix="${pkgdir}/usr" bash_completiondir="${pkgdir}/usr/share/bash-completion/completions" install
42 # PKGBUILD syntax highlighting
43 echo -e "\npkgbuild = sh.lang" >> "${pkgdir}"/usr/share/${pkgname}/lang.map