From patchwork Wed May 15 16:49:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3098 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id EBBBA3F24D for ; Wed, 15 May 2024 18:49:18 +0200 (CEST) Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-34ffd710a31sf4126309f8f.0 for ; Wed, 15 May 2024 09:49:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715791758; cv=pass; d=google.com; s=arc-20160816; b=C1H4JU+KDpBKaZWrakJP8I3iUZa+xJvW9ZkBCCuvW/hDFD1ZbBS4+/9HRTtv88OBpx 7ryUP4jFPtBEKBdDInC4WBseVycuSgDqUEUdTctiTyJCMjKsQDtA/NI4tsr3U19MLPCd OdAhBJfMTnJH8vG25Yoli/rFCL2s65gbI42fPclrLhrMJnHr4s+Oj5JPC/ed8hcrUgNf XSjTpVcEpABRtcyKmLHsjJHkuOaxZiIAZHn1Lv9TUvKNdpjJ44DCSaJRya/ZIUagrJXV 2B3fyruYlPkrmkzwLixshmxdCgQ7umvwHNKfMT4DuHRmMf28Ul8cY2rj107whW0jJKnR dxOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=YjTszkPMn0JCbcymjOOlbiKEnXDmi+p5IQndqhT9CPQ=; fh=af6xbAd2CbCxX1I8Ht5LVh6kGqNu/n6r2A2hNu6PDMM=; b=OTABc9jPT/MrZ7RnluG1yWpA7HZG82WDAyOm3vj2D8xkLSw69pkqqqHVrXhALo6sht AjVUGbSjTaMgVMxfzZkSSP1Zzs5/mPyWL8E6SQ+/wry8rnRo8VMMKonsx8eh4u06H9O7 VdynO9PnEIQ3O8Q6TKM14kEusRgAz37k/cxPYf/ufG5RBc8Tb3tneagZGzuV9TOw2M4E MEPu3z8p+sHbyfO7uo1cVz/nWkY/5lixg1jO9c3z2FqDIqgkRjsxg27yJiWBoixfYsDV RLWLpGQcM5SVkNnKoXvDgCZNjU8Sic0efh+D2x1PM1EoCMaLXw9VmnSPE4V1dfLEHxfO +tzg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KgWIBpLn; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1715791758; x=1716396558; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=YjTszkPMn0JCbcymjOOlbiKEnXDmi+p5IQndqhT9CPQ=; b=LdeNOTVn5MmyTJeh30cV1v1eOKGCXaCWU/iVPuA7/JB/PqfcWzGGRT1ChgEi8rKM+0 dFDF6rMizc4iQoCUxaO7520FrOG2XZoDIG3OsLz7uzaYTMyEaaYBxB6UmXq8VpQWHcLu dAqAsk6ya4It1c430VEuidN5nQtQ4oTJkE37A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715791758; x=1716396558; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YjTszkPMn0JCbcymjOOlbiKEnXDmi+p5IQndqhT9CPQ=; b=SZ+uaU9/la/ij90mKUxBgncK/mbKHpA1fD7E01+Kog20/aQL4D3uQs1i0X6l/xMF7z LSfVGDNWpzz/1XPd7NGOkwTBA5ZdCe+TrVuvlcHIUdtNuwif4KE/GeR5yuzVsJiypBJl cV1Nb2UNpgsFNulJ7aVdAQvCKusgpboEBiVqlfh7xUruyFNMwQYE1DeW3F5zMK/0fusE uFCkaa/EQZJU5wyCTbZcXzujsbqv8C3H3aWqxoujWlKys5Pzo3SBWBOQUQ+6+E3d1+FM 8f2M6hqLuYSOO7g/DO7EypGYQ+Nuj4Vx0o+idiEH08UKYufPkjDQmnEfpOWdy5TLtOaT BHcQ== X-Forwarded-Encrypted: i=2; AJvYcCUtXYa7BrtCEx01uCD7/OQM9ig4SKUHzLbDiFh2+tZa/3N6wLDo8DhvzsXHRu1H2akDGdrt0p6fTwIFt0x+l3IrQjMY1QtBeQQyYNlVIwIfIcYg33GsvazlPijHUg== X-Gm-Message-State: AOJu0YzpUfqDpYRdApCBWlZnIIzW1NYk5XbYOr2/h63A5KzLms0Dpcde ND+NXS8aU4Isfs49dS8Jkct66Lf2DGxtnIWamm64Nz1hi5h9NKtLS6r7vKigTuOPPw== X-Google-Smtp-Source: AGHT+IES+vgjZk6W2rZdjKizml1OimDd/wbQ+NhPdXluMnpRylpAEc0N4kMEkaNmyvh1gxhTHCaxXw== X-Received: by 2002:adf:ebc3:0:b0:346:4d41:8d5a with SMTP id ffacd0b85a97d-3504a954e3emr9916894f8f.56.1715791758217; Wed, 15 May 2024 09:49:18 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:6d48:0:b0:34d:9bcc:e0a0 with SMTP id ffacd0b85a97d-3501e1beb44ls1995103f8f.2.-pod-prod-09-eu; Wed, 15 May 2024 09:49:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVvbPSZdXlFilQSBreKI6mVRupCRBHnWfWYeTYaAxTulKh2bwMw5STqdgpmDOM0ePFG1TA7eRy4bHuTRQcC15mDCfdyhd0qpvscobauIpu5S8Ke X-Received: by 2002:a5d:52cf:0:b0:34c:d7d3:3eb5 with SMTP id ffacd0b85a97d-3504a954e5dmr12653988f8f.53.1715791756505; Wed, 15 May 2024 09:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715791756; cv=none; d=google.com; s=arc-20160816; b=DWrtGmWtXlw1GNKsKQMWAhnL1WPfOlSVQOZpKPk8FRxrt2xZVHsjDFupYocG7FOVPF 60OEGxb8lMfYsB2Nv/it7TU9wzAI+ACcPr4mv0nmL0M/Dh75CEjt9exmsceVwgQcTL0/ m0rDzqQgxEdgLnHCxt32hD3q/OlKFZINmNaLJTxfk1Y1ORvORDWqFsEFsZx7DgR7K3DS T8UuuPhDFH1JfXyWiG6mKQqYJT/dpLAwkTcmPOKSRFQ+lmCTU7mLA4TlRvC8/soLEjHr 32IODYdc0Ez5dJ+KDgHs5vcHa9Bb19JSnbDqG4QfVZ4GjKtKq/ih9glLi3XLl30axolx 76VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=hHIq+LarMzhsnWKkR+ZPJLRjuidOVAsiiUr4ngwP/x8=; fh=ZoA/TKOV5EQQMfU0sBQNPw0VqFIHa6pcmYa/5EeGPGU=; b=uCgB4Du8Rmzm7yxd9fdNT0meXNGNsDLe2ZBaCCKMX5Dg++S08pRetAz9BK5zgvVS86 R9///Y6d2BZT4Rm/an20EeYZnBinB26rwdBpVaSjmxdTokOyidnVtWxQHX6ZNgZNoCHb 45ktYO/r3uS5rWXENaIV9T1DtTOr0cKAWNLzUctuSFtrptFK4bYbbmbWUFSabcvS3w6O rNECRv9lkJtqsLRrRzeW/pWLWfFI/V4Nkje9R3jAWFDSJSQYI/JQbRyDTAaSN00+zH9I LNUitEEDqezjrJJtzH9NCIGZqpX7A2oEtA2gnCfMl5o+o6pOOWfZhUgwwIhRBQtmcFOL dwzQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KgWIBpLn; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-3502bbbc65csor3632411f8f.5.2024.05.15.09.49.16 for (Google Transport Security); Wed, 15 May 2024 09:49:16 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCWnl/v+lYk+Rb7AXJv0EvYD0oq9InZFNEd4lK6ND3qXFgbTVjD6n3lPrF63MKEaStRzEdAVzu+oHNa0yXK02zfiAnljMdV0IEenNRrmWRCwU1SR X-Received: by 2002:adf:ebc3:0:b0:346:4d41:8d5a with SMTP id ffacd0b85a97d-3504a954e3emr9916844f8f.56.1715791755933; Wed, 15 May 2024 09:49:15 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2001:b07:6474:ebbf:b365:f79:d950:c9]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502b79bc99sm16838779f8f.11.2024.05.15.09.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 09:49:15 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Frank Hunleth , linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Dario Binacchi Subject: [PATCH 1/1] package/zxing-cpp: add options for enabling readers and/or writers Date: Wed, 15 May 2024 18:49:12 +0200 Message-ID: <20240515164912.104672-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KgWIBpLn; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The patch allows you to choose whether to build encoding (BUILD_WRITERS), decoding (BUILD_READERS) or both. This way, it's possible to keep the library size at minimum. By default, to ensure backward compatibility, both are compiled. Signed-off-by: Dario Binacchi --- package/zxing-cpp/Config.in | 27 +++++++++++++++++++++++++++ package/zxing-cpp/zxing-cpp.mk | 14 ++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/package/zxing-cpp/Config.in b/package/zxing-cpp/Config.in index b72a00ec35f9..f5883045fb1a 100644 --- a/package/zxing-cpp/Config.in +++ b/package/zxing-cpp/Config.in @@ -17,3 +17,30 @@ config BR2_PACKAGE_ZXING_CPP compiles the C++ port. https://github.com/zxing-cpp/zxing-cpp + +if BR2_PACKAGE_ZXING_CPP + +choice + prompt "readers/writers support" + default BR2_PACKAGE_ZXING_CPP_READERS_AND_WRITERS + help + Select what you want to enable and then compile + +config BR2_PACKAGE_ZXING_CPP_READERS + bool "readers only" + help + Build with only readers (decoders) support + +config BR2_PACKAGE_ZXING_CPP_WRITERS + bool "writers only" + help + Build with only writers (encoders) support + +config BR2_PACKAGE_ZXING_CPP_READERS_AND_WRITERS + bool "readers and writers" + help + Build with readers and writers support + +endchoice + +endif # BR2_PACKAGE_ZXING_CPP diff --git a/package/zxing-cpp/zxing-cpp.mk b/package/zxing-cpp/zxing-cpp.mk index 86a1ef96806d..c37769ea5d6b 100644 --- a/package/zxing-cpp/zxing-cpp.mk +++ b/package/zxing-cpp/zxing-cpp.mk @@ -12,8 +12,6 @@ ZXING_CPP_INSTALL_STAGING = YES ZXING_CPP_SUPPORTS_IN_SOURCE_BUILD = NO ZXING_CPP_DEPENDENCIES = host-pkgconf stb ZXING_CPP_CONF_OPTS = \ - -DBUILD_READERS=ON \ - -DBUILD_WRITERS=ON \ -DBUILD_BLACKBOX_TESTS=OFF \ -DBUILD_UNIT_TESTS=OFF \ -DBUILD_DEPENDENCIES=LOCAL @@ -28,4 +26,16 @@ else ZXING_CPP_CONF_OPTS += -DBUILD_PYTHON_MODULE=OFF endif +ifeq ($(BR2_PACKAGE_ZXING_CPP_READERS)$(BR2_PACKAGE_ZXING_CPP_READERS_AND_WRITERS),y) +ZXING_CPP_CONF_OPTS += -DBUILD_READERS=ON +else +ZXING_CPP_CONF_OPTS += -DBUILD_READERS=OFF +endif + +ifeq ($(BR2_PACKAGE_ZXING_CPP_WRITERS)$(BR2_PACKAGE_ZXING_CPP_READERS_AND_WRITERS),y) +ZXING_CPP_CONF_OPTS += -DBUILD_WRITERS=ON +else +ZXING_CPP_CONF_OPTS += -DBUILD_WRITERS=OFF +endif + $(eval $(cmake-package))