diff options
Diffstat (limited to 'java/jdk16')
58 files changed, 0 insertions, 2993 deletions
diff --git a/java/jdk16/Makefile b/java/jdk16/Makefile deleted file mode 100644 index fa7092df7426..000000000000 --- a/java/jdk16/Makefile +++ /dev/null @@ -1,337 +0,0 @@ -# Created by: Greg Lewis <glewis@FreeBSD.org> -# $FreeBSD$ - -PORTNAME= jdk -PORTVERSION= ${JDK_VERSION}.${JDK_UPDATE_VERSION}p${JDK_PATCHSET_VERSION} -PORTREVISION= 29 -CATEGORIES= java devel -MASTER_SITES= # http://download.java.net/jdk6/ -# http://www.eyesbeyond.com/freebsddom/java/jdk16.html -# http://java.sun.com/javase/downloads/index.jsp -DISTFILES= ${JRL_SRCFILE} ${JRL_BINFILE} ${JRL_MOZFILE} ${PATCHSETFILE} -EXTRACT_ONLY= ${JRL_SRCFILE} ${JRL_BINFILE} ${JRL_MOZFILE} - -MAINTAINER= glewis@FreeBSD.org -COMMENT= Java Development Kit 1.6.0 - -DEPRECATED= Outdated, consider using openjdk6 or openjdk7 -EXPIRATION_DATE= 2012-11-27 - -BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip \ - unzip:${PORTSDIR}/archivers/unzip \ - ${LOCALBASE}/lib/libXm.so:${PORTSDIR}/x11-toolkits/open-motif \ - ${LOCALBASE}/include/cups/cups.h:${PORTSDIR}/print/cups-client -RUN_DEPENDS= javavm:${PORTSDIR}/java/javavmwrapper - -OPTIONS= DEBUG "Enable debugging support" off \ - IPV6 "Enable IPv6 support" off \ - WEB "Enable the browser plugin and Java Web Start" on \ - POLICY "Install the Unlimited Strength Policy Files" off \ - TZUPDATE "Update the time zone data" on \ - JAIL "Port is being built within a jail" off - -WANT_GNOME= yes -PKGINSTALL= ${WRKDIR}/pkg-install -PKGDEINSTALL= ${WRKDIR}/pkg-deinstall -SUB_FILES+= pkg-install \ - pkg-deinstall -SUB_LIST+= JRE_HOME=${PREFIX}/jdk${JDK_VERSION}/jre \ - ARCH=${MACHINE_ARCH} - -WRKSRC= ${WRKDIR}/control/make - -USE_ZIP= yes -MAKE_JOBS_UNSAFE= yes -.if !defined(PACKAGE_BUILDING) -IS_INTERACTIVE= yes -.endif - -JRL_SRCFILE= jdk-${JDK_MAJOR_VERSION}u${JDK_UPDATE_VERSION}-fcs-src-b${JDK_BUILD_NUMBER}-jrl-${JDK_BUILD_DATE}.jar -JRL_BINFILE= jdk-${JDK_MAJOR_VERSION}u${JDK_UPDATE_VERSION}-fcs-bin-b${JDK_BUILD_NUMBER}-jrl-${JDK_BUILD_DATE}.jar -JRL_MOZFILE= jdk-${JDK_MAJOR_VERSION}u${JDK_UPDATE_VERSION}-fcs-mozilla_headers-b${JDK_BUILD_NUMBER}-unix-${JDK_BUILD_DATE}.jar -PATCHSETFILE= bsd-jdk16-patches-${JDK_PATCHSET_VERSION}.tar.bz2 -POLICYFILE= jce_policy-${JDK_MAJOR_VERSION}.zip - -JDK_VERSION= 1.6.0 -JDK_MAJOR_VERSION= 6 -JDK_UPDATE_VERSION= 3 -JDK_PATCHSET_VERSION= 4 -JDK_BUILD_NUMBER= 05 -JDK_BUILD_DATE= 24_sep_2007 -LATEST_LINK= jdk16 - -.include <bsd.port.pre.mk> - -BOOTSTRAP_JDKS= ${LOCALBASE}/diablo-jdk1.6.0 \ - ${LOCALBASE}/jdk1.6.0 \ - ${LOCALBASE}/openjdk6 - -.if defined(WITH_IPV6) -CATEGORIES+= ipv6 -.endif - -.if defined(WITH_POLICY) -DISTFILES+= ${POLICYFILE} -EXTRACT_ONLY+= ${POLICYFILE} -.endif - -.if defined(WITH_TZUPDATE) -RUN_DEPENDS+= ${LOCALBASE}/share/java/zi:${PORTSDIR}/java/java-zoneinfo -.endif - -# do we have valid bootstrap jdk installed? -.for CJDK in ${BOOTSTRAP_JDKS} -. if !defined(BOOTSTRAPJDKDIR) && exists(${CJDK}/bin/javac) -BOOTSTRAPJDKDIR= ${CJDK} -. endif -.endfor - -# if no valid jdk found, set dependency -.if !defined(BOOTSTRAPJDKDIR) -BOOTSTRAPJDKDIR?= ${LOCALBASE}/diablo-jdk1.6.0 -BUILD_DEPENDS+= ${BOOTSTRAPJDKDIR}/bin/javac:${PORTSDIR}/java/diablo-jdk16 -.endif - -.if !defined(WITHOUT_WEB) -USE_GNOME= desktopfileutils -.endif - -ONLY_FOR_ARCHS= i386 amd64 -USE_GMAKE= YES -USE_ICONV= YES -USE_XORG+= x11 xext xi xtst -RESTRICTED= Redistribution of pre-compiled binaries is not permitted -NO_CDROM= Redistribution of pre-compiled binaries is not permitted - -MAKE_ENV+= ALT_BOOTDIR="${BOOTSTRAPJDKDIR}" \ - ALT_MOTIF_DIR="${LOCALBASE}" \ - ALT_DEVTOOLS_PATH="${LOCALBASE}" \ - LANG="C" \ - LC_ALL="C" \ - JAVA_HOME="" \ - CLASSPATH="" \ - LD_LIBRARY_PATH="" \ - MAKEFLAGS="" \ - SKIP_COMPARE_IMAGES="true" \ - SKIP_FASTDEBUG_BUILD="true" \ - PTHREAD_LIBS="${PTHREAD_LIBS}" - -.if defined(WITH_DEBUG) -MAKE_ENV+= SKIP_DEBUG_BUILD="false" -.endif - -.if !defined(WITH_IPV6) -MAKE_ENV+= DONT_ENABLE_IPV6="YES" -.endif - -.if !defined(DISABLE_MAKE_JOBS) -.if defined(MAKE_JOBS_NUMBER) -BUILD_JOBS_NUMBER= ${MAKE_JOBS_NUMBER} -.else -BUILD_JOBS_NUMBER= `${SYSCTL} -n kern.smp.cpus` -.endif -MAKE_ENV+= HOTSPOT_BUILD_JOBS=${BUILD_JOBS_NUMBER} -.endif - -ALL_TARGET= all - -PLIST_FILES= jdk${JDK_VERSION}/jre/.systemPrefs/.system.lock \ - jdk${JDK_VERSION}/jre/.systemPrefs/.systemRootModFile -.if !defined(WITHOUT_WEB) -PLIST_FILES+= share/applications/sun-java16.desktop \ - share/applications/sun-javaws16.desktop \ - share/applications/sun-jcontrol16.desktop -.endif -PLIST_DIRS= jdk${JDK_VERSION}/jre/.systemPrefs - -.if (${ARCH} == amd64) -HOTSPOTARCH=amd64 -.else -HOTSPOTARCH=i586 -.endif - -JDKIMAGEDIR= ${WRKSRC}/../build/bsd-${HOTSPOTARCH}/j2sdk-image -JDKIMAGEDIR_G= ${WRKSRC}/../build/bsd-${HOTSPOTARCH}/j2sdk-debug-image - -LOCAL_FILES= ../../hotspot/make/jprt.config \ - ../../hotspot/src/os/bsd/vm/os_bsd.cpp \ - ../../j2se/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java \ - ../../j2se/src/share/classes/sun/net/www/MimeTable.java \ - ../../j2se/src/share/classes/sun/net/www/protocol/doc/DocURLConnection.java \ - ../../j2se/src/share/classes/sun/net/www/protocol/doc/Handler.java \ - ../../j2se/src/solaris/bin/java-rmi.cgi.sh \ - ../../j2se/src/solaris/bin/java_md.c \ - ../../j2se/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java - -X11_FILES= ../../j2se/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java \ - ../../j2se/src/solaris/native/sun/awt/fontpath.c - -DESKTOP_FILES= ../../deploy/src/desktop/freedesktop/applications/sun-java.desktop \ - ../../deploy/src/desktop/freedesktop/applications/sun-javaws.desktop \ - ../../deploy/src/plugin/solaris/controlpanel/sun_java.desktop - -# Check for JDK sources and patch file -.if !defined(PACKAGE_BUILDING) && (!exists(${DISTDIR}/${JRL_SRCFILE}) || !exists(${DISTDIR}/${JRL_BINFILE}) || !exists(${DISTDIR}/${JRL_MOZFILE}) || (defined(WITH_POLICY) && !exists(${DISTDIR}/${POLICYFILE})) || !exists(${DISTDIR}/${PATCHSETFILE}))#{ -DISTFILE_INSTRUCTIONS=\n\ -Due to licensing restrictions, certain files must be fetched manually.\n\n -.if !exists(${DISTDIR}/${JRL_SRCFILE}) || !exists(${DISTDIR}/${JRL_BINFILE}) || !exists(${DISTDIR}/${JRL_MOZFILE})#{ -DISTFILE_INSTRUCTIONS += Please download the -.if !exists(${DISTDIR}/${JRL_SRCFILE})#{ -DISTFILE_INSTRUCTIONS += Update ${JDK_UPDATE_VERSION} Source from\n\ - http://www.java.net/download/jdk6/6u${JDK_UPDATE_VERSION}/promoted/b${JDK_BUILD_NUMBER}/${JRL_SRCFILE}\n -.endif#} -.if !exists(${DISTDIR}/${JRL_BINFILE})#{ -.if !exists(${DISTDIR}/${JRL_SRCFILE})#{ -DISTFILE_INSTRUCTIONS += and the -.endif#} -DISTFILE_INSTRUCTIONS += Source Binaries from\n\ - http://www.java.net/download/jdk6/6u${JDK_UPDATE_VERSION}/promoted/b${JDK_BUILD_NUMBER}/${JRL_BINFILE}\n -.endif#} -.if !exists(${DISTDIR}/${JRL_MOZFILE})#{ -.if !exists(${DISTDIR}/${JRL_SRCFILE}) || !exists(${DISTDIR}/${JRL_BINFILE})#{ -DISTFILE_INSTRUCTIONS += and the -.endif#} -DISTFILE_INSTRUCTIONS += Mozilla Headers from\n\ - http://www.java.net/download/jdk6/6u${JDK_UPDATE_VERSION}/promoted/b${JDK_BUILD_NUMBER}/${JRL_MOZFILE}\n -.endif#} -DISTFILE_INSTRUCTIONS += .\n\n -.endif#} -.if defined(WITH_POLICY) && !exists(${DISTDIR}/${POLICYFILE})#{ -DISTFILE_INSTRUCTIONS += Please open http://www.oracle.com/technetwork/java/javase/downloads/index.html\n\ -in a web browser and follow the \"Download\" link for\n\ -\"Java Cryptography Extension (JCE) Unlimited Strength\n\ -Jurisdiction Policy Files 6\" to obtain the JCE policy file, ${POLICYFILE}.\n\n -.endif#} -.if !exists(${DISTDIR}/${PATCHSETFILE})#{ -DISTFILE_INSTRUCTIONS += Please download the patchset, ${PATCHSETFILE}, from\n\ -http://www.eyesbeyond.com/freebsddom/java/jdk16.html.\n\n -.endif#} -DISTFILE_INSTRUCTIONS += Please place the downloaded file(s) in ${DISTDIR} -DISTFILE_INSTRUCTIONS += \n and restart the build.\n\n -.endif#} - -pre-fetch: - @${ECHO_MSG} - @${ECHO_MSG} "IMPORTANT: To build the JDK 1.6.0 port, you should have at least" - @${ECHO_MSG} "2.5Gb of free disk space in the build area!" - @${ECHO_MSG} -.if defined(DISTFILE_INSTRUCTIONS) - @${PRINTF} "${DISTFILE_INSTRUCTIONS}" - @exit 1 -.endif - -# Get JRL agreement -.if !defined(PACKAGE_BUILDING) -pre-extract: - ${SH} ${FILESDIR}/license.sh -.endif - -# Extract the files -do-extract: - @${RM} -rf ${WRKDIR} - @${MKDIR} ${WRKDIR} - @${CC} ${CFLAGS} -o ${WRKDIR}/x_x2zip ${FILESDIR}/x_x2zip.c - @for file in ${EXTRACT_ONLY}; do \ - if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} "${DISTDIR}/$$file" ${EXTRACT_AFTER_ARGS}); \ - then \ - exit 1; \ - fi; \ - if [ `basename $$file .jar` != $$file ]; \ - then \ - if ! (cd ${WRKDIR} && ${WRKDIR}/x_x2zip 'YES I ACCEPT THE CLICK THROUGH LICENSE. ' X_X && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${WRKDIR}/X_X.zip ${EXTRACT_AFTER_ARGS}); \ - then \ - exit 1; \ - fi; \ - fi \ - done - -post-extract: - @${MV} ${WRKDIR}/share/plugin ${WRKDIR}/deploy/src/plugin/share/ - @${RMDIR} ${WRKDIR}/share - -pre-patch: - @cd ${WRKDIR} && \ - ${BZIP2_CMD} -dc ${DISTDIR}/${PATCHSETFILE} | ${TAR} -xf - && \ - ${CHMOD} -R u+w * && \ - ${PATCH} -p0 < ${WRKDIR}/jdk16.patches - -post-patch: - @for file in ${LOCAL_FILES}; do \ - ${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:" \ - ${WRKSRC}/$${file}; \ - done - @for file in ${X11_FILES}; do \ - ${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:" \ - ${WRKSRC}/$${file}; \ - done - @for file in ${DESKTOP_FILES}; do \ - ${REINPLACE_CMD} -e "s:%%PREFIX%%:${PREFIX}:g" \ - -e "s:%%JDK_VERSION%%:${JDK_VERSION}:g" \ - ${WRKSRC}/$${file}; \ - done - @${REINPLACE_CMD} -e "s:%%OSVERSION%%:${OSVERSION}:g" \ - ${WRKSRC}/../../j2se/make/common/Defs-bsd.gmk -.if defined(WITHOUT_WEB) - @${RM} ${WRKDIR}/deploy/make/Makefile -.endif - -do-build: - # Start of jdk build - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) - -post-build: - @# XXX don't install japanese manpages - @${RM} -rf ${JDKIMAGEDIR}/man/ja - @${RM} -rf ${JDKIMAGEDIR}/man/ja_JP.eucJP -.if defined(WITH_TZUPDATE) - @# Update time zones - @${RM} -rf ${JDKIMAGEDIR}/jre/lib/zi - @${LN} -s -f ${LOCALBASE}/share/java/zi ${JDKIMAGEDIR}/jre/lib -.endif - -do-install: - ${MKDIR} ${PREFIX}/jdk${JDK_VERSION} - cd ${JDKIMAGEDIR} && ${FIND} . \ - | ${CPIO} -pdmu -R ${LIBOWN}:${LIBGRP} ${PREFIX}/jdk${JDK_VERSION} -.if !defined(WITHOUT_WEB) - ${MKDIR} ${PREFIX}/share/applications - ${INSTALL_DATA} ${JDKIMAGEDIR}/jre/lib/desktop/applications/sun-java.desktop \ - ${PREFIX}/share/applications/sun-java16.desktop - ${INSTALL_DATA} ${JDKIMAGEDIR}/jre/lib/desktop/applications/sun-javaws.desktop \ - ${PREFIX}/share/applications/sun-javaws16.desktop - ${INSTALL_DATA} ${JDKIMAGEDIR}/jre/lib/desktop/applications/sun_java.desktop \ - ${PREFIX}/share/applications/sun-jcontrol16.desktop -.endif - @${ECHO_MSG} "@unexec ${LOCALBASE}/bin/unregistervm ${PREFIX}/jdk${JDK_VERSION}/bin/java" >> ${TMPPLIST} - @${FIND} -s ${JDKIMAGEDIR} -not -type d | \ - ${SED} -ne 's#^${JDKIMAGEDIR}#jdk${JDK_VERSION}#p' >> ${TMPPLIST} -.if !defined(WITHOUT_WEB) - @${ECHO_MSG} '@exec ${LOCALBASE}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${TMPPLIST} -.endif -.if defined(WITH_DEBUG) - cd ${JDKIMAGEDIR_G} && ${FIND} . \ - | ${CPIO} -pdmu -R ${LIBOWN}:${LIBGRP} ${PREFIX}/jdk${JDK_VERSION} - @${FIND} -s ${JDKIMAGEDIR_G} -not -type d | \ - ${SED} -ne 's#^${JDKIMAGEDIR_G}#jdk${JDK_VERSION}#p' >> ${TMPPLIST} -.endif - ${INSTALL_DATA} ${FILESDIR}/cacerts \ - ${PREFIX}/jdk${JDK_VERSION}/jre/lib/security/cacerts -.if defined(WITH_POLICY) - ${INSTALL_DATA} ${WRKDIR}/jce/*.jar ${PREFIX}/jdk${JDK_VERSION}/jre/lib/security -.endif - @${FIND} -s -d ${PREFIX}/jdk${JDK_VERSION} -type d | \ - ${SED} -ne 's#^${PREFIX}/#@dirrm #p' >> ${TMPPLIST} - @${ECHO_MSG} "@exec ${LOCALBASE}/bin/registervm ${PREFIX}/jdk${JDK_VERSION}/bin/java # FREEBSD-JDK${JDK_VERSION}" >> ${TMPPLIST} -.if !defined(WITHOUT_WEB) - @${ECHO_MSG} '@unexec ${LOCALBASE}/bin/update-desktop-database > /dev/null || /usr/bin/true' >> ${TMPPLIST} -.endif - -# XXX: put unregistervm into install script ? -post-install: - @${LOCALBASE}/bin/registervm "${PREFIX}/jdk${JDK_VERSION}/bin/java # FREEBSD-JDK${JDK_VERSION}" -.if !defined(WITHOUT_WEB) - @-update-desktop-database -.endif - @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - -.include <bsd.port.post.mk> diff --git a/java/jdk16/distinfo b/java/jdk16/distinfo deleted file mode 100644 index 62c3017af32e..000000000000 --- a/java/jdk16/distinfo +++ /dev/null @@ -1,10 +0,0 @@ -SHA256 (jdk-6u3-fcs-src-b05-jrl-24_sep_2007.jar) = d1c8bd94584cd52818e3a1dc3f03b110b39243d5512504a09c06c51c069d2bf9 -SIZE (jdk-6u3-fcs-src-b05-jrl-24_sep_2007.jar) = 116791442 -SHA256 (jdk-6u3-fcs-bin-b05-jrl-24_sep_2007.jar) = 0bbcc42c1ff7b80d8e3ea5cc07b9a60778fec7a82673b42b3e54bb9a7ab2e9be -SIZE (jdk-6u3-fcs-bin-b05-jrl-24_sep_2007.jar) = 2116124 -SHA256 (jdk-6u3-fcs-mozilla_headers-b05-unix-24_sep_2007.jar) = 336ddba1cd4bc6a94bcd118550c5c7a3a808e4bbe39bb213424ba9883f2009c4 -SIZE (jdk-6u3-fcs-mozilla_headers-b05-unix-24_sep_2007.jar) = 8608204 -SHA256 (bsd-jdk16-patches-4.tar.bz2) = 5dc753bee15676f35b0630f874fdd09e15282144dd4a25cf1222e7c28801f8c6 -SIZE (bsd-jdk16-patches-4.tar.bz2) = 960930 -SHA256 (jce_policy-6.zip) = d0c2258c3364120b4dbf7dd1655c967eee7057ac6ae6334b5ea8ceb8bafb9262 -SIZE (jce_policy-6.zip) = 9101 diff --git a/java/jdk16/files/cacerts b/java/jdk16/files/cacerts Binary files differdeleted file mode 100644 index 12d3aa1b024a..000000000000 --- a/java/jdk16/files/cacerts +++ /dev/null diff --git a/java/jdk16/files/license.sh b/java/jdk16/files/license.sh deleted file mode 100644 index 6da5d5cff597..000000000000 --- a/java/jdk16/files/license.sh +++ /dev/null @@ -1,194 +0,0 @@ -#!/bin/sh -# $FreeBSD: /tmp/pcvs/ports/java/jdk16/files/license.sh,v 1.1 2007-08-14 03:36:15 glewis Exp $ - -# License agreement -more << EOF_LICENSE -JAVA RESEARCH LICENSE -Version 1.6 - - -I. DEFINITIONS. - -"Licensee" means You and any other party that has entered into and has -in effect a version of this License. - -"Modifications" means any change or addition to the Technology. - -"Sun" means Sun Microsystems, Inc. and its successors and assignees. - -"Research Use" means research, evaluation, or development for the -purpose of advancing knowledge, teaching, learning, or customizing the -Technology or Modifications for personal use. Research Use expressly -excludes use or distribution for direct or indirect commercial -(including strategic) gain or advantage. - -"Technology" means the source code and object code of the technology -made available by Sun pursuant to this License. - -"Technology Site" means the website designated by Sun for accessing -the Technology. - -"You" means the individual executing this License or the legal entity -or entities represented by the individual executing this License. - -II. PURPOSE. - -Sun is licensing the Technology under this Java Research License (the -"License") to promote research, education, innovation, and development -using the Technology. This License is not intended to permit or -enable access to the Technology for active consultation as part of -creating an independent implementation of the Technology. - -COMMERCIAL USE AND DISTRIBUTION OF TECHNOLOGY AND MODIFICATIONS IS -PERMITTED ONLY UNDER A SUN COMMERCIAL LICENSE. - -III. RESEARCH USE RIGHTS. - -A. License Grant. Subject to the conditions contained herein, Sun -grants to You a non-exclusive, non-transferable, worldwide, and -royalty-free license to do the following for Your Research Use only: - -1. Reproduce, create Modifications of, and use the Technology -alone, or with Modifications; - -2. Share source code of the Technology alone, or with -Modifications, with other Licensees; and - -3. Distribute object code of the Technology, alone, or with -Modifications, to any third parties for Research Use only, under a -license of Your choice that is consistent with this License; and -publish papers and books discussing the Technology which may include -relevant excerpts that do not in the aggregate constitute a -significant portion of the Technology. - -B. Residual Rights. If You examine the Technology after accepting -this License and remember anything about it later, You are not -"tainted" in a way that would prevent You from creating or -contributing to an independent implementation, but this License grants -You no rights to Sun's copyrights or patents for use in such an -implementation. - -C. No Implied Licenses. Other than the rights granted herein, Sun -retains all rights, title, and interest in Technology, and You retain -all rights, title, and interest in Your Modifications and associated -specifications, subject to the terms of this License. - -D. Third Party Software. Portions of the Technology may be -provided with licenses or other notices from third parties that govern -the use of those portions. Any licenses granted hereunder do not alter -any rights and obligations You may have under such licenses, however, -the disclaimer of warranty and limitation of liability provisions in -this License will apply to all Technology in this distribution. - -IV. INTELLECTUAL PROPERTY REQUIREMENTS - -As a condition to Your License, You agree to comply with the following -restrictions and responsibilities: - -A. License and Copyright Notices. You must include a copy of this -Java Research License in a Readme file for any Technology or -Modifications you distribute. You must also include the following -statement, "Use and distribution of this technology is subject to the -Java Research License included herein", (a) once prominently in the -source code tree and/or specifications for Your source code -distributions, and (b) once in the same file as Your copyright or -proprietary notices for Your binary code distributions. You must cause -any files containing Your Modification to carry prominent notice -stating that You changed the files. You must not remove or alter any -copyright or other proprietary notices in the Technology. - -B. Licensee Exchanges. Any Technology and Modifications You -receive from any Licensee are governed by this License. - -V. GENERAL TERMS. - -A. Disclaimer Of Warranties. - -THE TECHNOLOGY IS PROVIDED "AS IS", WITHOUT WARRANTIES OF ANY KIND, -EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE TECHNOLOGY IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A -PARTICULAR PURPOSE, OR NON-INFRINGING OF THIRD PARTY RIGHTS. YOU -AGREE THAT YOU BEAR THE ENTIRE RISK IN CONNECTION WITH YOUR USE AND -DISTRIBUTION OF ANY AND ALL TECHNOLOGY UNDER THIS LICENSE. - -B. Infringement; Limitation Of Liability. - -1. If any portion of, or functionality implemented by, the -Technology becomes the subject of a claim or threatened claim of -infringement ("Affected Materials"), Sun may, in its unrestricted -discretion, suspend Your rights to use and distribute the Affected -Materials under this License. Such suspension of rights will be -effective immediately upon Sun's posting of notice of suspension on -the Technology Site. - -2. IN NO EVENT WILL SUN BE LIABLE FOR ANY DIRECT, INDIRECT, -PUNITIVE, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES IN CONNECTION -WITH OR ARISING OUT OF THIS LICENSE (INCLUDING, WITHOUT LIMITATION, -LOSS OF PROFITS, USE, DATA, OR ECONOMIC ADVANTAGE OF ANY SORT), -HOWEVER IT ARISES AND ON ANY THEORY OF LIABILITY (including -negligence), WHETHER OR NOT SUN HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. LIABILITY UNDER THIS SECTION V.B.2 SHALL BE SO LIMITED -AND EXCLUDED, NOTWITHSTANDING FAILURE OF THE ESSENTIAL PURPOSE OF ANY -REMEDY. - -C. Termination. - -1. You may terminate this License at any time by notifying Sun in a -writing addressed to Sun Microsystems, Inc., 4150 Network Circle, -Santa Clara, California 95054, Attn.: Legal Department/Products and -Technology Law. - -2. All Your rights will terminate under this License if You fail to -comply with any of its material terms or conditions and do not cure -such failure within thirty (30) days after becoming aware of such -noncompliance. - -3. Upon termination, You must discontinue all uses and distribution -under this agreement, and all provisions of this Section V ("General -Terms") shall survive termination. - -D. Miscellaneous. - - -1. Trademark. You agree to comply with Sun's Trademark & Logo -Usage Requirements, as modified from time to time, available at -http://www.sun.com/policies/trademarks/. Except as expressly provided -in this License, You are granted no rights in or to any Sun trademarks -now or hereafter used or licensed by Sun. - -2. Integration. This License represents the complete agreement of -the parties concerning the subject matter hereof. - -3. Severability. If any provision of this License is held -unenforceable, such provision shall be reformed to the extent -necessary to make it enforceable unless to do so would defeat the -intent of the parties, in which case, this License shall terminate. - -4. Governing Law. This License is governed by the laws of the -United States and the State of California, as applied to contracts -entered into and performed in California between California residents. -In no event shall this License be construed against the drafter. - -5. Export Control. As further described at -http://www.sun.com/its, you agree to comply with the U.S. export -controls and trade laws of other countries that apply to Technology -and Modifications. - -EOF_LICENSE - -agreed= -while [ x$agreed = x ]; do - echo - echo "Do you agree to the above license terms? [yes or no] " - read reply leftover - case $reply in - y* | Y*) - agreed=1 - ;; - n* | n*) - echo - echo "If you don't agree to the license you can't build this software" - exit 1 - ;; - esac -done diff --git a/java/jdk16/files/patch-FloatingDecimal.java b/java/jdk16/files/patch-FloatingDecimal.java deleted file mode 100644 index 6141b18cb7eb..000000000000 --- a/java/jdk16/files/patch-FloatingDecimal.java +++ /dev/null @@ -1,11 +0,0 @@ ---- ../../j2se/src/share/classes/sun/misc/FloatingDecimal.java.orig 2011-02-08 21:47:56.000000000 -0800 -+++ ../../j2se/src/share/classes/sun/misc/FloatingDecimal.java 2011-02-08 21:48:18.000000000 -0800 -@@ -1529,7 +1529,7 @@ - if ( (cmpResult = bigB.cmp( bigD ) ) > 0 ){ - overvalue = true; // our candidate is too big. - diff = bigB.sub( bigD ); -- if ( (bigIntNBits == 1) && (bigIntExp > -expBias) ){ -+ if ( (bigIntNBits == 1) && (bigIntExp > -expBias+1) ){ - // candidate is a normalized exact power of 2 and - // is too big. We will be subtracting. - // For our purposes, ulp is the ulp of the diff --git a/java/jdk16/files/patch-deploy-applications-sun-java.desktop b/java/jdk16/files/patch-deploy-applications-sun-java.desktop deleted file mode 100644 index 74f9f176855a..000000000000 --- a/java/jdk16/files/patch-deploy-applications-sun-java.desktop +++ /dev/null @@ -1,15 +0,0 @@ -$FreeBSD$ - ---- ../../deploy/src/desktop/freedesktop/applications/sun-java.desktop.orig Thu Apr 12 04:55:27 2007 -+++ ../../deploy/src/desktop/freedesktop/applications/sun-java.desktop Wed Jun 13 16:57:20 2007 -@@ -18,8 +18,8 @@ - Encoding=UTF-8 - Name=Java - Comment=Java Virtual Machine --Exec=java -jar --Icon=sun-java.png -+Exec=%%PREFIX%%/jdk%%JDK_VERSION%%/bin/java -jar -+Icon=%%PREFIX%%/jdk%%JDK_VERSION%%/jre/lib/desktop/icons/hicolor/48x48/apps/sun-java.png - Terminal=false - Type=Application - NoDisplay=true diff --git a/java/jdk16/files/patch-deploy-applications-sun-javaws.desktop b/java/jdk16/files/patch-deploy-applications-sun-javaws.desktop deleted file mode 100644 index 905ac89a8790..000000000000 --- a/java/jdk16/files/patch-deploy-applications-sun-javaws.desktop +++ /dev/null @@ -1,15 +0,0 @@ -$FreeBSD$ - ---- ../../deploy/src/desktop/freedesktop/applications/sun-javaws.desktop.orig Thu Apr 12 04:55:27 2007 -+++ ../../deploy/src/desktop/freedesktop/applications/sun-javaws.desktop Wed Jun 13 16:58:15 2007 -@@ -15,8 +15,8 @@ - Encoding=UTF-8 - Name=JavaWS - Comment=Java Web Start --Exec=javaws --Icon=sun-javaws.png -+Exec=%%PREFIX%%/jdk%%JDK_VERSION%%/bin/javaws -+Icon=%%PREFIX%%/jdk%%JDK_VERSION%%/jre/lib/desktop/icons/hicolor/48x48/apps/sun-javaws.png - Terminal=false - Type=Application - NoDisplay=true diff --git a/java/jdk16/files/patch-deploy-common-Defs-bsd.gmk b/java/jdk16/files/patch-deploy-common-Defs-bsd.gmk deleted file mode 100644 index e67d96183378..000000000000 --- a/java/jdk16/files/patch-deploy-common-Defs-bsd.gmk +++ /dev/null @@ -1,15 +0,0 @@ -$FreeBSD$ - ---- ../../deploy/make/common/Defs-bsd.gmk.orig Sun Jul 29 23:03:29 2007 -+++ ../../deploy/make/common/Defs-bsd.gmk Sun Jul 29 23:03:29 2007 -@@ -23,8 +23,8 @@ - JUMP_EXE = $(BIN_DIR)/javaws - CLASSPATH_SEP = $(CLASSPATH_SEPARATOR) - PATH_SEP = / --X11DIR = /usr/X11R6 --LOCALDIR = /usr/local -+X11DIR = ${LOCALBASE} -+LOCALDIR = ${LOCALBASE} - ifneq ($(OS_VENDOR), NetBSD) - LIBS = -L$(X11DIR)/lib -lX11 -L$(LOCALDIR)/lib -liconv - else diff --git a/java/jdk16/files/patch-deploy-controlpanel-sun_java.desktop b/java/jdk16/files/patch-deploy-controlpanel-sun_java.desktop deleted file mode 100644 index 2d0908e7aa0d..000000000000 --- a/java/jdk16/files/patch-deploy-controlpanel-sun_java.desktop +++ /dev/null @@ -1,15 +0,0 @@ -$FreeBSD$ - ---- ../../deploy/src/plugin/solaris/controlpanel/sun_java.desktop.orig Wed Jun 13 16:44:31 2007 -+++ ../../deploy/src/plugin/solaris/controlpanel/sun_java.desktop Wed Jun 13 16:59:32 2007 -@@ -15,8 +15,8 @@ - Encoding=UTF-8 - Name=Java - Comment=Java Control Panel --Exec=jcontrol --Icon=sun-jcontrol.png -+Exec=%%PREFIX%%/jdk%%JDK_VERSION%%/bin/jcontrol -+Icon=%%PREFIX%%/jdk%%JDK_VERSION%%/jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png - Terminal=false - Type=Application - Categories=Application;Settings;Java; diff --git a/java/jdk16/files/patch-deploy-jvmexec-Makefile b/java/jdk16/files/patch-deploy-jvmexec-Makefile deleted file mode 100644 index 0b5f4ec4702d..000000000000 --- a/java/jdk16/files/patch-deploy-jvmexec-Makefile +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../deploy/make/plugin/jvmexec/Makefile.orig Sun Jul 29 23:03:30 2007 -+++ ../../deploy/make/plugin/jvmexec/Makefile Sun Jul 29 23:03:30 2007 -@@ -22,7 +22,7 @@ - endif - - ifeq ($(PLATFORM), bsd) --LDLIBS = -pthread -+LDLIBS = ${PTHREAD_LIBS} - endif - - vpath %.cpp $(SRCDIR) diff --git a/java/jdk16/files/patch-deploy-jvmnative-Makefile b/java/jdk16/files/patch-deploy-jvmnative-Makefile deleted file mode 100644 index 5276288296da..000000000000 --- a/java/jdk16/files/patch-deploy-jvmnative-Makefile +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../deploy/make/plugin/jvmnative/Makefile.orig Sun Jul 29 23:03:29 2007 -+++ ../../deploy/make/plugin/jvmnative/Makefile Sun Jul 29 23:03:29 2007 -@@ -14,7 +14,7 @@ - - include $(DEPLOY_TOPDIR)/make/plugin/common/Defs.gmk - --X11DIR = /usr/X11R6 -+X11DIR = ${LOCALBASE} - - ifeq ($(PLATFORM), bsd) - LDLIBS = -L$(X11DIR)/lib -lX11 diff --git a/java/jdk16/files/patch-deploy-oji-adapter-Makefile b/java/jdk16/files/patch-deploy-oji-adapter-Makefile deleted file mode 100644 index 9a9156495e58..000000000000 --- a/java/jdk16/files/patch-deploy-oji-adapter-Makefile +++ /dev/null @@ -1,21 +0,0 @@ -$FreeBSD$ ---- ../../deploy/make/plugin/adapter/oji-adapter/Makefile.orig Sun Jul 29 23:03:29 2007 -+++ ../../deploy/make/plugin/adapter/oji-adapter/Makefile Sun Jul 29 23:03:29 2007 -@@ -44,7 +44,7 @@ - LIB_LOCATION=$(OUTPUTDIR)/plugin/$(LIBARCH)/ns7 - dummy:=$(shell $(MKDIR) -p $(LIB_LOCATION)) - --X11DIR = /usr/X11R6 -+X11DIR = ${LOCALBASE} - - ifeq ($(PLATFORM), solaris) - LDLIBS = -lX11 -ldl -lCrun -lc -@@ -60,7 +60,7 @@ - - ifeq ($(PLATFORM), bsd) - JNIDIR = $(OUTPUTDIR)/include/$(OS_NAME) --INTLDIR = /usr/local -+INTLDIR = ${LOCALBASE} - INTLHDRDIR = $(INTLDIR)/include - else - JNIDIR = $(OUTPUTDIR)/include/$(PLATFORM) diff --git a/java/jdk16/files/patch-deploy-plugin-common-Defs-bsd.gmk b/java/jdk16/files/patch-deploy-plugin-common-Defs-bsd.gmk deleted file mode 100644 index bed54a9c579e..000000000000 --- a/java/jdk16/files/patch-deploy-plugin-common-Defs-bsd.gmk +++ /dev/null @@ -1,10 +0,0 @@ -$FreeBSD$ - ---- ../../deploy/make/plugin/common/Defs-bsd.gmk.orig Sun Jul 29 23:03:29 2007 -+++ ../../deploy/make/plugin/common/Defs-bsd.gmk Sun Jul 29 23:03:29 2007 -@@ -34,4 +34,4 @@ - - PLUGIN_PLATFORM_SRC := $(DEPLOY_TOPDIR)/src/plugin/solaris - --OTHER_LDFLAGS = -L/usr/X11R6/lib -+OTHER_LDFLAGS = -L${LOCALBASE}/lib diff --git a/java/jdk16/files/patch-deploy-unix-Makefile b/java/jdk16/files/patch-deploy-unix-Makefile deleted file mode 100644 index 81ab95c41ea8..000000000000 --- a/java/jdk16/files/patch-deploy-unix-Makefile +++ /dev/null @@ -1,22 +0,0 @@ -$FreeBSD$ - ---- ../../deploy/make/plugin/nscore/unix/Makefile.orig Sun Jul 29 23:03:29 2007 -+++ ../../deploy/make/plugin/nscore/unix/Makefile Sun Jul 29 23:03:29 2007 -@@ -16,7 +16,7 @@ - - include $(DEPLOY_TOPDIR)/make/plugin/common/Defs.gmk - --X11DIR = /usr/X11R6 -+X11DIR = ${LOCALBASE} - - ifeq ($(PLATFORM), linux) - LDLIBS = -lX11 -ldl -lc -@@ -34,7 +34,7 @@ - endif - - ifeq ($(PLATFORM), bsd) --INTLDIR = /usr/local -+INTLDIR = ${LOCALBASE} - INTLHDRDIR = $(INTLDIR)/include - else - INTLHDRDIR = diff --git a/java/jdk16/files/patch-hotspot-make-jprt.config b/java/jdk16/files/patch-hotspot-make-jprt.config deleted file mode 100644 index 87363f764378..000000000000 --- a/java/jdk16/files/patch-hotspot-make-jprt.config +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../hotspot/make/jprt.config.orig Sun Jul 29 23:03:30 2007 -+++ ../../hotspot/make/jprt.config Sun Jul 29 23:03:30 2007 -@@ -158,7 +158,7 @@ - if [ "${osname}" = "NetBSD" ] ; then - make=/usr/pkg/bin/gmake - else -- make=/usr/local/bin/gmake -+ make=%%LOCALBASE%%/bin/gmake - fi - fileMustExist "${make}" make - diff --git a/java/jdk16/files/patch-hotspot-makefiles-gcc.make b/java/jdk16/files/patch-hotspot-makefiles-gcc.make deleted file mode 100644 index 41247e05879a..000000000000 --- a/java/jdk16/files/patch-hotspot-makefiles-gcc.make +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../hotspot/build/bsd/makefiles/gcc.make.orig Tue Feb 12 22:24:15 2008 -+++ ../../hotspot/build/bsd/makefiles/gcc.make Tue Feb 12 22:24:28 2008 -@@ -46,7 +46,7 @@ - CFLAGS += -fno-exceptions - - ifneq (Darwin, $(UNAME.s)) --CFLAGS += -pthread -+CFLAGS += ${PTHREAD_LIBS} - endif - - CFLAGS += -fcheck-new diff --git a/java/jdk16/files/patch-hotspot-makefiles-jsig.make b/java/jdk16/files/patch-hotspot-makefiles-jsig.make deleted file mode 100644 index 2a180c07d472..000000000000 --- a/java/jdk16/files/patch-hotspot-makefiles-jsig.make +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../hotspot/build/bsd/makefiles/jsig.make.orig Sat Feb 16 09:16:41 2008 -+++ ../../hotspot/build/bsd/makefiles/jsig.make Sat Feb 16 09:17:01 2008 -@@ -30,7 +30,7 @@ - LFLAGS_JSIG += -D_GNU_SOURCE - - ifneq (Darwin, $(UNAME.s)) -- LFLAGS_JSIG += -pthread -+ LFLAGS_JSIG += ${PTHREAD_LIBS} - endif - - $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) diff --git a/java/jdk16/files/patch-hotspot-makefiles-vm.make b/java/jdk16/files/patch-hotspot-makefiles-vm.make deleted file mode 100644 index 2926c6c91b18..000000000000 --- a/java/jdk16/files/patch-hotspot-makefiles-vm.make +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../hotspot/build/bsd/makefiles/vm.make.orig Sat Feb 16 10:44:36 2008 -+++ ../../hotspot/build/bsd/makefiles/vm.make Sat Feb 16 10:45:02 2008 -@@ -70,7 +70,7 @@ - LIBS += -lm - - ifneq (Darwin, $(UNAME.s)) --LIBS += -pthread -+LIBS += ${PTHREAD_LIBS} - endif - - # By default, link the *.o into the library, not the executable. diff --git a/java/jdk16/files/patch-hotspot-utilities-vmError.cpp b/java/jdk16/files/patch-hotspot-utilities-vmError.cpp deleted file mode 100644 index c94de2102616..000000000000 --- a/java/jdk16/files/patch-hotspot-utilities-vmError.cpp +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD: /tmp/pcvs/ports/java/jdk16/files/patch-hotspot-utilities-vmError.cpp,v 1.1 2008-05-03 15:49:27 glewis Exp $ - ---- ../../hotspot/src/share/vm/utilities/vmError.cpp.orig 2008-04-12 13:56:26.000000000 +0300 -+++ ../../hotspot/src/share/vm/utilities/vmError.cpp 2008-04-12 14:26:42.728926827 +0300 -@@ -269,7 +269,7 @@ - st->print("# java.lang.OutOfMemoryError: "); - if (_size) { - st->print("requested "); -- sprintf(buf,"%ld",_size); -+ sprintf(buf,"%zu",_size); - st->print(buf); - st->print(" bytes"); - if (_message != NULL) { diff --git a/java/jdk16/files/patch-hotspot-vm-attachListener_bsd.cpp b/java/jdk16/files/patch-hotspot-vm-attachListener_bsd.cpp deleted file mode 100644 index 09c545a2510a..000000000000 --- a/java/jdk16/files/patch-hotspot-vm-attachListener_bsd.cpp +++ /dev/null @@ -1,98 +0,0 @@ -$FreeBSD$ - ---- ../../hotspot/src/os/bsd/vm/attachListener_bsd.cpp 28 Mar 2007 04:52:28 -0000 1.1 -+++ ../../hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2 Feb 2009 00:30:06 -0000 -@@ -163,24 +163,11 @@ - struct sockaddr_un addr; - addr.sun_family = AF_UNIX; - -- // FIXME: Prior to b39 the tool-side API expected to find the well -- // known file in the working directory. To allow this libjvm.so work with -- // a pre-b39 SDK we create it in the working directory if -- // +StartAttachListener is used is used. All unit tests for this feature -- // currently used this flag. Once b39 SDK has been promoted we can remove -- // this code. -- if (StartAttachListener) { -- sprintf(path, ".java_pid%d", os::current_process_id()); -- strcpy(addr.sun_path, path); -- ::unlink(path); -- res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr)); -- } -- if (res == -1) { -- sprintf(path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id()); -- strcpy(addr.sun_path, path); -- ::unlink(path); -- res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr)); -- } -+ sprintf(path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id()); -+ strcpy(addr.sun_path, path); -+ ::unlink(path); -+ res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr)); -+ - if (res == -1) { - RESTARTABLE(::close(listener), res); - return -1; -@@ -188,7 +175,7 @@ - set_path(path); - - // put in listen mode and set permission -- if ((::listen(listener, 5) == -1) || (::chmod(path, S_IREAD|S_IWRITE) == -1)) { -+ if ((::listen(listener, 5) == -1) || (::chmod(path, S_IREAD|S_IWRITE) == -1) || (::chown(path,geteuid(),getegid()) == -1)) { - RESTARTABLE(::close(listener), res); - ::unlink(path); - set_path(NULL); -@@ -264,19 +251,19 @@ - } - - // parse request -- -+ - ArgumentIterator args(buf, (max_len)-left); - - // version already checked - char* v = args.next(); -- -+ - char* name = args.next(); - if (name == NULL || strlen(name) > AttachOperation::name_length_max) { - return NULL; - } - - BsdAttachOperation* op = new BsdAttachOperation(name); -- -+ - for (int i=0; i<AttachOperation::arg_count_max; i++) { - char* arg = args.next(); - if (arg == NULL) { -@@ -376,7 +363,7 @@ - // default send buffer is sufficient to buffer everything. In the future - // if there are operations that involves a very big reply then it the - // socket could be made non-blocking and a timeout could be used. -- -+ - void BsdAttachOperation::complete(jint result, bufferedStream* st) { - JavaThread* thread = JavaThread::current(); - ThreadBlockInVM tbivm(thread); -@@ -456,15 +443,15 @@ - if (init_at_startup() || is_initialized()) { - return false; // initialized at startup or already initialized - } -- char fn[32]; -- sprintf(fn, ".attach_pid%d", os::current_process_id()); -+ char path[PATH_MAX+1]; // socket file - int ret; - struct stat st; -- RESTARTABLE(::stat(fn, &st), ret); -- if (ret == -1) { -- sprintf(fn, "/tmp/.attach_pid%d", os::current_process_id()); -- RESTARTABLE(::stat(fn, &st), ret); -- } -+ -+ sprintf(path, "%s/.attach_pid%d", os::get_temp_directory(), os::current_process_id()); -+ fprintf(stdout, "Received SIGQUIT, looking for %s\n", path); -+ -+ RESTARTABLE(::stat(path, &st), ret); -+ - if (ret == 0) { - // simple check to avoid starting the attach mechanism when - // a bogus user creates the file diff --git a/java/jdk16/files/patch-hotspot-vm-os_bsd.cpp b/java/jdk16/files/patch-hotspot-vm-os_bsd.cpp deleted file mode 100644 index 850a4a1dd324..000000000000 --- a/java/jdk16/files/patch-hotspot-vm-os_bsd.cpp +++ /dev/null @@ -1,27 +0,0 @@ -$FreeBSD$ - ---- ../../hotspot/src/os/bsd/vm/os_bsd.cpp.orig Wed Jun 13 16:16:36 2007 -+++ ../../hotspot/src/os/bsd/vm/os_bsd.cpp Wed Jun 13 16:36:13 2007 -@@ -364,7 +364,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" -@@ -1431,10 +1431,10 @@ - void os::Bsd::clock_init() { - struct timespec res; - struct timespec tp; -- if (clock_getres(CLOCK_MONOTONIC, &res) == 0 && -- clock_gettime(CLOCK_MONOTONIC, &tp) == 0) { -+ if (::clock_getres(CLOCK_MONOTONIC, &res) == 0 && -+ ::clock_gettime(CLOCK_MONOTONIC, &tp) == 0) { - // yes, monotonic clock is supported -- _clock_gettime = clock_gettime; -+ _clock_gettime = ::clock_gettime; - } - } - #else diff --git a/java/jdk16/files/patch-j2se-X11-XToolkit.java b/java/jdk16/files/patch-j2se-X11-XToolkit.java deleted file mode 100644 index f63c8114e1e9..000000000000 --- a/java/jdk16/files/patch-j2se-X11-XToolkit.java +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/solaris/classes/sun/awt/X11/XToolkit.java.orig 2008-05-15 21:06:11.000000000 +0200 -+++ ../../j2se/src/solaris/classes/sun/awt/X11/XToolkit.java 2008-05-15 21:07:17.000000000 +0200 -@@ -858,7 +858,7 @@ - - public boolean isTraySupported() { - int wm = XWM.getWMID(); -- if (wm == XWM.METACITY_WM || wm == XWM.KDE2_WM) -+ if (wm == XWM.METACITY_WM || wm == XWM.KDE2_WM || wm == XWM.ENLIGHTEN_WM) - { - return true; - } diff --git a/java/jdk16/files/patch-j2se-attach-BSDAttachProvider.java b/java/jdk16/files/patch-j2se-attach-BSDAttachProvider.java deleted file mode 100644 index fa3c3e31c0af..000000000000 --- a/java/jdk16/files/patch-j2se-attach-BSDAttachProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/solaris/classes/sun/tools/attach/BSDAttachProvider.java 10 May 2007 05:38:51 -0000 1.1 -+++ ../../j2se/src/solaris/classes/sun/tools/attach/BSDAttachProvider.java 2 Feb 2009 00:27:30 -0000 -@@ -14,7 +14,7 @@ - import java.io.IOException; - - /* -- * An AttachProvider implementation for Linux that uses a UNIX domain -+ * An AttachProvider implementation for BSD that uses a UNIX domain - * socket. - */ - public class BSDAttachProvider extends HotSpotAttachProvider { -@@ -36,12 +36,28 @@ - public VirtualMachine attachVirtualMachine(String vmid) - throws AttachNotSupportedException, IOException - { -- throw new AttachNotSupportedException("Attach not yet supported on BSD"); -+ if (isNotAttachable(vmid)) { -+ throw new AttachNotSupportedException("can only attach to Java SE 6.0 or newer"); -+ } -+ return new BSDVirtualMachine(this, vmid); - } - - public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd) - throws AttachNotSupportedException, IOException - { -- throw new AttachNotSupportedException("Attach not yet supported on BSD"); -+ if (vmd.provider() != this) { -+ throw new AttachNotSupportedException("provider mismatch"); -+ } -+ // To avoid re-checking if the VM if attachable, we check if the descriptor -+ // is for a hotspot VM - these descriptors are created by the listVirtualMachines -+ // implementation which only returns a list of attachable VMs. -+ if (vmd instanceof HotSpotVirtualMachineDescriptor) { -+ assert ((HotSpotVirtualMachineDescriptor)vmd).isAttachable(); -+ checkAttachPermission(); -+ return new BSDVirtualMachine(this, vmd.id()); -+ } else { -+ return attachVirtualMachine(vmd.id()); -+ } - } -+ - } diff --git a/java/jdk16/files/patch-j2se-attach-BSDVirtualMachine.c b/java/jdk16/files/patch-j2se-attach-BSDVirtualMachine.c deleted file mode 100644 index 19af8e6e6219..000000000000 --- a/java/jdk16/files/patch-j2se-attach-BSDVirtualMachine.c +++ /dev/null @@ -1,286 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/solaris/native/sun/tools/attach/BSDVirtualMachine.c 11 Oct 2007 02:59:31 -0000 1.2 -+++ ../../j2se/src/solaris/native/sun/tools/attach/BSDVirtualMachine.c 2 Feb 2009 00:29:22 -0000 -@@ -1 +1,280 @@ --/* empty file for now */ -+/* -+ * @(#)BSDVirtualMachine.c 1.8 05/11/21 -+ * -+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved. -+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. -+ */ -+ -+#include "jni.h" -+#include "jni_util.h" -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <errno.h> -+#include <unistd.h> -+#include <signal.h> -+#include <dirent.h> -+#include <ctype.h> -+#include <sys/types.h> -+#include <sys/types.h> -+#include <sys/socket.h> -+#include <sys/stat.h> -+#include <sys/un.h> -+#include <sys/vnode.h> -+#include <sys/user.h> -+#include <sys/sysctl.h> -+#include <fcntl.h> -+ -+#include "sun_tools_attach_BSDVirtualMachine.h" -+ -+#define RESTARTABLE(_cmd, _result) do { \ -+ do { \ -+ _result = _cmd; \ -+ } while((_result == -1) && (errno == EINTR)); \ -+} while(0) -+ -+/* -+ * Class: sun_tools_attach_BSDVirtualMachine -+ * Method: socket -+ * Signature: ()I -+ */ -+JNIEXPORT jint JNICALL Java_sun_tools_attach_BSDVirtualMachine_socket -+ (JNIEnv *env, jclass cls) -+{ -+ int fd = socket(PF_UNIX, SOCK_STREAM, 0); -+ if (fd == -1) { -+ JNU_ThrowIOExceptionWithLastError(env, "socket"); -+ } -+ return (jint)fd; -+} -+ -+/* -+ * Class: sun_tools_attach_BSDVirtualMachine -+ * Method: connect -+ * Signature: (ILjava/lang/String;)I -+ */ -+JNIEXPORT void JNICALL Java_sun_tools_attach_BSDVirtualMachine_connect -+ (JNIEnv *env, jclass cls, jint fd, jstring path) -+{ -+ jboolean isCopy; -+ const char* p = GetStringPlatformChars(env, path, &isCopy); -+ if (p != NULL) { -+ struct sockaddr_un addr; -+ int err = 0; -+ -+ addr.sun_family = AF_UNIX; -+ strcpy(addr.sun_path, p); -+ -+ if (connect(fd, (struct sockaddr*)&addr, sizeof(addr)) == -1) { -+ err = errno; -+ } -+ -+ if (isCopy) { -+ JNU_ReleaseStringPlatformChars(env, path, p); -+ } -+ -+ /* -+ * If the connect failed then we throw the appropriate exception -+ * here (can't throw it before releasing the string as can't call -+ * JNI with pending exception) -+ */ -+ if (err != 0) { -+ if (err == ENOENT) { -+ JNU_ThrowByName(env, "java/io/FileNotFoundException", NULL); -+ } else { -+ char* msg = strdup(strerror(err)); -+ JNU_ThrowIOException(env, msg); -+ if (msg != NULL) { -+ free(msg); -+ } -+ } -+ } -+ } -+} -+ -+ -+/* -+ * Class: sun_tools_attach_BSDVirtualMachine -+ * Method: sendQuitTo -+ * Signature: (I)V -+ */ -+JNIEXPORT void JNICALL Java_sun_tools_attach_BSDVirtualMachine_sendQuitTo -+ (JNIEnv *env, jclass cls, jint pid) -+{ -+ if (kill((pid_t)pid, SIGQUIT)) { -+ JNU_ThrowIOExceptionWithLastError(env, "kill"); -+ } -+} -+ -+/* -+ * Class: sun_tools_attach_BSDVirtualMachine -+ * Method: checkPermissions -+ * Signature: (Ljava/lang/String;)V -+ */ -+JNIEXPORT void JNICALL Java_sun_tools_attach_BSDVirtualMachine_checkPermissions -+ (JNIEnv *env, jclass cls, jstring path) -+{ -+ jboolean isCopy; -+ const char* p = GetStringPlatformChars(env, path, &isCopy); -+ if (p != NULL) { -+ struct stat sb; -+ uid_t uid, gid; -+ int res; -+ -+ /* -+ * Check that the path is owned by the effective uid/gid of this -+ * process. Also check that group/other access is not allowed. -+ */ -+ uid = geteuid(); -+ gid = getegid(); -+ -+ res = stat(p, &sb); -+ if (res != 0) { -+ /* save errno */ -+ res = errno; -+ } -+ -+ /* release p here before we throw an I/O exception */ -+ if (isCopy) { -+ JNU_ReleaseStringPlatformChars(env, path, p); -+ } -+ -+ if (res == 0) { -+ if ( (sb.st_uid != uid) || (sb.st_gid != gid) || -+ ((sb.st_mode & (S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) != 0) ) { -+ JNU_ThrowIOException(env, "well-known file is not secure"); -+ } -+ } else { -+ char* msg = strdup(strerror(res)); -+ JNU_ThrowIOException(env, msg); -+ if (msg != NULL) { -+ free(msg); -+ } -+ } -+ } -+} -+ -+/* -+ * Class: sun_tools_attach_BSDVirtualMachine -+ * Method: close -+ * Signature: (I)V -+ */ -+JNIEXPORT void JNICALL Java_sun_tools_attach_BSDVirtualMachine_close -+ (JNIEnv *env, jclass cls, jint fd) -+{ -+ int res; -+ RESTARTABLE(close(fd), res); -+} -+ -+/* -+ * Class: sun_tools_attach_BSDVirtualMachine -+ * Method: read -+ * Signature: (I[BI)I -+ */ -+JNIEXPORT jint JNICALL Java_sun_tools_attach_BSDVirtualMachine_read -+ (JNIEnv *env, jclass cls, jint fd, jbyteArray ba, jint off, jint baLen) -+{ -+ unsigned char buf[128]; -+ size_t len = sizeof(buf); -+ ssize_t n; -+ -+ size_t remaining = (size_t)(baLen - off); -+ if (len > remaining) { -+ len = remaining; -+ } -+ -+ RESTARTABLE(read(fd, buf+off, len), n); -+ if (n == -1) { -+ JNU_ThrowIOExceptionWithLastError(env, "read"); -+ } else { -+ if (n == 0) { -+ n = -1; // EOF -+ } else { -+ (*env)->SetByteArrayRegion(env, ba, off, (jint)n, (jbyte *)(buf+off)); -+ } -+ } -+ return n; -+} -+ -+/* -+ * Class: sun_tools_attach_BSDVirtualMachine -+ * Method: write -+ * Signature: (I[B)V -+ */ -+JNIEXPORT void JNICALL Java_sun_tools_attach_BSDVirtualMachine_write -+ (JNIEnv *env, jclass cls, jint fd, jbyteArray ba, jint off, jint bufLen) -+{ -+ size_t remaining = bufLen; -+ do { -+ unsigned char buf[128]; -+ size_t len = sizeof(buf); -+ int n; -+ -+ if (len > remaining) { -+ len = remaining; -+ } -+ (*env)->GetByteArrayRegion(env, ba, off, len, (jbyte *)buf); -+ -+ RESTARTABLE(write(fd, buf, len), n); -+ if (n > 0) { -+ off += n; -+ remaining -= n; -+ } else { -+ JNU_ThrowIOExceptionWithLastError(env, "write"); -+ return; -+ } -+ -+ } while (remaining > 0); -+} -+ -+/* -+ * Class: sun_tools_attach_BSDVirtualMachine -+ * Method: createAttachFile -+ * Signature: (Ljava.lang.String;)V -+ */ -+JNIEXPORT void JNICALL Java_sun_tools_attach_BSDVirtualMachine_createAttachFile(JNIEnv *env, jclass cls, jstring path) -+{ -+ const char* _path; -+ jboolean isCopy; -+ -+ _path = GetStringPlatformChars(env, path, &isCopy); -+ if (_path == NULL) { -+ JNU_ThrowIOException(env, "Must specify a path"); -+ return; -+ } -+ -+ -+ // Consider error handling -+ int fd = -1; -+ RESTARTABLE(open(_path, O_CREAT | O_EXCL, S_IWUSR | S_IRUSR), fd); -+ -+ -+ -+ if (fd == -1) { -+ /* release p here before we throw an I/O exception */ -+ if (isCopy) { -+ JNU_ReleaseStringPlatformChars(env, path, _path); -+ } -+ JNU_ThrowIOExceptionWithLastError(env, "open"); -+ return; -+ } -+ -+ int chown_rc = -1; -+ RESTARTABLE(chown(_path, geteuid(), getegid()), chown_rc); -+ -+ /* release p here before we throw an I/O exception */ -+ if (isCopy) { -+ JNU_ReleaseStringPlatformChars(env, path, _path); -+ } -+ -+ int close_rc = -1; -+ RESTARTABLE(close(fd),close_rc); -+ -+ if (chown_rc == -1) { -+ JNU_ThrowIOExceptionWithLastError(env, "chown"); -+ } -+ if (close_rc == -1) { -+ JNU_ThrowIOExceptionWithLastError(env, "close"); -+ } -+} diff --git a/java/jdk16/files/patch-j2se-attach-BSDVirtualMachine.java b/java/jdk16/files/patch-j2se-attach-BSDVirtualMachine.java deleted file mode 100644 index 0205f5fa8f46..000000000000 --- a/java/jdk16/files/patch-j2se-attach-BSDVirtualMachine.java +++ /dev/null @@ -1,297 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/solaris/classes/sun/tools/attach/BSDVirtualMachine.java 2 Feb 2009 00:28:15 -0000 -+++ ../../j2se/src/solaris/classes/sun/tools/attach/BSDVirtualMachine.java 2 Feb 2009 00:28:15 -0000 -@@ -0,0 +1,292 @@ -+/* -+ * @(#)BSDVirtualMachine.java 1.8 06/03/05 -+ * -+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved. -+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. -+ */ -+package sun.tools.attach; -+ -+import com.sun.tools.attach.VirtualMachine; -+import com.sun.tools.attach.AgentLoadException; -+import com.sun.tools.attach.AttachNotSupportedException; -+import com.sun.tools.attach.spi.AttachProvider; -+import java.io.InputStream; -+import java.io.IOException; -+import java.io.File; -+import java.util.Properties; -+ -+/* -+ * BSD implementation of HotSpotVirtualMachine -+ */ -+public class BSDVirtualMachine extends HotSpotVirtualMachine { -+ -+ /** -+ * Hard-coded "/tmp" to match the hotspot bsd implementation -+ * hotspot/src/os/bsd/vm/os_bsd.cpp: -+ * const char* os::get_temp_directory() { return "/tmp/"; } -+ */ -+ private static String getTmpDir() { -+ return "/tmp/"; -+ } -+ -+ -+ String path; -+ -+ /** -+ * Attaches to the target VM -+ */ -+ BSDVirtualMachine(AttachProvider provider, String vmid) -+ throws AttachNotSupportedException, IOException -+ { -+ super(provider, vmid); -+ -+ // This provider only understands pids -+ int pid; -+ try { -+ pid = Integer.parseInt(vmid); -+ } catch (NumberFormatException x) { -+ throw new AttachNotSupportedException("Invalid process identifier"); -+ } -+ -+ // Find the socket file. If not found then we attempt to start the -+ // attach mechanism in the target VM by sending it a QUIT signal. -+ // Then we attempt to find the socket file again. -+ path = findSocketFile(pid); -+ if (path == null) { -+ -+ String fn = ".attach_pid" + pid; -+ path = getTmpDir() + fn; -+ File attachFile = new File(path); -+ createAttachFile(path); -+ try { -+ sendQuitTo(pid); -+ -+ // give the target VM time to start the attach mechanism -+ int i = 0; -+ long delay = 200; -+ int retries = (int)(attachTimeout() / delay); -+ do { -+ try { -+ Thread.sleep(delay); -+ } catch (InterruptedException x) { } -+ path = findSocketFile(pid); -+ i++; -+ } while (i <= retries && path == null); -+ if (path == null) { -+ throw new AttachNotSupportedException( -+ "Unable to open socket file: target process not responding " + -+ "or HotSpot VM not loaded"); -+ } -+ } finally { -+ attachFile.delete(); -+ } -+ } -+ -+ // Check that the file owner/permission to avoid attaching to -+ // bogus process -+ checkPermissions(path); -+ -+ // Check that we can connect to the process -+ // - this ensures we throw the permission denied error now rather than -+ // later when we attempt to enqueue a command. -+ int s = socket(); -+ try { -+ connect(s, path); -+ } finally { -+ close(s); -+ } -+ } -+ -+ /** -+ * Detach from the target VM -+ */ -+ public void detach() throws IOException { -+ synchronized (this) { -+ if (this.path != null) { -+ this.path = null; -+ } -+ } -+ } -+ -+ // protocol version -+ private final static String PROTOCOL_VERSION = "1"; -+ -+ // known errors -+ private final static int ATTACH_ERROR_BADVERSION = 101; -+ -+ /** -+ * Execute the given command in the target VM. -+ */ -+ InputStream execute(String cmd, Object ... args) throws AgentLoadException, IOException { -+ assert args.length <= 3; // includes null -+ -+ // did we detach? -+ String p; -+ synchronized (this) { -+ if (this.path == null) { -+ throw new IOException("Detached from target VM"); -+ } -+ p = this.path; -+ } -+ -+ // create UNIX socket -+ int s = socket(); -+ -+ // connect to target VM -+ try { -+ connect(s, p); -+ } catch (IOException x) { -+ close(s); -+ throw x; -+ } -+ -+ IOException ioe = null; -+ -+ // connected - write request -+ // <ver> <cmd> <args...> -+ try { -+ writeString(s, PROTOCOL_VERSION); -+ writeString(s, cmd); -+ -+ for (int i=0; i<3; i++) { -+ if (i < args.length && args[i] != null) { -+ writeString(s, (String)args[i]); -+ } else { -+ writeString(s, ""); -+ } -+ } -+ } catch (IOException x) { -+ ioe = x; -+ } -+ -+ -+ // Create an input stream to read reply -+ SocketInputStream sis = new SocketInputStream(s); -+ -+ // Read the command completion status -+ int completionStatus; -+ try { -+ completionStatus = readInt(sis); -+ } catch (IOException x) { -+ sis.close(); -+ if (ioe != null) { -+ throw ioe; -+ } else { -+ throw x; -+ } -+ } -+ -+ if (completionStatus != 0) { -+ sis.close(); -+ -+ // In the event of a protocol mismatch then the target VM -+ // returns a known error so that we can throw a reasonable -+ // error. -+ if (completionStatus == ATTACH_ERROR_BADVERSION) { -+ throw new IOException("Protocol mismatch with target VM"); -+ } -+ -+ // Special-case the "load" command so that the right exception is -+ // thrown. -+ if (cmd.equals("load")) { -+ throw new AgentLoadException("Failed to load agent library"); -+ } else { -+ throw new IOException("Command failed in target VM"); -+ } -+ } -+ -+ // Return the input stream so that the command output can be read -+ return sis; -+ } -+ -+ /* -+ * InputStream for the socket connection to get target VM -+ */ -+ private class SocketInputStream extends InputStream { -+ int s; -+ -+ public SocketInputStream(int s) { -+ this.s = s; -+ } -+ -+ public synchronized int read() throws IOException { -+ byte b[] = new byte[1]; -+ int n = this.read(b, 0, 1); -+ if (n == 1) { -+ return b[0] & 0xff; -+ } else { -+ return -1; -+ } -+ } -+ -+ public synchronized int read(byte[] bs, int off, int len) throws IOException { -+ if ((off < 0) || (off > bs.length) || (len < 0) || -+ ((off + len) > bs.length) || ((off + len) < 0)) { -+ throw new IndexOutOfBoundsException(); -+ } else if (len == 0) -+ return 0; -+ -+ return BSDVirtualMachine.read(s, bs, off, len); -+ } -+ -+ public void close() throws IOException { -+ BSDVirtualMachine.close(s); -+ } -+ } -+ -+ -+ // Return the socket file for the given process. -+ // Checks working directory of process for .java_pid<pid>. If not -+ // found it looks in /tmp. -+ private String findSocketFile(int pid) { -+ // First check for a .java_pid<pid> file in the working directory -+ // of the target process -+ String fn = ".java_pid" + pid; -+ String path = getTmpDir() + fn; -+ File f = new File(path); -+ -+ if (!f.exists()) { -+ return null; // not found -+ } -+ return path; -+ } -+ -+ /* -+ * Write/sends the given to the target VM. String is transmitted in -+ * UTF-8 encoding. -+ */ -+ private void writeString(int fd, String s) throws IOException { -+ if (s.length() > 0) { -+ byte b[]; -+ try { -+ b = s.getBytes("UTF-8"); -+ } catch (java.io.UnsupportedEncodingException x) { -+ throw new InternalError(); -+ } -+ BSDVirtualMachine.write(fd, b, 0, b.length); -+ } -+ byte b[] = new byte[1]; -+ b[0] = 0; -+ write(fd, b, 0, 1); -+ } -+ -+ -+ static native void sendQuitTo(int pid) throws IOException; -+ -+ static native void checkPermissions(String path) throws IOException; -+ -+ static native int socket() throws IOException; -+ -+ static native void connect(int fd, String path) throws IOException; -+ -+ static native void close(int fd) throws IOException; -+ -+ static native int read(int fd, byte buf[], int off, int bufLen) throws IOException; -+ -+ static native void write(int fd, byte buf[], int off, int bufLen) throws IOException; -+ static native void createAttachFile(String path); -+ -+ static { -+ System.loadLibrary("attach"); -+ } -+} diff --git a/java/jdk16/files/patch-j2se-attach-Exportedfiles.gmk b/java/jdk16/files/patch-j2se-attach-Exportedfiles.gmk deleted file mode 100644 index 851873dae0fa..000000000000 --- a/java/jdk16/files/patch-j2se-attach-Exportedfiles.gmk +++ /dev/null @@ -1,15 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/com/sun/tools/attach/Exportedfiles.gmk 21 Jul 2006 17:23:23 -0000 1.1.1.2 -+++ ../../j2se/make/com/sun/tools/attach/Exportedfiles.gmk 29 Jan 2009 08:13:19 -0000 -@@ -25,5 +25,10 @@ - sun/tools/attach/LinuxVirtualMachine.java - endif - -+ifeq ($(PLATFORM), bsd) -+FILES_export = \ -+ sun/tools/attach/BSDVirtualMachine.java -+endif -+ - - diff --git a/java/jdk16/files/patch-j2se-attach-mapfile-bsd b/java/jdk16/files/patch-j2se-attach-mapfile-bsd deleted file mode 100644 index 2a079669e31a..000000000000 --- a/java/jdk16/files/patch-j2se-attach-mapfile-bsd +++ /dev/null @@ -1,28 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/com/sun/tools/attach/mapfile-bsd 10 May 2007 05:39:49 -0000 1.1 -+++ ../../j2se/make/com/sun/tools/attach/mapfile-bsd 29 Jan 2009 08:13:19 -0000 -@@ -1,5 +1,5 @@ - # --#ident "@(#)mapfile-linux 1.5 05/11/17" -+#ident "@(#)mapfile-bsd 1.0 09/01/15" - # - # Copyright 2006 Sun Microsystems, Inc. All rights reserved. - # Copyright 2006 Sun Microsystems, Inc. Tous droits réservés. -@@ -11,6 +11,16 @@ - # Define public interface. - - SUNWprivate_1.1 { -+ global: -+ Java_sun_tools_attach_BSDVirtualMachine_checkPermissions; -+ Java_sun_tools_attach_BSDVirtualMachine_close; -+ Java_sun_tools_attach_BSDVirtualMachine_connect; -+ Java_sun_tools_attach_BSDVirtualMachine_sendQuitTo; -+ Java_sun_tools_attach_BSDVirtualMachine_socket; -+ Java_sun_tools_attach_BSDVirtualMachine_read; -+ Java_sun_tools_attach_BSDVirtualMachine_write; -+ Java_sun_tools_attach_BSDVirtualMachine_createAttachFile; -+ - local: - *; - }; diff --git a/java/jdk16/files/patch-j2se-awt-awt_GraphicsEnv.h b/java/jdk16/files/patch-j2se-awt-awt_GraphicsEnv.h deleted file mode 100644 index a7f916166d4f..000000000000 --- a/java/jdk16/files/patch-j2se-awt-awt_GraphicsEnv.h +++ /dev/null @@ -1,15 +0,0 @@ -$FreeBSD: /tmp/pcvs/ports/java/jdk16/files/patch-j2se-awt-awt_GraphicsEnv.h,v 1.1 2010-04-19 06:18:54 glewis Exp $ - ---- ../../j2se/src/solaris/native/sun/awt/awt_GraphicsEnv.h.orig 2010-04-16 21:28:02.000000000 +1100 -+++ ../../j2se/src/solaris/native/sun/awt/awt_GraphicsEnv.h 2010-04-16 21:39:52.635333540 +1100 -@@ -24,6 +24,10 @@ - #include <sys/ipc.h> - #include <sys/shm.h> - #include <X11/extensions/XShm.h> -+#ifndef X_ShmAttach -+#include <X11/Xmd.h> -+#include <X11/extensions/shmproto.h> -+#endif - - extern int XShmQueryExtension(); - diff --git a/java/jdk16/files/patch-j2se-awt-fontpath.c b/java/jdk16/files/patch-j2se-awt-fontpath.c deleted file mode 100644 index 4105d383d9fe..000000000000 --- a/java/jdk16/files/patch-j2se-awt-fontpath.c +++ /dev/null @@ -1,29 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/solaris/native/sun/awt/fontpath.c.orig Sun Jul 29 23:03:29 2007 -+++ ../../j2se/src/solaris/native/sun/awt/fontpath.c Sun Jul 29 23:03:29 2007 -@@ -98,18 +98,18 @@ - * various flavors of Linux - */ - static char *fullLinuxFontPath[] = { -- "/usr/X11R6/lib/X11/fonts/TrueType", /* RH 7.1+ */ -- "/usr/X11R6/lib/X11/fonts/truetype", /* SuSE */ -- "/usr/X11R6/lib/X11/fonts/tt", -- "/usr/X11R6/lib/X11/fonts/TTF", -- "/usr/X11R6/lib/X11/fonts/OTF", /* RH 9.0 (but empty!) */ -+ "%%LOCALBASE%%/lib/X11/fonts/TrueType", /* RH 7.1+ */ -+ "%%LOCALBASE%%/lib/X11/fonts/truetype", /* SuSE */ -+ "%%LOCALBASE%%/lib/X11/fonts/tt", -+ "%%LOCALBASE%%/lib/X11/fonts/TTF", -+ "%%LOCALBASE%%/lib/X11/fonts/OTF", /* RH 9.0 (but empty!) */ - "/usr/share/fonts/ja/TrueType", /* RH 7.2+ */ - "/usr/share/fonts/truetype", - "/usr/share/fonts/ko/TrueType", /* RH 9.0 */ - "/usr/share/fonts/zh_CN/TrueType", /* RH 9.0 */ - "/usr/share/fonts/zh_TW/TrueType", /* RH 9.0 */ - "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType", /* Debian */ -- "/usr/X11R6/lib/X11/fonts/Type1", -+ "%%LOCALBASE%%/lib/X11/fonts/Type1", - "/usr/share/fonts/default/Type1", /* RH 9.0 */ - NULL, /* terminates the list */ - }; diff --git a/java/jdk16/files/patch-j2se-awt-mawt.gmk b/java/jdk16/files/patch-j2se-awt-mawt.gmk deleted file mode 100644 index ff56d99d0e55..000000000000 --- a/java/jdk16/files/patch-j2se-awt-mawt.gmk +++ /dev/null @@ -1,30 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/sun/awt/mawt.gmk.orig Sun Jul 29 23:03:29 2007 -+++ ../../j2se/make/sun/awt/mawt.gmk Sun Jul 29 23:03:29 2007 -@@ -131,11 +131,11 @@ - LIBXT = -lXt - else - # Allows for builds on Debian GNU Linux, X11 is in a different place -- LIBXT = $(firstword $(wildcard /usr/X11R6/lib/libXt.a) \ -+ LIBXT = $(firstword $(wildcard ${LOCALBASE}/lib/libXt.a) \ - $(wildcard /usr/lib/libXt.a)) -- LIBSM = $(firstword $(wildcard /usr/X11R6/lib/libSM.a) \ -+ LIBSM = $(firstword $(wildcard ${LOCALBASE}/lib/libSM.a) \ - $(wildcard /usr/lib/libSM.a)) -- LIBICE = $(firstword $(wildcard /usr/X11R6/lib/libICE.a) \ -+ LIBICE = $(firstword $(wildcard ${LOCALBASE}/lib/libICE.a) \ - $(wildcard /usr/lib/libICE.a)) - endif - endif -@@ -227,8 +227,8 @@ - endif - - ifeq ($(PLATFORM), bsd) -- CPPFLAGS += -I/usr/X11R6/include/X11/extensions \ -- -I/usr/X11R6/include -+ CPPFLAGS += -I${LOCALBASE}/include/X11/extensions \ -+ -I${LOCALBASE}/include - endif - - LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \ diff --git a/java/jdk16/files/patch-j2se-bin-java-rmi.cgi.sh b/java/jdk16/files/patch-j2se-bin-java-rmi.cgi.sh deleted file mode 100644 index 243633e353a9..000000000000 --- a/java/jdk16/files/patch-j2se-bin-java-rmi.cgi.sh +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/solaris/bin/java-rmi.cgi.sh.orig Sun Jul 29 23:03:30 2007 -+++ ../../j2se/src/solaris/bin/java-rmi.cgi.sh Sun Jul 29 23:03:30 2007 -@@ -32,7 +32,7 @@ - # - # PATH=/home/peter/java/bin:$PATH - # --PATH=/usr/local/java/bin:$PATH -+PATH=%%LOCALBASE%%/java/bin:$PATH - exec java \ - -DAUTH_TYPE="$AUTH_TYPE" \ - -DCONTENT_LENGTH="$CONTENT_LENGTH" \ diff --git a/java/jdk16/files/patch-j2se-bin-java_md.c b/java/jdk16/files/patch-j2se-bin-java_md.c deleted file mode 100644 index 91f6b5c8453d..000000000000 --- a/java/jdk16/files/patch-j2se-bin-java_md.c +++ /dev/null @@ -1,17 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/solaris/bin/java_md.c.orig Sun Jul 29 23:03:30 2007 -+++ ../../j2se/src/solaris/bin/java_md.c Sun Jul 29 23:03:30 2007 -@@ -70,10 +70,10 @@ - * entries, but actual strings can be more efficient (with many compilers). - */ - #if defined(__FreeBSD__) --static const char *system_dir = "/usr/local/jdk1.6.0"; -+static const char *system_dir = "%%LOCALBASE%%/jdk1.6.0"; - static const char *user_dir = "/java"; - #elif defined(__OpenBSD__) --static const char *system_dir = "/usr/local/jdk-1.6.0"; -+static const char *system_dir = "%%LOCALBASE%%/jdk-1.6.0"; - static const char *user_dir = "/java"; - #elif defined(__linux__) - static const char *system_dir = "/usr/java"; diff --git a/java/jdk16/files/patch-j2se-cmm-Makefile b/java/jdk16/files/patch-j2se-cmm-Makefile deleted file mode 100644 index 3ea05e8acfe2..000000000000 --- a/java/jdk16/files/patch-j2se-cmm-Makefile +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/sun/cmm/Makefile.orig Sun Jul 29 23:03:31 2007 -+++ ../../j2se/make/sun/cmm/Makefile Sun Jul 29 23:03:31 2007 -@@ -49,7 +49,7 @@ - endif - - ifeq ($(PLATFORM), bsd) --LDLIBS += -pthread -+LDLIBS += ${PTHREAD_LIBS} - endif - - clean clobber:: iccprofiles.clean diff --git a/java/jdk16/files/patch-j2se-common-Defs-bsd.gmk b/java/jdk16/files/patch-j2se-common-Defs-bsd.gmk deleted file mode 100644 index f479bc283f64..000000000000 --- a/java/jdk16/files/patch-j2se-common-Defs-bsd.gmk +++ /dev/null @@ -1,27 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/common/Defs-bsd.gmk.orig Sun Jul 29 23:03:29 2007 -+++ ../../j2se/make/common/Defs-bsd.gmk Sun Jul 29 23:03:29 2007 -@@ -314,6 +314,13 @@ - ifeq ($(OS_VENDOR),NetBSD) - override HAVE_SIGIGNORE = true - endif -+ifeq ($(OS_VENDOR),FreeBSD) -+OS_RELDATE := %%OSVERSION%% -+HAS_SIGIGNORE := $(shell if [ $(OS_RELDATE) -ge 800502 -a $(OS_RELDATE) -lt 900000 -o $(OS_RELDATE) -ge 900003 ]; then echo "1"; fi) -+ifeq ($(HAS_SIGIGNORE),1) -+override HAVE_SIGIGNORE = true -+endif -+endif - ifeq ($(OS_VENDOR),Apple) - override HAVE_SIGIGNORE = true - endif -@@ -332,7 +339,7 @@ - override LIBTHREAD = - override MOOT_PRIORITIES = true - override NO_INTERRUPTIBLE_IO = false --override OPENWIN_HOME = /usr/X11R6 -+override OPENWIN_HOME = ${LOCALBASE} - override OPENWIN_LIB = $(OPENWIN_HOME)/lib - override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER - override SUN_CMM_SUBDIR = diff --git a/java/jdk16/files/patch-j2se-common-Defs.gmk b/java/jdk16/files/patch-j2se-common-Defs.gmk deleted file mode 100644 index 487c4a46ccaf..000000000000 --- a/java/jdk16/files/patch-j2se-common-Defs.gmk +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/common/Defs.gmk.orig Sun Jul 29 23:03:31 2007 -+++ ../../j2se/make/common/Defs.gmk Sun Jul 29 23:03:31 2007 -@@ -111,7 +111,7 @@ - endif - - ifeq ($(OS_VENDOR), FreeBSD) -- LDLIBS_COMMON = -pthread -+ LDLIBS_COMMON = ${PTHREAD_LIBS} - endif - - ifeq ($(OS_VENDOR), OpenBSD) diff --git a/java/jdk16/files/patch-j2se-common-Program.gmk b/java/jdk16/files/patch-j2se-common-Program.gmk deleted file mode 100644 index 0a1692626ff8..000000000000 --- a/java/jdk16/files/patch-j2se-common-Program.gmk +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/common/Program.gmk.orig Sun Jul 29 23:03:31 2007 -+++ ../../j2se/make/common/Program.gmk Sun Jul 29 23:03:31 2007 -@@ -155,7 +155,7 @@ - endif # USE_PTHREADS - - ifeq ($(PLATFORM), bsd) --THREADLIBS = -pthread -+THREADLIBS = ${PTHREAD_LIBS} - endif - - # diff --git a/java/jdk16/files/patch-j2se-doc-DocURLConnection.java b/java/jdk16/files/patch-j2se-doc-DocURLConnection.java deleted file mode 100644 index 780f75e1c9d5..000000000000 --- a/java/jdk16/files/patch-j2se-doc-DocURLConnection.java +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/share/classes/sun/net/www/protocol/doc/DocURLConnection.java.orig Sun Jul 29 23:03:30 2007 -+++ ../../j2se/src/share/classes/sun/net/www/protocol/doc/DocURLConnection.java Sun Jul 29 23:03:30 2007 -@@ -33,7 +33,7 @@ - installDirectory = (String)java.security.AccessController.doPrivileged( - new sun.security.action.GetPropertyAction("hotjava.home")); - if (installDirectory == null) { -- installDirectory = "/usr/local/hotjava"; -+ installDirectory = "%%LOCALBASE%%/hotjava"; - } - } - diff --git a/java/jdk16/files/patch-j2se-doc-Handler.java b/java/jdk16/files/patch-j2se-doc-Handler.java deleted file mode 100644 index 827585916c86..000000000000 --- a/java/jdk16/files/patch-j2se-doc-Handler.java +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/share/classes/sun/net/www/protocol/doc/Handler.java.orig Sun Jul 29 23:03:30 2007 -+++ ../../j2se/src/share/classes/sun/net/www/protocol/doc/Handler.java Sun Jul 29 23:03:30 2007 -@@ -40,7 +40,7 @@ - installDirectory = (String)java.security.AccessController.doPrivileged( - new sun.security.action.GetPropertyAction("hotjava.home")); - if (installDirectory == null) { -- installDirectory = "/usr/local/hotjava"; -+ installDirectory = "%%LOCALBASE%%/hotjava"; - } - } - /* diff --git a/java/jdk16/files/patch-j2se-font-Makefile b/java/jdk16/files/patch-j2se-font-Makefile deleted file mode 100644 index 22587357fa11..000000000000 --- a/java/jdk16/files/patch-j2se-font-Makefile +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/sun/font/Makefile.orig Sun Jul 29 23:03:29 2007 -+++ ../../j2se/make/sun/font/Makefile Sun Jul 29 23:03:29 2007 -@@ -123,7 +123,7 @@ - - # setup the list of libraries to link in... - ifeq ($(PLATFORM), bsd) --OTHER_INCLUDES += -I/usr/X11R6/include -+OTHER_INCLUDES += -I${LOCALBASE}/include - OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX) - else - ifeq ($(PLATFORM), linux) diff --git a/java/jdk16/files/patch-j2se-gtk-Metacity.java b/java/jdk16/files/patch-j2se-gtk-Metacity.java deleted file mode 100644 index 906baec93397..000000000000 --- a/java/jdk16/files/patch-j2se-gtk-Metacity.java +++ /dev/null @@ -1,19 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java.orig Sun Jul 29 23:03:30 2007 -+++ ../../j2se/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java Sun Jul 29 23:03:30 2007 -@@ -460,10 +460,10 @@ - String[] dirs = new String[] { - userHome + sep + ".themes", - System.getProperty("swing.metacitythemedir"), -- "/usr/X11R6/share/themes", -- "/usr/X11R6/share/gnome/themes", -- "/usr/local/share/themes", -- "/usr/local/share/gnome/themes", -+ "%%LOCALBASE%%/share/themes", -+ "%%LOCALBASE%%/share/gnome/themes", -+ "%%LOCALBASE%%/share/themes", -+ "%%LOCALBASE%%/share/gnome/themes", - "/usr/share/themes", - "/usr/gnome/share/themes", // Debian/Redhat/Solaris - "/opt/gnome2/share/themes" // SuSE diff --git a/java/jdk16/files/patch-j2se-instrument-Makefile b/java/jdk16/files/patch-j2se-instrument-Makefile deleted file mode 100644 index 634f541dbfbe..000000000000 --- a/java/jdk16/files/patch-j2se-instrument-Makefile +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/java/instrument/Makefile.orig Sat Feb 16 11:02:12 2008 -+++ ../../j2se/make/java/instrument/Makefile Sat Feb 16 11:02:38 2008 -@@ -112,7 +112,7 @@ - - ifeq ($(PLATFORM), bsd) - ifneq ($(OS_VENDOR), NetBSD) -- ICONV_DIR = /usr/local -+ ICONV_DIR = ${LOCALBASE} - CPPFLAGS += -I$(ICONV_DIR)/include - OTHER_LDLIBS += -L$(ICONV_DIR)/lib -liconv - endif diff --git a/java/jdk16/files/patch-j2se-net-Makefile b/java/jdk16/files/patch-j2se-net-Makefile deleted file mode 100644 index 7902d1866355..000000000000 --- a/java/jdk16/files/patch-j2se-net-Makefile +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/java/net/Makefile.orig Sun Jul 29 23:03:31 2007 -+++ ../../j2se/make/java/net/Makefile Sun Jul 29 23:03:31 2007 -@@ -73,7 +73,7 @@ - ifdef DONT_ENABLE_IPV6 - OTHER_CFLAGS += -DDONT_ENABLE_IPV6 - endif -- OTHER_LDLIBS = $(JVMLIB) -pthread -+ OTHER_LDLIBS = $(JVMLIB) ${PTHREAD_LIBS} - else - ifeq ($(PLATFORM), windows) - OTHER_LDLIBS = ws2_32.lib $(JVMLIB) diff --git a/java/jdk16/files/patch-j2se-nio-Makefile b/java/jdk16/files/patch-j2se-nio-Makefile deleted file mode 100644 index 0c7714d3516b..000000000000 --- a/java/jdk16/files/patch-j2se-nio-Makefile +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/java/nio/Makefile.orig Sun Jul 29 23:03:31 2007 -+++ ../../j2se/make/java/nio/Makefile Sun Jul 29 23:03:31 2007 -@@ -121,7 +121,7 @@ - OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl - endif - ifeq ($(PLATFORM), bsd) --OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -pthread -+OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet ${PTHREAD_LIBS} - endif - ifeq ($(PLATFORM), solaris) - OTHER_LDLIBS += $(JVMLIB) -lsocket -lposix4 -ldl \ diff --git a/java/jdk16/files/patch-j2se-npt-Makefile b/java/jdk16/files/patch-j2se-npt-Makefile deleted file mode 100644 index ea36eef02fb3..000000000000 --- a/java/jdk16/files/patch-j2se-npt-Makefile +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/java/npt/Makefile.orig Sat Feb 16 11:29:58 2008 -+++ ../../j2se/make/java/npt/Makefile Sat Feb 16 11:30:15 2008 -@@ -70,7 +70,7 @@ - # Add location of iconv headers - ifeq ($(PLATFORM), bsd) - ifneq ($(OS_VENDOR), NetBSD) -- ICONV_DIR = /usr/local -+ ICONV_DIR = ${LOCALBASE} - CPPFLAGS += -I$(ICONV_DIR)/include - OTHER_LDLIBS += -L$(ICONV_DIR)/lib -liconv - endif diff --git a/java/jdk16/files/patch-j2se-pack-Makefile b/java/jdk16/files/patch-j2se-pack-Makefile deleted file mode 100644 index d03662e35043..000000000000 --- a/java/jdk16/files/patch-j2se-pack-Makefile +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/com/sun/java/pack/Makefile.orig Sun Jul 29 23:03:30 2007 -+++ ../../j2se/make/com/sun/java/pack/Makefile Sun Jul 29 23:03:30 2007 -@@ -68,7 +68,7 @@ - else - LDOUTPUT = -o #Have a space - ifeq ($(PLATFORM), bsd) -- LDDFLAGS += -pthread -+ LDDFLAGS += ${PTHREAD_LIBS} - else - LDDFLAGS += -lc - endif diff --git a/java/jdk16/files/patch-j2se-services-com.sun.tools.attach.spi.AttachProvider b/java/jdk16/files/patch-j2se-services-com.sun.tools.attach.spi.AttachProvider deleted file mode 100644 index 3d507474d0c4..000000000000 --- a/java/jdk16/files/patch-j2se-services-com.sun.tools.attach.spi.AttachProvider +++ /dev/null @@ -1,9 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 1 Nov 2005 05:12:03 -0000 1.1.1.1 -+++ ../../j2se/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 29 Jan 2009 08:13:19 -0000 -@@ -12,3 +12,4 @@ - #[solaris]sun.tools.attach.SolarisAttachProvider - #[windows]sun.tools.attach.WindowsAttachProvider - #[linux]sun.tools.attach.LinuxAttachProvider -+#[bsd]sun.tools.attach.BSDAttachProvider diff --git a/java/jdk16/files/patch-j2se-shared-Defs-bsd.gmk b/java/jdk16/files/patch-j2se-shared-Defs-bsd.gmk deleted file mode 100644 index 583726fd14f7..000000000000 --- a/java/jdk16/files/patch-j2se-shared-Defs-bsd.gmk +++ /dev/null @@ -1,22 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/common/shared/Defs-bsd.gmk.orig Sun Jul 29 23:03:30 2007 -+++ ../../j2se/make/common/shared/Defs-bsd.gmk Sun Jul 29 23:03:30 2007 -@@ -30,7 +30,7 @@ - endef - - # Location on system where jdk installs might be --USRJDKINSTANCES_PATH =/usr/local -+USRJDKINSTANCES_PATH =${LOCALBASE} - - # UNIXCOMMAND_PATH: path to where the most common Unix commands are. - # NOTE: Must end with / so that it could be empty, allowing PATH usage. -@@ -105,7 +105,7 @@ - LIBM=-lm - - # CUPS --_CUPS_HEADERS_PATH=/usr/local/include -+_CUPS_HEADERS_PATH=${LOCALBASE}/include - - # JDK_IMPORT_PATH: location of previously built JDK (this version). - ifdef ALT_JDK_IMPORT_PATH diff --git a/java/jdk16/files/patch-j2se-smartcardio-PlatformPCSC.java b/java/jdk16/files/patch-j2se-smartcardio-PlatformPCSC.java deleted file mode 100644 index 83485ce56a60..000000000000 --- a/java/jdk16/files/patch-j2se-smartcardio-PlatformPCSC.java +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java.orig Sun Jul 29 23:03:30 2007 -+++ ../../j2se/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java Sun Jul 29 23:03:30 2007 -@@ -32,7 +32,7 @@ - private final static String PROP_NAME = "sun.security.smartcardio.library"; - - private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so"; -- private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so"; -+ private final static String LIB2 = "%%LOCALBASE%%/$LIBISA/libpcsclite.so"; - - PlatformPCSC() { - // empty diff --git a/java/jdk16/files/patch-j2se-socket-Makefile b/java/jdk16/files/patch-j2se-socket-Makefile deleted file mode 100644 index 2595c7d78926..000000000000 --- a/java/jdk16/files/patch-j2se-socket-Makefile +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/jpda/transport/socket/Makefile.orig Sun Jul 29 23:03:31 2007 -+++ ../../j2se/make/jpda/transport/socket/Makefile Sun Jul 29 23:03:31 2007 -@@ -30,7 +30,7 @@ - - ifeq ($(PLATFORM), bsd) - LIBSOCKET = -- OTHER_LDLIBS += -pthread -+ OTHER_LDLIBS += ${PTHREAD_LIBS} - endif - - ifeq ($(PLATFORM), solaris) diff --git a/java/jdk16/files/patch-j2se-splashscreen-Makefile b/java/jdk16/files/patch-j2se-splashscreen-Makefile deleted file mode 100644 index c5661adb31cf..000000000000 --- a/java/jdk16/files/patch-j2se-splashscreen-Makefile +++ /dev/null @@ -1,32 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/sun/splashscreen/Makefile.orig 2008-10-13 20:02:03.000000000 -0700 -+++ ../../j2se/make/sun/splashscreen/Makefile 2008-10-14 18:53:48.000000000 -0700 -@@ -45,9 +45,16 @@ - - ifneq ($(PLATFORM), windows) - CFLAGS += -DWITH_X11 -+endif -+ -+# Internal JDK include paths should come before system include paths -+CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen -+CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 -+ -+ifneq ($(PLATFORM), windows) - ifeq ($(PLATFORM), bsd) - ifneq ($(OS_VENDOR), NetBSD) -- ICONV_DIR = /usr/local -+ ICONV_DIR = ${LOCALBASE} - ICONV_LIB = -L$(ICONV_DIR)/lib -liconv - endif - CPPFLAGS += -I$(OPENWIN_HOME)/include \ -@@ -75,9 +82,6 @@ - vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/jpeg - vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen - --CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen --CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 -- - # - # Has been converted to the JNI: generate JNI-style header files - # diff --git a/java/jdk16/files/patch-j2se-util-Calendar.java b/java/jdk16/files/patch-j2se-util-Calendar.java deleted file mode 100644 index 850cb2d2869a..000000000000 --- a/java/jdk16/files/patch-j2se-util-Calendar.java +++ /dev/null @@ -1,93 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/share/classes/java/util/Calendar.java.orig Tue Sep 25 00:44:04 2007 -+++ ../../j2se/src/share/classes/java/util/Calendar.java Sat Feb 28 09:35:28 2009 -@@ -23,9 +23,14 @@ package java.util; - import java.io.IOException; - import java.io.ObjectInputStream; - import java.io.ObjectOutputStream; -+import java.io.OptionalDataException; - import java.io.Serializable; -+import java.security.AccessControlContext; - import java.security.AccessController; -+import java.security.PermissionCollection; -+import java.security.PrivilegedActionException; - import java.security.PrivilegedExceptionAction; -+import java.security.ProtectionDomain; - import java.text.DateFormat; - import java.text.DateFormatSymbols; - import sun.util.BuddhistCalendar; -@@ -2599,6 +2604,18 @@ public abstract class Calendar implements Serializable - } - } - -+ private static class CalendarAccessControlContext { -+ private static final AccessControlContext INSTANCE; -+ static { -+ RuntimePermission perm = new RuntimePermission("accessClassInPackage.sun.util.calendar"); -+ PermissionCollection perms = perm.newPermissionCollection(); -+ perms.add(perm); -+ INSTANCE = new AccessControlContext(new ProtectionDomain[] { -+ new ProtectionDomain(null, perms) -+ }); -+ } -+ } -+ - /** - * Reconstitutes this object from a stream (i.e., deserialize it). - */ -@@ -2628,18 +2645,31 @@ public abstract class Calendar implements Serializable - serialVersionOnStream = currentSerialVersion; - - // If there's a ZoneInfo object, use it for zone. -+ ZoneInfo zi = null; - try { -- ZoneInfo zi = (ZoneInfo) AccessController.doPrivileged( -- new PrivilegedExceptionAction() { -- public Object run() throws Exception { -- return input.readObject(); -- } -- }); -- if (zi != null) { -- zone = zi; -- } -- } catch (Exception e) { -+ zi = AccessController.doPrivileged( -+ new PrivilegedExceptionAction<ZoneInfo>() { -+ public ZoneInfo run() throws Exception { -+ return (ZoneInfo) input.readObject(); -+ } -+ }, -+ CalendarAccessControlContext.INSTANCE); -+ } catch (PrivilegedActionException pae) { -+ Exception e = pae.getException(); -+ if (!(e instanceof OptionalDataException)) { -+ if (e instanceof RuntimeException) { -+ throw (RuntimeException) e; -+ } else if (e instanceof IOException) { -+ throw (IOException) e; -+ } else if (e instanceof ClassNotFoundException) { -+ throw (ClassNotFoundException) e; -+ } -+ throw new RuntimeException(e); -+ } - } -+ if (zi != null) { -+ zone = zi; -+ } - - // If the deserialized object has a SimpleTimeZone, try to - // replace it with a ZoneInfo equivalent (as of 1.4) in order -@@ -2647,9 +2677,9 @@ public abstract class Calendar implements Serializable - // implementation as much as possible. - if (zone instanceof SimpleTimeZone) { - String id = zone.getID(); -- TimeZone zi = TimeZone.getTimeZone(id); -- if (zi != null && zi.hasSameRules(zone) && zi.getID().equals(id)) { -- zone = zi; -+ TimeZone tz = TimeZone.getTimeZone(id); -+ if (tz != null && tz.hasSameRules(zone) && tz.getID().equals(id)) { -+ zone = tz; - } - } - } diff --git a/java/jdk16/files/patch-j2se-www-MimeTable.java b/java/jdk16/files/patch-j2se-www-MimeTable.java deleted file mode 100644 index 3b9501211618..000000000000 --- a/java/jdk16/files/patch-j2se-www-MimeTable.java +++ /dev/null @@ -1,16 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/share/classes/sun/net/www/MimeTable.java.orig Sun Jul 29 23:03:30 2007 -+++ ../../j2se/src/share/classes/sun/net/www/MimeTable.java Sun Jul 29 23:03:30 2007 -@@ -40,9 +40,9 @@ - System.getProperty("user.home") + "/.mailcap", - "/etc/mailcap", - "/usr/etc/mailcap", -- "/usr/local/etc/mailcap", -+ "%%LOCALBASE%%/etc/mailcap", - System.getProperty("hotjava.home", -- "/usr/local/hotjava") + "/lib/mailcap", -+ "%%LOCALBASE%%/hotjava") + "/lib/mailcap", - }; - return null; - } diff --git a/java/jdk16/files/patch-j2se-xawt-Makefile b/java/jdk16/files/patch-j2se-xawt-Makefile deleted file mode 100644 index 2b6f82acaf35..000000000000 --- a/java/jdk16/files/patch-j2se-xawt-Makefile +++ /dev/null @@ -1,30 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/make/sun/xawt/Makefile.orig Sun Jul 29 23:03:29 2007 -+++ ../../j2se/make/sun/xawt/Makefile Sun Jul 29 23:03:29 2007 -@@ -40,7 +40,7 @@ - - ifeq ($(PLATFORM), bsd) - FILES_c += Xinerama.c --LDFLAGS += -pthread -+LDFLAGS += ${PTHREAD_LIBS} - dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) - endif - -@@ -118,14 +118,14 @@ - - ifeq ($(PLATFORM), linux) - # Allows for builds on Debian GNU Linux, X11 is in a different place -- CPPFLAGS += -I/usr/X11R6/include/X11/extensions \ -+ CPPFLAGS += -I${LOCALBASE}/include/X11/extensions \ - -I/usr/include/X11/extensions \ - -I$(MOTIF_DIR)/include \ - -I$(OPENWIN_HOME)/include - endif - - ifeq ($(PLATFORM), bsd) -- CPPFLAGS += -I/usr/X11R6/include/X11/extensions -I$(MOTIF_DIR)/include -I$(OPENWIN_HOME)/include -+ CPPFLAGS += -I${LOCALBASE}/include/X11/extensions -I$(MOTIF_DIR)/include -I$(OPENWIN_HOME)/include - endif - - ifeq ($(PLATFORM), solaris) diff --git a/java/jdk16/files/patch-nio-kqueue b/java/jdk16/files/patch-nio-kqueue deleted file mode 100644 index 2d5e07ec51be..000000000000 --- a/java/jdk16/files/patch-nio-kqueue +++ /dev/null @@ -1,692 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/share/classes/sun/nio/ch/KqueueSelectorProvider.java (revision 0) -+++ ../../j2se/src/share/classes/sun/nio/ch/KqueueSelectorProvider.java (revision 0) -@@ -0,0 +1,17 @@ -+package sun.nio.ch; -+ -+import java.io.IOException; -+import java.nio.channels.*; -+import java.nio.channels.spi.*; -+ -+public class KqueueSelectorProvider -+ extends SelectorProviderImpl -+{ -+ public AbstractSelector openSelector() throws IOException { -+ return new KqueueSelectorImpl(this); -+ } -+ -+ public Channel inheritedChannel() throws IOException { -+ return InheritedChannel.getChannel(); -+ } -+} ---- ../../j2se/src/solaris/native/sun/nio/ch/KqueueArrayWrapper.c (revision 0) -+++ ../../j2se/src/solaris/native/sun/nio/ch/KqueueArrayWrapper.c (revision 6) -@@ -0,0 +1,186 @@ -+/* -+ * Scratched by davidxu@freebsd.org -+ */ -+ -+#include "jni.h" -+#include "jni_util.h" -+#include "jvm.h" -+#include "jlong.h" -+ -+#include "sun_nio_ch_KqueueArrayWrapper.h" -+ -+#include <errno.h> -+#include <sys/types.h> -+#include <sys/event.h> -+#include <sys/time.h> -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+static int -+restartable_kevent(int kqfd, struct kevent *changelist, int nchanges, -+ struct kevent *eventlist, int nevents); -+ -+static int -+timeout_kevent(int kqfd, struct kevent *changelist, int nchanges, -+ struct kevent *eventlist, int nevents, int timo); -+ -+JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_kqueue -+ (JNIEnv *env, jclass cls) -+{ -+ int kqfd = kqueue(); -+ if (kqfd < 0) { -+ JNU_ThrowIOExceptionWithLastError(env, "Error creating kqueue"); -+ return -1; -+ } -+ return kqfd; -+} -+ -+JNIEXPORT void JNICALL Java_sun_nio_ch_KqueueArrayWrapper_register -+ (JNIEnv *env, jclass cls, jint kqfd, jint fd, jshort filter) -+{ -+ struct kevent ev; -+ struct timespec ts; -+ -+ ev.ident = fd; -+ ev.filter = filter; -+ ev.flags = EV_ADD; -+ ev.fflags = 0; -+ ev.data = 0; -+ ev.udata = NULL; -+ ts.tv_sec = 0; -+ ts.tv_nsec = 0; -+ if (kevent(kqfd, &ev, 1, NULL, 0, &ts) < 0) { -+ JNU_ThrowIOExceptionWithLastError(env, "Error register kqueue event"); -+ } -+} -+ -+JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_kevent -+ (JNIEnv *env, jclass cls, jint kqfd, jlong changelist_addr, jint nchanges, -+ jlong eventlist_addr, jint nevents, jlong timeout) -+{ -+ struct kevent *changelist = (struct kevent *)jlong_to_ptr(changelist_addr); -+ struct kevent *eventlist = (struct kevent *)jlong_to_ptr(eventlist_addr); -+ int result; -+ -+ if (timeout < 0) { -+ result = restartable_kevent(kqfd, changelist, nchanges, -+ eventlist, nevents); -+ } else { -+ result = timeout_kevent(kqfd, changelist, nchanges, eventlist, -+ nevents, timeout); -+ } -+ -+ if (result < 0) { -+ JNU_ThrowIOExceptionWithLastError(env, "Error polling kevent"); -+ return -1; -+ } -+ return result; -+} -+ -+static int -+restartable_kevent(int kqfd, struct kevent *changelist, int nchanges, -+ struct kevent *eventlist, int nevents) -+{ -+ int result; -+ -+ for (;;) { -+ result = kevent(kqfd, changelist, nchanges, eventlist, -+ nevents, NULL); -+ if (result == -1 && errno == EINTR) { -+ continue; -+ } else { -+ return result; -+ } -+ } -+} -+ -+static int -+timeout_kevent(int kqfd, struct kevent *changelist, int nchanges, -+ struct kevent *eventlist, int nevents, int timo) -+{ -+ struct timeval timeout, now, end; -+ int result; -+ -+ timeout.tv_sec = timo / 1000; -+ timeout.tv_usec = (timo % 1000) * 1000; -+ gettimeofday(&now, NULL); -+ timeradd(&now, &timeout, &end); -+ -+ for (;;) { -+ struct timespec ts; -+ -+ ts.tv_sec = timeout.tv_sec; -+ ts.tv_nsec = timeout.tv_usec * 1000; -+ result = kevent(kqfd, changelist, nchanges, eventlist, nevents, -+ &ts); -+ if (result == -1 && (errno == EINTR)) { -+ gettimeofday(&now, NULL); -+ if (timercmp(&now, &end, >=)) -+ return 0; -+ timersub(&end, &now, &timeout); -+ } else { -+ return result; -+ } -+ } -+} -+ -+JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_keventSize -+ (JNIEnv *env, jclass cls) -+{ -+ return sizeof(struct kevent); -+} -+ -+JNIEXPORT void JNICALL Java_sun_nio_ch_KqueueArrayWrapper_interrupt -+ (JNIEnv *env, jclass cls, jint fd) -+{ -+ int fakebuf[1]; -+ -+ fakebuf[0] = 1; -+ if (write(fd, fakebuf, 1) < 0) { -+ JNU_ThrowIOExceptionWithLastError(env, -+ "Write to interrupt fd failed"); -+ } -+} -+ -+JNIEXPORT void JNICALL Java_sun_nio_ch_KqueueArrayWrapper_putKevent -+ (JNIEnv *env, jclass cls, jlong address, jint index, jint fd, jshort flags, jshort filter) -+{ -+ struct kevent *ev = (struct kevent *)jlong_to_ptr(address); -+ -+ ev[index].ident = fd; -+ ev[index].flags = flags; -+ ev[index].filter = filter; -+ ev[index].fflags = 0; -+ ev[index].data = 0; -+ ev[index].udata = NULL; -+} -+ -+JNIEXPORT jshort JNICALL Java_sun_nio_ch_KqueueArrayWrapper_getKeventFilter -+ (JNIEnv *env, jclass cls, jlong address, jint index) -+{ -+ struct kevent *ev = (struct kevent *)jlong_to_ptr(address); -+ -+ return ev[index].filter; -+} -+ -+JNIEXPORT jshort JNICALL Java_sun_nio_ch_KqueueArrayWrapper_getKeventFlags -+ (JNIEnv *env, jclass cls, jlong address, jint index) -+{ -+ struct kevent *ev = (struct kevent *)jlong_to_ptr(address); -+ -+ return ev[index].flags; -+} -+ -+JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_getKeventIdent -+ (JNIEnv *env, jclass cls, jlong address, jint index) -+{ -+ struct kevent *ev = (struct kevent *)jlong_to_ptr(address); -+ -+ return (int)ev[index].ident; -+} -+ -+#ifdef __cplusplus -+} -+#endif ---- ../../j2se/src/solaris/classes/sun/nio/ch/KqueueArrayWrapper.java (revision 0) -+++ ../../j2se/src/solaris/classes/sun/nio/ch/KqueueArrayWrapper.java (revision 6) -@@ -0,0 +1,231 @@ -+/* -+ * Scratched by davidxu@freebsd.org -+ */ -+ -+package sun.nio.ch; -+ -+import sun.misc.*; -+import java.io.IOException; -+import java.util.HashMap; -+import java.util.Set; -+import java.util.Arrays; -+ -+class KqueueArrayWrapper { -+ -+ // Event masks copied from class AbstractPollArrayWrapper -+ static final short POLLIN = 0x0001; -+ static final short POLLOUT = 0x0004; -+ static final short POLLERR = 0x0008; -+ static final short POLLHUP = 0x0010; -+ static final short POLLNVAL = 0x0020; -+ static final short POLLREMOVE = 0x0800; -+ -+ // Kevent filters -+ static final short EVFILT_READ = -1; -+ static final short EVFILT_WRITE = -2; -+ -+ // Kevent flags -+ static final short EV_ADD = 0x0001; -+ static final short EV_DELETE = 0x0002; -+ static final short EV_ERROR = 0x4000; -+ -+ // Miscellaneous constants -+ static final int SIZE_KEVENT = keventSize(); -+ -+ // Zero mask to unregister events from kqueue -+ static final Integer ZERO_MASK = new Integer(0); -+ -+ // Capacity increment of some arrays -+ static final int capacityIncr = 100; -+ -+ KqueueArrayWrapper() { -+ int allocationSize; -+ -+ // initial size of event array -+ pollKeventSize = capacityIncr * 2; -+ allocationSize = pollKeventSize * SIZE_KEVENT; -+ pollKeventArray = new AllocatedNativeObject(allocationSize, true); -+ kqfd = kqueue(); -+ } -+ -+ // Machinery for remembering fd registration changes -+ private HashMap<Integer, Integer> updateMap = new HashMap<Integer, Integer>(); -+ private int[] oldMasks = new int[capacityIncr]; -+ -+ // kevent array to receive -+ private AllocatedNativeObject pollKeventArray; -+ -+ // current size of pollKeventArray -+ int pollKeventSize; -+ -+ // the pollKeventSize should be larger than this -+ int nextKeventSize; -+ -+ // The fd of the kqueue() -+ int kqfd; -+ -+ // The fd of the interrupt line going out -+ int outgoingInterruptFD; -+ -+ // The fd of the interrupt line coming in -+ int incomingInterruptFD; -+ -+ // The index of the interrupt FD -+ int interruptedIndex; -+ -+ // Number of updated kevent entries -+ int updated; -+ -+ // ensure some array sizes are large enough with a given file handle -+ void ensureFd(int fd) { -+ ensureNextEventFd(fd); -+ if (oldMasks.length < fd+1) -+ oldMasks = Arrays.copyOf(oldMasks, fd + capacityIncr); -+ } -+ -+ void ensureNextEventFd(int fd) { -+ // each file handle may have two filters, read and write. -+ if (nextKeventSize / 2 < fd+1) -+ nextKeventSize = (fd+1) * 2; -+ } -+ -+ void resizeEventBuffer() { -+ if (nextKeventSize > pollKeventSize) { -+ pollKeventArray.free(); -+ pollKeventSize = nextKeventSize + capacityIncr * 2; -+ int allocationSize = pollKeventSize * SIZE_KEVENT; -+ pollKeventArray = new AllocatedNativeObject(allocationSize, true); -+ } -+ } -+ -+ void initInterrupt(int fd0, int fd1) { -+ outgoingInterruptFD = fd1; -+ incomingInterruptFD = fd0; -+ ensureFd(fd0); -+ register(kqfd, fd0, EVFILT_READ); -+ } -+ -+ int getReventOps(int i) { -+ short filter = getKeventFilter(pollKeventArray.address(), i); -+ short flags = getKeventFlags(pollKeventArray.address(), i); -+ if ((flags & EV_ERROR) != 0) -+ return POLLERR; -+ if (filter == EVFILT_READ) -+ return POLLIN; -+ if (filter == EVFILT_WRITE) -+ return POLLOUT; -+ return (0); -+ } -+ -+ int getDescriptor(int i) { -+ return getKeventIdent(pollKeventArray.address(), i); -+ } -+ -+ void setInterest(int fd, int mask) { -+ if (fd <0) -+ throw new IndexOutOfBoundsException("file handle less than 0"); -+ synchronized (updateMap) { -+ ensureFd(fd); -+ updateMap.put(new Integer(fd), new Integer(mask)); -+ } -+ } -+ -+ void release(int fd) { -+ synchronized (updateMap) { -+ updateMap.put(new Integer(fd), ZERO_MASK); -+ } -+ } -+ -+ void closeKqueueFD() throws IOException { -+ FileDispatcher.closeIntFD(kqfd); -+ pollKeventArray.free(); -+ } -+ -+ int poll(long timeout) { -+ int changeCount = updateRegistrations(); -+ updated = kevent(kqfd, pollKeventArray.address(), changeCount, -+ pollKeventArray.address(), pollKeventSize, timeout); -+ for (int i = 0; i < updated; i++) { -+ if (getDescriptor(i) == incomingInterruptFD) { -+ interruptedIndex = i; -+ interrupted = true; -+ break; -+ } -+ } -+ return updated; -+ } -+ -+ int updateRegistrations() { -+ int index = 0; -+ synchronized (updateMap) { -+ resizeEventBuffer(); -+ -+ Set<Integer> s = updateMap.keySet(); -+ /* -+ * Because resizeEventBuffer may reallocate event buffer, -+ * we must retrieve fresh address here. -+ */ -+ long address = pollKeventArray.address(); -+ -+ for (Integer fd : s) { -+ Integer newmask = updateMap.get(fd); -+ int oldmask = oldMasks[fd]; -+ if ((oldmask & POLLIN) != 0) { -+ if ((newmask & POLLIN) == 0) { -+ putKevent(address, index, fd.intValue(), EV_DELETE, EVFILT_READ); -+ index++; -+ } -+ } else { -+ if ((newmask & POLLIN) != 0) { -+ putKevent(address, index, fd.intValue(), EV_ADD, EVFILT_READ); -+ index++; -+ } -+ } -+ -+ if ((oldmask & POLLOUT) != 0) { -+ if ((newmask & POLLOUT) == 0) { -+ putKevent(address, index, fd.intValue(), EV_DELETE, EVFILT_WRITE); -+ index++; -+ } -+ } else { -+ if ((newmask & POLLOUT) != 0) { -+ putKevent(address, index, fd.intValue(), EV_ADD, EVFILT_WRITE); -+ index++; -+ } -+ } -+ oldMasks[fd] = newmask; -+ } -+ updateMap.clear(); -+ } -+ return index; -+ } -+ -+ boolean interrupted = false; -+ -+ public void interrupt() { -+ interrupt(outgoingInterruptFD); -+ } -+ -+ public int interruptedIndex() { -+ return interruptedIndex; -+ } -+ -+ boolean interrupted() { -+ return interrupted; -+ } -+ -+ void clearInterrupted() { -+ interrupted = false; -+ } -+ -+ private static native int kqueue(); -+ private static native void register(int kqfd, int fd, short filter); -+ private static native int kevent(int kqfd, long changeList, int nchanges, long eventList, -+ int nevents, long timeout); -+ private static native int keventSize(); -+ private static native void interrupt(int fd); -+ private static native void putKevent(long address, int index, int fd, short flag, short filter); -+ private static native short getKeventFilter(long address, int index); -+ private static native short getKeventFlags(long address, int index); -+ private static native int getKeventIdent(long address, int index); -+} ---- ../../j2se/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java (revision 0) -+++ ../../j2se/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java (revision 6) -@@ -0,0 +1,205 @@ -+/* -+ * scratched by davidxu@freebsd.org -+ */ -+ -+package sun.nio.ch; -+ -+import java.io.IOException; -+import java.nio.channels.*; -+import java.nio.channels.spi.*; -+import java.util.*; -+import sun.misc.*; -+ -+ -+/** -+ * An implementation of Selector for FreeBSD. -+ */ -+class KqueueSelectorImpl -+ extends SelectorImpl -+{ -+ -+ // File descriptors used for interrupt -+ protected int fd0; -+ protected int fd1; -+ -+ // The kqueue object -+ KqueueArrayWrapper kqueueWrapper; -+ -+ // The number of valid channels in this Selector's poll array -+ private int totalChannels; -+ -+ // Maps from file descriptors to keys -+ private HashMap fdToKey; -+ -+ // True if this Selector has been closed -+ private boolean closed = false; -+ -+ // Lock for interrupt triggering and clearing -+ private Object interruptLock = new Object(); -+ private boolean interruptTriggered = false; -+ -+ // Trace number of file handles are updated. -+ private BitSet updatedSet; -+ -+ /** -+ * Package private constructor called by factory method in -+ * the abstract superclass Selector. -+ */ -+ KqueueSelectorImpl(SelectorProvider sp) { -+ super(sp); -+ int[] fdes = new int[2]; -+ IOUtil.initPipe(fdes, false); -+ fd0 = fdes[0]; -+ fd1 = fdes[1]; -+ kqueueWrapper = new KqueueArrayWrapper(); -+ totalChannels = 1; -+ kqueueWrapper.initInterrupt(fd0, fd1); -+ updatedSet = new BitSet(); -+ fdToKey = new HashMap(); -+ } -+ -+ protected int doSelect(long timeout) -+ throws IOException -+ { -+ if (closed) -+ throw new ClosedSelectorException(); -+ processDeregisterQueue(); -+ try { -+ begin(); -+ kqueueWrapper.poll(timeout); -+ } finally { -+ end(); -+ } -+ processDeregisterQueue(); -+ int numKeysUpdated = updateSelectedKeys(); -+ if (kqueueWrapper.interrupted()) { -+ // Clear the wakeup pipe -+ synchronized (interruptLock) { -+ kqueueWrapper.clearInterrupted(); -+ IOUtil.drain(fd0); -+ interruptTriggered = false; -+ } -+ } -+ return numKeysUpdated; -+ } -+ -+ /** -+ * Update the keys whose fd's have been selected by the kqueue. -+ * Add the ready keys to the ready queue. -+ */ -+ private int updateSelectedKeys() { -+ int entries = kqueueWrapper.updated; -+ int numKeysUpdated = 0; -+ SelectionKeyImpl ski; -+ int fd; -+ int i; -+ -+ updatedSet.clear(); -+ for (i = 0; i < entries; i++) { -+ fd = kqueueWrapper.getDescriptor(i); -+ ski = (SelectionKeyImpl) fdToKey.get(new Integer(fd)); -+ // ski is null in the case of an interrupt -+ if (ski != null) -+ ski.nioReadyOps(0); -+ } -+ -+ for (i = 0; i < entries; i++) { -+ fd = kqueueWrapper.getDescriptor(i); -+ ski = (SelectionKeyImpl) fdToKey.get(new Integer(fd)); -+ // ski is null in the case of an interrupt -+ if (ski != null) { -+ int rOps = kqueueWrapper.getReventOps(i); -+ if (selectedKeys.contains(ski)) { -+ if (ski.channel.translateAndUpdateReadyOps(rOps, ski)) { -+ if (!updatedSet.get(fd)) { -+ updatedSet.set(fd); -+ numKeysUpdated++; -+ } -+ } -+ } else { -+ ski.channel.translateAndUpdateReadyOps(rOps, ski); -+ if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) { -+ selectedKeys.add(ski); -+ if (!updatedSet.get(fd)) { -+ updatedSet.set(fd); -+ numKeysUpdated++; -+ } -+ } -+ } -+ } -+ } -+ return numKeysUpdated; -+ } -+ -+ protected void implClose() throws IOException { -+ if (!closed) { -+ closed = true; -+ FileDispatcher.closeIntFD(fd0); -+ FileDispatcher.closeIntFD(fd1); -+ if (kqueueWrapper != null) { -+ kqueueWrapper.release(fd0); -+ kqueueWrapper.closeKqueueFD(); -+ kqueueWrapper = null; -+ selectedKeys = null; -+ -+ // Deregister channels -+ Iterator i = keys.iterator(); -+ while (i.hasNext()) { -+ SelectionKeyImpl ski = (SelectionKeyImpl)i.next(); -+ deregister(ski); -+ SelectableChannel selch = ski.channel(); -+ if (!selch.isOpen() && !selch.isRegistered()) -+ ((SelChImpl)selch).kill(); -+ i.remove(); -+ } -+ totalChannels = 0; -+ -+ } -+ fd0 = -1; -+ fd1 = -1; -+ } -+ } -+ -+ protected void implRegister(SelectionKeyImpl ski) { -+ int fd = IOUtil.fdVal(ski.channel.getFD()); -+ fdToKey.put(new Integer(fd), ski); -+ totalChannels++; -+ keys.add(ski); -+ } -+ -+ protected void implDereg(SelectionKeyImpl ski) throws IOException { -+ int i = ski.getIndex(); -+ assert (i >= 0); -+ int fd = ski.channel.getFDVal(); -+ fdToKey.remove(new Integer(fd)); -+ kqueueWrapper.release(fd); -+ totalChannels--; -+ ski.setIndex(-1); -+ keys.remove(ski); -+ selectedKeys.remove(ski); -+ deregister((AbstractSelectionKey)ski); -+ SelectableChannel selch = ski.channel(); -+ if (!selch.isOpen() && !selch.isRegistered()) -+ ((SelChImpl)selch).kill(); -+ } -+ -+ void putEventOps(SelectionKeyImpl sk, int ops) { -+ int fd = IOUtil.fdVal(sk.channel.getFD()); -+ kqueueWrapper.setInterest(fd, ops); -+ } -+ -+ public Selector wakeup() { -+ synchronized (interruptLock) { -+ if (!interruptTriggered) { -+ kqueueWrapper.interrupt(); -+ interruptTriggered = true; -+ } -+ } -+ return this; -+ } -+ -+ static { -+ Util.load(); -+ } -+ -+} ---- ../../j2se/make/java/nio/Makefile (revision 1) -+++ ../../j2se/make/java/nio/Makefile (revision 6) -@@ -70,11 +70,15 @@ - sun/nio/ch/EPollSelectorProvider.java \ - sun/nio/ch/EPollSelectorImpl.java \ - sun/nio/ch/InheritedChannel.java \ -+ sun/nio/ch/KqueueSelectorProvider.java \ -+ sun/nio/ch/KqueueArrayWrapper.java \ -+ sun/nio/ch/KqueueSelectorImpl.java \ - sun/nio/ch/PollSelectorProvider.java \ - sun/nio/ch/PollSelectorImpl.java - - FILES_c += \ - EPollArrayWrapper.c \ -+ KqueueArrayWrapper.c \ - PollArrayWrapper.c \ - InheritedChannel.c \ - NativeThread.c -@@ -82,6 +86,7 @@ - FILES_export += \ - sun/nio/ch/EPollArrayWrapper.java \ - sun/nio/ch/InheritedChannel.java \ -+ sun/nio/ch/KqueueArrayWrapper.java \ - sun/nio/ch/NativeThread.java - endif # PLATFORM = linux - ---- ../../j2se/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java (revision 1) -+++ ../../j2se/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java (revision 6) -@@ -29,6 +29,10 @@ - public static SelectorProvider create() { - PrivilegedAction pa = new GetPropertyAction("os.name"); - String osname = (String) AccessController.doPrivileged(pa); -+ if ("FreeBSD".equals(osname)) { -+ return new sun.nio.ch.KqueueSelectorProvider(); -+ } -+ - if ("SunOS".equals(osname)) { - return new sun.nio.ch.DevPollSelectorProvider(); - } diff --git a/java/jdk16/files/pkg-deinstall.in b/java/jdk16/files/pkg-deinstall.in deleted file mode 100644 index 167d5bd28893..000000000000 --- a/java/jdk16/files/pkg-deinstall.in +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -# Set up a standard path -PATH=/usr/bin:/bin - -# Don't do anything during post-deinstall -if [ "$2" = "POST-DEINSTALL" ]; then - exit 0 -fi - -# Remove the plugin - -# Plugin location variables -BROWSERPLUGINDIR="%%LOCALBASE%%/lib/browser_plugins" -JAVAPLUGINDIR="%%JRE_HOME%%/plugin/%%ARCH%%/ns7" -PLUGIN=libjavaplugin_oji.so - -# Check if the package includes the plugin -if [ ! -e "${JAVAPLUGINDIR}/${PLUGIN}" ]; then - exit 0 -fi - -# See if the browser plugin is a link to the package plugin and remove it if so. -if [ -e "${BROWSERPLUGINDIR}/${PLUGIN}" -a \ - -L "${BROWSERPLUGINDIR}/${PLUGIN}" -a \ - x`ls -l "${BROWSERPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` = x"${JAVAPLUGINDIR}/${PLUGIN}" ]; then - rm -f "${BROWSERPLUGINDIR}/${PLUGIN}" -fi - -exit 0 diff --git a/java/jdk16/files/pkg-install.in b/java/jdk16/files/pkg-install.in deleted file mode 100644 index c5f4a70db1df..000000000000 --- a/java/jdk16/files/pkg-install.in +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -# System preference location -JRE_HOME=%%JRE_HOME%% - -# Post-install actions -if [ "$2" = "POST-INSTALL" ]; then - # Set up system preferences - if [ ! -d "${JRE_HOME}/.systemPrefs" ] ; then - mkdir -m 755 "${JRE_HOME}/.systemPrefs" - fi - if [ ! -f "${JRE_HOME}/.systemPrefs/.system.lock" ] ; then - touch "${JRE_HOME}/.systemPrefs/.system.lock" - chmod 644 "${JRE_HOME}/.systemPrefs/.system.lock" - fi - if [ ! -f "${JRE_HOME}/.systemPrefs/.systemRootModFile" ] ; then - touch "${JRE_HOME}/.systemPrefs/.systemRootModFile" - chmod 644 "${JRE_HOME}/.systemPrefs/.systemRootModFile" - fi - - # Install the plugin - BROWSERPLUGINDIR="%%LOCALBASE%%/lib/browser_plugins" - JAVAPLUGINDIR="${JRE_HOME}/plugin/%%ARCH%%/ns7" - PLUGIN=libjavaplugin_oji.so - - # Check if the browser plugin exists - if [ ! -e "${JAVAPLUGINDIR}/${PLUGIN}" ]; then - exit 0 - fi - - # Check if the plugin directory exists. - if [ ! -d "${BROWSERPLUGINDIR}" ]; then - exit 0 - fi - - # Check if the browser plugin currently exists - if [ ! -e "${BROWSERPLUGINDIR}/${PLUGIN}" ]; then - # Create symbolic link - ln -sf "${JAVAPLUGINDIR}/${PLUGIN}" \ - "${BROWSERPLUGINDIR}/${PLUGIN}" - exit 0 - fi - - # If the browser plugin exists and is a symlink, but the link - # doesn't exist, then overwrite with our plugin. - if [ -L "${BROWSERPLUGINDIR}/${PLUGIN}" ]; then - # Check if the linked to file exists. - if [ ! -e `ls -l "${BROWSERPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` ]; then - ln -sf "${JAVAPLUGINDIR}/${PLUGIN}" \ - "${BROWSERPLUGINDIR}/${PLUGIN}" - exit 0 - fi - fi - - exit 0 -fi diff --git a/java/jdk16/files/x_x2zip.c b/java/jdk16/files/x_x2zip.c deleted file mode 100644 index a57be47fc9bf..000000000000 --- a/java/jdk16/files/x_x2zip.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2007 Greg Lewis. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/types.h> -#include <err.h> -#include <errno.h> -#include <fcntl.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/stat.h> -#include <unistd.h> - -#ifndef BUFSIZ -#define BUFSIZ 0x10000 -#endif - -int -main(int argc, char* argv[]) { - char *key; - char *oname; - char buf[BUFSIZ]; - size_t keylen, olen; - int ifd, ofd, i, fileoff = 0, bufoff = 0, buflen = 0, eof = 0; - ssize_t bytes; - - if (argc < 3) { - errx(1, "Usage: x_x2zip <key> <file>"); - } - - // Key - key = argv[1]; - keylen = strlen(key); - - // Open input file - if ((ifd = open(argv[2], O_RDONLY)) == -1) { - err(1, "Can't open input file %s", argv[2]); - } - - // Open output file - olen = strlen(argv[2]) + 5; - if ((oname = (char *) malloc(olen)) == NULL) { - err(1, "Can't create output file name"); - } - if (strlcpy(oname, argv[2], olen) >= olen) { - err(1, "Can't create output file name"); - } - if (strlcat(oname, ".zip", olen) >= olen) { - err(1, "Can't create output file name"); - } - if ((ofd = open(oname, - O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR)) == -1) { - err(1, "Can't open output file %s", oname); - } - free(oname); - - while (!eof) { - // Read into the buffer - bufoff = 0; - buflen = 0; - while (1) { - if (buflen >= BUFSIZ) { - break; - } - if ((bytes = read(ifd, buf, BUFSIZ - buflen)) == -1) { - err(1, "Error reading input file"); - } - if (!bytes) { - eof = 1; - break; - } - buflen += bytes; - } - - // Decrypt - for (i = 0; i < buflen; i++) { - buf[i] = buf[i] ^ key[(fileoff + i) % keylen]; - } - - // Update file offset - fileoff += buflen; - - // Output the buffer - bufoff = 0; - while (bufoff < buflen) { - if ((bytes = write(ofd, buf + bufoff, buflen - bufoff)) == -1) { - err(1, "Error writing output file"); - } - bufoff += bytes; - } - } - - return 0; -} diff --git a/java/jdk16/pkg-descr b/java/jdk16/pkg-descr deleted file mode 100644 index f7d21ac953f1..000000000000 --- a/java/jdk16/pkg-descr +++ /dev/null @@ -1,11 +0,0 @@ -This is the latest JDK 1.6.0 patchset from the BSD Java porting project. -This port allows you to easily build a native JDK 1.6.0 for FreeBSD. - -Please note that due to the current Sun licensing policy the resulting binaries -can't be distributed and you are only permitted to use/hack it personally. -Due to the same reasons you have to manually fetch the source code and patchset -for FreeBSD. - -WWW: http://www.freebsd.org/java/ - http://www.eyesbeyond.com/freebsddom/java/index.html - http://www.sun.com/software/communitysource/java2/ |