From patchwork Thu May 15 17:31:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bugzilla@busybox.net X-Patchwork-Id: 349321 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 3C1E71400DA for ; Fri, 16 May 2014 03:31:16 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id AB1E593775; Thu, 15 May 2014 17:31:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wETnaMR9v-Vg; Thu, 15 May 2014 17:31:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 34B94937CD; Thu, 15 May 2014 17:31:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E54281C244D for ; Thu, 15 May 2014 17:31:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E2AB093775 for ; Thu, 15 May 2014 17:31:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fq6ym96wqYkf for ; Thu, 15 May 2014 17:31:13 +0000 (UTC) Received: from busybox.osuosl.org (busybox.osuosl.org [140.211.167.224]) by hemlock.osuosl.org (Postfix) with ESMTP id 82CD1936E8 for ; Thu, 15 May 2014 17:31:13 +0000 (UTC) Received: by busybox.osuosl.org (Postfix, from userid 81) id 7A6E79CC01; Thu, 15 May 2014 17:31:13 +0000 (UTC) From: bugzilla@busybox.net To: buildroot@uclibc.org X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: buildroot X-Bugzilla-Component: Other X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: benstoltz@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P5 X-Bugzilla-Assigned-To: patrickdepinguin@gmail.com X-Bugzilla-Target-Milestone: 2014.08 X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: https://bugs.busybox.net/ Auto-Submitted: auto-generated MIME-Version: 1.0 Message-Id: <20140515173113.7A6E79CC01@busybox.osuosl.org> Date: Thu, 15 May 2014 17:31:13 +0000 (UTC) Subject: [Buildroot] [Bug 5750] Doing a Buildroot build from /usr doesn't work X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net https://bugs.busybox.net/show_bug.cgi?id=5750 --- Comment #7 from Ben Stoltz 2014-05-15 17:31:12 UTC --- This fixes the problem for me. Ben Stoltz + -e 's,@BASE_DIR@,$(BASE_DIR),g' \ $(HOST_DIR)/usr/bin/pkg-config endef diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index a66ecd4..74c90dd 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -249,8 +249,12 @@ ifndef $(2)_INSTALL_STAGING_CMDS define $(2)_INSTALL_STAGING_CMDS $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR) for i in $$$$(find $(STAGING_DIR)/usr/lib* -name "*.la"); do \ - cp -f $$$$i $$$$i~; \ - $$(SED) "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" $$$$i; \ + cp -n $$$$i $$$$i~; \ + $$(SED) "s,$(BASE_DIR),@BASE_DIR@,g" \ + -e "s:\(['= ]\)/usr:\\1@STAGING_DIR@/usr:g" \ + -e "s,@STAGING_DIR@,$(STAGING_DIR),g" \ + -e "s,@BASE_DIR@,$(BASE_DIR),g" \ + $$$$i; \ done endef endif diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 1b99c2a..af3675a 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -195,9 +195,12 @@ $(BUILD_DIR)/%/.stamp_staging_installed: $(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep)) $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ $(call MESSAGE,"Fixing package configuration files") ;\ - $(SED) "s,^\(exec_\)\?prefix=.*,\1prefix=$(STAGING_DIR)/usr,g" \ - -e "s,-I/usr/,-I$(STAGING_DIR)/usr/,g" \ - -e "s,-L/usr/,-L$(STAGING_DIR)/usr/,g" \ + $(SED) 's,$(BASE_DIR),@BASE_DIR@,g' \ + -e "s,^\(exec_\)\?prefix=.*,\1prefix=@STAGING_DIR@/usr,g" \ + -e "s,-I/usr/,-I@STAGING_DIR@/usr/,g" \ + -e "s,-L/usr/,-L@STAGING_DIR@/usr/,g" \ + -e 's,@STAGING_DIR@,$(STAGING_DIR),g' \ + -e 's,@BASE_DIR@,$(BASE_DIR),g' \ $(addprefix $(STAGING_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ;\ fi $(Q)touch $@ diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk index f3f6526..536c967 100644 --- a/package/pkgconf/pkgconf.mk +++ b/package/pkgconf/pkgconf.mk @@ -19,8 +19,10 @@ endef define HOST_PKGCONF_INSTALL_WRAPPER $(INSTALL) -m 0755 -D package/pkgconf/pkg-config.in \ $(HOST_DIR)/usr/bin/pkg-config - $(SED) 's,@PKG_CONFIG_LIBDIR@,$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig,' \ - -e 's,@STAGING_DIR@,$(STAGING_DIR),' \ + $(SED) 's,$(BASE_DIR),@BASE_DIR@,g' \ + -e 's,@PKG_CONFIG_LIBDIR@,@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig,' \ + -e 's,@STAGING_DIR@,$(STAGING_DIR),g' \