public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matthias Maier" <tamiko@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/astyle/
Date: Mon, 28 May 2018 22:17:37 +0000 (UTC)	[thread overview]
Message-ID: <1527545823.78804d2fb75c184d218506dbac832efc86f3fe11.tamiko@gentoo> (raw)

commit:     78804d2fb75c184d218506dbac832efc86f3fe11
Author:     band-a-prend <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Fri May 25 20:09:17 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Mon May 28 22:17:03 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78804d2f

dev-util/astyle: spliting into sub-slots

As dev-util/astyle-3.1 has changed interfeces compared with -3.0.1
spliting into sub-slots "0/3.0" and "0/3.1" introduced.

This can be usefull to rebuild packages that depends on astyle
if it's sub-slot updates.

E.g. codeblocks-17.12 could use system installed astyle-3.0.x
and incompatible with astyle 3.1 without codeblocks Astyle plugin patching.
So it's will need to rebuild codeblocks if user for some reason want
to have astyle-3.1 and use codeblocks.

Also dev-util/astyle-3.0.1-r1.ebuild creates "libastyle.so" symlink now
during installation like for dev-util/astyle-3.1 to avoid linking error
during compilation with using "-lastyle" key.

Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/8585

 dev-util/astyle/astyle-3.0.1-r1.ebuild | 90 ++++++++++++++++++++++++++++++++++
 dev-util/astyle/astyle-3.1-r2.ebuild   | 90 ++++++++++++++++++++++++++++++++++
 2 files changed, 180 insertions(+)

diff --git a/dev-util/astyle/astyle-3.0.1-r1.ebuild b/dev-util/astyle/astyle-3.0.1-r1.ebuild
new file mode 100644
index 00000000000..cdc9411aa46
--- /dev/null
+++ b/dev-util/astyle/astyle-3.0.1-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs versionator java-pkg-opt-2
+
+DESCRIPTION="Artistic Style is a re-indenter and reformatter for C++, C and Java source code"
+HOMEPAGE="http://astyle.sourceforge.net/"
+SRC_URI="mirror://sourceforge/astyle/astyle_${PV}_linux.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/3.0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="examples java static-libs"
+
+DEPEND="app-arch/xz-utils
+	java? ( >=virtual/jdk-1.6:= )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+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
+}
+
+src_configure() {
+	append-cxxflags -std=c++11
+	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) \
+		$(usex static-libs static '')
+}
+
+src_install() {
+	doheader src/${PN}.h
+
+	pushd src/bin >/dev/null || die
+	dobin ${PN}
+
+	# ex: libastyle.so.3.0.1
+	local libastylename=lib${PN}.so.${PV}
+	dolib.so ${libastylename}
+	# ex: libastyle.so.3
+	local libdestdir=/usr/$(get_libdir)
+	dosym ${libastylename} ${libdestdir}/lib${PN}.so.$(get_major_version)
+	dosym ${libastylename} ${libdestdir}/lib${PN}.so
+	if use java ; then
+		local libastylejname=lib${PN}j.so.${PV}
+		dolib.so ${libastylejname}
+		dosym ${libastylejname} ${libdestdir}/lib${PN}j.so.$(get_major_version)
+		dosym ${libastylejname} ${libdestdir}/lib${PN}j.so
+	fi
+	if use static-libs ; then
+		dolib.a lib${PN}.a
+	fi
+	popd >/dev/null || die
+	if use examples ; then
+		docinto examples
+		dodoc -r file/.
+		docompress -x /usr/share/doc/${PF}/examples
+	fi
+	local HTML_DOCS=( doc/. )
+	einstalldocs
+}
+
+pkg_postinst() {
+	if [[ -n "$REPLACING_VERSIONS" && "$(get_major_version $REPLACING_VERSIONS)" -lt 3 ]]; then
+		elog "Artistic Style 3.0 introduces new configuration verbiage more fitting"
+		elog "for modern use. Some options that were valid in 2.06 or older are now"
+		elog "deprecated. For more information, consult astyle's release notes at"
+		elog "http://astyle.sourceforge.net/news.html. To view offline, see:"
+		elog
+		elog "${EROOT%/}/usr/share/doc/${P}/html"
+	fi
+}

diff --git a/dev-util/astyle/astyle-3.1-r2.ebuild b/dev-util/astyle/astyle-3.1-r2.ebuild
new file mode 100644
index 00000000000..5982affd7b5
--- /dev/null
+++ b/dev-util/astyle/astyle-3.1-r2.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs versionator java-pkg-opt-2
+
+DESCRIPTION="Artistic Style is a re-indenter and reformatter for C++, C and Java source code"
+HOMEPAGE="http://astyle.sourceforge.net/"
+SRC_URI="mirror://sourceforge/astyle/astyle_${PV}_linux.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/3.1"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="examples java static-libs"
+
+DEPEND="app-arch/xz-utils
+	java? ( >=virtual/jdk-1.6:= )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+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
+}
+
+src_configure() {
+	append-cxxflags -std=c++11
+	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) \
+		$(usex static-libs static '')
+}
+
+src_install() {
+	doheader src/${PN}.h
+
+	pushd src/bin >/dev/null || die
+	dobin ${PN}
+
+	# ex: libastyle.so.3.0.1
+	local libastylename=lib${PN}.so.${PV}.0
+	dolib.so ${libastylename}
+	# ex: libastyle.so.3
+	local libdestdir=/usr/$(get_libdir)
+	dosym ${libastylename} ${libdestdir}/lib${PN}.so.$(get_major_version)
+	dosym ${libastylename} ${libdestdir}/lib${PN}.so
+	if use java ; then
+		local libastylejname=lib${PN}j.so.${PV}.0
+		dolib.so ${libastylejname}
+		dosym ${libastylejname} ${libdestdir}/lib${PN}j.so.$(get_major_version)
+		dosym ${libastylejname} ${libdestdir}/lib${PN}j.so
+	fi
+	if use static-libs ; then
+		dolib.a lib${PN}.a
+	fi
+	popd >/dev/null || die
+	if use examples ; then
+		docinto examples
+		dodoc -r file/.
+		docompress -x /usr/share/doc/${PF}/examples
+	fi
+	local HTML_DOCS=( doc/. )
+	einstalldocs
+}
+
+pkg_postinst() {
+	if [[ -n "$REPLACING_VERSIONS" && "$(get_major_version $REPLACING_VERSIONS)" -lt 3 ]]; then
+		elog "Artistic Style 3.0 introduces new configuration verbiage more fitting"
+		elog "for modern use. Some options that were valid in 2.06 or older are now"
+		elog "deprecated. For more information, consult astyle's release notes at"
+		elog "http://astyle.sourceforge.net/news.html. To view offline, see:"
+		elog
+		elog "${EROOT%/}/usr/share/doc/${P}/html"
+	fi
+}


             reply	other threads:[~2018-05-28 22:17 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-28 22:17 Matthias Maier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-10  2:21 [gentoo-commits] repo/gentoo:master commit in: dev-util/astyle/ Sam James
2025-03-10  2:21 Sam James
2024-11-09 13:24 Arthur Zamarin
2024-11-09 10:06 Arthur Zamarin
2024-11-09  2:14 Sam James
2024-11-09  2:14 Sam James
2024-09-11 15:31 Alfredo Tupone
2024-08-03  6:19 Joonas Niilola
2024-08-03  6:17 Joonas Niilola
2024-08-02 16:19 Sam James
2024-08-02 16:19 Sam James
2024-08-02 16:19 Sam James
2024-08-02 13:45 Viorel Munteanu
2024-08-02 13:45 Viorel Munteanu
2024-08-02 13:45 Viorel Munteanu
2023-10-20  0:51 Sam James
2023-09-24  4:39 Sam James
2023-09-24  4:39 Sam James
2023-08-30  7:48 Sam James
2023-08-30  7:48 Sam James
2023-06-19 21:28 Sam James
2023-01-23  2:30 Matthias Maier
2023-01-23  2:30 Matthias Maier
2021-02-05 12:29 Sam James
2021-02-02 21:02 Sam James
2020-02-26 18:25 Andreas Sturmlechner
2018-10-24  7:34 Mikle Kolyada
2018-10-17 12:07 Thomas Deutschmann
2018-08-08 10:03 Guilherme Amadio
2018-05-29  0:41 Matthias Maier
2018-05-28 22:17 Matthias Maier
2018-05-28 22:17 Matthias Maier
2018-05-28 22:17 Matthias Maier
2018-03-06 17:44 Amy Liffey
2018-03-06 16:08 Amy Liffey
2018-02-07  0:54 Matthias Maier
2017-12-19  6:50 Matthias Maier
2017-12-12 21:46 Daniel Campbell
2017-08-29 23:16 Thomas Deutschmann
2017-07-31 12:56 Tobias Klausmann
2017-07-30 10:57 Sergei Trofimovich
2017-06-23 19:39 Daniel Campbell
2017-06-18  6:23 Daniel Campbell
2017-06-18  6:23 Daniel Campbell
2017-01-02 14:36 Daniel Campbell
2016-03-18 19:11 Michał Górny
2016-03-06 22:20 Daniel Campbell
2016-01-26  0:50 Daniel Campbell
2015-08-26 11:00 Agostino Sarubbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527545823.78804d2fb75c184d218506dbac832efc86f3fe11.tamiko@gentoo \
    --to=tamiko@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox