diff options
author | Greg Larkin <glarkin@FreeBSD.org> | 2009-12-30 23:53:20 +0000 |
---|---|---|
committer | Greg Larkin <glarkin@FreeBSD.org> | 2009-12-30 23:53:20 +0000 |
commit | 058e2a3f615a7362fd3e6d8a62e6c8f494c81d74 (patch) | |
tree | 05a78a42a25347d6614b2070ef64ba4ab675c2a8 /lang/gcc42 | |
parent | - Update to 0.4.1 (diff) |
- Re-enabled the Java (gcj) frontend to support print/pdftk
- Added support for gcj on amd64
- Added call to contrib/download_ecj so gcj executable doesn't die with
a "file not found" error after it's built
Submitted by: glarkin
Approved by: gerald (via email)
Notes
Notes:
svn path=/head/; revision=246904
Diffstat (limited to 'lang/gcc42')
-rw-r--r-- | lang/gcc42/Makefile | 61 | ||||
-rw-r--r-- | lang/gcc42/distinfo | 3 | ||||
-rw-r--r-- | lang/gcc42/files/java-patch-hier | 13 | ||||
-rw-r--r-- | lang/gcc42/files/patch-contrib__download_ecj | 28 | ||||
-rw-r--r-- | lang/gcc42/pkg-plist | 20 |
5 files changed, 119 insertions, 6 deletions
diff --git a/lang/gcc42/Makefile b/lang/gcc42/Makefile index c295595ab951..3cb0559152b3 100644 --- a/lang/gcc42/Makefile +++ b/lang/gcc42/Makefile @@ -8,15 +8,15 @@ PORTNAME= gcc PORTVERSION= 4.2.5.20090325 -PORTREVISION= 1 -CATEGORIES= lang +PORTREVISION= 2 +CATEGORIES= lang java MASTER_SITES= ${MASTER_SITE_GCC} MASTER_SITE_SUBDIR= snapshots/${VERSIONSTRING} DISTFILES= gcc-core-${VERSIONSTRING}${EXTRACT_SUFX} \ gcc-g++-${VERSIONSTRING}${EXTRACT_SUFX} \ gcc-objc-${VERSIONSTRING}${EXTRACT_SUFX} -MAINTAINER= gerald@FreeBSD.org +MAINTAINER?= gerald@FreeBSD.org COMMENT= GNU Compiler Collection 4.2 LIB_DEPENDS= gmp.8:${PORTSDIR}/math/libgmp4 \ @@ -32,12 +32,17 @@ USE_GMAKE= yes USE_ICONV= yes USE_PERL5_BUILD=yes MAKE_JOBS_SAFE= yes +WANT_GNOME= yes PATCH_WRKSRC= ${SRCDIR} CONFIGURE_SCRIPT= ../${SRCDIR:S/${WRKDIR}\///}/configure .include <bsd.port.pre.mk> +.if ${ARCH} != i386 && ${ARCH} != amd64 +WITHOUT_JAVA= yes +.endif + .if ${ARCH} == "amd64" CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL} .else @@ -49,7 +54,7 @@ WRKSRC= ${WRKDIR}/build TARGLIB= ${PREFIX}/lib/gcc${SUFFIX} LIBEXEC= ${PREFIX}/libexec/gcc${SUFFIX} GNU_CONFIGURE= yes -CONFIGURE_ARGS+=--disable-nls \ +CONFIGURE_ARGS+= --disable-nls \ --with-system-zlib \ --with-libiconv-prefix=${LOCALBASE} \ --with-gmp=${LOCALBASE} \ @@ -74,10 +79,54 @@ INFO= gcc${SUFFIX}/cpp \ gcc${SUFFIX}/gccint \ gcc${SUFFIX}/libgomp +.if ! defined(WITHOUT_JAVA) +DISTFILES+= gcc-java-${VERSIONSTRING}${EXTRACT_SUFX} +BUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip +EXTRA_PATCHES+= ${FILESDIR}/java-patch-hier +# FIXME: we are currently getting weird build failures with libjava on +# some 4.x and 5.x systems, which the following works around. PR 81788. +CONFIGURE_ARGS+=--disable-rpath --enable-libgcj +MAKE_ENV+= JAR=no +MAN1+= gcj${SUFFIX}.1 \ + gcj-dbtool${SUFFIX}.1 \ + gcjh${SUFFIX}.1 \ + gij${SUFFIX}.1 \ + gjnih${SUFFIX}.1 \ + grmic${SUFFIX}.1 \ + grmiregistry${SUFFIX}.1 \ + jcf-dump${SUFFIX}.1 \ + jv-scan${SUFFIX}.1 \ + jv-convert${SUFFIX}.1 +INFO+= gcc${SUFFIX}/gcj +PLIST_SUB+= JAVA="" + +post-patch:: + @cd ${SRCDIR} && ${CHMOD} 755 ./contrib/download_ecj && ./contrib/download_ecj + +.if defined(WITH_JAVA_AWT) +LIB_DEPENDS+= cairo.2:${PORTSDIR}/graphics/cairo +USE_GNOME= gtk20 libartlgpl2 +CONFIGURE_ARGS+= --enable-java-awt=gtk,xlib \ + --enable-gtk-cairo +.endif + +.else +CONFIGURE_ARGS+=--disable-libgcj +PLIST_SUB+= JAVA="@comment " +.endif + pre-everything:: @${ECHO_MSG} "Making GCC ${PORTVERSION} for ${OPSYS} ${OSREL} target=${CONFIGURE_TARGET}" -post-patch: +pre-extract: + @# Building libgcj with lang/gcc295 installed is causing a failure + @# about "hidden symbol `__eprintf'" in libgcc.a(_eprintf.o). + @if type gcc295 >/dev/null ; then \ + echo "This port will not build in the presence of lang/gcc295."; \ + exit 1; \ + fi + +post-patch:: @${REINPLACE_CMD} -e 's|\(const char version_string.*\)";|\1 [FreeBSD]";|' \ ${SRCDIR}/gcc/version.c @@ -92,7 +141,7 @@ post-install: ${RM} -f ${TARGLIB}/*.la # Add target libraries and include files to packaging list. ${RM} -f ${WRKDIR}/PLIST.lib -.for d in ${TARGLIB:S/^${PREFIX}\///} ${LIBEXEC:S/^${PREFIX}\///} +.for d in ${TARGLIB:S/^${PREFIX}\///} ${LIBEXEC:S/^${PREFIX}\///} include/gcj include/gnu include/java include/javax cd ${PREFIX} ; if [ -d $d ]; then \ ${FIND} $d -type f -o -type l >>${WRKDIR}/PLIST.lib ;\ ${FIND} $d -type d | ${SORT} -r \ diff --git a/lang/gcc42/distinfo b/lang/gcc42/distinfo index b9fb1bdafcef..f3cce8056893 100644 --- a/lang/gcc42/distinfo +++ b/lang/gcc42/distinfo @@ -7,3 +7,6 @@ SIZE (gcc-g++-4.2-20090325.tar.bz2) = 4826743 MD5 (gcc-objc-4.2-20090325.tar.bz2) = 4f90a23bf249df24682e5fc1d4042a23 SHA256 (gcc-objc-4.2-20090325.tar.bz2) = ed7489522fbfb9ed6be9a028e3fe73018d406e206f4dd9d79b892c4b04bd3366 SIZE (gcc-objc-4.2-20090325.tar.bz2) = 196233 +MD5 (gcc-java-4.2-20090325.tar.bz2) = 8559d9452a0ae29b935214b71baf5dfd +SHA256 (gcc-java-4.2-20090325.tar.bz2) = b5f3c1088e89d605bfee5dbfd25c77dd94b4c583ea7ff4a4c347899a76ce682e +SIZE (gcc-java-4.2-20090325.tar.bz2) = 10405140 diff --git a/lang/gcc42/files/java-patch-hier b/lang/gcc42/files/java-patch-hier new file mode 100644 index 000000000000..edb122b087b8 --- /dev/null +++ b/lang/gcc42/files/java-patch-hier @@ -0,0 +1,13 @@ +Index: libjava/Makefile.in +=================================================================== +--- libjava/Makefile.in (revision 117734) ++++ libjava/Makefile.in (working copy) +@@ -712,7 +712,7 @@ + $(am__append_2) $(am__append_3) + toolexecmainlib_DATA = libgcj.spec + dbexec_LTLIBRARIES = libjvm.la +-pkgconfigdir = $(libdir)/pkgconfig ++pkgconfigdir = $(prefix)/libdata/pkgconfig + jardir = $(datadir)/java + jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar + @JAVA_HOME_SET_FALSE@JAVA_HOME_DIR = $(prefix) diff --git a/lang/gcc42/files/patch-contrib__download_ecj b/lang/gcc42/files/patch-contrib__download_ecj new file mode 100644 index 000000000000..799a70c85a73 --- /dev/null +++ b/lang/gcc42/files/patch-contrib__download_ecj @@ -0,0 +1,28 @@ +--- ./contrib/download_ecj.orig 2009-12-10 13:52:02.000000000 -0500 ++++ ./contrib/download_ecj 2009-12-10 13:52:02.000000000 -0500 +@@ -0,0 +1,25 @@ ++#! /bin/sh ++ ++# ++# Download the ecj jar file needed by gcj. ++# Run this from the top level of the gcc source tree and the libjava ++# build will do the right thing. ++# ++# (C) 2006 Free Software Foundation ++# ++# This script is Free Software, and it can be copied, distributed and ++# modified as defined in the GNU General Public License. A copy of ++# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html ++# ++ ++ftp -n sourceware.org << EOF ++verbose ++hash ++user ftp '' ++cd /pub/java ++binary ++get ecj-latest.jar ++EOF ++ ++mv ecj-latest.jar ecj.jar ++ diff --git a/lang/gcc42/pkg-plist b/lang/gcc42/pkg-plist index af92003847f0..0550586fa444 100644 --- a/lang/gcc42/pkg-plist +++ b/lang/gcc42/pkg-plist @@ -10,4 +10,24 @@ bin/%%GNU_HOST%%-g++%%SUFFIX%% bin/%%GNU_HOST%%-gcc-%%GCC_VER%% bin/%%GNU_HOST%%-gcc%%SUFFIX%% info/gcc%%SUFFIX%%/dir +%%JAVA%%bin/addr2name.awk%%SUFFIX%% +%%JAVA%%bin/gappletviewer%%SUFFIX%% +%%JAVA%%bin/gcj%%SUFFIX%% +%%JAVA%%bin/gcj-dbtool%%SUFFIX%% +%%JAVA%%bin/gcjh%%SUFFIX%% +%%JAVA%%bin/gij%%SUFFIX%% +%%JAVA%%bin/gjarsigner%%SUFFIX%% +%%JAVA%%bin/gjnih%%SUFFIX%% +%%JAVA%%bin/gkeytool%%SUFFIX%% +%%JAVA%%bin/grmic%%SUFFIX%% +%%JAVA%%bin/grmiregistry%%SUFFIX%% +%%JAVA%%bin/jar%%SUFFIX%% +%%JAVA%%bin/jv-convert%%SUFFIX%% +%%JAVA%%bin/jv-scan%%SUFFIX%% +%%JAVA%%bin/jcf-dump%%SUFFIX%% +%%JAVA%%bin/%%GNU_HOST%%-gcj%%SUFFIX%% +%%JAVA%%bin/%%GNU_HOST%%-gcjh%%SUFFIX%% +%%JAVA%%libdata/pkgconfig/libgcj-4.2.pc +%%JAVA%%share/java/libgcj-%%GCC_VER%%.jar +%%JAVA%%share/java/libgcj-tools-%%GCC_VER%%.jar @comment Insert PLIST.lib here |