public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/highlight/
Date: Mon,  6 Jul 2020 17:14:29 +0000 (UTC)	[thread overview]
Message-ID: <1594055668.b799b65375b36a8a9e1b6498a93a2488a0361671.robbat2@gentoo> (raw)

commit:     b799b65375b36a8a9e1b6498a93a2488a0361671
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  6 17:03:19 2020 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Jul  6 17:14:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b799b653

app-text/highlight: add support for slotted Lua

Verified on my desktop w/ Lua 5.3

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 app-text/highlight/highlight-3.57-r1.ebuild | 111 ++++++++++++++++++++++++++++
 1 file changed, 111 insertions(+)

diff --git a/app-text/highlight/highlight-3.57-r1.ebuild b/app-text/highlight/highlight-3.57-r1.ebuild
new file mode 100644
index 00000000000..079ca0895c8
--- /dev/null
+++ b/app-text/highlight/highlight-3.57-r1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit 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"
+
+RDEPEND="
+	|| ( dev-lang/lua:0 dev-lang/lua:5.3 dev-lang/lua:5.2 dev-lang/lua:5.1 )
+	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 )
+"
+
+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
+
+	# Use the correct pkgconfig name for Lua
+	# Upstream codebase supports up to and including Lua 5.3!
+	if has_version 'dev-lang/lua:5.3'; then
+		LUAPKGCONFIG=lua5.3
+	elif has_version 'dev-lang/lua:5.2'; then
+		LUAPKGCONFIG=lua5.2
+	elif has_version 'dev-lang/lua:5.1'; then
+		LUAPKGCONFIG=lua5.1
+	elif has_version 'dev-lang/lua:0'; then
+		LUAPKGCONFIG=lua
+	else
+		die "Could not detect Lua version"
+	fi
+	einfo "Using pkg-config ${LUAPKGCONFIG}"
+	sed -r -i \
+		-e "/^LUA_.*pkg-config/s,\<lua\>,${LUAPKGCONFIG},g" \
+		"${S}"/extras/tcl/makefile \
+		"${S}"/extras/swig/makefile \
+		"${S}"/makefile \
+		"${S}"/src/makefile \
+		|| die "Failed to set Lua version"
+
+	# 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 "${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
+}


             reply	other threads:[~2020-07-06 17:14 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 17:14 Robin H. Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-26  7:04 [gentoo-commits] repo/gentoo:master commit in: app-text/highlight/ Arthur Zamarin
2024-01-28 22:14 Sam James
2023-12-30  4:10 Sam James
2023-12-30  3:04 Sam James
2023-12-30  3:04 Sam James
2023-12-30  3:04 Sam James
2023-12-30  3:04 Sam James
2023-10-20  0:51 Sam James
2023-10-09 20:02 Sam James
2023-10-09  7:04 Sam James
2023-10-09  5:54 Sam James
2023-10-09  4:53 Sam James
2023-10-09  4:46 Sam James
2023-08-30  7:48 Sam James
2023-04-19 13:04 Pacho Ramos
2023-04-18  9:03 Sam James
2022-05-14  7:04 WANG Xuerui
2022-04-17 18:32 Sam James
2022-03-19 23:17 David Seifert
2021-09-27 21:44 James Le Cuirot
2021-08-01 18:27 Sam James
2021-07-28 11:28 Marek Szuba
2021-06-16 15:40 Sergei Trofimovich
2021-06-13 12:38 Sam James
2021-06-13 11:12 Sam James
2021-06-13 11:12 Sam James
2021-06-13 11:12 Sam James
2021-06-13 11:12 Sam James
2021-06-13 11:12 Sam James
2021-05-13 16:15 Sam James
2021-04-01 22:32 Sam James
2021-04-01 22:32 Sam James
2021-04-01 22:30 Sam James
2021-04-01 22:30 Sam James
2021-04-01 22:27 Sam James
2021-04-01 22:27 Sam James
2021-04-01 17:55 Sergei Trofimovich
2021-04-01 12:11 Thomas Deutschmann
2021-03-25 23:31 Conrad Kostecki
2021-02-21  4:03 Sam James
2021-02-21  4:03 Sam James
2021-02-09 13:47 Marek Szuba
2021-02-08 15:08 Sergei Trofimovich
2021-01-23 22:42 Sam James
2020-12-21 20:09 Sam James
2020-12-21  9:36 Sergei Trofimovich
2020-12-20 16:40 Thomas Deutschmann
2020-12-18 20:49 Sergei Trofimovich
2020-12-18 14:22 Sam James
2020-12-18 10:25 Sergei Trofimovich
2020-12-17 16:41 Agostino Sarubbo
2020-12-17  7:55 Sam James
2020-12-17  6:23 Sam James
2020-12-17  4:58 Sam James
2020-06-28 20:44 Agostino Sarubbo
2020-06-28 20:40 Agostino Sarubbo
2020-06-28 20:37 Agostino Sarubbo
2020-06-28 20:33 Agostino Sarubbo
2020-06-28 20:30 Agostino Sarubbo
2020-06-28 20:27 Agostino Sarubbo
2020-06-28  7:49 Sergei Trofimovich
2020-06-28  7:49 Sergei Trofimovich
2020-06-27 20:41 Mart Raudsepp
2020-05-24 20:28 Andreas Sturmlechner
2018-07-01 14:01 Mikle Kolyada
2018-03-19 17:16 Andreas Sturmlechner
2018-03-19  9:28 Sergei Trofimovich
2018-03-15 20:17 Markus Meier
2018-03-08 21:26 Sergei Trofimovich
2018-03-05 21:31 Tobias Klausmann
2018-03-04 19:11 Sergei Trofimovich
2018-03-04 11:39 Mart Raudsepp
2018-03-04 11:13 Sergei Trofimovich
2018-03-04 10:20 Sergei Trofimovich
2018-03-04  9:13 Jason Zaman
2018-02-04 18:16 Andreas Sturmlechner
2018-02-04 17:41 Andreas Sturmlechner
2018-02-04 17:41 Andreas Sturmlechner
2017-06-27 14:21 Alexis Ballier
2017-03-07 12:43 Alexis Ballier
2017-02-18  9:54 David Seifert
2017-01-03 16:46 Alexis Ballier
2017-01-03 16:46 Alexis Ballier
2016-12-01 14:12 Alexis Ballier
2016-10-20 12:17 Alexis Ballier
2016-10-20 12:17 Alexis Ballier
2016-08-21  7:09 Alexis Ballier
2016-06-30  8:30 Alexis Ballier
2016-02-23 16:14 Alexis Ballier
2016-01-26  7:46 Alexis Ballier
2016-01-07  7:49 Alexis Ballier
2015-11-13  9:02 Alexis Ballier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1594055668.b799b65375b36a8a9e1b6498a93a2488a0361671.robbat2@gentoo \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox