icedtea-sound and java9

Andrew Hughes gnu.andrew at redhat.com
Tue Nov 7 15:32:39 UTC 2017


On 3 November 2017 at 06:04, Fridrich Strba <fridrich.strba at suse.com> wrote:
> On 02/11/17 19:13, Andrew Hughes wrote:
>> Thanks for the patch. It's certainly interesting. I do think we could support
>> OpenJDK >= 9 without destroying support for earlier versions though. I'll
>> look into it when I get chance to look at 9 / IcedTea 4.x.
>
> Yes, for sure, one can condition the whole thing on used javac version.
> I just did not do it, since I am using this patch as is only in java >= 9.
>
>> Are all those modules really necessary in the command above? That looks
>> horrible.
>
> Yes, horrible indeed, but the module that you don't mention will be not
> in the resulting jdk, so ugly as it is, it is necessary. Although, in my
> spec file, it is not looking as scary as that:
>
> %if %{with_pulseaudio}
> # Build the pulseaudio plugin
> pushd icedtea-sound-%{icedtea_sound_version}
> autoreconf --force --install
> %configure \
>     --with-jdk-home=$JAVA_HOME \
>     --disable-docs
> make %{?_smp_mflags}
> cp icedtea-sound.jar $JAVA_HOME/../jmods/
> cp build/native/libicedtea-sound.so $JAVA_HOME/lib/
> echo "#Config file to enable PulseAudio support" >
> $JAVA_HOME/conf/pulseaudio.properties
> echo "" >> $JAVA_HOME/conf/pulseaudio.properties
> echo
> "javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider"
>>> $JAVA_HOME/conf/pulseaudio.properties
> echo
> "javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider"
>>> $JAVA_HOME/conf/pulseaudio.properties
> echo
> "javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider"
>>> $JAVA_HOME/conf/pulseaudio.properties
> echo
> "javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider"
>>> $JAVA_HOME/conf/pulseaudio.properties
> echo "" >> $JAVA_HOME/conf/pulseaudio.properties
> popd
> # Merge the icedtea-sound into the JDK
> source $JAVA_HOME/release; export MODULES
> ADDMODULES=org.icedtea.sound; for i in $MODULES; do
> ADDMODULES="$ADDMODULES,$i"; done; export ADDMODULES
> $JAVA_HOME/bin/jlink --module-path $JAVA_HOME/../jmods --add-modules
> $ADDMODULES --output $JAVA_HOME/../newjdk
> cp -rf $JAVA_HOME/../newjdk/* $JAVA_HOME/
> rm -rf $JAVA_HOME/../newjdk
> %endif
>
> Where JAVA_HOME points there into the just built jdk root.
>
> Cheers
>
> Fridrich
>
> P.S.: I tried to grep the code around the place and I cannot see where
> on the earth the pulseaudio.properties is read. I have even the
> impression that it is not needed. Nevertheless, the attraction of cargo
> cult is yuuge.
>

I should maybe look at an install stage for the above when I have time.

I think it may be intended to be appended to sound.properties (if that
still exists
in 9), though that would have the effect of enabling the provider as default.

Omair should know more.
-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Web Site: http://fuseyism.com
Twitter: https://twitter.com/gnu_andrew_java
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222


More information about the distro-pkg-dev mailing list