{libksba,libgcrypt,ntbtls,libassuan,npth}.m4, {libksba,libgcrypt,ntbtls,libassuan}-config script and gpg-error-config
Testing, NormalPublic

Description

New gpg-error-config can parse (simpler) *.pc file. It can be used for other software.

For the use cases of *-config command, new gpg-error-config can be used, directly, or indirectly.

Example:

  • libassuan-config can call gpg-error-config, having libassuan.pc
  • Or, libassuan.m4 can be modified using gpg-error-config, instead of libassuan-config

Migration plan:

  • For libksba, libgcrypt and libassuan
    • update its use of gpg-error.m4 from master
    • provide *.pc
    • fix *-config to be compatible to pkg-config way
    • modify *.m4 to use gpg-error-config
    • [optionally?] modify *-config to wrap gpg-error-config
  • Test with ntbtls, which uses libksba, libgcrypt, and libgpg-error
    • ntbtls also provides ntbtls.pc
    • modify ntbtls.m4

Future

  • [optionally] we can remove *-config scripts and only have gpg-error-config

NPTH?

  • npth doesn't depend on libgpg-error (this situation is different to other software)
  • providing npth.pc is good
  • use of gpg-error-config in npth.m4 is considered OK

Eventually:

  • GnuPG build keeps no other dependency of pkg-config
  • Developers of application can use *.m4 (no use of pkg-config) or PKG_CHECK_MODULES in pkg.m4.
  • In major use case(s), we won't need --with-*-prefix option to configure software
gniibe created this task.Oct 24 2018, 2:15 AM

This is the dependency graph:

gniibe updated the task description. (Show Details)Oct 24 2018, 2:33 AM
gniibe updated the task description. (Show Details)Oct 24 2018, 2:37 AM
werner added a subscriber: werner.Oct 24 2018, 9:06 AM

May I suggest to use a (new) gpgrt-config instead of the current name libgpg-error-config. The long term plan is to change the name of the library.

OK, I'll change to use gpgrt-config, along with requiring newer version of libgpg-error.

Well, I changed my mind. Use of new gpgrt-config requires software update to introduce gpgrt.m4 and update of configure.ac to switch gpgrt from gpg-error, in standard way.
That's too much this time. It's good to defer this change.

It might be good idea to provide libgcrypt.pc in libgcrypt 1.8.x for forward compatibility with libgpg-error 1.33.

gniibe added a comment.EditedOct 25 2018, 8:33 AM

A bit tricky, but this would be good to use gpgrt-config by gpg-error.m4.
I say "tricky", because its name is gpg-error.m4 but it configure GPGRT_CONFIG to access to GPG_ERROR_CONFIG.

@werner , how do you think?

gniibe changed the task status from Open to Testing.Oct 29 2018, 5:57 AM

New gpg-error.m4 detects gpgrt-config, too.
And configure supplies --libdir when it invokes gpgrt-config.
For other *.m4 (libassuan, ksba, libgcrypt, ntbtls), it is possible for them to check GPGRT_CONFIG to use gpgrt-config if any.
For npth.m4, it can do that too, with no hard dependency to libgpg-error.