From 2d39c852a50c7b80fbad2f07a06eadf04aa9f1f8 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 12 Nov 2014 21:39:33 +0100 Subject: [PATCH] Newer version of the script upstream --- data/pkgconfig.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/data/pkgconfig.sh b/data/pkgconfig.sh index 5482795..95a0ac9 100755 --- a/data/pkgconfig.sh +++ b/data/pkgconfig.sh @@ -119,8 +119,9 @@ while [ $# -gt 0 ]; do #install if [ "$install" -eq 1 ]; then + source="${target#$OBJDIR}" $DEBUG $MKDIR -- "$PKGCONFIG" || exit 2 - $DEBUG $INSTALL "$target" "$PKGCONFIG/$target" || exit 2 + $DEBUG $INSTALL "$target" "$PKGCONFIG/$source" || exit 2 continue fi @@ -129,18 +130,23 @@ while [ $# -gt 0 ]; do if [ "$PREFIX" != "/usr" ]; then RPATH="-Wl,-rpath-link,\${libdir} -Wl,-rpath,\${libdir}" case $(uname -s) in - Darwin|SunOS) + Darwin) RPATH="-Wl,-rpath,\${libdir}" ;; + SunOS) + RPATH="-Wl,-R\${libdir}" + ;; esac fi #create + source="${target#$OBJDIR}" + source="${source}.in" $DEBUG $SED -e "s;@PACKAGE@;$PACKAGE;" \ -e "s;@VERSION@;$VERSION;" \ -e "s;@PREFIX@;$PREFIX;" \ -e "s;@RPATH@;$RPATH;" \ - -- "$target.in" > "$target" + -- "$source" > "$target" if [ $? -ne 0 ]; then $DEBUG $RM -- "$target" exit 2