Skip to content

Commit 3537803

Browse files
[2/2] Patch pixman to build static libs. Consume pixman.a in poppler.
1 parent d784036 commit 3537803

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
PIXMAN_SRC=$1
5+
6+
# Pixman only builds shared libraries.
7+
# lrwxrwxrwx 1 vilius vilius 16 Jun 15 14:13 libpixman-1.so -> libpixman-1.so.0
8+
# lrwxrwxrwx 1 vilius vilius 21 Jun 15 14:13 libpixman-1.so.0 -> libpixman-1.so.0.38.4
9+
# -rwxr-xr-x 1 vilius vilius 6.7M Jun 15 14:13 libpixman-1.so.0.38.4
10+
11+
# We want a static library
12+
13+
MESON_BUILD=$PIXMAN_SRC/pixman/meson.build
14+
15+
echo "Before patching: "
16+
grep 'libpixman = ' $MESON_BUILD -A 7
17+
18+
# Force linking against libjpeg when linking against libtiff
19+
sed -i 's/libpixman = shared_library/libpixman = static_library/g' $MESON_BUILD
20+
21+
echo ""
22+
23+
echo "After patching: "
24+
grep 'libpixman = ' $MESON_BUILD -A 7
25+
26+
echo ""
27+
28+
# simd static libraries need to be installed to.
29+
# Previously they were just included in the .so
30+
31+
echo "Before patching: "
32+
grep 'pixman_simd_libs +' $MESON_BUILD -B 3 -A 4
33+
34+
sed -i "/\[name + '.c', config_h, version_h, simd\[3\]\],/a\ \ \ \ \ \ install : true," $MESON_BUILD
35+
echo ""
36+
37+
echo "After patching: "
38+
grep 'pixman_simd_libs +' $MESON_BUILD -B 3 -A 5

0 commit comments

Comments
 (0)