openbsd-ports/x11/mplayer/patches/patch-configure
ajacoutot 59cb7e8f32 Update to mplayer-20180916.
from Brad (maintainer)
2018-09-22 07:06:05 +00:00

217 lines
9.0 KiB
Plaintext

$OpenBSD: patch-configure,v 1.82 2018/09/22 07:06:05 ajacoutot Exp $
Index: configure
--- configure.orig
+++ configure
@@ -1497,39 +1497,39 @@ echo configuration: $configuration > "$TMPLOG"
echo >> "$TMPLOG"
-# local FFmpeg checkout handling
-if test -e ffmpeg/.svn ; then
- echo "You have an outdated FFmpeg SVN checkout in ffmpeg/, please (re)move or replace it"
- exit 1
-fi
+## local FFmpeg checkout handling
+#if test -e ffmpeg/.svn ; then
+# echo "You have an outdated FFmpeg SVN checkout in ffmpeg/, please (re)move or replace it"
+# exit 1
+#fi
+#
+#FFBRANCH=master
+#test -e FFBRANCH && FFBRANCH=$(cat FFMPEG_BRANCH)
+#
+#if test -e ffmpeg/mp_auto_pull ; then
+# echo "Updating FFmpeg, (re)move ffmpeg/mp_auto_pull to disable"
+# (cd ffmpeg && git checkout $FFBRANCH)
+# if ! (cd ffmpeg && git pull --rebase --ff-only) ; then
+# echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling"
+# exit 1
+# fi
+#fi
+#
+#if test "$ffmpeg_a" != "no" && ! test -e ffmpeg ; then
+# echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort"
+# read tmp
+# if ! git clone -b $FFBRANCH --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then
+# rm -rf ffmpeg
+# echo "Failed to get a FFmpeg checkout"
+# echo "Please try again or put FFmpeg source code copy into ffmpeg/ manually."
+# echo "Nightly snapshot: http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2"
+# echo "To use a github mirror via http (e.g. because a firewall blocks git):"
+# echo "git clone --depth 1 https://github.com/FFmpeg/FFmpeg ffmpeg; touch ffmpeg/mp_auto_pull"
+# exit 1
+# fi
+# touch ffmpeg/mp_auto_pull
+#fi
-FFBRANCH=master
-test -e FFBRANCH && FFBRANCH=$(cat FFMPEG_BRANCH)
-
-if test -e ffmpeg/mp_auto_pull ; then
- echo "Updating FFmpeg, (re)move ffmpeg/mp_auto_pull to disable"
- (cd ffmpeg && git checkout $FFBRANCH)
- if ! (cd ffmpeg && git pull --rebase --ff-only) ; then
- echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling"
- exit 1
- fi
-fi
-
-if test "$ffmpeg_a" != "no" && ! test -e ffmpeg ; then
- echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort"
- read tmp
- if ! git clone -b $FFBRANCH --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then
- rm -rf ffmpeg
- echo "Failed to get a FFmpeg checkout"
- echo "Please try again or put FFmpeg source code copy into ffmpeg/ manually."
- echo "Nightly snapshot: http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2"
- echo "To use a github mirror via http (e.g. because a firewall blocks git):"
- echo "git clone --depth 1 https://github.com/FFmpeg/FFmpeg ffmpeg; touch ffmpeg/mp_auto_pull"
- exit 1
- fi
- touch ffmpeg/mp_auto_pull
-fi
-
list_subparts() {
test ! -e ffmpeg/libav${3} && return 1
pattern="s/^[^#]*${1}.*([^ ,]*, *\([^ ,)]*\).*/\1_${2}/p"
@@ -1552,9 +1552,9 @@ list_subparts_filters() {
}
echocheck "ffmpeg/libavcodec/allcodecs.c"
-libavdecoders_all=$(list_subparts_extern AVCodec decoder codec/allcodecs.c)
-libavencoders_all=$(list_subparts_extern AVCodec encoder codec/allcodecs.c)
-libavparsers_all=$(list_subparts_extern AVCodecParser parser codec/parsers.c)
+libavdecoders_all=$(list_subparts DEC decoder codec/allcodecs.c)
+libavencoders_all=$(list_subparts ENC encoder codec/allcodecs.c)
+libavparsers_all=$(list_subparts PARSER parser codec/allcodecs.c)
test $? -eq 0 && _list_subparts=found || _list_subparts="not found"
echores "$_list_subparts"
@@ -1565,8 +1565,8 @@ test $? -eq 0 && _list_subparts=found || _list_subpart
echores "$_list_subparts"
echocheck "ffmpeg/libavformat/allformats.c"
-libavdemuxers_all=$(list_subparts_extern AVInputFormat demuxer format/allformats.c)
-libavmuxers_all=$(list_subparts_extern AVOutputFormat muxer format/allformats.c)
+libavdemuxers_all=$(list_subparts DEMUX demuxer format/allformats.c)
+libavmuxers_all=$(list_subparts _MUX muxer format/allformats.c)
test $? -eq 0 && _list_subparts=found || _list_subparts="not found"
echores "$_list_subparts"
@@ -2431,7 +2431,7 @@ case "$host_arch" in
arch='sparc'
iproc='sparc'
if test "$host_arch" = "sparc64" ; then
- _vis='yes'
+ # _vis='yes'
proc='ultrasparc'
def_fast_64bit='#define HAVE_FAST_64BIT 1'
elif sunos ; then
@@ -2800,7 +2800,7 @@ cat > $TMPC << EOF
int ff_extern;
EOF
cc_check -c || die "Symbol mangling check failed."
-sym=$($_nm -P -g $TMPEXE | grep ff_extern)
+sym=$($_nm -g $TMPEXE | grep ff_extern | cut -d ' ' -f 3)
extern_prefix=${sym%%ff_extern*}
def_extern_asm="#define EXTERN_ASM $extern_prefix"
def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
@@ -2860,7 +2860,7 @@ else
fi
CFLAGS="-D_ISOC99_SOURCE -I. -Iffmpeg $CFLAGS"
-HOSTCFLAGS="-D_ISOC99_SOURCE -I. -Iffmpeg -O3"
+HOSTCFLAGS="-D_ISOC99_SOURCE -I. -Iffmpeg $CFLAGS"
# On glibc, add some more CPPFLAGS for enabling required functionality.
cpp_condition_check features.h "defined __GLIBC__" &&
@@ -2941,7 +2941,7 @@ elif test $relocatable = "yes" ; then
fi
echores $relocatable
-if x86_32 ; then
+if false ; then # x86_32
# 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')
@@ -4310,8 +4310,8 @@ echores "$gettimeofday"
echocheck "clock_gettime()"
clock_gettime=no
def_clock_gettime='#undef HAVE_CLOCK_GETTIME'
-statement_check_broken stddef.h time.h 'struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp)' -lrt &&
- { clock_gettime=yes ; def_clock_gettime='#define HAVE_CLOCK_GETTIME 1' ; extra_ldflags="$extra_ldflags -lrt" ; }
+statement_check_broken stddef.h time.h 'struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp)' &&
+ { clock_gettime=yes ; def_clock_gettime='#define HAVE_CLOCK_GETTIME 1' ; }
echores "$clock_gettime"
@@ -6322,7 +6322,7 @@ echocheck "cdparanoia"
if test "$_cdparanoia" = auto ; then
_cdparanoia=no
for inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
- statement_check_broken cdda_interface.h cdda_paranoia.h 'paranoia_cachemodel_size(NULL, 0)' $inc_tmp -lcdda_interface -lcdda_paranoia &&
+ statement_check_broken cdda_interface.h cdda_paranoia.h 'paranoia_free(NULL)' $inc_tmp -lcdda_interface -lcdda_paranoia &&
_cdparanoia=yes && extra_cflags="$extra_cflags $inc_tmp" && break
done
fi
@@ -8162,6 +8162,7 @@ extra_ldflags="$extra_ldflags $libm"
# XML documentation tests
echocheck "XML catalogs"
for try_catalog in \
+ ${LOCALBASE}/share/sgml/catalog \
/etc/sgml/catalog \
/usr/share/xml/docbook/*/catalog.xml \
/opt/local/share/xml/docbook-xml/*/catalog.xml \
@@ -8189,6 +8190,7 @@ fi
echocheck "XML chunked stylesheet"
for try_chunk_xsl in \
+ ${LOCALBASE}/share/xsl/docbook/html/chunk.xsl \
/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 \
@@ -8214,6 +8216,7 @@ fi
echocheck "XML monolithic stylesheet"
for try_docbook_xsl in \
+ ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl \
/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 \
@@ -8267,6 +8270,7 @@ EOF
echocheck "XML DTD"
#FIXME: This should prefer higher version numbers, not the other way around ..
for try_dtd in \
+ ${LOCALBASE}/share/xml/docbook/*/docbookx.dtd \
/usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \
/usr/share/xml/docbook/*/docbookx.dtd \
/usr/share/sgml/docbook/*/docbookx.dtd \
@@ -9414,9 +9418,6 @@ cmp -s "$TMPH" config.h || mv -f "$TMPH" config.h
############################################################################
-# Create FFmpeg config files only for internal ffmpeg
-if test "$ffmpeg_a" = yes; then
-
# Create avconfig.h for FFmpeg.
cat > "$TMPH" << EOF
/* Generated by mpconfigure */
@@ -9499,17 +9500,8 @@ print_enabled_filters(){
cp $TMPH ffmpeg/$file
}
-print_enabled_components libavcodec/codec_list.c AVCodec codec_list $libavdecoders $libavencoders
-print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list $libavparsers
print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $libavbsfs
-print_enabled_components libavdevice/indev_list.c AVInputFormat indev_list ""
-print_enabled_components libavdevice/outdev_list.c AVOutputFormat outdev_list ""
-print_enabled_components libavformat/demuxer_list.c AVInputFormat demuxer_list $libavdemuxers
-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
-
-fi
#############################################################################