summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2023-12-20 01:01:57 -0500
committerSam James <sam@gentoo.org>2023-12-28 02:18:23 +0000
commitb9cd93b6f3a49c3595a83a069e09c30cf961b7ba (patch)
tree967af1d8c2913557504a97bb9cbf799e456b6098 /dev-util/source-highlight
parentsys-apps/iproute2: fix config location (diff)
downloadgentoo-b9cd93b6f3a49c3595a83a069e09c30cf961b7ba.tar.gz
gentoo-b9cd93b6f3a49c3595a83a069e09c30cf961b7ba.tar.bz2
gentoo-b9cd93b6f3a49c3595a83a069e09c30cf961b7ba.zip
dev-util/source-highlight: remove unneeded runtime dependency on ctags
ctags is not actually needed to highlight files. It is used at runtime for --gen-references, which isn't the default way to use it, and source-highlight knows how to error out with a friendly error message if you do not have it and need it. It's used by the testsuite, of course. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/source-highlight')
-rw-r--r--dev-util/source-highlight/source-highlight-3.1.9-r2.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/dev-util/source-highlight/source-highlight-3.1.9-r2.ebuild b/dev-util/source-highlight/source-highlight-3.1.9-r2.ebuild
new file mode 100644
index 000000000000..1c663d28de8c
--- /dev/null
+++ b/dev-util/source-highlight/source-highlight-3.1.9-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 flag-o-matic optfeature
+
+DESCRIPTION="Generate highlighted source code as an (x)html document"
+HOMEPAGE="https://www.gnu.org/software/src-highlite/source-highlight.html"
+SRC_URI="mirror://gnu/src-highlite/${P}.tar.gz"
+LICENSE="GPL-3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+SLOT="0"
+IUSE="doc static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-libs/boost:="
+DEPEND="${RDEPEND}"
+BDEPEND="test? ( dev-util/ctags )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.9-test-clang-p1.patch
+ "${FILESDIR}"/${PN}-3.1.9-test-clang-p2.patch
+)
+
+src_configure() {
+ # required as rev-dep of dev-libs/boost-1.62.0
+ # https://wiki.gentoo.org/wiki/Project:C%2B%2B/Maintaining_ABI
+ append-cxxflags -std=c++14
+
+ econf \
+ --with-boost="${EPREFIX}/usr" \
+ --with-boost-regex="boost_regex" \
+ --without-bash-completion \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ use doc && local HTML_DOCS=( doc/*.{html,css,java} )
+ default
+
+ # That's not how we want it
+ rm -rf "${ED}"/usr/share/{aclocal,doc} || die
+
+ # package provides .pc file
+ find "${D}" -name '*.la' -delete || die
+
+ dobashcomp completion/source-highlight
+}
+
+src_test() {
+ export LD_LIBRARY_PATH="${S}/lib/srchilite/.libs/"
+ # upstream uses the same temporary filenames in numerous places
+ # see https://bugs.gentoo.org/635100
+ emake -j1 check
+}
+
+pkg_postinst() {
+ optfeature "ctags support" dev-util/ctags
+}