- add VMEM_WARNING

- adjust memory calculations so this has a chance of building on systems
  with 256M of real memory. Reported by Dongsheng Song
- bring the the rest of IcedTea's icedtea-graphics.patch and fix typo that
  prevented interactive apps from launching. I expect I will eventually
  will want to convert over to using IcedTea in full in the future.
This commit is contained in:
kurt 2008-03-21 02:46:43 +00:00
parent 15bb9ed03d
commit ca7bea7a8d
8 changed files with 209 additions and 29 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.13 2008/03/19 20:44:18 kurt Exp $
# $OpenBSD: Makefile,v 1.14 2008/03/21 02:46:43 kurt Exp $
SHARED_ONLY= Yes
ONLY_FOR_ARCHS= i386 amd64
@ -10,8 +10,8 @@ B= b24
DISTFILES= openjdk7-${B}.tar.bz2 \
jdk-7-icedtea-plugs-1.6.tar.gz
PKGNAME= jdk-${V}
PKGNAME-main= jdk-${V}${B}
PKGNAME-jre= jre-${V}${B}
PKGNAME-main= jdk-${V}${B}p0
PKGNAME-jre= jre-${V}${B}p0
CATEGORIES= devel/jdk java
@ -43,6 +43,7 @@ BUILD_DEPENDS+= :jdk-1.6.0.*:devel/jdk/1.6
ALT_BOOTDIR= ${LOCALBASE}/jdk-1.6.0
.endif
VMEM_WARNING= Yes
BUILD_DEPENDS+= ::devel/apache-ant \
::archivers/zip \
::archivers/unzip \

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.1 2008/03/19 18:05:43 kurt Exp $
--- corba/make/common/shared/Platform.gmk.orig Thu Nov 8 12:00:14 2007
+++ corba/make/common/shared/Platform.gmk Thu Nov 8 12:04:28 2007
$OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.2 2008/03/21 02:46:43 kurt Exp $
--- corba/make/common/shared/Platform.gmk.orig Sat Dec 1 00:00:00 2007
+++ corba/make/common/shared/Platform.gmk Thu Mar 20 09:05:23 2008
@@ -262,6 +262,73 @@ ifeq ($(SYSTEM_UNAME), Linux)
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
endif
@ -75,23 +75,22 @@ $OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.1 2008/03/19 18:05:43
# Windows with and without CYGWIN will be slightly different
ifeq ($(SYSTEM_UNAME), Windows_NT)
PLATFORM = windows
@@ -372,8 +439,8 @@ endif
# Machines with 512Mb or less of real memory are considered low memory
@@ -373,7 +440,7 @@ endif
# build machines and adjustments will be made to prevent excessing
# system swapping during the build.
-# If we don't know, assume 512. Subtract 128 from MB for VM MAX.
# If we don't know, assume 512. Subtract 128 from MB for VM MAX.
-# Don't set VM max over 1024-128=896.
+# If we don't know, assume 512. Subtract 736 from MB for VM MAX.
+# Don't set VM max over 1024-288=736.
+# Don't set VM max over 864-128=736.
ifneq ($(MB_OF_MEMORY),)
LOW_MEMORY_MACHINE := $(shell \
if [ $(MB_OF_MEMORY) -le 512 ] ; then \
@@ -383,9 +450,9 @@ ifneq ($(MB_OF_MEMORY),)
@@ -382,10 +449,10 @@ ifneq ($(MB_OF_MEMORY),)
echo "false"; \
fi)
MAX_VM_MEMORY := $(shell \
if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
- expr $(MB_OF_MEMORY) '-' 128 ; \
+ expr $(MB_OF_MEMORY) '-' 288 ; \
- if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
+ if [ $(MB_OF_MEMORY) -le 864 ] ; then \
expr $(MB_OF_MEMORY) '-' 128 ; \
else \
- echo "896"; \
+ echo "736"; \

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.1 2008/03/19 18:05:45 kurt Exp $
--- jdk/make/common/shared/Platform.gmk.orig Tue Oct 30 05:04:22 2007
+++ jdk/make/common/shared/Platform.gmk Wed Nov 7 14:51:12 2007
$OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.2 2008/03/21 02:46:43 kurt Exp $
--- jdk/make/common/shared/Platform.gmk.orig Sat Dec 1 00:00:00 2007
+++ jdk/make/common/shared/Platform.gmk Thu Mar 20 09:06:34 2008
@@ -275,6 +275,73 @@ ifeq ($(SYSTEM_UNAME), Linux)
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
endif
@ -75,23 +75,22 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.1 2008/03/19 18:05:45 ku
# Windows with and without CYGWIN will be slightly different
ifeq ($(SYSTEM_UNAME), Windows_NT)
PLATFORM = windows
@@ -389,8 +456,8 @@ endif
# Machines with 512Mb or less of real memory are considered low memory
@@ -390,7 +457,7 @@ endif
# build machines and adjustments will be made to prevent excessing
# system swapping during the build.
-# If we don't know, assume 512. Subtract 128 from MB for VM MAX.
# If we don't know, assume 512. Subtract 128 from MB for VM MAX.
-# Don't set VM max over 1024-128=896.
+# If we don't know, assume 512. Subtract 288 from MB for VM MAX.
+# Don't set VM max over 1024-288=736.
+# Don't set VM max over 864-128=736.
ifneq ($(MB_OF_MEMORY),)
LOW_MEMORY_MACHINE := $(shell \
if [ $(MB_OF_MEMORY) -le 512 ] ; then \
@@ -400,9 +467,9 @@ ifneq ($(MB_OF_MEMORY),)
@@ -399,10 +466,10 @@ ifneq ($(MB_OF_MEMORY),)
echo "false"; \
fi)
MAX_VM_MEMORY := $(shell \
if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
- expr $(MB_OF_MEMORY) '-' 128 ; \
+ expr $(MB_OF_MEMORY) '-' 288 ; \
- if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
+ if [ $(MB_OF_MEMORY) -le 864 ] ; then \
expr $(MB_OF_MEMORY) '-' 128 ; \
else \
- echo "896"; \
+ echo "736"; \

View File

@ -0,0 +1,61 @@
$OpenBSD: patch-jdk_src_share_classes_javax_swing_text_WrappedPlainView_java,v 1.1 2008/03/21 02:46:43 kurt Exp $
--- jdk/src/share/classes/javax/swing/text/WrappedPlainView.java.orig Sat Dec 1 00:00:00 2007
+++ jdk/src/share/classes/javax/swing/text/WrappedPlainView.java Thu Mar 20 14:10:58 2008
@@ -236,9 +236,6 @@ public class WrappedPlainView extends BoxView implemen
Segment segment = SegmentCache.getSharedSegment();
loadText(segment, p0, p1);
int currentWidth = getWidth();
- if (currentWidth == Integer.MAX_VALUE) {
- currentWidth = (int) getDefaultSpan(View.X_AXIS);
- }
if (wordWrap) {
p = p0 + Utilities.getBreakLocation(segment, metrics,
tabBase, tabBase + currentWidth,
@@ -324,20 +321,6 @@ public class WrappedPlainView extends BoxView implemen
tabSize = getTabSize() * metrics.charWidth('m');
}
- /**
- * Return reasonable default values for the view dimensions. The standard
- * text terminal size 80x24 is pretty suitable for the wrapped plain view.
- */
- private float getDefaultSpan(int axis) {
- switch (axis) {
- case View.X_AXIS:
- return 80 * metrics.getWidths()['M'];
- case View.Y_AXIS:
- return 24 * metrics.getHeight();
- default:
- throw new IllegalArgumentException("Invalid axis: " + axis);
- }
- }
// --- TabExpander methods ------------------------------------------
@@ -573,19 +556,16 @@ public class WrappedPlainView extends BoxView implemen
if (width == Integer.MAX_VALUE) {
// We have been initially set to MAX_VALUE, but we don't
// want this as our preferred.
- width = getDefaultSpan(axis);
+ return 100f;
}
return width;
case View.Y_AXIS:
- if (getDocument().getLength() > 0) {
- if ((lineCount < 0) || widthChanging) {
- breakLines(getStartOffset());
- }
- return lineCount * metrics.getHeight();
- } else {
- return getDefaultSpan(axis);
- }
- default:
+ if (lineCount < 0 || widthChanging) {
+ breakLines(getStartOffset());
+ }
+ int h = lineCount * metrics.getHeight();
+ return h;
+ default:
throw new IllegalArgumentException("Invalid axis: " + axis);
}
}

View File

@ -0,0 +1,82 @@
$OpenBSD: patch-jdk_src_share_classes_sun_awt_image_SunWritableRaster_java,v 1.1 2008/03/21 02:46:43 kurt Exp $
--- jdk/src/share/classes/sun/awt/image/SunWritableRaster.java.orig Thu Mar 20 14:05:33 2008
+++ jdk/src/share/classes/sun/awt/image/SunWritableRaster.java Thu Mar 20 14:09:26 2008
@@ -56,50 +56,44 @@ public class SunWritableRaster extends WritableRaster
public StateTrackableDelegate getTrackable(DataBuffer db);
}
+/*
public static void setDataStealer(DataStealer ds) {
if (stealer != null) {
throw new InternalError("Attempt to set DataStealer twice");
}
stealer = ds;
}
+*/
public static byte[] stealData(DataBufferByte dbb, int bank) {
- return stealer.getData(dbb, bank);
+ return dbb.getData(bank);
}
public static short[] stealData(DataBufferUShort dbus, int bank) {
- return stealer.getData(dbus, bank);
+ return dbus.getData(bank);
}
public static int[] stealData(DataBufferInt dbi, int bank) {
- return stealer.getData(dbi, bank);
+ return dbi.getData(bank);
}
public static StateTrackableDelegate stealTrackable(DataBuffer db) {
- return stealer.getTrackable(db);
+ return StateTrackableDelegate.UNTRACKABLE_DELEGATE;
}
public static void markDirty(DataBuffer db) {
- stealer.getTrackable(db).markDirty();
}
public static void markDirty(WritableRaster wr) {
- if (wr instanceof SunWritableRaster) {
- ((SunWritableRaster) wr).markDirty();
- } else {
- markDirty(wr.getDataBuffer());
- }
}
public static void markDirty(Image img) {
- SurfaceData.getPrimarySurfaceData(img).markDirty();
}
private StateTrackableDelegate theTrackable;
public SunWritableRaster(SampleModel sampleModel, Point origin) {
super(sampleModel, origin);
- theTrackable = stealTrackable(dataBuffer);
}
public SunWritableRaster(SampleModel sampleModel,
@@ -107,7 +101,6 @@ public class SunWritableRaster extends WritableRaster
Point origin)
{
super(sampleModel, dataBuffer, origin);
- theTrackable = stealTrackable(dataBuffer);
}
public SunWritableRaster(SampleModel sampleModel,
@@ -117,13 +110,11 @@ public class SunWritableRaster extends WritableRaster
WritableRaster parent)
{
super(sampleModel, dataBuffer, aRegion, sampleModelTranslate, parent);
- theTrackable = stealTrackable(dataBuffer);
}
/**
* Mark the TrackableDelegate of the associated DataBuffer dirty.
*/
public final void markDirty() {
- theTrackable.markDirty();
}
}

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-jdk_src_share_native_sun_awt_image_imageInitIDs_c,v 1.1 2008/03/21 02:46:43 kurt Exp $
--- jdk/src/share/native/sun/awt/image/imageInitIDs.c.orig Thu Mar 20 13:53:02 2008
+++ jdk/src/share/native/sun/awt/image/imageInitIDs.c Thu Mar 20 13:55:04 2008
@@ -143,7 +143,7 @@ Java_java_awt_image_SinglePixelPackedSampleModel_initI
jclass cls) {
g_SPPSMmaskArrID = (*env)->GetFieldID(env, cls, "bitMasks", "[I");
g_SPPSMmaskOffID = (*env)->GetFieldID(env, cls, "bitOffsets", "[I");
- g_SPPSMnBitsID = (*env)->GetFieldID(env, cls, "bitSizes", "[I");
+ g_SPPSMnBitsID = (*env)->GetFieldID(env, cls, "sampleSize", "[I");
g_SPPSMmaxBitID = (*env)->GetFieldID(env, cls, "maxBitSize", "I");
if (g_SPPSMmaskArrID == NULL || g_SPPSMmaskOffID == NULL ||
@@ -226,14 +226,5 @@ Java_java_awt_image_Kernel_initIDs(JNIEnv *env, jclass
|| g_KernelDataID == NULL)
{
JNU_ThrowNullPointerException(env, "Unable to grab field ids");
- }
-}
-
-JNIEXPORT void JNICALL
-Java_java_awt_image_DataBufferInt_initIDs(JNIEnv *env, jclass cls) {
- g_DataBufferIntPdataID = (*env)->GetFieldID(env, cls, "pData", "J");
- if (g_DataBufferIntPdataID == NULL) {
- JNU_ThrowNullPointerException(env, "Unable to grab DataBufferInt.pData");
- return;
}
}

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-jdk_src_share_native_sun_awt_image_imageInitIDs_h,v 1.1 2008/03/21 02:46:43 kurt Exp $
--- jdk/src/share/native/sun/awt/image/imageInitIDs.h.orig Thu Mar 20 14:05:05 2008
+++ jdk/src/share/native/sun/awt/image/imageInitIDs.h Thu Mar 20 14:05:18 2008
@@ -120,7 +120,4 @@ IMGEXTERN jfieldID g_KernelXOriginID;
IMGEXTERN jfieldID g_KernelYOriginD;
IMGEXTERN jfieldID g_KernelDataID;
-/* DataBufferInt ids */
-IMGEXTERN jfieldID g_DataBufferIntPdataID;
-
#endif /* IMAGEINITIDS_H */

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-jdk_src_share_native_sun_java2d_cmm_lcms_LCMS_c,v 1.1 2008/03/19 18:05:46 kurt Exp $
$OpenBSD: patch-jdk_src_share_native_sun_java2d_cmm_lcms_LCMS_c,v 1.2 2008/03/21 02:46:43 kurt Exp $
--- jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c.orig Wed Mar 19 10:10:10 2008
+++ jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c Wed Mar 19 10:11:30 2008
@@ -505,5 +505,5 @@ JNIEXPORT void JNICALL Java_sun_java2d_cmm_lcms_LCMS_i
@ -6,5 +6,5 @@ $OpenBSD: patch-jdk_src_share_native_sun_java2d_cmm_lcms_LCMS_c,v 1.1 2008/03/19
IL_nextRowOffset_fID = (*env)->GetFieldID (env, IL, "nextRowOffset", "I");
- PF_ID_fID = (*env)->GetFieldID (env, Pf, "ID", "J");
+ PF_ID_fID = (*env)->GetFieldID (env, Pf, "profiledID", "J");
+ PF_ID_fID = (*env)->GetFieldID (env, Pf, "profileID", "J");
}