Browse Source

Made QtSvg dependency optional

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
5dc79e67fc
  1. 43
      configure
  2. 2
      qbittorrent.qc
  3. 31
      qcm/qt-svg.qcm
  4. 2
      unixconf.pri

43
configure vendored

@ -23,6 +23,7 @@ Dependency options:
Graphical user interface for Graphical user interface for
headless running headless running
--disable-qt-dbus Disable use of qt-dbus --disable-qt-dbus Disable use of qt-dbus
--disable-qt-svg Disable use of qt-svg
--with-libboost-inc=[path] Path to libboost include --with-libboost-inc=[path] Path to libboost include
files files
--with-libboost-lib=[path] Path to libboost library --with-libboost-lib=[path] Path to libboost library
@ -168,6 +169,11 @@ while [ $# -gt 0 ]; do
shift shift
;; ;;
--disable-qt-svg)
QC_DISABLE_qt_svg="Y"
shift
;;
--with-libboost-inc=*) --with-libboost-inc=*)
QC_WITH_LIBBOOST_INC=$optarg QC_WITH_LIBBOOST_INC=$optarg
shift shift
@ -222,6 +228,7 @@ echo EX_QTDIR=$EX_QTDIR
echo QC_ENABLE_DEBUG=$QC_ENABLE_DEBUG echo QC_ENABLE_DEBUG=$QC_ENABLE_DEBUG
echo QC_DISABLE_GUI=$QC_DISABLE_GUI echo QC_DISABLE_GUI=$QC_DISABLE_GUI
echo QC_DISABLE_qt_dbus=$QC_DISABLE_qt_dbus echo QC_DISABLE_qt_dbus=$QC_DISABLE_qt_dbus
echo QC_DISABLE_qt_svg=$QC_DISABLE_qt_svg
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
echo QC_WITH_LIBBOOST_LIB=$QC_WITH_LIBBOOST_LIB echo QC_WITH_LIBBOOST_LIB=$QC_WITH_LIBBOOST_LIB
echo QC_DISABLE_libnotify=$QC_DISABLE_libnotify echo QC_DISABLE_libnotify=$QC_DISABLE_libnotify
@ -394,6 +401,38 @@ public:
return false; return false;
} }
}; };
#line 1 "qt-svg.qcm"
/*
-----BEGIN QCMOD-----
name: qt-svg
-----END QCMOD-----
*/
// see Conf::findPkgConfig
class qc_qt_svg : public ConfObj
{
public:
qc_qt_svg(Conf *c) : ConfObj(c) {}
QString name() const { return "QtSvg >= 4.5"; }
QString shortname() const { return "qt-svg"; }
QString checkString() const {
if(!conf->getenv("QC_DISABLE_qt_svg").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
return "";
return ConfObj::checkString();
}
bool exec(){
if(!conf->getenv("QC_DISABLE_qt_svg").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
return false;
QStringList incs;
QString req_ver = "4.5.0";
QString version, libs, other;
VersionMode mode = VersionMin;
if(conf->findPkgConfig("QtSvg", mode, req_ver, &version, &incs, &libs, &other)) {
conf->addExtra("CONFIG += svg");
return true;
}
return false;
}
};
#line 1 "pkg-config.qcm" #line 1 "pkg-config.qcm"
/* /*
-----BEGIN QCMOD----- -----BEGIN QCMOD-----
@ -687,6 +726,9 @@ cat >$1/modules_new.cpp <<EOT
o = new qc_qt_dbus(conf); o = new qc_qt_dbus(conf);
o->required = false; o->required = false;
o->disabled = false; o->disabled = false;
o = new qc_qt_svg(conf);
o->required = false;
o->disabled = false;
o = new qc_pkg_config(conf); o = new qc_pkg_config(conf);
o->required = true; o->required = true;
o->disabled = false; o->disabled = false;
@ -1653,6 +1695,7 @@ export EX_QTDIR
export QC_ENABLE_DEBUG export QC_ENABLE_DEBUG
export QC_DISABLE_GUI export QC_DISABLE_GUI
export QC_DISABLE_qt_dbus export QC_DISABLE_qt_dbus
export QC_DISABLE_qt_svg
export QC_WITH_LIBBOOST_INC export QC_WITH_LIBBOOST_INC
export QC_WITH_LIBBOOST_LIB export QC_WITH_LIBBOOST_LIB
export QC_DISABLE_libnotify export QC_DISABLE_libnotify

2
qbittorrent.qc

@ -8,6 +8,8 @@
</dep> </dep>
<dep type='qt-dbus'> <dep type='qt-dbus'>
</dep> </dep>
<dep type='qt-svg'>
</dep>
<dep type='pkg-config'> <dep type='pkg-config'>
<required/> <required/>
</dep> </dep>

31
qcm/qt-svg.qcm

@ -0,0 +1,31 @@
/*
-----BEGIN QCMOD-----
name: qt-svg
-----END QCMOD-----
*/
// see Conf::findPkgConfig
class qc_qt_svg : public ConfObj
{
public:
qc_qt_svg(Conf *c) : ConfObj(c) {}
QString name() const { return "QtSvg >= 4.5"; }
QString shortname() const { return "qt-svg"; }
QString checkString() const {
if(!conf->getenv("QC_DISABLE_qt_svg").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
return "";
return ConfObj::checkString();
}
bool exec(){
if(!conf->getenv("QC_DISABLE_qt_svg").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
return false;
QStringList incs;
QString req_ver = "4.5.0";
QString version, libs, other;
VersionMode mode = VersionMin;
if(conf->findPkgConfig("QtSvg", mode, req_ver, &version, &incs, &libs, &other)) {
conf->addExtra("CONFIG += svg");
return true;
}
return false;
}
};

2
unixconf.pri

@ -5,7 +5,7 @@ include(conf.pri)
!nox:dbus { !nox:dbus {
QT += dbus QT += dbus
} }
!nox { !nox:svg {
QT += svg QT += svg
} }
QMAKE_LFLAGS_APP += -rdynamic QMAKE_LFLAGS_APP += -rdynamic

Loading…
Cancel
Save