summaryrefslogtreecommitdiff
path: root/mk/buildlink2
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-10-01 09:51:22 +0000
committerjlam <jlam@pkgsrc.org>2002-10-01 09:51:22 +0000
commit46dcc3cf14e6e43cd81045822485c9392ac75efa (patch)
treefe5c34c01d317f205a12b09ad6d8e1e955dea215 /mk/buildlink2
parent7653413d409087e7cd729f0504fc89ef6e54e4f9 (diff)
downloadpkgsrc-46dcc3cf14e6e43cd81045822485c9392ac75efa.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"
;;
*)