Hi, the include paths for VDR_INCLUDE_DIR in vdr-plugin.eclass are quite ugly. Although the headers are in '/usr/include/vdr' the include path set in vdr-plugin.eclass is '/usr/include'. Then the eclass does a lot of ugly patching of the Makefiles to add the '/vdr' suffix. But this DOESN'T catch the C/C++ header files causing a lot patch work for the Ebuild developer. Applied is a patch to solve this.
Created attachment 93659 [details, diff] Patch for ugly include handling
(In reply to comment #0) > Hi, > > the include paths for VDR_INCLUDE_DIR in vdr-plugin.eclass are quite ugly. > Possibly this looks ugly, but it works correct. > Although the headers are in '/usr/include/vdr' the include path set in > vdr-plugin.eclass is '/usr/include'. Then the eclass does a lot of ugly > patching of the Makefiles to add the '/vdr' suffix. Correct, headers are in /usr/include/vdr, but when using #include <vdr/channel.h> one has to supply gcc with -I/usr/include (or leave it away as it is added by default) to help it find the file. The bad ones are the plugins as they assume most of the time that they reside in a subdir of the source-tarball of vdr. > > But this DOESN'T catch the C/C++ header files causing a lot patch work for the > Ebuild developer. > > Applied is a patch to solve this. > Can you please tell me where the big problems are your try to argument with in here. If we start using your solution we also have to change (another time) the -I... parameters as -I/usr/include/vdr is incorrect.
(In reply to comment #2) > The bad ones are the plugins as they assume most of the time that they reside > in a subdir of the source-tarball of vdr. > > > > > But this DOESN'T catch the C/C++ header files causing a lot patch work for the > > Ebuild developer. > > > > Applied is a patch to solve this. > > > Can you please tell me where the big problems are your try to argument with in > here. The argument is that I had to patch (and find with try&error before) about 30 includes in headers and files of three plugins to match '#include <vdr/name>' instead of '#include <name>' With the patch supplied from me the three plugins worked out of the box. That patch isn't perfect, of course, but should be a start to clean up the eclass. There never ever should be any patches necessary on the C/C++-headers but only on the Makefile. Renne
Problem is not the eclass, but the three plugins. But nevertheless the eclass could be cleaned up a bit.
Closed as the problem lies at the plugins not the eclass. Nevertheless the eclass has been cleaned up a bit.