Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generation of libkiwix.pc via meson's pkgconfig module #1133

Merged
merged 3 commits into from
Sep 17, 2024
Merged

Conversation

veloman-yunkan
Copy link
Collaborator

@veloman-yunkan veloman-yunkan commented Sep 13, 2024

Fixes #1117

The name of the libkiwix pkgconfig file has changed from kiwix.pc to libkiwix.pc.

Below are the contents of libkiwix.pc and kiwix.pc files generated using the new and old approaches, respectively, for native_dyn and native_static configurations:

$ cat BUILD_native_dyn/INSTALL/lib/x86_64-linux-gnu/pkgconfig/libkiwix.pc
prefix=<REDACTED>
includedir=${prefix}/include
libdir=${prefix}/lib/x86_64-linux-gnu

Name: libkiwix
Description: A library that contains useful primitives that Kiwix readers have in common
Version: 14.0.0
Requires.private: icu-i18n, libzim < 10.0.0, libzim >= 9.0.0, pugixml, libcurl, libmicrohttpd, zlib, xapian-core
Libs: -L${prefix}/lib/x86_64-linux-gnu -lkiwix
Libs.private: -pthread
Cflags: -I${includedir}

$ cat BUILD_native_dyn/INSTALL/lib/x86_64-linux-gnu/pkgconfig/kiwix.pc
prefix=<REDACTED>
libdir=${prefix}/lib64
includedir=${prefix}/include

Name: libkiwix
Description: A library that contains a lot of things used by used by other kiwix programs
Version: 14.0.0
Requires: libzim icu-i18n pugixml libcurl libmicrohttpd xapian-core
Libs: -L${libdir} -lkiwix
Cflags: -I${includedir}/

$ cat BUILD_native_static/INSTALL/lib/x86_64-linux-gnu/pkgconfig/libkiwix.pc
prefix=<REDACTED>
includedir=${prefix}/include
libdir=${prefix}/lib/x86_64-linux-gnu

Name: libkiwix
Description: A library that contains useful primitives that Kiwix readers have in common
Version: 14.0.0
Requires: icu-i18n, libzim < 10.0.0, libzim >= 9.0.0, pugixml, libcurl, libmicrohttpd, zlib, xapian-core
Libs: -L${prefix}/lib/x86_64-linux-gnu -lkiwix -pthread
Cflags: -I${includedir} -pthread

$ cat BUILD_native_static/INSTALL/lib/x86_64-linux-gnu/pkgconfig/kiwix.pc
prefix=<REDACTED>
libdir=${prefix}/lib64
includedir=${prefix}/include

Name: libkiwix
Description: A library that contains a lot of things used by used by other kiwix programs
Version: 14.0.0
Requires: libzim icu-i18n pugixml libcurl libmicrohttpd xapian-core
Libs: -L${libdir} -lkiwix
Cflags: -I${includedir}/

The notable differences are:

  • libdir changed from ${prefix}/lib64 to ${prefix}/lib/x86_64-linux-gnu

  • for native_dyn configuration Requires.private is used

  • pthread has appeared in Libs/Libs.private and/or Cflags (likely inherited from libzim)

  • version information was added to the libzim requirement.

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.43%. Comparing base (327fec1) to head (cbfd3ec).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1133   +/-   ##
=======================================
  Coverage   41.43%   41.43%           
=======================================
  Files          59       59           
  Lines        4245     4245           
  Branches     2323     2323           
=======================================
  Hits         1759     1759           
  Misses        990      990           
  Partials     1496     1496           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@veloman-yunkan veloman-yunkan marked this pull request as ready for review September 15, 2024 12:42
@kelson42
Copy link
Collaborator

@veloman-yunkan Great, will do my best to check this PR. I believe we probably need to have PR at kiwix-tools and kiwix-desktop tomsupport this new naming?

Copy link
Collaborator

@kelson42 kelson42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo two small cosmetic changes

meson.build Outdated Show resolved Hide resolved
meson.build Outdated Show resolved Hide resolved
Generation of kiwix.pc using the previous approach still stays in place.
Also fixed capitalization in an error message
@veloman-yunkan
Copy link
Collaborator Author

I believe we probably need to have PR at kiwix-tools and kiwix-desktop tomsupport this new naming?

@kelson42 Here they are - kiwix/kiwix-tools#707, kiwix/kiwix-desktop#1213

@veloman-yunkan
Copy link
Collaborator Author

  • version information was added to the libzim requirement (however, for some reason it states >= 8.1.0, which is a deviation from the specified version restriction of ['>=9.0.0', '<10.0.0']; I was unable to find out where it comes from).

The old version information appears to be a remnant of the initial setup of the build tree long ago with further utilization of a quick build procedure without using kiwix-build. After I ran a kiwix-build initiated build of libkiwix the version information of libzim was updated. So no concern here.

@kelson42
Copy link
Collaborator

@veloman-yunkan Should we not remove kiwix.pc.in?

Below are the contents of libkiwix.pc and kiwix.pc files generated using
the new and old approaches, respectively, for native_dyn and
native_static configurations:

```
$ cat BUILD_native_dyn/INSTALL/lib/x86_64-linux-gnu/pkgconfig/libkiwix.pc
prefix=<REDACTED>
includedir=${prefix}/include
libdir=${prefix}/lib/x86_64-linux-gnu

Name: libkiwix
Description: A library that contains useful primitives that Kiwix readers have in common
Version: 14.0.0
Requires.private: icu-i18n, libzim < 10.0.0, libzim >= 9.0.0, pugixml, libcurl, libmicrohttpd, zlib, xapian-core
Libs: -L${prefix}/lib/x86_64-linux-gnu -lkiwix
Libs.private: -pthread
Cflags: -I${includedir}

$ cat BUILD_native_dyn/INSTALL/lib/x86_64-linux-gnu/pkgconfig/kiwix.pc
prefix=<REDACTED>
libdir=${prefix}/lib64
includedir=${prefix}/include

Name: libkiwix
Description: A library that contains a lot of things used by used by other kiwix programs
Version: 14.0.0
Requires: libzim icu-i18n pugixml libcurl libmicrohttpd xapian-core
Libs: -L${libdir} -lkiwix
Cflags: -I${includedir}/

$ cat BUILD_native_static/INSTALL/lib/x86_64-linux-gnu/pkgconfig/libkiwix.pc
prefix=<REDACTED>
includedir=${prefix}/include
libdir=${prefix}/lib/x86_64-linux-gnu

Name: libkiwix
Description: A library that contains useful primitives that Kiwix readers have in common
Version: 14.0.0
Requires: icu-i18n, libzim < 10.0.0, libzim >= 9.0.0, pugixml, libcurl, libmicrohttpd, zlib, xapian-core
Libs: -L${prefix}/lib/x86_64-linux-gnu -lkiwix -pthread
Cflags: -I${includedir} -pthread

$ cat BUILD_native_static/INSTALL/lib/x86_64-linux-gnu/pkgconfig/kiwix.pc
prefix=<REDACTED>
libdir=${prefix}/lib64
includedir=${prefix}/include

Name: libkiwix
Description: A library that contains a lot of things used by used by other kiwix programs
Version: 14.0.0
Requires: libzim icu-i18n pugixml libcurl libmicrohttpd xapian-core
Libs: -L${libdir} -lkiwix
Cflags: -I${includedir}/
```

The notable differences are:

- libdir changed from `${prefix}/lib64` to `${prefix}/lib/x86_64-linux-gnu`

- for native_dyn configuration Requires.private is used

- pthread has appeared in Libs/Libs.private and/or Cflags

- version information was added to the libzim requirement
@kelson42 kelson42 merged commit 6ad1776 into main Sep 17, 2024
15 checks passed
@kelson42 kelson42 deleted the pkgconfig branch September 17, 2024 08:35
@veloman-yunkan
Copy link
Collaborator Author

@veloman-yunkan Should we not remove kiwix.pc.in?

@kelson42 Thanks for catching this. kiwix.pc.in is now history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvement pkgconfig libkiwix
2 participants