From patchwork Tue Sep 15 22:30:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Perez de Castro X-Patchwork-Id: 1364701 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.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.a=rsa-sha256 header.s=20170329 header.b=OxcA5Rqw; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrdJ74MVjz9sTN for ; Wed, 16 Sep 2020 08:31:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 52BBA2309D; Tue, 15 Sep 2020 22:31:49 +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 PQ8UTvogJcIn; Tue, 15 Sep 2020 22:31:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 1297F22E6E; Tue, 15 Sep 2020 22:31:23 +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 6816D1BF57C for ; Tue, 15 Sep 2020 22:31:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 651E286FE5 for ; Tue, 15 Sep 2020 22:31:17 +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 R2MJCFPufTgr for ; Tue, 15 Sep 2020 22:31:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fanzine.igalia.com (fanzine.igalia.com [178.60.130.6]) by hemlock.osuosl.org (Postfix) with ESMTPS id BDF7B86F88 for ; Tue, 15 Sep 2020 22:31:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=pByQZYOEn1AAevxtGMqdanJPMstxRkZ3y5auCzB4Inc=; b=OxcA5RqwsIJyHaV3kS5EY41lLOJbiJ/fV+wJWjFDKnJ+udELh8lm++AS6NOUYrQHC/onZ0KTI/TtNY2/JHWPUbPKFIJconellu8C8k792DKcCp62VTDfwOWWKIygdEzicpYnYnK64FcanlwhubN7JNkimYzxTfPjCgjWAWFWgnLlYzwa3NKvkUCEhxe5c5VlMAhYkv3xiaZNQKE2GhfOxcWmnYIjTfjmvOUGPmIGTxNKf3SYy8/Co16p77KuSTH7lCggdWcslE7as7vwbm7vGuO3o9vzgDMpyGIsRRYScXPpkPtYDepzB8IcOpeHCa0OYwB6C8DAPDTckBOsd9UfZA==; Received: from 82-181-217-9.bb.dnainternet.fi ([82.181.217.9] helo=kodama) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1kIJTk-0002l4-5y; Wed, 16 Sep 2020 00:31:12 +0200 Received: from localhost (kodama [local]) by kodama (OpenSMTPD) with ESMTPA id daeabd34; Tue, 15 Sep 2020 22:30:53 +0000 (UTC) From: Adrian Perez de Castro To: buildroot@buildroot.org Date: Wed, 16 Sep 2020 01:30:49 +0300 Message-Id: <20200915223053.3090447-3-aperez@igalia.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915223053.3090447-1-aperez@igalia.com> References: <20200915223053.3090447-1-aperez@igalia.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/6] package/libwpe: switch over to Meson 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: Adrian Perez de Castro Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The CMake based build system will be eventually removed by upstream so it seems like a good idea to switch over to Meson already before that happens. Signed-off-by: Adrian Perez de Castro --- ...ial-dependency-to-pass-EGL-module-fl.patch | 45 +++++++++++++++++++ package/libwpe/libwpe.mk | 7 ++- 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 package/libwpe/0001-meson-Use-a-partial-dependency-to-pass-EGL-module-fl.patch diff --git a/package/libwpe/0001-meson-Use-a-partial-dependency-to-pass-EGL-module-fl.patch b/package/libwpe/0001-meson-Use-a-partial-dependency-to-pass-EGL-module-fl.patch new file mode 100644 index 0000000000..e74ebe125e --- /dev/null +++ b/package/libwpe/0001-meson-Use-a-partial-dependency-to-pass-EGL-module-fl.patch @@ -0,0 +1,45 @@ +From 81bfedfa02fd864f3e4b295091d49c3eb20bb372 Mon Sep 17 00:00:00 2001 +From: Adrian Perez de Castro +Date: Wed, 16 Sep 2020 00:01:37 +0300 +Subject: [PATCH] meson: Use a partial dependency to pass EGL module flags + +Make Meson try to always find an "egl" dependency, if found extract +the include directories and compiler flags from ir using a partial +dependency, otherwise check that at least EGL/eglplatform.h is +available when the pkg-config module is not found. + +Fixes #70 + +Signed-off-by: Adrian Perez de Castro +[Upstrem status: https://github.com/WebPlatformForEmbedded/libwpe/pull/71] + +--- + meson.build | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 5c88aed..a05f4ab 100644 +--- a/meson.build ++++ b/meson.build +@@ -57,8 +57,16 @@ dependencies = [ + ] + + cc = meson.get_compiler('c') +-if not cc.has_header('EGL/eglplatform.h') +- dependencies += dependency('egl') ++egl_dep = dependency('egl', required: false) ++if egl_dep.found() ++ dependencies += egl_dep.partial_dependency( ++ compile_args: true, ++ includes: true, ++ ) ++else ++ assert(cc.has_header('EGL/eglplatform.h'), ++ 'Required heaer not found' ++ ) + endif + + if not cc.has_function('dlopen') +-- +2.28.0 + diff --git a/package/libwpe/libwpe.mk b/package/libwpe/libwpe.mk index 6c3a1d354a..369ef5824a 100644 --- a/package/libwpe/libwpe.mk +++ b/package/libwpe/libwpe.mk @@ -14,9 +14,8 @@ LIBWPE_DEPENDENCIES = libegl libxkbcommon # Workaround for https://github.com/raspberrypi/userland/issues/316 ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) -LIBWPE_CONF_OPTS += \ - -DCMAKE_C_FLAGS='$(TARGET_CFLAGS) -D_GNU_SOURCE' \ - -DCMAKE_CXX_FLAGS='$(TARGET_CFLAGS) -D_GNU_SOURCE' +LIBWPE_CFLAGS += -D_GNU_SOURCE +LIBWPE_CXXFLAGS += -D_GNU_SOURCE endif -$(eval $(cmake-package)) +$(eval $(meson-package))