From 49b5bb11aef6f92e6a5929a81f275fa4c0887c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 30 Jul 2015 13:56:02 +0000 Subject: [PATCH] qt4 in centos and p11 in suse11 --- ax_check_qt.m4 | 6 ++++-- bootstrap.sh | 19 ++++++++++++------- libpcscxx.spec.in | 4 ++++ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ax_check_qt.m4 b/ax_check_qt.m4 index 95f0e83..4e5179e 100644 --- a/ax_check_qt.m4 +++ b/ax_check_qt.m4 @@ -42,17 +42,19 @@ AC_DEFUN([AX_CXX_QT_TOOL], [ HAVE_$1=1 AC_MSG_CHECKING([for $2]) AC_ARG_VAR([$1], [path to Qt tool $2]) - $1=${$1:-$(${PKG_CONFIG} --variable=$2-qt5_location Qt5Core)} - $1=${$1:-$(${PKG_CONFIG} --variable=host_bins Qt5Core)/$2-qt5} $1=${$1:-$(${PKG_CONFIG} --variable=$2_location Qt5Core)} + $1=${$1:-$(${PKG_CONFIG} --variable=host_bins Qt5Core)/$2-qt5} $1=${$1:-$(${PKG_CONFIG} --variable=host_bins Qt5Core)/$2} $1=${$1:-$(${PKG_CONFIG} --variable=$2_location QtCore)} $1=${$1:-$(${PKG_CONFIG} --variable=host_bins QtCore)/$2} + $1=${$1:-$(${PKG_CONFIG} --variable=host_bins QtCore)/$2-qt4} if ! which "${$1%% *}" > /dev/null; then if which "$2-qt5" > /dev/null; then $1=$2-qt5 elif which "$2" > /dev/null; then $1=$2 + elif which "$2-qt4" > /dev/null; then + $1=$2 else HAVE_$1=0 $1="" diff --git a/bootstrap.sh b/bootstrap.sh index 84d2aec..bcd67ce 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -743,20 +743,25 @@ BuildRequires: pkgconfig, redhat-lsb$( echo -n ", cppunit-devel"; fi; if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then - echo -n ", qtbase5-devel, qtbase5-devel-tools, qt5-qtwebkit-devel"; + echo -n ", qt5-qtwebkit-devel"; fi) +%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} +$(if testtag AX_USE_DOXYGEN; then echo -n "BuildRequires: mscgen"; fi) +$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools, qt5-qtwebkit-devel"; fi) +%else +$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: qt-devel"; fi) +%endif %else%if 0%{?suse_version} || 0%{?sles_version} BuildRequires: pkg-config, lsb-release$( if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-devel"; - fi; - if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then - echo -n ", libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel"; fi) -%endif%endif -%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} -$(if testtag AX_USE_DOXYGEN; then echo -n "BuildRequires: mscgen"; fi) +%if 0%{?suse_version} < 1200 || 0%{?sles_version} < 1200 +$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: libqt4-devel, qt4-x11-tools, libQtWebKit-devel"; fi) +%else +$(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel"; fi) %endif +%endif%endif %description @README@ diff --git a/libpcscxx.spec.in b/libpcscxx.spec.in index 0434e91..b6bf39b 100644 --- a/libpcscxx.spec.in +++ b/libpcscxx.spec.in @@ -6,7 +6,11 @@ License: LGPL Group: Development/Libraries/C++ Source0: %{name}-%{version}.tar.gz BuildRequires: gnupg, subversion, automake, autoconf, doxygen, graphviz +%if 0%{?suse_version} < 1200 || 0%{?sles_version} < 1200 +BuildRequires: libp11-devel +%else BuildRequires: p11-kit-devel +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} BuildRequires: pkgconfig, redhat-lsb