summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2008-10-16 06:02:44 +0000
committerSteve Arnold <nerdboy@gentoo.org>2008-10-16 06:02:44 +0000
commitb33ae7b649fdab3d259af42c0430bc620de16542 (patch)
treea45e8c93cf4ef0b440337dcae3db0136ff86d5ab /dev-util/astyle/astyle-1.22.ebuild
parentbump to 2.48 (bug #242202), with three revisions for different ffmpeg version... (diff)
downloadgentoo-2-b33ae7b649fdab3d259af42c0430bc620de16542.tar.gz
gentoo-2-b33ae7b649fdab3d259af42c0430bc620de16542.tar.bz2
gentoo-2-b33ae7b649fdab3d259af42c0430bc620de16542.zip
Updated to fix borked JAVA_HOME and CFLAGS
(Portage version: 2.2_rc11/cvs/Linux 2.6.26.5 x86_64)
Diffstat (limited to 'dev-util/astyle/astyle-1.22.ebuild')
-rw-r--r--dev-util/astyle/astyle-1.22.ebuild53
1 files changed, 18 insertions, 35 deletions
diff --git a/dev-util/astyle/astyle-1.22.ebuild b/dev-util/astyle/astyle-1.22.ebuild
index 75d6ac5aee2f..f451e6b91fe2 100644
--- a/dev-util/astyle/astyle-1.22.ebuild
+++ b/dev-util/astyle/astyle-1.22.ebuild
@@ -1,8 +1,8 @@
# 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.3 2008/05/30 18:53:54 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/astyle-1.22.ebuild,v 1.4 2008/10/16 06:02:44 nerdboy Exp $
-inherit eutils java-pkg-opt-2
+inherit eutils java-pkg-2 java-pkg-opt-2 toolchain-funcs
DESCRIPTION="Artistic Style is a reindenter and reformatter of C++, C and Java source code"
HOMEPAGE="http://astyle.sourceforge.net/"
@@ -14,29 +14,35 @@ KEYWORDS="~alpha ~amd64 ~ppc -ppc64 ~sparc ~x86"
IUSE="debug java libs"
-RDEPEND="java? ( >=virtual/jre-1.5 )"
+RDEPEND="java? ( >=virtual/jre-1.6 )"
-DEPEND="java? ( >=virtual/jre-1.5 )"
+DEPEND="java? ( >=virtual/jre-1.6 )"
S=${WORKDIR}/${PN}
pkg_setup() {
- use java && java-pkg-2_pkg_setup
+ if use java ; then
+ java-pkg-2_pkg_setup
- if use x86; then
- jvmarch=i386
- else
- jvmarch=${ARCH}
+ if use x86; then
+ jvmarch=i386
+ else
+ jvmarch=${ARCH}
+ fi
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
+ # Fix JAVA_HOME
+ sed -i -e \
+ "s:/usr/lib/jvm/java-6-sun-1.6.0.00:$(java-config --jdk-home):g" \
+ buildgcc/Makefile || die "sed failed"
+ # respect CFLAGS, remove strip and other hard-coded crap
+ epatch "${FILESDIR}"/${P}-Makefile.patch
}
src_compile() {
@@ -45,7 +51,7 @@ src_compile() {
local build_targets="all"
use java && build_targets="${build_targets} javaall"
- emake ${build_targets} || die "build failed"
+ emake CXX="$(tc-getCXX)" ${build_targets} || die "build failed"
}
src_install() {
@@ -54,7 +60,6 @@ src_install() {
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
@@ -80,25 +85,3 @@ src_install() {
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}
-}