From patchwork Wed Sep 4 23:09:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clayton Shotwell X-Patchwork-Id: 272758 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id F339B2C00E0 for ; Thu, 5 Sep 2013 09:11:31 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6DCCB328E1; Wed, 4 Sep 2013 23:11:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gyFoIYjzSi6w; Wed, 4 Sep 2013 23:11:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id F126931E9C; Wed, 4 Sep 2013 23:10:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 52DEF1C1EF4 for ; Wed, 4 Sep 2013 23:10:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4D6238C70F for ; Wed, 4 Sep 2013 23:10:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kJXJUmAe8evn for ; Wed, 4 Sep 2013 23:10:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from secvs02.rockwellcollins.com (secvs02.rockwellcollins.com [205.175.225.241]) by whitealder.osuosl.org (Postfix) with ESMTPS id 220108C64A for ; Wed, 4 Sep 2013 23:10:24 +0000 (UTC) Received: from nosuchhost.198.131.in-addr.arpa (HELO collinscrsmtp01.rockwellcollins.com) ([131.198.63.132]) by mail-virt.rockwellcollins.com with ESMTP; 04 Sep 2013 18:10:20 -0500 Received: from nyx ([131.198.63.11]) by collinscrsmtp01.rockwellcollins.com (Lotus Domino Release 8.5.2FP2 HF162) with ESMTP id 2013090418101974-1724724 ; Wed, 4 Sep 2013 18:10:19 -0500 From: Clayton Shotwell To: buildroot@busybox.net Date: Wed, 4 Sep 2013 18:09:51 -0500 Message-Id: <1378336196-27403-13-git-send-email-clshotwe@rockwellcollins.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1378336196-27403-1-git-send-email-clshotwe@rockwellcollins.com> References: <1378336196-27403-1-git-send-email-clshotwe@rockwellcollins.com> X-MIMETrack: Itemize by SMTP Server on CollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release 8.5.2FP2 HF162|May 16, 2011) at 09/04/2013 06:10:19 PM, Serialize by Router on CollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release 8.5.2FP2 HF162|May 16, 2011) at 09/04/2013 06:10:20 PM, Serialize complete at 09/04/2013 06:10:20 PM X-TNEFEvaluated: 1 Cc: Clayton Shotwell Subject: [Buildroot] [PATCH 12/17] python-pyparsing: Add host build option 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Clayton Shotwell --- package/python-pyparsing/python-pyparsing.mk | 47 ++++++++++++++++++------- 1 files changed, 34 insertions(+), 13 deletions(-) diff --git a/package/python-pyparsing/python-pyparsing.mk b/package/python-pyparsing/python-pyparsing.mk index 7814ce3..b6ba40d 100644 --- a/package/python-pyparsing/python-pyparsing.mk +++ b/package/python-pyparsing/python-pyparsing.mk @@ -14,25 +14,46 @@ PYTHON_PYPARSING_DEPENDENCIES = python # Shamelessly vampirised from python-pygame ;-) define PYTHON_PYPARSING_BUILD_CMDS - (cd $(@D); \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDSHARED="$(TARGET_CROSS)gcc -shared" \ - CROSS_COMPILING=yes \ - _python_sysroot=$(STAGING_DIR) \ - _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ - _python_prefix=/usr \ - _python_exec_prefix=/usr \ - $(HOST_DIR)/usr/bin/python setup.py build \ + (cd $(@D); \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDSHARED="$(TARGET_CROSS)gcc -shared" \ + CROSS_COMPILING=yes \ + _python_sysroot=$(STAGING_DIR) \ + _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr \ + $(HOST_DIR)/usr/bin/python setup.py build \ ) endef # Shamelessly vampirised from python-pygame ;-) define PYTHON_PYPARSING_INSTALL_TARGET_CMDS - (cd $(@D); \ - $(HOST_DIR)/usr/bin/python setup.py install \ - --prefix=$(TARGET_DIR)/usr \ + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python setup.py install \ + --prefix=$(TARGET_DIR)/usr \ + ) +endef + +HOST_PYTHON_PYPARSING_DEPENDENCIES = host-python + +define HOST_PYTHON_PYPARSING_BUILD_CMDS + (cd $(@D); \ + _python_sysroot=$(HOST_DIR) \ + _python_srcdir=$(BUILD_DIR)/host-python$(PYTHON_VERSION) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr \ + $(HOST_DIR)/usr/bin/python setup.py build \ + ) +endef + +define HOST_PYTHON_PYPARSING_INSTALL_CMDS + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python setup.py install \ + --prefix=$(HOST_DIR)/usr \ ) endef $(eval $(generic-package)) +$(eval $(host-generic-package)) +