1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils flag-o-matic toolchain-funcs versionator java-pkg-opt-2
8 DESCRIPTION="Artistic Style is a re-indenter and reformatter for C++, C and Java source code"
9 HOMEPAGE="http://astyle.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/astyle/astyle_${PV}_linux.tar.gz"
14 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
15 IUSE="examples java static-libs"
17 DEPEND="app-arch/xz-utils
18 java? ( >=virtual/jdk-1.6:= )"
25 java-pkg-opt-2_src_prepare
26 sed -e "s:^\(JAVAINCS\s*\)=.*$:\1= $(java-pkg_get-jni-cflags):" \
27 -e "s:ar crs:$(tc-getAR) crs:" \
28 -i build/gcc/Makefile || die
35 append-cxxflags -std=c++11
41 emake -f ../build/gcc/Makefile -C src \
45 $(usex static-libs static '')
51 pushd src/bin >/dev/null || die
54 # ex: libastyle.so.3.0.0
55 dolib.so lib${PN}.so.${PV}.0
57 dosym lib${PN}.so.${PV}.0 /usr/$(get_libdir)/lib${PN}.so.$(get_major_version)
59 dolib.so lib${PN}j.so.${PV}.0
60 dosym lib${PN}j.so.${PV}.0 /usr/$(get_libdir)/lib${PN}j.so.$(get_major_version)
62 if use static-libs ; then
65 popd >/dev/null || die
66 if use examples ; then
69 docompress -x /usr/share/doc/${PF}/examples
71 local HTML_DOCS=( doc/. )
76 if [[ -n "$REPLACING_VERSIONS" && "$(get_major_version $REPLACING_VERSIONS)" -lt 3 ]]; then
77 elog "Artistic Style 3.0 introduces new configuration verbiage more fitting"
78 elog "for modern use. Some options that were valid in 2.06 or older are now"
79 elog "deprecated. For more information, consult astyle's release notes at"
80 elog "http://astyle.sourceforge.net/news.html. To view offline, see:"
82 elog "${ROOT}usr/share/doc/${P}/html"