|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/sh |
|
|
|
#!/bin/sh |
|
|
|
# |
|
|
|
# |
|
|
|
# Generated by qconf 1.3 ( http://delta.affinix.com/qconf/ ) |
|
|
|
# Generated by qconf 1.4 ( http://delta.affinix.com/qconf/ ) |
|
|
|
# |
|
|
|
# |
|
|
|
|
|
|
|
|
|
|
|
show_usage() { |
|
|
|
show_usage() { |
|
|
@ -189,7 +189,7 @@ while [ $# -gt 0 ]; do |
|
|
|
;; |
|
|
|
;; |
|
|
|
|
|
|
|
|
|
|
|
--verbose) |
|
|
|
--verbose) |
|
|
|
QC_DEBUG="Y" |
|
|
|
QC_VERBOSE="Y" |
|
|
|
shift |
|
|
|
shift |
|
|
|
;; |
|
|
|
;; |
|
|
|
--help) show_usage; exit ;; |
|
|
|
--help) show_usage; exit ;; |
|
|
@ -203,7 +203,7 @@ DATADIR=${DATADIR:-$PREFIX/share} |
|
|
|
|
|
|
|
|
|
|
|
echo "Configuring qbittorrent ..." |
|
|
|
echo "Configuring qbittorrent ..." |
|
|
|
|
|
|
|
|
|
|
|
if [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
if [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo |
|
|
|
echo |
|
|
|
echo PREFIX=$PREFIX |
|
|
|
echo PREFIX=$PREFIX |
|
|
|
echo BINDIR=$BINDIR |
|
|
|
echo BINDIR=$BINDIR |
|
|
@ -223,31 +223,50 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
printf "Verifying Qt 4 build environment ... " |
|
|
|
printf "Verifying Qt 4 build environment ... " |
|
|
|
|
|
|
|
|
|
|
|
if [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
# run qmake -v and check version |
|
|
|
|
|
|
|
qmake_check_v4() { |
|
|
|
|
|
|
|
if [ -x "$1" ]; then |
|
|
|
|
|
|
|
if echo `$1 -v 2>&1` | grep "Qt version 4\." >/dev/null 2>&1; then |
|
|
|
|
|
|
|
return 0 |
|
|
|
|
|
|
|
elif [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
|
|
|
|
echo "Warning: $1 not for Qt 4" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
return 1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo |
|
|
|
echo |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
qm="" |
|
|
|
qm="" |
|
|
|
|
|
|
|
names="qmake-qt4 qmake4 qmake" |
|
|
|
|
|
|
|
|
|
|
|
# qt4 check: --qtdir |
|
|
|
# qt4 check: --qtdir |
|
|
|
if [ -z "$qm" ]; then |
|
|
|
if [ -z "$qm" ] && [ ! -z "$EX_QTDIR" ]; then |
|
|
|
qstr=$EX_QTDIR/bin/qmake |
|
|
|
for n in $names; do |
|
|
|
if [ -x "$qstr" ]; then |
|
|
|
qstr=$EX_QTDIR/bin/$n |
|
|
|
qm=$qstr |
|
|
|
if qmake_check_v4 "$qstr"; then |
|
|
|
fi |
|
|
|
qm=$qstr |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
done |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ -z "$qm" ] && [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
if [ -z "$qm" ] && [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo "Warning: qmake not found via --qtdir" |
|
|
|
echo "Warning: qmake not found via --qtdir" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# qt4 check: QTDIR |
|
|
|
# qt4 check: QTDIR |
|
|
|
if [ -z "$qm" ]; then |
|
|
|
if [ -z "$qm" ] && [ ! -z "$QTDIR" ]; then |
|
|
|
qstr=$QTDIR/bin/qmake |
|
|
|
for n in $names; do |
|
|
|
if [ -x "$qstr" ]; then |
|
|
|
qstr=$QTDIR/bin/$n |
|
|
|
qm=$qstr |
|
|
|
if qmake_check_v4 "$qstr"; then |
|
|
|
fi |
|
|
|
qm=$qstr |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
done |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ -z "$qm" ] && [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
if [ -z "$qm" ] && [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo "Warning: qmake not found via \$QTDIR" |
|
|
|
echo "Warning: qmake not found via \$QTDIR" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
@ -255,40 +274,46 @@ fi |
|
|
|
if [ -z "$qm" ]; then |
|
|
|
if [ -z "$qm" ]; then |
|
|
|
str=`pkg-config QtCore --variable=exec_prefix 2>/dev/null` |
|
|
|
str=`pkg-config QtCore --variable=exec_prefix 2>/dev/null` |
|
|
|
if [ ! -z "$str" ]; then |
|
|
|
if [ ! -z "$str" ]; then |
|
|
|
qstr=$str/bin/qmake |
|
|
|
for n in $names; do |
|
|
|
if [ -x "$qstr" ]; then |
|
|
|
qstr=$str/bin/$n |
|
|
|
qm=$qstr |
|
|
|
if qmake_check_v4 "$qstr"; then |
|
|
|
fi |
|
|
|
qm=$qstr |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
done |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ -z "$qm" ] && [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
if [ -z "$qm" ] && [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo "Warning: qmake not found via pkg-config" |
|
|
|
echo "Warning: qmake not found via pkg-config" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# qt4 check: PATH |
|
|
|
# qt4 check: PATH |
|
|
|
if [ -z "$qm" ]; then |
|
|
|
if [ -z "$qm" ]; then |
|
|
|
qstr=`$WHICH qmake 2>/dev/null` |
|
|
|
for n in $names; do |
|
|
|
if [ -x "$qstr" ]; then |
|
|
|
qstr=`$WHICH $n 2>/dev/null` |
|
|
|
qm=$qstr |
|
|
|
if qmake_check_v4 "$qstr"; then |
|
|
|
fi |
|
|
|
qm=$qstr |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
done |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ -z "$qm" ] && [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
if [ -z "$qm" ] && [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo "Warning: qmake not found via \$PATH" |
|
|
|
echo "Warning: qmake not found via \$PATH" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if [ -z "$qm" ]; then |
|
|
|
if [ -z "$qm" ]; then |
|
|
|
if [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
if [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo " -> fail" |
|
|
|
echo " -> fail" |
|
|
|
else |
|
|
|
else |
|
|
|
echo "fail" |
|
|
|
echo "fail" |
|
|
|
fi |
|
|
|
fi |
|
|
|
printf "\n" |
|
|
|
printf "\n" |
|
|
|
printf "Reason: Unable to find the 'qmake' tool.\n" |
|
|
|
printf "Reason: Unable to find the 'qmake' tool for Qt 4.\n" |
|
|
|
printf "\n" |
|
|
|
printf "\n" |
|
|
|
show_qt_info |
|
|
|
show_qt_info |
|
|
|
exit 1; |
|
|
|
exit 1; |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
if [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo qmake found in $qm |
|
|
|
echo qmake found in $qm |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
@ -535,13 +560,20 @@ public: |
|
|
|
qc_libmagick(Conf *c) : ConfObj(c) {} |
|
|
|
qc_libmagick(Conf *c) : ConfObj(c) {} |
|
|
|
QString name() const { return "ImageMagick library (libmagick++)"; } |
|
|
|
QString name() const { return "ImageMagick library (libmagick++)"; } |
|
|
|
QString shortname() const { return "libmagick++"; } |
|
|
|
QString shortname() const { return "libmagick++"; } |
|
|
|
|
|
|
|
QString checkString() const { |
|
|
|
|
|
|
|
if(!conf->getenv("QC_DISABLE_libmagick").isEmpty()) |
|
|
|
|
|
|
|
return ""; |
|
|
|
|
|
|
|
return ConfObj::checkString(); |
|
|
|
|
|
|
|
} |
|
|
|
bool exec(){ |
|
|
|
bool exec(){ |
|
|
|
QString s; |
|
|
|
if(!conf->getenv("QC_DISABLE_libmagick").isEmpty()) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
QString s; |
|
|
|
s = conf->getenv("QC_WITH_LIBMAGICK_INC"); |
|
|
|
s = conf->getenv("QC_WITH_LIBMAGICK_INC"); |
|
|
|
if(!s.isEmpty()) { |
|
|
|
if(!s.isEmpty()) { |
|
|
|
if(!conf->checkHeader(s, "Magick++.h")) { |
|
|
|
if(!conf->checkHeader(s, "Magick++.h")) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
QStringList sl; |
|
|
|
QStringList sl; |
|
|
|
sl << "/usr/include"; |
|
|
|
sl << "/usr/include"; |
|
|
@ -553,17 +585,17 @@ public: |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(!found) { |
|
|
|
if(!found) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
conf->addIncludePath(s); |
|
|
|
conf->addIncludePath(s); |
|
|
|
|
|
|
|
|
|
|
|
s = conf->getenv("QC_WITH_LIBMAGICK_LIB"); |
|
|
|
s = conf->getenv("QC_WITH_LIBMAGICK_LIB"); |
|
|
|
if(!s.isEmpty()) { |
|
|
|
if(!s.isEmpty()) { |
|
|
|
if(!QFile::exists(s+QString("libMagick++.so"))) |
|
|
|
if(!QFile::exists(s+QString("libMagick++.so"))){ |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
conf->addLib(QString("-L") + s); |
|
|
|
} |
|
|
|
|
|
|
|
conf->addLib(QString("-L") + s); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
QStringList sl; |
|
|
|
QStringList sl; |
|
|
|
sl << "/usr/lib/"; |
|
|
|
sl << "/usr/lib/"; |
|
|
@ -572,11 +604,14 @@ public: |
|
|
|
foreach(s, sl){ |
|
|
|
foreach(s, sl){ |
|
|
|
if(QFile::exists(s+QString("libMagick++.so"))){ |
|
|
|
if(QFile::exists(s+QString("libMagick++.so"))){ |
|
|
|
found = true; |
|
|
|
found = true; |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(!found) return false; |
|
|
|
if(!found) |
|
|
|
|
|
|
|
return false; |
|
|
|
conf->addLib(QString("-L") + s); |
|
|
|
conf->addLib(QString("-L") + s); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
conf->addDefine("HAVE_MAGICK"); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
@ -624,6 +659,8 @@ cat >$1/modules_new.cpp <<EOT |
|
|
|
|
|
|
|
|
|
|
|
EOT |
|
|
|
EOT |
|
|
|
cat >$1/conf4.h <<EOT |
|
|
|
cat >$1/conf4.h <<EOT |
|
|
|
|
|
|
|
// For license information, see the COPYING file in the qconf base directory. |
|
|
|
|
|
|
|
|
|
|
|
#ifndef QC_CONF4_H |
|
|
|
#ifndef QC_CONF4_H |
|
|
|
#define QC_CONF4_H |
|
|
|
#define QC_CONF4_H |
|
|
|
|
|
|
|
|
|
|
@ -728,6 +765,8 @@ private: |
|
|
|
|
|
|
|
|
|
|
|
EOT |
|
|
|
EOT |
|
|
|
cat >$1/conf4.cpp <<EOT |
|
|
|
cat >$1/conf4.cpp <<EOT |
|
|
|
|
|
|
|
// For license information, see the COPYING file in the qconf base directory. |
|
|
|
|
|
|
|
|
|
|
|
#include "conf4.h" |
|
|
|
#include "conf4.h" |
|
|
|
|
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
|
#include <stdio.h> |
|
|
@ -878,6 +917,18 @@ void qc_splitcflags(const QString &cflags, QStringList *incs, QStringList *other |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString qc_escapeArg(const QString &str) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QString out; |
|
|
|
|
|
|
|
for(int n = 0; n < (int)str.length(); ++n) { |
|
|
|
|
|
|
|
if(str[n] == '-') |
|
|
|
|
|
|
|
out += '_'; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
out += str[n]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return out; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------- |
|
|
|
//---------------------------------------------------------------------------- |
|
|
|
// ConfObj |
|
|
|
// ConfObj |
|
|
|
//---------------------------------------------------------------------------- |
|
|
|
//---------------------------------------------------------------------------- |
|
|
@ -994,14 +1045,14 @@ bool Conf::exec() |
|
|
|
// if this was a disabled-by-default option, check if it was enabled |
|
|
|
// if this was a disabled-by-default option, check if it was enabled |
|
|
|
if(o->disabled) |
|
|
|
if(o->disabled) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString v = QString("QC_ENABLE_") + o->shortname(); |
|
|
|
QString v = QString("QC_ENABLE_") + qc_escapeArg(o->shortname()); |
|
|
|
if(getenv(v) != "Y") |
|
|
|
if(getenv(v) != "Y") |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
// and the opposite? |
|
|
|
// and the opposite? |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString v = QString("QC_DISABLE_") + o->shortname(); |
|
|
|
QString v = QString("QC_DISABLE_") + qc_escapeArg(o->shortname()); |
|
|
|
if(getenv(v) == "Y") |
|
|
|
if(getenv(v) == "Y") |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
@ -1428,7 +1479,7 @@ int main() |
|
|
|
# include"modules_new.cpp" |
|
|
|
# include"modules_new.cpp" |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
conf->debug_enabled = (qc_getenv("QC_DEBUG") == "Y") ? true: false; |
|
|
|
conf->debug_enabled = (qc_getenv("QC_VERBOSE") == "Y") ? true: false; |
|
|
|
if(conf->debug_enabled) |
|
|
|
if(conf->debug_enabled) |
|
|
|
printf(" -> ok\n"); |
|
|
|
printf(" -> ok\n"); |
|
|
|
else |
|
|
|
else |
|
|
@ -1484,6 +1535,9 @@ int main() |
|
|
|
var = qc_getenv("BINDIR"); |
|
|
|
var = qc_getenv("BINDIR"); |
|
|
|
if(!var.isEmpty()) |
|
|
|
if(!var.isEmpty()) |
|
|
|
str += QString("BINDIR = %1\n").arg(var); |
|
|
|
str += QString("BINDIR = %1\n").arg(var); |
|
|
|
|
|
|
|
var = qc_getenv("INCDIR"); |
|
|
|
|
|
|
|
if(!var.isEmpty()) |
|
|
|
|
|
|
|
str += QString("INCDIR = %1\n").arg(var); |
|
|
|
var = qc_getenv("LIBDIR"); |
|
|
|
var = qc_getenv("LIBDIR"); |
|
|
|
if(!var.isEmpty()) |
|
|
|
if(!var.isEmpty()) |
|
|
|
str += QString("LIBDIR = %1\n").arg(var); |
|
|
|
str += QString("LIBDIR = %1\n").arg(var); |
|
|
@ -1556,7 +1610,7 @@ export QC_WITH_LIBCOMMONCPP2_LIB |
|
|
|
export QC_DISABLE_libmagick |
|
|
|
export QC_DISABLE_libmagick |
|
|
|
export QC_WITH_LIBMAGICK_INC |
|
|
|
export QC_WITH_LIBMAGICK_INC |
|
|
|
export QC_WITH_LIBMAGICK_LIB |
|
|
|
export QC_WITH_LIBMAGICK_LIB |
|
|
|
export QC_DEBUG |
|
|
|
export QC_VERBOSE |
|
|
|
rm -rf .qconftemp |
|
|
|
rm -rf .qconftemp |
|
|
|
( |
|
|
|
( |
|
|
|
mkdir .qconftemp |
|
|
|
mkdir .qconftemp |
|
|
@ -1569,7 +1623,7 @@ rm -rf .qconftemp |
|
|
|
|
|
|
|
|
|
|
|
if [ "$?" != "0" ]; then |
|
|
|
if [ "$?" != "0" ]; then |
|
|
|
rm -rf .qconftemp |
|
|
|
rm -rf .qconftemp |
|
|
|
if [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
if [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo " -> fail" |
|
|
|
echo " -> fail" |
|
|
|
else |
|
|
|
else |
|
|
|
echo "fail" |
|
|
|
echo "fail" |
|
|
@ -1578,7 +1632,7 @@ if [ "$?" != "0" ]; then |
|
|
|
printf "Reason: There was an error compiling 'conf'. See conf.log for details.\n" |
|
|
|
printf "Reason: There was an error compiling 'conf'. See conf.log for details.\n" |
|
|
|
printf "\n" |
|
|
|
printf "\n" |
|
|
|
show_qt_info |
|
|
|
show_qt_info |
|
|
|
if [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
if [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo "conf.log:" |
|
|
|
echo "conf.log:" |
|
|
|
cat conf.log |
|
|
|
cat conf.log |
|
|
|
fi |
|
|
|
fi |
|
|
@ -1602,7 +1656,7 @@ if [ "$ret" = "1" ]; then |
|
|
|
else |
|
|
|
else |
|
|
|
if [ "$ret" != "0" ]; then |
|
|
|
if [ "$ret" != "0" ]; then |
|
|
|
rm -rf .qconftemp |
|
|
|
rm -rf .qconftemp |
|
|
|
if [ "$QC_DEBUG" = "Y" ]; then |
|
|
|
if [ "$QC_VERBOSE" = "Y" ]; then |
|
|
|
echo " -> fail" |
|
|
|
echo " -> fail" |
|
|
|
else |
|
|
|
else |
|
|
|
echo "fail" |
|
|
|
echo "fail" |
|
|
|