Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
slapos
Commits
debd2fce
Commit
debd2fce
authored
Sep 25, 2021
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fonts: cleanup, make msttcore-fonts shared
parent
22aa0b65
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
27 deletions
+11
-27
component/fonts/buildout.cfg
component/fonts/buildout.cfg
+11
-27
No files found.
component/fonts/buildout.cfg
View file @
debd2fce
...
@@ -13,16 +13,8 @@ parts =
...
@@ -13,16 +13,8 @@ parts =
[fonts-base]
[fonts-base]
# XXX download and unpack, with shared parts support
recipe = slapos.recipe.build:download-unpacked
# we could make slapos.recipe.build:download-unpacked really support shared
# parts and use it here. Current version of slapos.recipe.build ( 0.44 ) looks
# for buildout:shared-parts , but this is not what shared parts are using.
recipe = slapos.recipe.cmmi
shared = true
shared = true
configure-command = :
make-binary = :
post-install = cp -ra . ${:location}
location = @@LOCATION@@
environment =
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
PATH=${xz-utils:location}/bin:%(PATH)s
...
@@ -77,27 +69,19 @@ md5sum = 62f02985bfef43a27dbdd17641fec210
...
@@ -77,27 +69,19 @@ md5sum = 62f02985bfef43a27dbdd17641fec210
# Microsoft's TrueType core fonts
# Microsoft's TrueType core fonts
# non-free so not enabled by default
# non-free so not enabled by default
[msttcore-fonts]
[msttcore-fonts]
location = ${buildout:parts-directory}/${:_buildout_section_name_}
recipe = slapos.recipe.build
recipe = slapos.recipe.build
shared = true
p7z = ${p7zip:location}/bin/7z
install =
install =
import os, subprocess
import os, subprocess
from zc.buildout.download import Download
os.makedirs(location)
d = location
cmd = [options['p7z'], "x", "-ssc-", None, "*.ttf"]
fonts = []
for x in options['fonts'].splitlines():
download = lambda x, dl=Download(self.buildout['buildout']): (
md5sum, name = x.split()
dl("http://downloads.sf.net/corefonts/%s32.exe" % name, md5sum=md5sum)
cmd[3] = self.download(
for md5sum, name in (x.split() for x in x.splitlines() if x))
"http://downloads.sf.net/corefonts/%s32.exe" % name,
extract = lambda x, d=d, p7z="${p7zip:location}/bin/7z": any(
md5sum)
subprocess.check_call((p7z, "x", "-ssc-", path, "*.ttf"), cwd=d)
subprocess.check_call(cmd, cwd=location)
for path, is_temp in x)
try:
fonts += download(options['fonts'])
os.makedirs(d)
extract(fonts)
finally:
for path, is_temp in fonts:
if is_temp:
os.remove(path)
slapos_promise =
slapos_promise =
slapos_update_promise = ${:slapos_promise}
slapos_update_promise = ${:slapos_promise}
fonts =
fonts =
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment