1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

- 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)
This commit is contained in:
Greg Larkin 2009-12-30 23:53:20 +00:00
parent 489ec090b1
commit 058e2a3f61
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=246904
5 changed files with 119 additions and 6 deletions

View File

@ -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
@ -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 \

View File

@ -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

View File

@ -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)

View File

@ -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
+

View File

@ -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