306567bc74
Stop forcing the overwrite of the cache at each run it is not necessary most of the time. Reviewed by: tcberner Differencial Revision: https://reviews.freebsd.org/D34602 While here rework USES=fonts to drop @fcfontsdir which is not nessary anymore and convert the @fontsdir into lua which make it way simpler to read
20 lines
510 B
Plaintext
20 lines
510 B
Plaintext
# MAINTAINER: x11@FreeBSD.org
|
|
|
|
actions: [dir]
|
|
post-install-lua: <<EOD
|
|
fontdir = pkg.prefixed_path("%@")
|
|
pkg.exec({"mkfontscale", fontdir})
|
|
pkg.exec({"mkfontdir", fontdir})
|
|
EOD
|
|
post-deinstall-lua: <<EOD
|
|
fontdir = pkg.prefixed_path("%@")
|
|
pkg.exec({"mkfontscale", fontdir})
|
|
pkg.exec({"mkfontdir", fontdir})
|
|
for _, v in pairs {"/fonts.scale", "/fonts.dir" } do
|
|
local st = pkg.stat(fontdir .. v)
|
|
if st and st.type == "reg" and st.size == 2 then
|
|
os.remove(fontdir .. v)
|
|
end
|
|
end
|
|
EOD
|