summaryrefslogtreecommitdiff
path: root/mk/buildlink2
diff options
context:
space:
mode:
authorjlam <jlam>2002-10-01 09:51:22 +0000
committerjlam <jlam>2002-10-01 09:51:22 +0000
commit2a79b4aa2abedbd0e505ae745320e483f80e3ae3 (patch)
treefe5c34c01d317f205a12b09ad6d8e1e955dea215 /mk/buildlink2
parent1c17ba2154bc8c9a400faac62c7fa0f79fe28c25 (diff)
downloadpkgsrc-2a79b4aa2abedbd0e505ae745320e483f80e3ae3.tar.gz
Really, really fix the problem I was trying to fix with rev 1.6. I want
to only add -Ldir/.libs for *.la files that are not named with absolute paths or named with an absolute path starting with ${WRKSRC}. This should fix the problem with converting kdebase3 to buildlink2.
Diffstat (limited to 'mk/buildlink2')
-rw-r--r--mk/buildlink2/libtool-fix-la36
1 files changed, 29 insertions, 7 deletions
diff --git a/mk/buildlink2/libtool-fix-la b/mk/buildlink2/libtool-fix-la
index effec60b81d..dfe5959dad5 100644
--- a/mk/buildlink2/libtool-fix-la
+++ b/mk/buildlink2/libtool-fix-la
@@ -1,4 +1,4 @@
-# $NetBSD: libtool-fix-la,v 1.10 2002/09/28 23:46:42 jlam Exp $
+# $NetBSD: libtool-fix-la,v 1.11 2002/10/01 09:51:22 jlam Exp $
#
# For *.la files, in the "relink_command" line, we make the following
# replacements:
@@ -30,16 +30,27 @@ if [ -f $lafile ]; then
esac
;;
*.la)
+ fixla=0
ltlibsdir=`@DIRNAME@ $i`/.libs
case "$ltlibsdir" in
- ./*|../*|@WRKSRC@/*)
+ /*)
+ # fix if an absolute path in ${WRKSRC}
+ case "$ltlibsdir" in
+ @WRKSRC@/*) fixla=1 ;;
+ esac
+ ;;
+ *)
+ # fix all relative paths
+ fixla=1
+ ;;
+ esac
+ if [ $fixla -gt 0 ]; then
case "$deps" in
*"-L$ltlibsdir "*) ;;
*"-L$ltlibsdir") ;;
*) deps="$deps -L$ltlibsdir" ;;
esac
- ;;
- esac
+ fi
deps="${deps} $i"
;;
*)
@@ -64,16 +75,27 @@ if [ -f $lafile ]; then
relink="${relink} $i"
;;
*.la)
+ fixla=0
ltlibsdir=`@DIRNAME@ $i`/.libs
case "$ltlibsdir" in
- ./*|../*|@WRKSRC@/*)
+ /*)
+ # fix if an absolute path in ${WRKSRC}
+ case "$ltlibsdir" in
+ @WRKSRC@/*) fixla=1 ;;
+ esac
+ ;;
+ *)
+ # fix all relative paths
+ fixla=1
+ ;;
+ esac
+ if [ $fixla -gt 0 ]; then
case "$relink" in
*"-L$ltlibsdir "*) ;;
*"-L$ltlibsdir") ;;
*) relink="$relink -L$ltlibsdir" ;;
esac
- ;;
- esac
+ fi
relink="${relink} $i"
;;
*)