From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5FF0D158086 for ; Tue, 16 Nov 2021 15:06:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8BD47E0828; Tue, 16 Nov 2021 15:06:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A7B7BE0828 for ; Tue, 16 Nov 2021 15:06:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1FB0F342EFC for ; Tue, 16 Nov 2021 15:06:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6EB931A2 for ; Tue, 16 Nov 2021 15:06:26 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1637075146.79dea382ce9cc55c44b2f9d8d256f1615112eb5c.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/flashrom/files/, sys-apps/flashrom/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch sys-apps/flashrom/flashrom-9999.ebuild X-VCS-Directories: sys-apps/flashrom/ sys-apps/flashrom/files/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: 79dea382ce9cc55c44b2f9d8d256f1615112eb5c X-VCS-Branch: master Date: Tue, 16 Nov 2021 15:06:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ae9c0440-0c90-49ac-9e01-2cad9c9b7f30 X-Archives-Hash: dd6b03bc99746db81da437a6766bfb84 commit: 79dea382ce9cc55c44b2f9d8d256f1615112eb5c Author: Marek Szuba gentoo org> AuthorDate: Tue Nov 16 15:05:46 2021 +0000 Commit: Marek Szuba gentoo org> CommitDate: Tue Nov 16 15:05:46 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79dea382 sys-apps/flashrom-9999: do not auto-build tests if cmocka is present Signed-off-by: Marek Szuba gentoo.org> .../flashrom/files/flashrom-9999_meson-fixes.patch | 54 ++++++++++++++++------ sys-apps/flashrom/flashrom-9999.ebuild | 2 +- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch b/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch index 63c2e2ef7553..7651585f4f6a 100644 --- a/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch +++ b/sys-apps/flashrom/files/flashrom-9999_meson-fixes.patch @@ -9,7 +9,7 @@ ) # libtool versioning -@@ -74,6 +74,10 @@ cargs = [] +@@ -105,6 +105,10 @@ cargs = [] deps = [] srcs = [] @@ -20,7 +20,7 @@ need_raw_access = false need_serial = false -@@ -88,27 +92,25 @@ if cc.check_header('sys/utsname.h') +@@ -119,27 +123,25 @@ if cc.check_header('sys/utsname.h') add_project_arguments('-DHAVE_UTSNAME=1', language : 'c') endif @@ -59,7 +59,7 @@ config_atahpt = false config_atapromise = false config_atavia = false -@@ -130,14 +132,17 @@ endif +@@ -161,14 +163,17 @@ endif # set defines for configured programmers if config_atahpt srcs += 'atahpt.c' @@ -77,7 +77,7 @@ cargs += '-DCONFIG_ATAVIA=1' endif if config_buspirate_spi -@@ -147,18 +152,22 @@ if config_buspirate_spi +@@ -178,18 +183,22 @@ if config_buspirate_spi endif if config_ch341a_spi srcs += 'ch341a_spi.c' @@ -100,7 +100,7 @@ cargs += '-DCONFIG_DIGILENT_SPI=1' endif if config_jlink_spi -@@ -168,6 +177,7 @@ if config_jlink_spi +@@ -199,6 +208,7 @@ if config_jlink_spi endif if config_drkaiser srcs += 'drkaiser.c' @@ -108,7 +108,7 @@ cargs += '-DCONFIG_DRKAISER=1' endif if config_dummy -@@ -176,16 +186,18 @@ if config_dummy +@@ -207,16 +217,18 @@ if config_dummy endif if config_ft2232_spi srcs += 'ft2232_spi.c' @@ -128,7 +128,7 @@ cargs += '-DCONFIG_RAIDEN_DEBUG_SPI=1' endif if config_internal -@@ -204,6 +216,7 @@ if config_internal +@@ -235,6 +247,7 @@ if config_internal srcs += 'sb600spi.c' srcs += 'wbsio_spi.c' endif @@ -136,7 +136,7 @@ config_bitbang_spi = true cargs += '-DCONFIG_INTERNAL=1' if get_option('config_internal_dmi') -@@ -217,6 +230,7 @@ if config_ene_lpc +@@ -244,6 +257,7 @@ if config_internal endif if config_it8212 srcs += 'it8212.c' @@ -144,7 +144,7 @@ cargs += '-DCONFIG_IT8212=1' endif if config_linux_mtd -@@ -237,36 +251,44 @@ if config_mstarddc_spi +@@ -260,36 +274,44 @@ if config_mstarddc_spi endif if config_nic3com srcs += 'nic3com.c' @@ -189,7 +189,7 @@ cargs += '-DCONFIG_PICKIT2_SPI=1' endif if config_pony_spi -@@ -283,10 +305,12 @@ if config_rayer_spi +@@ -306,10 +328,12 @@ if config_rayer_spi endif if config_satamv srcs += 'satamv.c' @@ -202,7 +202,7 @@ cargs += '-DCONFIG_SATASII=1' endif if config_serprog -@@ -296,10 +320,12 @@ if config_serprog +@@ -319,10 +343,12 @@ if config_serprog endif if config_usbblaster_spi srcs += 'usbblaster_spi.c' @@ -215,8 +215,8 @@ cargs += '-DCONFIG_STLINKV3_SPI=1' endif if config_lspcon_i2c_spi -@@ -322,6 +348,26 @@ if host_machine.system() == 'linux' - cargs += '-DCONFIG_I2C_SUPPORT=1' +@@ -344,6 +370,26 @@ if host_machine.system() == 'linux' + srcs += 'i2c_helper_linux.c' endif +# some programmers require libftdi @@ -242,14 +242,40 @@ # raw memory, MSR or PCI port I/O access if need_raw_access srcs += 'hwaccess.c' +@@ -493,10 +539,12 @@ executable( + subdir('util') + + # unit-test framework ++if get_option('build_tests') ++ + cmocka_dep = dependency( + 'cmocka', + fallback: ['cmocka', 'cmocka_dep'], +- required: false ++ required: true + ) + flashrom_test_dep = declare_dependency( + include_directories : include_directories('.'), +@@ -519,3 +567,5 @@ flashrom_test_dep = declare_dependency( + if cmocka_dep.found() + subdir('tests') + endif ++ ++endif --- a/meson_options.txt +++ b/meson_options.txt -@@ -1,5 +1,6 @@ +@@ -1,9 +1,12 @@ -option('pciutils', type : 'boolean', value : true, description : 'use pciutils') -option('usb', type : 'boolean', value : true, description : 'use libusb1') +option('no_libftdi_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libftdi') +option('no_libpci_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libpci') +option('no_libusb_programmers', type : 'boolean', value : false, description : 'disable all programmers depending on libusb') option('print_wiki', type : 'boolean', value : true, description : 'Print Wiki') + option('default_programmer_name', type : 'string', description : 'default programmer') + option('default_programmer_args', type : 'string', description : 'default programmer arguments') ++option('build_tests', type : 'boolean', value : false, description : 'build the test suite') ++ option('config_atahpt', type : 'boolean', value : false, description : 'Highpoint (HPT) ATA/RAID controllers') + option('config_atapromise', type : 'boolean', value : false, description : 'Promise ATA controller') + option('config_atavia', type : 'boolean', value : true, description : 'VIA VT6421A LPC memory') diff --git a/sys-apps/flashrom/flashrom-9999.ebuild b/sys-apps/flashrom/flashrom-9999.ebuild index 333373eb5f83..58c8150f039c 100644 --- a/sys-apps/flashrom/flashrom-9999.ebuild +++ b/sys-apps/flashrom/flashrom-9999.ebuild @@ -101,13 +101,13 @@ BDEPEND="test? ( dev-util/cmocka )" DOCS=( README Documentation/ ) -# TODO: cmocka automagic PATCHES=( "${FILESDIR}"/${PN}-9999_meson-fixes.patch ) src_configure() { local emesonargs=( + $(meson_use test build_tests) $(meson_use atahpt config_atahpt) $(meson_use atapromise config_atapromise) $(meson_use atavia config_atavia)