Subject: Re: pkg/31337: `make install' fails when WRKOBJDIR is symblic link
To: None <jlam@NetBSD.org, jmmv@NetBSD.org, martin@NetBSD.org>
From: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
List: tech-pkg
Date: 12/04/2005 18:32:52
Hello,
I'm looking PR pkg/31337. It's a problem of libtool wrapper.
If a relative path of .la files is passed to the libtool, it gets
the absolute path by pwd(1). And then, it adds the directory to
`dependency_libs' with -L if the path matches ${WRKDIR}/*.
The mail/evolution and the x11/gnome2-control-center pass
relative paths to the libtool. But pwd(1) returns physical path.
If ${WRKOBJDIR} is symbolic link, the physical path doesn't match
${WRKDIR}/*. So the -L flag is not added.
This problem can be fixed with attached patch.
Any other ideas?
best regards.
--
Kouichirou Hiratsuka
hira@po6.nsk.ne.jp
Index: mk/buildlink3/bsd.buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink3/bsd.buildlink3.mk,v
retrieving revision 1.171
diff -u -r1.171 bsd.buildlink3.mk
--- mk/buildlink3/bsd.buildlink3.mk 1 Jun 2005 18:03:06 -0000 1.171
+++ mk/buildlink3/bsd.buildlink3.mk 4 Dec 2005 04:19:04 -0000
@@ -1035,6 +1035,7 @@
-e "s|@DIRNAME@|${DIRNAME:Q}|g" \
-e "s|@EGREP@|${EGREP:Q}|g" \
-e "s|@MV@|${MV:Q}|g" \
+ -e "s|@PWD@|${PWD_CMD:Q}|g" \
-e "s|@RM@|${RM:Q}|g" \
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
Index: mk/buildlink3/libtool-fix-la
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink3/libtool-fix-la,v
retrieving revision 1.6
diff -u -r1.6 libtool-fix-la
--- mk/buildlink3/libtool-fix-la 22 Jun 2005 21:08:37 -0000 1.6
+++ mk/buildlink3/libtool-fix-la 4 Dec 2005 04:19:04 -0000
@@ -60,8 +60,10 @@
dirname="@DIRNAME@"
egrep="@EGREP@"
mv="@MV@"
+pwd="@PWD@"
rm="@RM@"
+wrksrc_physical=`cd ${WRKSRC}; $pwd`
labase=`$basename $lafile .la`
ladir=`$dirname $lafile`
latimestamp=${ladir}/.${labase}.la.timestamp
@@ -216,7 +218,7 @@
fi
$echo >> $lafile
$echo "# Directory that this library was built in:" >> $lafile
- $echo "buildlibdir='"`cd $ladir; $pwd`"'" >> $lafile
+ $echo "buildlibdir='"`cd $ladir; $pwd | $sed -e "s,^${wrksrc_physical},${WRKSRC},"`"'" >> $lafile
$echo >> $lafile
$echo "# This file has been modified by buildlink3." >> $lafile
$rm ${lafile}.tmp