From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IDEeIpJSvmNWKwAAbAwnHQ (envelope-from ) for ; Wed, 11 Jan 2023 07:09:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id DlUIIpJSvmM/LQAAauVa8A (envelope-from ) for ; Wed, 11 Jan 2023 07:09:22 +0100 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 CD4539D78 for ; Wed, 11 Jan 2023 07:09:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFUIN-0008Pa-D6; Wed, 11 Jan 2023 01:09:07 -0500 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 1pFUII-0008Ni-Sm for guix-patches@gnu.org; Wed, 11 Jan 2023 01:09:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFUII-00073W-Gl for guix-patches@gnu.org; Wed, 11 Jan 2023 01:09:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pFUII-00011o-4v for guix-patches@gnu.org; Wed, 11 Jan 2023 01:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60640] Gnu: Add gdcm Resent-From: =?UTF-8?Q?Tor-bj=C3=B6rn?= Claesson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 11 Jan 2023 06:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60640 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Tobias Geerinckx-Rice Cc: 60640@debbugs.gnu.org X-Debbugs-Original-Cc: 60640@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16734172953884 (code B ref -1); Wed, 11 Jan 2023 06:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Jan 2023 06:08:15 +0000 Received: from localhost ([127.0.0.1]:41564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFUHW-00010S-Ur for submit@debbugs.gnu.org; Wed, 11 Jan 2023 01:08:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:35286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFUHV-00010J-4J for submit@debbugs.gnu.org; Wed, 11 Jan 2023 01:08:13 -0500 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 1pFUHT-0008LJ-Q9 for guix-patches@gnu.org; Wed, 11 Jan 2023 01:08:12 -0500 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFUHQ-0006xw-3G for guix-patches@gnu.org; Wed, 11 Jan 2023 01:08:10 -0500 Received: by mail-lf1-x12b.google.com with SMTP id f34so21912206lfv.10 for ; Tue, 10 Jan 2023 22:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=9fRBxKg0pKOBeEGIuN5jpifQAcrj6EGG0clY0wKGkIw=; b=oBCHXHmG/G+VCaxYynrzleNc8PZ90IZWFbp7Z9njOEyrLatKJ9jPeJgVHh5IuAyB77 toK1OVrBFr3V5l7Y27FVakpAFdHftwRl2B5GeJeB0lIbjCXuOWNwKfw32dAEM3CpkmwV FFldXo/vkmivG8RkxUbsCseI5hCf9Qf5fjgG79ONkh+PiH4F3Q/+A1iwkVz2+XFG2l5c +04kfDF7ktT4C38+HimAiAWxxEzBrmYwf14EuiUTb1rD1ZPEY573fSrJPrBjobhub8iV i9D9b60zoQWEhJbIGPBEYXOLcJDABbtvNSSf7+9wt1m2IafEoP9GTPhw8DUYJCwHy9HM zqEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=9fRBxKg0pKOBeEGIuN5jpifQAcrj6EGG0clY0wKGkIw=; b=eeQGaw1xU+2GOrck/RA9hpsT2Zdhlhznidl0ltx36RT+DiyhZOSIfu7q5Zruu3OaHo AVDgnK0OoCGrO7ximWT6t31s4ednP3ugDxrgzhHk+VGr7O/+3Au9Am6zjWWeRnYrU4kI YVU47SBPR8/HDmKUrr1ovKIbfE3Byl4/gMR+N7i3BXmWubBe3CDm6PuMvBCsAw6Dqrxd zwE1GVIcEAXatH5GuGMhumk5VRYNNksEPurhSDGiuZoVujw1oppUfr7JUOqXE+UWM5Ny 20g+VWa9stHygIsNTRxfsM47plQQ4OetqpeHPneoo1wpSRk8Jh98fyfKW+glEMcAyLNa rGGw== X-Gm-Message-State: AFqh2krx3fEa4owX7Zaa/2gdoLFeUzIhLIP+NsKiExAO7WOdHDcLjKsS Ti/2U9SHjRBeixKwUTF/PyVvdiXduQM= X-Google-Smtp-Source: AMrXdXubscC2nW8mlPEDVTehS5DR1kYxlmSksK0kWHMpfLNQL7gDrxBw1aqgkJWvsDKvMukn8hX7vg== X-Received: by 2002:a19:6b08:0:b0:4b6:edef:183b with SMTP id d8-20020a196b08000000b004b6edef183bmr18410538lfa.11.1673417285783; Tue, 10 Jan 2023 22:08:05 -0800 (PST) Received: from barbar (212-90-81-204.bb.dnainternet.fi. [212.90.81.204]) by smtp.gmail.com with ESMTPSA id i4-20020ac25d24000000b004b578e52d81sm2546288lfb.176.2023.01.10.22.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 22:08:05 -0800 (PST) References: <877cxyp1wf.fsf@gmail.com> <87y1qaxhh7.fsf@nckx> User-agent: mu4e 1.8.13; emacs 28.2 From: =?UTF-8?Q?Tor-bj=C3=B6rn?= Claesson Date: Wed, 11 Jan 2023 07:29:10 +0200 In-reply-to: <87y1qaxhh7.fsf@nckx> Message-ID: <87o7r5li2j.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=tclaesson@gmail.com; helo=mail-lf1-x12b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673417362; a=rsa-sha256; cv=none; b=ICGp1ECDZVKevJk4ueE0J2qoboftzi4VlONAHi+ZsWFQLucxRC8rifpKdP9OURu4cK+7eh Z424qpuIWcs3w1s/tnySIsbMuWEFy6SQAL1BBYrmuC4bLxYpDdtVrrm5xxghbhK4Yj/8J2 fvQTIzdn+QGO/LGmR9ett11cgQxvwGsBclPoj1KCmB/0fhsgBOtRuUd1W/ADo3jhm+2zeT xX9Rb3kHNlQReOk+qtlgXqTe7pjSaoCllevlfb32YYnmfAN8NbucAOaKmFhezrYE1peFVl 9kHGfugzJDdJnlFVlp8eL2/N+uVjHjA+/3dgsGT+8id9FO+86WV1pFZrsG7X2A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=oBCHXHmG; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673417362; 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: content-transfer-encoding:content-transfer-encoding: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=9fRBxKg0pKOBeEGIuN5jpifQAcrj6EGG0clY0wKGkIw=; b=TLPVPSJ3lBV3fWgiznOmQw5N0Z4EiQngXA+8Jra24P1+E2osesqyPxN69FDgW1CawCbMeS XFsQtYeSUmZtZM9vlxTP7KkwnegexHz70Q0kTqarYneujZ9JeBPnf4Mc2jk3zChMqScVwq tqFalH/7exI5bVxvxQOrOIHhnHaMEoZ492mGwPuL/t16yXJF8DyjiWfhHwJgUzfOUJPP+n 5EsaJQ02ivbPy9PFk0RBHnQ3v4iAvs1o3FWYMiu90Hdr1c7HrK71dGPsqMms9y2wxyD7+X RK4+AQFq+8U/Mr3w11MMGWcJcTJvTuPn+Ji2cuDidWZrpUv3Zny61xPCZ3+jXA== X-Migadu-Spam-Score: -2.19 X-Spam-Score: -2.19 X-Migadu-Queue-Id: CD4539D78 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=oBCHXHmG; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-TUID: DjWHwdtzC3XS Hi! Tobias Geerinckx-Rice writes: > >> 3. It does not perform tests. > > OK, I'll take a look. > > If tests are disabled, the reason should always be noted in a comment. > Even if it's just =E2=80=98; no test suite=E2=80=99. > #:tests? #t makes the build fail with "make: *** No rule to make target 'test'. Stop." =20 GDCM has nightly regression tests (https://open.cdash.org/index.php?project=3DGDCM), should we try to run those when building? I have tried to find out how to do this but for now with no success. Maybe it is obvious to more experienced people? >> +(define-public gdcm > > It used to be common to unconditionally add packages to the end of > files, but this needlessly increased the risk of merge conflicts. > > Instead, just add them wherever they first fit alphabetically; here, I > put it above =E2=80=98mia=E2=80=99. > Ok, will do from now on! >> + (version "3.0.20") > > =E2=80=98guix lint=E2=80=99 says this can be updated to 3.1.0 but I didn'= t try, as I'd > rather it be tested by an actual user =E2=80=94 i.e., you. > I got that too, but the latest release in git is 3.0.20 >> + "1w78cmm9q7aavs7svdkl4dgilcqk4yazci9m6x7icrssb7cj991i")))) >> + (build-system cmake-build-system) >> + (outputs '("out" "doc")) > > /share/doc wasn't actually installed into "doc", but to "out", so I > set the GDCM_INSTALL_DOC_DIR configure flag. > >> + (arguments >> + (list #:tests? #f >> + #:phases #~(modify-phases %standard-phases >> + (add-before 'configure 'set-LDFLAGS >> + (lambda* (#:key inputs outputs >> #:allow-other-keys) >> + (setenv "LDFLAGS" >> + (string-append "-Wl,-rpath=3D" >> + #$output >> "/lib")))) >> + (add-before 'build 'patch-gdcm-charls.h >> + (lambda _ >> + (substitute* >> "../source/Utilities/gdcm_charls.h" >> + (("# include ") Ah, good catch! > > Purely as a matter of taste I dropped the =E2=80=98# include =E2=80=99 fr= om both > strings and escaped the =E2=80=98.=E2=80=99 in the regexp. > >> + "# include ")) >> #t))) > > =E2=80=98#t=E2=80=99 endings are also obsolete. Just drop them entirely.= Phases can > now safely return anything, including nothing or undefined. > > I added the following phase to work around log spam, since I didn't > find its source (nor did I look very hard) [edit: it was indeed > graphviz, thanks]. By default, $HOME is not writable in the build > environment. > > (add-before 'build 'set-HOME > ;; The build spams =E2=80=98Fontconfig error: No writable cache > ;; directories=E2=80=99 in a seemingly endless loop otherwise. > (lambda _ > (setenv "HOME" "/tmp"))) > >> + #:configure-flags #~(list "-DCMAKE_SKIP_RPATH:BOOL=3DYES" Is this needed, btw? It came from gdcm:s packaging instructions. Removing it causes no verify-runpath issues. > > I, opinionated, added newlines after #:phases and #:configure-flags. > > Some people like the =E2=80=98extreme indentation=E2=80=99 you get by thr= owing away > half of your screen width. I find it leads to cramped code and noisy > patches once the phases need to get actual work done or an even longer > CMAKE_ flag comes along. > > I also added some newlines and tried to group related flags. > Thanks, I didn't know that would make the line fit better on screen. Much neater=3D) >> + "-DCMAKE_C_FLAGS=3D-fvisibility=3Dhidden" >> + "-DCMAKE_CXX_FLAGS=3D-fvisibility=3Dhidden" > > Should these be explained in a very brief comment? > They are from https://github.com/malaterre/GDCM/blob/master/PACKAGER, the explanation is: "This make sure that on UNIX, the API is actually identical at what is foun= d on Windows." > > Thank you for building with system libraries! Also remove the bundled > copies when possible. I did so in a (rather strict) source snippet. > Ok, neat=3D) >> + "-DGDCM_PDF_DOCUMENTATION:BOOL=3DOFF" > > I cannot get the man pages to build, either. They need something > called =E2=80=98xsl-ns=E2=80=99. I've disabled GDCM_BUILD_DOCBOOK_MANPAG= ES for now. > >> + "-DGCM_BUILD_TESTING:BOOL=3DOFF" > > Why is this set? It's reported by CMake as having no effect, and a > diff of the output confirms that. > >From the old wiki: "This boolean is responsible for deciding whether or not to build/run the nightly regression test of gdcm. Warning when turning this option on, the size of the gdcm libraries will be bigger since some extra code are compiled in for the testing framework (see gdcm::Testing, and the md5 lib)." This seems to be incorrect then, maybe we can skip it. >> + (license license:bsd-3))) > > I still need to check this. > https://github.com/malaterre/GDCM/blob/master/Copyright.txt I'm not able to apply your new patch, but that is probably a fault on my pa= rt. Thanks a lot for sharing your time and knowledge, and for making this patch neater! I find this a lot of fun, but have no experience with scheme or packaging, so your explanations are very valuable to me. Cheers Tor-bj=C3=B6rn