From: Heikki Lindholm <holindho@cs.helsinki.fi>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC/PATCH 2/3] fix buildroot sed handling on Mac OS X
Date: Thu, 08 Mar 2007 23:44:55 +0200 [thread overview]
Message-ID: <45F083D7.9050100@cs.helsinki.fi> (raw)
In-Reply-To: <20070308163826.GD1389@aon.at>
Bernhard Fischer kirjoitti:
> On Sun, Feb 25, 2007 at 01:22:46PM +0200, Heikki Lindholm wrote:
>
>>Include a patch for GNU sed that allows building it on Mac OS X and
>>remove a spurious --prefix from sed.mk.
>>
>>-- Heikki Lindholm
>>
>
>
>>diff -Nru buildroot/package/sed/configure.patch buildroot-devel/package/sed/configure.patch
>>--- buildroot/package/sed/configure.patch 1970-01-01 02:00:00.000000000 +0200
>>+++ buildroot-devel/package/sed/configure.patch 2007-02-23 14:04:16.000000000 +0200
>>@@ -0,0 +1,29 @@
>>+diff -Nru sed-4.1.5.orig/configure sed-4.1.5/configure
>>+--- sed-4.1.5.orig/configure 2006-02-03 11:24:40.000000000 +0200
>>++++ sed-4.1.5/configure 2007-02-23 14:03:55.000000000 +0200
>>+@@ -10147,8 +10147,6 @@
>>+ LINGUAS="${LINGUAS-%UNSET%}"
>>+
>>+
>>+- install_sh="$install_sh"
>>+-
>>+ _ACEOF
>>+
>>+
>>+@@ -11265,14 +11263,10 @@
>>+ esac
>>+ done ;;
>>+ gettext-fix )
>>+- sed -e '/^mkinstalldirs *=/a\' \
>>+- -e "install_sh=$install_sh" \
>>+- -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
>>++ sed -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
>>+ intl/Makefile > intl/Makefile.tmp
>>+ mv intl/Makefile.tmp intl/Makefile
>>+- sed -e '/^mkinstalldirs *=/a\' \
>>+- -e "install_sh=$install_sh" \
>>+- -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
>>++ sed -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
>>+ po/Makefile > po/Makefile.tmp
>>+ mv po/Makefile.tmp po/Makefile ;;
>>+ esac
>
>
> It is not immediately apparent to me why you need this patch. Please
> elaborate.
Nor to me. But it seems to fix a sed incompatibility - it's funny, but
building GNU sed does seem to require GNU sed. If I try to build
sed-4.1.5 on OS X without this patch, ./configure fails with
sed: 1: "install_sh=/tmp/sed-4.1 ...": command i expects \ followed by text
sed: 1: "install_sh=/tmp/sed-4.1 ...": command i expects \ followed by text
The patch itself is just copied from Darwinports (macports these days.)
>>diff -Nru buildroot/package/sed/sed.mk buildroot-devel/package/sed/sed.mk
>>--- buildroot/package/sed/sed.mk 2007-02-22 10:50:29.000000000 +0200
>>+++ buildroot-devel/package/sed/sed.mk 2007-02-24 17:05:12.000000000 +0200
>>@@ -18,6 +18,7 @@
>>HOST_SED_DIR:=$(TOOL_BUILD_DIR)
>>SED:=$(HOST_SED_DIR)/bin/sed -i -e
>>HOST_SED_TARGET=$(shell package/sed/sedcheck.sh)
>>+HOST_SED_IF_ANY=$(shell toolchain/dependencies/check-host-sed.sh)
>>
>>$(DL_DIR)/$(SED_SOURCE):
>> mkdir -p $(DL_DIR)
>>@@ -35,13 +36,13 @@
>> mkdir -p $(TOOL_BUILD_DIR)
>> mkdir -p $(HOST_SED_DIR)/bin;
>> $(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
>>+ toolchain/patch-kernel.sh $(SED_DIR1) package/sed/ configure.patch
>> touch $(SED_DIR1)/.unpacked
>>
>>$(SED_DIR1)/.configured: $(SED_DIR1)/.unpacked
>> (cd $(SED_DIR1); rm -rf config.cache; \
>> ./configure \
>> --prefix=$(HOST_SED_DIR) \
>>- --prefix=/usr \
>> );
>> touch $(SED_DIR1)/.configured
>>
>>@@ -62,17 +63,10 @@
>> $(HOST_SED_DIR)/usr/man $(HOST_SED_DIR)/usr/share/doc; fi
>>
>>use-sed-host-binary:
>>- @if [ -x /usr/bin/sed ] ; then \
>>- SED="/usr/bin/sed" ; \
>>- else \
>>- if [ -x /bin/sed ] ; then \
>>- SED="/bin/sed" ; \
>>- fi \
>>- fi ; \
>>- if [ ! -e "$(HOST_SED_DIR)/$(SED_TARGET_BINARY)" ] ; then \
>>+ @if [ ! -e "$(HOST_SED_DIR)/$(SED_TARGET_BINARY)" ] ; then \
>
>
> Please do not hide away these commands.
Uhm. What do you mean? sed checking is already done for HOST_SED_IF_ANY
by the same check-sed script.
>> mkdir -p "$(HOST_SED_DIR)/bin"; \
>> rm -f "$(HOST_SED_DIR)/$(SED_TARGET_BINARY)"; \
>>- ln -sf "$$SED" "$(HOST_SED_DIR)/$(SED_TARGET_BINARY)"; \
>>+ ln -sf "$(HOST_SED_IF_ANY)" "$(HOST_SED_DIR)/$(SED_TARGET_BINARY)"; \
>> fi
>>
>>host-sed: $(HOST_SED_TARGET)
next prev parent reply other threads:[~2007-03-08 21:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-25 11:22 [Buildroot] [RFC/PATCH 2/3] fix buildroot sed handling on Mac OS X Heikki Lindholm
2007-03-08 16:38 ` Bernhard Fischer
2007-03-08 21:44 ` Heikki Lindholm [this message]
2007-03-09 8:35 ` Bernhard Fischer
2007-03-09 19:30 ` Heikki Lindholm
2007-03-09 19:41 ` Heikki Lindholm
-- strict thread matches above, loose matches on Subject: below --
2007-02-23 16:10 Heikki Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45F083D7.9050100@cs.helsinki.fi \
--to=holindho@cs.helsinki.fi \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.