diff mbox

[8/8] alsa/ffmpeg/libvpx: shared/static compilation

Message ID 1407352737-7959-8-git-send-email-diorcet.yann@gmail.com
State Not Applicable
Delegated to: Christian Sørensen
Headers show

Commit Message

Yann Diorcet Aug. 6, 2014, 7:18 p.m. UTC
---
 recipes/alsa/alsa-lib-1.0.27.2/static_shared.patch | 40 ++++++++++++++++++++++
 recipes/alsa/alsa-lib_1.0.27.2.oe                  |  1 +
 recipes/ffmpeg/ffmpeg.inc                          |  5 +--
 recipes/libvpx/libvpx.inc                          |  3 +-
 4 files changed, 46 insertions(+), 3 deletions(-)
 create mode 100644 recipes/alsa/alsa-lib-1.0.27.2/static_shared.patch
diff mbox

Patch

diff --git a/recipes/alsa/alsa-lib-1.0.27.2/static_shared.patch b/recipes/alsa/alsa-lib-1.0.27.2/static_shared.patch
new file mode 100644
index 0000000..63b3194
--- /dev/null
+++ b/recipes/alsa/alsa-lib-1.0.27.2/static_shared.patch
@@ -0,0 +1,40 @@ 
+diff -urN a/configure b/configure
+--- a/configure	2013-07-08 14:32:46.000000000 +0200
++++ b/configure	2014-06-26 20:59:41.659453610 +0200
+@@ -11942,16 +11942,6 @@
+ 
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ 
+-if test "$enable_static" = "$enable_shared" -a "$enable_static" = "yes"; then
+-cat <<EOF
+-  Please, do not try to compile static and shared libraries together.
+-  See INSTALL file for more details (do not use --enable-shared=yes with
+-  --enable-static=yes).
+-EOF
+-  exit 1
+-fi
+-
+-
+ # Check whether --with-configdir was given.
+ if test "${with_configdir+set}" = set; then :
+   withval=$with_configdir; confdir="$withval"
+diff -urN a/configure.in b/configure.in
+--- a/configure.in	2013-07-08 14:31:36.000000000 +0200
++++ b/configure.in	2014-06-26 20:59:27.683670164 +0200
+@@ -73,16 +73,6 @@
+ 
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ 
+-dnl Do not build static and shared libraries together
+-if test "$enable_static" = "$enable_shared" -a "$enable_static" = "yes"; then
+-cat <<EOF
+-  Please, do not try to compile static and shared libraries together.
+-  See INSTALL file for more details (do not use --enable-shared=yes with
+-  --enable-static=yes).
+-EOF
+-  exit 1
+-fi
+-
+ dnl ALSA configuration directory
+ AC_ARG_WITH(configdir,
+     AS_HELP_STRING([--with-configdir=dir],
diff --git a/recipes/alsa/alsa-lib_1.0.27.2.oe b/recipes/alsa/alsa-lib_1.0.27.2.oe
index 3b0aa05..2a426ee 100644
--- a/recipes/alsa/alsa-lib_1.0.27.2.oe
+++ b/recipes/alsa/alsa-lib_1.0.27.2.oe
@@ -5,4 +5,5 @@  LICENSE = "LGPL-2.1 LGPL-2.0+"
 
 require alsa-lib.inc
 
+SRC_URI += "file://static_shared.patch"
 SRC_URI += "file://clang.patch"
diff --git a/recipes/ffmpeg/ffmpeg.inc b/recipes/ffmpeg/ffmpeg.inc
index 8a811f6..4777cdb 100644
--- a/recipes/ffmpeg/ffmpeg.inc
+++ b/recipes/ffmpeg/ffmpeg.inc
@@ -40,14 +40,15 @@  autotools_configure () {
     fi
     if [ -x "${CONFIGURE_SCRIPT}" ] ; then
         ${CONFIGURE_SCRIPT} \
- 	--cross-prefix=${TARGET_PREFIX} \
+	--cross-prefix=${TARGET_PREFIX} \
 	--prefix=$useprefix \
 	--disable-bzlib \
-        --sysroot=${stage_base_prefix} \
+	--sysroot=${stage_base_prefix} \
 	--target-os=$target \
 	--arch=$arch \
 	--extra-cflags=$extra_cflags \
 	--cc="${CC}" \
+	${OECONF_SHARED} ${OECONF_STATIC} \
 	${EXTRA_FFMPEG} \
 	$@
     else
diff --git a/recipes/libvpx/libvpx.inc b/recipes/libvpx/libvpx.inc
index 1802cb2..72a0358 100644
--- a/recipes/libvpx/libvpx.inc
+++ b/recipes/libvpx/libvpx.inc
@@ -27,7 +27,8 @@  autotools_configure () {
                --disable-install-docs \
                --disable-debug-libs \
                --disable-examples \
-               --disable-unit-tests
+               --disable-unit-tests \
+               ${OECONF_SHARED} ${OECONF_STATIC}
     else
         oefatal "no configure script found"
     fi