Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/highlight/, profiles/
Date: Tue, 22 Dec 2020 12:11:18
Message-Id: 1608639064.6b718868e13f906debce52c423d1690d834aaf47.marecki@gentoo
1 commit: 6b718868e13f906debce52c423d1690d834aaf47
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 22 12:08:53 2020 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 22 12:11:04 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b718868
7
8 app-text/highlight: migrate to lua-single.eclass
9
10 Was already mostly instrumented for slotted Lua, one variable declaration
11 was missing though. Compatibility as per the unmigrated ebuild.
12
13 Closes: https://bugs.gentoo.org/752564
14 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
15
16 app-text/highlight/highlight-3.57-r100.ebuild | 101 ++++++++++++++++++++++++++
17 profiles/package.mask | 1 +
18 2 files changed, 102 insertions(+)
19
20 diff --git a/app-text/highlight/highlight-3.57-r100.ebuild b/app-text/highlight/highlight-3.57-r100.ebuild
21 new file mode 100644
22 index 00000000000..52f5375c3ee
23 --- /dev/null
24 +++ b/app-text/highlight/highlight-3.57-r100.ebuild
25 @@ -0,0 +1,101 @@
26 +# Copyright 1999-2020 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=7
30 +
31 +LUA_COMPAT=( lua5-{1..3} )
32 +
33 +inherit lua-single qmake-utils toolchain-funcs
34 +
35 +DESCRIPTION="Converts source code to formatted text (HTML, LaTeX, etc.) with syntax highlight"
36 +HOMEPAGE="http://www.andre-simon.de/"
37 +SRC_URI="http://www.andre-simon.de/zip/${P}.tar.bz2"
38 +
39 +LICENSE="GPL-3"
40 +SLOT="0"
41 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
42 +IUSE="examples qt5"
43 +
44 +REQUIRED_USE="${LUA_REQUIRED_USE}"
45 +
46 +RDEPEND="
47 + ${LUA_DEPS}
48 + qt5? (
49 + dev-qt/qtcore:5
50 + dev-qt/qtgui:5
51 + dev-qt/qtwidgets:5
52 + )
53 +"
54 +DEPEND="${RDEPEND}
55 + dev-libs/boost
56 +"
57 +BDEPEND="
58 + virtual/pkgconfig
59 + qt5? ( dev-qt/linguist-tools:5 )
60 +"
61 +
62 +myhlopts=(
63 + "CXX=$(tc-getCXX)"
64 + "AR=$(tc-getAR)"
65 + "LDFLAGS=${LDFLAGS}"
66 + "CFLAGS=${CXXFLAGS} -DNDEBUG -std=c++11"
67 + "DESTDIR=${D}"
68 + "PREFIX=${EPREFIX}/usr"
69 + "HL_CONFIG_DIR=${EPREFIX}/etc/highlight/"
70 + "HL_DATA_DIR=${EPREFIX}/usr/share/highlight/"
71 + "doc_dir=${EPREFIX}/usr/share/doc/${PF}/"
72 + "conf_dir=${EPREFIX}/etc/highlight/"
73 +)
74 +
75 +src_prepare() {
76 + default
77 +
78 + # disable man page compression
79 + sed -e "/GZIP/d" -i makefile || die
80 +
81 + sed -e "/LSB_DOC_DIR/s:doc/${PN}:doc/${PF}:" \
82 + -i src/core/datadir.cpp || die
83 +
84 + sed -r -i \
85 + -e "/^LUA_.*pkg-config/s,\<lua\>,${ELUA},g" \
86 + "${S}"/extras/tcl/makefile \
87 + "${S}"/extras/swig/makefile \
88 + "${S}"/makefile \
89 + "${S}"/src/makefile \
90 + || die "Failed to set Lua implementation"
91 +
92 + # We set it via eqmake5, otherwise it forces clang...
93 + sed -e "s/QMAKE_CC/#QMAKE_CC/g" \
94 + -e "s/QMAKE_CXX /#QMAKE_CXX /g" \
95 + -i src/gui-qt/highlight.pro || die
96 +}
97 +
98 +src_configure() {
99 + if use qt5 ; then
100 + pushd src/gui-qt > /dev/null || die
101 + eqmake5 \
102 + 'DEFINES+=DATA_DIR=\\\"'"${EPREFIX}"'/usr/share/${PN}/\\\" CONFIG_DIR=\\\"'"${EPREFIX}"'/etc/${PN}/\\\" DOC_DIR=\\\"'"${EPREFIX}"'/usr/share/doc/${PF}/\\\"'
103 + popd > /dev/null || die
104 + fi
105 +}
106 +
107 +src_compile() {
108 + emake -f makefile LUA_PKG_NAME="${ELUA}" "${myhlopts[@]}"
109 + if use qt5 ; then
110 + pushd src/gui-qt > /dev/null || die
111 + emake
112 + popd > /dev/null || die
113 + fi
114 +}
115 +
116 +src_install() {
117 + emake -f makefile "${myhlopts[@]}" install
118 + if use qt5; then
119 + emake -f makefile "${myhlopts[@]}" install-gui
120 + docompress -x /usr/share/doc/${PF}/{ChangeLog,COPYING,README,README_PLUGINS}
121 + fi
122 +
123 + if ! use examples ; then
124 + rm -r "${ED}"/usr/share/doc/${PF}/extras || die
125 + fi
126 +}
127
128 diff --git a/profiles/package.mask b/profiles/package.mask
129 index 8122c0b1ae7..75e5a55f428 100644
130 --- a/profiles/package.mask
131 +++ b/profiles/package.mask
132 @@ -456,6 +456,7 @@ kde-apps/kdebase-meta:5
133 >=app-emulation/libguestfs-1.38.6-r100
134 >=app-metrics/nginx-lua-prometheus-0.1_pre20170610-r100
135 >=app-misc/worker-3.8.3-r100
136 +>=app-text/highlight-3.57-r100
137 >=dev-db/redis-6.0.9-r100
138 >=dev-games/cegui-0.8.7-r100
139 >=dev-games/openscenegraph-3.6.5-r100