All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC/PATCH 2/3] fix buildroot sed handling on Mac OS X
@ 2007-02-25 11:22 Heikki Lindholm
  2007-03-08 16:38 ` Bernhard Fischer
  0 siblings, 1 reply; 7+ messages in thread
From: Heikki Lindholm @ 2007-02-25 11:22 UTC (permalink / raw)
  To: buildroot

Include a patch for GNU sed that allows building it on Mac OS X and
remove a spurious --prefix from sed.mk.

-- Heikki Lindholm

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: buildroot-070225-sed-osxbuild.patch
Url: http://busybox.net/lists/buildroot/attachments/20070225/cb8401d2/attachment.asc 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC/PATCH 2/3] fix buildroot sed handling on Mac OS X
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Fischer @ 2007-03-08 16:38 UTC (permalink / raw)
  To: buildroot

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.

>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.

> 		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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC/PATCH 2/3] fix buildroot sed handling on Mac OS X
  2007-03-08 16:38 ` Bernhard Fischer
@ 2007-03-08 21:44   ` Heikki Lindholm
  2007-03-09  8:35     ` Bernhard Fischer
  0 siblings, 1 reply; 7+ messages in thread
From: Heikki Lindholm @ 2007-03-08 21:44 UTC (permalink / raw)
  To: buildroot

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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC/PATCH 2/3] fix buildroot sed handling on Mac OS X
  2007-03-08 21:44   ` Heikki Lindholm
@ 2007-03-09  8:35     ` Bernhard Fischer
  2007-03-09 19:30       ` Heikki Lindholm
  0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Fischer @ 2007-03-09  8:35 UTC (permalink / raw)
  To: buildroot

On Thu, Mar 08, 2007 at 11:44:55PM +0200, Heikki Lindholm wrote:
>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.

>>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.)

applied, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC/PATCH 2/3] fix buildroot sed handling on Mac OS X
  2007-03-09  8:35     ` Bernhard Fischer
@ 2007-03-09 19:30       ` Heikki Lindholm
  2007-03-09 19:41         ` Heikki Lindholm
  0 siblings, 1 reply; 7+ messages in thread
From: Heikki Lindholm @ 2007-03-09 19:30 UTC (permalink / raw)
  To: buildroot

Bernhard Fischer kirjoitti:
> On Thu, Mar 08, 2007 at 11:44:55PM +0200, Heikki Lindholm wrote:
> 
>>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.
> 
> 
>>>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.)
> 
> 
> applied, thanks.

Dammit. There was still one bug left:

The sed.mk makefile uses both absolute install prefix and DESTDIR 
pointing to the same dir. Fix by removing DESTDIR.

-- Heikki Lindholm

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: buildroot-070309-sed-hostinstall.patch
Url: http://busybox.net/lists/buildroot/attachments/20070309/eb600d9b/attachment.asc 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC/PATCH 2/3] fix buildroot sed handling on Mac OS X
  2007-03-09 19:30       ` Heikki Lindholm
@ 2007-03-09 19:41         ` Heikki Lindholm
  0 siblings, 0 replies; 7+ messages in thread
From: Heikki Lindholm @ 2007-03-09 19:41 UTC (permalink / raw)
  To: buildroot

Heikki Lindholm kirjoitti:
> Bernhard Fischer kirjoitti:
> 
>> On Thu, Mar 08, 2007 at 11:44:55PM +0200, Heikki Lindholm wrote:
>>
>>> 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.
>>
>>
>>
>>>> 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.)
>>
>>
>>
>> applied, thanks.
> 
> 
> Dammit. There was still one bug left:
> 
> The sed.mk makefile uses both absolute install prefix and DESTDIR 
> pointing to the same dir. Fix by removing DESTDIR.

... which is of course the wrong way to fix it. Here's a better one.

-
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: buildroot-070309-sed-hostinstall.patch
Url: http://busybox.net/lists/buildroot/attachments/20070309/2b1f9f08/attachment.pot 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC/PATCH 2/3] fix buildroot sed handling on Mac OS X
@ 2007-02-23 16:10 Heikki Lindholm
  0 siblings, 0 replies; 7+ messages in thread
From: Heikki Lindholm @ 2007-02-23 16:10 UTC (permalink / raw)
  To: buildroot

Include a patch for GNU sed that allows building it on Mac OS X and 
remove a spurious --prefix from sed.mk.

-- Heikki Lindholm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: buildroot-070223-sed-osxbuild.patch
Url: http://busybox.net/lists/buildroot/attachments/20070223/abbbf912/attachment.asc 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-03-09 19:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.