HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Ticket
  • Next Ticket →

Ticket #261 (closed task: fixed)

Opened 6 years ago

Last modified 3 years ago

fontconfig 2.10.0

Reported by: michaelvoliveira Owned by: jstressman
Priority: normal Milestone: LibPak 1.0
Component: media-libs/fontconfig Version:
Severity: normal Keywords:
Cc:

Description

instructions to build this new version

Attachments

fontconfig-2.8.0.bep​ (427 bytes) - added by michaelvoliveira 6 years ago.
initial version. please review!
fontconfig-2.8.0.OptionalPackageDescription​ (188 bytes) - added by michaelvoliveira 6 years ago.
Optional Package Description file. now this ticket is complete and ready to be closed
fontconfig-2.8.0.patch​ (1.8 KB) - added by mloar 4 years ago.
fontconfig-2.10.0.bep​ (1.2 KB) - added by jstressman 3 years ago.
fontconfig-2.10.0.patch​ (558 bytes) - added by jstressman 3 years ago.
place in patches/ subfolder relative to the bep file.

Download all attachments as: .zip

Change History

Changed 6 years ago by michaelvoliveira

  • attachment fontconfig-2.8.0.bep​ added

initial version. please review!

comment:1 Changed 6 years ago by scottmc

Can you put together an .OptionalPackageDescription file for this as well?

comment:2 follow-up: ↓ 4 Changed 6 years ago by adek336

Could you check if 'fc-list' actually lists any fonts? That's the sole purpose of fontconfig, I don't think it will work on Haiku without at least changing the paths in a configuration file.

comment:3 Changed 6 years ago by scottmc

  • Owner changed from scottmc to michaelvoliveira
  • Type changed from enhancement to task

Applied in r541. Still waiting on that .OptionalPackageDescription file before closing this ticket.

comment:4 in reply to: ↑ 2 Changed 6 years ago by scottmc

  • Owner changed from michaelvoliveira to scottmc

Replying to adek336:

Could you check if 'fc-list' actually lists any fonts? That's the sole purpose of fontconfig, I don't think it will work on Haiku without at least changing the paths in a configuration file.

With r542 I have added the B_SYSTEM_FONT_DIRECTORY as the default font directory. It's failing for not being able to write the cache, so more work is needed on this one before calling it done. With r542 fc-list is giving a list of fonts, my common, and user fonts directories were empty so not sure if the --with-add-fonts worked or not. Need to test it with more fonts loaded i guess.

comment:5 Changed 6 years ago by scottmc

  • Milestone changed from Unscheduled to LibPak 1.0

comment:6 follow-up: ↓ 7 Changed 6 years ago by adek336

The file included with the prebuild binaries: /boot/common/etc/fonts/fonts.conf refers to /usr/local/share ; also, it doesn't seem right to have a /boot/common/etc directory.

comment:7 in reply to: ↑ 6 Changed 6 years ago by augiedoggie

Replying to adek336:

The file included with the prebuild binaries: /boot/common/etc/fonts/fonts.conf refers to /usr/local/share ; also, it doesn't seem right to have a /boot/common/etc directory.

/boot/common/etc is a standard part of Haiku. /etc is a symlink to /boot/common/etc. Or were you talking about something else?

Changed 6 years ago by michaelvoliveira

  • attachment fontconfig-2.8.0.OptionalPackageDescription​ added

Optional Package Description file. now this ticket is complete and ready to be closed

comment:8 Changed 5 years ago by scottmc

Should check to see if this is an issue on Haiku, that is once we get this one working:
 http://sourceforge.net/tracker/?func=detail&aid=2944951&group_id=66938&atid=516295

comment:9 Changed 5 years ago by scottmc

  • Resolution set to fixed
  • Status changed from new to closed

Almost works with r871.

make[1]: Leaving directory `/boot/develop/haikuports/media-libs/fontconfig/work/fontconfig-2.8.0/test'
make[1]: Entering directory `/boot/develop/haikuports/media-libs/fontconfig/work/fontconfig-2.8.0'
make[2]: Entering directory `/boot/develop/haikuports/media-libs/fontconfig/work/fontconfig-2.8.0'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/boot/common/etc/fonts" || /bin/mkdir -p "/boot/common/etc/fonts"
 /bin/install -c -m 644 fonts.dtd '/boot/common/etc/fonts'
sed \
                -e 's,@FC_CACHEDIR\@,/boot/home/config/cache,g' \
                -e 's,@FC_DEFAULT_FONTS\@,/boot/system/data/fonts,g' \
                -e 's,@FC_FONTPATH\@,<dir>/boot/common/data/fonts</dir> <dir>/boot/system/data/fonts</dir> <dir>/boot/home/config/data/fonts</dir>,g' \
                -e 's,@PACKAGE\@,fontconfig,g' \
                -e 's,@VERSION\@,2.8.0,g' \
                fonts.conf.in > fonts.conf.tmp && \
        mv fonts.conf.tmp fonts.conf
/bin/sh /boot/develop/haikuports/media-libs/fontconfig/work/fontconfig-2.8.0/install-sh -d /boot/common/etc/fonts /boot/home/config/cache
if [ -f /boot/common/etc/fonts/fonts.conf ]; then \
          echo "backing up existing /boot/common/etc/fonts/fonts.conf"; \
          mv /boot/common/etc/fonts/fonts.conf /boot/common/etc/fonts/fonts.conf.bak; \
        fi
backing up existing /boot/common/etc/fonts/fonts.conf
if [ -f ./fonts.conf ]; then \
          echo " /bin/install -c -m 644 ./fonts.conf /boot/common/etc/fonts/fonts.conf"; \
          /bin/install -c -m 644 ./fonts.conf /boot/common/etc/fonts/fonts.conf; \
        else if [ -f fonts.conf ]; then \
          echo " /bin/install -c -m 644 fonts.conf /boot/common/etc/fonts/fonts.conf"; \
          /bin/install -c -m 644 fonts.conf /boot/common/etc/fonts/fonts.conf; \
        fi; fi
 /bin/install -c -m 644 ./fonts.conf /boot/common/etc/fonts/fonts.conf
 /boot/common/bin/fc-cache -s -f -v
/boot/system/data/fonts: caching, new cache contents: 0 fonts, 2 dirs
/boot/system/data/fonts: failed to write cache
/boot/system/data/fonts/psfonts: caching, new cache contents: 4 fonts, 0 dirs
/boot/system/data/fonts/psfonts: failed to write cache
/boot/system/data/fonts/ttfonts: caching, new cache contents: 23 fonts, 0 dirs
/boot/system/data/fonts/ttfonts: failed to write cache
/boot/common/data/fonts: caching, new cache contents: 0 fonts, 0 dirs
/boot/common/data/fonts: failed to write cache
/boot/home/config/data/fonts: caching, new cache contents: 0 fonts, 0 dirs
/boot/home/config/data/fonts: failed to write cache
/boot/home/config/cache: cleaning cache directory
/boot/common/bin/fc-cache: failed
make[2]: *** [install-data-local] Error 5
make[2]: Leaving directory `/boot/develop/haikuports/media-libs/fontconfig/work/fontconfig-2.8.0'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/boot/develop/haikuports/media-libs/fontconfig/work/fontconfig-2.8.0'
make: *** [install-recursive] Error 1

comment:10 Changed 5 years ago by scottmc

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:11 Changed 5 years ago by augiedoggie

If I remember correctly, the cache directory(/boot/home/config/cache) doesn't exist by default. Have you ensured that this directory was created? I don't have a Haiku install available at the moment to check this though.

comment:12 Changed 5 years ago by michaelvoliveira

Yes.. the directory was created... but for some unknow reason, fontconfig don't succeed in create cache there

comment:13 Changed 5 years ago by scottmc

Anyone have any ideas on this one? fondconfig is trying to write the cache file(s) but always fails.

Changed 4 years ago by mloar

  • attachment fontconfig-2.8.0.patch​ added

comment:14 Changed 4 years ago by mloar

The problem is that fc-cache is trying to create hard links for locking purposes. Luckily fontconfig has support for an alternative locking mechanism that it uses on Windows. See the attached patch which makes fontconfig functional on Haiku.

comment:15 Changed 3 years ago by scottmc

  • Owner changed from scottmc to jstressman
  • Status changed from reopened to new

comment:16 Changed 3 years ago by jstressman

Updated .bep and .patch to cleanly compile a functioning 2.10.0. I've added freetype as a dependency, as fontconfig will error out on configuration without it. I've fixed the man page directory in the .bep and removed the lines that related to working around previous bugs. I updated the home page for the package and the link to the software as well and set the package to "stable" as it now builds and functions correctly as far as I can tell.

There is one final issue related to this as explained by the fontconfig maintainer on  https://bugs.freedesktop.org/show_bug.cgi?id=30077#c16
 https://bugs.freedesktop.org/show_bug.cgi?id=30077#c17

Although I don't know if this is a "bug" on our part, or just a result of Haiku not being a true *nix or POSIX system.

Akira TAGOH 2012-07-09 06:48:25 PDT
...

HOWEVER, okay, I've tracked down. indeed the root cause is came from link(). how come link() in Haiku returns the own error code but not POSIX one? EPERM should be the appropriate error in this case rather than own error code, B_UNSUPPORTED. That looks to me like a bug in Haiku.

Once it get fixed in Haiku, it should works.

Akira TAGOH 2012-07-09 07:01:08 UTC
All of _necessary fixes_ is in git master now. incompatibility of link() isn't OURBUG. so I'm afraid I don't have any plans to add a fix for that in fontconfig. for your workaround until it get fixed in Haiku, this patch would works:

diff --git a/src/fcatomic.c b/src/fcatomic.c
index 350744a..8f4641e 100644
--- a/src/fcatomic.c
+++ b/src/fcatomic.c
@@ -132,7 +132,7 @@ FcAtomicLock (FcAtomic *atomic)
        return FcFalse;
     }
     ret = link ((char *) atomic->tmp, (char *) atomic->lck);
-    if (ret < 0 && errno == EPERM)
+    if (ret < 0 && (errno == EPERM || errno == B_UNSUPPORTED))
     {
        /* the filesystem where atomic->lck points to may not supports
         * the hard link. so better try to fallback

Changed 3 years ago by jstressman

  • attachment fontconfig-2.10.0.bep​ added

Changed 3 years ago by jstressman

  • attachment fontconfig-2.10.0.patch​ added

place in patches/ subfolder relative to the bep file.

comment:17 Changed 3 years ago by jstressman

  • Resolution set to fixed
  • Status changed from new to closed
  • Summary changed from fontconfig 2.8.0 to fontconfig 2.10.0
Note: See TracTickets for help on using tickets.

Download in other formats:

  • Comma-delimited Text
  • Tab-delimited Text
  • RSS Feed

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/