diff options
author | Steve Arnold <nerdboy@gentoo.org> | 2008-05-12 06:03:36 +0000 |
---|---|---|
committer | Steve Arnold <nerdboy@gentoo.org> | 2008-05-12 06:03:36 +0000 |
commit | 7db14f3f06bc7fb447d91a12a268af4d9f10dc91 (patch) | |
tree | a9483f425c30eadb6f66849c5db9eb9c27a54639 /dev-util | |
parent | swig is not a runtime dependency, fixes #221479 (diff) | |
download | gentoo-2-7db14f3f06bc7fb447d91a12a268af4d9f10dc91.tar.gz gentoo-2-7db14f3f06bc7fb447d91a12a268af4d9f10dc91.tar.bz2 gentoo-2-7db14f3f06bc7fb447d91a12a268af4d9f10dc91.zip |
Updated for bug #217262 and added some basic java support and a soname
(Portage version: 2.1.5_rc6)
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/astyle/ChangeLog | 11 | ||||
-rw-r--r-- | dev-util/astyle/astyle-1.22.ebuild | 105 | ||||
-rw-r--r-- | dev-util/astyle/files/astyle-1.22-strip.patch | 29 |
3 files changed, 143 insertions, 2 deletions
diff --git a/dev-util/astyle/ChangeLog b/dev-util/astyle/ChangeLog index 48d13ca71893..926d27c87f11 100644 --- a/dev-util/astyle/ChangeLog +++ b/dev-util/astyle/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-util/astyle # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/ChangeLog,v 1.20 2008/02/04 03:58:43 nerdboy Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/ChangeLog,v 1.21 2008/05/12 06:03:36 nerdboy Exp $ + +*astyle-1.22 (12 May 2008) + + 12 May 2008; Steve Arnold <nerdboy@gentoo.org> + +files/astyle-1.22-strip.patch, +astyle-1.22.ebuild: + Updated for bug #217262 and added some basic java support and a soname; + thanks to Adam <ediap@users.sourceforge.net> for the updated patch. 04 Feb 2008; Steve Arnold <nerdboy@gentoo.org> astyle-1.21.ebuild: Fixed string quoting and added some dies to the manual install commands, @@ -11,7 +18,7 @@ Dropped ppc-macos keyword, see you in prefix 14 Nov 2007; Robin H. Johnson <robbat2@gentoo.org> astyle-1.21.ebuild: - Fix $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/ChangeLog,v 1.20 2008/02/04 03:58:43 nerdboy Exp $ string. + Fix $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/ChangeLog,v 1.21 2008/05/12 06:03:36 nerdboy Exp $ string. *astyle-1.21 (07 Oct 2007) diff --git a/dev-util/astyle/astyle-1.22.ebuild b/dev-util/astyle/astyle-1.22.ebuild new file mode 100644 index 000000000000..0abe9c128fc0 --- /dev/null +++ b/dev-util/astyle/astyle-1.22.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/astyle-1.22.ebuild,v 1.1 2008/05/12 06:03:36 nerdboy Exp $ + +inherit eutils java-pkg-opt-2 + +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" + +IUSE="debug java libs" + +RDEPEND="java? ( >=virtual/jre-1.5 )" + +DEPEND="java? ( >=virtual/jre-1.5 )" + +S=${WORKDIR}/${PN} + +pkg_setup() { + use java && java-pkg-2_pkg_setup + + if use x86; then + jvmarch=i386 + else + jvmarch=${ARCH} + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-strip.patch + # Add basic soname to make QA happy... + sed -i -e "s:-shared:-shared -Wl,-soname,\$@ :g" buildgcc/Makefile + use java && setup-jvm-opts +} + +src_compile() { + cd buildgcc + + local build_targets="all" + use java && build_targets="${build_targets} javaall" + + emake ${build_targets} || die "build failed" +} + +src_install() { + if use debug ; then + newbin bin/astyled astyle || die "install debug bin failed" + newlib.a bin/libastyled.a libastyle.a \ + || die "install debug static lib failed" + if use libs ; then + # shared lib got a soname patch + newlib.so bin/libastyled.so libastyle.so \ + || die "install debug shared lib failed" + if use java ; then + local j_dir="/usr/$(get_libdir)" + dolib.so bin/libastylejd.so \ + || die "install debug shared java lib failed" + java-pkg_regso "${D}${j_dir}/libastylejd.so" + fi + fi + else + if use libs ; then + dolib.so bin/libastyle.so || die "install shared lib failed" + if use java ; then + local j_dir="/usr/$(get_libdir)" + dolib.so bin/libastylej.so \ + || die "install shared java lib failed" + java-pkg_regso "${D}${j_dir}/libastylej.so" + fi + fi + dobin bin/astyle || die "install bin failed" + dolib.a bin/libastyle.a || die "install static lib failed" + fi + dohtml doc/*.html +} + +setup-jvm-opts() { + # Figure out correct boot classpath + # stolen from eclipse-sdk ebuild + local bp="$(java-config --jdk-home)/jre/lib" + local bootclasspath=$(java-config --runtime) + if java-config --java-version | grep -q IBM ; then + # IBM JDK + JAVA_LIB_DIR="$(java-config --jdk-home)/jre/bin" + else + # Sun derived JDKs (Blackdown, Sun) + JAVA_LIB_DIR="$(java-config --jdk-home)/jre/lib/${jvmarch}" + fi + + einfo "Using bootclasspath ${bootclasspath}" + einfo "Using JVM library path ${JAVA_LIB_DIR}" + + if [[ ! -f ${JAVA_LIB_DIR}/libawt.so ]] ; then + die "Could not find libawt.so native library" + fi + + export AWT_LIB_PATH=${JAVA_LIB_DIR} +} + diff --git a/dev-util/astyle/files/astyle-1.22-strip.patch b/dev-util/astyle/files/astyle-1.22-strip.patch new file mode 100644 index 000000000000..3015ec12be08 --- /dev/null +++ b/dev-util/astyle/files/astyle-1.22-strip.patch @@ -0,0 +1,29 @@ +--- astyle.orig/buildgcc/Makefile 2008-04-11 11:25:13.000000000 +0200 ++++ astyle/buildgcc/Makefile 2008-04-11 11:25:52.000000000 +0200 +@@ -104,7 +104,7 @@ + release: astyle + astyle: $(OBJ) + @ mkdir -p $(bindir) +- $(CXX) -s -o $(bindir)/$@ $^ ++ $(CXX) -o $(bindir)/$@ $^ + @ echo + + debug: astyled +@@ -116,7 +116,7 @@ + shared: libastyle.so + libastyle.so: $(OBJs) + @ mkdir -p $(bindir) +- $(CXX) -shared -s -o $(bindir)/$@ $^ ++ $(CXX) -shared -o $(bindir)/$@ $^ + @ echo + + shareddebug: libastyled.so +@@ -140,7 +140,7 @@ + java: libastylej.so + libastylej.so: $(OBJsj) + @ mkdir -p $(bindir) +- $(CXX) -shared -s -o $(bindir)/$@ $^ ++ $(CXX) -shared -o $(bindir)/$@ $^ + @ echo + + javadebug: libastylejd.so |