Date: Thu, 10 Oct 2013 21:59:11 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r330035 - in head/java: openjdk6 openjdk6-jre openjdk6/files Message-ID: <201310102159.r9ALxBki096093@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Thu Oct 10 21:59:11 2013 New Revision: 330035 URL: http://svnweb.freebsd.org/changeset/ports/330035 Log: - Fix few mis-merges against HotSpot 23 and tie up some loose ends. - Fix build with libiconv. This problem was introduced in r330018. - Update CA list to Oracle Java 7u40. An expired CA was removed. Added: head/java/openjdk6/Makefile.test (contents, props changed) head/java/openjdk6/files/Makefile.test.in - copied unchanged from r329935, head/java/openjdk6/files/Makefile.test Deleted: head/java/openjdk6/files/Makefile.test Modified: head/java/openjdk6-jre/Makefile head/java/openjdk6/Makefile head/java/openjdk6/files/cacerts head/java/openjdk6/files/patch-set Modified: head/java/openjdk6-jre/Makefile ============================================================================== --- head/java/openjdk6-jre/Makefile Thu Oct 10 21:56:48 2013 (r330034) +++ head/java/openjdk6-jre/Makefile Thu Oct 10 21:59:11 2013 (r330035) @@ -1,6 +1,6 @@ # $FreeBSD$ -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= java devel PKGNAMESUFFIX= -jre Modified: head/java/openjdk6/Makefile ============================================================================== --- head/java/openjdk6/Makefile Thu Oct 10 21:56:48 2013 (r330034) +++ head/java/openjdk6/Makefile Thu Oct 10 21:59:11 2013 (r330035) @@ -3,7 +3,7 @@ PORTNAME= openjdk6 PORTVERSION= b28 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= java devel MASTER_SITES= ${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:ant,} \ http://download.java.net/openjdk/jtreg/promoted/4.1/b05/:jtreg \ @@ -52,6 +52,7 @@ USES= gmake iconv motif .include <bsd.port.options.mk> .include "${.CURDIR}/../openjdk6/Makefile.icedtea" +.include "${.CURDIR}/../openjdk6/Makefile.test" EXTRA_PATCHES= ${ICEDTEA_PATCHES} @@ -129,7 +130,7 @@ ALL_TARGET= debug_build OPENJDK_OSARCH= bsd-${ARCH:S/i386/i586/}-debug .else OPENJDK_OSARCH= bsd-${ARCH:S/i386/i586/} -WARNINGS_ARE_ERRORS?= -w +MAKE_ENV+= WARNINGS_ARE_ERRORS=-w .endif # disable FASTDEBUG_BUILD by default to improve compile time. @@ -160,14 +161,6 @@ USES+= display:test EXTRA_PATCHES+= ${FILESDIR}/test_gamma-disable.patch .endif -.if !empty(ICONV_LIB) -ICONV_INCLUDE= -I${LOCALBASE}/include -ICONV_LIBS= -L${LOCALBASE}/lib ${ICONV_LIB} -.else -ICONV_INCLUDE= -ICONV_LIBS= -.endif - COPYDIRS= \ jdk/src/linux/doc/man @@ -189,6 +182,16 @@ COPYFILES= \ jdk/src/solaris/native/java/net/linux_close.c \ jdk/src/solaris/native/sun/tools/attach/LinuxVirtualMachine.c +.include <bsd.port.pre.mk> + +.if ${ICONV_PREFIX} == "/usr" +ICONV_INCLUDE= +ICONV_LIBS= +.else +ICONV_INCLUDE= -I${LOCALBASE}/include +ICONV_LIBS= -L${LOCALBASE}/lib ${ICONV_LIB} +.endif + post-extract: @for d in ${COPYDIRS}; do \ ${MKDIR} `echo ${WRKSRC}/$$d | ${SED} 's/linux/bsd/g;'`; \ @@ -210,7 +213,7 @@ post-extract: @${SED} "s|/usr/local|${LOCALBASE}|" \ ${FILESDIR}/fontconfig.properties > \ ${WRKSRC}/jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties - @${SED} "s|%%LOCALBASE%%|${LOCALBASE}|" ${FILESDIR}/Makefile.test > \ + @${SED} "s|%%LOCALBASE%%|${LOCALBASE}|" ${FILESDIR}/Makefile.test.in > \ ${WRKSRC}/jdk/test/Makefile @${FIND} ${WRKSRC}/jdk/test -type f -name \*.sh -exec ${SED} -i "" \ -e s/Linux/FreeBSD/g {} \; @@ -222,24 +225,23 @@ post-patch: ${WRKSRC}/Makefile ${WRKSRC}/jdk/make/java/instrument/Makefile \ ${WRKSRC}/jdk/make/java/npt/Makefile \ ${WRKSRC}/jdk/make/sun/splashscreen/Makefile - @${REINPLACE_CMD} \ - -e "s|/lib:/usr/lib|/lib:/usr/lib:${LOCALBASE}/lib|" \ - ${WRKSRC}/hotspot/src/os/bsd/vm/os_bsd.cpp + @${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|" \ + ${WRKSRC}/hotspot/src/os/bsd/vm/os_bsd.cpp \ + ${WRKSRC}/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java .if ${PORT_OPTIONS:MPOLICY} - @${REINPLACE_CMD} \ - -e 's|policy install-limited|policy install-unlimited|' \ + @${REINPLACE_CMD} -e 's|%%POLICY%%|unlimited|' \ + ${WRKSRC}/jdk/make/javax/crypto/Makefile +.else + @${REINPLACE_CMD} -e 's|%%POLICY%%|limited|' \ ${WRKSRC}/jdk/make/javax/crypto/Makefile .endif - @${REINPLACE_CMD} \ - -e "s|%%LOCALBASE%%|${LOCALBASE}|" \ - ${WRKSRC}/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java .if defined(BUILD_JRE) - @${REINPLACE_CMD} \ - -e "s|%%OPENJDK_HOME%%|${PREFIX}/openjdk6-jre|" \ + @${REINPLACE_CMD} -e "s|%%JAVA_HOME%%|${PREFIX}/openjdk6-jre|" \ + ${WRKSRC}/hotspot/src/os/posix/launcher/java_md.c \ ${WRKSRC}/jdk/src/solaris/bin/java_md.c .else - @${REINPLACE_CMD} \ - -e "s|%%OPENJDK_HOME%%|${PREFIX}/openjdk6|" \ + @${REINPLACE_CMD} -e "s|%%JAVA_HOME%%|${PREFIX}/openjdk6|" \ + ${WRKSRC}/hotspot/src/os/posix/launcher/java_md.c \ ${WRKSRC}/jdk/src/solaris/bin/java_md.c .endif @@ -263,21 +265,6 @@ post-build: @${ECHO_MSG} "Unset the environment DISPLAY variable to run tests in a virtual X server." .endif @${ECHO_MSG} "" - -.if defined(DISPLAY) -_TEST_SEQ= do-test -.else -_TEST_SEQ= pre-test do-test post-test -.ORDER: ${_TEST_SEQ} -.endif -test: ${_TEST_SEQ} - @${ECHO_MSG} "" - @${ECHO_MSG} "You can run \"make test\" again to re-execute only the failed tests." - @${ECHO_MSG} "" - -do-test: build-depends build - @-(cd ${WRKSRC}/jdk/test; ${SETENV} PLATFORM=bsd ARCH=${ARCH} \ - ${MAKE_ENV} ${GMAKE} tests) .endif do-install: @@ -360,4 +347,4 @@ do-install: @${ECHO_CMD} "exit 0" >> ${PKGDEINSTALL} @${ECHO_CMD} "exit 0" >> ${PKGINSTALL} -.include <bsd.port.mk> +.include <bsd.port.post.mk> Added: head/java/openjdk6/Makefile.test ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/java/openjdk6/Makefile.test Thu Oct 10 21:59:11 2013 (r330035) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.if ${PORT_OPTIONS:MTEST} +.if defined(DISPLAY) +_TEST_SEQ= do-test +.else +_TEST_SEQ= pre-test do-test post-test +.ORDER: ${_TEST_SEQ} +.endif + +test: ${_TEST_SEQ} + @${ECHO_MSG} "" + @${ECHO_MSG} "You can run \"make test\" again to re-execute only the failed tests." + @${ECHO_MSG} "" + +do-test: build-depends build + @-(cd ${WRKSRC}/jdk/test; ${SETENV} PLATFORM=bsd ARCH=${ARCH} \ + ${MAKE_ENV} ${GMAKE} tests) +.endif Copied: head/java/openjdk6/files/Makefile.test.in (from r329935, head/java/openjdk6/files/Makefile.test) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/java/openjdk6/files/Makefile.test.in Thu Oct 10 21:59:11 2013 (r330035, copy of r329935, head/java/openjdk6/files/Makefile.test) @@ -0,0 +1,67 @@ +# +# Makefile to run jtreg +# + +ifeq ($(ARCH), i386) + ARCH = i586 +endif + +# Root of this test area (important to use full paths in some places) +TEST_ROOT := $(shell pwd) + +# Default bundle of all test results (passed or not) +JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip + +JT_HOME = $(TEST_ROOT)/../../jtreg +JTREG_KEY_OPTION = -k:\!ignore +JTREG_ENV_OPTION = -e:LOCALBASE=%%LOCALBASE%% +JTREG_STATUS_OPTION = -status:notRun,fail,error + +# Default JTREG to run +JTREG = $(ALT_JDK_IMPORT_PATH)/bin/java -jar $(JT_HOME)/lib/jtreg.jar + +# Default JDK to test +JAVA_HOME = $(TEST_ROOT)/../../build/$(PLATFORM)-$(ARCH)/j2sdk-image + +# The test directories to run +TESTDIRS = com demo java javax lib sun tools vm + +# Root of all test results +JTREG_OUTPUT_DIR = $(TEST_ROOT)/o_$(PLATFORM)-$(ARCH) + +# Default make rule +all: clean check tests $(JPRT_ARCHIVE_BUNDLE) + @echo "Testing completed successfully" + +# Chaeck to make sure these directories exist +check: $(JT_HOME) $(JAVA_HOME) + +# Run the tests +tests: FRC + @mkdir -p $(JTREG_OUTPUT_DIR) + $(JTREG) -a -v:fail,error \ + $(JTREG_KEY_OPTION) \ + $(JTREG_ENV_OPTION) \ + $(JTREG_STATUS_OPTION) \ + -r:$(JTREG_OUTPUT_DIR)/JTreport \ + -w:$(JTREG_OUTPUT_DIR)/JTwork \ + -jdk:$(JAVA_HOME) \ + $(TESTDIRS) + +# Bundle up the results +$(JPRT_ARCHIVE_BUNDLE): FRC + @rm -f $@ + @mkdir -p $(@D) + ( cd $(JTREG_OUTPUT_DIR) && %%LOCALBASE%%/bin/zip -q -r $@ . ) + +# Cleanup +clean: + rm -f -r $(JTREG_OUTPUT_DIR) + rm -f $(JPRT_ARCHIVE_BUNDLE) + +# Used to force a target rules to run +FRC: + +# Phony targets (e.g. these are not filenames) +.PHONY: all tests clean check + Modified: head/java/openjdk6/files/cacerts ============================================================================== Binary file (source and/or target). No diff available. Modified: head/java/openjdk6/files/patch-set ============================================================================== --- head/java/openjdk6/files/patch-set Thu Oct 10 21:56:48 2013 (r330034) +++ head/java/openjdk6/files/patch-set Thu Oct 10 21:59:11 2013 (r330035) @@ -737,7 +737,53 @@ } // Most versions of bsd have a bug where the number of processors are -@@ -997,7 +1038,7 @@ +@@ -337,7 +378,35 @@ + "environment on Bsd when /proc filesystem is not mounted."; + #endif + +-#ifdef _ALLBSD_SOURCE ++#if defined(__FreeBSD__) ++void os::Bsd::initialize_system_info() { ++ int cpu_val = sysconf(_SC_NPROCESSORS_CONF); ++ if (cpu_val >= 1) ++ set_processor_count(cpu_val); ++ else ++ set_processor_count(1); // fallback ++ ++#ifdef _SC_PHYS_PAGES ++ long phys_pages = sysconf(_SC_PHYS_PAGES); ++ if (phys_pages > 0) ++ _physical_memory = (julong)phys_pages * _page_size; ++ else ++ _physical_memory = 256*1024*1024; // fallback (XXXBSD?) ++#else ++ int mib[2]; ++ size_t len; ++ u_long mem_val; ++ ++ mib[0] = CTL_HW; ++ mib[1] = HW_PHYSMEM; ++ len = sizeof(mem_val); ++ if (sysctl(mib, 2, &mem_val, &len, NULL, 0) != -1) ++ _physical_memory = mem_val; ++ else ++ _physical_memory = 256*1024*1024; // fallback (XXXBSD?) ++#endif ++ } ++#elif defined(_ALLBSD_SOURCE) + void os::Bsd::initialize_system_info() { + int mib[2]; + size_t len; +@@ -452,7 +521,7 @@ + * 7: The default directories, normally /lib and /usr/lib. + */ + #ifndef DEFAULT_LIBPATH +-#define DEFAULT_LIBPATH "/lib:/usr/lib" ++#define DEFAULT_LIBPATH "/lib:/usr/lib:%%LOCALBASE%%/lib" + #endif + + #define EXTENSIONS_DIR "/lib/ext" +@@ -997,7 +1066,7 @@ return NULL; } @@ -746,7 +792,7 @@ #ifdef __APPLE__ // thread_id is mach thread on macos osthread->set_thread_id(::mach_thread_self()); -@@ -1009,6 +1050,7 @@ +@@ -1009,6 +1078,7 @@ // thread_id is kernel thread id (similar to Solaris LWP id) osthread->set_thread_id(os::Bsd::gettid()); @@ -754,7 +800,7 @@ if (UseNUMA) { int lgrp_id = os::numa_get_group_id(); if (lgrp_id != -1) { -@@ -1016,6 +1058,7 @@ +@@ -1016,6 +1086,7 @@ } } #endif @@ -762,7 +808,7 @@ // initialize signal mask for this thread os::Bsd::hotspot_sigmask(thread); -@@ -1194,7 +1237,7 @@ +@@ -1194,7 +1265,7 @@ } // Store pthread info into the OSThread @@ -771,11 +817,12 @@ #ifdef __APPLE__ osthread->set_thread_id(::mach_thread_self()); #else -@@ -2366,6 +2409,24 @@ +@@ -2366,7 +2437,23 @@ st->print("Memory:"); st->print(" %dk page", os::vm_page_size()>>10); -+#ifdef __FreeBSD__ +-#ifndef _ALLBSD_SOURCE ++#if defined(__FreeBSD__) + struct xswdev xsw; + size_t mibsize, size; + int mib[16], n, total = 0, used = 0; @@ -791,12 +838,11 @@ + used += xsw.xsw_used; + } + } -+#endif -+ - #ifndef _ALLBSD_SOURCE ++#elif !defined(_ALLBSD_SOURCE) // values in struct sysinfo are "unsigned long" struct sysinfo si; -@@ -2376,17 +2437,22 @@ + sysinfo(&si); +@@ -2376,17 +2463,22 @@ os::physical_memory() >> 10); st->print("(" UINT64_FORMAT "k free)", os::available_memory() >> 10); @@ -821,7 +867,7 @@ st->cr(); } -@@ -2533,10 +2599,17 @@ +@@ -2533,10 +2625,17 @@ jrelib_p = buf + len; // Add the appropriate library subdir @@ -839,7 +885,7 @@ // Add the appropriate client or server subdir len = strlen(buf); -@@ -3654,8 +3727,8 @@ +@@ -3654,8 +3753,8 @@ return OS_OK; #else int ret = setpriority(PRIO_PROCESS, thread->osthread()->thread_id(), newpri); @@ -849,7 +895,7 @@ } OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) { -@@ -4634,6 +4707,20 @@ +@@ -4634,6 +4733,20 @@ int os::active_processor_count() { #ifdef _ALLBSD_SOURCE @@ -934,15 +980,17 @@ #ifndef GAMMA #include "manifest_info.h" -@@ -96,7 +99,7 @@ +@@ -96,8 +99,8 @@ * A collection of useful strings. One should think of these as #define * entries, but actual strings can be more efficient (with many compilers). */ -#ifdef __linux__ +-static const char *system_dir = "/usr/java"; +#if defined(__linux__) || defined(_ALLBSD_SOURCE) - static const char *system_dir = "/usr/java"; ++static const char *system_dir = "%%JAVA_HOME%%"; static const char *user_dir = "/java"; #else /* Solaris */ + static const char *system_dir = "/usr/jdk"; @@ -526,7 +529,7 @@ * LD_LIBRARY_PATH. Note that this prevents any possible infinite * loop of execv() because we test for the prefix, above. @@ -1040,6 +1088,15 @@ #if defined(_ALLBSD_SOURCE) && defined(i586) +@@ -1508,7 +1538,7 @@ + } + } + if (_launcher_debug) { +- printf("linux_" LIBARCHNAME "_ServerClassMachine: %s\n", ++ printf("bsd_" LIBARCHNAME "_ServerClassMachine: %s\n", + (result == JNI_TRUE ? "true" : "false")); + } + return result; @@ -1672,7 +1702,7 @@ while (dp != NULL) { cp = strchr(dp, (int)':'); @@ -2355,6 +2412,17 @@ OTHER_LDLIBS = $(JVMLIB) +endif + +--- jdk/make/javax/crypto/Makefile ++++ jdk/make/javax/crypto/Makefile +@@ -155,7 +155,7 @@ + # + + ifdef OPENJDK +-all: build-jar install-jar build-policy install-limited ++all: build-jar install-jar build-policy install-%%POLICY%% + else # OPENJDK + ifeq ($(strip $(FILES_java)),) + all: --- jdk/make/javax/sound/FILES_c.gmk +++ jdk/make/javax/sound/FILES_c.gmk @@ -34,6 +34,8 @@ @@ -2720,8 +2788,8 @@ + ifeq ($(PLATFORM), bsd) + CFLAGS += -DPNG_NO_MMX_CODE + CPPFLAGS += -I$(OPENWIN_HOME)/include \ -+ -I$(OPENWIN_HOME)/include/X11/extensions \ -+ %%ICONV_INC%% ++ -I$(OPENWIN_HOME)/include/X11/extensions ++ CPPFLAGS += %%ICONV_INC%% + OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext %%ICONV_LIB%% $(LIBM) -pthread + else + CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions @@ -3068,22 +3136,10 @@ userHome + sep + ".themes", System.getProperty("swing.metacitythemedir"), + "%%LOCALBASE%%/share/themes", -+ "%%LOCALBASE%%/gnome/themes", ++ "%%LOCALBASE%%/share/gnome/themes", "/usr/share/themes", "/usr/gnome/share/themes", // Debian/Redhat/Solaris "/opt/gnome2/share/themes" // SuSE ---- jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java -+++ jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java -@@ -78,6 +78,9 @@ - */ - public long timeStamp ; - -+ // TODO: IcedTea: I am a stub. -+ static public int trapAuthenticationFailure = 0; -+ - - - /** --- jdk/src/share/classes/java/awt/Font.java +++ jdk/src/share/classes/java/awt/Font.java @@ -449,18 +449,19 @@ @@ -6535,7 +6591,7 @@ -#ifdef __linux__ -static const char *system_dir = "/usr/java"; +#if defined(__FreeBSD__) -+static const char *system_dir = "%%OPENJDK_HOME%%"; ++static const char *system_dir = "%%JAVA_HOME%%"; +static const char *user_dir = "/java"; +#elif defined(__NetBSD__) +static const char *system_dir = "/usr/local/openjdk6";
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310102159.r9ALxBki096093>