pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/55217: devel/gobject-introspection breaks cwrappers LOCALBASE contains symlink
>Number: 55217
>Category: pkg
>Synopsis: devel/gobject-introspection breaks cwrappers LOCALBASE contains symlink
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 29 09:15:00 +0000 2020
>Originator: Frédéric Fauberteau
>Release: FreeBSD 12.1-RELEASE-p3 | HEAD (20200420)
>Organization:
>Environment:
System: FreeBSD cocoon.triaxx.org 12.1-RELEASE-p3 FreeBSD 12.1-RELEASE-p3 GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
The default LOCALBASE for an unprivileged pkgsrc bootstrap is $HOME/pkg. On FreeBSD, /home is
a symlink to /usr/home. The g-ir-scanner command of devel/gobject-introspection resolves -I
arguments using the Python os.path.realpath() method. For example:
`g-ir-scanner -I/home/triaxx/pkg/include/harfbuzz`
produces the following command:
`cc -E -I/usr/home/triaxx/pkg/include/harfbuzz`
Since cc is actually a wrapper used for the buildlink framework, a header file (e.g hb.h)
correctly linked to .buildlink/home/triaxx/pkg/include/harfbuzz/hb.h is not found because
.buildlink/usr/home/triaxx/pkg/include/harfbuzz does not exist.
>How-To-Repeat:
DIR=/path/containing/symlink
cd /usr/pkgsrc/boostrap && ./boostrap --prefix $DIR
cd /usr/pkgsrc/devel/pango && bmake build
>Fix:
The patch below fix the issue. But I try to ask upstream why the include directories are
resolved by os.path.realpath() before committing it.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/gobject-introspection/Makefile,v
retrieving revision 1.70
diff -r1.70 Makefile
3a4
> PKGREVISION= 1
Index: patches/patch-giscanner_ccompiler.py
===================================================================
RCS file: patches/patch-giscanner_ccompiler.py
diff -N patches/patch-giscanner_ccompiler.py
0a1,13
> $NetBSD$
>
> --- giscanner/ccompiler.py.orig 2020-04-05 14:08:04.702725000 +0000
> +++ giscanner/ccompiler.py
> @@ -432,7 +432,7 @@ class CCompiler(object):
> other_options = []
>
> for o in options:
> - option = utils.cflag_real_include_path(o)
> + option = o
> if option.startswith('-I'):
> includes.append(option[len('-I'):])
> elif option.startswith('-D'):
Index: patches/patch-giscanner_scannermain.py
===================================================================
RCS file: patches/patch-giscanner_scannermain.py
diff -N patches/patch-giscanner_scannermain.py
0a1,13
> $NetBSD$
>
> --- giscanner/scannermain.py.orig 2020-04-05 14:08:04.702725000 +0000
> +++ giscanner/scannermain.py
> @@ -52,7 +52,7 @@ def process_cflags_begin(option, opt, value, parser):
> if arg == "-I" and parser.rargs and parser.rargs[0] != '--cflags-end':
> # This is a special case where there's a space between -I and the path.
> arg += parser.rargs.pop(0)
> - cflags.append(utils.cflag_real_include_path(arg))
> + cflags.append(arg)
>
>
> def process_cflags_end(option, opt, value, parser):
Home |
Main Index |
Thread Index |
Old Index