Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81955 - several bugs in media-sound/ptabtools-0.3.1
Summary: several bugs in media-sound/ptabtools-0.3.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Patrick Dawson (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-13 21:26 UTC by Yaakov S
Modified: 2005-02-20 11:20 UTC (History)
0 users

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


Attachments
ptabtools-0.3.1-r1.ebuild (ptabtools-0.3.1-r1.ebuild,960 bytes, text/plain)
2005-02-13 21:27 UTC, Yaakov S
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yaakov S 2005-02-13 21:26:48 UTC
It's already known the problem with make install and ptabtools.  This also applies to ptb.h -> /usr/include, where ptb.h is installed as a *file* ${D}/usr/include, which of course can't be merged because it collides with the directory /usr/include/.  This makes it a little hard to build against libptb, since #include <ptb.h> won't work. :-)

Solution: add 'dodir /usr/include' to src_install.  

In addition, I found some other bugs; the ptabtools.pc file was wrong, no docs were installed, and some dependencies were missing.  Regarding the deps, since in the Makefile compilation of ptb2xml is dependent on the presence of libxml-2.0 and libxslt, I've made these dependent based on the xsl USE flag.

Finally, I noticed that -fPIC is omitted from CFLAGS when compiling libptb-0.2.so.  Since in the Makefile both the .so and the executables share the same ptb.o, the only solution I found was to inherit flag-o-matic and append-flags -fPIC.  If this isn't correct/sufficient/optimal way to handle this, please let me know.

I'll attach a new ebuild below containing all these changes.
Comment 1 Yaakov S 2005-02-13 21:27:28 UTC
Created attachment 51182 [details]
ptabtools-0.3.1-r1.ebuild
Comment 2 Patrick Dawson (RETIRED) gentoo-dev 2005-02-15 16:38:45 UTC
Is -fPIC actually needed? If so, on which architectures? If it's not necessary, I prefer not to alter the author's Makefile.

BTW, the xml + xslt dependency seems to be non-optional, so making it conditional on a USE flag doesn't make much sense.

Thanks for your input.
Comment 3 Yaakov S 2005-02-15 17:20:33 UTC
Regarding -fPIC: see http://www.gentoo.org/proj/en/hardened/pic-internals.xml
In short, all shared libraries on all platforms really should be PIC.  Applications need not be, but I don't see a way of building the lib PIC and the apps not.

Regarding the xsl USE flag, quoting from the Makefile:

PROGS = ptb2ly ptb2ascii ptbinfo $(shell pkg-config --exists libxml-2.0 libxslt && echo ptb2xml)

In other words, building ptb2xml is dependent on pkg-config finding libxml-2.0 and libxslt; if they're not found, then ptb2xml won't be built.  Nothing else depends on these 2 libs, so therefore AFAICS there is room for this USE flag.
Comment 4 Patrick Dawson (RETIRED) gentoo-dev 2005-02-19 16:55:22 UTC
OK. One more question: why -lptb-0.2?
Comment 5 Patrick Dawson (RETIRED) gentoo-dev 2005-02-19 17:08:59 UTC
Ah nevermind, I see. The library gets named libptb-0.2.so. I'll talk to the author about these issues, and fix our ebuild in the meantime. Thanks.
Comment 6 Patrick Dawson (RETIRED) gentoo-dev 2005-02-20 11:20:44 UTC
ptabtools-0.3.1-r1 in portage. Please reopen if there are any problems.