From patchwork Sun May 19 07:25:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3102 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 324003FA4D for ; Sun, 19 May 2024 09:25:13 +0200 (CEST) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-574f933ad35sf3691292a12.0 for ; Sun, 19 May 2024 00:25:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716103513; cv=pass; d=google.com; s=arc-20160816; b=V7QnU0Tg55dJ+DwWlT6FfWKvI4vQMrJIngRgZ9r8+fRPRUHWvFBonDvqXRNOYLWCHC zWaAadQDnHXcw+9zb6NRrDmYwmbbusDRXcwJ03cMry2Opby5NreR8bHtaPb367z5R0Zl qL+BT8plZBBopkHozzZbAPKTcp3rbifTkqfZrexDjyS+p9O+Wy+uLl5TQdRI55jJz6LL YuhxjsfkctAc0yNbfFsi7y5G/RbjqM94nI6GUK1Ud61cSQGEn//VHFzDj2VyO/uaz/oK lKX1ruE8jrImmuxTZ8AxHR3QzvsUflRdgLS0mE6pJtUMLc16kUBnfj6m/DwEHoyOiE4z In7Q== 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=im6J92GRquldKt57yF8cKmDXGOyjE8tGUvPVV+wBYd4=; fh=Xi5z0Er3lHHgXXzVPjTriS+ytsoBFwlvkbSPL2YX3Cc=; b=QphTjmIQcZvCFObkTM/aYhcA+6o9B/HiwUJ9Ak6onFVKJH27750lXN0ajwmBOuZXJn OoF/wCVsWCu++c1l4Arvk4uPdufrpCVMbRrE1g84bDMjIB7GJhSdf3Ije5Ei/78990xH FHeGXblBHNpYaePqyjbLqitiijnJhr0s9YXpkq7ohNv/FdzUo5ZFmiP3Bm7iEqAXJQ8V eCpoBkyfwx9yGJGGocUK96LqSxn0oV2pBHSwQbjx04cwqMF6dv0mXefCjJTe5xL6SdxI onjtS1exO/35nElXWpJANDgY67NuXVToYu0Galc4iv5m+9ugMd+q3Zn3/bjULfsBx8ro zLHA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=d7T20sb5; 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=1716103513; x=1716708313; 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=im6J92GRquldKt57yF8cKmDXGOyjE8tGUvPVV+wBYd4=; b=fx+c/fKmlriFrBwx/5rdsZRt7QJFANfU0qk7iEg25enu6Xm3Nez5wu3VCgUPQSR+yb 5x6PTVgBwxkiT9QZQ97KMgGy05w6XdqkrA/oHTDBDuC6VQmODJgSeSwwBXe6euYmC1pL gJ4cEu5wu+fmaj8EhiE4/3PBR1ZqikBvpJAN0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716103513; x=1716708313; 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=im6J92GRquldKt57yF8cKmDXGOyjE8tGUvPVV+wBYd4=; b=cp6vDatBAjM3Z5fM5zGshPEOofCmNXAeRuGxKtzHNuXG2T5NXQ5NfUXmP26DcAHFXL uiJ7+PoHgAlOf+obCHG0WNDaRaLZtTgcY8sR5M7NgPcL8YvYhs2mD2q456JakbY/h3Ec icpiqKuA6rYLT0ifQT4bfHwyX/8drOH+O/ym+a7wUjSkl6e2SDgoC1B0vIe7oZgjdAOG QBs3NvezbKwm4gOfCSmuifRJmL0qBSHTplqQbF3l5dxvVyn1XG+k66QhGQjXNLpXL3NP jhJpYQZbF9i9fYOahQtUXl/LojfUDAQoR9VmBP4n6gecLDZ6qA8xRwFK/oNYQnpSDrpJ Bksw== X-Forwarded-Encrypted: i=2; AJvYcCUzRUxjEeDE+Os4WX2lmFWKuZMnLpbpBjCg2ld2r4fTbRrxdc9OrA1CrpSj7ve/3xD/fNgkqNrybxImvqpVKHlwObqjxnJo3Ry5ut0/Gna4GTQStI7wxFHYU7Z5UA== X-Gm-Message-State: AOJu0YyrxlmW4vDhrVTJWm3myZ+fx2d0ubWJHX8E9xdK2Ri76MTSuxWy jCWB5mgkGxMkfaHUP7r66f7oUlX4LMAXQ082Lb5DDLPoxaHAUGs/+leWrDc5A5Nqwg== X-Google-Smtp-Source: AGHT+IFdYk8iOJQOrz9+0svnxkfXjqFMuUnLXJ+FECbp+aTnZtx0Qv8BiQNtLSZ5CbgdDqgDcJg6bg== X-Received: by 2002:a50:d685:0:b0:572:9b20:fd with SMTP id 4fb4d7f45d1cf-5734d67af65mr16970618a12.31.1716103512564; Sun, 19 May 2024 00:25:12 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:3209:b0:574:ec46:5ac1 with SMTP id 4fb4d7f45d1cf-574ec465b91ls3134997a12.1.-pod-prod-02-eu; Sun, 19 May 2024 00:25:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW6oxRzj9I3gXT2YbnL87IuBBe6X/7NJevUH0ku66XZnE9rftFZY0OWacV/NhxV64tkmsAT0aV75UBy0ud4tmLPHNj/h9W+7dHGgQiyUoqZsL9/ X-Received: by 2002:a17:906:3155:b0:a59:9e01:e784 with SMTP id a640c23a62f3a-a5a2d53ad83mr1506253766b.5.1716103510856; Sun, 19 May 2024 00:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716103510; cv=none; d=google.com; s=arc-20160816; b=IxykD4jdhZy4a9sbYNYn3nckVBBsp5nsQujlsyZmpzORY/QAXDw43HkYs4ASbFOXl/ 4JOxxLPvhxqnT14VS5DxW7S0kVK8g8eQyE8iu5T6q/cwHQG/XFKRk8dFwDPv6mP6k+fU hm4y/Nt2F4PJMq5LvAobvNgsth924uEiZP2g7o4hpHUNNLzvV6hc2ISC89IVpVv+smQx dMZhtHvTuNLweGw6Xt2KBdV5RbMcQj4KY90MPQ8mvWm3ut68kdWI9Dj87APhendHWtn3 CGDrSSUBKdKojNyDFoy3z4B/uDo5BdUy1Au/o2d82eOQiqrBLs+C+PNmDzRlFubqCFDj nvvQ== 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=vUgnQH8L0WDBxjygMpzDDvyAV2nU2KACV9HY4GrmpKU=; fh=M/244zSUSJUurNnvS/mYX/mU0zD3txIAAmvIWScxyk4=; b=YVyrEKlnCJ79QUfa0A7JuTGJGstHCuvi46u8GzRwgEPNRmMA7TzDUqOB5+ABU79Vf+ 4Q/Jd4vQWY7jTMra+bQjxZU9QEBHprCe+VCFQQPJPjGPWvqz9kW1ncZWQOEu+fyuOrH1 +CU5MIqJUes5E1AeKaew5Q35yLFkqld8eWZi45YY6j4dEEbGOBd9cb8c/K5xv46h62wp 2VaQ1Y5qUtOI2b6YSWDRtpFkcVCdt8xlkg3dNYQVIJwC8TMWqydzOOuGooNBa/sO7pth sLiplvv7Fk5iydbng0XKsNx5SuRAYb+liedoMVpht7a4A7ZoOgMAel1vzMKQkziCgf48 WqAQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=d7T20sb5; 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-a5a179c6007sor552740666b.14.2024.05.19.00.25.10 for (Google Transport Security); Sun, 19 May 2024 00:25:10 -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; AJvYcCUwqHkbGDSAicwOQB4Hv+NsD8AirmmIukfMhjFVFPCI/TAsYIbqgh+EwBCBl3jLL/+3yHo2KhJzWOGtnJij1mu4qf3pMcHeX7RjusLFi7E+gvAU X-Received: by 2002:a17:907:1b0d:b0:a59:cbb5:e09f with SMTP id a640c23a62f3a-a5a2d65f230mr1950400666b.53.1716103510301; Sun, 19 May 2024 00:25:10 -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 a640c23a62f3a-a5a17b17f2csm1300299366b.197.2024.05.19.00.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 00:25:09 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Frank Hunleth , linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Dario Binacchi , Thomas Petazzoni , Francesco Nicoletta Puzzillo Subject: [PATCH v3] package/zxing-cpp: add options for enabling readers and/or writers Date: Sun, 19 May 2024 09:25:02 +0200 Message-ID: <20240519072502.1142825-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=d7T20sb5; 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. Co-Developed-by: Thomas Petazzoni Co-Developed-by: Francesco Nicoletta Puzzillo Signed-off-by: Dario Binacchi --- Changes v2 -> v3: - Add 'select BR2_PACKAGE_ZXING_CPP_READERS if !BR2_PACKAGE_ZXING_CPP_WRITERS' and drop comment. - Add Co-Developed-by tags 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..e5b8cfcdd8aa 100644 --- a/package/zxing-cpp/Config.in +++ b/package/zxing-cpp/Config.in @@ -10,6 +10,7 @@ config BR2_PACKAGE_ZXING_CPP depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_STB select BR2_PACKAGE_PYTHON_PYBIND if BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_ZXING_CPP_READERS if !BR2_PACKAGE_ZXING_CPP_WRITERS help ZXing-cpp (pronounced "zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library @@ -17,3 +18,19 @@ config BR2_PACKAGE_ZXING_CPP compiles the C++ port. https://github.com/zxing-cpp/zxing-cpp + +if BR2_PACKAGE_ZXING_CPP + +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))