Source: xca
Version: 1.4.1-1
Tags: patch upstream
User: [email protected]
Usertags: rebootstrap

xca fails to cross build from source, because it hard codes the build
architecture pkg-config in configure.ac in a few places. The attached
patch fixes that and makes xca cross buildable. Please consider applying
it.

Helmut
Index: xca-1.4.1/configure.ac
===================================================================
--- xca-1.4.1.orig/configure.ac
+++ xca-1.4.1/configure.ac
@@ -105,11 +105,11 @@
 
 if test "${WANT_QT_VERSION}" = detect -o "${WANT_QT_VERSION}" = 5; then
   PKG_CHECK_MODULES(Qt5, [Qt5Core >= 5.0, Qt5Widgets >= 5.0], [
-    _QT_HOST_BINS="`pkg-config --variable=host_bins Qt5Core`"
+    _QT_HOST_BINS="`$PKG_CONFIG --variable=host_bins Qt5Core`"
     QT_MOC="${_QT_HOST_BINS}/moc"
     QT_UIC="${_QT_HOST_BINS}/uic"
     if test -n "$DARWIN"; then
-      FRAMEDIR=`pkg-config --variable=libdir Qt5Core`
+      FRAMEDIR=`$PKG_CONFIG --variable=libdir Qt5Core`
       Qt5_CFLAGS="$Qt5_CFLAGS -std=c++11 -F${FRAMEDIR} -I${FRAMEDIR}/QtCore.framework/Headers -I${FRAMEDIR}/QtGui.framework/Headers -I${FRAMEDIR}/QtWdgets.framework/Headers -Xlinker -rpath -Xlinker ${FRAMEDIR}"
     fi
     WANT_QT_VERSION=5
@@ -121,13 +121,13 @@
 
 if test "${WANT_QT_VERSION}" = detect -o "${WANT_QT_VERSION}" = 4; then
   PKG_CHECK_MODULES(Qt4, [QtCore >= 4.7, QtCore < 5.0, QtGui >= 4.7, QtGui < 5.0], [
-    QT_MOC="`pkg-config --variable=moc_location QtCore`"
-    QT_UIC="`pkg-config --variable=uic_location QtCore`"
+    QT_MOC="`$PKG_CONFIG --variable=moc_location QtCore`"
+    QT_UIC="`$PKG_CONFIG --variable=uic_location QtCore`"
     if test -n "${QT_MOC}"; then
       _QT_HOST_BINS="`dirname ${QT_MOC}`"
     fi
     if test -n "$DARWIN"; then
-      FRAMEDIR=`pkg-config --variable=libdir QtCore`
+      FRAMEDIR=`$PKG_CONFIG --variable=libdir QtCore`
       Qt4_CFLAGS="$Qt4_CFLAGS -F${FRAMEDIR} -I${FRAMEDIR}/QtCore.framework/Headers -I${FRAMEDIR}/QtGui.framework/Headers -Xlinker -rpath -Xlinker ${FRAMEDIR}"
     fi
     WANT_QT_VERSION=4

Reply via email to