On Tuesday 02 September 2003 08:42, Michael Scherer wrote:
> The patch is not perfect. If applied right now,linphone would
> requires pkgconfig, which is useless.
> So, what i propose is to add pkgconfig as a requires if :
> - a file is dropped in /usr/lib/pkgconfig
> and if
> - a file is dropped in /usr/share/aclocal and this file test the
> presence of pkg-config. It should be engouh to grep
> AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
> in the file.
here is new patch, that implement what i have explained.
right now, as stefan stated , we have 3 solutions.
adding pkgconfig to rpm-build.
this will solve the problem for rpm building without needing to add
dependancy to all rpm.
but people using libfoo-devel, who use pkgconfig for ./configure script
will have to download it afterward. And, i do not think this is clan.
adding pkgconfig to each library
this is also bad because it would be added by hand. this is error prone,
and almost as bad as current solution. But this would solve the problem
of ./configure. I guess a rpmlint warning ( pc-files-without-pkgrequire
) would be enough for this one.
using the patch and automaticaly adding it to the package that need it
this would only add pkgconfig for library that really use it when
aclocal is used, and is automated, so no need to change library, just
rebuild them.
all file dropped in /usr/share/aclocal are included in ./configure
script whan aclocal is used, so, if the file check pkgconfig existence,
with a macro, it mean that all configure script trying to detect this
library will use pkgconfig, and so it is good to add it as requires.
i suggest the last solution, but, maybe someone see a problem ?
if not, i will submit a bugreport during the weekend.
--
Mickaël Scherer
--- find-requires.bak 2003-09-01 09:49:23.000000000 +0200
+++ find-requires 2003-09-03 20:42:35.000000000 +0200
@@ -165,6 +165,13 @@
echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/tcl.req | sort -u
#
+# --- pkgconfig .pc files
+( echo $filelist | tr '[:blank:]' '\n' | grep -q '/usr/lib/pkgconfig/' ) &&
+( aclocal_files=`echo $filelist | tr '[:blank:]' '\n' | grep '/usr/share/aclocal/'`;
+[ -n $aclocal_files ] && grep -q 'AC_PATH_PROG(PKG_CONFIG, pkg-config,' $aclocal_files 2>/dev/null && echo 'pkgconfig'
+)
+
+#
# --- .so files.
for i in `echo $filelist | tr '[:blank:]' "\n" | egrep "(/usr(/X11R6)?)?/lib(|64)/[^/]+\.so$"`; do
objd=`objdump -p ${i} | grep SONAME`