Use ECMGeneratePkgConfigFile to create the pkgconfig file.
ClosedPublic

Authored by krop on Dec 21 2018, 9:19 AM.

Details

Summary

This also fixes the version in the .pc file.

BUG 390225
FIXED-IN: 5.55

Diff Detail

Repository
R6 KActivities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
krop created this revision.Dec 21 2018, 9:19 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 21 2018, 9:19 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
krop requested review of this revision.Dec 21 2018, 9:19 AM
alexeymin accepted this revision.Dec 21 2018, 9:50 AM
alexeymin added a subscriber: alexeymin.

I tested this, it indeed fixes 390225
Withoug this patch, generated pkgconfig file was:

prefix=/usr
exec_prefix=bin
libdir=lib/x86_64-linux-gnu
includedir=include

Name: libKActivities
Description: libKActivities is a C++ library for using KDE activities
URL: http://www.kde.org
Requires: Qt5Core
Version: 
Libs: -Llib/x86_64-linux-gnu -lKF5Activities
Cflags: -Iinclude

With this, version field is filled in and full paths are specified:

Name: libKActivities
Description: libKActivities is a C++ library for using KDE activities
Version: 5.54.0
Libs: -L/usr/lib/x86_64-linux-gnu -llibKActivities
Cflags: -I/usr/include/libKActivities 
Requires: Qt5Core

So, +1

This revision is now accepted and ready to land.Dec 21 2018, 9:50 AM
This revision was automatically updated to reflect the committed changes.
pino added a subscriber: pino.Dec 21 2018, 9:54 AM

I tested this, it indeed fixes 390225
Withoug this patch, generated pkgconfig file was:

prefix=/usr
exec_prefix=bin
libdir=lib/x86_64-linux-gnu
includedir=include

Name: libKActivities
Description: libKActivities is a C++ library for using KDE activities
URL: http://www.kde.org
Requires: Qt5Core
Version: 
Libs: -Llib/x86_64-linux-gnu -lKF5Activities
Cflags: -Iinclude

With this, version field is filled in and full paths are specified:

Name: libKActivities
Description: libKActivities is a C++ library for using KDE activities
Version: 5.54.0
Libs: -L/usr/lib/x86_64-linux-gnu -llibKActivities

This seems wrong to me, the library is called KF5Activities and not libKActivities.

Cflags: -I/usr/include/libKActivities

Ditto.

In D17718#380267, @pino wrote:

I tested this, it indeed fixes 390225
Withoug this patch, generated pkgconfig file was:

prefix=/usr
exec_prefix=bin
libdir=lib/x86_64-linux-gnu
includedir=include

Name: libKActivities
Description: libKActivities is a C++ library for using KDE activities
URL: http://www.kde.org
Requires: Qt5Core
Version: 
Libs: -Llib/x86_64-linux-gnu -lKF5Activities
Cflags: -Iinclude

With this, version field is filled in and full paths are specified:

Name: libKActivities
Description: libKActivities is a C++ library for using KDE activities
Version: 5.54.0
Libs: -L/usr/lib/x86_64-linux-gnu -llibKActivities

This seems wrong to me, the library is called KF5Activities and not libKActivities.

Cflags: -I/usr/include/libKActivities

Ditto.

mmh, right, and ECMGeneratePkgConfigFile doesn't understand why the Name: and the library name should be different. I'm reverting and just fixing the version in the .pc.cmake file.

krop added a comment.Dec 21 2018, 10:13 AM

Reverted and the version was fixed.