From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 072F6138359 for ; Mon, 6 Jul 2020 17:14:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16F2AE08E0; Mon, 6 Jul 2020 17:14:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E49E1E08E0 for ; Mon, 6 Jul 2020 17:14:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 776D534F33E for ; Mon, 6 Jul 2020 17:14:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DD4239C for ; Mon, 6 Jul 2020 17:14:29 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1594055668.b799b65375b36a8a9e1b6498a93a2488a0361671.robbat2@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/highlight/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/highlight/highlight-3.57-r1.ebuild X-VCS-Directories: app-text/highlight/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: b799b65375b36a8a9e1b6498a93a2488a0361671 X-VCS-Branch: master Date: Mon, 6 Jul 2020 17:14:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4fe31acb-f2c1-4ad2-b3e0-da273ce18532 X-Archives-Hash: 715b8b8c9bdc91f6e40868b3b1b24922 commit: b799b65375b36a8a9e1b6498a93a2488a0361671 Author: Robin H. Johnson gentoo org> AuthorDate: Mon Jul 6 17:03:19 2020 +0000 Commit: Robin H. Johnson gentoo 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 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,\,${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 +}