Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/astyle/
Date: Wed, 07 Feb 2018 00:54:50
Message-Id: 1517964861.8d7ceed44f148b52fa76b684354bd5141d9360cf.tamiko@gentoo
1 commit: 8d7ceed44f148b52fa76b684354bd5141d9360cf
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 7 00:05:51 2018 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 7 00:54:21 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d7ceed4
7
8 dev-util/astyle: version bump to 3.1
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 dev-util/astyle/Manifest | 1 +
13 dev-util/astyle/astyle-3.1.ebuild | 85 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 86 insertions(+)
15
16 diff --git a/dev-util/astyle/Manifest b/dev-util/astyle/Manifest
17 index 7ac39e21069..a5baf609566 100644
18 --- a/dev-util/astyle/Manifest
19 +++ b/dev-util/astyle/Manifest
20 @@ -1 +1,2 @@
21 DIST astyle_3.0.1_linux.tar.gz 172483 BLAKE2B 4c80491cbcc976aa38ff294014df0dc01b39685eafdac6989bea082b1f61120c3985d14ff6db9f76606bbe8da1aaa344c2e0c9c2999a014f5d54384c0420cf97 SHA512 3e8d617c0ec89682bfb076081bb63ae9d44e897de0c85d5109b28adbbfe0620d5dacf59a4bd96ac30a5a4fcb3be136758e9c6fe2c69258b37956c212890a7158
22 +DIST astyle_3.1_linux.tar.gz 185589 BLAKE2B d0bc9bf3403de89d207f33ac885c7cd57fd1e71314c947e1593ee24ade9ce36c83c6fd8e7021f44d8d3b344ea3add63fa5a7b246c40f10193dc38b51e7ad36bc SHA512 2e8f13d291abda66bbba30174c364c81a81a490e0a21376f7da7cf471644c22caa37b9eefb100d093bf26d1a8bfa9d2f14b4c2a9b75b3cb84428b4514e277ff2
23
24 diff --git a/dev-util/astyle/astyle-3.1.ebuild b/dev-util/astyle/astyle-3.1.ebuild
25 new file mode 100644
26 index 00000000000..a84f1e30d84
27 --- /dev/null
28 +++ b/dev-util/astyle/astyle-3.1.ebuild
29 @@ -0,0 +1,85 @@
30 +# Copyright 1999-2018 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=6
34 +
35 +inherit eutils flag-o-matic toolchain-funcs versionator java-pkg-opt-2
36 +
37 +DESCRIPTION="Artistic Style is a re-indenter and reformatter for C++, C and Java source code"
38 +HOMEPAGE="http://astyle.sourceforge.net/"
39 +SRC_URI="mirror://sourceforge/astyle/astyle_${PV}_linux.tar.gz"
40 +
41 +LICENSE="MIT"
42 +SLOT="0"
43 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
44 +IUSE="examples java static-libs"
45 +
46 +DEPEND="app-arch/xz-utils
47 + java? ( >=virtual/jdk-1.6:= )"
48 +RDEPEND="${DEPEND}"
49 +
50 +S="${WORKDIR}/${PN}"
51 +
52 +src_prepare() {
53 + if use java ; then
54 + java-pkg-opt-2_src_prepare
55 + sed -e "s:^\(JAVAINCS\s*\)=.*$:\1= $(java-pkg_get-jni-cflags):" \
56 + -e "s:ar crs:$(tc-getAR) crs:" \
57 + -i build/gcc/Makefile || die
58 + else
59 + default
60 + fi
61 +}
62 +
63 +src_configure() {
64 + append-cxxflags -std=c++11
65 + tc-export CXX
66 + default
67 +}
68 +
69 +src_compile() {
70 + # ../build/clang/Makefile is identical except for CXX line.
71 + emake CXX="$(tc-getCXX)" -f ../build/gcc/Makefile -C src \
72 + ${PN} \
73 + shared \
74 + $(usev java) \
75 + $(usex static-libs static '')
76 +}
77 +
78 +src_install() {
79 + doheader src/${PN}.h
80 +
81 + pushd src/bin >/dev/null || die
82 + dobin ${PN}
83 +
84 + # ex: libastyle.so.3.0.1
85 + dolib.so lib${PN}.so.${PV}.0
86 + # ex: libastyle.so.3
87 + dosym lib${PN}.so.${PV}.0 /usr/$(get_libdir)/lib${PN}.so.$(get_major_version)
88 + if use java ; then
89 + dolib.so lib${PN}j.so.${PV}
90 + dosym lib${PN}j.so.${PV} /usr/$(get_libdir)/lib${PN}j.so.$(get_major_version)
91 + fi
92 + if use static-libs ; then
93 + dolib lib${PN}.a
94 + fi
95 + popd >/dev/null || die
96 + if use examples ; then
97 + docinto examples
98 + dodoc -r file/.
99 + docompress -x /usr/share/doc/${PF}/examples
100 + fi
101 + local HTML_DOCS=( doc/. )
102 + einstalldocs
103 +}
104 +
105 +pkg_postinst() {
106 + if [[ -n "$REPLACING_VERSIONS" && "$(get_major_version $REPLACING_VERSIONS)" -lt 3 ]]; then
107 + elog "Artistic Style 3.0 introduces new configuration verbiage more fitting"
108 + elog "for modern use. Some options that were valid in 2.06 or older are now"
109 + elog "deprecated. For more information, consult astyle's release notes at"
110 + elog "http://astyle.sourceforge.net/news.html. To view offline, see:"
111 + elog
112 + elog "${ROOT}usr/share/doc/${P}/html"
113 + fi
114 +}