Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143090 - Buggy includes in vdr-plugin.eclass
Summary: Buggy includes in vdr-plugin.eclass
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Matthias Schwarzott
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-07 07:12 UTC by ml
Modified: 2006-08-29 03:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for ugly include handling (vdr-plugin.eclass.diff,1.36 KB, patch)
2006-08-07 07:13 UTC, ml
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ml 2006-08-07 07:12:42 UTC
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.
Comment 1 ml 2006-08-07 07:13:49 UTC
Created attachment 93659 [details, diff]
Patch for ugly include handling
Comment 2 Matthias Schwarzott gentoo-dev 2006-08-07 07:43:38 UTC
(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.
Comment 3 ml 2006-08-07 08:41:37 UTC
(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
Comment 4 Matthias Schwarzott gentoo-dev 2006-08-15 04:00:02 UTC
Problem is not the eclass, but the three plugins.
But nevertheless the eclass could be cleaned up a bit.
Comment 5 Matthias Schwarzott gentoo-dev 2006-08-29 03:34:22 UTC
Closed as the problem lies at the plugins not the eclass.
Nevertheless the eclass has been cleaned up a bit.