From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1707265-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id C8F0B15813A
	for <garchives@archives.gentoo.org>; Wed, 08 Jan 2025 19:58:22 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 05632E076B;
	Wed, 08 Jan 2025 19:58:22 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 61DB2E077A
	for <gentoo-commits@lists.gentoo.org>; Wed, 08 Jan 2025 19:58:20 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 623D5342F97
	for <gentoo-commits@lists.gentoo.org>; Wed, 08 Jan 2025 19:58:19 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id BF0071870
	for <gentoo-commits@lists.gentoo.org>; Wed, 08 Jan 2025 19:58:17 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1736366270.831a6403e97f8c7cbe2f04d0580b11abbf10efbb.asturm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/highlight/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-text/highlight/Manifest app-text/highlight/highlight-4.12.ebuild
X-VCS-Directories: app-text/highlight/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: 831a6403e97f8c7cbe2f04d0580b11abbf10efbb
X-VCS-Branch: master
Date: Wed, 08 Jan 2025 19:58:17 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 54b089f4-cc44-472b-b798-2470340a2611
X-Archives-Hash: a93825375508ed6dfa079531c8e47992

commit:     831a6403e97f8c7cbe2f04d0580b11abbf10efbb
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  7 19:57:32 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jan  8 19:57:50 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=831a6403

app-text/highlight: add 4.12

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 app-text/highlight/Manifest              |   2 +
 app-text/highlight/highlight-4.12.ebuild | 114 +++++++++++++++++++++++++++++++
 2 files changed, 116 insertions(+)

diff --git a/app-text/highlight/Manifest b/app-text/highlight/Manifest
index 2eddbab4fa37..7e7114a642ed 100644
--- a/app-text/highlight/Manifest
+++ b/app-text/highlight/Manifest
@@ -1,3 +1,5 @@
+DIST highlight-4.12.tar.bz2 1501961 BLAKE2B 39b8ded3588a65e3a570a11c007ecbaf3ec61bf79bd412f1c29a5d130007a1b9fe8ab0d6b32876891f55cf5ec5d69448632c1b4ed38dd127b6cbbda7850d0b92 SHA512 6174f00adb28182b2eddf087458c04e0914f74d515615f36f11181225ab4d964bc7c9d08145f58f285fbd3c30759248f99df1274f80cfda8c53a1f3f0016cb0f
+DIST highlight-4.12.tar.bz2.asc 488 BLAKE2B 7a63fcee8093c5cd9d2d1da26f4c6f20e7319ab6ea2b2fb7d56e8c0a72165495a823f7d767e65261179393cf9b67452c8cc1b1f84bf80cabccb5c67b0f3cd90f SHA512 c14ee33b4ded0fd1a0d936c839ca87152660d1f8ad3c32b0c693bb845b510e482cba745149d1df1f8ce526fa009db4031b3843aa30ac30c7a0bf3a7f0fdb6438
 DIST highlight-4.9.tar.bz2 1498248 BLAKE2B 09ff0a5cc81da45270a8382dc6b2a2d3b44d1f084e661fae4a3d39d2ded9af6c77b1fb0d51d32c59f22ccba1612ab7faf68b5e918dda70c9f2e25b29b5c44ecd SHA512 280abd98182c5b95f629ca126e8a59ca6bf6f9e301fc7678aa3e4cb37b714827dfdfab1e008c798e203c7408355be63e01e88f93eacfcf2c5fad95afc6e22112
 DIST highlight-4.9.tar.bz2.asc 488 BLAKE2B cbd3541f65ec714ff1fda17fb141aa19f53952634a2027819fdbf50f7cf781f875b76ebd9a82119347f17940d8200f856082dfff51ff994a71a2ece04d654764 SHA512 04c2aca4050cae0dde97340a1ebafd968526e2d811e4551e8895acca50613f7e5902e31d735a0da1427d69e85e152530776fa1b9f5896efe410d8f9437768298
 DIST highlight-test-suite-a3479468672cdbc570a17ae84e047fe8f0b88798.tar.bz2 33310 BLAKE2B a06f2503fc571f5978f648fdc677f58f3fdfa759f9b5cf31a85d03589bbbfd2b56c7055517c59292369653503047af63d9c3bfbbe541a50bd2ea2adede28f60c SHA512 9583fe0af315e0dd1e37e137adf5c97a83832885a5a8a12b91790d7d7b0758c03fd76c02fbda368a2481eaec98f7b010a530bc31da98337d6fa7201aadb023ce

diff --git a/app-text/highlight/highlight-4.12.ebuild b/app-text/highlight/highlight-4.12.ebuild
new file mode 100644
index 000000000000..1dfabf98e87b
--- /dev/null
+++ b/app-text/highlight/highlight-4.12.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2025 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=/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://andre-simon.de/"
+# This is arbitrary; upstream uses master.  Update when possible.
+TESTSUITE_COMMIT="a3479468672cdbc570a17ae84e047fe8f0b88798"
+SRC_URI="
+	http://andre-simon.de/zip/${P}.tar.bz2
+	test? ( https://gitlab.com/tajmone/${PN}-test-suite/-/archive/${TESTSUITE_COMMIT}/${PN}-test-suite-${TESTSUITE_COMMIT}.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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="examples gui test"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="${LUA_DEPS}
+	gui? ( dev-qt/qtbase:6[gui,widgets] )
+"
+DEPEND="${RDEPEND}
+	dev-libs/boost
+"
+BDEPEND="
+	virtual/pkgconfig
+	gui? ( dev-qt/qttools:6[linguist] )
+	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 eqmake6, 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
+		eqmake6 \
+			'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_test() {
+	find "../${PN}-test-suite-${TESTSUITE_COMMIT}" -mindepth 1 -maxdepth 1 -type d | sort | while read line
+	do
+		"${SHELL}" "${line}/regression.sh" || die "Regression tests failed for language $(basename "${line}")"
+	done
+}
+
+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
+}