mplayer: use pkgconfig for sndio; from Brad

This commit is contained in:
sthen 2022-02-27 12:41:51 +00:00
parent 0227f0a14e
commit 65d2f6e06d

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-configure,v 1.92 2021/12/07 20:03:57 sthen Exp $
$OpenBSD: patch-configure,v 1.93 2022/02/27 12:41:51 sthen Exp $
Index: configure
--- configure.orig
@ -151,7 +151,26 @@ Index: configure
# Checking assembler (_as) compatibility...
# Added workaround for older as that reads from stdin by default - atmos
as_version=$(echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
@@ -6553,7 +6570,7 @@ echocheck "cdparanoia"
@@ -6365,12 +6382,16 @@ fi #if irix
echocheck "sndio audio"
if test "$_sndio" = auto ; then
_sndio=no
- statement_check sndio.h 'sio_open(SIO_DEVANY, SIO_PLAY, 0)' -lsndio && _sndio=yes
+ if $_pkg_config --exists 'sndio' ; then
+ header_check sndio.h $($_pkg_config --libs --cflags sndio) &&
+ _sndio=yes
+ fi
fi
if test "$_sndio" = yes ; then
def_sndio='#define CONFIG_SNDIO_AUDIO 1'
aomodules="sndio $aomodules"
- extra_ldflags="$extra_ldflags -lsndio"
+ extra_ldflags="$extra_ldflags $($_pkg_config --libs sndio)"
+ extra_cflags="$extra_cflags $($_pkg_config --cflags sndio)"
else
def_sndio='#undef CONFIG_SNDIO_AUDIO'
noaomodules="sndio $noaomodules"
@@ -6553,7 +6574,7 @@ echocheck "cdparanoia"
if test "$_cdparanoia" = auto ; then
_cdparanoia=no
for inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
@ -160,7 +179,7 @@ Index: configure
_cdparanoia=yes && extra_cflags="$extra_cflags $inc_tmp" && break
done
fi
@@ -8488,6 +8505,7 @@ extra_ldflags="$extra_ldflags $libm"
@@ -8488,6 +8509,7 @@ extra_ldflags="$extra_ldflags $libm"
# XML documentation tests
echocheck "XML catalogs"
for try_catalog in \
@ -168,7 +187,7 @@ Index: configure
/etc/sgml/catalog \
/usr/share/xml/docbook/*/catalog.xml \
/opt/local/share/xml/docbook-xml/*/catalog.xml \
@@ -8515,6 +8533,7 @@ fi
@@ -8515,6 +8537,7 @@ fi
echocheck "XML chunked stylesheet"
for try_chunk_xsl in \
@ -176,7 +195,7 @@ Index: configure
/usr/share/xml/docbook/*/html/chunk.xsl \
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \
/usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl \
@@ -8540,6 +8559,7 @@ fi
@@ -8540,6 +8563,7 @@ fi
echocheck "XML monolithic stylesheet"
for try_docbook_xsl in \
@ -184,7 +203,7 @@ Index: configure
/usr/share/xml/docbook/*/html/docbook.xsl \
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \
/usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl \
@@ -8593,6 +8613,7 @@ EOF
@@ -8593,6 +8617,7 @@ EOF
echocheck "XML DTD"
#FIXME: This should prefer higher version numbers, not the other way around ..
for try_dtd in \
@ -192,7 +211,7 @@ Index: configure
/usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \
/usr/share/xml/docbook/*/docbookx.dtd \
/usr/share/sgml/docbook/*/docbookx.dtd \
@@ -9767,9 +9788,6 @@ cmp -s "$TMPH" config.h || mv -f "$TMPH" config.h
@@ -9767,9 +9792,6 @@ cmp -s "$TMPH" config.h || mv -f "$TMPH" config.h
############################################################################
@ -202,7 +221,7 @@ Index: configure
# Create avconfig.h for FFmpeg.
cat > "$TMPH" << EOF
/* Generated by mpconfigure */
@@ -9861,8 +9879,6 @@ print_enabled_components libavformat/demuxer_list.c AV
@@ -9861,8 +9883,6 @@ print_enabled_components libavformat/demuxer_list.c AV
print_enabled_components libavformat/muxer_list.c AVOutputFormat muxer_list $libavmuxers
print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $libavprotocols
print_enabled_filters libavfilter/filter_list.c AVFilter filter_list $libavfilters