Source: libsdl2 Version: 2.0.8+dfsg1-1 Tags: patch upstream User: helm...@debian.org Usertags: rebootstrap
libsdl2 fails to cross build from source, because it uses the build architecture pkg-config and thus fails finding a number of dependencies. Lintian has a more detailed explanation. The attached patch fixes that and makes libsdl2 cross build successfully. Please consider applying it. Helmut
--- libsdl2-2.0.8+dfsg1.orig/configure.in +++ libsdl2-2.0.8+dfsg1/configure.in @@ -56,6 +56,7 @@ AC_PROG_INSTALL AC_PROG_MAKE_SET AC_CHECK_TOOL(WINDRES, [windres], [:]) +PKG_PROG_PKG_CONFIG dnl Make sure that srcdir is a full pathname case "$host" in @@ -861,9 +862,8 @@ JACK_REQUIRED_VERSION=0.125 - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_MSG_CHECKING(for JACK $JACK_REQUIRED_VERSION support) - if test x$PKG_CONFIG != xno; then + if test x$PKG_CONFIG != x; then if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then JACK_CFLAGS=`$PKG_CONFIG --cflags jack` JACK_LIBS=`$PKG_CONFIG --libs jack` @@ -953,9 +953,8 @@ PULSEAUDIO_REQUIRED_VERSION=0.9 - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_MSG_CHECKING(for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support) - if test x$PKG_CONFIG != xno; then + if test x$PKG_CONFIG != x; then if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple` PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple` @@ -1165,9 +1164,8 @@ FUSIONSOUND_REQUIRED_VERSION=1.1.1 - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_MSG_CHECKING(for FusionSound $FUSIONSOUND_REQUIRED_VERSION support) - if test x$PKG_CONFIG != xno; then + if test x$PKG_CONFIG != x; then if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound` FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound` @@ -1386,10 +1384,9 @@ ,enable_video_wayland_qt_touch=yes) if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_MSG_CHECKING(for Wayland support) video_wayland=no - if test x$PKG_CONFIG != xno && \ + if test x$PKG_CONFIG != x && \ test x$video_opengl_egl = xyes && \ test x$video_opengles_v2 = xyes; then if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then @@ -1472,10 +1469,9 @@ ,enable_video_mir=no) if test x$enable_video = xyes -a x$enable_video_mir = xyes; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_MSG_CHECKING(for Mir support) video_mir=no - if test x$PKG_CONFIG != xno; then + if test x$PKG_CONFIG != x; then if $PKG_CONFIG --exists mirclient egl xkbcommon ; then MIR_CFLAGS=`$PKG_CONFIG --cflags mirclient egl xkbcommon` MIR_LIBS=`$PKG_CONFIG --libs mirclient egl xkbcommon` @@ -1571,8 +1567,7 @@ AC_HELP_STRING([--enable-video-rpi], [use Raspberry Pi video driver [[default=yes]]]), , enable_video_rpi=yes) if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists bcm_host; then + if test x$PKG_CONFIG != x && $PKG_CONFIG --exists bcm_host; then RPI_CFLAGS=`$PKG_CONFIG --cflags bcm_host brcmegl` RPI_LDFLAGS=`$PKG_CONFIG --libs bcm_host brcmegl` elif test x$ARCH = xnetbsd; then @@ -2112,8 +2107,7 @@ DIRECTFB_REQUIRED_VERSION=1.0.0 AC_PATH_PROGS(DIRECTFBCONFIG, directfb-config, no, [$prefix/bin:$PATH]) if test x$DIRECTFBCONFIG = xno; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - if test x$PKG_CONFIG != xno; then + if test x$PKG_CONFIG != x; then if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb` DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb` @@ -2194,8 +2188,7 @@ LIBDRM_REQUIRED_VERSION=2.4.46 LIBGBM_REQUIRED_VERSION=9.0.0 - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - if test x$PKG_CONFIG != xno; then + if test x$PKG_CONFIG != x; then if $PKG_CONFIG --atleast-pkgconfig-version 0.7; then if $PKG_CONFIG --atleast-version $LIBDRM_REQUIRED_VERSION libdrm; then LIBDRM_CFLAGS=`$PKG_CONFIG --cflags libdrm` @@ -2625,8 +2618,7 @@ AC_HELP_STRING([--enable-dbus], [enable D-Bus support [[default=yes]]]), , enable_dbus=yes) if test x$enable_dbus = xyes; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - if test x$PKG_CONFIG != xno; then + if test x$PKG_CONFIG != x; then DBUS_CFLAGS=`$PKG_CONFIG --cflags dbus-1` save_CFLAGS="$CFLAGS" CFLAGS="$save_CFLAGS $DBUS_CFLAGS" @@ -2662,8 +2654,7 @@ AC_HELP_STRING([--enable-ibus], [enable IBus support [[default=yes]]]), , enable_ibus=yes) if test x$enable_ibus = xyes; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - if test x$PKG_CONFIG != xno; then + if test x$PKG_CONFIG != x; then IBUS_CFLAGS=`$PKG_CONFIG --cflags ibus-1.0` save_CFLAGS="$CFLAGS" CFLAGS="$save_CFLAGS $IBUS_CFLAGS" @@ -2701,8 +2692,7 @@ AC_HELP_STRING([--enable-fcitx], [enable fcitx support [[default=yes]]]), , enable_fcitx=yes) if test x$enable_fcitx = xyes; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - if test x$PKG_CONFIG != xno; then + if test x$PKG_CONFIG != x; then FCITX_CFLAGS=`$PKG_CONFIG --cflags fcitx` CFLAGS="$CFLAGS $FCITX_CFLAGS" AC_CHECK_HEADER(fcitx/frontend.h,