1 |
commit: 78804d2fb75c184d218506dbac832efc86f3fe11 |
2 |
Author: band-a-prend <torokhov-s-a <AT> yandex <DOT> ru> |
3 |
AuthorDate: Fri May 25 20:09:17 2018 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 28 22:17:03 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78804d2f |
7 |
|
8 |
dev-util/astyle: spliting into sub-slots |
9 |
|
10 |
As dev-util/astyle-3.1 has changed interfeces compared with -3.0.1 |
11 |
spliting into sub-slots "0/3.0" and "0/3.1" introduced. |
12 |
|
13 |
This can be usefull to rebuild packages that depends on astyle |
14 |
if it's sub-slot updates. |
15 |
|
16 |
E.g. codeblocks-17.12 could use system installed astyle-3.0.x |
17 |
and incompatible with astyle 3.1 without codeblocks Astyle plugin patching. |
18 |
So it's will need to rebuild codeblocks if user for some reason want |
19 |
to have astyle-3.1 and use codeblocks. |
20 |
|
21 |
Also dev-util/astyle-3.0.1-r1.ebuild creates "libastyle.so" symlink now |
22 |
during installation like for dev-util/astyle-3.1 to avoid linking error |
23 |
during compilation with using "-lastyle" key. |
24 |
|
25 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
26 |
Closes: https://github.com/gentoo/gentoo/pull/8585 |
27 |
|
28 |
dev-util/astyle/astyle-3.0.1-r1.ebuild | 90 ++++++++++++++++++++++++++++++++++ |
29 |
dev-util/astyle/astyle-3.1-r2.ebuild | 90 ++++++++++++++++++++++++++++++++++ |
30 |
2 files changed, 180 insertions(+) |
31 |
|
32 |
diff --git a/dev-util/astyle/astyle-3.0.1-r1.ebuild b/dev-util/astyle/astyle-3.0.1-r1.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..cdc9411aa46 |
35 |
--- /dev/null |
36 |
+++ b/dev-util/astyle/astyle-3.0.1-r1.ebuild |
37 |
@@ -0,0 +1,90 @@ |
38 |
+# Copyright 1999-2018 Gentoo Foundation |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=6 |
42 |
+ |
43 |
+inherit flag-o-matic toolchain-funcs versionator java-pkg-opt-2 |
44 |
+ |
45 |
+DESCRIPTION="Artistic Style is a re-indenter and reformatter for C++, C and Java source code" |
46 |
+HOMEPAGE="http://astyle.sourceforge.net/" |
47 |
+SRC_URI="mirror://sourceforge/astyle/astyle_${PV}_linux.tar.gz" |
48 |
+ |
49 |
+LICENSE="MIT" |
50 |
+SLOT="0/3.0" |
51 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
52 |
+IUSE="examples java static-libs" |
53 |
+ |
54 |
+DEPEND="app-arch/xz-utils |
55 |
+ java? ( >=virtual/jdk-1.6:= )" |
56 |
+RDEPEND="${DEPEND}" |
57 |
+ |
58 |
+S="${WORKDIR}/${PN}" |
59 |
+ |
60 |
+src_prepare() { |
61 |
+ if use java ; then |
62 |
+ java-pkg-opt-2_src_prepare |
63 |
+ sed -e "s:^\(JAVAINCS\s*\)=.*$:\1= $(java-pkg_get-jni-cflags):" \ |
64 |
+ -e "s:ar crs:$(tc-getAR) crs:" \ |
65 |
+ -i build/gcc/Makefile || die |
66 |
+ else |
67 |
+ default |
68 |
+ fi |
69 |
+} |
70 |
+ |
71 |
+src_configure() { |
72 |
+ append-cxxflags -std=c++11 |
73 |
+ tc-export CXX |
74 |
+ default |
75 |
+} |
76 |
+ |
77 |
+src_compile() { |
78 |
+ # ../build/clang/Makefile is identical except for CXX line. |
79 |
+ emake CXX="$(tc-getCXX)" -f ../build/gcc/Makefile -C src \ |
80 |
+ ${PN} \ |
81 |
+ shared \ |
82 |
+ $(usev java) \ |
83 |
+ $(usex static-libs static '') |
84 |
+} |
85 |
+ |
86 |
+src_install() { |
87 |
+ doheader src/${PN}.h |
88 |
+ |
89 |
+ pushd src/bin >/dev/null || die |
90 |
+ dobin ${PN} |
91 |
+ |
92 |
+ # ex: libastyle.so.3.0.1 |
93 |
+ local libastylename=lib${PN}.so.${PV} |
94 |
+ dolib.so ${libastylename} |
95 |
+ # ex: libastyle.so.3 |
96 |
+ local libdestdir=/usr/$(get_libdir) |
97 |
+ dosym ${libastylename} ${libdestdir}/lib${PN}.so.$(get_major_version) |
98 |
+ dosym ${libastylename} ${libdestdir}/lib${PN}.so |
99 |
+ if use java ; then |
100 |
+ local libastylejname=lib${PN}j.so.${PV} |
101 |
+ dolib.so ${libastylejname} |
102 |
+ dosym ${libastylejname} ${libdestdir}/lib${PN}j.so.$(get_major_version) |
103 |
+ dosym ${libastylejname} ${libdestdir}/lib${PN}j.so |
104 |
+ fi |
105 |
+ if use static-libs ; then |
106 |
+ dolib.a lib${PN}.a |
107 |
+ fi |
108 |
+ popd >/dev/null || die |
109 |
+ if use examples ; then |
110 |
+ docinto examples |
111 |
+ dodoc -r file/. |
112 |
+ docompress -x /usr/share/doc/${PF}/examples |
113 |
+ fi |
114 |
+ local HTML_DOCS=( doc/. ) |
115 |
+ einstalldocs |
116 |
+} |
117 |
+ |
118 |
+pkg_postinst() { |
119 |
+ if [[ -n "$REPLACING_VERSIONS" && "$(get_major_version $REPLACING_VERSIONS)" -lt 3 ]]; then |
120 |
+ elog "Artistic Style 3.0 introduces new configuration verbiage more fitting" |
121 |
+ elog "for modern use. Some options that were valid in 2.06 or older are now" |
122 |
+ elog "deprecated. For more information, consult astyle's release notes at" |
123 |
+ elog "http://astyle.sourceforge.net/news.html. To view offline, see:" |
124 |
+ elog |
125 |
+ elog "${EROOT%/}/usr/share/doc/${P}/html" |
126 |
+ fi |
127 |
+} |
128 |
|
129 |
diff --git a/dev-util/astyle/astyle-3.1-r2.ebuild b/dev-util/astyle/astyle-3.1-r2.ebuild |
130 |
new file mode 100644 |
131 |
index 00000000000..5982affd7b5 |
132 |
--- /dev/null |
133 |
+++ b/dev-util/astyle/astyle-3.1-r2.ebuild |
134 |
@@ -0,0 +1,90 @@ |
135 |
+# Copyright 1999-2018 Gentoo Foundation |
136 |
+# Distributed under the terms of the GNU General Public License v2 |
137 |
+ |
138 |
+EAPI=6 |
139 |
+ |
140 |
+inherit flag-o-matic toolchain-funcs versionator java-pkg-opt-2 |
141 |
+ |
142 |
+DESCRIPTION="Artistic Style is a re-indenter and reformatter for C++, C and Java source code" |
143 |
+HOMEPAGE="http://astyle.sourceforge.net/" |
144 |
+SRC_URI="mirror://sourceforge/astyle/astyle_${PV}_linux.tar.gz" |
145 |
+ |
146 |
+LICENSE="MIT" |
147 |
+SLOT="0/3.1" |
148 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
149 |
+IUSE="examples java static-libs" |
150 |
+ |
151 |
+DEPEND="app-arch/xz-utils |
152 |
+ java? ( >=virtual/jdk-1.6:= )" |
153 |
+RDEPEND="${DEPEND}" |
154 |
+ |
155 |
+S="${WORKDIR}/${PN}" |
156 |
+ |
157 |
+src_prepare() { |
158 |
+ if use java ; then |
159 |
+ java-pkg-opt-2_src_prepare |
160 |
+ sed -e "s:^\(JAVAINCS\s*\)=.*$:\1= $(java-pkg_get-jni-cflags):" \ |
161 |
+ -e "s:ar crs:$(tc-getAR) crs:" \ |
162 |
+ -i build/gcc/Makefile || die |
163 |
+ else |
164 |
+ default |
165 |
+ fi |
166 |
+} |
167 |
+ |
168 |
+src_configure() { |
169 |
+ append-cxxflags -std=c++11 |
170 |
+ tc-export CXX |
171 |
+ default |
172 |
+} |
173 |
+ |
174 |
+src_compile() { |
175 |
+ # ../build/clang/Makefile is identical except for CXX line. |
176 |
+ emake CXX="$(tc-getCXX)" -f ../build/gcc/Makefile -C src \ |
177 |
+ ${PN} \ |
178 |
+ shared \ |
179 |
+ $(usev java) \ |
180 |
+ $(usex static-libs static '') |
181 |
+} |
182 |
+ |
183 |
+src_install() { |
184 |
+ doheader src/${PN}.h |
185 |
+ |
186 |
+ pushd src/bin >/dev/null || die |
187 |
+ dobin ${PN} |
188 |
+ |
189 |
+ # ex: libastyle.so.3.0.1 |
190 |
+ local libastylename=lib${PN}.so.${PV}.0 |
191 |
+ dolib.so ${libastylename} |
192 |
+ # ex: libastyle.so.3 |
193 |
+ local libdestdir=/usr/$(get_libdir) |
194 |
+ dosym ${libastylename} ${libdestdir}/lib${PN}.so.$(get_major_version) |
195 |
+ dosym ${libastylename} ${libdestdir}/lib${PN}.so |
196 |
+ if use java ; then |
197 |
+ local libastylejname=lib${PN}j.so.${PV}.0 |
198 |
+ dolib.so ${libastylejname} |
199 |
+ dosym ${libastylejname} ${libdestdir}/lib${PN}j.so.$(get_major_version) |
200 |
+ dosym ${libastylejname} ${libdestdir}/lib${PN}j.so |
201 |
+ fi |
202 |
+ if use static-libs ; then |
203 |
+ dolib.a lib${PN}.a |
204 |
+ fi |
205 |
+ popd >/dev/null || die |
206 |
+ if use examples ; then |
207 |
+ docinto examples |
208 |
+ dodoc -r file/. |
209 |
+ docompress -x /usr/share/doc/${PF}/examples |
210 |
+ fi |
211 |
+ local HTML_DOCS=( doc/. ) |
212 |
+ einstalldocs |
213 |
+} |
214 |
+ |
215 |
+pkg_postinst() { |
216 |
+ if [[ -n "$REPLACING_VERSIONS" && "$(get_major_version $REPLACING_VERSIONS)" -lt 3 ]]; then |
217 |
+ elog "Artistic Style 3.0 introduces new configuration verbiage more fitting" |
218 |
+ elog "for modern use. Some options that were valid in 2.06 or older are now" |
219 |
+ elog "deprecated. For more information, consult astyle's release notes at" |
220 |
+ elog "http://astyle.sourceforge.net/news.html. To view offline, see:" |
221 |
+ elog |
222 |
+ elog "${EROOT%/}/usr/share/doc/${P}/html" |
223 |
+ fi |
224 |
+} |