aboutsummaryrefslogtreecommitdiff
path: root/java/openjdk6
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2011-02-11 22:02:37 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2011-02-11 22:02:37 +0000
commit27acea6b212a7f390b45bda312907d026300ae55 (patch)
tree7c2cffd91300662459de267a15be334cf125e07e /java/openjdk6
parent4edd8ea98742f450a403e6ce4bb0f931d1aecc2b (diff)
downloadports-27acea6b212a7f390b45bda312907d026300ae55.tar.gz
ports-27acea6b212a7f390b45bda312907d026300ae55.zip
Notes
Diffstat (limited to 'java/openjdk6')
-rw-r--r--java/openjdk6/Makefile11
-rw-r--r--java/openjdk6/files/alsa-disable.patch42
-rw-r--r--java/openjdk6/files/alsa-enable.patch36
-rw-r--r--java/openjdk6/files/patch-set68
-rw-r--r--java/openjdk6/files/patch-test2
5 files changed, 115 insertions, 44 deletions
diff --git a/java/openjdk6/Makefile b/java/openjdk6/Makefile
index d43575b91305..c0e5788c8b90 100644
--- a/java/openjdk6/Makefile
+++ b/java/openjdk6/Makefile
@@ -7,7 +7,7 @@
PORTNAME= openjdk6
PORTVERSION= b21
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
https://java.net/downloads/jaxp/jdk7/:jaxp \
@@ -45,6 +45,7 @@ OPENJDK_BUILDDATE= 20_jan_2011
OPTIONS= DEBUG "Enable legacy debugging support" off \
FASTDEBUG "Include fastdebug build" off \
IPV6 "Enable IPv6 support" off \
+ SOUND "Enable sound support" off \
WEB "Enable the browser plugin and Java Web Start" off \
POLICY "Install the Unlimited Strength Policy Files" off \
TEST "Add support for running regression test" off
@@ -144,6 +145,14 @@ OPENJDK_OSARCH= bsd-${ARCH:S/i386/i586/}-debug
OPENJDK_OSARCH= bsd-${ARCH:S/i386/i586/}
.endif
+.if defined(WITH_SOUND)
+EXTRA_PATCHES+= ${FILESDIR}/alsa-enable.patch
+LIB_DEPENDS+= asound.2:${PORTSDIR}/audio/alsa-lib
+RUN_DEPENDS+= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins
+.else
+EXTRA_PATCHES+= ${FILESDIR}/alsa-disable.patch
+.endif
+
.if defined(WITH_WEB)
DISTFILES+= ${ITWEBFILE}:itweb
EXTRACT_ONLY+= ${ITWEBFILE}
diff --git a/java/openjdk6/files/alsa-disable.patch b/java/openjdk6/files/alsa-disable.patch
new file mode 100644
index 000000000000..5c4d6d29c5a1
--- /dev/null
+++ b/java/openjdk6/files/alsa-disable.patch
@@ -0,0 +1,42 @@
+--- jdk/make/javax/sound/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/javax/sound/Makefile 2011-02-01 17:46:55.000000000 -0500
+@@ -105,6 +105,19 @@
+ #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
+ endif # PLATFORM linux
+
++# XXXBSD: ???
++ifeq ($(PLATFORM), bsd)
++ # build with empty MIDI i/o
++ INCLUDE_MIDI = TRUE
++ # build with empty ports
++ INCLUDE_PORTS = TRUE
++ # build with empty direct audio
++ INCLUDE_DAUDIO = TRUE
++ ifeq ($(OS_VENDOR), OpenBSD)
++ LDFLAGS += -lossaudio
++ endif
++endif # PLATFORM bsd
++
+ ifeq ($(PLATFORM), solaris)
+ ifneq ($(ARCH), amd64)
+ # build with ports and direct audio
+--- jdk/src/share/native/com/sun/media/sound/Platform.c 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/com/sun/media/sound/Platform.c 2011-02-01 17:46:55.000000000 -0500
+@@ -99,5 +99,17 @@
+ return com_sun_media_sound_Platform_LIB_ALSA;
+ }
+ #endif
++#if (X_PLATFORM == X_BSD)
++ switch (feature) {
++ case com_sun_media_sound_Platform_FEATURE_MIDIIO:
++ return com_sun_media_sound_Platform_LIB_MAIN;
++ case com_sun_media_sound_Platform_FEATURE_PORTS:
++ return com_sun_media_sound_Platform_LIB_MAIN;
++ case com_sun_media_sound_Platform_FEATURE_DIRECT_AUDIO:
++ // XXXBSD: When native Direct Audio support is ported change
++ // this back to returning com_sun_media_sound_Platform_LIB_MAIN
++ return 0;
++ }
++#endif
+ return 0;
+ }
diff --git a/java/openjdk6/files/alsa-enable.patch b/java/openjdk6/files/alsa-enable.patch
new file mode 100644
index 000000000000..4f7201ef72bb
--- /dev/null
+++ b/java/openjdk6/files/alsa-enable.patch
@@ -0,0 +1,36 @@
+--- jdk/make/javax/sound/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/javax/sound/Makefile 2011-02-11 16:20:52.000000000 -0500
+@@ -105,6 +105,15 @@
+ #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
+ endif # PLATFORM linux
+
++ifeq ($(PLATFORM), bsd)
++ # build with empty MIDI i/o
++ INCLUDE_MIDI = TRUE
++ # ALSA handles directaudio and ports
++ SUBDIRS += jsoundalsa
++ EXTRA_SOUND_JNI_LIBS += jsoundalsa
++ #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
++endif # PLATFORM bsd
++
+ ifeq ($(PLATFORM), solaris)
+ ifneq ($(ARCH), amd64)
+ # build with ports and direct audio
+--- jdk/src/share/native/com/sun/media/sound/Platform.c 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/com/sun/media/sound/Platform.c 2011-02-11 16:20:52.000000000 -0500
+@@ -99,5 +99,15 @@
+ return com_sun_media_sound_Platform_LIB_ALSA;
+ }
+ #endif
++#if (X_PLATFORM == X_BSD)
++ switch (feature) {
++ case com_sun_media_sound_Platform_FEATURE_MIDIIO:
++ return com_sun_media_sound_Platform_LIB_MAIN;
++ case com_sun_media_sound_Platform_FEATURE_PORTS:
++ return com_sun_media_sound_Platform_LIB_ALSA;
++ case com_sun_media_sound_Platform_FEATURE_DIRECT_AUDIO:
++ return com_sun_media_sound_Platform_LIB_ALSA;
++ }
++#endif
+ return 0;
+ }
diff --git a/java/openjdk6/files/patch-set b/java/openjdk6/files/patch-set
index 8b4cb0066108..ac9ce2ef6394 100644
--- a/java/openjdk6/files/patch-set
+++ b/java/openjdk6/files/patch-set
@@ -8554,28 +8554,6 @@
FILES_windows = \
PLATFORM_API_WinOS_MidiIn.c \
PLATFORM_API_WinOS_MidiOut.c \
---- jdk/make/javax/sound/Makefile 2011-01-20 18:54:05.000000000 -0500
-+++ jdk/make/javax/sound/Makefile 2011-02-01 17:46:55.000000000 -0500
-@@ -105,6 +105,19 @@
- #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
- endif # PLATFORM linux
-
-+# XXXBSD: ???
-+ifeq ($(PLATFORM), bsd)
-+ # build with empty MIDI i/o
-+ INCLUDE_MIDI = TRUE
-+ # build with empty ports
-+ INCLUDE_PORTS = TRUE
-+ # build with empty direct audio
-+ INCLUDE_DAUDIO = TRUE
-+ ifeq ($(OS_VENDOR), OpenBSD)
-+ LDFLAGS += -lossaudio
-+ endif
-+endif # PLATFORM bsd
-+
- ifeq ($(PLATFORM), solaris)
- ifneq ($(ARCH), amd64)
- # build with ports and direct audio
--- jdk/make/javax/sound/SoundDefs.gmk 2011-01-20 18:54:05.000000000 -0500
+++ jdk/make/javax/sound/SoundDefs.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -40,6 +40,10 @@
@@ -8589,6 +8567,32 @@
ifeq ($(PLATFORM), solaris)
CPPFLAGS += -DX_PLATFORM=X_SOLARIS
+--- jdk/make/javax/sound/jsoundalsa/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/javax/sound/jsoundalsa/Makefile 2011-02-11 16:20:52.000000000 -0500
+@@ -65,6 +65,15 @@
+ $(MIDIFILES_export) \
+ $(PORTFILES_export)
+
++ifeq ($(PLATFORM), bsd)
++LDFLAGS += -L$(PACKAGE_PATH)/lib -lasound
++
++CPPFLAGS += \
++ -DUSE_DAUDIO=TRUE \
++ -DUSE_PORTS=TRUE \
++ -I$(PACKAGE_PATH)/include \
++ -I$(SHARE_SRC)/native/com/sun/media/sound
++else
+ LDFLAGS += -lasound
+
+ CPPFLAGS += \
+@@ -73,6 +82,7 @@
+ -DUSE_PLATFORM_MIDI_OUT=TRUE \
+ -DUSE_PLATFORM_MIDI_IN=TRUE \
+ -I$(SHARE_SRC)/native/com/sun/media/sound
++endif
+
+ #
+ # Add to the ambient VPATH.
--- jdk/make/jpda/back/Makefile 2011-01-20 18:54:05.000000000 -0500
+++ jdk/make/jpda/back/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -49,8 +49,10 @@
@@ -9764,26 +9768,6 @@
#include "SoundDefs.h"
#include "DirectAudio.h"
#include "Utilities.h"
---- jdk/src/share/native/com/sun/media/sound/Platform.c 2011-01-20 18:54:37.000000000 -0500
-+++ jdk/src/share/native/com/sun/media/sound/Platform.c 2011-02-01 17:46:55.000000000 -0500
-@@ -99,5 +99,17 @@
- return com_sun_media_sound_Platform_LIB_ALSA;
- }
- #endif
-+#if (X_PLATFORM == X_BSD)
-+ switch (feature) {
-+ case com_sun_media_sound_Platform_FEATURE_MIDIIO:
-+ return com_sun_media_sound_Platform_LIB_MAIN;
-+ case com_sun_media_sound_Platform_FEATURE_PORTS:
-+ return com_sun_media_sound_Platform_LIB_MAIN;
-+ case com_sun_media_sound_Platform_FEATURE_DIRECT_AUDIO:
-+ // XXXBSD: When native Direct Audio support is ported change
-+ // this back to returning com_sun_media_sound_Platform_LIB_MAIN
-+ return 0;
-+ }
-+#endif
- return 0;
- }
--- jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2011-01-20 18:54:37.000000000 -0500
+++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2011-02-01 17:46:55.000000000 -0500
@@ -31,6 +31,7 @@
diff --git a/java/openjdk6/files/patch-test b/java/openjdk6/files/patch-test
index b3593c658f3a..cf1c1050be00 100644
--- a/java/openjdk6/files/patch-test
+++ b/java/openjdk6/files/patch-test
@@ -1,4 +1,4 @@
---- jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh.orig 2011-02-10 12:34:40.000000000 -0500
+--- jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2011-02-10 12:34:40.000000000 -0500
+++ jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2011-02-10 12:37:00.000000000 -0500
@@ -72,6 +72,16 @@
done