diff options
author | Kacper Kowalik <xarthisius@gentoo.org> | 2012-03-02 17:26:38 +0000 |
---|---|---|
committer | Kacper Kowalik <xarthisius@gentoo.org> | 2012-03-02 17:26:38 +0000 |
commit | a80aa243478d1cfc7f1b76f0defa669445bb548d (patch) | |
tree | f417538477d386b2437086e94e3f0117698aad0d /dev-util/astyle/astyle-2.02.1.ebuild | |
parent | Support switching GLES implementations as well, fix bug #406501 (diff) | |
download | gentoo-2-a80aa243478d1cfc7f1b76f0defa669445bb548d.tar.gz gentoo-2-a80aa243478d1cfc7f1b76f0defa669445bb548d.tar.bz2 gentoo-2-a80aa243478d1cfc7f1b76f0defa669445bb548d.zip |
Version bump wrt bug #311281 by Arseny Solokha <asolokha@gmx.com>. Use package's build system and helpers instead of rewriting it from scratch. Drop useless debug flag, install docs and build/install static lib conditionally
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/astyle/astyle-2.02.1.ebuild')
-rw-r--r-- | dev-util/astyle/astyle-2.02.1.ebuild | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/dev-util/astyle/astyle-2.02.1.ebuild b/dev-util/astyle/astyle-2.02.1.ebuild new file mode 100644 index 000000000000..3b6a747f4a56 --- /dev/null +++ b/dev-util/astyle/astyle-2.02.1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/astyle-2.02.1.ebuild,v 1.1 2012/03/02 17:26:38 xarthisius Exp $ + +EAPI=4 + +inherit eutils java-pkg-opt-2 multilib toolchain-funcs + +DESCRIPTION="Artistic Style is a reindenter and reformatter of C++, C and Java source code" +HOMEPAGE="http://astyle.sourceforge.net/" +SRC_URI="mirror://sourceforge/astyle/astyle_${PV}_linux.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +IUSE="doc java static-libs" + +DEPEND="app-arch/xz-utils + java? ( >=virtual/jdk-1.6 )" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${PN} + +pkg_setup() { + java-pkg-opt-2_pkg_setup + tc-export CXX +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-build_system.patch + 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 +} + +src_compile() { + local mk_opts="-f ../build/gcc/Makefile -C src" + emake ${mk_opts} ${PN} + emake ${mk_opts} shared + if use java ; then + emake ${mk_opts} java + fi + if use static-libs ; then + emake ${mk_opts} static + fi +} + +src_install() { + insinto /usr/include + doins src/${PN}.h + + pushd src/bin &> /dev/null + dobin ${PN} + + dolib.so lib${PN}.so.0.0.0 + dosym lib${PN}.so.0.0.0 /usr/$(get_libdir)/lib${PN}.so.0 + dosym lib${PN}.so.0.0.0 /usr/$(get_libdir)/lib${PN}.so + if use java ; then + dolib.so lib${PN}j.so.0.0.0 + dosym lib${PN}j.so.0.0.0 /usr/$(get_libdir)/lib${PN}j.so.0 + dosym lib${PN}j.so.0.0.0 /usr/$(get_libdir)/lib${PN}j.so + fi + if use static-libs ; then + dolib lib${PN}.a + fi + popd &> /dev/null + + use doc && dohtml doc/* +} |