void-packages/helper-templates/pkg-config-transform.sh
Juan RP 84d4f6391a Change helper-templates files to mode 644.
--HG--
extra : convert_revision : a156c08bb49d2314e667b86feba5a5a3180e39f2
2008-10-13 07:51:55 +02:00

19 lines
513 B
Bash

#
# This helper will transform the pkg-config files with correct
# directories pointing at XBPS_MASTERDIR specified in the config file.
#
pkgconfig_transform_file()
{
local file="$1"
local pkg="$pkgname-$version"
[ -z "$file" ] && return 1
$sed_cmd \
-e "s|^exec_prefix=$XBPS_DESTDIR/$pkg.*$|exec_prefix=\${prefix}|" \
-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)."
}