Package: pkg-config
Version: 0.28-1
Severity: wishlist
Tags: patch

Hi Tollef,

During the bootstrap sprint[1], we discussed why pkg-config was treated
specially in the context of cross-building and concluded that there was
no reason.

Currently, the cross build environment has to take special care to add a
symbolic link from /usr/bin/$DEB_HOST_MULTIARCH-pkg-config to the
pkg-config-crosswrapper. This extra step is unfortunate, because it
requires special attention from the cross builder.

We therefore propose that pkg-config ships this symlink itself. Please
consider applying the attached patch or approving my NMU. When applying
the patch with a non-NMU version, pay attention to updating the version
in the .maintscript file.

Details:
We propose that a new pkg-config-bin package is being introduced, that
takes over all files from pkg-config. pkg-config-bin will keep being
M-A:foreign and will still not ship per-architecture symbolic links. The
original pkg-config (which is now empty) is turned Multi-Arch:same,
depends on pkg-config-bin and ships the symbolic link to
pkg-config-crosswrapper.

After this switch installing pkg-config will bring in the very same
files as before, albeit in a different binary package. When considering
Build-Depends, dependencies are resolved with respect to the host
architecture and thus pkg-config:$DEB_HOST_ARCH will be installed. Its
dependency on pkg-config-bin will be resolved to
pkg-config-bin:$DEB_BUILD_ARCH, because apt prefers native packages when
it has a choice.

If you approve this patch, I will send another patch that adds a stage1
build profile to pkg-config. It will allow for cross-"building" just the
pkg-config binary without actually building pkg-config.

Helmut

[1] https://wiki.debian.org/Sprints/2014/BootstrapSprint
diff -u pkg-config-0.28/debian/changelog pkg-config-0.28/debian/changelog
--- pkg-config-0.28/debian/changelog
+++ pkg-config-0.28/debian/changelog
@@ -1,3 +1,11 @@
+pkg-config (0.28-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Make pkg-config ship per-architecture symbolic links to the cross wrapper.
+    (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 17 Aug 2014 18:39:39 +0200
+
 pkg-config (0.28-1) unstable; urgency=medium
 
   * New upstream release.  (Closes: #699476, #744031)
diff -u pkg-config-0.28/debian/control pkg-config-0.28/debian/control
--- pkg-config-0.28/debian/control
+++ pkg-config-0.28/debian/control
@@ -11,9 +11,25 @@
+Multi-Arch: same
+Depends: pkg-config-bin (= ${binary:Version})
+Description: manage compile and link flags for libraries
+ pkg-config is a system for managing library compile and link flags that 
+ works with automake and autoconf.
+ .
+ Increasingly libraries ship with ".pc" files that allow querying of the
+ compiler and linker flags needed to use them through the pkg-config(1)
+ program.
+
+Package: pkg-config-bin
+Architecture: any
 Multi-Arch: foreign
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: manage compile and link flags for libraries
+Replaces: pkg-config (<= 0.28-1)
+Description: executable for pkg-config
  pkg-config is a system for managing library compile and link flags that 
  works with automake and autoconf.
  .
  Increasingly libraries ship with ".pc" files that allow querying of the
  compiler and linker flags needed to use them through the pkg-config(1)
  program.
+ .
+ This package contains the actual pkg-config binary. Most users want to
+ install pkg-config.
reverted:
--- pkg-config-0.28/debian/dirs
+++ pkg-config-0.28.orig/debian/dirs
@@ -1,2 +0,0 @@
-usr/lib/pkgconfig
-usr/share/pkgconfig
reverted:
--- pkg-config-0.28/debian/docs
+++ pkg-config-0.28.orig/debian/docs
@@ -1,3 +0,0 @@
-README
-AUTHORS
-NEWS
reverted:
--- pkg-config-0.28/debian/pkg-config.install
+++ pkg-config-0.28.orig/debian/pkg-config.install
@@ -1 +0,0 @@
-debian/pkg-config-crosswrapper usr/share
diff -u pkg-config-0.28/debian/rules pkg-config-0.28/debian/rules
--- pkg-config-0.28/debian/rules
+++ pkg-config-0.28/debian/rules
@@ -25,6 +25,7 @@
                --host=$(DEB_HOST_GNU_TYPE) \
                --mandir=\$${prefix}/share/man \
                --infodir=\$${prefix}/share/info --disable-shared \
+               --docdir=\$${prefix}/share/doc/pkg-config-bin \
                
--with-pc-path=/usr/local/lib/$(DEB_HOST_MULTIARCH)/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
 \
                --with-system-library-path=$(SYSTEM_LIBDIRS)
 
@@ -36,0 +38,7 @@
+
+override_dh_install:
+       dh_install
+       ln -s ../share/pkg-config-crosswrapper 
debian/pkg-config/usr/bin/$(DEB_HOST_GNU_TYPE)-pkg-config
+
+override_dh_installdocs:
+       dh_installdocs --link-doc=pkg-config-bin
only in patch2:
unchanged:
--- pkg-config-0.28.orig/debian/pkg-config-bin.dirs
+++ pkg-config-0.28/debian/pkg-config-bin.dirs
@@ -0,0 +1,2 @@
+usr/lib/pkgconfig
+usr/share/pkgconfig
only in patch2:
unchanged:
--- pkg-config-0.28.orig/debian/pkg-config-bin.docs
+++ pkg-config-0.28/debian/pkg-config-bin.docs
@@ -0,0 +1,3 @@
+README
+AUTHORS
+NEWS
only in patch2:
unchanged:
--- pkg-config-0.28.orig/debian/pkg-config-bin.install
+++ pkg-config-0.28/debian/pkg-config-bin.install
@@ -0,0 +1,2 @@
+usr
+debian/pkg-config-crosswrapper usr/share
only in patch2:
unchanged:
--- pkg-config-0.28.orig/debian/pkg-config.dirs
+++ pkg-config-0.28/debian/pkg-config.dirs
@@ -0,0 +1 @@
+usr/bin
only in patch2:
unchanged:
--- pkg-config-0.28.orig/debian/pkg-config.maintscript
+++ pkg-config-0.28/debian/pkg-config.maintscript
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/pkg-config pkg-config-bin 0.28-1.1~

Reply via email to