File tree 1 file changed +11
-6
lines changed 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,19 @@ pipeline:
43
43
44
44
- uses : cmake/install
45
45
46
- - runs : |
47
- # Relocate .pc files to /usr/lib/pkgconfig and create symlinks
46
+ - runs : |
47
+ # Relocate .pc files to /usr/lib/pkgconfig
48
48
mkdir -p "${{targets.destdir}}"/usr/lib/pkgconfig/
49
- find "${{targets.destdir}}"/usr/lib/ninja-build/lib/pkgconfig -name "*.pc" | while read pc_file; do
50
- if [ ! -L "$pc_file" ]; then
51
- mv "$pc_file" "${{targets.destdir}}"/usr/lib/pkgconfig/$(basename "$pc_file")
52
- ln -s "${{targets.destdir}}"/usr/lib/pkgconfig/$(basename "$pc_file") "$pc_file"
49
+
50
+ find "${{targets.destdir}}"/usr/lib/ninja-build/lib/pkgconfig -type f -name "*.pc" | while read -r pc_file; do
51
+ dname=$(printf "${pc_file}" | sed -e "s,${{targets.destdir}},,")
52
+ dname=$(dirname "${dname}")
53
+ # Adjust "pcfiledir" so that it reflects the right location of each .pc file.
54
+ if grep -q "pcfiledir" "${pc_file}"; then
55
+ sed -i -e "s,\${pcfiledir},${dname}," "${pc_file}"
53
56
fi
57
+ # Move the .pc file to /usr/lib/pkgconfig/
58
+ mv "${pc_file}" "${{targets.destdir}}"/usr/lib/pkgconfig/
54
59
done
55
60
56
61
update :
You can’t perform that action at this time.
0 commit comments