dev-util/astyle - 3.6.18 (gentoo)

Search

Install

Install this version:

emerge -a =dev-util/astyle-3.6.18

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-util/astyle-3.6.18

Or alternatively:

emerge --autounmask-write -a =dev-util/astyle-3.6.18

Package Information

Description:
Artistic Style is a re-indenter and reformatter for C, C++ and Java source code
Homepage:
https://astyle.sourceforge.net/ https://gitlab.com/saalen/astyle
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
3.6.18 8 ~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~x86 0/3.6.13
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/andresimon.asc

inherit toolchain-funcs java-pkg-opt-2 verify-sig

DESCRIPTION="Artistic Style is a re-indenter and reformatter for C, C++ and Java source code"
HOMEPAGE="https://astyle.sourceforge.net/ https://gitlab.com/saalen/astyle"
SRC_URI="
	https://downloads.sourceforge.net/astyle/${P}.tar.bz2
	http://www.andre-simon.de/zip/${P}.tar.bz2
	verify-sig? ( http://www.andre-simon.de/zip/${P}.tar.bz2.asc )
"

LICENSE="MIT"
SLOT="0/3.6.13"
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~x86"
IUSE="java static-libs"

DOCS=( README.md  examples/ )
HTML_DOCS=( doc/. )

DEPEND="java? ( >=virtual/jdk-1.8:* )"
RDEPEND="java? ( >=virtual/jre-1.8:* )"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-andresimon )"

src_prepare() {
	if use java; then
		java-pkg-opt-2_src_prepare
		sed	-e "s:^\(JAVAINCS\s*\)=.*$:\1= $(java-pkg_get-jni-cflags):" \
			-e "s:ar crs:$(tc-getAR) crs:" \
			-i build/gcc/Makefile || die
	else
		default
	fi

	# rename examples directory for simpler installation
	mv file/ examples/ || die
}

src_configure() {
	tc-export CXX
	default
}

src_compile() {
	# ../build/clang/Makefile is identical except for CXX line.
	emake CXX="$(tc-getCXX)" -f ../build/gcc/Makefile -C src \
		${PN} \
		shared \
		$(usev java) \
		$(usev static-libs static)
}

src_install() {
	doheader src/${PN}.h

	pushd src/bin >/dev/null || die
	dobin ${PN}

	local libastylename="lib${PN}.so.${SLOT##*/}"
	local libastylejname="lib${PN}j.so.${SLOT##*/}"
	local libdestdir="/usr/$(get_libdir)"

	dolib.so "${libastylename}"
	dosym "${libastylename}" "${libdestdir}/lib${PN}.so.$(ver_cut 1 ${SLOT##*/})"
	dosym "${libastylename}" "${libdestdir}/lib${PN}.so"

	if use java; then
		dolib.so "${libastylejname}"
		dosym "${libastylejname}" "${libdestdir}/lib${PN}j.so.$(ver_cut 1 ${SLOT##*/})"
		dosym "${libastylejname}" "${libdestdir}/lib${PN}j.so"
	fi

	use static-libs && dolib.a lib${PN}.a

	popd >/dev/null || die

	einstalldocs
}

USE Flags

Manage flags for this package: euse -i <flag> -p dev-util/astyle | euse -E <flag> -p dev-util/astyle | euse -D <flag> -p dev-util/astyle

Global/Standard Flags

Inherited Eclasses

Dependencies

DEPEND

java? ( >=virtual/jdk-1.8:* )

RDEPEND

java? ( >=virtual/jre-1.8:* )

BDEPEND

verify-sig? ( sec-keys/openpgp-keys-andresimon )

Manifest for 3.6.18

Type File Size Source URLs
DIST astyle-3.6.18.tar.bz2 226298 bytes http://www.andre-simon.de/zip/astyle-3.6.18.tar.bz2
https://downloads.sourceforge.net/astyle/astyle-3.6.18.tar.bz2
DIST astyle-3.6.18.tar.bz2.asc 488 bytes http://www.andre-simon.de/zip/astyle-3.6.18.tar.bz2.asc