Page MenuHomeFreeBSD

japanese/*font*: convert to @fc keyword
ClosedPublic

Authored by jbeich on Jan 30 2015, 4:15 PM.
Tags
None
Referenced Files
F81665416: D1733.id3560.diff
Fri, Apr 19, 4:27 PM
Unknown Object (File)
Sat, Mar 30, 6:39 AM
Unknown Object (File)
Mar 16 2024, 11:26 PM
Unknown Object (File)
Mar 16 2024, 9:52 PM
Unknown Object (File)
Mar 6 2024, 7:57 AM
Unknown Object (File)
Mar 6 2024, 7:57 AM
Unknown Object (File)
Mar 6 2024, 7:57 AM
Unknown Object (File)
Mar 6 2024, 7:57 AM
Subscribers
None

Details

Summary

Convert fc-cache(1) calls in pkg-plist to use @fc keyword

fonts.cache-1 lines started to appear after rP148143 but became
obsolete since fc-cache -s support (i.e. /var/db/fontconfig)
and several FC_CACHE_VERSION bumps.

nReviewed by: hrs
Approved by: portmgr blanket
Approved by: bapt (mentor)

Test Plan

Mechanical change.

# before
$ make clean all deinstall install -C japanese/font-migu
...
$ fgrep -ir migu /var/db/fontconfig
Binary file /var/db/fontconfig/b505adbf72d7253408dd67084a8aa967-le64.cache-4 matches
Binary file /var/db/fontconfig/d6a82a7420f683b92800b5c72e29748a-le64.cache-4 matches

# after
$ make clean all deinstall install -C japanese/font-migu
...
$ fgrep -ir migu /var/db/fontconfig
Binary file /var/db/fontconfig/b505adbf72d7253408dd67084a8aa967-le64.cache-4 matches
Binary file /var/db/fontconfig/d6a82a7420f683b92800b5c72e29748a-le64.cache-4 matches
--- pkg info -R before
+++ pkg info -R	after
@@ -58,6 +58,8 @@
 }
+directories: {
+    /usr/local/lib/X11/fonts/TTF: "y"
+}
 scripts: {
-    post-install: "/usr/local/bin/fc-cache -s -f -v /usr/local/lib/X11/fonts/TTF || true",
-    pre-deinstall: "rm -f /usr/local/lib/X11/fonts/TTF/fonts.cache-1",
-    post-deinstall: "/usr/local/bin/fc-cache -s -f -v /usr/local/lib/X11/fonts/TTF || true\nif [ -d /usr/local/lib/X11/fonts/TTF ]; then /usr/local/bin/fc-cache -s -f -v /usr/local/lib/X11/fonts/TTF || true; fi",
+    post-install: "case \"lib/X11/fonts/TTF\" in\n  /*) fontsdir=\"lib/X11/fonts/TTF\" ;;\n  *) fontsdir=\"/usr/local/lib/X11/fonts/TTF\" ;;\n  esac\n  fc-cache -s ${fontsdir} 2>/dev/null || true",
+    post-deinstall: "case \"lib/X11/fonts/TTF\" in\n  /*) fontsdir=\"lib/X11/fonts/TTF\" ;;\n  *) fontsdir=\"/usr/local/lib/X11/fonts/TTF\" ;;\n  esac\n  fc-cache -s ${fontsdir} 2>/dev/null || true",
     install: "#!/bin/sh\n# $FreeBSD: head/japanese/font-migu/files/pkg-install.in

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

jbeich retitled this revision from to japanese/*font*: convert to @fc keyword.
jbeich updated this object.
jbeich edited the test plan for this revision. (Show Details)
jbeich added reviewers: hrs, bapt.
jbeich updated this object.

Bump PORTREVISION following rP362685 example.

hrs edited edge metadata.

The patch looks good to me. Please commit them. Thank you for taking care of them.

This revision is now accepted and ready to land.Jan 31 2015, 10:15 AM
bapt edited edge metadata.
jbeich updated this revision to Diff 3560.

Closed by commit rP378204 (authored by @jbeich).