mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Circular dependencies in ptxdist
@ 2016-10-11  7:26 Guillermo Rodriguez Garcia
  2016-10-11 14:43 ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Guillermo Rodriguez Garcia @ 2016-10-11  7:26 UTC (permalink / raw)
  To: ptxdist

Hello,

I am trying to create a ptxdist package for Harfbuzz
(https://www.freedesktop.org/wiki/Software/HarfBuzz/) but I have found
that Harfbuzz has a circular dependency with freetype: FreeType can
use Harfbuzz to improve hinting, but Hardbuzz needs FreeType to build.

Typical advice on how to handle this is: First build freetype without
Harfbuzz support, then build and install Harfbuzz, then rebuild and
reinstall Freetype with Harfbuzz support.

"Install FreeType, then HarfBuzz, then after HarfBuzz is installed,
rebuild and reinstall FreeType".

My question is, how can this handled in ptxdist?

I am considering something like the following:

1. A Freetype_bootstrap package that will build FT without Harfbuzz,
with an empty targetinstall stage. This is just so that Harfbuzz can
build
2. A Harfbuzz package that requires Freetype_bootstrap, and does the
actual targetinstall for Harfbuzz
3. Modify the Freetype package to add a "ENABLE_HARFBUZZ" option. If
this is enabled, then Freetype also SELECTS Harfbuzz.

Does this sound reasonable?

Are there other cases like this in ptxdist ?

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Circular dependencies in ptxdist
  2016-10-11  7:26 [ptxdist] Circular dependencies in ptxdist Guillermo Rodriguez Garcia
@ 2016-10-11 14:43 ` Michael Olbrich
  2016-10-12  9:00   ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2016-10-11 14:43 UTC (permalink / raw)
  To: ptxdist

Hi,

On Tue, Oct 11, 2016 at 09:26:02AM +0200, Guillermo Rodriguez Garcia wrote:
> I am trying to create a ptxdist package for Harfbuzz
> (https://www.freedesktop.org/wiki/Software/HarfBuzz/) but I have found
> that Harfbuzz has a circular dependency with freetype: FreeType can
> use Harfbuzz to improve hinting, but Hardbuzz needs FreeType to build.
> 
> Typical advice on how to handle this is: First build freetype without
> Harfbuzz support, then build and install Harfbuzz, then rebuild and
> reinstall Freetype with Harfbuzz support.
> 
> "Install FreeType, then HarfBuzz, then after HarfBuzz is installed,
> rebuild and reinstall FreeType".
> 
> My question is, how can this handled in ptxdist?
> 
> I am considering something like the following:
> 
> 1. A Freetype_bootstrap package that will build FT without Harfbuzz,
> with an empty targetinstall stage. This is just so that Harfbuzz can
> build
> 2. A Harfbuzz package that requires Freetype_bootstrap, and does the
> actual targetinstall for Harfbuzz
> 3. Modify the Freetype package to add a "ENABLE_HARFBUZZ" option. If
> this is enabled, then Freetype also SELECTS Harfbuzz.
> 
> Does this sound reasonable?
> 
> Are there other cases like this in ptxdist ?

I don't think there is a better solution. So just do it like this.
If possible, I think you should use some other prefix for the bootstrap
freetype, or maybe use an empty install.post stage, so other packages won't
pick this up. And then point Harfbuzz to this.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Circular dependencies in ptxdist
  2016-10-11 14:43 ` Michael Olbrich
@ 2016-10-12  9:00   ` Guillermo Rodriguez Garcia
  2016-10-20  7:16     ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Guillermo Rodriguez Garcia @ 2016-10-12  9:00 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1966 bytes --]

Hi Michael,

El martes, 11 de octubre de 2016, Michael Olbrich <m.olbrich@pengutronix.de>
escribió:

> Hi,
>
> On Tue, Oct 11, 2016 at 09:26:02AM +0200, Guillermo Rodriguez Garcia wrote:
> > I am trying to create a ptxdist package for Harfbuzz
> > (https://www.freedesktop.org/wiki/Software/HarfBuzz/) but I have found
> > that Harfbuzz has a circular dependency with freetype: FreeType can
> > use Harfbuzz to improve hinting, but Hardbuzz needs FreeType to build.
> >
> > Typical advice on how to handle this is: First build freetype without
> > Harfbuzz support, then build and install Harfbuzz, then rebuild and
> > reinstall Freetype with Harfbuzz support.
> >
> > "Install FreeType, then HarfBuzz, then after HarfBuzz is installed,
> > rebuild and reinstall FreeType".
> >
> > My question is, how can this handled in ptxdist?
> >
> > I am considering something like the following:
> >
> > 1. A Freetype_bootstrap package that will build FT without Harfbuzz,
> > with an empty targetinstall stage. This is just so that Harfbuzz can
> > build
> > 2. A Harfbuzz package that requires Freetype_bootstrap, and does the
> > actual targetinstall for Harfbuzz
> > 3. Modify the Freetype package to add a "ENABLE_HARFBUZZ" option. If
> > this is enabled, then Freetype also SELECTS Harfbuzz.
> >
> > Does this sound reasonable?
> >
> > Are there other cases like this in ptxdist ?
>
> I don't think there is a better solution. So just do it like this.


I am just thinking that this does not completely solve the problem. If
someone selects harfbuzz but not freetype, harfbuzz will build correctly
but will fail at runtime because freetype will not be present. The obvious
solution of making harfbuzz depend on freetype will not allow to build
freetype --with-harfbuzz (chicken and egg problem)

I am not sure how to solve this. Any ideas?

Guillermo




-- 
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 2525 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Circular dependencies in ptxdist
  2016-10-12  9:00   ` Guillermo Rodriguez Garcia
@ 2016-10-20  7:16     ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2016-10-20  7:16 UTC (permalink / raw)
  To: ptxdist

On Wed, Oct 12, 2016 at 11:00:12AM +0200, Guillermo Rodriguez Garcia wrote:
> El martes, 11 de octubre de 2016, Michael Olbrich <m.olbrich@pengutronix.de>
> escribió:
> > On Tue, Oct 11, 2016 at 09:26:02AM +0200, Guillermo Rodriguez Garcia wrote:
> > > I am trying to create a ptxdist package for Harfbuzz
> > > (https://www.freedesktop.org/wiki/Software/HarfBuzz/) but I have found
> > > that Harfbuzz has a circular dependency with freetype: FreeType can
> > > use Harfbuzz to improve hinting, but Hardbuzz needs FreeType to build.
> > >
> > > Typical advice on how to handle this is: First build freetype without
> > > Harfbuzz support, then build and install Harfbuzz, then rebuild and
> > > reinstall Freetype with Harfbuzz support.
> > >
> > > "Install FreeType, then HarfBuzz, then after HarfBuzz is installed,
> > > rebuild and reinstall FreeType".
> > >
> > > My question is, how can this handled in ptxdist?
> > >
> > > I am considering something like the following:
> > >
> > > 1. A Freetype_bootstrap package that will build FT without Harfbuzz,
> > > with an empty targetinstall stage. This is just so that Harfbuzz can
> > > build
> > > 2. A Harfbuzz package that requires Freetype_bootstrap, and does the
> > > actual targetinstall for Harfbuzz
> > > 3. Modify the Freetype package to add a "ENABLE_HARFBUZZ" option. If
> > > this is enabled, then Freetype also SELECTS Harfbuzz.
> > >
> > > Does this sound reasonable?
> > >
> > > Are there other cases like this in ptxdist ?
> >
> > I don't think there is a better solution. So just do it like this.
> 
> 
> I am just thinking that this does not completely solve the problem. If
> someone selects harfbuzz but not freetype, harfbuzz will build correctly
> but will fail at runtime because freetype will not be present. The obvious
> solution of making harfbuzz depend on freetype will not allow to build
> freetype --with-harfbuzz (chicken and egg problem)
> 
> I am not sure how to solve this. Any ideas?

Just create the harfbuzz package and depend on freetype. Don't change
freetype. We have --without-harfbuzz here already. We can revisit this
problem when someone needs freetype with harfbuzz support enabled.
Debian is doing the same thing, so I'd say it's good enough for us too.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-20  7:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11  7:26 [ptxdist] Circular dependencies in ptxdist Guillermo Rodriguez Garcia
2016-10-11 14:43 ` Michael Olbrich
2016-10-12  9:00   ` Guillermo Rodriguez Garcia
2016-10-20  7:16     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox