File tree 1 file changed +12
-7
lines changed 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,19 @@ pipeline:
54
54
set -x
55
55
mkdir -p ${{targets.destdir}}/home/linuxbrew/.linuxbrew/
56
56
cp -a ./brew/bin/ ./brew/Library/ ./brew/package/ ${{targets.destdir}}/home/linuxbrew/.linuxbrew/
57
-
58
- # Relocate .pc files to /usr/lib/pkgconfig and create symlinks
59
- mkdir -p ${{targets.destdir}}/usr/lib/pkgconfig/
60
- find ${{targets.destdir}}/home/linuxbrew -name "*.pc" | while read pc_file; do
61
- if [ ! -L "$pc_file" ]; then
62
- mv "$pc_file" "${{targets.destdir}}/usr/lib/pkgconfig/$(basename "$pc_file")"
63
- ln -s "${{targets.destdir}}/usr/lib/pkgconfig/$(basename "$pc_file")" "$pc_file"
57
+
58
+ # Relocate .pc files to /usr/lib/pkgconfig
59
+ mkdir -p "${{targets.destdir}}"/usr/lib/pkgconfig/
60
+
61
+ find ${{targets.destdir}}/home/linuxbrew -type f -name "*.pc" | while read -r pc_file; do
62
+ dname=$(printf "${pc_file}" | sed -e "s,${{targets.destdir}},,")
63
+ dname=$(dirname "${dname}")
64
+ # Adjust "pcfiledir" so that it reflects the right location of each .pc file.
65
+ if grep -q "pcfiledir" "${pc_file}"; then
66
+ sed -i -e "s,\${pcfiledir},${dname}," "${pc_file}"
64
67
fi
68
+ # Move the .pc file to /usr/lib/pkgconfig/
69
+ mv "${pc_file}" "${{targets.destdir}}"/usr/lib/pkgconfig/
65
70
done
66
71
67
72
# Create profile.d script
You can’t perform that action at this time.
0 commit comments