From patchwork Sat May 18 09:40:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3101 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 074B33F9C2 for ; Sat, 18 May 2024 11:40:15 +0200 (CEST) Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-521a7e375a7sf8553643e87.2 for ; Sat, 18 May 2024 02:40:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716025214; cv=pass; d=google.com; s=arc-20160816; b=UWWaBHeLYS1XAgwKl0SakBQKtgDbgRN2kEHsyjmXGm3K8b1uyOsZaFuy9pF+LsQ26g kM7fRYxtSdQje2kZ6xoL2MCTdjjs6/DcObHWUWhnSpCJDYx21bDz7qU6Gtn3mP9SKuWw g5+TzZVpfHTZPAlMHfDccrwWxhMZGwQlGjyvSWR9oGyJxioTPoktE6sv1K2EELTSJU7j dx6fJUXEr1HoeQ/jG3Xq/KwnhMdkstwPjit5rHzD/iUu/NW58bBW/2kqSYvszhqEDFkY 6cs30o4cdd0HPpkaO9fwYiPWH6YbGNHlqqaYSwUdPzM9rW0iyRrezrBFl5IGT+LgLrjF EI0g== 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=PCsIl0w2CaTXj1kJqetZL/w+0/RY13d7dt6wNL4SCKk=; fh=obGHxWJlrFCaIBfee5jUHbHmVtIiOP1nulCqHdvM3AQ=; b=Hwb2TBq0/FqLXvuPdP6D4ARPx99piJ0fP3Xd9Otejk9XDmj4z0FbRSvX9U55F9R+JT k3DpJu2TithWN/re3hJZZdx43oFsM3UTxb0J5YNtK0oxV7K8+Yk3V1aPwNC65PsTzfzf PKAd5bl+HODYhRRFeXDe9oiUvoY7LIUexOkGsrJOIwqlysYjC7GWSWAoYHJFTcYqdNks BAeqDC4YEkUgp8KXPhaSLrY3omAy4iVm8H9fKBwYjNtRX8WYK6FH4/l0Cgfrc7S1dVed tlAK6E+u3/DWZEco7uw2U742Ipy466q3I/YlO2Po4mCRhvYZXQEy2HlXQPDcQz7j6v3W HI5w==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="bB/5RWVT"; 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=1716025214; x=1716630014; 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=PCsIl0w2CaTXj1kJqetZL/w+0/RY13d7dt6wNL4SCKk=; b=KlsT4cqh0nKVSw+01lKtt13V90XUROPrXnotqniOeIyUEbq7ue1dRZf4G+u5a1d3jG axrcAa09k8j0gybXY4e1L/1eLmKYdR3NVjCWlDn2CT6gr/q0olE6bHinkGe4fNMzRcZj 9bxSQYucd/HsR5y7iHl5LefWxmF9u1ppve6i0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716025214; x=1716630014; 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=PCsIl0w2CaTXj1kJqetZL/w+0/RY13d7dt6wNL4SCKk=; b=dVS5vyqAfuGVPOk3Sb/8WMQuHMCtkH2qN4PvtWM7PGppJ0iNqFUVZo4C0dqdcY+9EA mqgj40CbYjvwKbLfuGxUnrNf7Lr6axbzFnRd4Fe3RSZSW3z8f9Ug1rqF/HZMkdGG437T G4WoVDUAIsok5IoHcEvUerz+ifLAOTHjEXtclKCZsaVSelOsCQtOyDVDSOLTBi8Niccn kwtGVxL7gAj2EQyea1lzqVad2OzV0OAnsHHqIS91Ya0N3ompA/SblmFyfjAbDt2O4M9x CcNr4g/9kyLRPbnzvDrKJ37EnpiSYrlIiPQdd2vrMpa0j+zaY3h9esDQdQt3MWf70zfp q8CA== X-Forwarded-Encrypted: i=2; AJvYcCUH5RyxiDZtA4eVusyZo+qnsT8kgepyjIE8JEPcND26ZaKAg/RvBRY9/Mwtb/EG3L4VMI3wdTa4K1KmHXhhoXxjYAc8lUeztDhKTfbI1f5Gnpp8QWS7Wcr+PoGxeA== X-Gm-Message-State: AOJu0Yyo0lARoRk4FzOYxCbkzj7Sk6ackHf2rtOsI73GQz9ZO0rRUXey IoijLvkABEPLGAvOdtIW+xzHvSQIuuxlE8aKVqJgDQuDsC9zpsSfIMMGRlLZ+oiBaw== X-Google-Smtp-Source: AGHT+IE+voZEhhzRkaqACOlQZxOqqJ+/qvIiOn6WkOfC3NCJUXGnNbdxb9OvK/gcohO7i1/wLRUQSw== X-Received: by 2002:ac2:5b50:0:b0:51b:e46c:19fc with SMTP id 2adb3069b0e04-5220ff72e7cmr14683985e87.58.1716025214021; Sat, 18 May 2024 02:40:14 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:ac2:4c4e:0:b0:520:5261:9cbb with SMTP id 2adb3069b0e04-523e0da8b80ls1037223e87.2.-pod-prod-06-eu; Sat, 18 May 2024 02:40:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWLfFDELIiUgnG1izggh9aDNPMiltH8lWrg+qqSLiCeaInL4VpH87XrzHT2zTUM0msAfkfLSbqM4+yut+fOiAkXgtsGMAAvwiCvy7PaTdrup8AQ X-Received: by 2002:a05:6512:6ca:b0:523:8f5e:4aa0 with SMTP id 2adb3069b0e04-5238f5e4b78mr7930734e87.63.1716025211769; Sat, 18 May 2024 02:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716025211; cv=none; d=google.com; s=arc-20160816; b=jKOvjGJLmpOQKevaQs8l/9akatr1/0QeM3zR86uH/34yhhvWO4P2CQh2fflr5TG/IN Topbe9sAGujXhHdUBV0q6LrrdFhYenjW8duVfXXHjDGfD7WWFpRE7lHl6AngSwsCn5Uc Stn1WwoPsQaA6zvqe7ieA1ivzvpdkGvu60h7nVSvR4vc2C82l4CFPFNAlBWzJJVLE7fI 551jMxAN1s+CL2lhfBHKrbTgP/jWYENkHyCXpHnrHq2ho7TTZo8Ln9Jae5h2pqZB+RVn GXVog3vKtai9JITRePKzvEiAzNzqkk2ShJIaOqc1O7c+l2dIypvUuKYLjxN72pOZATVk 4upg== 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=6wvydTvGDOqb+PzWb1dseK0cO4YUQxFAvwyWX0nEZsM=; fh=WfIN1z/KE9PyeSkV5zKEMOixjWMUqPFaSSuJQLHCxR8=; b=RIrkv7j/E9qLtFvxNeWOLL+mW6ME7e7RDoqd6H+FB3jhAoaFJwFa0Zv3RaiGWktg0W M3oO8uwbkcSPB0d10jmkSCi0CwfqcNZJq7lFn3wl8QRKj0O/eZHuIrQZtrxHhVQCUrXf Y2H12RmfioJOUrI7+qlPP7AEW2ClfBwQzPZMUkNw2hlxC+BHTkauw3yCno2hA6oeUzY4 cHqG2XiU8VgJD72c4xSgkp29t2H3URbuf7sAhbBlHs2HAoS5p/YoXr1Z1gj6OUXyl0EK Q5ZSSxGidC6zR8RvqygKx4kwL7ykUOUd+FgpN88tqoJT3g0fWoyyoSI1+/b46ouuM6P8 hplQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="bB/5RWVT"; 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 a640c23a62f3a-a5cdcdd943fsor195053066b.0.2024.05.18.02.40.11 for (Google Transport Security); Sat, 18 May 2024 02:40:11 -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; AJvYcCWajYvy/3WR07lN2JoVYH0UQcGDFo8ZMPjNugp0+z2RHTlgrcBptxcBA15Bn748pq0tw6iC27bVuVhhuKeB/KY9YYLNoswsHOqtks7VISY2vxfX X-Received: by 2002:a50:ab59:0:b0:572:a711:3daf with SMTP id 4fb4d7f45d1cf-5734d7047damr14451428a12.40.1716025211119; Sat, 18 May 2024 02:40:11 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-8-99-67.retail.telecomitalia.it. [87.8.99.67]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733bebb73esm12850718a12.31.2024.05.18.02.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 May 2024 02:40:10 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Frank Hunleth , Thomas Petazzoni , linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Dario Binacchi Subject: [PATCH v2] package/zxing-cpp: add options for enabling readers and/or writers Date: Sat, 18 May 2024 11:40:06 +0200 Message-ID: <20240518094006.1134068-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="bB/5RWVT"; 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. At least one of the two options must be enabled. 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 --- Changes v1 -> v2: - Drop BR2_PACKAGE_ZXING_CPP_READERS_AND_WRITERS selection package/zxing-cpp/Config.in | 17 +++++++++++++++++ package/zxing-cpp/zxing-cpp.mk | 14 ++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/package/zxing-cpp/Config.in b/package/zxing-cpp/Config.in index b72a00ec35f9..511c21e7360a 100644 --- a/package/zxing-cpp/Config.in +++ b/package/zxing-cpp/Config.in @@ -17,3 +17,20 @@ config BR2_PACKAGE_ZXING_CPP compiles the C++ port. https://github.com/zxing-cpp/zxing-cpp + +if BR2_PACKAGE_ZXING_CPP +comment "At least one of readers/writers must be enabled" + +config BR2_PACKAGE_ZXING_CPP_READERS + bool "readers support" + default y + help + Build with readers (decoders) support + +config BR2_PACKAGE_ZXING_CPP_WRITERS + bool "writers support" + default y + help + Build with writers (encoders) support + +endif # BR2_PACKAGE_ZXING_CPP diff --git a/package/zxing-cpp/zxing-cpp.mk b/package/zxing-cpp/zxing-cpp.mk index 86a1ef96806d..077d7e75d3dd 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),y) +ZXING_CPP_CONF_OPTS += -DBUILD_READERS=ON +else +ZXING_CPP_CONF_OPTS += -DBUILD_READERS=OFF +endif + +ifeq ($(BR2_PACKAGE_ZXING_CPP_WRITERS),y) +ZXING_CPP_CONF_OPTS += -DBUILD_WRITERS=ON +else +ZXING_CPP_CONF_OPTS += -DBUILD_WRITERS=OFF +endif + $(eval $(cmake-package))