Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 112635 - librsvg nsplugin won't build
Summary: librsvg nsplugin won't build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-15 12:47 UTC by Michael Cramer
Modified: 2006-02-15 20:22 UTC (History)
2 users (show)

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


Attachments
Patch to fix the logic in the ebuild (librsvg.ebuild.patch,876 bytes, patch)
2006-02-15 14:17 UTC, Daniel Nilsson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Cramer 2005-11-15 12:47:45 UTC
i'm installing gnome and this puts in firefox and also gecko-sdk and also
librsvg, but there i get this message:

>>> md5 files   ;-) librsvg-2.12.7.ebuild
>>> md5 files   ;-) files/digest-librsvg-2.12.6
>>> md5 files   ;-) files/digest-librsvg-2.12.7
>>> md5 files   ;-) files/digest-librsvg-2.9.5
>>> md5 files   ;-) files/digest-librsvg-1.0.3
>>> md5 files   ;-) files/librsvg-2.12.6-plugin_checks.patch
>>> md5 src_uri ;-) librsvg-2.12.7.tar.bz2
 * A SVG plugin for mozilla-compatible browsers is already present
 * in your system. To avoid replacing the old plug-in, librsvg
 * will be built with the plugin disabled.
 *
 * In order to use the plugin from librsvg, please make sure to
 * emerge gecko-sdk/mozilla-firefox/mozilla without the 'mozsvg'
 * USE flag.

but all of them show mozsvg as disabled:

bigmichi1 librsvg # emerge -pv gecko-sdk mozilla-firefox mozilla --nodeps

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-libs/gecko-sdk-1.7.12-r1  +crypt -debug +gnome +ipv6 +java
+ldap +mozcalendar +mozdevelop -moznocompose -moznoirc -moznomail -moznoxft
-mozsvg +postgres +ssl +truetype +xinerama +xprint 0 kB
[ebuild  N    ] www-client/mozilla-firefox-1.0.7-r3  -debug +gnome +ipv6 +java
+mozcalendar +mozdevelop -moznoxft -mozsvg +truetype +xinerama +xprint 32,131 kB
[ebuild  N    ] www-client/mozilla-1.7.12-r2  +crypt -debug +gnome +ipv6 +java
+ldap +mozcalendar +mozdevelop -moznocompose -moznoirc -moznomail -moznoxft
-mozsvg +postgres +ssl +truetype +xinerama +xprint 468 kB

i think the logic in the built_with_use is wrong, in my opinion all || must be
&& and then it would be compiled

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Actual Results:  
svg-plugin is not build when nsplugin and -mozsvg is set

Expected Results:  
should be build
Comment 1 Alessio D'Ascanio 2005-12-09 04:59:08 UTC
you should change

if use nsplugin && ( \
                built_with_use net-libs/gecko-sdk mozsvg || \
                built_with_use www-client/mozilla-firefox mozsvg || \
                built_with_use www-client/mozilla mozsvg ); then

in

if use nsplugin && ( \
                built_with_use net-libs/gecko-sdk mozsvg && \
                built_with_use www-client/mozilla-firefox mozsvg && \
                built_with_use www-client/mozilla mozsvg ); then
Comment 2 Daniel Nilsson 2006-01-23 11:22:48 UTC
I have the exact same problem and have done some investigation.
I have mozilla-firefox (1.0.7-r4) and gecko-sdk (1.7.12-r1) both installed without mozsvg (I double checked with equery). I have not installed mozilla at all.
Allthough I have little experience with ebuilds and shell programming (but I know other programming languages well) it looks to me that the logic in the ebuild is correct (but read on) and the proposal in comment #2 is wrong. I then looked up the source for the built_with_use function in eutils.eclass and there I found what's causing the problem. If the funtion is called for a package that is not installed it returns as if the requested flag was set (if I followed the code right, returning 0 is true and returning 1 is false in bash, right?)
That means that the logic in the ebuild is only correct if all three packages are installed.
The logic needs to be changed to only check the mozsvg flag for installed packages but how to do that is beyond my knowlege.
Comment 3 Sven 2006-01-26 13:37:46 UTC
I looked it up too.
built_with_use is returning 0=true for packages that are not installed.

Either the logic of the ebuild is wrong (it has to check, whether the packages are installed at all, and then if the useflag is set for them) or the logic within built_with_use is really wrong. I prefer the latter.
Comment 4 Daniel Nilsson 2006-02-15 14:17:24 UTC
Created attachment 79875 [details, diff]
Patch to fix the logic in the ebuild

The attached patch fixes the ebuild for me. It changes the logic to first test if each package is installed before checking for the mozsvg use-flag.
The solution is similar to that in several other ebuilds in portage (e.g. libquicktime-0.9.7-r1 and gimp-print-5.0.0_rc2)
Comment 5 Leonardo Boshell (RETIRED) gentoo-dev 2006-02-15 20:22:32 UTC
Thanks for the patch Daniel. It's been committed to the tree.