Ticket #10028: 0003-Determine-how-to-invoke-sed-with-extended-regexp.patch

File 0003-Determine-how-to-invoke-sed-with-extended-regexp.patch, 1.8 KB (added by nielx, 11 years ago)
  • build/jam/FileRules

    From 50eccbe8726e3e6ec95e0dc9f0b6c6bfb8106373 Mon Sep 17 00:00:00 2001
    From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
    Date: Sun, 29 Sep 2013 21:27:47 +0200
    Subject: [PATCH 3/3] Determine how to invoke sed with extended regexp
    
    This will require re-running configure
    ---
     build/jam/FileRules | 2 +-
     configure           | 7 +++++++
     2 files changed, 8 insertions(+), 1 deletion(-)
    
    diff --git a/build/jam/FileRules b/build/jam/FileRules
    index 6a4b02e..5a84789 100644
    a b rule DownloadFile file : url : source  
    454454
    455455actions ChecksumFileSHA256
    456456{
    457     $(HOST_SHA256) $(2) | sed -r 's,([^[:space:]]*).*,\1,' > $(1)
     457    $(HOST_SHA256) $(2) | $(HOST_EXTENDED_REGEX_SED) 's,([^[:space:]]*).*,\1,' > $(1)
    458458        # The sed part is only necessary for sha256sum, but it doesn't harm for
    459459        # sha256 either.
    460460}
  • configure

    diff --git a/configure b/configure
    index 9bcba39..4a86e07 100755
    a b HAIKU_HOST_USE_32BIT=0  
    465465HAIKU_HOST_USE_XATTR=0
    466466HAIKU_HOST_USE_XATTR_REF=0
    467467HAIKU_HOST_BUILD_ONLY=0
     468HOST_EXTENDED_REGEX_SED="sed -r"
    468469HOST_GCC_LD=`gcc -print-prog-name=ld`
    469470HOST_GCC_OBJCOPY=`gcc -print-prog-name=objcopy`
    470471SFDISK_BINARY=sfdisk
    if [ $caseInsensitive != 0 ]; then  
    663664    exit 1
    664665fi
    665666
     667# determine how to invoke sed with extended regexp support for non-GNU sed
     668if [ $HOST_PLATFORM = "darwin" ]; then
     669    HOST_EXTENDED_REGEX_SED="sed -E"
     670fi
     671
    666672# create output directory
    667673mkdir -p "$buildOutputDir" || exit 1
    668674
    HAIKU_BUILD_ATTRIBUTES_DIR ?= ${HAIKU_BUILD_ATTRIBUTES_DIR} ;  
    858864
    859865HAIKU_YASM                  ?= ${HAIKU_YASM} ;
    860866
     867HOST_EXTENDED_REGEX_SED     ?= ${HOST_EXTENDED_REGEX_SED} ;
    861868HOST_GCC_RAW_VERSION        ?= ${HOST_GCC_RAW_VERSION} ;
    862869HOST_GCC_MACHINE            ?= ${HOST_GCC_MACHINE} ;
    863870HOST_LD                     ?= ${HOST_GCC_LD} ;