[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    RFC: pkg-config for KDE
From:       "Ian Reinhart Geiser" <geiseri () yahoo ! com>
Date:       2004-09-29 17:27:49
Message-ID: 33431.66.92.236.216.1096478869.squirrel () 66 ! 92 ! 236 ! 216
[Download RAW message or body]

Greetings,
I have been working with QMake to build KDE applications lately.  One tool
that has simplified development with QMake is pkg-config.  It also can
simplify autotools project files too since it will do most of the dirty
work in figuring out where stuff is installed and what it needs to link.

As a service to people who wish to develop 3rd party KDE applications but
do not want to associate themselves with the emotional baggage of our
build system I am proposing adding pkg-config support into KDE.

I have already done kdeui, kdelibs and kdefx as an experiment.  So far the
results are extremely favorable. There are a few issues that have to be
worked out to get as much as possible autogenerated, but at this point I
am very optimistic that this wouldn't be more than a weekend task.

The largest advantage of pkg-conf that I see at this time is it will
significantly reduce the overhead of 3rd party developers who wish to
build KDE applications.
Example:
  g++ someapp.cpp `pkg-config --cflags --libs kdeui`
vs
  g++ someapp.cpp -I/some/hardcoded/path -L/some/other/hardcoded/path
-libkdeui -lkdecore

pkg-config will figure out dependencies and include paths of required
supporting libraries.  since Qt already ships with a pkg-config file, this
too can be included. Also there are quite a few applications already
jumping on the pkg-config bandwagon, so I really see KDE following suit as
a gain for adoption of the tool.

The additions to the build system are quite trivial.  I have attached a
patch for kdecore,kdeui, and kspell to show how useful this is.

So what do people think about this approach?  Are people willing to help
populate .pc.in files for their respective libraries?  Are people against
having such things in KDE cvs?

Cheers
   -ian reinhart geiser
--
["kdecore.pc.in" (text/plain)]

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: kdecore
Description: Core KDE libraries
Version: 3.4
Libs: -L${libdir} -lkdecore
Cflags: -I${includedir}
["kspell.pc.in" (text/plain)]

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: kdeui
Description: KDE Spellchecker libraries
Requires: kdeui
Version: 3.4
Libs: -L${libdir} -lkspell
Cflags: -I${includedir} 
["kdeui.pc.in" (text/plain)]

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: kdeui
Description: User Interface KDE libraries
Requires: kdecore
Version: 3.4
Libs: -L${libdir} -lkdeui
Cflags: -I${includedir} 
["pkg-config.patch" (text/x-diff)]

Index: configure.in.in
===================================================================
RCS file: /home/kde/kdelibs/configure.in.in,v
retrieving revision 1.124
diff -u -u -r1.124 configure.in.in
--- configure.in.in	9 Sep 2004 10:50:27 -0000	1.124
+++ configure.in.in	29 Sep 2004 17:25:34 -0000
@@ -343,3 +343,9 @@
 
 KDE_INIT_DOXYGEN([The KDE API Reference], [Version $VERSION])
 KDE_CHECK_BINUTILS
+
+dnl AC_OUTPUT(kdecore/kdecore.pc)
+dnl AC_OUTPUT(kdeui/kdeui.pc)
+dnl AC_OUTPUT(kdeui/kspell.pc)
Index: kdecore/Makefile.am
===================================================================
RCS file: /home/kde/kdelibs/kdecore/Makefile.am,v
retrieving revision 1.355
diff -u -u -r1.355 Makefile.am
--- kdecore/Makefile.am	10 Sep 2004 19:42:21 -0000	1.355
+++ kdecore/Makefile.am	29 Sep 2004 17:25:34 -0000
@@ -170,11 +170,12 @@
 	@echo "This is needed for konsole, etc. to ensure that they can't be eavesdroped."
 	@echo ""
 
-DISTCLEANFILES = kde-config.cpp
+DISTCLEANFILES = kde-config.cpp kdecore.pc
 
 DOXYGEN_REFERENCES = dcop kdeui kparts kio
 DOXYGEN_EXCLUDE = malloc
 
 include ../admin/Doxyfile.am
 
-
+pkgconfigdir = $(DESTDIR)$(libdir)/pkgconfig
+pkgconfig_DATA = kdecore.pc
Index: kdeui/Makefile.am
===================================================================
RCS file: /home/kde/kdelibs/kdeui/Makefile.am,v
retrieving revision 1.333
diff -u -u -r1.333 Makefile.am
--- kdeui/Makefile.am	1 Sep 2004 19:06:08 -0000	1.333
+++ kdeui/Makefile.am	29 Sep 2004 17:25:34 -0000
@@ -164,3 +164,7 @@
 
 DOXYGEN_REFERENCES = kdecore kdefx dcop kio kutils
 include ../admin/Doxyfile.am
+
+DISTCLEANFILES = kspell.pc kdecore.pc
+pkgconfigdir = $(DESTDIR)$(libdir)/pkgconfig
+pkgconfig_DATA = kdeui.pc kspell.pc

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic