vp-build/helper-templates/pkg-config-transform.sh
Juan RP cfa18b4416 Massive renaming, pkgfs is now called xbps.
Also known as "xtraeme's build package system".

--HG--
extra : convert_revision : 119840ceae588fef65d6dcab651f607f54fa0be6
2008-10-13 07:32:05 +02:00

20 lines
513 B
Bash
Executable File

#
# 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)."
}