Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 518970 - media-libs/gd: please review prefix changes
Summary: media-libs/gd: please review prefix changes
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords: Inclusion, PATCH
Depends on:
Blocks: prefix-gx86
  Show dependency tree
 
Reported: 2014-08-03 20:08 UTC by Christoph Junghans (RETIRED)
Modified: 2016-05-18 15:54 UTC (History)
2 users (show)

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


Attachments
patch against gx86 version (gd-2.0.35-r4.ebuild.patch,1.73 KB, patch)
2014-08-03 20:08 UTC, Christoph Junghans (RETIRED)
Details | Diff
patch against gx86 version (gd-2.0.35-r4.ebuild.patch,1.22 KB, patch)
2014-08-03 23:47 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2014-08-03 20:08:02 UTC
Created attachment 382170 [details, diff]
patch against gx86 version

Changes:
- added prefixed fontpath as DEFAULT_FONTPATH
Comment 1 SpanKY gentoo-dev 2014-08-03 22:55:40 UTC
man that's ugly ... two things

instead of doing:
  fontpath="${fontpath}:...
do:
  fontpath+=":...

is this needed when USE=fontconfig ?  because in that case, won't gd use fontconfig to locate fonts and fontconfig knows where to find things ?  if so, maybe we should just force USE=fontconfig on prefix systems ?
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2014-08-03 23:47:51 UTC
Created attachment 382192 [details, diff]
patch against gx86 version

(In reply to SpanKY from comment #1)
> man that's ugly ... two things
> 
> instead of doing:
>   fontpath="${fontpath}:...
> do:
>   fontpath+=":...
Done.

> 
> is this needed when USE=fontconfig ?  because in that case, won't gd use
> fontconfig to locate fonts and fontconfig knows where to find things ?  if
> so, maybe we should just force USE=fontconfig on prefix systems ?
I think, you are right. We could put this block inside use !fontconfig.
 
@grobian: should we force fontconfig on prefix?
Comment 3 Fabian Groffen gentoo-dev 2014-08-04 05:49:18 UTC
I seem to remember sth like this, so makes sense to me!
Comment 4 Christoph Junghans (RETIRED) gentoo-dev 2014-08-04 16:21:23 UTC
(In reply to Fabian Groffen from comment #3)
> I seem to remember sth like this, so makes sense to me!
Do this mean, yea or nay?

Yea1: REQUIRED_USE="prefx? ( fontconfig )"
or
Yea2: package.use.force
Comment 5 SpanKY gentoo-dev 2014-08-05 00:50:24 UTC
(In reply to Christoph Junghans from comment #4)

i'm fine with either approach ... leave it up to you guys
Comment 6 Fabian Groffen gentoo-dev 2014-08-05 06:54:12 UTC
(In reply to Christoph Junghans from comment #4)
> (In reply to Fabian Groffen from comment #3)
> > I seem to remember sth like this, so makes sense to me!
> Do this mean, yea or nay?

yay (sorry)

> Yea1: REQUIRED_USE="prefx? ( fontconfig )"
> or
> Yea2: package.use.force

I'd prefer the first approach
Comment 7 Christoph Junghans (RETIRED) gentoo-dev 2014-08-05 14:37:05 UTC
+  05 Aug 2014; Christoph Junghans <ottxor@gentoo.org> gd-2.0.35-r4.ebuild:
+  added prefix support (bug #518970)
+
Comment 8 Fabian Groffen gentoo-dev 2014-08-21 07:45:02 UTC
Christoph, where is the fontcase statement as was in you patch?  It's gone in the ebuild now, which broke font-localising.  Was this intentional?  Then I misunderstood the implications of this bug :/
Comment 9 Christoph Junghans (RETIRED) gentoo-dev 2014-08-21 14:59:36 UTC
(In reply to Fabian Groffen from comment #8)
> Christoph, where is the fontcase statement as was in you patch?  It's gone
> in the ebuild now, which broke font-localising.  Was this intentional?  Then
> I misunderstood the implications of this bug :/
Wasn't the idea that by forcing fontconfig, hard-coded font paths in gd are not necessary anymore?
Comment 10 Fabian Groffen gentoo-dev 2014-08-21 15:01:25 UTC
Ok, well it's not.  My fault, didn't get that.  I compiled gd with the font paths and now it finds my fonts again.  Not sure what it uses fontconfig for then.
Comment 11 Fabian Groffen gentoo-dev 2014-08-27 17:46:34 UTC
To restore functionality, I'd love to commit the case statement as in attachment #1 [details].  If there are no objections, I'll commit this by the end of this week.
Comment 12 SpanKY gentoo-dev 2014-09-16 04:17:21 UTC
(In reply to Fabian Groffen from comment #11)

i'd really really prefer to not do that.  let's figure out what fontconfig is for as that's the cleaner path (assuming it does what we need -- font loading).
Comment 13 SpanKY gentoo-dev 2015-12-15 14:02:03 UTC
seems like the paths you're adding are just duplicating what's already in the source tree.  the only thing you really want to do is add some extra search paths -- namely the corefonts repo.  if you really want to pursue that route, you could send a pull request to the github repo to add a new configure option that'd allow control over the font path.

do you have a testcase you're looking at to check behavior ?  looking at the gd code a bit more, did you call gdFTUseFontConfig(1) first ?  if not, it won't look at fontconfig during runtime.
Comment 14 SpanKY gentoo-dev 2016-05-18 15:54:04 UTC
i'm just going to make you guys get this merged upstream :).  the good news is that i have commit access up there so i can review/approve your PRs.