93 lines
5.0 KiB
Plaintext
93 lines
5.0 KiB
Plaintext
$OpenBSD: patch-configure,v 1.57 2017/10/27 03:16:30 sthen Exp $
|
|
|
|
- lavu/random_seed: use arc4random() when available
|
|
- configure: Also try -mstack-alignment for clang
|
|
|
|
Index: configure
|
|
--- configure.orig
|
|
+++ configure
|
|
@@ -1755,6 +1755,7 @@ MATH_FUNCS="
|
|
SYSTEM_FUNCS="
|
|
access
|
|
aligned_malloc
|
|
+ arc4random
|
|
clock_gettime
|
|
closesocket
|
|
CommandLineToArgvW
|
|
@@ -4308,7 +4309,7 @@ case $target_os in
|
|
openbsd|bitrig)
|
|
disable symver
|
|
SHFLAGS='-shared'
|
|
- SLIB_INSTALL_NAME='$(SLIBNAME).$(LIBMAJOR).$(LIBMINOR)'
|
|
+ SLIB_INSTALL_NAME='$(SLIBNAME).$(LIBVERSION)'
|
|
SLIB_INSTALL_LINKS=
|
|
oss_indev_extralibs="-lossaudio"
|
|
oss_outdev_extralibs="-lossaudio"
|
|
@@ -4672,7 +4673,7 @@ die_license_disabled version3 libvo_amrwbenc
|
|
|
|
enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
|
|
|
|
-disabled optimizations || check_cflags -fomit-frame-pointer
|
|
+enabled x86_32 && check_cflags -fomit-frame-pointer
|
|
|
|
enable_weak_pic() {
|
|
disabled pic && return
|
|
@@ -5067,6 +5068,7 @@ check_func ${malloc_prefix}memalign && ena
|
|
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
|
|
|
|
check_func access
|
|
+check_func arc4random
|
|
check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
|
|
check_func fcntl
|
|
check_func fork
|
|
@@ -5685,6 +5687,7 @@ elif enabled llvm_gcc; then
|
|
check_cflags -mllvm -stack-alignment=16
|
|
elif enabled clang; then
|
|
check_cflags -mllvm -stack-alignment=16
|
|
+ check_cflags -mstack-alignment=16
|
|
check_cflags -Qunused-arguments
|
|
check_cflags -Werror=implicit-function-declaration
|
|
check_cflags -Werror=missing-prototypes
|
|
@@ -6220,8 +6223,8 @@ pkgconfig_generate(){
|
|
comment=$2
|
|
version=$3
|
|
libs=$4
|
|
- requires=$(map 'lib_version $v' $(eval echo \$${name#lib}_deps))
|
|
- requires=${requires%, }
|
|
+ requires=$5
|
|
+ linkflags=$6
|
|
enabled ${name#lib} || return 0
|
|
mkdir -p $name
|
|
cat <<EOF > $name/$name${build_suffix}.pc
|
|
@@ -6236,7 +6239,7 @@ Version: $version
|
|
Requires: $(enabled shared || echo $requires)
|
|
Requires.private: $(enabled shared && echo $requires)
|
|
Conflicts:
|
|
-Libs: -L\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}") -l${shortname} $(enabled shared || echo $libs)
|
|
+Libs: -L\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}") -l${shortname} $(enabled shared || echo $libs) $linkflags
|
|
Libs.private: $(enabled shared && echo $libs)
|
|
Cflags: -I\${includedir}
|
|
EOF
|
|
@@ -6260,12 +6263,12 @@ Cflags: -I\${includedir}
|
|
EOF
|
|
}
|
|
|
|
-pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBRT $LIBM"
|
|
-pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs"
|
|
-pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs"
|
|
-pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs"
|
|
-pkgconfig_generate libavfilter "FFmpeg audio/video filtering library" "$LIBAVFILTER_VERSION" "$extralibs"
|
|
-pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" ""
|
|
-pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$LIBM"
|
|
-pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM"
|
|
-pkgconfig_generate libswresample "FFmpeg audio resampling library" "$LIBSWRESAMPLE_VERSION" "$LIBM $LIBSOXR"
|
|
+pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBavutil_EXTRALIBS" "$LIBavutil_REQUIRES" "$LIBavutil_LINKFLAGS"
|
|
+pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$LIBavcodec_EXTRALIBS" "$LIBavcodec_REQUIRES" "$LIBavcodec_LINKFLAGS"
|
|
+pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$LIBavformat_EXTRALIBS" "$LIBavformat_REQUIRES" "$LIBavformat_LINKFLAGS"
|
|
+pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$LIBavdevice_EXTRALIBS" "$LIBavdevice_REQUIRES" "$LIBavdevice_LINKFLAGS"
|
|
+pkgconfig_generate libavfilter "FFmpeg audio/video filtering library" "$LIBAVFILTER_VERSION" "$LIBavfilter_EXTRALIBS" "$LIBavfilter_REQUIRES" "$LIBavfilter_LINKFLAGS"
|
|
+pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" "$LIBpostproc_EXTRALIBS" "$LIBpostproc_REQUIRES" "$LIBpostproc_LINKFLAGS"
|
|
+pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$LIBreavsample_EXTRALIBS" "$LIBavresample_REQUIRES" "$LIBavresample_LINKFLAGS"
|
|
+pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBswscale_EXTRALIBS" "$LIBswscale_REQUIRES" "$LIBswscale_LINKFLAGS"
|
|
+pkgconfig_generate libswresample "FFmpeg audio rescaling library" "$LIBSWRESAMPLE_VERSION" "$LIBswresample_EXTRALIBS" "$LIBswresample_REQUIRES" "$LIBswresample_LINKFLAGS"
|