pkgsrc/mk/buildlink2/post-cache
jlam f0f05619c5 Move the sed command in _BLNK_{,UN}TRANSFORM_SED into a sed command files
.transform.sed and .untransform.sed that are generated by a new
gen-transform.sh shell script.  This avoids all of the silliness with
exceeding the length of the value of a make variable that brought about
breaking the original _BLNK_TRANSFORM_SED into _BLNK_TRANSFORM_SED.[1-4].
It's also vastly easier to understand the gen-transform.sh script as
opposed to the juxtaposition of make and sed regular expressions, a.k.a.
massive eyesores, that were in bsd.buildlink.mk.

Also fix the directory protection scheme so that it might actually work
if the pkgsrc directory is a subdirectory of /usr/pkg (${LOCALBASE}).

Lastly, filter out /usr/X11R6 (${X11BASE}) if the package doesn't define
USE_X11.  This should catch packages that use X11 without announcing it,
and avoids one way you can circumvent buildlink2.
2002-10-30 00:23:00 +00:00

59 lines
1.2 KiB
Text

# $NetBSD: post-cache,v 1.7 2002/10/30 00:23:00 jlam Exp $
*)
case $arg in
*[\`\"\$\\]*)
arg=`@ECHO@ X$arg | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
case $updatecache in
yes)
newarg=`@ECHO@ X$arg | $Xsed -e "$sed_quote_subst"`
@ECHO@ "$arg) arg=\"$newarg\" ;; #1" >> $cache
cacheupdated=yes
;;
esac
;;
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
case $updatecache in
yes)
newarg=`@ECHO@ X$arg | $Xsed -e "$sed_quote_subst"`
@ECHO@ "$arg) arg=\"$newarg\" ;; #2" >> $cache
cacheupdated=yes
;;
esac
;;
-D*)
arg=`@ECHO@ X$arg | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
case $updatecache in
yes)
newarg=`@ECHO@ X$arg | $Xsed -e "$sed_quote_subst"`
@ECHO@ "$arg) arg=\"$newarg\" ;; #3" >> $cache
cacheupdated=yes
;;
esac
;;
-[ILRl]*|-Wl,*|/usr/lib/lib*|@LOCALBASE@/*/lib*|@X11BASE@/*/lib*)
newarg=`@ECHO@ "X$arg" | $Xsed \
@_BLNK_TRANSFORM_SED@ \
`
case $updatecache in
yes)
@ECHO@ "$arg) arg=\"$newarg\" ;; #4" >> $cache
cacheupdated=yes
;;
esac
arg="$newarg"
;;
esac
;;
esac