Fix FTBFS when tdehw is not present. This resolves bug 2494. #10
Συγχωνευμένα
MicheleC
συγχώνευσε 1 υποβολές από fix/build-without-tdehw σε master 2 έτη πριν
Φόρτωση…
Αναφορά σε νέο ζήτημα
Δεν υπάρχει ακόμα περιεχόμενο.
Διαγραφή του Κλάδου 'fix/build-without-tdehw'
Η διαγραφή του κλάδου είναι μόνιμη. ΔΕΝ ΜΠΟΡΕΙ να αναιρεθεί. Συνέχεια;
When tdehw lib is not detected, all the preprocessor blocks defined by "TDE_HAVE_TDEHWLIB" will be skipped during the smoke file generation.
Tested successfully both when tdehw is present and not present.
This is a good idea, but there could be a cleaner solution than the dynamic patching of the script in the source directory – see comments below.
echo ""echo "tdehw lib was not found. Classes and methods from tdehw will not be included."echo ""perl -pe '$_ = qq($_\t\t\t\t\ \ \ \ \ \$p =~ m/^#\\s*ifdef\\s+__TDE_HAVE_TDEHWLIB/ or\n) if $_ =~ "Q_NO_USING_KEYWORD"' -i kalyptus/kalyptusThis is a good way, but a little dirty solution.
There is a problem that it dynamically changing the file in the source directory, which can represent a prohibited step for some strict distributions. It is true that tdebindings does not use building outside the source directory, so it may not be a major problem at this time, but it is a question whether to keep it or trying about a cleaner solution?
CXXFLAGS="$CXXFLAGS $KDE_INCLUDES $TQT_INCLUDES $all_includes"AC_TRY_COMPILE([#include <tdehardwaredevices.h>Maybe it could be a simpler test – verify if
kdemacros.hdefines__TDE_HAVE_TDEHWLIB?Alternatively, such a test could be performed directly in the kalyptus script. And add
__TDE_HAVE_TDEHWLIBto the removed preprocessor macros according to the test result dynamically directly in the kalyptus script. This could eliminate the need for dynamic script patching. What do you think about such a solution?Nice, I like this idea :-)
1bdb319ef5στο2f653946e22 έτη πριν2f653946e2στο74afa30cd52 έτη πρινI ended up just checking for the existance of tdehardwaredevices.h directly in kalyptus. Much smaller change than the initial version :-)
It does not work properly on a clean chroot – see the comment below.
if (-e "$ENV{TDEDIR}/include/tdehardwaredevices.h"){$have_tdehw_lib = 1;print "tdehw headers found\n";Here it would be good to add the prefix "kalyptus: ", so that the build log shows where the report belongs.
else{$have_tdehw_lib = 0;print "tdehw headers not found\n";Here it would be good to add the prefix "kalyptus:", but also information where the header was searched for to help to analyze the problem. Something like:
In any case, there is a problem, because when build on a clean chroot, there is not defined
TDEDIRand the test is falsely negative.74afa30cd5στο9e6f7cc6ed2 έτη πρινNew commit tested in clean chroot environment with and without tdehw lib. Works fine.
It looks good.
9e6f7cc6edσε master 2 έτη πρινΕξεταστές
9e6f7cc6ed.