Skip to content

Commit

Permalink
Fix weasyprint layer
Browse files Browse the repository at this point in the history
  • Loading branch information
kalekseev committed Apr 24, 2024
1 parent 1de7210 commit 60dd2e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ stack.deploy:
cd cdk-stacks && npm install && npm run build
cdk deploy --app ./cdk-stacks/bin/app.js --stack PrintStack --parameters uploadBucketName=${BUCKET}

test.start.container:
test.start.container: build/weasyprint-layer-python$(RUNTIME).zip
${DOCKER_RUN} \
-e GDK_PIXBUF_MODULE_FILE="/opt/lib/loaders.cache" \
-e FONTCONFIG_PATH="/opt/fonts" \
Expand Down
3 changes: 3 additions & 0 deletions weasyprint/layer_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ rpmdev-extract -- *rpm

mkdir /opt/lib
cp -P -r /tmp/*/usr/lib64/* /opt/lib
for f in $(find /tmp -type f -name 'lib*.so*'); do
cp "$f" /opt/lib/$(python -c "import re; print(re.match(r'^(.*.so.\d+).*$', '$(basename $f)').groups()[0])");
done
# pixbuf need list loaders cache
# https://developer.gnome.org/gdk-pixbuf/stable/gdk-pixbuf-query-loaders.html
PIXBUF_BIN=$(find /tmp -name gdk-pixbuf-query-loaders-64)
Expand Down

0 comments on commit 60dd2e5

Please sign in to comment.