2008-10-03 12:32:26 +00:00
|
|
|
#
|
|
|
|
# This helper will transform the pkg-config files with correct
|
2008-10-13 05:32:05 +00:00
|
|
|
# directories pointing at XBPS_MASTERDIR specified in the config file.
|
2008-09-30 20:48:52 +00:00
|
|
|
#
|
2008-10-01 23:38:12 +00:00
|
|
|
pkgconfig_transform_file()
|
2008-09-30 20:48:52 +00:00
|
|
|
{
|
|
|
|
local file="$1"
|
2008-10-04 04:29:49 +00:00
|
|
|
local pkg="$pkgname-$version"
|
2008-09-30 20:48:52 +00:00
|
|
|
|
|
|
|
[ -z "$file" ] && return 1
|
|
|
|
|
|
|
|
$sed_cmd \
|
2008-10-13 05:32:05 +00:00
|
|
|
-e "s|^exec_prefix=$XBPS_DESTDIR/$pkg.*$|exec_prefix=\${prefix}|" \
|
2008-09-30 20:48:52 +00:00
|
|
|
-e "s|-L\${libdir}|-L\${libdir} -Wl,-R\${libdir}|" \
|
|
|
|
$file > $file.in && \
|
|
|
|
$mv_cmd $file.in $file
|
|
|
|
[ "$?" -eq 0 ] && \
|
|
|
|
echo "=> Transformed pkg-config file: $(basename $file)."
|
|
|
|
}
|