diff mbox series

[bug#56286,v2,6/6] gnu: Add pkgconf.

Message ID 20220628203426.31906-6-paren@disroot.org
State New
Headers show
Series [bug#56286,v2,1/6] gnu: Add atf. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

\( June 28, 2022, 8:34 p.m. UTC
* gnu/packages/pkg-config.scm (pkgconf): New variable.
---
 gnu/packages/pkg-config.scm | 47 +++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

Comments

M June 28, 2022, 11:34 p.m. UTC | #1
( via Guix-patches via schreef op di 28-06-2022 om 21:34 [+0100]:
> +     (native-search-paths (package-native-search-paths %pkg-config))

If it's anything like 'pkg-config', it should usually be in
'search-paths' for cross-compilation (for cross-pkg-config)
(native-search-paths would work too when compiling natively,
but only because currently then native-inputs and inputs are
merged together).

OTOH, I think those kind of changes are best done with some
concrete test cases in mind (maybe the package depending on pkgconf
that will be packaged later?) otherwise it's a bit speculative on what
will works and what not, but I believe it's something to keep in mind
for later.

(So TBC: I don't expect changes to the patch, but I expect changes will
be needed later, though only once we have concrete packages to actually
test them on).

Greetings,
Maxime.
\( June 29, 2022, 5:41 a.m. UTC | #2
On Wed Jun 29, 2022 at 12:34 AM BST, Maxime Devos wrote:
> If it's anything like 'pkg-config', it should usually be in
> 'search-paths' for cross-compilation (for cross-pkg-config)
> (native-search-paths would work too when compiling natively,
> but only because currently then native-inputs and inputs are
> merged together).
Ah, yeah, I think we'd need a cross-pkgconf package.

> (maybe the package depending on pkgconf that will be packaged later?)
I'm working on a project that needs to be able to use pkg-config
functionality, which is why I packaged pkgconf, so I guess we'll find
out when it's ready.

    -- (
Efraim Flashner Aug. 3, 2022, 4:21 p.m. UTC | #3
On Wed, Jun 29, 2022 at 01:34:45AM +0200, Maxime Devos wrote:
> ( via Guix-patches via schreef op di 28-06-2022 om 21:34 [+0100]:
> > +     (native-search-paths (package-native-search-paths %pkg-config))
> 
> If it's anything like 'pkg-config', it should usually be in
> 'search-paths' for cross-compilation (for cross-pkg-config)
> (native-search-paths would work too when compiling natively,
> but only because currently then native-inputs and inputs are
> merged together).
> 
> OTOH, I think those kind of changes are best done with some
> concrete test cases in mind (maybe the package depending on pkgconf
> that will be packaged later?) otherwise it's a bit speculative on what
> will works and what not, but I believe it's something to keep in mind
> for later.
> 
> (So TBC: I don't expect changes to the patch, but I expect changes will
> be needed later, though only once we have concrete packages to actually
> test them on).

I talked with some Debian folks at Debconf, pkgconf is supposed to be
able to function as a drop-in replacement for pkg-config, so I assume we
should be able to reuse the search-paths exactly from pkg-config.
Vagrant Cascadian Sept. 2, 2023, 3:28 a.m. UTC | #4
retitle 56286 Add kyua, lutok, atf
thanks

On 2022-06-28, ( wrote:
> * gnu/packages/pkg-config.scm (pkgconf): New variable.
....
> +(define-public pkgconf
> +  ;; The last release was tagged on 2021-07-25, and there's been a lot of activity
> +  ;; since then.
> +  (let ((commit "b0802cb3d19b5b963ad20eed464a2da6e7d7b0b5")
> +        (revision "0"))
> +    (package
> +     (name "pkgconf")
> +     (version (git-version "1.8.0" revision commit))

pkgconf was since merged and updated up to 2.2.0:

eda94d13d4b1845c398ceee34c6bff7364bceaa6 gnu: Add pkgconf.
eeb71d778f149834015858467fbeeb1276d96d1d gnu: pkgconf: Update to 2.0.2.

Though other packages were not yet merged, as well as possibly some
other miscelaneous changes, retitling bug to match the remaining items.


live well,
  vagrant
Maxim Cournoyer Feb. 26, 2024, 4:06 p.m. UTC | #5
Hi,

Vagrant Cascadian <vagrant@debian.org> writes:

> retitle 56286 Add kyua, lutok, atf
> thanks
>
> On 2022-06-28, ( wrote:
>> * gnu/packages/pkg-config.scm (pkgconf): New variable.
> ....
>> +(define-public pkgconf
>> +  ;; The last release was tagged on 2021-07-25, and there's been a lot of activity
>> +  ;; since then.
>> +  (let ((commit "b0802cb3d19b5b963ad20eed464a2da6e7d7b0b5")
>> +        (revision "0"))
>> +    (package
>> +     (name "pkgconf")
>> +     (version (git-version "1.8.0" revision commit))
>
> pkgconf was since merged and updated up to 2.2.0:
>
> eda94d13d4b1845c398ceee34c6bff7364bceaa6 gnu: Add pkgconf.
> eeb71d778f149834015858467fbeeb1276d96d1d gnu: pkgconf: Update to 2.0.2.

I've also sent a series containing kyua (with its test suite enabled!),
lutok af atf (apologies for not noticing about this series earlier) in
the https://issues.guix.gnu.org/68813 series, which also have our
pkg-config replaced with pkgconf-as-pkg-config, which reduces the need
to propagate things (there's no need to propagate *.private pkg-config
fields anymore).

I'm thus closing this series.
diff mbox series

Patch

diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm
index dcd6ba3353..a22aa6969b 100644
--- a/gnu/packages/pkg-config.scm
+++ b/gnu/packages/pkg-config.scm
@@ -24,10 +24,13 @@  (define-module (gnu packages pkg-config)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
   #:use-module (guix gexp)
+  #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix memoization)
   #:use-module (guix packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages check)
   #:export (pkg-config))
 
 ;; This is the "primitive" pkg-config package.  People should use `pkg-config'
@@ -168,3 +171,47 @@  (define where (string-append #$output "/bin/pkg-config"))
              (inherit original)
              (variable "PKG_CONFIG_PATH_FOR_BUILD")))
           (package-native-search-paths %pkg-config)))))
+
+(define-public pkgconf
+  ;; The last release was tagged on 2021-07-25, and there's been a lot of activity
+  ;; since then.
+  (let ((commit "b0802cb3d19b5b963ad20eed464a2da6e7d7b0b5")
+        (revision "0"))
+    (package
+     (name "pkgconf")
+     (version (git-version "1.8.0" revision commit))
+     (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/pkgconf/pkgconf")
+                    (commit commit)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1xcpvzahrp34jhdfsazdhbj9byr2wqwmjx7jfarhpc1x4z3l37a0"))))
+     (build-system gnu-build-system)
+     (arguments
+      (list #:phases
+            #~(modify-phases %standard-phases
+                (delete 'check)
+                (add-after 'install 'set-home
+                  ;; Kyua tries to access $HOME.
+                  (lambda _
+                    (setenv "HOME" (getcwd))))
+                (add-after 'set-home 'check
+                  ;; Kyua won't work unless we move 'check to after 'install.
+                  (assoc-ref %standard-phases 'check)))))
+     (native-inputs (list atf
+                          ;; pkgconf's autotools setup forbids the use of any
+                          ;; earlier version of autoconf than 2.71.
+                          autoconf-2.71
+                          automake
+                          kyua
+                          libtool))
+     (native-search-paths (package-native-search-paths %pkg-config))
+     (home-page "https://pkgconf.org")
+     (synopsis "Package compiler and linker metadata toolkit")
+     (description "@code{pkgconf} is a compiler and linker configuration toolkit,
+mostly compatible with freedesktop.org's @code{pkg-config}.  A library called
+@code{libpkgconf} is provided so that programs can embed its functionality.")
+     (license license:isc))))