void-packages/helper-templates/pkg-config-transform.sh
Juan RP 902512dd96 Multiple bugfixes and improvements after building gtk+ from scratch.
- Fix a bug in unzip-extraction.sh that skipped the package that
  requested unzip and instead used the origin template.
- Pass CFLAGS, CXXFLAGS and CPPFLAGS through the environment and unset
  them once the package has been installed.
- Do not show the dependencies required for a pkg more than once time.

--HG--
extra : convert_revision : 731135558d29787ab5178b80df3578420872709d
2008-10-03 14:32:26 +02:00

19 lines
488 B
Bash
Executable file

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