Bug#1041327: RFS: libtypec/0.3-1 [RFP] -- Development files for an interface for USB-C port management
Hi Colin,
Colin King (gmail) <colin.i.king@gmail.com> ezt írta (időpont: 2023.
nov. 16., Cs, 14:00):
>
> Hi again Balint,
>
> On 16/11/2023 11:35, Bálint Réczey wrote:
> > Hi Colin,
> >
> > Thanks for the quick response.
> > Please check my other observations, too, in
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041327#58
>
> You mentioned:
>
> "The .pc file is now at the right location, but contains multiarch
> strings which will differ across architectures.
> I suggest hardcoding the paths in the patch."
>
> I'm not quite sure what is incorrect here, this file is patched already
> via debian/patches/0001-fix-libtypec-libdir.patch
>
> For an i386 build, the .pc file in usr/share/pkgconfig contains:
>
> prefix=/usr
> exec_prefix=/usr
> libdir=${exec_prefix}/lib/i386-linux-gnu
> includedir=${prefix}/include/i386-linux-gnu
> ..
>
> For a x86-64 build, the .pc file in usr/share/pkgconfig contains:
> prefix=/usr
> exec_prefix=/usr
> libdir=${exec_prefix}/lib/x86_64-linux-gnu
> includedir=${prefix}/include/x86_64-linux-gnu
> ..
>
> For an arm64 build, the .pc file in usr/share/pkgconfig contains:
> prefix=/usr
> exec_prefix=/usr
> libdir=${exec_prefix}/lib/aarch64-linux-gnu
> includedir=${prefix}/include/aarch64-linux-gnu
> ..
>
> ..so I'm a bit confused. Do you mind clarifying for me.
I'm sorry, my comment was a bit vague, indeed.
So the problem is having the multiarch string in the .pc file, while
the file is not in a multiarch location.
Lintian throws an error about it, that would cause an auto-reject when
uploading the package:
E: libtypec-dev: pkg-config-multi-arch-wrong-dir full text contains
architecture specific dir x86_64-linux-gnu
[usr/share/pkgconfig/libtypec.pc]
N:
N: The arch all pkg-config file contains a reference to a multi-arch path.
N:
N: This can be usually be fixed by moving this file to a multi-arch path.
N:
N: Another likely cause is using debhelper 9 or newer (thus enabling
multi-arch paths
N: by default) on a package without multi-arch support. The usual
cure in this case is
N: to update it for multi-arch.
N:
N: Last but not least, this file could contain a reference to a
cross architecture
N: (like for instance an x86_64-linux-gnu pkg-config file referencing an
N: i386-linux-gnu file). In this case the usual cure is to fix this path.
N:
N: Visibility: error
N: Show-Always: no
N: Check: files/pkgconfig
Since libtypec installs include files and libs to the standard
locations actually there is no need to set those paths.
I think I would use the following patch:
--- a/libtypec.pc.in
+++ b/libtypec.pc.in
@@ -1,12 +1,9 @@
prefix=/usr
exec_prefix=/usr
-libdir=${exec_prefix}/lib/x86_64-linux-gnu
-includedir=${prefix}/
Name: libtypec
Description: USB-Type C and USB Power Delivery class devices
Version: 0.4.0
Requires:
-Libs: -L${libdir} -llibtypec
-Cflags: -I${includedir}
+Libs: -llibtypec
Cheers,
Balint
> Colin
>
Reply to: