diff options
author | Sam James <sam@gentoo.org> | 2021-02-21 03:46:55 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-02-21 03:46:55 +0000 |
commit | b38d20d3f4334ccf4c0968563f9978567c8f101f (patch) | |
tree | 55023ff76ab146c8b8852e1486af89a5010fc731 /app-text | |
parent | sci-mathematics/euler: port to EAPI 7 (diff) | |
download | gentoo-b38d20d3f4334ccf4c0968563f9978567c8f101f.tar.gz gentoo-b38d20d3f4334ccf4c0968563f9978567c8f101f.tar.bz2 gentoo-b38d20d3f4334ccf4c0968563f9978567c8f101f.zip |
app-text/highlight: bump to 3.60
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/highlight/Manifest | 1 | ||||
-rw-r--r-- | app-text/highlight/highlight-3.60.ebuild | 103 |
2 files changed, 104 insertions, 0 deletions
diff --git a/app-text/highlight/Manifest b/app-text/highlight/Manifest index 3dd422a98bc3..769420aec1bd 100644 --- a/app-text/highlight/Manifest +++ b/app-text/highlight/Manifest @@ -1 +1,2 @@ DIST highlight-3.57.tar.bz2 1412857 BLAKE2B c0ee8189294feac3b5e8c6d356634d8074a8960f2010918de52f23515ad4a13626971e9106ecc6d2adbdb45e0ebb66ff60eb3cbe86d2449666e3424f1c0dc3a6 SHA512 a086f6b8c4a4fc0b6651d456b178350a6c59a32cd613451d81b53fe3294eb0f80d673cb64fb615ef91d6c4d4bbc8a57413aec2490d2a5ad67e695ec6e92b3d99 +DIST highlight-3.60.tar.bz2 1412486 BLAKE2B 3651a44c7e492ce02de04d21ed2e25afb40e871e21eacef88416f98226046e99a2a0a27c3354119715f320df1653ad7065c1c9a4a23b3081971df4d72c6fa19c SHA512 e4d0822592675115c7c2121d6ed066f997d315fecea384caeb506de1933f6bd60fd0dea57dcdafba85465f9f6b922ed168db57ce725bd7f19689d30624412f1b diff --git a/app-text/highlight/highlight-3.60.ebuild b/app-text/highlight/highlight-3.60.ebuild new file mode 100644 index 000000000000..323a92ad3acc --- /dev/null +++ b/app-text/highlight/highlight-3.60.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-{1..3} ) + +inherit lua-single qmake-utils toolchain-funcs + +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" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="examples qt5" + +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND=" + ${LUA_DEPS} + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) +" +DEPEND="${RDEPEND} + dev-libs/boost +" +BDEPEND=" + virtual/pkgconfig + qt5? ( dev-qt/linguist-tools:5 ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-3.57-qt_libs_lua.patch +) + +myhlopts=( + "CXX=$(tc-getCXX)" + "AR=$(tc-getAR)" + "LDFLAGS=${LDFLAGS}" + "CFLAGS=${CXXFLAGS} -DNDEBUG -std=c++11" + "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/" +) + +src_prepare() { + default + + # disable man page compression + sed -e "/GZIP/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 qt5 ; 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 qt5 ; then + pushd src/gui-qt > /dev/null || die + emake + popd > /dev/null || die + fi +} + +src_install() { + emake -f makefile "${myhlopts[@]}" install + if use qt5; 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 +} |