[packages/mplayer] More fixes for cflags and ldflags

baggins baggins at pld-linux.org
Fri Aug 15 13:23:51 CEST 2025


commit bb46a34fbb2e04073a3b5b12c4f37582c0860a0a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Aug 15 15:23:25 2025 +0200

    More fixes for cflags and ldflags

 mplayer-ldflags.patch | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++
 mplayer.spec          |  2 +-
 2 files changed, 65 insertions(+), 1 deletion(-)
---
diff --git a/mplayer.spec b/mplayer.spec
index e22524e..bc8f0c7 100644
--- a/mplayer.spec
+++ b/mplayer.spec
@@ -490,7 +490,7 @@ CFLAGS="%{rpmcflags} %{?with_hidden_visibility:-fvisibility=hidden} %{?with_shar
 CFLAGS="$CFLAGS -I%{_includedir}/xvid%{?with_directfb: -I%{_includedir}/directfb} -DHAVE_GSM_H=1"
 %{?with_bs2b:CFLAGS="$CFLAGS -I%{_includedir}/bs2b"}
 %{?with_smb:CFLAGS="$CFLAGS $(pkg-config --cflags smbclient)"}
-%{?with_openjpeg:CFLAGS="$CFLAGS pkg-config --cflags libopenjp2)"}
+%{?with_openjpeg:CFLAGS="$CFLAGS $(pkg-config --cflags libopenjp2)"}
 
 # NOTE:
 # - lircc refers to obsolete liblircc library (used in LIRCCD < 0.9)
diff --git a/mplayer-ldflags.patch b/mplayer-ldflags.patch
index 31b213d..a2f218b 100644
--- a/mplayer-ldflags.patch
+++ b/mplayer-ldflags.patch
@@ -20,6 +20,70 @@
    --extra-ldflags=*)
      extra_ldflags=$(option_value $ac_option)
      ;;
+@@ -6486,6 +6486,13 @@
+ echores "$_bluray"
+ 
+ echocheck "dvdread"
++if test "$_dvdread" = yes ; then
++    _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
++    _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
++    extra_cflags="$extra_cflags $_dvdreadcflags"
++    extra_ldflags="$extra_ldflags $_dvdreadlibs"
++fi
++echocheck "dvdread"
+ if test "$_dvdread" = auto ; then
+   _dvdread=no
+     _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
+@@ -6939,6 +6939,9 @@
+   extra_ldflags="$extra_ldflags -logg -lvorbisidec"
+ elif test "$_libvorbis" = yes ; then
+   _vorbis=yes
++  for vorbislibs in '-lvorbisenc -lvorbis -logg' '-lvorbis -logg' ; do
++    statement_check vorbis/vorbisenc.h 'vorbis_encode_ctl(0, 0, 0); ogg_stream_clear(0)' $vorbislibs && _libvorbis=yes && break
++  done
+   def_vorbis='#define CONFIG_OGGVORBIS 1'
+   codecmodules="libvorbis $codecmodules"
+   res_comment="libvorbis"
+@@ -7023,11 +7023,12 @@
+ if test "$_mpg123" = auto; then
+   _mpg123=no
+   statement_check mpg123.h 'mpg123_param(NULL, MPG123_RESYNC_LIMIT, -1, 0.)' -lmpg123 &&
+-      _mpg123=yes && extra_ldflags="$extra_ldflags -lmpg123"
++      _mpg123=yes
+ fi
+ if test "$_mpg123" = yes ; then
+   def_mpg123='#define CONFIG_MPG123 1'
+   codecmodules="mpg123 $codecmodules"
++  extra_ldflags="$extra_ldflags -lmpg123"
+ else
+   nocodecmodules="mpg123 $nocodecmodules"
+ fi
+@@ -7038,11 +7039,12 @@
+ if test "$_liba52" = auto ; then
+   _liba52=no
+   statement_check_broken inttypes.h a52dec/a52.h 'a52_state_t *testHand; testHand=a52_init(0)' -la52 &&
+-    _liba52=yes && extra_ldflags="$extra_ldflags -la52"
++    _liba52=yes
+ fi
+ if test "$_liba52" = yes ; then
+   def_liba52='#define CONFIG_LIBA52 1'
+   codecmodules="liba52 $codecmodules"
++  extra_ldflags="$extra_ldflags -la52"
+ else
+   nocodecmodules="liba52 $nocodecmodules"
+ fi
+@@ -7066,7 +7068,10 @@
+ if test "$_libmpeg2" = auto ; then
+   _libmpeg2=no
+   header_check_broken stdint.h mpeg2dec/mpeg2.h -lmpeg2 &&
+-    _libmpeg2=yes && extra_ldflags="$extra_ldflags -lmpeg2"
++    _libmpeg2=yes
++fi
++if test "$_libmpeg2" = yes ; then
++    extra_ldflags="$extra_ldflags -lmpeg2"
+ fi
+ 
+ def_libmpeg2='#undef CONFIG_LIBMPEG2'
 @@ -8278,7 +8282,7 @@ echores "$_crash_debug"
  
  echocheck "compiler support for noexecstack"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mplayer.git/commitdiff/bb46a34fbb2e04073a3b5b12c4f37582c0860a0a



More information about the pld-cvs-commit mailing list