Fix FTBFS when tdehw is not present. This resolves bug 2494. #10

Συγχωνευμένα
MicheleC συγχώνευσε 1 υποβολές από fix/build-without-tdehw σε master 2 έτη πριν
MicheleC σχολίασε 2 έτη πριν
Ιδιοκτήτης

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.

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.
MicheleC πρόσθεσε 1 υποβολή 2 έτη πριν
1bdb319ef5
Fix FTBFS when tdehw is not present. This resolves bug 2494.
MicheleC ζητήθηκε αναθεώρηση από SlavekB 2 έτη πριν
MicheleC το πρόσθεσε στο R14.0.13 release ορόσημο 2 έτη πριν
SlavekB αξιολόγησε 2 έτη πριν
SlavekB άφησε ένα σχόλιο
Ιδιοκτήτης

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.

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.
configure.in.bot Παρωχημένο
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
SlavekB σχολίασε 2 έτη πριν
Ιδιοκτήτης

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?

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?
MicheleC σημείωση αυτή την συνομιλία ως επιλυμένη
configure.in.in Παρωχημένο
CXXFLAGS="$CXXFLAGS $KDE_INCLUDES $TQT_INCLUDES $all_includes"
AC_TRY_COMPILE([
#include <tdehardwaredevices.h>
SlavekB σχολίασε 2 έτη πριν
Ιδιοκτήτης

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?

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?
MicheleC σχολίασε 2 έτη πριν
Συντάκτης
Ιδιοκτήτης

Nice, I like this idea :-)

Nice, I like this idea :-)
MicheleC σημείωση αυτή την συνομιλία ως επιλυμένη
MicheleC force-pushed fix/build-without-tdehw από το 1bdb319ef5 στο 2f653946e2 2 έτη πριν
MicheleC force-pushed fix/build-without-tdehw από το 2f653946e2 στο 74afa30cd5 2 έτη πριν
MicheleC σχολίασε 2 έτη πριν
Συντάκτης
Ιδιοκτήτης

I ended up just checking for the existance of tdehardwaredevices.h directly in kalyptus. Much smaller change than the initial version :-)

I ended up just checking for the existance of tdehardwaredevices.h directly in kalyptus. Much smaller change than the initial version :-)
SlavekB ζήτησε αλλαγές 2 έτη πριν
SlavekB άφησε ένα σχόλιο
Ιδιοκτήτης

It does not work properly on a clean chroot – see the comment below.

It does not work properly on a clean chroot – see the comment below.
kalyptus/kalyptus Παρωχημένο
if (-e "$ENV{TDEDIR}/include/tdehardwaredevices.h")
{
$have_tdehw_lib = 1;
print "tdehw headers found\n";
SlavekB σχολίασε 2 έτη πριν
Ιδιοκτήτης

Here it would be good to add the prefix "kalyptus: ", so that the build log shows where the report belongs.

Here it would be good to add the prefix "kalyptus: ", so that the build log shows where the report belongs.
MicheleC σημείωση αυτή την συνομιλία ως επιλυμένη
kalyptus/kalyptus Παρωχημένο
else
{
$have_tdehw_lib = 0;
print "tdehw headers not found\n";
SlavekB σχολίασε 2 έτη πριν
Ιδιοκτήτης

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:

print "kalyptus: tdehw headers not found at $ENV{TDEDIR}/include/tdehardwaredevices.h\n";

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.

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: ``` print "kalyptus: tdehw headers not found at $ENV{TDEDIR}/include/tdehardwaredevices.h\n"; ``` 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.
MicheleC σημείωση αυτή την συνομιλία ως επιλυμένη
SlavekB force-pushed fix/build-without-tdehw από το 74afa30cd5 στο 9e6f7cc6ed 2 έτη πριν
MicheleC σχολίασε 2 έτη πριν
Συντάκτης
Ιδιοκτήτης

New commit tested in clean chroot environment with and without tdehw lib. Works fine.

New commit tested in clean chroot environment with and without tdehw lib. Works fine.
MicheleC ζητήθηκε αναθεώρηση από SlavekB 2 έτη πριν
SlavekB ενέκρινε αυτές τις αλλαγές 2 έτη πριν
SlavekB άφησε ένα σχόλιο
Ιδιοκτήτης

It looks good.

It looks good.
MicheleC συγχώνευσε την υποβολή 9e6f7cc6ed σε master 2 έτη πριν
MicheleC διέγραψε το κλάδο fix/build-without-tdehw 2 έτη πριν

Εξεταστές

SlavekB ενέκρινε αυτές τις αλλαγές 2 έτη πριν
Το pull request έχει συγχωνευθεί ως 9e6f7cc6ed.
Συνδεθείτε για να συμμετάσχετε σε αυτή τη συνομιλία.
Δεν υπάρχουν εξεταστές
Χωρίς Ορόσημο
Χωρίς Αποδέκτη
2 Συμμετέχοντες
Ειδοποιήσεις
Ημερομηνία Παράδοσης

Δεν ορίστηκε ημερομηνία παράδοσης.

Εξαρτήσεις

Δεν έχουν οριστεί εξαρτήσεις.

Αναφορά: TDE/tdebindings#10
Φόρτωση…
Δεν υπάρχει ακόμα περιεχόμενο.