Fix FTBFS when tdehw is not present. This resolves bug 2494. #10
Merged
MicheleC
merged 1 commits from fix/build-without-tdehw
into master
3 months ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'fix/build-without-tdehw'
Deleting a branch is permanent. It CANNOT be undone. Continue?
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/kalyptus
This 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.h
defines__TDE_HAVE_TDEHWLIB
?Alternatively, such a test could be performed directly in the kalyptus script. And add
__TDE_HAVE_TDEHWLIB
to 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
to2f653946e2
4 months ago2f653946e2
to74afa30cd5
4 months agoI 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
TDEDIR
and the test is falsely negative.74afa30cd5
to9e6f7cc6ed
3 months agoNew commit tested in clean chroot environment with and without tdehw lib. Works fine.
It looks good.
9e6f7cc6ed
into master 3 months agoReviewers
9e6f7cc6ed
.