From patchwork Thu Dec 5 17:15:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Drake X-Patchwork-Id: 1204742 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=codethink.co.uk Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47TNGV4pslz9sP3 for ; Fri, 6 Dec 2019 04:37:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1CE738655C; Thu, 5 Dec 2019 17:37:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JuNBPe80AeGA; Thu, 5 Dec 2019 17:37:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8AE6C86914; Thu, 5 Dec 2019 17:37:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 1F2A71BF5AA for ; Thu, 5 Dec 2019 17:37:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0FCFA88C39 for ; Thu, 5 Dec 2019 17:37:51 +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 IK7qhxfflwZY for ; Thu, 5 Dec 2019 17:37:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from imap2.colo.codethink.co.uk (imap2.colo.codethink.co.uk [78.40.148.184]) by hemlock.osuosl.org (Postfix) with ESMTPS id 6D67388C5C for ; Thu, 5 Dec 2019 17:37:50 +0000 (UTC) Received: from [167.98.27.226] (helo=ts007-build.ts007.codethink.co.uk) by imap2.colo.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1icuix-0007Yj-GA; Thu, 05 Dec 2019 17:15:31 +0000 From: Michael Drake To: buildroot@busybox.net Date: Thu, 5 Dec 2019 17:15:05 +0000 Message-Id: <20191205171517.96639-19-michael.drake@codethink.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191205171517.96639-1-michael.drake@codethink.co.uk> References: <20191205171517.96639-1-michael.drake@codethink.co.uk> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v1 18/30] package/libvpx: Add host package. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Drake , Thomas Preston Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Michael Drake Signed-off-by: Thomas Preston --- package/libvpx/libvpx.mk | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/package/libvpx/libvpx.mk b/package/libvpx/libvpx.mk index aaef708416..c8debf27d5 100644 --- a/package/libvpx/libvpx.mk +++ b/package/libvpx/libvpx.mk @@ -15,11 +15,16 @@ LIBVPX_CONF_ENV = \ LD="$(TARGET_CC)" \ CROSS=$(GNU_TARGET_NAME) +HOST_LIBVPX_CONF_ENV = \ + LD="$(HOST_CC)" + LIBVPX_CONF_OPTS = \ --disable-examples \ --disable-docs \ --disable-unit-tests +HOST_LIBVPX_CONF_OPTS = $(LIBVPX_CONF_OPTS) + # This is not a true autotools package. It is based on the ffmpeg build system define LIBVPX_CONFIGURE_CMDS (cd $(LIBVPX_SRCDIR) && rm -rf config.cache && \ @@ -35,10 +40,29 @@ define LIBVPX_CONFIGURE_CMDS ) endef +define HOST_LIBVPX_CONFIGURE_CMDS + (cd $(HOST_LIBVPX_SRCDIR) && rm -rf config.cache && \ + $(HOST_CONFIGURE_OPTS) \ + $(HOST_CONFIGURE_ARGS) \ + $(HOST_LIBVPX_CONF_ENV) \ + ./configure \ + --target=generic-gnu \ + --enable-pic \ + --prefix="$(HOST_DIR)" \ + --enable-shared --disable-static \ + --disable-debug \ + $(HOST_LIBVPX_CONF_OPTS) \ + ) +endef + define LIBVPX_BUILD_CMDS $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) -C $(@D) all endef +define HOST_LIBVPX_BUILD_CMDS + $(HOST_MAKE_ENV) $(HOST_LIBVPX_MAKE_ENV) $(MAKE) -C $(@D) all +endef + define LIBVPX_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install endef @@ -47,4 +71,9 @@ define LIBVPX_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install endef +define HOST_LIBVPX_INSTALL_CMDS + $(HOST_MAKE_ENV) $(HOST_LIBVPX_MAKE_ENV) $(MAKE) -C $(@D) install +endef + $(eval $(generic-package)) +$(eval $(host-generic-package))