From patchwork Sat Dec 15 23:35:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1014013 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ozpowBbu"; 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 43HP1x5XQDz9s47 for ; Sun, 16 Dec 2018 10:36:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BCDB123805; Sat, 15 Dec 2018 23:36:17 +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 bdz6snBKe1cu; Sat, 15 Dec 2018 23:36:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0B39A2279B; Sat, 15 Dec 2018 23:36:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0BA6D1BF3B9 for ; Sat, 15 Dec 2018 23:36:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 088C784E4E for ; Sat, 15 Dec 2018 23:36:15 +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 OEVIeQWZOwf2 for ; Sat, 15 Dec 2018 23:36:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id 484B284D59 for ; Sat, 15 Dec 2018 23:36:14 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id l3so7303183ioc.10 for ; Sat, 15 Dec 2018 15:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RuEoNxSvwWvHYEe5OQAQJ78Ca41+XA7XLmXK21qEpnE=; b=ozpowBbu0AJhu37S8cGe9Q4BW/HQ8qYKvqy/SGAnaht9EHzBnKcAeP+N3UQ5+4tezO sV3jy6xJjIVSVyIyd8z+H4yPx4YV57TS0lyEWJdmVjkSHEwDqNskgU2D0M5pyT/ong1d KqdhDSwHtVtQJ/9toYE7fuHty/H26S4m0gYwtbwMDXa9quf1fP4YweEloMQGj0xKw2me df2HSVJKivfX67zBpNyNy385fqeJZZZupmI8D122XgKKJRZN30rEASJ/z4tVyWdLNGWR Lau9avShZ8dVkeJUg31Iyj+naZlXlgD6KEfW7+fCxgus2NuNYJIXEnuYixnOAwrqdQQL QFHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RuEoNxSvwWvHYEe5OQAQJ78Ca41+XA7XLmXK21qEpnE=; b=frpIcWyOJwh6Hg++So53nmo7LLgJlrCCJhAcMhe2VxLUEwqSvKJ1NB7d4C8aV/XKXC pe1oyTFjqfM1RNtysFljTZf6lPxYoK3N/D5gyqpsu3kARM0NOfjArGoYcZBiHFFdcYkn 3LM3RRQt3SEGv41Lnz01Z9eiUld3X6TDsoaq4DADqY4Oq/JFjG4HPyqrLv4B2V8w4qEi sgDjr+aITPkNxc8VeGcdGmj3u/Ozduqjmz35jPsJGrUbqI+3YtCSvb8BrZoYskGAwLOq nOX2EvsqbQ5gK5tMiIeroeaSzRw54/qvQN/tJSnDU7unQXnlPyb7Q1pw1/qP3v5EwIBP XtEA== X-Gm-Message-State: AA+aEWY8Tbs4XFBuUpa5ziU/2csjZnbZb5hbEarpQz9TEYvvhCcBeL0F FJg3I4Fcpi8pUex9b/CZcYsPwpeT24s= X-Google-Smtp-Source: AFSGD/WSP/665O1H2gj4tybpbrs9alnErgmFlS6NrK+WrQq6k0FREzLd4OQO2rOHD8wAqbuz9I6F8A== X-Received: by 2002:a5d:9b9a:: with SMTP id r26mr7002476iom.232.1544916973267; Sat, 15 Dec 2018 15:36:13 -0800 (PST) Received: from localhost.localdomain (68-188-149-81.dhcp.aldl.mi.charter.com. [68.188.149.81]) by smtp.gmail.com with ESMTPSA id r139sm4167098ior.53.2018.12.15.15.36.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Dec 2018 15:36:12 -0800 (PST) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Sat, 15 Dec 2018 18:35:52 -0500 Message-Id: <20181215233555.98482-1-aduskett@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v9 1/4] binutils: install libiberty for host build. 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: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett Add --enable-install-libiberty to HOST_BINUTILS_CONF_OPTS to allow prelink-cross to build properly. Signed-off-by: Adam Duskett --- Changes v1 -> v7: - Add patch to series. Changes v7 -> v9: - None package/binutils/binutils.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk index 4531b8d9c8..388e2192b4 100644 --- a/package/binutils/binutils.mk +++ b/package/binutils/binutils.mk @@ -84,6 +84,7 @@ HOST_BINUTILS_CONF_OPTS = \ --target=$(GNU_TARGET_NAME) \ --disable-shared \ --enable-static \ + --enable-install-libiberty \ --with-sysroot=$(STAGING_DIR) \ --enable-poison-system-directories \ $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ From patchwork Sat Dec 15 23:35:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1014015 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KBJrCQ6g"; 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 43HP245J9Jz9s5c for ; Sun, 16 Dec 2018 10:36:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6A43B252AB; Sat, 15 Dec 2018 23:36:25 +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 MGeSLbm6mZqF; Sat, 15 Dec 2018 23:36:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id BDD8623A3A; Sat, 15 Dec 2018 23:36:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id E3ADC1BF3B9 for ; Sat, 15 Dec 2018 23:36:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E0F198566F for ; Sat, 15 Dec 2018 23:36:15 +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 MyaU7OKMqYwl for ; Sat, 15 Dec 2018 23:36:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 41D4B855EF for ; Sat, 15 Dec 2018 23:36:15 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id m19so7346425ioh.3 for ; Sat, 15 Dec 2018 15:36:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OPEq38IqY3EUnj6H55Dn100+51WKFMSiz48HWFFV8K8=; b=KBJrCQ6gv6g6ke9Av87c1E0TDWUhKqwkMqbBZEUP/fI+zyBwSNy1A2XSfQk2hrPWgT fXtnrWNUROzZbO9st87qs0ZApnNBAREYkxsMU2SdlKTuDUfUZnrZCBm/kQt/a6ptugJG tmytv0XobQVXtGFZYX8a91WV+xUkjBFmE2YOoCVypSjksc5A37C8Cojr2wXdfBcgLhP6 Ia1RDTfT1vMBW7ekz154/DFPnMixUfMTmJM2EMQIrNmk0S8u45NZ+4S3upS4G2mn2i3U x1gR8SxyaxdeRX/B6aJyRKqL9wSkmPKxCbhhzNlLfiw4vak9fBI2MCWsXfBFo/7VDnsV gUEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OPEq38IqY3EUnj6H55Dn100+51WKFMSiz48HWFFV8K8=; b=fhBxVHQkGE6Xm+1dK/tYu+AOG7LjT+c7JZ7ez9ztfYFrHd/xPR0zbQx5sLzJ7s/6K5 WwTML7A9141MKCWYzdl+5lKO5pXusl/d4gqGITeGymIgMZcFwK8LYvN9Pm9jSghwmkGC L9MHsySC4gvqwZznFvgPCcPAdlAtnBTJ4xaEpHMN4pMlofy2zyt+ME4KYohxOjjOsrac Jt5o61C/xLVy+PAAKsZx+QK95Eoyp1E1NZUpqNZ99xVotl2fPiaRW8Q3aXv1ReP6D74z 4UUNvZ76y+RHLQIQv2KLxSSjjYCaye8pmuZ9nSmallicyCKcRJ6DX3jgyMkTsRTntlma Tnkg== X-Gm-Message-State: AA+aEWYnSNxMjPzuQ/7CbxyFLeEUJzjndeSATzEH2zngTwsGp1fa8yDb v2rYzOmz0f08z64T/I0XHq6HJxM89ys= X-Google-Smtp-Source: AFSGD/V8/SgQOOnKbnR1Q72flljLtUal6xMoJtPAOF3IEz4wlzrOym7IIOp0/Q0C61aqMZSuPrFVxQ== X-Received: by 2002:a5e:8348:: with SMTP id y8mr7312556iom.298.1544916974231; Sat, 15 Dec 2018 15:36:14 -0800 (PST) Received: from localhost.localdomain (68-188-149-81.dhcp.aldl.mi.charter.com. [68.188.149.81]) by smtp.gmail.com with ESMTPSA id r139sm4167098ior.53.2018.12.15.15.36.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Dec 2018 15:36:13 -0800 (PST) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Sat, 15 Dec 2018 18:35:53 -0500 Message-Id: <20181215233555.98482-2-aduskett@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181215233555.98482-1-aduskett@gmail.com> References: <20181215233555.98482-1-aduskett@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v9 2/4] prelink-cross: new 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: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett Prelink-cross emulates a runtime linker for a given sysroot. This is necessary to allow gobject-introspection to build it's typelib files during cross-compiling. Signed-off-by: Adam Duskett --- Changes v1 -> v7: - Add patch to series. Changes v7 -> v8: - None Changes v8 -> v9: - Add the package to the DEVELOPERS file under my name. - Bump version to a853a5d715d84eec93aa68e8f2df26b7d860f5b2 - Add host-elfutils as a dependency. DEVELOPERS | 1 + package/Config.in.host | 1 + package/prelink-cross/Config.in.host | 9 +++++++++ package/prelink-cross/prelink-cross.hash | 3 +++ package/prelink-cross/prelink-cross.mk | 15 +++++++++++++++ 5 files changed, 29 insertions(+) create mode 100644 package/prelink-cross/Config.in.host create mode 100644 package/prelink-cross/prelink-cross.hash create mode 100644 package/prelink-cross/prelink-cross.mk diff --git a/DEVELOPERS b/DEVELOPERS index 4192681bf8..5bbb458151 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -51,6 +51,7 @@ F: package/libsemanage/ F: package/libsepol/ F: package/nginx-naxsi/ F: package/policycoreutils/ +F: package/prelink-cross/ F: package/python-flask-sqlalchemy/ F: package/python-mutagen/ F: package/python-pip/ diff --git a/package/Config.in.host b/package/Config.in.host index 16b474fc9d..f7384af979 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -44,6 +44,7 @@ menu "Host utilities" source "package/parted/Config.in.host" source "package/patchelf/Config.in.host" source "package/pkgconf/Config.in.host" + source "package/prelink-cross/Config.in.host" source "package/pru-software-support/Config.in.host" source "package/pwgen/Config.in.host" source "package/python-cython/Config.in.host" diff --git a/package/prelink-cross/Config.in.host b/package/prelink-cross/Config.in.host new file mode 100644 index 0000000000..0c54f6a8c4 --- /dev/null +++ b/package/prelink-cross/Config.in.host @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_PRELINK_CROSS + bool "host prelink-cross" + help + The prelink package contains a utility which modifies + ELF shared libraries and executables, so that far fewer + relocations need to be resolved at runtime and thus + programs come up faster. + + https://wiki.yoctoproject.org/wiki/Cross-Prelink diff --git a/package/prelink-cross/prelink-cross.hash b/package/prelink-cross/prelink-cross.hash new file mode 100644 index 0000000000..3ac33ac3d0 --- /dev/null +++ b/package/prelink-cross/prelink-cross.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 cb3f5d833cd74b7e90e38465c9c948b0f4138c017509cb91e391b0931063429e prelink-cross-a853a5d715d84eec93aa68e8f2df26b7d860f5b2.tar.gz +sha256 b8a2f73f743dc1a51aff23f1aacbca4b868564db52496fa3c0caba755bfd1eaf COPYING diff --git a/package/prelink-cross/prelink-cross.mk b/package/prelink-cross/prelink-cross.mk new file mode 100644 index 0000000000..ab7a967f95 --- /dev/null +++ b/package/prelink-cross/prelink-cross.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# host-prelink-cross +# +################################################################################ + +HOST_PRELINK_CROSS_VERSION = a853a5d715d84eec93aa68e8f2df26b7d860f5b2 +HOST_PRELINK_CROSS_SITE = git://git.yoctoproject.org/prelink-cross +HOST_PRELINK_CROSS_SITE_METHOD = git +HOST_PRELINK_CROSS_LICENSE = GPL-2.0 +HOST_PRELINK_CROSS_LICENSE_FILES = COPYING +HOST_PRELINK_CROSS_AUTORECONF = YES +HOST_PRELINK_CROSS_DEPENDENCIES = host-binutils host-elfutils + +$(eval $(host-autotools-package)) From patchwork Sat Dec 15 23:35:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1014016 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S6W3i8/t"; 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 43HP2N34jJz9s5c for ; Sun, 16 Dec 2018 10:36:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CF5EB2288E; Sat, 15 Dec 2018 23:36:42 +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 5AWMK5rTaJTa; Sat, 15 Dec 2018 23:36:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 34D3B25081; Sat, 15 Dec 2018 23:36:21 +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 BC14C1BF3B9 for ; Sat, 15 Dec 2018 23:36:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id AFABF87994 for ; Sat, 15 Dec 2018 23:36:19 +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 Ky56zFp9XjHk for ; Sat, 15 Dec 2018 23:36:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by hemlock.osuosl.org (Postfix) with ESMTPS id 3F7B187A14 for ; Sat, 15 Dec 2018 23:36:17 +0000 (UTC) Received: by mail-io1-f42.google.com with SMTP id w21so7363003ioc.1 for ; Sat, 15 Dec 2018 15:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/zWesIET4NBozY6jXur/AJJ3YvGNk6ved78ICactFxc=; b=S6W3i8/tG1TezSmJGjHYlq4jH1Lj0IiUiKcJLBGn07BLProx6pIyihcLDJC9z3T2D9 XXj0J49DutfMWzv/GjLTZynZ8Tdvzux7j2mZLP3KljaU4yJI13CpSsmZrXYIRVjWUtOB 1aaXxCWvQEvh5FiE+tOsAKpwHiYbWOrwygoMemQfUNjjW47kaG+L7PejKBTwUy9v4XxL qWj7zg3cFJL49D95EeoqshLjamqoTeVA5XMrvf78EtRsOF+7/5PM6kQh1+fYdOJgmcLL lLvUQ5npU+wjShEYQcr3CejJz4nJShW6MwZuV4GI/V4YrQm+7E/gE56mme2je+N0NtT5 vRjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/zWesIET4NBozY6jXur/AJJ3YvGNk6ved78ICactFxc=; b=UjLQsaBihbDOSWQqq8OJxPEmXvwsZwj32LjBJzD97y+gkaOyudDsKgIlq8RpQXyu0d YfPBe1GLAIpMb0Pavuldkm2mou+SwFsMohMZHH1XSbL6f18Uj/AjIujwAWBLslVIitHa V8E4xmUDrRyEz5B+mlrCwo+XhxcJjTRxKDsAC4cYR31KqMmApM7CowPf7CXAjBkNY8xk YBxevcvpPN+bYEUdSvpQQkCyrdvBQDctuXvsvj350Im54/Vu4LsFa7xliahtRfFfJpVB kkHvtuQ62Sp9vxWYa7USZJp5EAkULewZmWj0g+46dE0UP8T6h3+IpSv5Rsp1OCQXZUJM ZzjQ== X-Gm-Message-State: AA+aEWbl/WekRsoyeTb0qv6GoKlmC1hqgR+5sn27tGILIl62rJwpHqcS E8DXkMrG+u0Ij99uuVqXt+42FHXiORo= X-Google-Smtp-Source: AFSGD/VUiDrDUyckgOFznHyTN248CsWEbNEeA2i00ls/f0IAPC8rvDc+InnzQr+7yP4lsAH9ZpaS4w== X-Received: by 2002:a6b:c948:: with SMTP id z69mr7554084iof.161.1544916975625; Sat, 15 Dec 2018 15:36:15 -0800 (PST) Received: from localhost.localdomain (68-188-149-81.dhcp.aldl.mi.charter.com. [68.188.149.81]) by smtp.gmail.com with ESMTPSA id r139sm4167098ior.53.2018.12.15.15.36.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Dec 2018 15:36:14 -0800 (PST) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Sat, 15 Dec 2018 18:35:54 -0500 Message-Id: <20181215233555.98482-3-aduskett@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181215233555.98482-1-aduskett@gmail.com> References: <20181215233555.98482-1-aduskett@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v9 3/4] gobject-introspection: new 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: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett GObject introspection is a middleware layer between C libraries (using GObject) and language bindings. The C library can be scanned at compile time and generate a metadata file, in addition to the actual native C library. Then at runtime, language bindings can read this metadata and automatically provide bindings to call into the C library. There's an XML format called GIR used by GObject-Introspection. The purpose of it is to provide a standard structure to access the complete available API that a library or other unit of code exports. It is meant to be language agnostic using namespaces to separate core, language or library specific functionality. Cross-compiling gobject-introspection is not an easy task. The main issue is that in the process of creating the XML files, gobject-introspection must first run and scan the binary, which, if the binary is cross-compiled, would not typically be possible from the host system. Because of this limitation, several wrappers are used to call instead first out qemu which will then run the native scanner to create the binaries. There are seven total patches and four different wrapper files needed to successfully cross-compile and run this package, many of them are from open-embedded, but two of them are of my own doing. 1) Revert a previous, incomplete attempt at adding cross-compiling support. 2) Add support for the various wrappers. (See patch for details.) 3) Add an option to use a binary wrapper; this patch will force giscanner to use a wrapper executable to run binaries it's producing, instead of attempting to run them from the host. 4) Add an option to use an LDD wrapper, again, useful for cross-compiled environments. 5) Overwrite python includes during the initial configure stage. 6) Add a --lib-dirs-envar option to pass to giscanner. (See patch for details.) 7) Add rpath-links to ccompiler: when passing the PACKAGE_GIR_EXTRA_LIBS_PATH to the ccompiler.py script, ccompiler.py needs to add -Wl,-rpath-link to the environment for the package to correctly link against the passed on paths. Signed-off-by: Adam Duskett --- Changes v1 -> v2: - Fixed wrappers - Added 0007-giscanner-add-a-lib-dirs-envvar-option.patch - Added 0008-add-Float128.patch Changes v2 -> v3: - Removed Linux kernel dependency (baruch) - Changed $(LINUX_VERSION) to $(BR2_TOOLCHAIN_HEADERS_AT_LEAST) (baruch) - Changed @LINUX_VERSION@ in g-ir-scanner-qemuwrapper.in to @TOOLCHAIN_HEADERS_VERSION@ to match the above variable change. - Added BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS_TARGET in Config.in with only BR2_arm selected for now. - Removed BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS in favor of the above change. - Added two new lines in the base Makefile which removes any remaining .gir or .rnc files from the target filing system, as these are not needed for runtime, only compile time. Changes v3 -> v4: - Removed RFC tag. - Added 0007-Add-rpath-links-to-ccompiler.patch - Removed config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch as it is not Yocto specific. - Added the _GIR_EXTRA_LIBS_PATH to pkg-autotools.mk. This allows package specific Gir libraries to be passed on to g-ir-scanner-qemuwrapper. - Fixed a typo in g-ir-scanner-qemuwrapper.in. - Remove BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS_TARGET in favor of BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS Changes v4 -> v5: - Added a more detailed commit message (Yann) - Removed $HOST_DIR/bin/qemu-@HOST_QEMU_ARCH@ @HOST_QEMU_CPU_TUNE@ in favor of @QEMU_USER@ (Thanks Yann) Changes v5 -> v6: - Update gobject-introspection to 1.56.1 - Remove upstreamed 0008-add-Float128.patch Changes v6 -> v7: - Remove the cross-ldd script in favor of the prelink-cross package. - Install the ldd and qemu wrappers in a post patch hook seperate of the other wrappers. - Set --enable-introspection-data in the configure options. Changes v7 -> v8: - Add "select BR2_PACKAGE_HOST_PRELINK_CROSS" to Config.in Changes v8 -> v9: - Create the $(STAGING_DIR)/usr/lib/gio/modules-dummy directory in the GOBJECT_INTROSPECTION_POST_PATCH_HOOKS to prevent qemu from segfaulting when g-ir-scanner-qemuwrapper is ran. - Remove the $(STAGING_DIR) prefix from gobject-introspection-1.0.pc to prevent pkg-config from appending a second staging_dir to the path of the g-ir-compiler. This prevents packages such a gstreamer1 from trying to call $(STAGING_DIR)/$(STAGING_DIR)/usr/bin/g-ir-compiler, which will break the build. DEVELOPERS | 1 + Makefile | 2 + package/Config.in | 1 + ...lete-upstream-attempt-at-cross-compi.patch | 50 +++++ ...-host-gi-gi-cross-wrapper-gi-ldd-wra.patch | 203 ++++++++++++++++++ ...canner-add-use-binary-wrapper-option.patch | 52 +++++ ...scanner-add-a-use-ldd-wrapper-option.patch | 48 +++++ .../0005-add-PYTHON_INCLUDES-override.patch | 39 ++++ ...scanner-add-a-lib-dirs-envvar-option.patch | 73 +++++++ .../0007-Add-rpath-links-to-ccompiler.patch | 29 +++ package/gobject-introspection/Config.in | 31 +++ .../gobject-introspection/g-ir-compiler.in | 2 + .../g-ir-scanner-lddwrapper.in | 2 + .../g-ir-scanner-qemuwrapper.in | 10 + package/gobject-introspection/g-ir-scanner.in | 3 + .../gobject-introspection.hash | 4 + .../gobject-introspection.mk | 101 +++++++++ package/pkg-autotools.mk | 3 + 18 files changed, 654 insertions(+) create mode 100644 package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch create mode 100644 package/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch create mode 100644 package/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch create mode 100644 package/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch create mode 100644 package/gobject-introspection/0005-add-PYTHON_INCLUDES-override.patch create mode 100644 package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch create mode 100644 package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch create mode 100644 package/gobject-introspection/Config.in create mode 100644 package/gobject-introspection/g-ir-compiler.in create mode 100644 package/gobject-introspection/g-ir-scanner-lddwrapper.in create mode 100644 package/gobject-introspection/g-ir-scanner-qemuwrapper.in create mode 100644 package/gobject-introspection/g-ir-scanner.in create mode 100644 package/gobject-introspection/gobject-introspection.hash create mode 100644 package/gobject-introspection/gobject-introspection.mk diff --git a/DEVELOPERS b/DEVELOPERS index 5bbb458151..29ebce9cdc 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -34,6 +34,7 @@ F: package/audit/ F: package/busybox/ F: package/checkpolicy/ F: package/cppdb/ +F: package/gobject-introspection/ F: package/gstreamer1/gstreamer1/ F: package/gstreamer1/gstreamer1-mm/ F: package/gstreamer1/gst1-plugins-bad/ diff --git a/Makefile b/Makefile index c5b78b3274..7068bdb0ca 100644 --- a/Makefile +++ b/Makefile @@ -719,6 +719,8 @@ target-finalize: $(PACKAGES) host-finalize $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \ $(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f + find $(TARGET_DIR)/usr/share/ -name '*.gir' -print0 | xargs -0 rm -f + find $(TARGET_DIR)/usr/share/ -name '*.rnc' -print0 | xargs -0 rm -f find $(TARGET_DIR)/lib/ $(TARGET_DIR)/usr/lib/ $(TARGET_DIR)/usr/libexec/ \ \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f ifneq ($(BR2_PACKAGE_GDB),y) diff --git a/package/Config.in b/package/Config.in index bdc63f71f1..5b37d4ee37 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1639,6 +1639,7 @@ menu "Other" source "package/glibmm/Config.in" source "package/glm/Config.in" source "package/gmp/Config.in" + source "package/gobject-introspection/Config.in" source "package/gsl/Config.in" source "package/gtest/Config.in" source "package/jemalloc/Config.in" diff --git a/package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch b/package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch new file mode 100644 index 0000000000..ecc7565b7a --- /dev/null +++ b/package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch @@ -0,0 +1,50 @@ +From 3a9d1e5ee0aae56fafec0beba2014c19e4ff310c Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 23 Mar 2016 17:07:28 +0200 +Subject: [PATCH] Revert an incomplete upstream attempt at cross-compile support + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +Signed-off-by: Adam Duskett +--- + common.mk | 4 ---- + giscanner/gdumpparser.py | 6 ------ + 2 files changed, 10 deletions(-) + +diff --git a/common.mk b/common.mk +index b778f7a..e26c637 100644 +--- a/common.mk ++++ b/common.mk +@@ -24,12 +24,8 @@ INTROSPECTION_SCANNER_ARGS = \ + --add-include-path=$(top_builddir) \ + --add-include-path=$(top_builddir)/gir + +-# GI_CROSS_LAUNCHER is the command to use for executing g-ir-compiler. +-# Normally will be undefined but can be set (e.g. to wine or qemu) +-# when cross-compiling + INTROSPECTION_COMPILER = \ + env PATH=".libs:$(PATH)" \ +- $(GI_CROSS_LAUNCHER) \ + $(top_builddir)/g-ir-compiler$(EXEEXT) + + INTROSPECTION_COMPILER_ARGS = \ +diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py +index 1134f33..9bdc2bc 100644 +--- a/giscanner/gdumpparser.py ++++ b/giscanner/gdumpparser.py +@@ -162,12 +162,6 @@ blob containing data gleaned from GObject's primitive introspection.""" + out_path = os.path.join(self._binary.tmpdir, 'dump.xml') + + args = [] +- +- # Prepend the launcher command and arguments, if defined +- launcher = os.environ.get('GI_CROSS_LAUNCHER') +- if launcher: +- args.extend(launcher.split()) +- + args.extend(self._binary.args) + args.append('--introspect-dump=%s,%s' % (in_path, out_path)) + +-- +2.7.0 + diff --git a/package/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch b/package/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch new file mode 100644 index 0000000000..80837abc44 --- /dev/null +++ b/package/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch @@ -0,0 +1,203 @@ +From b1503fe2693d602b3e24e4b832dc0934960d5d22 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 19 Oct 2015 18:29:21 +0300 +Subject: [PATCH] configure.ac: add host-gi, gi-cross-wrapper, gi-ldd-wrapper and introspection-data options + +With the first option, gobject-introspection tools (g-ir-doc-tool and g-ir-scanner) +that are already installed in the host system will be used for building the source tree. + +With the second option, g-ir-scanner will be instructed to use an executable +wrapper to run binaries it's producing, and g-ir-compiler will be run +through the same wrapper (host system's g-ir-compiler cannot be used because +it's producing architecture-specific output). + +With the third option, giscanner will be instructed to use a special ldd +command instead of system's ldd (which does not work when the binary to inspect +is compiled for a different architecture). + +With the fourth option, it is possible to disable building of introspection data +(.gir and .typelib files), which may be difficult or impossible in cross-compilation +environments, because of lack of emulation (or native hardware) for the target architecture +on which the target binaries can be run. + +These options are useful when cross-compiling for a different target architecture. + +Upstream-Status: Pending [review on oe-core list] +Signed-off-by: Alexander Kanavin +Signed-off-by: Adam Duskett +--- + Makefile.am | 2 ++ + common.mk | 39 +++++++++++++++++++++++++++++++++++++++ + configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++++ + tests/Makefile.am | 5 ++++- + 4 files changed, 87 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index b080a89..ce8d29b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -21,7 +21,9 @@ include Makefile-cmph.am + include Makefile-girepository.am + include Makefile-giscanner.am + include Makefile-examples.am ++if BUILD_INTROSPECTION_DATA + include Makefile-gir.am ++endif + include Makefile-tools.am + include Makefile-msvcproj.am + +diff --git a/common.mk b/common.mk +index e26c637..9f3a65f 100644 +--- a/common.mk ++++ b/common.mk +@@ -6,6 +6,15 @@ + # module itself. + # + ++if USE_HOST_GI ++INTROSPECTION_SCANNER = \ ++ env PATH="$(PATH)" \ ++ LPATH=.libs \ ++ CC="$(CC)" \ ++ PYTHONPATH=$(top_builddir):$(top_srcdir) \ ++ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ ++ g-ir-scanner ++else + INTROSPECTION_SCANNER = \ + env PATH=".libs:$(PATH)" \ + LPATH=.libs \ +@@ -14,9 +23,24 @@ INTROSPECTION_SCANNER = \ + UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \ + UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ + $(top_builddir)/g-ir-scanner ++endif ++ ++if USE_CROSS_WRAPPER ++CROSS_WRAPPER_ARG = --use-binary-wrapper=$(GI_CROSS_WRAPPER) ++else ++CROSS_WRAPPER_ARG = ++endif ++ ++if USE_LDD_WRAPPER ++LDD_WRAPPER_ARG = --use-ldd-wrapper=$(GI_LDD_WRAPPER) ++else ++LDD_WRAPPER_ARG = ++endif + + INTROSPECTION_SCANNER_ARGS = \ + --verbose \ ++ $(CROSS_WRAPPER_ARG) \ ++ $(LDD_WRAPPER_ARG) \ + -I$(top_srcdir) \ + --add-include-path=$(srcdir) \ + --add-include-path=$(top_srcdir)/gir \ +@@ -24,9 +48,15 @@ INTROSPECTION_SCANNER_ARGS = \ + --add-include-path=$(top_builddir) \ + --add-include-path=$(top_builddir)/gir + ++if USE_CROSS_WRAPPER ++INTROSPECTION_COMPILER = \ ++ env PATH=".libs:$(PATH)" \ ++ $(GI_CROSS_WRAPPER) $(top_builddir)/g-ir-compiler$(EXEEXT) ++else + INTROSPECTION_COMPILER = \ + env PATH=".libs:$(PATH)" \ + $(top_builddir)/g-ir-compiler$(EXEEXT) ++endif + + INTROSPECTION_COMPILER_ARGS = \ + --includedir=$(srcdir) \ +@@ -35,6 +65,14 @@ INTROSPECTION_COMPILER_ARGS = \ + --includedir=$(top_builddir) \ + --includedir=$(top_builddir)/gir + ++if USE_HOST_GI ++INTROSPECTION_DOCTOOL = \ ++ env PATH="$(PATH)" \ ++ LPATH=.libs \ ++ PYTHONPATH=$(top_builddir):$(top_srcdir) \ ++ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ ++ g-ir-doc-tool ++else + INTROSPECTION_DOCTOOL = \ + env PATH=".libs:$(PATH)" \ + LPATH=.libs \ +@@ -42,6 +80,7 @@ INTROSPECTION_DOCTOOL = \ + UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \ + UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \ + $(top_builddir)/g-ir-doc-tool ++endif + + INTROSPECTION_DOCTOOL_ARGS = \ + --add-include-path=$(srcdir) \ +diff --git a/configure.ac b/configure.ac +index 6c91fa5..21340a5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -367,6 +367,48 @@ dnl + AM_CONDITIONAL(MSVC_BASE_NO_TOOLSET_SET, [test x$MSVC_BASE_TOOLSET = x]) + AM_CONDITIONAL(MSVC_NO_TOOLSET_SET, [test x$MSVC_TOOLSET = x]) + ++AC_ARG_ENABLE([host-gi], ++[AS_HELP_STRING([--enable-host-gi],[Use gobject introspection tools installed in the host system (useful when cross-compiling)])], ++[case "${enableval}" in ++ yes) host_gi=true ;; ++ no) host_gi=false ;; ++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-host-gi]) ;; ++esac],[host_gi=false]) ++AM_CONDITIONAL([USE_HOST_GI], [test x$host_gi = xtrue]) ++ ++AC_ARG_ENABLE([gi-cross-wrapper], ++[AS_HELP_STRING([--enable-gi-cross-wrapper=path],[Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)])], ++[ ++GI_CROSS_WRAPPER="${enableval}" ++use_wrapper=true ++],[ ++GI_CROSS_WRAPPER="" ++use_wrapper=false ++]) ++AC_SUBST(GI_CROSS_WRAPPER) ++AM_CONDITIONAL([USE_CROSS_WRAPPER], [test x$use_wrapper = xtrue]) ++ ++AC_ARG_ENABLE([gi-ldd-wrapper], ++[AS_HELP_STRING([--enable-gi-ldd-wrapper=path],[Use a ldd wrapper instead of system's ldd command in giscanner (useful when cross-compiling)])], ++[ ++GI_LDD_WRAPPER="${enableval}" ++use_ldd_wrapper=true ++],[ ++GI_LDD_WRAPPER="" ++use_ldd_wrapper=false ++]) ++AC_SUBST(GI_LDD_WRAPPER) ++AM_CONDITIONAL([USE_LDD_WRAPPER], [test x$use_ldd_wrapper = xtrue]) ++ ++AC_ARG_ENABLE([introspection-data], ++[AS_HELP_STRING([--enable-introspection-data],[Build introspection data (.gir and .typelib files) in addition to library and tools])], ++[case "${enableval}" in ++ yes) introspection_data=true ;; ++ no) introspection_data=false ;; ++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-introspection-data]) ;; ++esac],[introspection_data=true]) ++AM_CONDITIONAL([BUILD_INTROSPECTION_DATA], [test x$introspection_data = xtrue]) ++ + AC_CONFIG_FILES([ + Makefile + tests/Makefile +diff --git a/tests/Makefile.am b/tests/Makefile.am +index bdd0fa7..75dd3c9 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -1,6 +1,9 @@ + include $(top_srcdir)/common.mk + +-SUBDIRS = . scanner repository offsets warn ++SUBDIRS = . scanner repository warn ++if BUILD_INTROSPECTION_DATA ++SUBDIRS += offsets ++endif + + EXTRA_DIST= + BUILT_SOURCES= +-- +2.7.0 + diff --git a/package/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch b/package/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch new file mode 100644 index 0000000000..0a8e6c032f --- /dev/null +++ b/package/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch @@ -0,0 +1,52 @@ +From 704b888d0abfb01067352c40156f49f655691c7c Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 19 Oct 2015 18:26:40 +0300 +Subject: [PATCH] giscanner: add --use-binary-wrapper option + +With this option, giscanner will use a wrapper executable to run +binaries it's producing, instead of running them directly. This +is useful when binaries are cross-compiled and cannot be run directly, +but they can be run using for example QEMU emulation. + +Upstream-Status: Pending [review on oe-core list] +Signed-off-by: Alexander Kanavin +Signed-off-by: Adam Duskett +--- + giscanner/scannermain.py | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py +index 633496f..d684cd0 100755 +--- a/giscanner/scannermain.py ++++ b/giscanner/scannermain.py +@@ -124,6 +124,9 @@ def _get_option_parser(): + parser.add_option("", "--program", + action="store", dest="program", default=None, + help="program to execute") ++ parser.add_option("", "--use-binary-wrapper", ++ action="store", dest="wrapper", default=None, ++ help="wrapper to use for running programs (useful when cross-compiling)") + parser.add_option("", "--program-arg", + action="append", dest="program_args", default=[], + help="extra arguments to program") +@@ -422,6 +425,17 @@ def create_binary(transformer, options, args): + gdump_parser.get_error_quark_functions()) + + shlibs = resolve_shlibs(options, binary, options.libraries) ++ if options.wrapper: ++ # The wrapper needs the binary itself, not the libtool wrapper script, ++ # so we check if libtool has sneaked the binary into .libs subdirectory ++ # and adjust the path accordingly ++ import os.path ++ dir_name, binary_name = os.path.split(binary.args[0]) ++ libtool_binary = os.path.join(dir_name, '.libs', binary_name) ++ if os.path.exists(libtool_binary): ++ binary.args[0] = libtool_binary ++ # Then prepend the wrapper to the command line to execute ++ binary.args = [options.wrapper] + binary.args + gdump_parser.set_introspection_binary(binary) + gdump_parser.parse() + return shlibs +-- +2.7.0 + diff --git a/package/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch b/package/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch new file mode 100644 index 0000000000..97880ef51d --- /dev/null +++ b/package/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch @@ -0,0 +1,48 @@ +From d4ad57fd4a32c4f0d2f0522a3090ef940746431b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 30 Oct 2015 16:28:46 +0200 +Subject: [PATCH] giscanner: add a --use-ldd-wrapper option + +This is useful in cross-compile environments where system's ldd +command does not work on binaries built for a different architecture + +Upstream-Status: Pending [review in oe-core] +Signed-off-by: Alexander Kanavin +Signed-off-by: Adam Duskett +--- + giscanner/scannermain.py | 3 +++ + giscanner/shlibs.py | 4 +++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py +index d684cd0..1b3b369 100755 +--- a/giscanner/scannermain.py ++++ b/giscanner/scannermain.py +@@ -127,6 +127,9 @@ def _get_option_parser(): + parser.add_option("", "--use-binary-wrapper", + action="store", dest="wrapper", default=None, + help="wrapper to use for running programs (useful when cross-compiling)") ++ parser.add_option("", "--use-ldd-wrapper", ++ action="store", dest="ldd_wrapper", default=None, ++ help="wrapper to use instead of ldd (useful when cross-compiling)") + parser.add_option("", "--program-arg", + action="append", dest="program_args", default=[], + help="extra arguments to program") +diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py +index c93d20c..c5b5942 100644 +--- a/giscanner/shlibs.py ++++ b/giscanner/shlibs.py +@@ -105,7 +105,9 @@ def _resolve_non_libtool(options, binary, libraries): + args.extend(libtool) + args.append('--mode=execute') + platform_system = platform.system() +- if platform_system == 'Darwin': ++ if options.ldd_wrapper: ++ args.extend([options.ldd_wrapper, binary.args[0]]) ++ elif platform_system == 'Darwin': + args.extend(['otool', '-L', binary.args[0]]) + else: + args.extend(['ldd', binary.args[0]]) +-- +2.7.0 + diff --git a/package/gobject-introspection/0005-add-PYTHON_INCLUDES-override.patch b/package/gobject-introspection/0005-add-PYTHON_INCLUDES-override.patch new file mode 100644 index 0000000000..21bcd9db94 --- /dev/null +++ b/package/gobject-introspection/0005-add-PYTHON_INCLUDES-override.patch @@ -0,0 +1,39 @@ +From 08ee7e704d3ebbb783e26768074a5969d6843204 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Wed, 18 Oct 2017 17:31:19 -0400 +Subject: [PATCH] add PYTHON_INCLUDES override + +As the configure script mixes up host/target python. Equivalent to the +similar code in dbus-python. + +Signed-off-by: Adam Duskett +--- + m4/python.m4 | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/m4/python.m4 b/m4/python.m4 +index ed5559d..9853263 100644 +--- a/m4/python.m4 ++++ b/m4/python.m4 +@@ -43,7 +43,17 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS], + [AC_REQUIRE([AM_PATH_PYTHON]) + AC_MSG_CHECKING(for headers required to compile python extensions) + dnl deduce PYTHON_INCLUDES +-PYTHON_INCLUDES=`$PYTHON-config --includes` ++if test "${PYTHON_INCLUDES+set}" = set; then ++ AC_MSG_NOTICE([PYTHON_INCLUDES overridden to: $PYTHON_INCLUDES]) ++else ++ if test -x "$PYTHON_CONFIG"; then ++ PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null` ++ else ++ PYTHON_INCLUDES=`$PYTHON -c "import distutils.sysconfig, sys; sys.stdout.write(distutils.sysconfig.get_python_inc(True))"` ++ PYTHON_INCLUDES="-I$PYTHON_INCLUDES" ++ fi ++fi ++ + AC_SUBST(PYTHON_INCLUDES) + dnl check if the headers exist: + save_CPPFLAGS="$CPPFLAGS" +-- +2.13.6 + diff --git a/package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch b/package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch new file mode 100644 index 0000000000..053219188b --- /dev/null +++ b/package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch @@ -0,0 +1,73 @@ +From 3a9b3d8179b7eb9d2cc93da31578945bc03a45c3 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 27 Apr 2018 12:56:15 -0400 +Subject: [PATCH] giscanner: add a --lib-dirs-envvar option + +By default LD_LIBRARY_PATH is set to the list of target library paths; +this breaks down in cross-compilation environment, as we need to run a +native emulation wrapper rather than the target binary itself. This patch +allows exporting those paths to a different environment variable +which can be picked up and used by the wrapper. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin + +--- + giscanner/ccompiler.py | 4 ++-- + giscanner/dumper.py | 3 ++- + giscanner/scannermain.py | 3 +++ + 3 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py +index d10327c..6cf25d5 100644 +--- a/giscanner/ccompiler.py ++++ b/giscanner/ccompiler.py +@@ -109,7 +109,7 @@ class CCompiler(object): + + self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations" + +- def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths): ++ def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar): + # An "internal" link is where the library to be introspected + # is being built in the current directory. + +@@ -119,7 +119,7 @@ class CCompiler(object): + if os.name == 'nt': + runtime_path_envvar = ['LIB', 'PATH'] + else: +- runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH'] ++ runtime_path_envvar = ['LD_LIBRARY_PATH'] if not lib_dirs_envvar else [lib_dirs_envvar] + # Search the current directory first + # (This flag is not supported nor needed for Visual C++) + args.append('-L.') +diff --git a/giscanner/dumper.py b/giscanner/dumper.py +index 3c7220b..0abd565 100644 +--- a/giscanner/dumper.py ++++ b/giscanner/dumper.py +@@ -259,7 +259,8 @@ class DumpCompiler(object): + libtool, + self._options.libraries, + self._options.extra_libraries, +- self._options.library_paths) ++ self._options.library_paths, ++ self._options.lib_dirs_envvar) + args.extend(pkg_config_libs) + + else: +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py +index d262785..51c9570 100755 +--- a/giscanner/scannermain.py ++++ b/giscanner/scannermain.py +@@ -130,6 +130,9 @@ def _get_option_parser(): + parser.add_option("", "--use-ldd-wrapper", + action="store", dest="ldd_wrapper", default=None, + help="wrapper to use instead of ldd (useful when cross-compiling)") ++ parser.add_option("", "--lib-dirs-envvar", ++ action="store", dest="lib_dirs_envvar", default=None, ++ help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH") + parser.add_option("", "--program-arg", + action="append", dest="program_args", default=[], + help="extra arguments to program") +-- +2.14.3 + diff --git a/package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch b/package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch new file mode 100644 index 0000000000..02fcdbeb25 --- /dev/null +++ b/package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch @@ -0,0 +1,29 @@ +From 72a427bc50daee8f1ded0e9221e53dbbf2a80f08 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Wed, 14 Mar 2018 12:07:10 -0400 +Subject: [PATCH] Add rpath links to ccompiler + +This patch allows gobject-introspection to process extra paths passed to the +compiler via the GIR_EXTRA_LIBS_PATH variable. + +Signed-off-by: Adam Duskett +--- + giscanner/ccompiler.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py +index a8bd5b1..51bb9bc 100644 +--- a/giscanner/ccompiler.py ++++ b/giscanner/ccompiler.py +@@ -163,6 +163,8 @@ class CCompiler(object): + + for envvar in runtime_path_envvar: + if envvar in os.environ: ++ for envvar_path in os.environ[envvar].split(':'): ++ args.append("-Wl,-rpath-link," + envvar_path) + os.environ[envvar] = \ + os.pathsep.join(runtime_paths + [os.environ[envvar]]) + else: +-- +2.14.3 + diff --git a/package/gobject-introspection/Config.in b/package/gobject-introspection/Config.in new file mode 100644 index 0000000000..1da3cfa000 --- /dev/null +++ b/package/gobject-introspection/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_GOBJECT_INTROSPECTION + bool "gobject-introspection" + depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS # libffi, libglib2 + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_USE_MMU # python3, libglib2 + depends on BR2_USE_WCHAR # python3, libglib2 -> gettext + depends on !BR2_STATIC_LIBS + depends on !BR2_MIPS_NABI32 + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_HOST_PRELINK_CROSS + select BR2_PACKAGE_HOST_QEMU + select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE + select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON + help + GObject introspection is a middleware layer between C + libraries (using GObject) and language bindings. The C library + can be scanned at compile time and generate a metadata file, + in addition to the actual native C library. Then at runtime, + language bindings can read this metadata and automatically + provide bindings to call into the C library. + + https://wiki.gnome.org/action/show/Projects/GObjectIntrospection + +comment "gobject-introspection needs a glibc toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS_TARGET + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/gobject-introspection/g-ir-compiler.in b/package/gobject-introspection/g-ir-compiler.in new file mode 100644 index 0000000000..b2f97ea870 --- /dev/null +++ b/package/gobject-introspection/g-ir-compiler.in @@ -0,0 +1,2 @@ +#!/bin/sh +$STAGING_DIR/usr/bin/g-ir-scanner-qemuwrapper $STAGING_DIR/usr/bin/g-ir-compiler.real "$@" diff --git a/package/gobject-introspection/g-ir-scanner-lddwrapper.in b/package/gobject-introspection/g-ir-scanner-lddwrapper.in new file mode 100644 index 0000000000..12b064e4ad --- /dev/null +++ b/package/gobject-introspection/g-ir-scanner-lddwrapper.in @@ -0,0 +1,2 @@ +#!/bin/sh +${HOST_DIR}/sbin/prelink-rtld --root=${STAGING_DIR} "$@" diff --git a/package/gobject-introspection/g-ir-scanner-qemuwrapper.in b/package/gobject-introspection/g-ir-scanner-qemuwrapper.in new file mode 100644 index 0000000000..e793ce193f --- /dev/null +++ b/package/gobject-introspection/g-ir-scanner-qemuwrapper.in @@ -0,0 +1,10 @@ +#!/bin/sh +# Use a modules directory which does not exist so we don't load random things +# which may then get deleted (or their dependencies) and potentially segfault +export GIO_MODULE_DIR=$STAGING_DIR/usr/lib/gio/modules-dummy +PSEUDO_UNLOAD=1 @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ -L $STAGING_DIR -E LD_LIBRARY_PATH=$GIR_EXTRA_LIBS_PATH:.libs:$STAGING_DIR/usr/lib:$STAGING_DIR/lib "$@" +if [[ $? -ne 0 ]]; then + echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help." + echo '(typically like this: GIR_EXTRA_LIBS_PATH="$(@D)/.libs")' + exit 1 +fi diff --git a/package/gobject-introspection/g-ir-scanner.in b/package/gobject-introspection/g-ir-scanner.in new file mode 100644 index 0000000000..71b1871cfd --- /dev/null +++ b/package/gobject-introspection/g-ir-scanner.in @@ -0,0 +1,3 @@ +#!/bin/sh +export GI_SCANNER_DISABLE_CACHE=1 +$HOST_DIR/bin/g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=$STAGING_DIR/usr/bin/g-ir-scanner-qemuwrapper --use-ldd-wrapper=$STAGING_DIR/usr/bin/g-ir-scanner-lddwrapper --add-include-path=$STAGING_DIR/usr/share/gir-1.0 "$@" diff --git a/package/gobject-introspection/gobject-introspection.hash b/package/gobject-introspection/gobject-introspection.hash new file mode 100644 index 0000000000..6524da8909 --- /dev/null +++ b/package/gobject-introspection/gobject-introspection.hash @@ -0,0 +1,4 @@ +#From http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.56/gobject-introspection-1.56.1.sha256sum +sha256 5b2875ccff99ff7baab63a34b67f8c920def240e178ff50add809e267d9ea24b gobject-introspection-1.56.1.tar.xz +sha256 d245807f90032872d1438d741ed21e2490e1175dc8aa3afa5ddb6c8e529b58e5 COPYING.LGPL +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING.GPL diff --git a/package/gobject-introspection/gobject-introspection.mk b/package/gobject-introspection/gobject-introspection.mk new file mode 100644 index 0000000000..d36db1d66f --- /dev/null +++ b/package/gobject-introspection/gobject-introspection.mk @@ -0,0 +1,101 @@ +################################################################################ +# +# gobject-introspection +# +################################################################################ + +GOBJECT_INTROSPECTION_VERSION_MAJOR = 1.56 +GOBJECT_INTROSPECTION_VERSION = $(GOBJECT_INTROSPECTION_VERSION_MAJOR).1 +GOBJECT_INTROSPECTION_SITE = http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/$(GOBJECT_INTROSPECTION_VERSION_MAJOR) +GOBJECT_INTROSPECTION_SOURCE = gobject-introspection-$(GOBJECT_INTROSPECTION_VERSION).tar.xz +GOBJECT_INTROSPECTION_DEPENDENCIES = libffi zlib libglib2 host-qemu host-gobject-introspection host-prelink-cross +GOBJECT_INTROSPECTION_INSTALL_STAGING = YES +GOBJECT_INTROSPECTION_AUTORECONF = YES +GOBJECT_INTROSPECTION_LICENSE = Dual LGPLv2+/GPLv2+ +GOBJECT_INTROSPECTION_LICENSE_FILES = COPYING.LGPL COPYING.GPL +HOST_GOBJECT_INTROSPECTION_DEPENDENCIES = host-libglib2 host-flex host-bison + +GOBJECT_INTROSPECTION_CONF_OPTS = \ + --enable-host-gi \ + --disable-static \ + --enable-gi-cross-wrapper=$(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper \ + --enable-gi-ldd-wrapper=$(STAGING_DIR)/usr/bin/g-ir-scanner-lddwrapper \ + --enable-introspection-data + +ifeq ($(BR2_PACKAGE_CAIRO),y) +GOBJECT_INTROSPECTION_DEPENDENCIES += cairo +endif +ifeq ($(BR2_PACKAGE_LIBFFI),y) +GOBJECT_INTROSPECTION_DEPENDENCIES += libffi +endif + +ifeq ($(BR2_PACKAGE_PYTHON),y) +GOBJECT_INTROSPECTION_DEPENDENCIES += python +HOST_GOBJECT_INTROSPECTION_DEPENDENCIES += host-python +GOBJECT_INTROSPECTION_PYTHON_PATH="$(STAGING_DIR)/usr/bin/python2" +else +GOBJECT_INTROSPECTION_DEPENDENCIES += python3 +HOST_GOBJECT_INTROSPECTION_DEPENDENCIES += host-python3 +GOBJECT_INTROSPECTION_PYTHON_PATH="$(STAGING_DIR)/usr/bin/python3" +endif + +# GI_SCANNER_DISABLE_CACHE=1 prevents g-ir-scanner from writing cache data to $HOME +HOST_GOBJECT_INTROSPECTION_CONF_ENV = \ + GI_SCANNER_DISABLE_CACHE=1 \ + HOST_GOBJECT_INTROSPECTION_GIR_EXTRA_LIBS_PATH=$(@D)/.libs + +# GI_SCANNER_DISABLE_CACHE=1 prevents g-ir-scanner from writing cache data to $HOME +GOBJECT_INTROSPECTION_CONF_ENV = \ + GI_SCANNER_DISABLE_CACHE=1 \ + GOBJECT_INTROSPECTION_GIR_EXTRA_LIBS_PATH=$(@D)/.libs \ + PYTHON_INCLUDES="`$(GOBJECT_INTROSPECTION_PYTHON_PATH)-config --includes`" + +# Make sure g-ir-tool-template uses the host python. +define GOBJECT_INTROSPECTION_FIX_TOOLTEMPLATE_PYTHON_PATH + sed -i -e '1s,#!.*,#!$(HOST_DIR)/bin/python,' $(@D)/tools/g-ir-tool-template.in +endef +GOBJECT_INTROSPECTION_PRE_CONFIGURE_HOOKS = GOBJECT_INTROSPECTION_FIX_TOOLTEMPLATE_PYTHON_PATH +HOST_GOBJECT_INTROSPECTION_PRE_CONFIGURE_HOOKS = GOBJECT_INTROSPECTION_FIX_TOOLTEMPLATE_PYTHON_PATH + +GOBJECT_INTROSPECTION_WRAPPERS = \ + g-ir-compiler \ + g-ir-scanner + +# These wrappers allow gobject-introspection to build the internal introspection +# libraries during the build process. +define GOBJECT_INTROSPECTION_INSTALL_PRE_WRAPPERS + $(INSTALL) -D -m 755 package/gobject-introspection/g-ir-scanner-lddwrapper.in $(STAGING_DIR)/usr/bin/g-ir-scanner-lddwrapper + $(INSTALL) -D -m 755 package/gobject-introspection/g-ir-scanner-qemuwrapper.in $(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper + $(SED) "s|@QEMU_USER@|$(QEMU_USER)|g" $(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper + $(SED) "s|@TOOLCHAIN_HEADERS_VERSION@|$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)|g" $(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper + # Use a modules directory which does not exist so we don't load random things + # which may then get deleted (or their dependencies) and potentially segfault + mkdir -p $(STAGING_DIR)/usr/lib/gio/modules-dummy +endef +GOBJECT_INTROSPECTION_POST_PATCH_HOOKS = GOBJECT_INTROSPECTION_INSTALL_PRE_WRAPPERS + +# In order for gobject-introspection to work, qemu needs to run temporarily +# to create binaries on the fly by g-ir-scanner. This involves creating +# several wrapper scripts to accomplish the task: +# g-ir-scanner-qemuwrapper, g-ir-compiler-wrapper, +# g-ir-scanner-lddwrapper, g-ir-scanner-wrapper, g-ir-compiler-wrapper. +define GOBJECT_INTROSPECTION_INSTALL_WRAPPERS + # Move the real binaries to their names.real, then replace them with + # the wrappers. + $(foreach w,$(GOBJECT_INTROSPECTION_WRAPPERS), + mv $(STAGING_DIR)/usr/bin/$(w) $(STAGING_DIR)/usr/bin/$(w).real + $(INSTALL) -D -m 755 \ + package/gobject-introspection/$(w).in $(STAGING_DIR)/usr/bin/$(w) + ) + $(SED) "s@g_ir_scanner=.*@g_ir_scanner=/usr/bin/g-ir-scanner@g" \ + $(STAGING_DIR)/usr/lib/pkgconfig/gobject-introspection-1.0.pc + + # The pkgconfig file needs to point towards the wrappers instead of the native + # binaries. + $(SED) "s@g_ir_compiler=.*@g_ir_compiler=/usr/bin/g-ir-compiler@g" \ + $(STAGING_DIR)/usr/lib/pkgconfig/gobject-introspection-1.0.pc +endef +GOBJECT_INTROSPECTION_POST_INSTALL_STAGING_HOOKS = GOBJECT_INTROSPECTION_INSTALL_WRAPPERS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index 45de99356f..06021f95c1 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -162,6 +162,7 @@ endif $(2)_CONF_ENV ?= $(2)_CONF_OPTS ?= +$(2)_GIR_EXTRA_LIBS_PATH ?= $(2)_MAKE_ENV ?= $(2)_MAKE_OPTS ?= $(2)_INSTALL_OPTS ?= install @@ -239,6 +240,8 @@ endef endif endif +export GIR_EXTRA_LIBS_PATH=$$($$(PKG)_GIR_EXTRA_LIBS_PATH) + $(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK ifeq ($$($(2)_AUTORECONF),YES) From patchwork Sat Dec 15 23:35:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1014014 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ropmgkI0"; 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 43HP235hVlz9s47 for ; Sun, 16 Dec 2018 10:36:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3ED502516D; Sat, 15 Dec 2018 23:36:25 +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 LGcGMwMI+gmO; Sat, 15 Dec 2018 23:36:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 114E123600; Sat, 15 Dec 2018 23:36:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 4F6561BF3B9 for ; Sat, 15 Dec 2018 23:36:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4D0848566F for ; Sat, 15 Dec 2018 23:36:18 +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 wm0gUVmwNYp8 for ; Sat, 15 Dec 2018 23:36:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 9564C855EF for ; Sat, 15 Dec 2018 23:36:17 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id r200so7302136iod.11 for ; Sat, 15 Dec 2018 15:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y7Ox35jDPLP/Nn5PHv8uEKBPqFAD9Uej/LCsklmYUms=; b=ropmgkI07jOyvOhbfRkJ8uE2zrA1vkVeB9cQ6+Tic6Lr86kND7dmeTCF+tpnAB6G/7 dciHN1I069o2bB4nsp741dZ4RykvEqARcCQT5eTqRGCMXC3MjPBWTWLcZyJN79UGFwxj Rld09dMPZ6Zr4lEujsKJyrXA7jDHNxluAf8my8w3bIx+sT3xRzCSzbP33tE9wGZ4FFOa tXrh7za6eIMOy8JGgvsjxONOEHVxwYlHLneYicRL62L8FjNsxf9aqGphp0z88gt6guik PGjA5J3GiwsIoVkDqPU1Eii0iCKR/c1TG//XZNCIjDUIEahZA9sGBrPyyq4alMsNasOr yPQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Y7Ox35jDPLP/Nn5PHv8uEKBPqFAD9Uej/LCsklmYUms=; b=OJN/nMv1XeyzaATQX0Sj+Si/l4cTAHJApsYKAYUQ3zViuzdvYSVb0oohtRGlhCb2bT oYqgPEk8TceVuMBD3vx7B5r1vqPNlmxKNe/UGHq5XgYes/icTcijLRgkFHrHdmVchMXS atV+4M6/LmT4xKUHs9ETBQp8Wi56lTZLjD3YQv8vI5daLEQvFFhcY5IalaMhYQIWnQIw YqNeZ5XSPWMIinZ3RRfcGvtU3bd78Y8zkDLGiLWEWdjksh3Ztu0sD3JWDZD8m3cCvK8R vnGA5wbX3PFAsixnM0S1lRH2e3r47c/XUCg7hsA+M7UL1HVDl+Uk1zAgZE+2+OAAC6cI YVMQ== X-Gm-Message-State: AA+aEWZVWcGJl0FIooxCXPN60XtUARi7qMRwxmd4LqbM9IXSJUk2Jlqs FHPg+Imgu7GMAxKYJArop/guoIuuV3Q= X-Google-Smtp-Source: AFSGD/UFKJCZmQTqDNV2AAejacRtvNvPpEKlf4MGIi7aNUY6bxyQQEljC3DP9L+NIcvVaxa3UN7lFw== X-Received: by 2002:a6b:398b:: with SMTP id g133mr7016617ioa.67.1544916976636; Sat, 15 Dec 2018 15:36:16 -0800 (PST) Received: from localhost.localdomain (68-188-149-81.dhcp.aldl.mi.charter.com. [68.188.149.81]) by smtp.gmail.com with ESMTPSA id r139sm4167098ior.53.2018.12.15.15.36.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Dec 2018 15:36:16 -0800 (PST) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Sat, 15 Dec 2018 18:35:55 -0500 Message-Id: <20181215233555.98482-4-aduskett@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181215233555.98482-1-aduskett@gmail.com> References: <20181215233555.98482-1-aduskett@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v9 4/4] gstreamer1 packages: add support for introspection 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: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett Now that there is support for gobject-introspection, we can add the appropriate configuration options to support compiling against gobject-introspection. In addition: gst1-plugins-base requires a patch to drop a incorrect reference to sdp when compiling the rtsp gir file. Signed-off-by: Adam Duskett --- Changes v1 -> v4: - Add patch to series. Changes v4 -> v5: - Changed --enable-introspection=yes to --enable-introspection (Yann) - Changed += GIR_EXTRA_LIBS_PATH="$(@D)/gst/.libs:$(@D)/libs/gst/base/.libs" to GSTREAMER1_GIR_EXTRA_LIBS_PATH=$(@D)/gst/.libs:$(@D)/libs/gst/base/.libs Chagnes v5 -> v6: - None Changes v6 -> v7: - Refresh for changes since v6. Changes v7 -> v9: - None .../gst1-plugins-bad/gst1-plugins-bad.mk | 5 ++++ ...ect-reference-to-gstreamer-sdp-in-Ma.patch | 26 +++++++++++++++++++ .../gst1-plugins-base/gst1-plugins-base.mk | 5 ++++ package/gstreamer1/gstreamer1/gstreamer1.mk | 6 +++++ 4 files changed, 42 insertions(+) create mode 100644 package/gstreamer1/gst1-plugins-base/0001-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk index ac39f1e5ce..77795d8c69 100644 --- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk @@ -63,6 +63,11 @@ GST1_PLUGINS_BAD_CONF_OPTS += \ GST1_PLUGINS_BAD_DEPENDENCIES = gst1-plugins-base gstreamer1 +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-introspection +GST1_PLUGINS_BAD_GIR_EXTRA_LIBS_PATH=$(@D)/gst-libs/gst/allocators/.libs +endif + ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) # RPI has odd locations for several required headers. GST1_PLUGINS_BAD_CONF_ENV += \ diff --git a/package/gstreamer1/gst1-plugins-base/0001-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch b/package/gstreamer1/gst1-plugins-base/0001-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch new file mode 100644 index 0000000000..07d4d8c476 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-base/0001-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch @@ -0,0 +1,26 @@ +From 4330915d88dc4dd46eb4c28d756482b767c2747f Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 26 Oct 2015 17:30:14 +0200 +Subject: [PATCH] rtsp: drop incorrect reference to gstreamer-sdp in Makefile.am + +Upstream-Status: Pending [review on oe-core maillist] +Signed-off-by: Alexander Kanavin +Signed-off-by: Adam Duskett +--- + gst-libs/gst/rtsp/Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am +index 4f6d9f8..0afa370 100644 +--- a/gst-libs/gst/rtsp/Makefile.am ++++ b/gst-libs/gst/rtsp/Makefile.am +@@ -79,7 +79,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS + --libtool="$(LIBTOOL)" \ + --pkg gio-2.0 \ + --pkg gstreamer-@GST_API_VERSION@ \ +- --pkg gstreamer-sdp-@GST_API_VERSION@ \ + --pkg-export gstreamer-rtsp-@GST_API_VERSION@ \ + --add-init-section="$(INTROSPECTION_INIT)" \ + --output $@ \ +-- +2.6.2 diff --git a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk index fb976f9a94..d788d65495 100644 --- a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk +++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk @@ -25,6 +25,11 @@ GST1_PLUGINS_BASE_CONF_OPTS += \ GST1_PLUGINS_BASE_DEPENDENCIES = gstreamer1 +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-introspection +GST1_PLUGINS_BASE_GIR_EXTRA_LIBS_PATH=$(@D)/gst-libs/gst/tag/.libs:$(@D)/gst-libs/gst/video/.libs:$(@D)/gst-libs/gst/audio/.libs:$(@D)/gst-libs/gst/rtp/.libs +endif + # These plugins are listed in the order from ./configure --help ifeq ($(BR2_PACKAGE_ORC),y) GST1_PLUGINS_BASE_DEPENDENCIES += orc diff --git a/package/gstreamer1/gstreamer1/gstreamer1.mk b/package/gstreamer1/gstreamer1/gstreamer1.mk index 76a74a0806..ae22a1985a 100644 --- a/package/gstreamer1/gstreamer1/gstreamer1.mk +++ b/package/gstreamer1/gstreamer1/gstreamer1.mk @@ -32,4 +32,10 @@ GSTREAMER1_DEPENDENCIES = \ libglib2 \ $(if $(BR2_PACKAGE_LIBUNWIND),libunwind) +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) +GSTREAMER1_DEPENDENCIES += gobject-introspection +GSTREAMER1_CONF_OPTS += --enable-introspection +GSTREAMER1_GIR_EXTRA_LIBS_PATH=$(@D)/gst/.libs:$(@D)/libs/gst/base/.libs +endif + $(eval $(autotools-package))