dev-util/source-highlight: fix some old formatting quirks

src_* functions should be defined according to order of execution for
the aid of the reader. The test phase was defined out of order.

Global variables were inconsistently delineated in a huge chunk.
Separate them a bit.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Eli Schwartz
2023-12-27 20:50:58 -05:00
committed by Sam James
parent 55795d1581
commit efd05b8218

View File

@@ -8,6 +8,7 @@ inherit bash-completion-r1 flag-o-matic libtool 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"
@@ -45,6 +46,13 @@ src_configure() {
$(use_enable static-libs static)
}
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
}
src_install() {
use doc && local HTML_DOCS=( doc/*.{html,css,java} )
default
@@ -58,13 +66,6 @@ src_install() {
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
}