summaryrefslogtreecommitdiff
path: root/package/openjdk
diff options
context:
space:
mode:
Diffstat (limited to 'package/openjdk')
-rw-r--r--package/openjdk/Makefile92
-rw-r--r--package/openjdk/patches/debug-javac.patch18
-rw-r--r--package/openjdk/patches/disable-backtrace.patch11
-rw-r--r--package/openjdk/patches/disable-freetype-check.patch11
-rw-r--r--package/openjdk/patches/patch-icedtea6-1_10_Makefile_in27
-rw-r--r--package/openjdk/patches/remove-libnsl.patch69
6 files changed, 189 insertions, 39 deletions
diff --git a/package/openjdk/Makefile b/package/openjdk/Makefile
index 8802ee529..d8a932f70 100644
--- a/package/openjdk/Makefile
+++ b/package/openjdk/Makefile
@@ -15,8 +15,9 @@ PKG_MD5SUM:= 2d2bbbb0f9b81f1fec41ec730da8a933 \
d526d0848c88607ce4e3a0a4edb75d50
PKG_DESCR:= OpenJDK Java VM
PKG_SECTION:= lang
-PKG_BUILDDEP:= alsa-lib xproto jpeg zlib libX11 libpng freetype cups
-PKG_BUILDDEP+= libXt libXp libXinerama libXrender libXtst
+PKG_BUILDDEP:= alsa-lib xproto jpeg zlib giflib libpng freetype cups
+PKG_BUILDDEP+= libX11 libXt libXp libXinerama libXrender libXtst
+PKG_DEPENDS:= zlib libstdcxx libffi
PKG_URL:= http://openjdk.org/
PKG_SITES:= http://download.java.net/openjdk/jdk6/promoted/b22/ \
http://mirror.netcologne.de/apache.org/xml/xalan-j/binaries/ \
@@ -54,22 +55,26 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,OPENJDK,openjdk,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-BUILD_STYLE:= manual
-INSTALL_STYLE:= manual
TARGET_CFLAGS:= $(filter-out -fhonour-copts,$(TARGET_CFLAGS))
+BOOTSTRAPJDK:= ${STAGING_JAVA_HOST_DIR}/bootstrap-jdk
ifeq ($(ADK_PACKAGE_OPENJDK_ZERO),y)
-CONFIGURE_ARGS+= --enable-zero
+CONFIGURE_BACKEND:= --enable-zero
endif
ifeq ($(ADK_PACKAGE_OPENJDK_SHARK),y)
-CONFIGURE_ARGS+= --enable-shark
+CONFIGURE_BACKEND:= --enable-shark
+endif
+ifeq ($(ADK_PACKAGE_OPENJDK_CACAO),y)
+CONFIGURE_BACKEND:= --enable-cacao
+endif
+ifeq ($(ADK_PACKAGE_OPENJDK_JAMVM),y)
+CONFIGURE_BACKEND:= --enable-jamvm
endif
-BOOTSTRAPJDK:= ${WRKDIST}/bootstrap-jdk
+CONFIGURE_ARGS+= $(CONFIGURE_BACKEND)
CONFIGURE_ARGS+= --disable-docs \
- --enable-bootstrap \
+ --disable-bootstrap \
--enable-openjdk-cross-compilation \
- --with-cc-for-build=$(CC_FOR_BUILD) \
--with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \
--with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \
--with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \
@@ -83,12 +88,13 @@ CONFIGURE_ARGS+= --disable-docs \
--with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
--without-rhino
-OPENJDK_NATIVE_ENV+= JAVACFLAGS="-cp ${STAGING_JAVA_HOST_DIR}/usr/share/java/libgcj-4.5.2.jar"
-OPENJDK_NATIVE_ENV+= DYLD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64
-OPENJDK_NATIVE_ENV+= LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64
-OPENJDK_NATIVE_ENV+= ADK_ECJ=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj
+MAKE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \
+ GCC_HONOUR_COPTS=s
-OPENJDK_BUILD_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/bin
+OPENJDK_NATIVE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \
+ GCC_HONOUR_COPTS=s \
+ TARGET_ALIAS=$(GNU_TARGET_NAME) BUILD_ALIAS=$(GNU_HOST_NAME) HOST_ALIAS=$(GNU_TARGET_NAME)
+ALL_TARGET:= icedtea
do-extract:
cd ${WRKDIST}; mkdir $(PKG_NAME)-$(PKG_VERSION); \
@@ -96,35 +102,43 @@ do-extract:
cd $(WRKDIST); tar xzf $(TOPDIR)/dl/$(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz
cd ${WRKDIST}; tar xzf ${TOPDIR}/dl/${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz
mkdir -p ${WRKBUILD}/drops
- cd ${TOPDIR}/dl; cp jaxp144_01.zip jdk6-jaf-b20.zip jdk6-jaxws-b20.zip \
- ${WRKBUILD}/drops
+ cd ${TOPDIR}/dl; cp jaxp144_01.zip jdk6-jaf-b20.zip jdk6-jaxws-b20.zip ${WRKBUILD}/drops
pre-configure:
cd ${WRKBUILD}; rm -rf config.{cache,status}; \
- export ${OPENJDK_NATIVE_ENV}; ./configure \
- --enable-bootstrap \
- --enable-zero \
- --disable-openjdk-cross-compilation \
- --with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \
- --with-jdk-home=$(STAGING_JAVA_HOST_DIR)/usr/lib/jvm \
- --with-java=$(STAGING_JAVA_HOST_DIR)/usr/bin/java \
- --with-javac=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj \
- --with-gcj=$(STAGING_JAVA_HOST_DIR)/usr/bin/gcj \
- --with-ecj-jar=${STAGING_JAVA_HOST_DIR}/usr/share/ecj.jar \
- --with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \
- --with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \
- --with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \
- --without-rhino \
- --disable-docs \
- && $(MAKE) && $(CP) $(WRKSRC)/openjdk.build/j2sdk-image ${WRKDIST}/bootstrap-jdk && $(MAKE) clean && rm -rf ${WRKBUILD}/openjdk-old
-
-do-build:
- cd ${WRKBUILD}; export $(OPENJDK_BUILD_ENV); make
-
-do-install:
- cd ${WRKBUILD}; make install
+ export ${OPENJDK_NATIVE_ENV} $(MAKE_ENV) ; ./configure \
+ ${CONFIGURE_TRIPLE} \
+ $(CONFIGURE_BACKEND) \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --datadir=/usr/share \
+ --mandir=/usr/share/man \
+ --libexecdir=/usr/libexec \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --enable-bootstrap \
+ --enable-openjdk-cross-compilation \
+ --with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \
+ --with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \
+ --with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \
+ --with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \
+ --with-jdk-home=$(BOOTSTRAPJDK) \
+ --with-java=$(BOOTSTRAPJDK)/bin/java \
+ --with-javac=$(BOOTSTRAPJDK)/bin/javac \
+ --with-javah=$(BOOTSTRAPJDK)/bin/javah \
+ --with-jar=$(BOOTSTRAPJDK)/bin/jar \
+ --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
+ --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
+ --without-rhino ;\
+ $(MAKE) icedtea-ecj
+ # fixup symlinks to bootstrapjdk
+ ln -sf $(BOOTSTRAPJDK)/bin/java $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/java
+ ln -sf $(BOOTSTRAPJDK)/bin/javac $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/javac
+ ln -sf $(BOOTSTRAPJDK)/bin/javah $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/javah
+ ln -sf $(BOOTSTRAPJDK)/bin/jar $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/jar
openjdk-install:
- $(INSTALL_DIR) $(IDIR_OPENJDK)/usr/bin
+ $(INSTALL_DIR) $(IDIR_OPENJDK)/usr
+ $(CP) $(WRKBUILD)/openjdk.build/j2re-image/* $(IDIR_OPENJDK)/usr
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/openjdk/patches/debug-javac.patch b/package/openjdk/patches/debug-javac.patch
new file mode 100644
index 000000000..f130325ef
--- /dev/null
+++ b/package/openjdk/patches/debug-javac.patch
@@ -0,0 +1,18 @@
+--- w-openjdk-6-1.orig/icedtea6-1.10.orig/javac.in 2011-02-23 23:32:18.635149341 +0100
++++ w-openjdk-6-1/icedtea6-1.10/javac.in 2011-04-05 16:27:04.291962749 +0200
+@@ -37,6 +37,7 @@
+ if ( -e "@abs_top_builddir@/native-ecj" )
+ {
+ my @ecj_args = gen_ecj_opts( \@ARGV );
++ print 'Using native ecj';
+ exec '@abs_top_builddir@/native-ecj', @ecj_parms, @ecj_args ;
+ }
+ elsif ( -e "@ECJ_JAR@" )
+@@ -45,6 +46,7 @@
+ my @CLASSPATH = ('@ECJ_JAR@');
+ push @CLASSPATH, split /:/, $ENV{"CLASSPATH"} if exists $ENV{"CLASSPATH"};
+ $ENV{"CLASSPATH"} = join ':', @CLASSPATH;
++ print 'Using ecj with java';
+ exec '@JAVA@', 'org.eclipse.jdt.internal.compiler.batch.Main', @ecj_parms, @ecj_args;
+ }
+ else
diff --git a/package/openjdk/patches/disable-backtrace.patch b/package/openjdk/patches/disable-backtrace.patch
new file mode 100644
index 000000000..bd335a914
--- /dev/null
+++ b/package/openjdk/patches/disable-backtrace.patch
@@ -0,0 +1,11 @@
+--- w-openjdk-6-1.orig/openjdk-6/jdk/src/solaris/native/sun/xawt/XToolkit.c 2011-02-28 17:06:50.000000000 +0100
++++ w-openjdk-6-1/openjdk-6/jdk/src/solaris/native/sun/xawt/XToolkit.c 2011-04-10 22:33:28.481412674 +0200
+@@ -689,7 +689,7 @@
+ return ret;
+ }
+
+-#ifdef __linux__
++#if 0
+ void print_stack(void)
+ {
+ void *array[10];
diff --git a/package/openjdk/patches/disable-freetype-check.patch b/package/openjdk/patches/disable-freetype-check.patch
new file mode 100644
index 000000000..5f5f6cf83
--- /dev/null
+++ b/package/openjdk/patches/disable-freetype-check.patch
@@ -0,0 +1,11 @@
+--- w-openjdk-6-1.orig/openjdk-6.orig/jdk/make/common/shared/Sanity.gmk 2011-02-28 17:06:10.000000000 +0100
++++ w-openjdk-6-1/openjdk-6/jdk/make/common/shared/Sanity.gmk 2011-04-05 14:05:29.691807661 +0200
+@@ -793,7 +793,7 @@
+ # Check for availability of FreeType (OpenJDK specific)
+ ######################################################
+
+-ifdef OPENJDK
++ifdef OPENJDK_DISABLED
+
+ #name of test program that prints out "Failed" if freetype is not good enough
+ FREETYPE_VERSION_CHECK_NAME = freetype_versioncheck
diff --git a/package/openjdk/patches/patch-icedtea6-1_10_Makefile_in b/package/openjdk/patches/patch-icedtea6-1_10_Makefile_in
index 50667a68a..0f49fe67a 100644
--- a/package/openjdk/patches/patch-icedtea6-1_10_Makefile_in
+++ b/package/openjdk/patches/patch-icedtea6-1_10_Makefile_in
@@ -1,5 +1,32 @@
--- w-openjdk-6-1.orig/icedtea6-1.10/Makefile.in 2011-03-02 20:48:45.000000000 +0100
+++ w-openjdk-6-1/icedtea6-1.10/Makefile.in 2011-04-02 23:33:17.000000000 +0200
+@@ -328,7 +328,7 @@
+ am__untar = @am__untar@
+ bindir = @bindir@
+ build = @build@
+-build_alias = @build_alias@
++build_alias = ${BUILD_ALIAS}
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
+@@ -339,7 +339,7 @@
+ dvidir = @dvidir@
+ exec_prefix = @exec_prefix@
+ host = @host@
+-host_alias = @host_alias@
++host_alias = ${HOST_ALIAS}
+ host_cpu = @host_cpu@
+ host_os = @host_os@
+ host_vendor = @host_vendor@
+@@ -362,7 +362,7 @@
+ sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+-target_alias = @target_alias@
++target_alias = ${TARGET_ALIAS}
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
@@ -1329,7 +1329,7 @@ stamps/extract-openjdk.stamp: stamps/dow
@OPENJDK_SRC_DIR_FOUND_TRUE@ cp -pPR $(OPENJDK_SRC_DIR_LINK) $(OPENJDK_SRC_DIR) openjdk ; \
@OPENJDK_SRC_DIR_FOUND_TRUE@ fi
diff --git a/package/openjdk/patches/remove-libnsl.patch b/package/openjdk/patches/remove-libnsl.patch
new file mode 100644
index 000000000..9c086843e
--- /dev/null
+++ b/package/openjdk/patches/remove-libnsl.patch
@@ -0,0 +1,69 @@
+--- w-openjdk-6-1.orig/openjdk-6/jdk/make/java/hpi/hpi_common.gmk 2011-02-28 17:06:10.000000000 +0100
++++ w-openjdk-6-1/openjdk-6/jdk/make/java/hpi/hpi_common.gmk 2011-04-10 20:05:01.417672476 +0200
+@@ -86,5 +86,5 @@
+ # Things that must be linked in.
+ #
+ ifneq ($(PLATFORM), windows)
+-OTHER_LDLIBS += $(LIBSOCKET) -lnsl $(LIBM) -ldl
++OTHER_LDLIBS += $(LIBSOCKET) $(LIBM) -ldl
+ endif
+--- w-openjdk-6-1.orig/openjdk-6/jdk/make/java/java/Makefile 2011-02-28 17:06:10.000000000 +0100
++++ w-openjdk-6-1/openjdk-6/jdk/make/java/java/Makefile 2011-04-10 20:05:20.637673621 +0200
+@@ -205,7 +205,7 @@
+ OTHER_LDLIBS += $(JVMLIB) -libpath:$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) fdlibm.lib \
+ -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib
+ else
+-OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) -lnsl -ldl \
++OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) -ldl \
+ -L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH)
+ endif
+
+--- w-openjdk-6-1.orig/openjdk-6/jdk/make/java/net/Makefile 2011-02-28 17:06:10.000000000 +0100
++++ w-openjdk-6-1/openjdk-6/jdk/make/java/net/Makefile 2011-04-10 20:05:39.537672169 +0200
+@@ -97,7 +97,7 @@
+ # Will not compile at warning level 3 if warnings are fatal
+ COMPILER_WARNINGS_FATAL=false
+ else
+- OTHER_LDLIBS = $(LIBSOCKET) -lnsl -ldl $(JVMLIB)
++ OTHER_LDLIBS = $(LIBSOCKET) -ldl $(JVMLIB)
+ endif
+ ifeq ($(PLATFORM), linux)
+ OTHER_LDLIBS += -lpthread
+--- w-openjdk-6-1.orig/openjdk-6/jdk/make/jpda/transport/socket/Makefile 2011-02-28 17:06:11.000000000 +0100
++++ w-openjdk-6-1/openjdk-6/jdk/make/jpda/transport/socket/Makefile 2011-04-10 20:06:06.037672449 +0200
+@@ -42,11 +42,11 @@
+ endif
+
+ ifeq ($(PLATFORM), linux)
+- OTHER_LDLIBS += -lnsl $(LIBSOCKET) -lpthread
++ OTHER_LDLIBS += $(LIBSOCKET) -lpthread
+ endif
+
+ ifeq ($(PLATFORM), solaris)
+- OTHER_LDLIBS += -lnsl $(LIBSOCKET)
++ OTHER_LDLIBS += $(LIBSOCKET)
+ endif
+
+ ifeq ($(PLATFORM), windows)
+--- w-openjdk-6-1.orig/openjdk-6/jdk/make/java/java_hprof_demo/Makefile 2011-02-28 17:06:10.000000000 +0100
++++ w-openjdk-6-1/openjdk-6/jdk/make/java/java_hprof_demo/Makefile 2011-04-10 20:28:43.287672398 +0200
+@@ -83,7 +83,7 @@
+ ifeq ($(PLATFORM), windows)
+ OTHER_LDLIBS += wsock32.lib winmm.lib
+ else
+- OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl
++ OTHER_LDLIBS += $(LIBSOCKET) -ldl
+ endif
+
+ #
+--- w-openjdk-6-1.orig/openjdk-6/jdk/make/mkdemo/jvmti/hprof/Makefile 2011-02-28 17:06:11.000000000 +0100
++++ w-openjdk-6-1/openjdk-6/jdk/make/mkdemo/jvmti/hprof/Makefile 2011-04-11 10:23:11.538911604 +0200
+@@ -42,7 +42,7 @@
+ OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl
+ endif
+ ifeq ($(PLATFORM), linux)
+- OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl -lpthread
++ OTHER_LDLIBS += $(LIBSOCKET) -ldl -lpthread
+ endif
+
+ #