Page MenuHomeFreeBSD

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

Authored by jbeich on Jan 30 2015, 4:15 PM.

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
Unit Tests Skipped

Event Timeline

jbeich updated this revision to Diff 3541.Jan 30 2015, 4:15 PM
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.Jan 30 2015, 4:21 PM
jbeich updated this revision to Diff 3544.Jan 30 2015, 5:22 PM
jbeich updated this object.

Bump PORTREVISION following rP362685 example.

hrs accepted this revision.Jan 31 2015, 10:15 AM
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 accepted this revision.Jan 31 2015, 12:22 PM
bapt edited edge metadata.
jbeich closed this revision.Jan 31 2015, 12:50 PM
jbeich updated this revision to Diff 3560.

Closed by commit rP378204 (authored by @jbeich).