icedtea-sound and java9
Fridrich Strba
fridrich.strba at suse.com
Fri Nov 3 06:04:00 UTC 2017
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20171103/000277cb/signature.asc>
More information about the distro-pkg-dev
mailing list