diff --git a/brltty.spec b/brltty.spec index ebc24bf..edfb382 100644 --- a/brltty.spec +++ b/brltty.spec @@ -147,13 +147,20 @@ This package provides the OCaml binding for BrlAPI. %patch4 -p1 -b .loadLibrary %build +# Add the openjdk include directories to CPPFLAGS for i in -I/usr/lib/jvm/java/include{,/linux}; do java_inc="$java_inc $i" done +export CPPFLAGS="$java_inc" CFLAGS="%{optflags} -fno-strict-aliasing" \ + +export CFLAGS="%{optflags} -fno-strict-aliasing" +export CXXFLAGS="%{optflags} -fno-strict-aliasing" + # there is no curses packages in BuildRequires, so the package builds # without them in mock; let's express this decision explicitly -%configure CPPFLAGS="$java_inc" CFLAGS="%{optflags} -fno-strict-aliasing" \ - CXXFLAGS="%{optflags} -fno-strict-aliasing" --disable-stripping --without-curses \ +%configure \ + --disable-stripping \ + --without-curses \ %if %{with_speech_dispatcher} --with-speechd=%{_prefix} \ %endif