summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2022-04-26 11:49:41 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2022-05-03 16:05:08 +0900
commit4eea79e9ea9ca8f9040ff00822af759e4928dbe2 (patch)
treec27b77f41d49b0817f9417f57e9e8ade129b6327
parent2471aba5b824b62d551947119707f6efa28f4866 (diff)
downloadtdebindings-4eea79e9ea9ca8f9040ff00822af759e4928dbe2.tar.gz
tdebindings-4eea79e9ea9ca8f9040ff00822af759e4928dbe2.zip
Fix FTBFS when tdehw is not present. This resolves bug 2494.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 9e6f7cc6edf551e435d213cd60db2238a06cb892)
-rw-r--r--kalyptus/kalyptus15
-rw-r--r--smoke/tde/generate.pl.in1
-rw-r--r--smoke/tqt/generate.pl.in1
3 files changed, 16 insertions, 1 deletions
diff --git a/kalyptus/kalyptus b/kalyptus/kalyptus
index 76c29ee8..c405eefd 100644
--- a/kalyptus/kalyptus
+++ b/kalyptus/kalyptus
@@ -27,7 +27,7 @@ use vars qw/ %rootNodes $declNodeType @includes_list %options @formats_wanted $a
$libdir $libname $outputdir @libs $parse_global_space $qt_embedded $qt4 $striphpath $doPrivate $readstdin
$Version $quiet $debug $debuggen $parseonly $currentfile $cSourceNode $exe
%formats %flagnames @allowed_k_dcop_accesors $allowed_k_dcop_accesors_re $rootNode
- @classStack $cNode $globalSpaceClassName
+ @classStack $cNode $globalSpaceClassName $have_tdehw_lib
$lastLine $docNode @includes $cpp $defcppcmd $cppcmd $docincluded
$inExtern $inNamespace %stats %definitions @inputqueue @codeqobject @qt4_codeqobject @qte_codeqobject /;
@@ -230,6 +230,18 @@ if ( $#includes >= 0 && !$cpp ) {
die "$exe: --includedir requires --cpp\n";
}
+# Check for tdehw lib headers presence
+if (-e "$ENV{KDE_PREFIX}/include/tdehardwaredevices.h")
+{
+ $have_tdehw_lib = 1;
+ print "kalyptus: tdehw headers found in $ENV{KDE_PREFIX}/include\n";
+}
+else
+{
+ $have_tdehw_lib = 0;
+ print "kalyptus: tdehw headers not found in $ENV{KDE_PREFIX}/include\n";
+}
+
# Check output formats. HTML is the default
if( $#formats_wanted < 0 ) {
push @formats_wanted, "java";
@@ -602,6 +614,7 @@ LOOP:
$p =~ m/^#\s*if\s+defined\s*\(qdoc/ or
$p =~ m/^#\s*ifndef\s+QT_NO_MEMBER_TEMPLATES/ or
$p =~ m/^#if\s*!defined\(Q_NO_USING_KEYWORD\)/ or
+ (not $have_tdehw_lib and $p =~ m/^#\s*ifdef\s+__TDE_HAVE_TDEHWLIB/) or
&$match_qt_defines( $p ) or
$p =~ m/^#\s*if\s+0\s+/ ) {
my $if_depth = 1;
diff --git a/smoke/tde/generate.pl.in b/smoke/tde/generate.pl.in
index e3c21747..6d0eb698 100644
--- a/smoke/tde/generate.pl.in
+++ b/smoke/tde/generate.pl.in
@@ -185,6 +185,7 @@ find(
);
# Launch kalyptus
+$ENV{KDE_PREFIX} = "@KDE_PREFIX@";
system "perl kalyptus @ARGV --globspace -fsmoke --name=qt $macros --no-cache --allow_k_dcop_accessors --outputdir=$outdir @headers @kdeheaders";
my $exit = $? >> 8;
exit $exit if ($exit);
diff --git a/smoke/tqt/generate.pl.in b/smoke/tqt/generate.pl.in
index 8c156a37..21d9d9c3 100644
--- a/smoke/tqt/generate.pl.in
+++ b/smoke/tqt/generate.pl.in
@@ -132,6 +132,7 @@ foreach $filename (readdir(QT)) {
closedir QT;
# Launch kalyptus
+$ENV{KDE_PREFIX} = "@KDE_PREFIX@";
chdir "../smoke/tqt";
system "perl -I@top_srcdir@/kalyptus @top_srcdir@/kalyptus/kalyptus @ARGV --globspace -fsmoke --name=qt $macros --no-cache --outputdir=$outdir @headers";
my $exit = $? >> 8;