JuliaGraphics / FreeTypeBuilder

Shared library builder for FreeType2
0 stars 3 forks source link

pango / harfbuzz #2

Open bjarthur opened 5 years ago

bjarthur commented 5 years ago

trying to build pango with FreeTypeBuilder, but purportedly freetype must first be built alone, then harfbuzz built, then freetype built again. otherwise hb-ft.h is not installed. see https://www.linuxquestions.org/questions/linux-from-scratch-13/make-%2A%2A%2A-%5B-sources-blfs-freetype-2-6-3-objs-autofit-lo%5D-error-1-a-4175583724

is that possible with BinaryBuilder?

Gnimuc commented 5 years ago

do you mean pango needs a custom freetype shipping with an additional header called hb-ft.h(harfbuzz do not need to be a dependency of pango) or pango needs harfbuzz(hb-ft.h) as its dependency which in turn depends on freetype(no custom freetype is needed)?

If it's the first case, we could build a custom freetype in another branch of FreeTypeBuilder:

  1. when building harfbuzz, add FreeTypeBuilder's build script as its binary dependency
  2. upload harfbuzz's build script to a project, say, HarfbuzzBuilder
  3. build the custom freetype and add harfbuzz's build script as its binary dependency
  4. the output should include the header
  5. build pango

If it's the second case, we could add both HarfbuzzBuilder and FreeTypeBuilder as the binary dependencies when building pango.

Even if pango needs both harfbuzz(depends on a common freetype) and a custom freetype as its dependencies, I guess it's also possible to do the job(use a different product/lib name for the custom freetype).

BTW, you may need to use this method to workaround https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/194

bjarthur commented 5 years ago

i've tried the second and it doesn't work (complains it can't find hb-ft.h and no wonder because find / -name hb-ft.h returns nothing), so i think it's the former. will try building a custom freetype as you describe. i've already got https://github.com/bjarthur/HarfbuzzBuilder , but guess will have to rebuild it with FreeTypeBuilder as a dependency.

bjarthur commented 5 years ago

i've rebuilt Harbuzz with a FreeType dependency. and rebuilt FreeType with dependencies on both itself and Harfbuzz. the configure/make/install cycle produced no errors, but the BinaryBuilder wizard is reporting that there are no build products:

            # Step 4: Select build products

ERROR: The build has produced no binary artifacts.
       This is generally because an error occured during the build
       or because you forgot to `make install` or equivalent.

How would you like to proceed?
 > Return to build environment
   Retry with a clean build environment
   Edit the script

when i execute FreeTypeBuilder/build_tarballs.jl on the command line it finishes really quickly and outputs empty tar files:

arthurb-lm4:FreeTypeBuilder arthurb$ tar xvzfO products/FreeType2.v2.9.1.x86_64-linux-gnu.tar.gz
x ./
x ./bin/
x ./include/
x ./lib/
x ./manifests/
x ./share/
x ./share/gtk-doc/
x ./share/gtk-doc/html/
x ./lib/cmake/

perhaps @staticfloat is the best person to ask?

staticfloat commented 5 years ago

I'm not sure I understand what you're trying to do with freetype and harfbuzz; you should never need to build a circular dependency like that.

I like to use Homebrew formulae (and also Arch PKGBUILD files) as guides, since they are often quite simple and straightforward to understand. Looking at their freetype, harfbuzz and pango formulae, it looks to me like there's no need for a FreeType that requires Harfbuzz.

Is there some feature that you require that would not be available with such a configuration?