From patchwork Fri Jun 7 16:32:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= X-Patchwork-Id: 1945172 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vwmvc36qLz20Q5 for ; Sat, 8 Jun 2024 02:32:42 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 72FF44270A; Fri, 7 Jun 2024 16:32:39 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id gbVUxu5a7_Kp; Fri, 7 Jun 2024 16:32:38 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 493014270B Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 493014270B; Fri, 7 Jun 2024 16:32:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 81CE61BF47A for ; Fri, 7 Jun 2024 16:32:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 6E0A940272 for ; Fri, 7 Jun 2024 16:32:36 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id xbWC5PJ0LuHw for ; Fri, 7 Jun 2024 16:32:35 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::12a; helo=mail-lf1-x12a.google.com; envelope-from=raphael.melotte@essensium.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 564034004A DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 564034004A Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by smtp2.osuosl.org (Postfix) with ESMTPS id 564034004A for ; Fri, 7 Jun 2024 16:32:33 +0000 (UTC) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-52bc1acb9f0so633509e87.2 for ; Fri, 07 Jun 2024 09:32:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717777951; x=1718382751; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d9qwp+9rh+B0R5IeYN89qYMCYT/I32QR0xpyr0AfoQY=; b=eeobgYyoaJaK8isLXelKtQdFOZrYepIlSSkKjqEc4rBaHSrEZPlY/vQPaEVYprUgqv iEKTKjoNujHsyV1PGhAo2iFCp/dp3jCHlfYrSZi6jsP3lzU80k0UVJpqk3Q6hoDIc4U5 oGX6qxXKiWIL7P0lGir3lmd/fziRQbz2g0WItPaKB2bzUnhHek+gmjl/K/TDPzWmKPOi jFNAs0DNmsKj7hRrqdHyahYnXVUz/Y4nB6NcoKmASftnLI6/QQ9JqEj9TOtWIaGVrULf LeJwiFs+scD/VcjJ49K80JIoQOdjiNGXhZwcvHzkZj5DIyj5EOQDHxrWRmxkLWrnTliS M2kw== X-Gm-Message-State: AOJu0Yzqu1yTrx38KmY1Xr2QinC4HNIvVwNGNIKF2z/HVt138bVzrwGh rIxKEnqnDuNQTR/HvNyMW+klnwD+/td3LSnJo3GXd7O7m+k0u4GSa/CoDGuQCqjbnpWTN2bfHZT l/tc= X-Google-Smtp-Source: AGHT+IE2y8nZ5LMz2uMMyVhjUkGB5uhTR2dvdHNDphL6vz3lnV3zsxcmGOjUMxww+mMtvd14OEWLWQ== X-Received: by 2002:ac2:4895:0:b0:52a:b1d7:1ba with SMTP id 2adb3069b0e04-52bb9f77271mr1914521e87.27.1717777951316; Fri, 07 Jun 2024 09:32:31 -0700 (PDT) Received: from junian.fritz.box (94.105.103.7.dyn.edpnet.net. [94.105.103.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215c2cd7e7sm55804205e9.46.2024.06.07.09.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 09:32:30 -0700 (PDT) To: buildroot@buildroot.org Date: Fri, 7 Jun 2024 18:32:02 +0200 Message-Id: <20240607163208.1445715-1-raphael.melotte@mind.be> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20240216211344.1807353-2-raphael.melotte@mind.be> References: <20240216211344.1807353-2-raphael.melotte@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1717777951; x=1718382751; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d9qwp+9rh+B0R5IeYN89qYMCYT/I32QR0xpyr0AfoQY=; b=REeCpHhzQ0SiNDLJPtZib24sqaUtnoYG0Xt6Rw3VOPaNkiUY9D/BT948NKNKzvN3N1 jvZbwl3f1V0JP9px3efhhXgKtP93xQe3jywIwJN4TagO24llENCPL4exHN2QFSnO1/bU jP0vWKLRvzuPmEaJUsZ+lRx2Lk+nKbhvn467UZamXCcwMSKbWDOxuYPelGHHIRUS9LRi lG/bM8tWKzfl2E0aM7TFv1f2xtqRpoeoUmJxDBtWseWLBd23drz7BzWx3qIDeS8xP6RL mN/RP52wAWiA55PkWt9MP2ZGsTHHgXOcsvbJVAxLfcTDpFL06MLNhJLXkkTaUFh5du3Z lE4w== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=mind.be X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=REeCpHhz Subject: [Buildroot] [PATCH v2 1/5] package: python-pymupdf: add missing python-zlib dependency X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: =?utf-8?q?Rapha=C3=ABl_M=C3=A9lotte_via_buildroot?= From: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Reply-To: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Cc: James Hilliard , =?utf-8?b?UmFwaGHDq2wgTcOp?= =?utf-8?b?bG90dGU=?= , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" It turns out that python-pymupdf doesn't require zlib directly, but it does require the zlib python module. This fixes the following runtime error: Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.11/site-packages/fitz/__init__.py", line 22, in File "/usr/lib/python3.11/site-packages/fitz/fitz.py", line 3402, in File "/usr/lib/python3.11/gzip.py", line 9, in ModuleNotFoundError: No module named 'zlib' Signed-off-by: Raphaël Mélotte --- package/python-pymupdf/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python-pymupdf/Config.in b/package/python-pymupdf/Config.in index ecaa5496b5..3831a25451 100644 --- a/package/python-pymupdf/Config.in +++ b/package/python-pymupdf/Config.in @@ -7,7 +7,7 @@ config BR2_PACKAGE_PYTHON_PYMUPDF select BR2_PACKAGE_HOST_SWIG select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_MUPDF - select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_PYTHON3_ZLIB # runtime help Python bindings for the PDF rendering library MuPDF. From patchwork Fri Jun 7 16:32:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= X-Patchwork-Id: 1945173 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vwmvg1qQ8z20Q5 for ; Sat, 8 Jun 2024 02:32:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3C58842750; Fri, 7 Jun 2024 16:32:43 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id LWiYdJxsYEI1; Fri, 7 Jun 2024 16:32:42 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 345F042766 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 345F042766; Fri, 7 Jun 2024 16:32:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 2E8FC1BF47A for ; Fri, 7 Jun 2024 16:32:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 118A54270B for ; Fri, 7 Jun 2024 16:32:37 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 8OQd8F-QZwoY for ; Fri, 7 Jun 2024 16:32:35 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::32c; helo=mail-wm1-x32c.google.com; envelope-from=raphael.melotte@essensium.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 64C3B4270A DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 64C3B4270A Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by smtp4.osuosl.org (Postfix) with ESMTPS id 64C3B4270A for ; Fri, 7 Jun 2024 16:32:35 +0000 (UTC) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-42163fed884so12226185e9.1 for ; Fri, 07 Jun 2024 09:32:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717777953; x=1718382753; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KgPciTO8HDkbK0gGfreJ0D0fWee2HpBooNBbRqR8cRQ=; b=Q6j0R86lR5tafFzO4KKjaXqJn/F8KolWzzW/kK/exuqK/1NtshOamBfnMciju0IBW+ ksTJ53UST9TRekvKg66uAm1P6jafqJ0gw6euG+xhPvWB60yB6d3gZMBKu6xRrwkSJvlJ IFmMdrE+idG7vUk7ViAPI5fRx4G0nFboxJJDIs6HTVzA4oS1P+QVRBudfwyk4Lo6QJjB WD2HpD/ZsmyVkL6LyW/spc/7cg1KUn3Hh5moXUaPG4OIOhQNw2pAYQ4cMiGhCIgjxqQw QKtkjgvJvhdM5I+1xkxcV2Ohn9HrKwfZzH0UTcWtHuep3gTXL5AR4QpZ7lTBGHnLQYGH BlEA== X-Gm-Message-State: AOJu0YwIwqz0qMfYjjtr9g21JylAYS/AMxgyd6457fwQ98UB/oinVpbX HW79uuZdllgp7xzKQn/tUf7jG2SDRVRblEb2jCDDuDOXmeepxgG3+aia6dOOotfoXxoENWyAz4c NHeI= X-Google-Smtp-Source: AGHT+IEiF4zmOJZqlbqqNRbmV6J4KNeG8QyfYrP6AVqi4zwpYgBM4WZ2cKuRNPHFVQgl1YEWdUGVtg== X-Received: by 2002:a05:600c:1551:b0:421:4786:eb0c with SMTP id 5b1f17b1804b1-42164a44b35mr24892935e9.33.1717777953006; Fri, 07 Jun 2024 09:32:33 -0700 (PDT) Received: from junian.fritz.box (94.105.103.7.dyn.edpnet.net. [94.105.103.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215c2cd7e7sm55804205e9.46.2024.06.07.09.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 09:32:32 -0700 (PDT) To: buildroot@buildroot.org Date: Fri, 7 Jun 2024 18:32:03 +0200 Message-Id: <20240607163208.1445715-2-raphael.melotte@mind.be> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20240607163208.1445715-1-raphael.melotte@mind.be> References: <20240216211344.1807353-2-raphael.melotte@mind.be> <20240607163208.1445715-1-raphael.melotte@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1717777953; x=1718382753; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KgPciTO8HDkbK0gGfreJ0D0fWee2HpBooNBbRqR8cRQ=; b=URowmKVTUmCVYJE04rUgYGh7lwbLPBrAalnuOgfHXMbm2n08r5vCKl1SzZ7kRwHylo 0RXlY8IeCQPFa3UK3tYEWM7wd9JsNbc1dFafha15b4842vEiMVI5yVtIr30O6i3iBL/h CxiFx4asCDAlv+aMVK47LgfZ8vva9ueAXvXzPcZbN/vYc9EbqMfa5oCBteZ7Tvybuhok jObsAYjiZuD5KBFWEFzLpne+qopR/14T3pm2UcqU075N9wHSHFRyymwVd69L4sAZ9ApT J8vbMwIaoNVFZQQGrcMjqvXbFgLJuvrqsdvAEIuhB6XGgtAezNhNOuciBVaj652DeU0l 7y8w== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=mind.be X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=URowmKVT Subject: [Buildroot] [PATCH v2 2/5] support/testing: add new test for python-pymupdf X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: =?utf-8?q?Rapha=C3=ABl_M=C3=A9lotte_via_buildroot?= From: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Reply-To: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Cc: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" To give us a chance to catch runtime issues (such as missing dependencies) more easily, add a test that writes a sample PDF file, read it back and verify the text that was read. Like similar packages that lead to a big rootfs (e.g. python-botocore), this test requires a separate ext2 rootfs to avoid filling the default amount of RAM available entirely (which would cause missing files from the root filesystem and in turn, test failures). Signed-off-by: Raphaël Mélotte --- DEVELOPERS | 2 ++ .../tests/package/sample_python_pymupdf.py | 17 ++++++++++++ .../tests/package/test_python_pymupdf.py | 26 +++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 support/testing/tests/package/sample_python_pymupdf.py create mode 100644 support/testing/tests/package/test_python_pymupdf.py diff --git a/DEVELOPERS b/DEVELOPERS index 03aa7bfa74..e4c3920ce2 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2667,9 +2667,11 @@ F: package/python-pymupdf/ F: package/python-rsa/ F: package/python-s3transfer/ F: support/testing/tests/package/sample_python_jmespath.py +F: support/testing/tests/package/sample_python_pymupdf.py F: support/testing/tests/package/sample_python_rsa.py F: support/testing/tests/package/sample_python_s3transfer.py F: support/testing/tests/package/test_python_jmespath.py +F: support/testing/tests/package/test_python_pymupdf.py F: support/testing/tests/package/test_python_rsa.py F: support/testing/tests/package/test_python_s3transfer.py diff --git a/support/testing/tests/package/sample_python_pymupdf.py b/support/testing/tests/package/sample_python_pymupdf.py new file mode 100644 index 0000000000..574bd27965 --- /dev/null +++ b/support/testing/tests/package/sample_python_pymupdf.py @@ -0,0 +1,17 @@ +import fitz + +# Write a test PDF file +outfile = "python-pymupdf.pdf" +sample_text = "This is a test page for python-pymupdf." +doc = fitz.open() +page = doc.new_page() +p = fitz.Point(50, 72) +page.insert_text(p, sample_text) +doc.save(outfile) + +# Read back the file +with fitz.open(outfile) as d: # open document + read_text = chr(12).join([page.get_text() for page in d]) + +print(read_text) +assert(read_text == sample_text + "\n") diff --git a/support/testing/tests/package/test_python_pymupdf.py b/support/testing/tests/package/test_python_pymupdf.py new file mode 100644 index 0000000000..5e9d5a6912 --- /dev/null +++ b/support/testing/tests/package/test_python_pymupdf.py @@ -0,0 +1,26 @@ +import os +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3PyMuPDF(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_PYMUPDF=y + BR2_PACKAGE_XORG7=y + BR2_USE_WCHAR=y + BR2_INSTALL_LIBSTDCPP=y + BR2_TARGET_ROOTFS_EXT2=y + BR2_TARGET_ROOTFS_EXT2_SIZE="250M" + """ + sample_scripts = ["tests/package/sample_python_pymupdf.py"] + timeout = 30 + + def login(self): + ext2_file = os.path.join(self.builddir, "images", "rootfs.ext2") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-drive", "file=%s,if=scsi,format=raw" % ext2_file], + kernel_cmdline=["rootwait", "root=/dev/sda"]) + self.emulator.login() From patchwork Fri Jun 7 16:32:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= X-Patchwork-Id: 1945174 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vwmvj53jqz20Q5 for ; Sat, 8 Jun 2024 02:32:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 19D23427D8; Fri, 7 Jun 2024 16:32:46 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id MziysTzXl4rl; Fri, 7 Jun 2024 16:32:45 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org DFA41427CB Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id DFA41427CB; Fri, 7 Jun 2024 16:32:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 6A7D31BF47A for ; Fri, 7 Jun 2024 16:32:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 574EF403B3 for ; Fri, 7 Jun 2024 16:32:39 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id h3GWerKH8ywo for ; Fri, 7 Jun 2024 16:32:38 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::32b; helo=mail-wm1-x32b.google.com; envelope-from=raphael.melotte@essensium.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 3832740272 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3832740272 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by smtp2.osuosl.org (Postfix) with ESMTPS id 3832740272 for ; Fri, 7 Jun 2024 16:32:36 +0000 (UTC) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-42166eb31b2so7968285e9.0 for ; Fri, 07 Jun 2024 09:32:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717777955; x=1718382755; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LTRj47ZHlVOc3PVHZDry2pyQuWfEDa4Opbra9yZYbsQ=; b=TGB5I1Smavvje/GllQvoeTKlZeqEltiIKCwUpRmM5H5eyG5rtgyeP7wAMJUgWdY9Mb DHA0SJAGQzzeRA0vEGXxN2if4ENB/zT6iv1ylxHLmMuhA+pxqQj5pL7yGYH8R+ePy/CP M8AExBj9jE37p0kCYaTev4DT20nb8VqZ2zzLyN1kEYbQyf7GZ+0fm1t/uZe8pY4L4Nll W+BWR6w478eZlsNE0a90RnXROyd6Iv3X+ILNtBlo3peNfIupqGvarFFXANbzO/qbiabm CJCuM0U2xaMjYLk/JVge8/lS0AJqYBf7DO9coHCSnixaRVnM+9tvLEjOOH52CrpWsB8y gUvw== X-Gm-Message-State: AOJu0Yyo/1GxPfbPdoEz7mOSaBVKC3k29FEc/I6N+2eCWO9VzW8eYxD1 Aduydxdo1XXG/W3CccrIL7NEr8Qun9yyDOPHFgr8BG6v2kw/aRgktDi0KdxIvr6NAx5YBNrcmMU UNog= X-Google-Smtp-Source: AGHT+IEhXipUjPD2o8fz8EC0x5bNzC/Ykh70eWL+pL6yr84ETsKAfwq6a/ylTVaK+YrMwp0IswbExQ== X-Received: by 2002:a05:600c:3148:b0:421:6008:eae2 with SMTP id 5b1f17b1804b1-42164a21daemr24451045e9.32.1717777954606; Fri, 07 Jun 2024 09:32:34 -0700 (PDT) Received: from junian.fritz.box (94.105.103.7.dyn.edpnet.net. [94.105.103.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215c2cd7e7sm55804205e9.46.2024.06.07.09.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 09:32:34 -0700 (PDT) To: buildroot@buildroot.org Date: Fri, 7 Jun 2024 18:32:04 +0200 Message-Id: <20240607163208.1445715-3-raphael.melotte@mind.be> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20240607163208.1445715-1-raphael.melotte@mind.be> References: <20240216211344.1807353-2-raphael.melotte@mind.be> <20240607163208.1445715-1-raphael.melotte@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1717777955; x=1718382755; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LTRj47ZHlVOc3PVHZDry2pyQuWfEDa4Opbra9yZYbsQ=; b=E8yqZATeUqQpcJUgWNkeWRDr/d3ZDrlPavPxX+3OOKu0CnQdoQN0WtZUF9pOZpbpdH v2iPlvpklgqUefW00zVvC++Jc7N8v9ET35d3Ou6QLZdl9tIjK/OP+vE6ffj4Cifz41il NoSA36vxCHfdGWgPCvxHP2pjXOo5c98WGu2q42KzMSVDrDNYCyx9WVXstV0XmlxoxkRx RwVWZArJbGMYwehyCofp3Wd6cWmTm7gwWZj1LXn+wB56Y8SpAki4KQHU2X88n1nFTFEO Qjrsi4nJyyr0Ck7s91VB4SYwGTFi22lpbQiJoGsvbFDi2Fhi3kVppAiqJjVm/Pym2NMg 1Zog== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=mind.be X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=E8yqZATe Subject: [Buildroot] [PATCH v2 3/5] package/mupdf: fix building shared libraries X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: =?utf-8?q?Rapha=C3=ABl_M=C3=A9lotte_via_buildroot?= From: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Reply-To: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Cc: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" By default mupdf generates static libraries, shared libraries must be enabled explicitely. Signed-off-by: Raphaël Mélotte --- Changes v1 -> v2: - Remove SHARED_STATIC_LIBS depends and use explicit options. --- package/mupdf/mupdf.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/mupdf/mupdf.mk b/package/mupdf/mupdf.mk index 08894d7980..4673b88291 100644 --- a/package/mupdf/mupdf.mk +++ b/package/mupdf/mupdf.mk @@ -50,6 +50,12 @@ MUPDF_MAKE_OPTS = \ HAVE_OBJCOPY=no \ prefix="/usr" +ifeq ($(BR2_STATIC_LIBS),y) +MUPDF_MAKE_OPTS += shared=no +else +MUPDF_MAKE_OPTS += shared=yes +endif + ifeq ($(BR2_PACKAGE_LIBFREEGLUT),y) MUPDF_DEPENDENCIES += libfreeglut else From patchwork Fri Jun 7 16:32:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= X-Patchwork-Id: 1945175 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vwmvl6bK6z20Q5 for ; Sat, 8 Jun 2024 02:32:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5299E427E2; Fri, 7 Jun 2024 16:32:49 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id yVXNmmcAGsWC; Fri, 7 Jun 2024 16:32:48 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D7F71427DB Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id D7F71427DB; Fri, 7 Jun 2024 16:32:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 466DD1BF47A for ; Fri, 7 Jun 2024 16:32:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3F5C960825 for ; Fri, 7 Jun 2024 16:32:40 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id can_Z1Z81sxF for ; Fri, 7 Jun 2024 16:32:39 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::42d; helo=mail-wr1-x42d.google.com; envelope-from=raphael.melotte@essensium.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org C648F606A0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C648F606A0 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by smtp3.osuosl.org (Postfix) with ESMTPS id C648F606A0 for ; Fri, 7 Jun 2024 16:32:38 +0000 (UTC) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-35dceef429bso1305619f8f.1 for ; Fri, 07 Jun 2024 09:32:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717777957; x=1718382757; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eArKGzguE16zhSmBNJJd/+ebhOAkzBqcOyn3GNntJKc=; b=juxphXMO5j0tuYWqoafret3ZaUVUMCehuJvV5HyF0CUVd/uPLXqAWUTh/0eVPUq/mp amXB4jwSHO2DW73tnBPltLmWkw+thSN55I2Fg3xVozRQwfoSRY4+p3L8LLco03ZQfI0J VoysrFYLTuDAs4xs0RMBmgggDD0vyZuYf5zRYUIMp6b1MpVtojKfRWl+xN7jPkb8xDl8 63acDtNzaPEXKBj/Q1EXyMA+R/IhM0qm93Ab2mwLeDR+rUrkcmT/eWO/yfZyrEN0Qjzm gTAswP6xktshzj7Mo3ySRQFd5GrIoYixkpg6m3+AfiBYnsGmk9e7moSlONeVw3Tl7/rf csRQ== X-Gm-Message-State: AOJu0Yxn3iIgWWIlgL2JRF4emiwgIZDee0hkx+SWLiVoTEmBAl1ltQPO pTI1jOJPhhjObFgCvAhbdpfzSGpm6lwOlpTDVGFgF3wgpqBABO85zhRvYH39Sw/eF8PUIymgA6H gIOU= X-Google-Smtp-Source: AGHT+IHevmQw4l6Xu+aAeTjbWu1IJATTLs/X0XWVfILtBxpI4UPfuCCMrH52dPahOgijifoMYsNNdw== X-Received: by 2002:a5d:458c:0:b0:35f:ddb:70e2 with SMTP id ffacd0b85a97d-35f0ddb72f9mr995483f8f.1.1717777956243; Fri, 07 Jun 2024 09:32:36 -0700 (PDT) Received: from junian.fritz.box (94.105.103.7.dyn.edpnet.net. [94.105.103.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215c2cd7e7sm55804205e9.46.2024.06.07.09.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 09:32:35 -0700 (PDT) To: buildroot@buildroot.org Date: Fri, 7 Jun 2024 18:32:05 +0200 Message-Id: <20240607163208.1445715-4-raphael.melotte@mind.be> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20240607163208.1445715-1-raphael.melotte@mind.be> References: <20240216211344.1807353-2-raphael.melotte@mind.be> <20240607163208.1445715-1-raphael.melotte@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1717777957; x=1718382757; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eArKGzguE16zhSmBNJJd/+ebhOAkzBqcOyn3GNntJKc=; b=ZbX29LeZoIPsFIdio/CvBlumiNtd9ca4nHAASEBrwIXkCkdxC0JJUfP8TtJwKSYMkj nE+QiZyEy2kHoyfEG9nJAHSYvhZbsVRdjwcimv8i+pEUgT8uZ5yN1ziPb6GG/J3y00LC QSWF4MUaYCoGrP3qv1+Es0M3n3DDFT57tCjDNUDkXNu2FbSvHye+rKVFxE8+2T/zwujU dTYwnfNsxo/p7RISPPctq0Qu6e2hcq1hjjPBh5KPabKv8HK0TzEc+JiOQ33SHOYz5/Mp ytTgrMrdQqbOYFs4dg7i5M5ia1/wXBa077OW6X8OtZjZ6icdB9tTwjq5plOZ3VmWRFSg hxKQ== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=mind.be X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=ZbX29LeZ Subject: [Buildroot] [PATCH v2 4/5] package/mupdf: bump to version 1.23.9 X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: =?utf-8?q?Rapha=C3=ABl_M=C3=A9lotte_via_buildroot?= From: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Reply-To: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Cc: James Hilliard , =?utf-8?b?UmFwaGHDq2wgTcOp?= =?utf-8?b?bG90dGU=?= Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: James Hilliard Drop patch which is now upstream. Signed-off-by: James Hilliard [bump to 1.23.9] Signed-off-by: Raphaël Mélotte --- ...issing-limits.h-include-for-UINT_MAX.patch | 70 ------------------- package/mupdf/mupdf.hash | 4 +- package/mupdf/mupdf.mk | 2 +- 3 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 package/mupdf/0001-Add-missing-limits.h-include-for-UINT_MAX.patch diff --git a/package/mupdf/0001-Add-missing-limits.h-include-for-UINT_MAX.patch b/package/mupdf/0001-Add-missing-limits.h-include-for-UINT_MAX.patch deleted file mode 100644 index 95f2f86666..0000000000 --- a/package/mupdf/0001-Add-missing-limits.h-include-for-UINT_MAX.patch +++ /dev/null @@ -1,70 +0,0 @@ -From ebce9f1b129ebc8f2b17afa02a4ffcb9453c11d9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= -Date: Mon, 24 Apr 2023 17:27:35 +0200 -Subject: [PATCH] Add missing limits.h include for UINT_MAX -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -encode-basic.c uses 'UINT_MAX', which is available in the 'limits.h' -header. - -In some configurations that build with zlib from [1], by chance -limits.h gets indirectly included when including 'z-imp.h' (the -includes are: 'z-imp.h' -> 'zlib.h' -> 'zconf.h' -> 'limits.h'), so -the build succeeds. - -When using other zlib implementations however (for example from [2]), -limits.h is not necessarily included indirectly, which leads to the -build failing in the following way: - -source/fitz/encode-basic.c: In function 'deflate_write': -source/fitz/encode-basic.c:343:27: error: 'UINT_MAX' undeclared (first use in this function) - 343 | newbufsize = n >= UINT_MAX ? UINT_MAX : deflateBound(&state->z, n); - | ^~~~~~~~ -source/fitz/encode-basic.c:26:1: note: 'UINT_MAX' is defined in header ''; did you forget to '#include '? - -Add the missing include, so that the build succeeds no matter if zlib -indirectly includes 'limit.h' or not. - -Similarly, also add it in output-ps.c where it's also missing. - -[1]: https://zlib.net/ -[2]: https://github.com/zlib-ng/zlib-ng - -Signed-off-by: Raphaël Mélotte -Upstream: https://bugs.ghostscript.com/show_bug.cgi?id=706667 ---- - source/fitz/encode-basic.c | 2 ++ - source/fitz/output-ps.c | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/source/fitz/encode-basic.c b/source/fitz/encode-basic.c -index 03a4ff76b..84f0c35e6 100644 ---- a/source/fitz/encode-basic.c -+++ b/source/fitz/encode-basic.c -@@ -24,6 +24,8 @@ - - #include "z-imp.h" - -+#include -+ - struct ahx - { - fz_output *chain; -diff --git a/source/fitz/output-ps.c b/source/fitz/output-ps.c -index ef22c3cd6..3dc8ea17d 100644 ---- a/source/fitz/output-ps.c -+++ b/source/fitz/output-ps.c -@@ -24,6 +24,8 @@ - - #include "z-imp.h" - -+#include -+ - typedef struct ps_band_writer_s - { - fz_band_writer super; --- -2.39.1 - diff --git a/package/mupdf/mupdf.hash b/package/mupdf/mupdf.hash index 1f636097ed..580235eeca 100644 --- a/package/mupdf/mupdf.hash +++ b/package/mupdf/mupdf.hash @@ -1,8 +1,8 @@ # From https://mupdf.com/downloads/index.html: -sha1 b9907729d604f0bf3846b45cd5891e10d7a66e24 mupdf-1.22.0-source.tar.lz +sha1 d79600bccd70ab9d0e8ee19dae4e275f2af95ced mupdf-1.23.9-source.tar.lz # Locally computed: -sha256 bed78a0abf8496b30c523497292de979db633eca57e02f6cd0f3c7c042551c3e mupdf-1.22.0-source.tar.lz +sha256 2c2f89deb9f425ba637dac226191d547f2b40975c4d21a340965f52c001e15c5 mupdf-1.23.9-source.tar.lz # Hash for license files: sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING diff --git a/package/mupdf/mupdf.mk b/package/mupdf/mupdf.mk index 4673b88291..409972d3b6 100644 --- a/package/mupdf/mupdf.mk +++ b/package/mupdf/mupdf.mk @@ -5,7 +5,7 @@ ################################################################################ # python-pymupdf's version must match mupdf's version -MUPDF_VERSION = 1.22.0 +MUPDF_VERSION = 1.23.9 MUPDF_SOURCE = mupdf-$(MUPDF_VERSION)-source.tar.lz MUPDF_SITE = https://mupdf.com/downloads/archive MUPDF_LICENSE = AGPL-3.0+ From patchwork Fri Jun 7 16:32:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= X-Patchwork-Id: 1945176 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vwmvs1BfWz20Q5 for ; Sat, 8 Jun 2024 02:32:57 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 635A7427FF; Fri, 7 Jun 2024 16:32:55 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id VDBMPDggYg0n; Fri, 7 Jun 2024 16:32:52 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4B14F427F1 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 4B14F427F1; Fri, 7 Jun 2024 16:32:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 7F8E31BF47A for ; Fri, 7 Jun 2024 16:32:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6AEA442760 for ; Fri, 7 Jun 2024 16:32:43 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id TxGEJraa3Iex for ; Fri, 7 Jun 2024 16:32:41 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::329; helo=mail-wm1-x329.google.com; envelope-from=raphael.melotte@essensium.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 5D75542722 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5D75542722 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by smtp4.osuosl.org (Postfix) with ESMTPS id 5D75542722 for ; Fri, 7 Jun 2024 16:32:40 +0000 (UTC) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42172ab4b60so4762935e9.0 for ; Fri, 07 Jun 2024 09:32:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717777958; x=1718382758; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xwmr/1aUIqfCOQgtyJVTD8mSgiHLm+rKdbrHrFVs7LA=; b=Ob66b5hljArs2oh4xWPb5C2/kIDMiAbHBAYhtewcxUCi8S1ioiNRfDo0pX0F0Eo7vb s1KNJb+a1mk/P1U5osGK0HP7dpWAsJx4UP1xXFefX+vPww3ZtUzTJkr+cxwtvHhs9c/1 QYq+QgfazGYQ7eWAYBVt9LuP21K9K50yZ1/RKLGhHH1RK4qVuOBYJyE7NH62hXqsjSYN 91VFfE6INzjr2y7o9DURI5aDjOWxxnvQI9ZyLM8i9I2Fad8JTZQz99Y2UJ5nYkHNuNe4 kEOY87tt6uyLq1qDsWbz0Qgr8K36COKydXYQTiMGb1C9arYLrEFF4TR+CQhpoQ2JvKx7 yYSg== X-Gm-Message-State: AOJu0YwKx7gVhAfZWyXMoqm+eiCoINZRTBJQ47idJIRTxHTWtFBlJMRM YdFQka/i8iV+hqA2Nlwhk51ybnCrcDjQwQwy+gwMvI1rRsLcyMNyCMXxZhc/4l23jZQ5NVjXoaS Gkkw= X-Google-Smtp-Source: AGHT+IEH3RLs7zwyfOyOZpBYljrB8FwMJUZ7NUWkUJQmOnKNswLyo4LGI3IZQfCPM8NTpxRr98tLJA== X-Received: by 2002:a05:600c:4f4a:b0:421:20aa:6048 with SMTP id 5b1f17b1804b1-42164a20b24mr24719005e9.26.1717777958121; Fri, 07 Jun 2024 09:32:38 -0700 (PDT) Received: from junian.fritz.box (94.105.103.7.dyn.edpnet.net. [94.105.103.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215c2cd7e7sm55804205e9.46.2024.06.07.09.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 09:32:37 -0700 (PDT) To: buildroot@buildroot.org Date: Fri, 7 Jun 2024 18:32:06 +0200 Message-Id: <20240607163208.1445715-5-raphael.melotte@mind.be> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20240607163208.1445715-1-raphael.melotte@mind.be> References: <20240216211344.1807353-2-raphael.melotte@mind.be> <20240607163208.1445715-1-raphael.melotte@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1717777958; x=1718382758; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xwmr/1aUIqfCOQgtyJVTD8mSgiHLm+rKdbrHrFVs7LA=; b=UHmfP5KcBKHXlCLumEhRKpYTWkdzRByk4Kpy2+RnqKZ/jxdNguWcwhlFo/WhQ6Fw+C jg4p4cVUlLgw8sCCO0p6dtgHvIze6im48Ooqc3/uS7nCH521xAB2kJRl4+nqJ4f/ayzu dcOdzdDe+pYqhiFawiFZJMnlJtdmgg35yuABTUIwjJ/NR+dzEuWMGz6uUrew+SjrMDPI HnkCwZcXtgxQy++W5cHLTcHe7kKroYNyuhQbNlzBeZpgnQhJKWlyYGfOlB9nxpOHtMAC 8v90e5UuV+Zr8Ni74IM+6wa37t0RO40XV0D7hlvnU2sm3mySvUcQMkdY53SjNkzBobkD oLsQ== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=mind.be X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=UHmfP5Kc Subject: [Buildroot] [PATCH v2 5/5] package/python-pymupdf: bump to version 1.23.22 X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: =?utf-8?q?Rapha=C3=ABl_M=C3=A9lotte_via_buildroot?= From: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Reply-To: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Cc: James Hilliard , =?utf-8?b?UmFwaGHDq2wgTcOp?= =?utf-8?b?bG90dGU=?= , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: James Hilliard The python-pymupdf and mupdf packages do not follow the exact same version numbers anymore. There is no specific mention of version compatibilities in the upstream package, so update our comment to just say that both should be "compatible" (to try to avoid one being updated without the other). Migrate to in tree pep517 based build backend. The hardcoded paths we used to remove from setup.py are no longer present, so the post-patch hook is removed. The new setup.py instead uses new environment variables which we now provide. This new python-pymupdf version fails at runtime when mupdf builds static libraries. This should not be possible as xorg anyway depends on !BR2_STATIC_LIBS, but let's be explicit and forbid python-pymupdf to be built with BR2_STATIC_LIBS as well. Note also that python-pymupdf is gradually switching to a new implementation that requires mupdf to be built with python bindings. For now, both implementations are still available but we only compile the old one. The runtime test is adapted accordingly as the legacy implementation has to be imported with "fitz_old". While at it, the dependencies are also split to one per line to make them easier to diff in the future. Signed-off-by: James Hilliard [Raphaël: - fix cross-compilation - remove unneeded dependencies - update to 1.23.22 - update the commit message ] Signed-off-by: Raphaël Mélotte --- package/mupdf/mupdf.mk | 2 +- ...w-providing-python-config-externally.patch | 125 ++++++++++++++++++ package/python-pymupdf/Config.in | 1 + package/python-pymupdf/python-pymupdf.hash | 4 +- package/python-pymupdf/python-pymupdf.mk | 31 +++-- .../tests/package/sample_python_pymupdf.py | 2 +- 6 files changed, 145 insertions(+), 20 deletions(-) create mode 100644 package/python-pymupdf/0001-pipcl.py-allow-providing-python-config-externally.patch diff --git a/package/mupdf/mupdf.mk b/package/mupdf/mupdf.mk index 409972d3b6..1be55cfef3 100644 --- a/package/mupdf/mupdf.mk +++ b/package/mupdf/mupdf.mk @@ -4,7 +4,7 @@ # ################################################################################ -# python-pymupdf's version must match mupdf's version +# python-pymupdf's version be compatible with mupdf's version MUPDF_VERSION = 1.23.9 MUPDF_SOURCE = mupdf-$(MUPDF_VERSION)-source.tar.lz MUPDF_SITE = https://mupdf.com/downloads/archive diff --git a/package/python-pymupdf/0001-pipcl.py-allow-providing-python-config-externally.patch b/package/python-pymupdf/0001-pipcl.py-allow-providing-python-config-externally.patch new file mode 100644 index 0000000000..2fd72c711e --- /dev/null +++ b/package/python-pymupdf/0001-pipcl.py-allow-providing-python-config-externally.patch @@ -0,0 +1,125 @@ +From ca3417b8d605ccdb2e6c516c5e0c79180381627c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= +Date: Sun, 4 Feb 2024 16:13:45 +0100 +Subject: [PATCH] pipcl.py: allow providing python-config externally +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When cross-compiling (e.g. using Buildroot), the python-config +executable that resides next to the host python executable provides +incorrect includes (the ones for the host). + +Since the correct path to python-config cannot be guessed, add an +additional environment variable to allow setting the path to the +correct python-config executable externally. + +Signed-off-by: Raphaël Mélotte +Upstream: https://github.com/pymupdf/PyMuPDF/pull/3173 +--- + pipcl.py | 72 +++++++++++++++++++++++++++++--------------------------- + setup.py | 3 +++ + 2 files changed, 40 insertions(+), 35 deletions(-) + +diff --git a/pipcl.py b/pipcl.py +index 209f660..c154774 100644 +--- a/pipcl.py ++++ b/pipcl.py +@@ -1789,43 +1789,45 @@ class PythonFlags: + self.ldflags = f'-L {_lib_dir}' + + else: +- # We use python-config which appears to work better than pkg-config +- # because it copes with multiple installed python's, e.g. +- # manylinux_2014's /opt/python/cp*-cp*/bin/python*. +- # +- # But... on non-macos it seems that we should not attempt to specify +- # libpython on the link command. The manylinux docker containers +- # don't actually contain libpython.so, and it seems that this +- # deliberate. And the link command runs ok. +- # +- python_exe = os.path.realpath( sys.executable) +- if darwin(): +- # Basic install of dev tools with `xcode-select --install` doesn't +- # seem to provide a `python3-config` or similar, but there is a +- # `python-config.py` accessible via sysconfig. ++ python_config = os.environ.get("PYMUPDF_PYTHON_CONFIG") ++ if not python_config: ++ # We use python-config which appears to work better than pkg-config ++ # because it copes with multiple installed python's, e.g. ++ # manylinux_2014's /opt/python/cp*-cp*/bin/python*. + # +- # We try different possibilities and use the last one that +- # works. ++ # But... on non-macos it seems that we should not attempt to specify ++ # libpython on the link command. The manylinux docker containers ++ # don't actually contain libpython.so, and it seems that this ++ # deliberate. And the link command runs ok. + # +- python_config = None +- for pc in ( +- f'python3-config', +- f'{sys.executable} {sysconfig.get_config_var("srcdir")}/python-config.py', +- f'{python_exe}-config', +- ): +- e = subprocess.run( +- f'{pc} --includes', +- shell=1, +- stdout=subprocess.DEVNULL, +- stderr=subprocess.DEVNULL, +- check=0, +- ).returncode +- log1(f'{e=} from {pc!r}.') +- if e == 0: +- python_config = pc +- assert python_config, f'Cannot find python-config' +- else: +- python_config = f'{python_exe}-config' ++ python_exe = os.path.realpath( sys.executable) ++ if darwin(): ++ # Basic install of dev tools with `xcode-select --install` doesn't ++ # seem to provide a `python3-config` or similar, but there is a ++ # `python-config.py` accessible via sysconfig. ++ # ++ # We try different possibilities and use the last one that ++ # works. ++ # ++ python_config = None ++ for pc in ( ++ f'python3-config', ++ f'{sys.executable} {sysconfig.get_config_var("srcdir")}/python-config.py', ++ f'{python_exe}-config', ++ ): ++ e = subprocess.run( ++ f'{pc} --includes', ++ shell=1, ++ stdout=subprocess.DEVNULL, ++ stderr=subprocess.DEVNULL, ++ check=0, ++ ).returncode ++ log1(f'{e=} from {pc!r}.') ++ if e == 0: ++ python_config = pc ++ assert python_config, f'Cannot find python-config' ++ else: ++ python_config = f'{python_exe}-config' + log1(f'Using {python_config=}.') + try: + self.includes = run( f'{python_config} --includes', capture=1).strip() +diff --git a/setup.py b/setup.py +index 23a5c78..4b3b5c7 100755 +--- a/setup.py ++++ b/setup.py +@@ -36,6 +36,9 @@ Environmental variables: + PYMUPDF_MUPDF_LIB + Directory containing MuPDF libraries, (libmupdf.so, + libmupdfcpp.so). ++ ++ PYMUPDF_PYTHON_CONFIG ++ Optional path to python-config. + + PYMUPDF_SETUP_IMPLEMENTATIONS + Must be one of 'a', 'b', 'ab'. If unset we use 'ab'. +-- +2.41.0 + diff --git a/package/python-pymupdf/Config.in b/package/python-pymupdf/Config.in index 3831a25451..cfdd38ebe4 100644 --- a/package/python-pymupdf/Config.in +++ b/package/python-pymupdf/Config.in @@ -4,6 +4,7 @@ config BR2_PACKAGE_PYTHON_PYMUPDF depends on BR2_TOOLCHAIN_HAS_SYNC_4 # mupdf -> harfbuzz depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # mupdf -> harfbuzz depends on BR2_PACKAGE_XORG7 + depends on !BR2_STATIC_LIBS select BR2_PACKAGE_HOST_SWIG select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_MUPDF diff --git a/package/python-pymupdf/python-pymupdf.hash b/package/python-pymupdf/python-pymupdf.hash index 9fd8150088..341366d46f 100644 --- a/package/python-pymupdf/python-pymupdf.hash +++ b/package/python-pymupdf/python-pymupdf.hash @@ -1,5 +1,5 @@ # md5, sha256 from https://pypi.org/pypi/pymupdf/json -md5 468fe56375a1fca99e83fe0aa0b9f8bd PyMuPDF-1.22.0.tar.gz -sha256 6e1694e5c0cd8b92d503a506ee8e4ba1bed768528de586889d3ec90e9dc4a7d3 PyMuPDF-1.22.0.tar.gz +md5 5c219a0c4cb3d57b60e39cc901ebd220 PyMuPDF-1.23.22.tar.gz +sha256 c41cd91d83696cea67a4b6c65cc1951c2019ac0a561c5a3f543318ede30d3cd0 PyMuPDF-1.23.22.tar.gz # Locally computed sha256 checksums sha256 57c8ff33c9c0cfc3ef00e650a1cc910d7ee479a8bc509f6c9209a7c2a11399d6 COPYING diff --git a/package/python-pymupdf/python-pymupdf.mk b/package/python-pymupdf/python-pymupdf.mk index 8825868fb5..1364bd12c3 100644 --- a/package/python-pymupdf/python-pymupdf.mk +++ b/package/python-pymupdf/python-pymupdf.mk @@ -4,27 +4,26 @@ # ################################################################################ -# python-pymupdf's version must match mupdf's version -PYTHON_PYMUPDF_VERSION = 1.22.0 +# python-pymupdf's version be compatible with mupdf's version +PYTHON_PYMUPDF_VERSION = 1.23.22 PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz -PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/28/ba/d6bb6fd678e8396d7b944870286fb25fd6f499b8cb599b5436c8f725adbf -PYTHON_PYMUPDF_SETUP_TYPE = setuptools +PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/05/20/a0d1221d8f379afcc12b4d1687a8f4adb69eef659e835d781c3fa331ff46 +PYTHON_PYMUPDF_SETUP_TYPE = pep517 PYTHON_PYMUPDF_LICENSE = AGPL-3.0+ PYTHON_PYMUPDF_LICENSE_FILES = COPYING # No license file included in pip, but it's present on github -PYTHON_PYMUPDF_DEPENDENCIES = freetype host-swig mupdf zlib PYTHON_PYMUPDF_BUILD_OPTS = --skip-dependency-check +PYTHON_PYMUPDF_DEPENDENCIES = \ + freetype \ + host-python-setuptools \ + host-swig \ + mupdf -PYTHON_PYMUPDF_ENV = CFLAGS="-I$(STAGING_DIR)/usr/include/mupdf -I$(STAGING_DIR)/usr/include/freetype2" - -# We need to remove the original paths as we provide them in the CFLAGS: -define PYTHON_PYMUPDF_REMOVE_PATHS - sed -i "/\/usr\/include\/mupdf/d" $(@D)/setup.py - sed -i "/\/usr\/include\/freetype2/d" $(@D)/setup.py - sed -i "/\/usr\/local\/include\/mupdf/d" $(@D)/setup.py - sed -i "/mupdf\/thirdparty\/freetype\/include/d" $(@D)/setup.py -endef - -PYTHON_PYMUPDF_POST_PATCH_HOOKS = PYTHON_PYMUPDF_REMOVE_PATHS +PYTHON_PYMUPDF_ENV = \ + PYMUPDF_INCLUDES="$(STAGING_DIR)/usr/include/freetype2:$(STAGING_DIR)/usr/include" \ + PYMUPDF_MUPDF_LIB="$(STAGING_DIR)/usr/lib" \ + PYMUPDF_PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" \ + PYMUPDF_SETUP_IMPLEMENTATIONS=a \ + PYMUPDF_SETUP_MUPDF_BUILD= $(eval $(python-package)) diff --git a/support/testing/tests/package/sample_python_pymupdf.py b/support/testing/tests/package/sample_python_pymupdf.py index 574bd27965..ffcbfa1140 100644 --- a/support/testing/tests/package/sample_python_pymupdf.py +++ b/support/testing/tests/package/sample_python_pymupdf.py @@ -1,4 +1,4 @@ -import fitz +import fitz_old as fitz # Write a test PDF file outfile = "python-pymupdf.pdf"