head 1.10; access; symbols pkgsrc-2023Q4:1.10.0.44 pkgsrc-2023Q4-base:1.10 pkgsrc-2023Q3:1.10.0.42 pkgsrc-2023Q3-base:1.10 pkgsrc-2023Q2:1.10.0.40 pkgsrc-2023Q2-base:1.10 pkgsrc-2023Q1:1.10.0.38 pkgsrc-2023Q1-base:1.10 pkgsrc-2022Q4:1.10.0.36 pkgsrc-2022Q4-base:1.10 pkgsrc-2022Q3:1.10.0.34 pkgsrc-2022Q3-base:1.10 pkgsrc-2022Q2:1.10.0.32 pkgsrc-2022Q2-base:1.10 pkgsrc-2022Q1:1.10.0.30 pkgsrc-2022Q1-base:1.10 pkgsrc-2021Q4:1.10.0.28 pkgsrc-2021Q4-base:1.10 pkgsrc-2021Q3:1.10.0.26 pkgsrc-2021Q3-base:1.10 pkgsrc-2021Q2:1.10.0.24 pkgsrc-2021Q2-base:1.10 pkgsrc-2021Q1:1.10.0.22 pkgsrc-2021Q1-base:1.10 pkgsrc-2020Q4:1.10.0.20 pkgsrc-2020Q4-base:1.10 pkgsrc-2020Q3:1.10.0.18 pkgsrc-2020Q3-base:1.10 pkgsrc-2020Q2:1.10.0.16 pkgsrc-2020Q2-base:1.10 pkgsrc-2020Q1:1.10.0.12 pkgsrc-2020Q1-base:1.10 pkgsrc-2019Q4:1.10.0.14 pkgsrc-2019Q4-base:1.10 pkgsrc-2019Q3:1.10.0.10 pkgsrc-2019Q3-base:1.10 pkgsrc-2019Q2:1.10.0.8 pkgsrc-2019Q2-base:1.10 pkgsrc-2019Q1:1.10.0.6 pkgsrc-2019Q1-base:1.10 pkgsrc-2018Q4:1.10.0.4 pkgsrc-2018Q4-base:1.10 pkgsrc-2018Q3:1.10.0.2 pkgsrc-2018Q3-base:1.10 pkgsrc-2018Q2:1.9.0.30 pkgsrc-2018Q2-base:1.9 pkgsrc-2018Q1:1.9.0.28 pkgsrc-2018Q1-base:1.9 pkgsrc-2017Q4:1.9.0.26 pkgsrc-2017Q4-base:1.9 pkgsrc-2017Q3:1.9.0.24 pkgsrc-2017Q3-base:1.9 pkgsrc-2017Q2:1.9.0.20 pkgsrc-2017Q2-base:1.9 pkgsrc-2017Q1:1.9.0.18 pkgsrc-2017Q1-base:1.9 pkgsrc-2016Q4:1.9.0.16 pkgsrc-2016Q4-base:1.9 pkgsrc-2016Q3:1.9.0.14 pkgsrc-2016Q3-base:1.9 pkgsrc-2016Q2:1.9.0.12 pkgsrc-2016Q2-base:1.9 pkgsrc-2016Q1:1.9.0.10 pkgsrc-2016Q1-base:1.9 pkgsrc-2015Q4:1.9.0.8 pkgsrc-2015Q4-base:1.9 pkgsrc-2015Q3:1.9.0.6 pkgsrc-2015Q3-base:1.9 pkgsrc-2015Q2:1.9.0.4 pkgsrc-2015Q2-base:1.9 pkgsrc-2015Q1:1.9.0.2 pkgsrc-2015Q1-base:1.9 pkgsrc-2014Q4:1.8.0.72 pkgsrc-2014Q4-base:1.8 pkgsrc-2014Q3:1.8.0.70 pkgsrc-2014Q3-base:1.8 pkgsrc-2014Q2:1.8.0.68 pkgsrc-2014Q2-base:1.8 pkgsrc-2014Q1:1.8.0.66 pkgsrc-2014Q1-base:1.8 pkgsrc-2013Q4:1.8.0.64 pkgsrc-2013Q4-base:1.8 pkgsrc-2013Q3:1.8.0.62 pkgsrc-2013Q3-base:1.8 pkgsrc-2013Q2:1.8.0.60 pkgsrc-2013Q2-base:1.8 pkgsrc-2013Q1:1.8.0.58 pkgsrc-2013Q1-base:1.8 pkgsrc-2012Q4:1.8.0.56 pkgsrc-2012Q4-base:1.8 pkgsrc-2012Q3:1.8.0.54 pkgsrc-2012Q3-base:1.8 pkgsrc-2012Q2:1.8.0.52 pkgsrc-2012Q2-base:1.8 pkgsrc-2012Q1:1.8.0.50 pkgsrc-2012Q1-base:1.8 pkgsrc-2011Q4:1.8.0.48 pkgsrc-2011Q4-base:1.8 pkgsrc-2011Q3:1.8.0.46 pkgsrc-2011Q3-base:1.8 pkgsrc-2011Q2:1.8.0.44 pkgsrc-2011Q2-base:1.8 pkgsrc-2011Q1:1.8.0.42 pkgsrc-2011Q1-base:1.8 pkgsrc-2010Q4:1.8.0.40 pkgsrc-2010Q4-base:1.8 pkgsrc-2010Q3:1.8.0.38 pkgsrc-2010Q3-base:1.8 pkgsrc-2010Q2:1.8.0.36 pkgsrc-2010Q2-base:1.8 pkgsrc-2010Q1:1.8.0.34 pkgsrc-2010Q1-base:1.8 pkgsrc-2009Q4:1.8.0.32 pkgsrc-2009Q4-base:1.8 pkgsrc-2009Q3:1.8.0.30 pkgsrc-2009Q3-base:1.8 pkgsrc-2009Q2:1.8.0.28 pkgsrc-2009Q2-base:1.8 pkgsrc-2009Q1:1.8.0.26 pkgsrc-2009Q1-base:1.8 pkgsrc-2008Q4:1.8.0.24 pkgsrc-2008Q4-base:1.8 pkgsrc-2008Q3:1.8.0.22 pkgsrc-2008Q3-base:1.8 cube-native-xorg:1.8.0.20 cube-native-xorg-base:1.8 pkgsrc-2008Q2:1.8.0.18 pkgsrc-2008Q2-base:1.8 cwrapper:1.8.0.16 pkgsrc-2008Q1:1.8.0.14 pkgsrc-2008Q1-base:1.8 pkgsrc-2007Q4:1.8.0.12 pkgsrc-2007Q4-base:1.8 pkgsrc-2007Q3:1.8.0.10 pkgsrc-2007Q3-base:1.8 pkgsrc-2007Q2:1.8.0.8 pkgsrc-2007Q2-base:1.8 pkgsrc-2007Q1:1.8.0.6 pkgsrc-2007Q1-base:1.8 jlam-pkgviews:1.8.0.4 jlam-pkgviews-base:1.8 pkgsrc-2006Q4:1.8.0.2 pkgsrc-2006Q4-base:1.8 pkgsrc-2006Q3:1.7.0.8 pkgsrc-2006Q3-base:1.7 pkgsrc-2006Q2:1.7.0.6 pkgsrc-2006Q2-base:1.7 tv-derecurse-eol:1.5 pkgsrc-2006Q1:1.7.0.4 pkgsrc-2006Q1-base:1.7 pkgsrc-2005Q4:1.7.0.2 pkgsrc-2005Q4-base:1.7 pkgsrc-2005Q3:1.6.0.2 pkgsrc-2005Q3-base:1.6 pkgsrc-2005Q2:1.5.0.8 pkgsrc-2005Q2-base:1.5 tv-derecurse-merge:1.5 pkgsrc-2005Q1:1.5.0.6 pkgsrc-2005Q1-base:1.5 pkgsrc-2004Q4:1.5.0.4 pkgsrc-2004Q4-base:1.5 tv-derecurse:1.5.0.2 tv-derecurse-base:1.5 pkgsrc-2004Q3:1.4.0.4 pkgsrc-2004Q3-base:1.4 pkgsrc-2004Q2:1.4.0.2 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.3.0.2 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.2.0.2 pkgsrc-2003Q4-base:1.2 pkgviews-mk-base:1.1 pkgviews-mk:1.1.0.2; locks; strict; comment @# @; 1.10 date 2018.08.22.20.48.36; author maya; state Exp; branches; next 1.9; commitid FMEpDDTKwDQBR9PA; 1.9 date 2014.12.30.15.13.19; author wiz; state Exp; branches; next 1.8; commitid RRdsYBWaMIUIN44y; 1.8 date 2006.11.09.02.07.59; author rillig; state Exp; branches; next 1.7; 1.7 date 2005.12.09.16.16.41; author hira; state Exp; branches; next 1.6; 1.6 date 2005.06.22.21.08.37; author jlam; state Exp; branches; next 1.5; 1.5 date 2004.09.21.15.01.40; author jlam; state Exp; branches 1.5.2.1; next 1.4; 1.4 date 2004.03.30.17.25.19; author jlam; state Exp; branches; next 1.3; 1.3 date 2004.03.13.03.41.13; author uebayasi; state Exp; branches; next 1.2; 1.2 date 2003.09.02.06.59.57; author jlam; state Exp; branches; next 1.1; 1.1 date 2003.08.14.13.16.50; author jlam; state dead; branches 1.1.2.1; next ; 1.5.2.1 date 2006.06.07.15.25.39; author tv; state dead; branches; next ; 1.1.2.1 date 2003.08.14.13.16.51; author jlam; state Exp; branches; next 1.1.2.2; 1.1.2.2 date 2003.08.16.10.52.35; author jlam; state Exp; branches; next 1.1.2.3; 1.1.2.3 date 2003.08.16.11.05.36; author jlam; state Exp; branches; next 1.1.2.4; 1.1.2.4 date 2003.08.16.11.13.25; author jlam; state Exp; branches; next 1.1.2.5; 1.1.2.5 date 2003.08.27.12.54.04; author jlam; state Exp; branches; next 1.1.2.6; 1.1.2.6 date 2003.08.27.12.56.00; author jlam; state Exp; branches; next 1.1.2.7; 1.1.2.7 date 2003.08.30.07.45.03; author jlam; state Exp; branches; next 1.1.2.8; 1.1.2.8 date 2003.08.31.07.05.50; author jlam; state Exp; branches; next 1.1.2.9; 1.1.2.9 date 2003.09.02.03.19.22; author jlam; state Exp; branches; next ; desc @@ 1.10 log @Remove clauses 3,4 from TNF-only copyright blocks. This is based on the decision The NetBSD Foundation made in 2008 to do so, which was already applied to src. This change has been applied to code which is likely not in other repositories. ok board@@, reviewed by riastradh@@ @ text @# $NetBSD: libtool-fix-la,v 1.9 2014/12/30 15:13:19 wiz Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. # # This code is derived from software contributed to The NetBSD Foundation # by Johnny C. Lam. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # For *.la files, in the "relink_command" line, we make the following # replacements: # # "libfoo.la" -> "-L./.libs libfoo.la" # "dirpath/libfoo.la" -> "-Ldirpath/.libs libfoo.la" # # This allows the libraries to be found within ${WRKSRC} during # relinking. We rely on the proper rpath settings to be set by libtool. # # For the *.lai files, in the "dependency_libs" line, we remove # redundant -Ldir and -llib options. We also make sure that we don't # ever reference other .la files, only referring to other libraries # via the usual "-L/path -llib". BUILDLINK_DIR="@@BUILDLINK_DIR@@" LOCALBASE="@@LOCALBASE@@" WRKSRC="@@WRKSRC@@" basename="@@BASENAME@@" 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 laifile=${ladir}/.libs/${labase}.lai if $test -f $lafile; then . ${ladir}/${labase}.la deps= for i in ${dependency_libs}; do case $i in #################################################### # Skip all -R* options... rpath info shouldn't go into # the dependency_libs line. #################################################### -R*) ;; #################################################### # Catch -L and remove redundant ones. #################################################### -L*) case $deps in *"$i "*) ;; *"$i") ;; *) deps="$deps $i" ;; esac ;; #################################################### # Convert "dirpath/libfoo.la" into "-Ldirpath/.libs # libfoo.la" if it's an uninstalled libtool archive. # This allows proper relinking by libtool during the # install stage by allowing it to find the uninstalled # shared library in the .libs directory. #################################################### *.la) fixla=0 ltlibsdir=`$dirname $i`/.libs case $ltlibsdir in /*) # fix if an absolute path in ${WRKSRC} case $ltlibsdir in ${WRKSRC}/*) fixla=1 ;; esac ;; *) # fix all relative paths fixla=1 ;; esac if $test $fixla -gt 0; then case $deps in *"-L$ltlibsdir "*) ;; *"-L$ltlibsdir") ;; *) deps="$deps -L$ltlibsdir" ;; esac fi deps="$deps $i" ;; #################################################### # Everything else Just Belongs in the dependency_libs # line. #################################################### *) deps="$deps $i" ;; esac done : ${relink_command=""} relink= for i in ${relink_command}; do case $i in #################################################### # -I* and -D* are useless for linking. #################################################### -I*|-D*) ;; #################################################### # Catch -L and remove redundant ones. #################################################### -L*) case $relink in *"$i "*) ;; *"$i") ;; *) relink="$relink $i" ;; esac ;; # This is the .la file we're relinking... don't touch it! $lafile) relink="$relink $i" ;; #################################################### # Convert "dirpath/libfoo.la" into "-Ldirpath/.libs # libfoo.la" if it's an uninstalled libtool archive. # This allows proper relinking by libtool during the # install stage by allowing it to find the uninstalled # shared library in the .libs directory. #################################################### *.la) fixla=0 ltlibsdir=`$dirname $i`/.libs case $ltlibsdir in /*) # fix if an absolute path in ${WRKSRC} case $ltlibsdir in ${WRKSRC}/*) fixla=1 ;; esac ;; *) # fix all relative paths fixla=1 ;; esac if $test $fixla -gt 0; then case $relink in *"-L$ltlibsdir "*) ;; *"-L$ltlibsdir") ;; *) relink="$relink -L$ltlibsdir" ;; esac fi relink="$relink $i" ;; #################################################### # Everything else Just Belongs in the relink_command # line. #################################################### *) relink="$relink $i" ;; esac done ############################################################## # Save the orignal .la file produced by libtool as .la.blsav, # and create the new one with a signature. ############################################################## $mv -f $lafile ${lafile}.blsav if $test -n "$deps"; then ( $cat ${lafile}.blsav | $sed -e '/^dependency_libs=/,$d' $echo "dependency_libs='$deps'" $cat ${lafile}.blsav | $sed -e '1,/^dependency_libs=/d' ) > ${lafile}.tmp else $cat ${lafile}.blsav > ${lafile}.tmp fi if $test -n "$relink"; then ( $cat ${lafile}.tmp | $sed -e '/^relink_command=/,$d' $echo "relink_command='$relink'" $cat ${lafile}.tmp | $sed -e '1,/^relink_command=/d' ) > $lafile else $cat ${lafile}.tmp > $lafile fi $echo >> $lafile $echo "# Directory that this library was built in:" >> $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 msg_log $wrapperlog "==> Fixed $lafile" ############################################################## # Fix up any .lai files (libtool archives that will be # installed). ############################################################## if $test -z "$laifile" || $test ! -f "$laifile" || \ $egrep "^#.*modified by buildlink3" $laifile >/dev/null 2>&1; then : else $sed @@_BLNK_WRAP_LT_UNTRANSFORM_SED@@ \ $laifile > ${laifile}.tmp . ${laifile}.tmp deps_ok=no deps="${dependency_libs}" while $test "$deps_ok" = "no"; do deps_ok=yes L=; l=; lexist=; prev= for i in $deps; do case $i in ###################################### # Don't allowed repeated arguments, so # "-lm -lm" becomes just "-lm". ###################################### $prev) ;; ###################################### # Skip all -R* options... rpath info # shouldn't go into the dependency_libs # line. ###################################### -R*) ;; ###################################### # Skip directories that should never # appear in the -L flags. ###################################### -L*) case $i in -L${BUILDLINK_DIR}/*) ;; -L${WRKSRC}|-L${WRKSRC}/*) ;; *) case $L in *"$i "*) ;; *"$i") ;; *) L="$L $i" ;; esac ;; esac ;; ###################################### # Libraries really do exist, so we want # to keep any -L flags we've seen # in the generated dependency_libs line. ###################################### -l*) lexist=1 l="$l $i" ;; ###################################### # Libtool archives should be changed from # "/path/libfoo.la" to "-L/path -lfoo", # This works correctly with wildcard # dependencies. ###################################### *.la) dir=`$dirname $i` case $L in *"-L$dir "*) ;; *"-L$dir") ;; *) L="$L -L$dir" ;; esac libbase=`$basename $i .la` lib="${libbase#lib}" lexist=1 l="$l -l$lib" deps_ok=no ;; ###################################### # Everything else Just Belongs. ###################################### *) l="$l $i" ;; esac prev="$i" done if $test -z "$lexist"; then L= fi deps="$L$l" deps=`$echo "X$deps" | $Xsed -e "s/^[ ]*//"` done $mv -f $laifile ${laifile}.blsav ( $cat ${laifile}.tmp | $sed -e '/^dependency_libs=/,$d' $echo "dependency_libs='$deps'" $cat ${laifile}.tmp | $sed -e '1,/^dependency_libs=/d' $echo $echo "# This file has been modified by buildlink3." ) > ${laifile} $rm -f ${laifile}.tmp msg_log $wrapperlog "==> Fixed $laifile" if $egrep "${BUILDLINK_DIR}" $laifile >/dev/null 2>&1; then msg_log $wrapperlog "==> [buildlink3] Error: buildlink3 leakage into $laifile" $echo "==> [buildlink3] Error: buildlink3 leakage into $laifile" 1>&2 wrapper_result=1 fi fi fi @ 1.9 log @Remove pkg_views support, second part: infrastructure. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.8 2006/11/09 02:07:59 rillig Exp $ a16 7 # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the NetBSD # Foundation, Inc. and its contributors. # 4. Neither the name of The NetBSD Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. @ 1.8 log @Fixed two scripts so that they also run when "set -u" is in effect. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.7 2005/12/09 16:16:41 hira Exp $ d49 1 a49 4 # via the usual "-L/path -llib" and making sure that /path is always # somewhere under the default view. This makes wildcard dependencies # work for "overwrite" packages by letting libtool find libraries in # the default view. a51 1 DEPOTBASE="@@DEPOTBASE@@" d256 1 a256 6 # appear in the -L flags. Also # modify directories in ${DEPOTBASE} to # point to somewhere in the default view # ${LOCALBASE}, since we want "overwrite" # packages to think the libraries really # do just exist through the default view. a263 8 -L${DEPOTBASE}/*) i=`$echo "$i" | $sed -e "s,-L${DEPOTBASE}/[^/]*/,-L${LOCALBASE}/,"` case $L in *"$i "*) ;; *"$i") ;; *) L="$L $i" ;; esac ;; d285 1 a285 6 # where /path is appropriately modified # so that the depot directory is changed # to the views directory. This allows # the .la files to be used by either # "overwrite" or "pkgviews" packages and # works correctly with wildcard d289 1 a289 2 dirbase=`$dirname $i` dir=`$echo "X$dirbase" | $Xsed -e "s,^${DEPOTBASE}/[^/]*/,${LOCALBASE}/,"` @ 1.7 log @Fix build of the packages which pass .la files to libtool by relative path. This allows to use symbolic linked path as WRKOBJDIR and should fix PR pkg/31337. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.6 2005/06/22 21:08:37 jlam Exp $ d134 1 @ 1.6 log @We were writing the wrong directory path for the location to the uninstalled libtool archive in the case where we build it into some place other than the current directory. Older versions of libtool didn't allow you to build a *.la file anywhere other than the current directory, and libtool-fix-la made use of this assumption in libtool's behavior. More recent versions of libtool *do* let you build a *.la file anywhere you'd like, so instead of blindly assuming it's the current directory, use the path to the argument of the -o option. This embeds the proper directory path into the uninstalled libtool archive. This has no impact on packages that just build libtool archives into the current directory. The packages that *are* impacted are the ones that: (1) pkgsrc converted to use libtool, and, (2) build shared libraries that are linked into other things as part of the build, and, (3) builds the libtool archives in some place other than the current directory. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.5 2004/09/21 15:01:40 jlam Exp $ d63 1 d66 1 d221 1 a221 1 $echo "buildlibdir='"`cd $ladir; $pwd`"'" >> $lafile @ 1.5 log @Initial commit of a new wrapper script framework that encapsulates the non-buildlink-related code and moves it out of mk/buildlink3 into mk/wrapper. The buildlink3 code is modified to simply hook its transformations into the wrapper script framework. The wrapper script framework has some new features: * Support automatically passing "ABI" flags to the compiler and linker depending on the value of ${ABI}. Currently supports the SunPro compiler with ${ABI} == 64 and the MIPSPro compiler with ${ABI} as any of 32, n32, o32, and 64. * making UnixWare GCC accept -rpath options and silently converting them into an appropriate LD_RUN_PATH * Add cmd-sink-interix-gcc and cmd-sink-interix-ld that errors out when it sees -fpic/-fPIC and -shared/-Bshareable, respectively (requested by ). * Much improved debugging output. It's possible to output the wrapper work log in-line with normal output by setting WRAPPER_LOG to "stderr". Important differences in behaviour from the old buildlink3 code include: * Only move the -l options to the end of the command line, leaving the -L options in-place. * Extend the autodetection of the libtool mode to detect "compile" and "uninstall". * Fix problem noted in both PR pkg/24760 and PR pkg/25500, where -L/usr/lib/* was being mangled improperly. * Remove the top-level "buildlink" target; instead, make buildlinking occur as part of the "wrapper" target. * mangle and sub-mangle are only meant to transform directories in -I, -L, and rpath options, so remove the lines in buildlink3/gen-transform.sh that transformed bare directories. * Add the ability for the libtool wrapper to be called just to unwrap an existing libtool archive by running: libtool --mode=unwrap -o libfoo.la The old --fix-la syntax no longer works. 20040818 ======== * Initial release of a new wrapper script framework that encapsulates the non-buildlink-related code and moves it out of mk/buildlink3. These features include: * making MIPSpro accept GCC options * making MIPSpro "ucode" accept GCC options * making SunPro accept GCC options * making "ld" accept -Wl,* options and silently removing the "-Wl," * (NEW) making UnixWare GCC accept -rpath options and silently converting them into an appropriate LD_RUN_PATH One major benefit of this is that the buildlink3 code is now much tighter and easier to understand since it concerns itself solely with buildlink-related details. I haven't yet optimized the wrapper cache, so the new wrapper scripts may take slightly longer to execute than the old buildlink3 wrapper scripts, but I'll be improving this over time. 20040821 ======== * Move the inclusion of $cmd_sink outside of the main loop in wrapper.sh so that the $cmd_sink script can be used to globally scan and process the arguments. Move the LD_RUN_PATH code to a cmd-sink-unixware-gcc script. Garbage-collect the now unused export_vars-related code. * Add cmd-sink-aix-xlc for AIX xlc that munges -Wl,-R* into an appropriate -blibpath option. * Add cmd-sink-interix-gcc and cmd-sink-interix-ld that errors out when it sees -fpic/-fPIC and -shared/-Bshareable, respectively (requested by ). * Move the code that converts full paths to shared libraries into the "-Ldir -llib" equivalents from the buildlink3 code into wrapper/logic. Remove the same from bsd.buildlink3.mk and gen-transform.sh. * Move the code that checks for absolute rpaths from the buildlink3 code into wrapper/arg-source. Remove the same from bsd.buildlink3.mk and gen-transform.sh. * Only move the -l options to the end of the command line, leaving the -L options in-place. * Add more debugging code. 20040824 ======== * Fix quoting problems after arguments are transformed. Remove the hack that was inserted that magically made almost everything work because we do it the right way now. * Move the inclusion of $logic outside of the main loop in wrapper.sh so that the $logic script doesn't have to worry about underflowing the argument buffer. * Encapsulate the loop in wrapper.sh that fills the argument buffer entirely within the arg-source script. * Move from the logic script into the arg-source script the transformations that merge or split arguments. * Fix bug where skipargs was effectively being ignored if it was more than 1. * Handle the whitespace in transformations in the logic script that turn one library option into multiple library options, e.g. "-lreadline" -> "-ledit -ltermcap". * Allow you to specify an environment variable WRAPPER_SKIP_TRANSFORM for whether you wish to skip the transformation step in the logic script. This is intended for testing purposes. * Added check_prog() and init_lib() functions to the shell code library to make it more reusable outside of the wrapper framework. * Allow the msg_log() function to output to "stdout" or "stderr". If you want to have all of the logging appear on the screen, then you can now set WRAPPER_LOG=stderr. * Make some of the script components not overridable on a per-wrapper basis. * Add a gen-transform.sh script that generates transformation sedfiles. The "transform" script is used to transform arguments, while the "untransform" script is used to unwrap files. Move the no-rpath logic from buildlink3/gen-transform.sh into wrapper/gen-transform.sh since it's not buildlink3-specific. * Check for a non-empty blibpath before adding the option in cmd-sink-aix-xlc. * Extend the autodetection of the libtool mode to detect "compile" and "uninstall". * Add a cmd-sink-libtool script that doesn't pass linker options to libtool unless we're in "link" mode. * Set _USE_RPATH to "yes" for UnixWare so that the wrappers will see the rpath options and convert them to a LD_RUN_PATH definition. * Add more debugging code. 20040826 ======== * Rewrite buildlink3/gen-transform.sh to produce more precise sed commands. Drop some unused commands from the mini-language, and add a few more that are more restrictive in their scope. * Fix problem where repeated options weren't properly handled by some of sed commands. It's not enough that they're "global replace", since some patterns match separator characters before and after each option. We must repeat those patterns twice to catch all instances correctly. * Fix problem noted in both PR pkg/24760 and PR pkg/25500, where -L/usr/lib/* was being mangled improperly. * Remove the top-level "buildlink" target; instead, make buildlinking occur as part of the "wrapper" target. * Add more debugging code. 20040828 ======== * Added a head_queue function to shell-lib that returns the head of the named queue without popping it off the front of the queue. * Strip consecutive, repeated library options from the command line when we read it in the logic script. * Be more careful about not underflowing the argument buffer. 20040906 ======== * shell-lib was moved into pkgsrc/mk/scripts; correct references to that file in the wrapper code. * Use opt-sub instead of sub-mangle when protecting -I/usr/include/* and -L/usr/lib/* from buildlink transformations. This avoids adding lines that look like "-I-I..." in the transformation sedfiles. * mangle and sub-mangle are only meant to transform directories in -I, -L, and rpath options, so remove the lines in buildlink3/gen-transform.sh that transformed bare directories. * Fix bug in strip-slashdot where the "." wasn't backquoted and thus matched all characters instead of only the "." character. * Change the libtool wrapper to use a modified buildcmd script that doesn't rearrange any of the arguments. This should fix spurious problems where libtool doesn't understand how to parse the command line when the -l options are moved to the end of the argument list. * Fix bug in the logic script where the $cachearg and $cachedarg weren't being properly set at all times, which caused the cache to contain the wrong transformed argument. 20040907 ======== * Support automatically passing "ABI" flags to the compiler and linker depending on the value of ${ABI}. Currently supports the SunPro compiler with ${ABI} == 64 and the MIPSPro compiler with ${ABI} as any of 32, n32, o32, and 64. * Move back the code that splits absolute paths to shared libraries from arg-source back into logic. This allows us to correctly skip splitting those paths based on the previous option. Also add a sanity check that the library name in the split argument doesn't contain a "/" since shell globs are not as precise as REs. * Don't transform the path given after --dynamic-linker (used by GNU ld for ELF linkage). * Add the ability for the libtool wrapper to be called just to unwrap an existing libtool archive by running: libtool --mode=unwrap -o libfoo.la 20040914 ======== * Add a loop in libtool-fix-la to ensure that all of the options listed in the dependency_libs lines of *.lai files are processed. This fixes a buildlink3 leakage bug. * Merge the gen-transform.sh scripts between buildlink3 and wrapper and place them all in wrapper. This makes sense since the commands simply allow for many types of transformations, which buildlink3 takes advantage of, but there is nothing inherently buildlink-ish about those commands. * Don't directly manipulate SUBST_SED.unwrap. Instead, create the value of SUBST_SED.unwrap by combining several other variables (currently just _UNWRAP_SED) to ensure that the correct ordering is preserved. * Correct some confusing debugging messages. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.4 2004/03/30 17:25:19 jlam Exp $ d219 1 a219 1 $echo "buildlibdir='"`cd .; $pwd`"'" >> $lafile @ 1.5.2.1 log @EOL the tv-derecurse branch; it has become too outdated. The last live revision can be fetched at the tv-derecurse-eol tag. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.5 2004/09/21 15:01:40 jlam Exp $ @ 1.4 log @Extend the capabilities of buildlink3's libtool wrapper a bit compared to the stock libtool: you can now copy or symlink an uninstalled libtool archive file somewhere else than its build directory, and you can still link against it. This allows us to more easily bolt libtool build machinery onto packages that have unusual(ly crappy) build systems that rely on installing libraries to some common build directory after they're built. We do this by adding a "buildlibdir" variable to the uninstalled libtool archive that points to the build directory of the archive. Whenever we link against this archive, we rewrite the path to archive on the libtool command line so that it points to the true archive. This allows the real libtool to find the files under $buildlibdir/.libs. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.3 2004/03/13 03:41:13 uebayasi Exp $ d3 34 d43 2 a44 2 # This allows the libraries to be found within ${WRKSRC} during relinking. # We rely on the proper rpath settings to be set by libtool. d46 18 a63 6 # For the *.lai files, in the "dependency_libs" line, we remove redundant # -Ldir and -llib options. We also make sure that we don't ever reference # other .la files, only referring to other libraries via the usual # "-L/path -llib" and making sure that /path is always somewhere under the # default view. This makes wildcard dependencies work for "overwrite" # packages by letting libtool find libraries in the default view. d65 2 a66 2 labase=`@@BASENAME@@ $lafile .la` ladir=`@@DIRNAME@@ $lafile` d74 5 a78 1 case "$i" in a79 2 # Skip all -R* options... rpath info shouldn't go into the # dependency_libs line. d81 1 d83 1 d85 1 a85 1 case "$deps" in d88 1 a88 1 *) deps="${deps} $i" ;; d91 7 a97 6 # Convert "dirpath/libfoo.la" into "-Ldirpath/.libs libfoo.la" # if it's an uninstalled libtool archive. This allows # proper relinking by libtool during the install stage # by allowing it to find the uninstalled shared library # in the .libs directory. # d100 2 a101 2 ltlibsdir=`@@DIRNAME@@ $i`/.libs case "$ltlibsdir" in d104 2 a105 2 case "$ltlibsdir" in @@WRKSRC@@/*) fixla=1 ;; d114 1 a114 1 case "$deps" in d120 1 a120 1 deps="${deps} $i" d122 4 a125 1 # Everything else Just Belongs in the dependency_libs line. d127 1 a127 1 deps="${deps} $i" d134 2 a135 1 case "$i" in d137 1 d140 1 d142 1 d144 1 a144 1 case "$relink" in d147 1 a147 1 *) relink="${relink} $i" ;; d152 1 a152 1 relink="${relink} $i" d154 7 a160 6 # Convert "dirpath/libfoo.la" into "-Ldirpath/.libs libfoo.la" # if it's an uninstalled libtool archive. This allows # proper relinking by libtool during the install stage # by allowing it to find the uninstalled shared library # in the .libs directory. # d163 2 a164 2 ltlibsdir=`@@DIRNAME@@ $i`/.libs case "$ltlibsdir" in d167 2 a168 2 case "$ltlibsdir" in @@WRKSRC@@/*) fixla=1 ;; d177 1 a177 1 case "$relink" in d183 1 a183 1 relink="${relink} $i" d185 4 a188 1 # Everything else Just Belongs in the relink_command line. d190 1 a190 1 relink="${relink} $i" d194 5 a198 5 # # Save the orignal .la file produced by libtool as # .la.blsav, and create the new one with a signature. # @@MV@@ -f $lafile ${lafile}.blsav d201 1 a201 1 $cat ${lafile}.blsav | @@SED@@ -e '/^dependency_libs=/,$d' d203 1 a203 1 $cat ${lafile}.blsav | @@SED@@ -e '1,/^dependency_libs=/d' d210 1 a210 1 $cat ${lafile}.tmp | @@SED@@ -e '/^relink_command=/,$d' d212 1 a212 1 $cat ${lafile}.tmp | @@SED@@ -e '1,/^relink_command=/d' d222 6 a227 5 @@RM@@ ${lafile}.tmp $echo "==> Fixed $lafile" >> $wrapperlog # # Fix up any .lai files (libtool archives that will be installed). # d229 1 a229 1 @@EGREP@@ "^#.*modified by buildlink3" $laifile >/dev/null 2>&1; then d232 1 a232 1 @@SED@@ @@_BLNK_WRAP_LT_UNTRANSFORM_SED@@ \ d235 51 a285 24 L=; l=; lexist=; prev= for i in ${dependency_libs}; do case "$i" in # # Don't allowed repeated arguments, so "-lm -lm" # becomes just "-lm". # $prev) ;; # Skip all -R* options... rpath info shouldn't go # into the dependency_libs line. # -R*) ;; # Skip directories that should never appear in # the -L flags. Also modify directories in # ${DEPOTBASE} to point to somewhere in the # default view ${LOCALBASE}, since we want "overwrite" # packages to think the libraries really do just # exist through the default view. # -L*) case "$i" in -L${BUILDLINK_DIR}/*) d287 8 a294 1 -L@@WRKSRC@@|-L@@WRKSRC@@/*) d296 18 a313 6 -L@@DEPOTBASE@@/*) i=`$echo "X$i" | $Xsed -e "s,-L@@DEPOTBASE@@/[^/]*/,-L@@LOCALBASE@@/,"` case "$L" in *"$i "*) ;; *"$i") ;; *) L="$L $i" ;; d315 5 d321 3 d325 1 a325 5 case "$L" in *"$i "*) ;; *"$i") ;; *) L="$L $i" ;; esac d328 7 a334 36 ;; # Libraries really do exist, so we want to keep # any -L flags we've seen in the generated # dependency_libs line. # -l*) lexist=1 l="$l $i" ;; # Libtool archives should be changed from # "/path/libfoo.la" to "-L/path -lfoo", where /path # is appropriately modified so that the depot # directory is changed to the views directory. This # allows the .la files to be used by either "overwrite" # or "pkgviews" packages and works correctly with # wildcard dependencies. # *.la) dirbase=`@@DIRNAME@@ $i` dir=`$echo "X$dirbase" | $Xsed -e "s,^@@DEPOTBASE@@/[^/]*/,@@LOCALBASE@@/,"` case "$L" in *"-L$dir "*) ;; *"-L$dir") ;; *) L="$L -L$dir" ;; esac libbase=`@@BASENAME@@ $i .la` lib=`$echo "X$libbase" | $Xsed -e "s/^lib//"` lexist=1 l="$l -l$lib" ;; # Everything else Just Belongs. *) l="$l $i" ;; esac prev="$i" d336 1 a336 6 if $test -z "$lexist"; then L= fi deps="$L$l" deps=`$echo "X$deps" | $Xsed -e "s/^[ ]*//"` @@MV@@ -f $laifile ${laifile}.blsav d338 1 a338 1 $cat ${laifile}.tmp | @@SED@@ -e '/^dependency_libs=/,$d' d340 1 a340 1 $cat ${laifile}.tmp | @@SED@@ -e '1,/^dependency_libs=/d' d344 4 a347 5 @@RM@@ -f ${laifile}.tmp $echo "==> Fixed $laifile" >> $wrapperlog if $test "$libdir" != "${BUILDLINK_DIR}/.tmp/inst" && \ @@EGREP@@ "${BUILDLINK_DIR}" $laifile >/dev/null 2>&1; then $echo "==> [buildlink3] Error: buildlink3 leakage into $laifile" >> $wrapperlog @ 1.3 log @Indent. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.2 2003/09/02 06:59:57 jlam Exp $ d132 20 a151 3 if $test -z "$deps" && $test -z "$relink" || \ @@EGREP@@ "^#.*modified by buildlink3" $lafile >/dev/null 2>&1; then : d153 1 a153 26 # Save the orignal .la file produced by libtool as # .la.blsav, and create the new one with a signature. # @@MV@@ -f $lafile ${lafile}.blsav if $test -n "$deps"; then ( $cat ${lafile}.blsav | @@SED@@ -e '/^dependency_libs=/,$d' $echo "dependency_libs='$deps'" $cat ${lafile}.blsav | @@SED@@ -e '1,/^dependency_libs=/d' ) > ${lafile}.tmp else $cat ${lafile}.blsav > ${lafile}.tmp fi if $test -n "$relink"; then ( $cat ${lafile}.tmp | @@SED@@ -e '/^relink_command=/,$d' $echo "relink_command='$relink'" $cat ${lafile}.tmp | @@SED@@ -e '1,/^relink_command=/d' ) > $lafile else $cat ${lafile}.tmp > $lafile fi $echo >> $lafile $echo "# This file has been modified by buildlink3." >> $lafile @@RM@@ ${lafile}.tmp $echo "==> Fixed $lafile" >> $wrapperlog d155 7 @ 1.2 log @Merge pkgviews-mk branch into the HEAD by running: cd pkgsrc/mk cvs update -Pd -A cvs update -Pd -j pkgviews-mk-base -j pkgviews-mk @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.1.2.9 2003/09/02 03:19:22 jlam Exp $ d126 1 a126 1 # Everything else Just Belongs in the relink_command line. @ 1.1 log @file libtool-fix-la was initially added on branch pkgviews-mk. @ text @d1 275 @ 1.1.2.1 log @Initial implementation of buildlink3, based on buildlink2 and designed to take advantage of pkgviews. More thought is needed for the pkgviews/libtool interaction because libtool archives (*.la) will likely contain absolute paths to other .la files in depot directories, but we don't want this since binary packages with wildcard dependencies may break. @ text @a0 192 # $NetBSD: libtool-fix-la,v 1.18 2003/01/24 12:09:16 jlam Exp $ # # For *.la files, in the "relink_command" line, we make the following # replacements: # # "libfoo.la" -> "-L./.libs libfoo.la" # "dirpath/libfoo.la" -> "-Ldirpath/.libs libfoo.la" # # This allows the libraries to be found within ${WRKSRC} during relinking. # We rely on the proper rpath settings to be set by libtool. # # For the *.lai files, in the "dependency_libs" line, we remove redundant # -Ldir and -llib options. labase=`@@BASENAME@@ $lafile .la` ladir=`@@DIRNAME@@ $lafile` latimestamp=${ladir}/.${labase}.la.timestamp laifile=${ladir}/.libs/${labase}.lai if $test -f $lafile; then . ${ladir}/${labase}.la deps= for i in ${dependency_libs}; do case "$i" in -L*) case "$deps" in *"$i "*) ;; *"$i") ;; *) deps="${deps} $i" ;; esac ;; *.la) fixla=0 ltlibsdir=`@@DIRNAME@@ $i`/.libs case "$ltlibsdir" in /*) # fix if an absolute path in ${WRKSRC} case "$ltlibsdir" in @@WRKSRC@@/*) fixla=1 ;; esac ;; *) # fix all relative paths fixla=1 ;; esac if $test $fixla -gt 0; then case "$deps" in *"-L$ltlibsdir "*) ;; *"-L$ltlibsdir") ;; *) deps="$deps -L$ltlibsdir" ;; esac fi deps="${deps} $i" ;; *) deps="${deps} $i" ;; esac done relink= for i in ${relink_command}; do case "$i" in -I*|-D*) ;; -L*) case "$relink" in *"$i "*) ;; *"$i") ;; *) relink="${relink} $i" ;; esac ;; $lafile) relink="${relink} $i" ;; *.la) fixla=0 ltlibsdir=`@@DIRNAME@@ $i`/.libs case "$ltlibsdir" in /*) # fix if an absolute path in ${WRKSRC} case "$ltlibsdir" in @@WRKSRC@@/*) fixla=1 ;; esac ;; *) # fix all relative paths fixla=1 ;; esac if $test $fixla -gt 0; then case "$relink" in *"-L$ltlibsdir "*) ;; *"-L$ltlibsdir") ;; *) relink="$relink -L$ltlibsdir" ;; esac fi relink="${relink} $i" ;; *) relink="${relink} $i" ;; esac done if $test -z "$deps" && $test -z "$relink" || \ @@EGREP@@ "^#.*modified by buildlink3" $lafile >/dev/null 2>&1; then : else @@MV@@ -f $lafile ${lafile}.blsav if $test -n "$deps"; then ( $cat ${lafile}.blsav | @@SED@@ -e '/^dependency_libs=/,$d' $echo "dependency_libs='$deps'" $cat ${lafile}.blsav | @@SED@@ -e '1,/^dependency_libs=/d' ) > ${lafile}.tmp else $cat ${lafile}.blsav > ${lafile}.tmp fi if $test -n "$relink"; then ( $cat ${lafile}.tmp | @@SED@@ -e '/^relink_command=/,$d' $echo "relink_command='$relink'" $cat ${lafile}.tmp | @@SED@@ -e '1,/^relink_command=/d' ) > $lafile else $cat ${lafile}.tmp > $lafile fi $echo >> $lafile $echo "# This file has been modified by buildlink3." >> $lafile @@RM@@ ${lafile}.tmp $echo "==> Fixed $lafile" >> $wrapperlog fi if $test -z "$laifile" || $test ! -f "$laifile" || \ @@EGREP@@ "^#.*modified by buildlink3" $laifile >/dev/null 2>&1; then : else @@SED@@ @@_BLNK_UNTRANSFORM_SED@@ \ $laifile > ${laifile}.tmp . ${laifile}.tmp L=; l=; lexist=; prev= for i in ${dependency_libs}; do case "$i" in $prev) ;; -L*) case "$i" in -L${BUILDLINK_DIR}) ;; -L@@WRKSRC@@/*) ;; *) case "$L" in *"$i "*) ;; *"$i") ;; *) L="$L $i" ;; esac ;; esac ;; -l*) lexist=1 l="$l $i" ;; *) l="$l $i" ;; esac prev="$i" done if $test -z "$lexist"; then L= fi deps="$L$l" @@MV@@ -f $laifile ${laifile}.blsav ( $cat ${laifile}.tmp | @@SED@@ -e '/^dependency_libs=/,$d' $echo "dependency_libs='$deps'" $cat ${laifile}.tmp | @@SED@@ -e '1,/^dependency_libs=/d' $echo $echo "# This file has been modified by buildlink3." ) > ${laifile} @@RM@@ -f ${laifile}.tmp $echo "==> Fixed $laifile" >> $wrapperlog if $test "$libdir" != "${BUILDLINK_DIR}/.tmp/inst" && \ @@EGREP@@ "${BUILDLINK_DIR}" $laifile >/dev/null 2>&1; then $echo "==> [buildlink3] Error: buildlink3 leakage into $laifile" >> $wrapperlog $echo "==> [buildlink3] Error: buildlink3 leakage into $laifile" 1>&2 wrapper_result=1 fi fi fi @ 1.1.2.2 log @Use comments to document this shell script. Also, add some new behaviour: We make sure that we don't ever reference other .la files from installed .la files, only referring to other libraries via the usual "-L/path -llib" and making sure that /path is always somewhere under the default view. This makes wildcard dependencies work for "overwrite" packages by letting libtool find libraries in the default view. A similar change may be needed for pkgsrc/mk/buildlink2/libtool-fix-la during the pkgviews integration. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.1.2.1 2003/08/14 13:16:51 jlam Exp $ d13 1 a13 5 # -Ldir and -llib options. We also make sure that we don't ever reference # other .la files, only referring to other libraries via the usual # "-L/path -llib" and making sure that /path is always somewhere under the # default view. This makes wildcard dependencies work for "overwrite" # packages by letting libtool find libraries in the default view. a24 1 # Catch -L and remove redundant ones. a31 6 # Convert "dirpath/libfoo.la" into "-Ldirpath/.libs libfoo.la" # if it's an uninstalled libtool archive. This allows # proper relinking by libtool during the install stage # by allowing it to find the uninstalled shared library # in the .libs directory. # a55 1 # Everything else Just Belongs in the dependency_libs line. a64 1 # -I* and -D* are useless for linking. a66 1 # Catch -L and remove redundant ones. a73 1 # This is the .la file we're relinking... don't touch it! a76 6 # Convert "dirpath/libfoo.la" into "-Ldirpath/.libs libfoo.la" # if it's an uninstalled libtool archive. This allows # proper relinking by libtool during the install stage # by allowing it to find the uninstalled shared library # in the .libs directory. # a100 1 # Everything else Just Belongs in the relink_command line. a109 3 # Save the orignal .la file produced by libtool as # .la.blsav, and create the new one with a signature. # a133 3 # # Fix up any .lai files (libtool archives that will be installed). # a143 4 # # Don't allowed repeated arguments, so "-lm -lm" # becomes just "-lm". # a145 7 # Skip directories that should never appear in # the -L flags. Also modify directories in # ${DEPOTBASE} to point to somewhere in the # default view ${LOCALBASE}, since we want "overwrite" # packages to think the libraries really do just # exist through the default view. # a151 8 -L@@DEPOTBASE@@/*) i=`$echo "X$i" | $Xsed -e "s/-L@@DEPOTBASE@@/-L@@LOCALBASE@@/"` case "$L" in *"$i "*) ;; *"$i") ;; *) L="$L $i" ;; esac ;; a160 4 # Libraries really do exist, so we want to keep # any -L flags we've seen in the generated # dependency_libs line. # a164 22 # Libtool archives should be changed from # "/path/libfoo.la" to "-L/path -lfoo", where /path # is appropriately modified so that the depot # directory is changed to the views directory. This # allows the .la files to be used by either "overwrite" # or "pkgviews" packages and works correctly with # wildcard dependencies. # *.la) dirbase=`@@DIRNAME@@ $i` dir=`$echo "X$dirbase" | $Xsed -e "s/^@@DEPOTBASE@@\//@@LOCALBASE@@\//"` case "$L" in *"-L$dir "*) ;; *"-L$dir") ;; *) L="$L -L$dir" ;; esac libbase=`@@BASENAME@@ $i .la` lib=`$echo "X$libbase" | $Xsed -e "s/^lib//"` lexist=1 l="$l -l$lib" ;; # Everything else Just Belongs. @ 1.1.2.3 log @Use commas instead of / as separator for sed expression involving paths. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.1.2.2 2003/08/16 10:52:35 jlam Exp $ d192 1 a192 1 i=`$echo "X$i" | $Xsed -e "s,-L@@DEPOTBASE@@,-L@@LOCALBASE@@,"` d226 1 a226 1 dir=`$echo "X$dirbase" | $Xsed -e "s,^@@DEPOTBASE@@/,@@LOCALBASE@@/,"` @ 1.1.2.4 log @We need to match the next directory part of ${DEPOTBASE}/* when we're replacing with ${LOCALBASE}, otherwise we're not matching the full depot directory. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.1.2.3 2003/08/16 11:05:36 jlam Exp $ d192 1 a192 1 i=`$echo "X$i" | $Xsed -e "s,-L@@DEPOTBASE@@/[^/]*/,-L@@LOCALBASE@@/,"` d226 1 a226 1 dir=`$echo "X$dirbase" | $Xsed -e "s,^@@DEPOTBASE@@/[^/]*/,@@LOCALBASE@@/,"` @ 1.1.2.5 log @Add code to unbuildlinkify files and libtool archives. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.1.2.4 2003/08/16 11:13:25 jlam Exp $ d166 1 a166 1 @@SED@@ @@_BLNK_WRAP_LT_UNTRANSFORM_SED@@ \ @ 1.1.2.6 log @Correct the glob so that we actually match -L${BUILDLINK_DIR}/* and discard them. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.1.2.5 2003/08/27 12:54:04 jlam Exp $ d187 1 a187 1 -L${BUILDLINK_DIR}/*) @ 1.1.2.7 log @Strip leading spaces from dependency_libs in the modified .lai file. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.1.2.6 2003/08/27 12:56:00 jlam Exp $ a247 1 deps=`$echo "X$deps" | $Xsed -e "s/^[ ]*//"` @ 1.1.2.8 log @Also strip out -L@@WRKSRC@@ since the libraries may be in the top-level source directory. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.1.2.7 2003/08/30 07:45:03 jlam Exp $ d189 1 a189 1 -L@@WRKSRC@@|-L@@WRKSRC@@/*) @ 1.1.2.9 log @Remove -R* options from the dependency_libs lines of *.la and *.lai files. @ text @d1 1 a1 1 # $NetBSD: libtool-fix-la,v 1.1.2.8 2003/08/31 07:05:50 jlam Exp $ a28 4 -R*) # Skip all -R* options... rpath info shouldn't go into the # dependency_libs line. ;; a176 5 ;; # Skip all -R* options... rpath info shouldn't go # into the dependency_libs line. # -R*) @