mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
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
|