freebsd-ports/java/openjdk6/files/alsa-disable.patch
Jung-uk Kim 27acea6b21 Add experimental support for sound via ALSA pcm-oss plugin. This feature
is disabled by default because MIDI plugin for OSS does not exist, i.e.,
(hardware) MIDI sequencer is not supported.  However, softsynth (Gervill)
works fine as it uses sampled sound.
2011-02-11 22:02:37 +00:00

42 lines
1.4 KiB
Diff

--- 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;
}