2008-10-03 14:32:26 +02:00
|
|
|
#
|
|
|
|
# This helper will transform the pkg-config files with correct
|
2008-10-13 07:32:05 +02:00
|
|
|
# directories pointing at XBPS_MASTERDIR specified in the config file.
|
2008-09-30 22:48:52 +02:00
|
|
|
#
|
2008-10-02 01:38:12 +02:00
|
|
|
pkgconfig_transform_file()
|
2008-09-30 22:48:52 +02:00
|
|
|
{
|
|
|
|
local file="$1"
|
2008-10-04 06:29:49 +02:00
|
|
|
local pkg="$pkgname-$version"
|
2008-09-30 22:48:52 +02:00
|
|
|
|
|
|
|
[ -z "$file" ] && return 1
|
|
|
|
|
|
|
|
$sed_cmd \
|
2008-10-13 07:32:05 +02:00
|
|
|
-e "s|^exec_prefix=$XBPS_DESTDIR/$pkg.*$|exec_prefix=\${prefix}|" \
|
2008-09-30 22:48:52 +02: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)."
|
|
|
|
}
|