From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MKH4DeaL72aBEwEAqHPOHw:P1 (envelope-from ) for ; Sun, 22 Sep 2024 03:15:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id MKH4DeaL72aBEwEAqHPOHw (envelope-from ) for ; Sun, 22 Sep 2024 05:15:50 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=fpW29NBg; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="I/l68Z3A"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726974949; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=/LRGaweK2WTADYjLzd+RqOdpAl051vAniIDd4d0EzZg=; b=YfywFvxk9OUwKfxydOnqkwLaT0IZHUNk6VERqqVApxfIoNbwDzEfSPmzI3ICZETnOAaoHq GVF88RRCU65tCIsEgFqBe5nSScUA8qXUMIBxKd65b+ma/SDvcF4nYCT/2eJUgFNHcuUxcW FPSPNxFHY5wWu6UtVMVldyikCEUhSNaoaLIcILsORjYf0rPmeUp5QnLdjHTM3WjqNJXCzc kQGku7IAWgR6DTaUgW2bSxFWI3fO6Ux7rlO5kr/yCsBiFH+ouovQmqmRBqBuh4G52b/8Dp kYzb0lMNDBf+i4+JCwmCwVIOKfROyb/R00SLJTOW5kVhSpyUF7FBRkaSOt8ahA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726974949; a=rsa-sha256; cv=none; b=iPyR9d1JQeNdWVWwiE9TxEK+N8So4pWbr95BsqtYCaGhdAjrUiANH/UbQjMzVg9haJ30+W CJM4wm+RPaY5mzypjOXVgB/C+oaacexT4WKmOOyMUbm0tWKQtggbmT9ulJ8wM2TNGPASNI uwE66HEJmL4ECXscJTTWDSGS2j2xUjVV1Ec4VlXmOjke+Ubb4MZ524V0dDVvm60MJXVgWW YHG2siZIat2YsV/LGR2Y51CpI2VVLn6BgUhbH/7qibMu4gx2OOr2eVKmM5bWbY1n6mGVFg Js1k71E8o/tvPBpLuwA0vfpepoU3fhJCyP1rRKpXaf5Sc5DMyHg++2bur6kEVQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=fpW29NBg; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="I/l68Z3A"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B6252DBED for ; Sun, 22 Sep 2024 05:15:49 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssD4Y-0003mq-48; Sat, 21 Sep 2024 23:15:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssD4X-0003mh-D4 for guix-patches@gnu.org; Sat, 21 Sep 2024 23:15:41 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssD4X-0007wd-2j for guix-patches@gnu.org; Sat, 21 Sep 2024 23:15:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=/LRGaweK2WTADYjLzd+RqOdpAl051vAniIDd4d0EzZg=; b=fpW29NBgW8YZVmhfZc8FYztAd/sEWAK5OZkSTNB0q4BNN5h8TsW1lTnTfzsZi6bPot0X9UeURfOGRAiHL9SuWsTk4Y1IykqANNXDmpJWvehJX8y81aCbYPioY40WK7L8nOB6rbiKaRWj1qxH29kE4oVhaG+IR2GFdZuCzlBTDISNt3xX2NlnNsrr0QDlGiUZpNRtCjNSMUNIYXG0eIenzoQAcYh66tN/7US7GauPjf6Z25XkSeGEqphJGt/7L7+EkBycQ6lolaSdLCDqj84tW7QwbsrkEEpdfUfoNkWVQzn/aWe4scCr/M4rPoyXG643PcrhXYHR1BE0wfoo0U6K1Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ssD4s-0002VG-1q for guix-patches@gnu.org; Sat, 21 Sep 2024 23:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71897] [PATCH v8 6/8] gnu: Add cpp-ada-url-parser. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2024 03:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71897 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: dan Cc: Sharlatan Hellseher , Liliana Marie Prikler , 71897@debbugs.gnu.org Received: via spool by 71897-submit@debbugs.gnu.org id=B71897.17269749249083 (code B ref 71897); Sun, 22 Sep 2024 03:16:02 +0000 Received: (at 71897) by debbugs.gnu.org; 22 Sep 2024 03:15:24 +0000 Received: from localhost ([127.0.0.1]:40565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssD4F-0002MN-5e for submit@debbugs.gnu.org; Sat, 21 Sep 2024 23:15:23 -0400 Received: from mail-pl1-f182.google.com ([209.85.214.182]:50636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssD4C-0002M5-Ov for 71897@debbugs.gnu.org; Sat, 21 Sep 2024 23:15:21 -0400 Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2068acc8a4fso30707885ad.1 for <71897@debbugs.gnu.org>; Sat, 21 Sep 2024 20:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726974834; x=1727579634; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=/LRGaweK2WTADYjLzd+RqOdpAl051vAniIDd4d0EzZg=; b=I/l68Z3Aypzh0m06xcuztyj9Zj4isTfVzso3vY2YqMqnpaczApc46CbUGPxY65C9Un BSiv7DD1qm6qV1Xzjuiwuc8Hcba+390/6TBm2npfZ7KOjHkCC++SUE3Ko4ghxDw7vATf cH61cae9ZQRR6w0na7WlWDM2NvgJoKO7RHBom+SxujlDLuOtaeJ2OsgiHyQQe2+YYCl3 n8xJBsmeY5wDTLinH0I3fsSDLQfMzq5YcWi4F+/wE8fse7V76KQQCu8mV/sMBSKG7yoQ jlU3KKwjL2wpoyhItu/5OrWP3A+lSw6b4mLJkYE4qY0mzi21yvv8KaDd7obtGqK/g7uQ 5VYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726974834; x=1727579634; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/LRGaweK2WTADYjLzd+RqOdpAl051vAniIDd4d0EzZg=; b=N6hE4nBOgD++jMSDryNDW1lxN39FKEv+gyyzpG0n3CFC/PjJIMiefyx1Njz3oFEJqS fg9nVNCnA4/o0XoLBKrgs8wUgL7Z7g+JHvs5cFk7Q4l00GCjVTJSATJ2LfYJ8UpJxnsG he9AAeB5ikJr5ve70DEpmi52hrBojxuma2M5P7VapkOji9l0CnP2qN4Ny7DwAXEVtZOq oC11ErETe3tb2Qt2C1VJSoPcE+7x0non8JnSXr/auaV+3qrlTqx72lo8CWrfXWdLfIbx JgQD0eBEzhB716iVV6JjM7TOXTEUMRxufywFWTVm4vShFGDKqpvd4ldsDf8sRkx9kGxv AYOQ== X-Gm-Message-State: AOJu0Yz02Be6hZv4CU/jlJd85/vFhDhUNHtV0av1YvZ7dxpUP8B8D8sD qNT8des2DiZyO+QnormuQ0H0AT8VvtaKffkQilhY7JKWMoTPIFLg X-Google-Smtp-Source: AGHT+IFkyUuYtJVkw9z3x94J6QwwRAEam2M0k9EMHHBFjN9iTZ85EZ3I08O/PHqvSVPgDT6jfe67mA== X-Received: by 2002:a17:902:f70d:b0:205:6114:9628 with SMTP id d9443c01a7336-208d8322453mr137624425ad.7.1726974833653; Sat, 21 Sep 2024 20:13:53 -0700 (PDT) Received: from hurd ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2079472e15esm114406785ad.244.2024.09.21.20.13.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Sep 2024 20:13:53 -0700 (PDT) From: Maxim Cournoyer In-Reply-To: <2ae23a993d9f52c8a4fd5ef0aff148fa5ab4e509.1726930328.git.i@dan.games> (dan's message of "Sat, 21 Sep 2024 22:53:12 +0800") References: <5fddf9f718d95467cd90d9d2625d749af580205c.1726930328.git.i@dan.games> <2ae23a993d9f52c8a4fd5ef0aff148fa5ab4e509.1726930328.git.i@dan.games> Date: Sun, 22 Sep 2024 12:13:50 +0900 Message-ID: <87setsl6s1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.51 X-Spam-Score: -4.51 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Queue-Id: B6252DBED X-TUID: nf5ThhSdV1ti Hi Dan, dan writes: > * > gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch: > New file. > * gnu/local.mk (dist_patch_DATA): Register it. > * gnu/packages/cpp.scm (cpp-ada-url-parser): New variable. > > Change-Id: I9924bba53ed58bbf306bf073c9724cd7bd6f570a > --- > gnu/local.mk | 1 + > gnu/packages/cpp.scm | 26 ++++ > ...ser-find-system-testing-dependencies.patch | 130 ++++++++++++++++++ > 3 files changed, 157 insertions(+) > create mode 100644 gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch > > diff --git a/gnu/local.mk b/gnu/local.mk > index 802f4be4fe..829c5e166e 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -1103,6 +1103,7 @@ dist_patch_DATA = \ > %D%/packages/patches/cool-retro-term-wctype.patch \ > %D%/packages/patches/coq-autosubst-1.8-remove-deprecated-files.patch \ > %D%/packages/patches/coreutils-gnulib-tests.patch \ > + %D%/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch\ > %D%/packages/patches/cppcheck-disable-char-signedness-test.patch \ > %D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\ > %D%/packages/patches/cpulimit-with-glib-2.32.patch \ > diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm > index c805dae825..92be49967f 100644 > --- a/gnu/packages/cpp.scm > +++ b/gnu/packages/cpp.scm > @@ -3284,3 +3284,29 @@ (define-public tl-optional > the std::optional for C++11/14/17, with support for monadic operations added in > C++23.") > (license license:cc0))) > + > +(define-public cpp-ada-url-parser > + (package > + (name "cpp-ada-url-parser") I wasn't sure about the naming, since it doesn't match with the upstream repository name convention, but after looking into it, it seems reasonable given their own naming is not explicit enough and there are bindings for various languages. > + (version "2.9.2") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/ada-url/ada.git") I believe 'guix lint' would complain about a URL redirect on the above. '.git' suffices haven't been used in years for GitHub. > + (commit (string-append "v" version)))) > + (file-name (git-file-name name version)) > + (sha256 (base32 "0xvvjlia627ajl966gdxzy2b1j0jiimx7zx8ypmffwx0k6x72qam")) > + (patches (search-patches "cpp-ada-url-parser-find-system-testing-dependencies.patch")))) Too long line; please break it so it fits under 80 chars (that's our convention), although 'guix lint' won't warn until 100 chars. > + (build-system cmake-build-system) > + (native-inputs > + (list cxxopts > + fmt > + googletest > + python > + simdjson)) > + (home-page "https://github.com/ada-url/ada") > + (synopsis "URL parser") > + (description "Ada is a fast and spec-compliant URL parser written in C++. > +Specification for URL parser can be found from the WHATWG website.") > + (license license:gpl3+))) > diff --git a/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch b/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch > new file mode 100644 > index 0000000000..b32d162530 > --- /dev/null > +++ b/gnu/packages/patches/cpp-ada-url-parser-find-system-testing-dependencies.patch > @@ -0,0 +1,130 @@ > +From 74cac57a3cebe0cfbbc44f46270d5e51986f4881 Mon Sep 17 00:00:00 2001 > +From: dan > +Date: Sat, 21 Sep 2024 18:49:10 +0800 > +Subject: [PATCH] find system testing dependencies. > + > +--- > + CMakeLists.txt | 50 +++++++++----------------------------- > + singleheader/amalgamate.py | 2 +- > + tools/cli/CMakeLists.txt | 8 ++---- > + 3 files changed, 14 insertions(+), 46 deletions(-) > + > +diff --git a/CMakeLists.txt b/CMakeLists.txt > +index a7ce3796..0903cc31 100644 > +--- a/CMakeLists.txt > ++++ b/CMakeLists.txt > +@@ -28,43 +28,23 @@ option(ADA_TESTING "Build tests" ${BUILD_TESTING}) > + # errors due to CPM, so this is here to support disabling all the testing > + # and tooling for ada if one only wishes to use the ada library. > + if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS) > +- include(cmake/CPM.cmake) > +- # CPM requires git as an implicit dependency > +- find_package(Git QUIET) > + # We use googletest in the tests > +- if(Git_FOUND AND ADA_TESTING) > +- CPMAddPackage( > +- NAME GTest > +- GITHUB_REPOSITORY google/googletest > +- VERSION 1.14.0 > +- OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF" > +- ) > ++ if(ADA_TESTING) > ++ find_package(GTest) > + endif() > + # We use simdjson in both the benchmarks and tests > +- if(Git_FOUND AND (ADA_TESTING OR ADA_BENCHMARKS)) > +- CPMAddPackage("gh:simdjson/simdjson@3.9.1") > ++ if(ADA_TESTING OR ADA_BENCHMARKS) > ++ find_package(simdjson) > + endif() > + # We use Google Benchmark, but it does not build under several 32-bit systems. > +- if(Git_FOUND AND ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8)) > +- CPMAddPackage( > +- NAME benchmark > +- GITHUB_REPOSITORY google/benchmark > +- GIT_TAG f91b6b4 > +- OPTIONS "BENCHMARK_ENABLE_TESTING OFF" > +- "BENCHMARK_ENABLE_INSTALL OFF" > +- "BENCHMARK_ENABLE_WERROR OFF" > +- > +- ) > ++ if(ADA_BENCHMARKS AND (CMAKE_SIZEOF_VOID_P EQUAL 8)) > ++ find_package(benchmark) > + endif() > + > + if (ADA_TESTING AND NOT EMSCRIPTEN) > +- if(Git_FOUND) > +- set(CTEST_TEST_TIMEOUT 5) > +- message(STATUS "The tests are enabled.") > +- add_subdirectory(tests) > +- else() > +- message(STATUS "The tests are disabled because git was not found.") > +- endif() > ++ set(CTEST_TEST_TIMEOUT 5) > ++ message(STATUS "The tests are enabled.") > ++ add_subdirectory(tests) > + else() > + if(is_top_project) > + message(STATUS "The tests are disabled.") > +@@ -72,12 +52,8 @@ if(ADA_TESTING OR ADA_BENCHMARKS OR ADA_TOOLS) > + endif(ADA_TESTING AND NOT EMSCRIPTEN) > + > + If(ADA_BENCHMARKS AND NOT EMSCRIPTEN) > +- if(Git_FOUND) > +- message(STATUS "Ada benchmarks enabled.") > +- add_subdirectory(benchmarks) > +- else() > +- message(STATUS "The benchmarks are disabled because git was not found.") > +- endif() > ++ message(STATUS "Ada benchmarks enabled.") > ++ add_subdirectory(benchmarks) > + else(ADA_BENCHMARKS AND NOT EMSCRIPTEN) > + if(is_top_project) > + message(STATUS "Ada benchmarks disabled. Set ADA_BENCHMARKS=ON to enable them.") > +@@ -107,11 +83,7 @@ if(NOT ADA_COVERAGE AND NOT EMSCRIPTEN) > + endif() > + > + if(ADA_TOOLS) > +- if(Git_FOUND) > + add_subdirectory(tools) > +- else() > +- message(STATUS "The tools are disabled because git was not found.") > +- endif() > + endif() > + > + install( > +diff --git a/singleheader/amalgamate.py b/singleheader/amalgamate.py > +index 52b154b6..94e4e638 100755 > +--- a/singleheader/amalgamate.py > ++++ b/singleheader/amalgamate.py > +@@ -138,7 +138,7 @@ if SCRIPTPATH != AMALGAMATE_OUTPUT_PATH: > + > + shutil.copy2(os.path.join(AMALGAMATE_INCLUDE_PATH, 'ada_c.h'), AMALGAMATE_OUTPUT_PATH) > + > +-zf = zipfile.ZipFile(os.path.join(AMALGAMATE_OUTPUT_PATH, 'singleheader.zip'), 'w', zipfile.ZIP_DEFLATED) > ++zf = zipfile.ZipFile(os.path.join(AMALGAMATE_OUTPUT_PATH, 'singleheader.zip'), 'w', zipfile.ZIP_DEFLATED, strict_timestamps=False) > + zf.write(os.path.join(AMALGAMATE_OUTPUT_PATH, 'ada.cpp'), 'ada.cpp') > + zf.write(os.path.join(AMALGAMATE_OUTPUT_PATH, 'ada.h'), 'ada.h') > + zf.write(os.path.join(AMALGAMATE_INCLUDE_PATH, 'ada_c.h'), 'ada_c.h') > +diff --git a/tools/cli/CMakeLists.txt b/tools/cli/CMakeLists.txt > +index 9f0da167..d0f7e0c9 100644 > +--- a/tools/cli/CMakeLists.txt > ++++ b/tools/cli/CMakeLists.txt > +@@ -8,12 +8,8 @@ if(MSVC AND BUILD_SHARED_LIBS) > + "$" # <--this is in-file > + "$") # <--this is out-file path > + endif() > +-CPMAddPackage("gh:fmtlib/fmt#10.2.1") > +-CPMAddPackage( > +- GITHUB_REPOSITORY jarro2783/cxxopts > +- VERSION 3.2.0 > +- OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES" > +-) > ++find_package(fmt) > ++find_package(cxxopts) > + target_link_libraries(adaparse PRIVATE cxxopts::cxxopts fmt::fmt) > + > + if(MSVC OR MINGW) > +-- > +2.45.2 > + That's not upstreamable work, so should ideally be marked as such as a patch at the top of the patch file (Upstream-status: N/A or similar). It's a bit sad that this will need ongoing maintenance (careful rebasing when they touch that file). I'd like to see the problem with CPM commented in a bit more details -- wondering if it could be made to work without patching it out, e.g. perhaps some CMake variables can be set to have CPM work offline? -- Thanks, Maxim