Page MenuHomeFreeBSD

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

Authored by jbeich on Jan 30 2015, 4:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 5:44 AM
Unknown Object (File)
Mon, Nov 25, 2:49 AM
Unknown Object (File)
Mon, Nov 25, 1:34 AM
Unknown Object (File)
Sun, Nov 24, 4:00 AM
Unknown Object (File)
Sat, Nov 23, 10:19 AM
Unknown Object (File)
Sat, Nov 23, 7:17 AM
Unknown Object (File)
Fri, Nov 22, 2:57 PM
Unknown Object (File)
Fri, Nov 22, 8:02 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
Lint Skipped
Unit
Tests Skipped

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).