summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-08-30 08:24:36 +0100
committerSam James <sam@gentoo.org>2023-08-30 08:48:09 +0100
commitc86221e56441dc45b2e8ced555b8cc821545e62c (patch)
tree121c09ebf1cc18ea4e5928b86a50efb63487b15b /app-text/highlight
parentsec-keys/openpgp-keys-andresimon: new package, add 20230830 (diff)
downloadgentoo-c86221e56441dc45b2e8ced555b8cc821545e62c.tar.gz
gentoo-c86221e56441dc45b2e8ced555b8cc821545e62c.tar.bz2
gentoo-c86221e56441dc45b2e8ced555b8cc821545e62c.zip
app-text/highlight: add 4.8
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text/highlight')
-rw-r--r--app-text/highlight/Manifest2
-rw-r--r--app-text/highlight/highlight-4.8.ebuild111
2 files changed, 113 insertions, 0 deletions
diff --git a/app-text/highlight/Manifest b/app-text/highlight/Manifest
index ff24bf19e0b3..070203ad8228 100644
--- a/app-text/highlight/Manifest
+++ b/app-text/highlight/Manifest
@@ -1,2 +1,4 @@
DIST highlight-4.1.tar.bz2 1469115 BLAKE2B 9ee4c61ea5ebdfd04c2bb341838cc66a755d5deb6dfb5d863d22dbb86be9b5d08999f22bb184053126bdaf8858777eb2ac504fed8998dc51bd6e1cd64f911ad8 SHA512 6e3ba72b2109f1b33fcebd1a426a8d4b3e12ee224b8a2069e7aab1391473594ccf9b35303bca5ca1339d2ce42bc6db2d16c1da7b1cdd451f5fabe672ca388731
DIST highlight-4.6.tar.bz2 1488327 BLAKE2B 952171929aa021c80690b2ddcd5adba3b6c7e54425cfc851368b768a53c749e34495b0832d4ce5546b5bc68c0ea4e3b5bd6df4f379e02702fd3a497adc52d60b SHA512 0214f2141ecf2ab350368ff165dc5f58eb3a23b31142b9d1c443a35f8ea72b9e33770c2de185cd2e3645e298ad41ec1fd45db5ebf546da3144e1dc93da32b811
+DIST highlight-4.8.tar.bz2 1492966 BLAKE2B f0bc746cb671037c2a5f1557c6114c143448de8fe295f4b74d38daecc615bfb50e50b5f3f3ee488488f1bc52dc11b283f13cbaa956959946d2dcaca91a6ef804 SHA512 c04e94b2fdb1ebda37937a8bdcdb1bb5afe171a74ca58ddf40b1972bc62a07dc02d628bc962b1db654805a446f32da8d7af41a0c162476cf47a3535128ca6ace
+DIST highlight-4.8.tar.bz2.asc 488 BLAKE2B 466905e2a4b1b577feba593e2d6e855e09764cdb08ddbd5aa3b4c62c4b06bc19a013df16aa1dfc81d4e52765641d5f98615233609d7b4f039f6f8c6a929d345a SHA512 929c5b0a25a2f5a0b9204afb03b5456b2b62d07e519799602b06a0ad2d4bc1d9eac92965571732b0eaffe780904321ebffb31cdf61b6fe644ecc39ddb983c7b8
diff --git a/app-text/highlight/highlight-4.8.ebuild b/app-text/highlight/highlight-4.8.ebuild
new file mode 100644
index 000000000000..d6dffaa6f8af
--- /dev/null
+++ b/app-text/highlight/highlight-4.8.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/andresimon.asc
+inherit lua-single qmake-utils toolchain-funcs verify-sig xdg
+
+DESCRIPTION="Converts source code to formatted text (HTML, LaTeX, etc.) with syntax highlight"
+HOMEPAGE="http://www.andre-simon.de/"
+SRC_URI="
+ http://www.andre-simon.de/zip/${P}.tar.bz2
+ verify-sig? ( http://www.andre-simon.de/zip/${P}.tar.bz2.asc )
+"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="examples gui"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+RDEPEND="
+ ${LUA_DEPS}
+ gui? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ dev-libs/boost
+"
+BDEPEND="
+ virtual/pkgconfig
+ gui? ( dev-qt/linguist-tools:5 )
+ verify-sig? ( sec-keys/openpgp-keys-andresimon )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.57-qt_libs_lua.patch
+)
+
+myhlopts=(
+ CXX="$(tc-getCXX)"
+ AR="$(tc-getAR)"
+ LDFLAGS="${LDFLAGS}"
+ CFLAGS="${CXXFLAGS} -DNDEBUG"
+ DESTDIR="${D}"
+ PREFIX="${EPREFIX}/usr"
+ HL_CONFIG_DIR="${EPREFIX}/etc/highlight/"
+ HL_DATA_DIR="${EPREFIX}/usr/share/highlight/"
+ doc_dir="${EPREFIX}/usr/share/doc/${PF}/"
+ conf_dir="${EPREFIX}/etc/highlight/"
+ examples_dir="${EPREFIX}/usr/share/doc/${PF}/extras"
+)
+
+src_prepare() {
+ default
+
+ # Disable man page compression
+ sed \
+ -e "/GZIP/d" \
+ -e "/COPYING/d" \
+ -i makefile || die
+
+ sed -e "/LSB_DOC_DIR/s:doc/${PN}:doc/${PF}:" \
+ -i src/core/datadir.cpp || die
+
+ sed -r -i \
+ -e "/^LUA_.*pkg-config/s,\<lua\>,${ELUA},g" \
+ "${S}"/extras/tcl/makefile \
+ "${S}"/extras/swig/makefile \
+ || die "Failed to set Lua implementation"
+
+ # We set it via eqmake5, otherwise it forces clang...
+ sed -e "s/QMAKE_CC/#QMAKE_CC/g" \
+ -e "s/QMAKE_CXX /#QMAKE_CXX /g" \
+ -i src/gui-qt/highlight.pro || die
+}
+
+src_configure() {
+ if use gui ; then
+ pushd src/gui-qt > /dev/null || die
+ eqmake5 \
+ 'DEFINES+=DATA_DIR=\\\"'"${EPREFIX}"'/usr/share/${PN}/\\\" CONFIG_DIR=\\\"'"${EPREFIX}"'/etc/${PN}/\\\" DOC_DIR=\\\"'"${EPREFIX}"'/usr/share/doc/${PF}/\\\"'
+ popd > /dev/null || die
+ fi
+}
+
+src_compile() {
+ emake -f makefile LUA_PKG_NAME="${ELUA}" "${myhlopts[@]}"
+ if use gui ; then
+ emake -C src/gui-qt
+ fi
+}
+
+src_install() {
+ emake -f makefile "${myhlopts[@]}" install
+
+ if use gui; then
+ emake -f makefile "${myhlopts[@]}" install-gui
+ docompress -x /usr/share/doc/${PF}/{ChangeLog,COPYING,README,README_PLUGINS}
+ fi
+
+ if ! use examples ; then
+ rm -r "${ED}"/usr/share/doc/${PF}/extras || die
+ fi
+}