Date: Sat, 13 Dec 2014 00:20:08 +0000 (UTC) From: Mikhail Teterin <mi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r374612 - head/devel/xsd/files Message-ID: <201412130020.sBD0K8Dq082179@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mi Date: Sat Dec 13 00:20:07 2014 New Revision: 374612 URL: https://svnweb.freebsd.org/changeset/ports/374612 QAT: https://qat.redports.org/buildarchive/r374612/ Log: Patch upstream's custom script for dependency-generation to avoid using overly-long sed commands. This is achieved by separating one large command (-e "cmd1;cmd2;...") into multiple ones (-e "cmd1" -e "cmd2" ...). The long command was hitting our sed's limit of 2048... PR: 177018 Approved by: maintainer (makc) Sponsored by: United Wallabies Added: head/devel/xsd/files/patch-dep (contents, props changed) Added: head/devel/xsd/files/patch-dep ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/xsd/files/patch-dep Sat Dec 13 00:20:07 2014 (r374612) @@ -0,0 +1,78 @@ +--- build-0.3/c/gnu/dep 2010-04-27 14:22:22.000000000 -0400 ++++ build-0.3/c/gnu/dep 2014-12-12 16:10:56.000000000 -0500 +@@ -1,3 +1,3 @@ +-#! /usr/bin/env bash ++#!/bin/sh + + # file : build/c/gnu/dep +@@ -21,5 +21,5 @@ + script= + +-function gen_script () ++gen_script () + { + while [ "$1" ]; do +@@ -34,10 +34,10 @@ + # + script="$script"\ +-"s \\ $prefix \\ $path$prefix g;"\ +-"s \\ /usr/include/$prefix \\ $path$prefix g;"\ +-"s \\ /usr/local/include/$prefix \\ $path$prefix g;"\ +-"s ^$prefix $path$prefix ;"\ +-"s ^/usr/include/$prefix $path$prefix ;"\ +-"s ^/usr/local/include/$prefix $path$prefix ;" ++" -e 's| $prefix| $path$prefix|g'"\ ++" -e 's| /usr/include/$prefix| $path$prefix|g'"\ ++" -e 's| /usr/local/include/$prefix| $path$prefix|g'"\ ++" -e 's|^$prefix|$path$prefix|'"\ ++" -e 's|^/usr/include/$prefix|$path$prefix|'"\ ++" -e 's|^/usr/local/include/$prefix|$path$prefix|'" + done + } +@@ -54,5 +54,4 @@ + # some other place (e.g., /usr/include). + # +-epilogue="s% \([^/. \\\\]\)% $out_base/\1%g;s%^\([^/. ].*:\)%$out_base/\1%" +- +-exec sed -e "$script$epilogue" ++script="${script} -e 's% \([^/. \\\\]\)% $out_base/\1%g;s%^\([^/. ].*:\)%$out_base/\1%'" ++eval exec sed $script +--- build-0.3/c/intel/dep 2010-04-27 14:22:22.000000000 -0400 ++++ build-0.3/c/intel/dep 2014-12-12 16:10:56.000000000 -0500 +@@ -1,3 +1,3 @@ +-#! /usr/bin/env bash ++#!/bin/sh + + # file : build/c/intel/dep +@@ -21,5 +21,5 @@ + script= + +-function gen_script () ++gen_script () + { + while [ "$1" ]; do +@@ -34,10 +34,10 @@ + # + script="$script"\ +-"s \\ $prefix \\ $path$prefix g;"\ +-"s \\ /usr/include/$prefix \\ $path$prefix g;"\ +-"s \\ /usr/local/include/$prefix \\ $path$prefix g;"\ +-"s ^$prefix $path$prefix ;"\ +-"s ^/usr/include/$prefix $path$prefix ;"\ +-"s ^/usr/local/include/$prefix $path$prefix ;" ++" -e 's| $prefix| $path$prefix|g'"\ ++" -e 's| /usr/include/$prefix| $path$prefix|g'"\ ++" -e 's| /usr/local/include/$prefix| $path$prefix|g'"\ ++" -e 's|^$prefix|$path$prefix|'"\ ++" -e 's|^/usr/include/$prefix|$path$prefix|'"\ ++" -e 's|^/usr/local/include/$prefix|$path$prefix|'" + done + } +@@ -54,5 +54,4 @@ + # some other place (e.g., /usr/include). + # +-epilogue="s% \([^/. \\\\]\)% $out_base/\1%g;s%^\([^/. ].*:\)%$out_base/\1%" +- +-exec sed -e "$script$epilogue" ++script="${script} -e 's% \([^/. \\\\]\)% $out_base/\1%g;s%^\([^/. ].*:\)%$out_base/\1%'" ++eval exec sed $script
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412130020.sBD0K8Dq082179>