pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/58469: devel/glib2 build fails on CentOS 7 as meson fails to find proper Python
>Number: 58469
>Category: pkg
>Synopsis: devel/glib2 build fails on CentOS 7 as meson fails to find proper Python
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jul 26 15:25:00 +0000 2024
>Originator: Phil Krylov
>Release: pkgsrc-current
>Organization:
krylov.eu
>Environment:
Linux localhost.localdomain 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
>Description:
On CentOS 7, PYTHON_VERSION_DEFAULT gets defaulted to 310 instead of 311, because GCC 4.8.5 has no full C11 support (although Python 3.11 does not seem to need the missing _Generic support). But in the process of building devel/glib2 dependencies, lang/python311 gets installed. So, meson finds not the same python for which a ${PYPKGPREFIX}-packaging-[0-9]*:../../devel/py-packaging has been requested, and devel/glib2's configure stage fails.
>How-To-Repeat:
bmake -C devel/glib2 bin-install
>Fix:
diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile
index 1e3296ab..957f8152 100644
--- a/devel/glib2/Makefile
+++ b/devel/glib2/Makefile
@@ -55,6 +55,12 @@ SUBST_FILES.python+= output/glib/gtester-report
SUBST_MESSAGE.python= Fixing path to Python.
SUBST_SED.python+= -e "s,^\(.*\)/usr/bin/env.*,\1${PYTHONBIN},"
+SUBST_CLASSES+= meson
+SUBST_STAGE.meson= post-patch
+SUBST_FILES.meson+= meson.build
+SUBST_MESSAGE.python= Forcing meson to find proper Python.
+SUBST_VARS.meson+= PYTHONBIN
+
GIO_MODULES_DIR= ${PREFIX}/lib/gio/modules
OWN_DIRS= ${GIO_MODULES_DIR}
diff --git a/devel/glib2/distinfo b/devel/glib2/distinfo
index b79e2de..ae78eda 100644
--- a/devel/glib2/distinfo
+++ b/devel/glib2/distinfo
@@ -25,5 +25,5 @@ SHA1 (patch-glib_tests_thread.c) = 84f46a31cbc7cdfd9503da73f8b4f9654201964f
SHA1 (patch-gmodule_gmodule.c) = a020920b8e5bad34550c9963eb2fc27bef24c5c9
SHA1 (patch-gobject_glib-mkenums.in) = c177cf9b1ea81542665240678f47f68351a3760d
SHA1 (patch-gobject_meson.build) = a3953d33ba7e906ff1df024221ac3ab32f6c0c66
-SHA1 (patch-meson.build) = ee33f8889bdc03e329a9f70d77a478ae365bfa55
+SHA1 (patch-meson.build) = 7a4ec80905eff073443250bca91cff0f6cf4c1f2
SHA1 (patch-meson_options.txt) = 7f633fbbfa9d9b2d958365891ffb9e4094d7dd54
diff --git a/devel/glib2/patches/patch-meson.build b/devel/glib2/patches/patch-meson.build
index ff20188..3bdb256 100644
--- a/devel/glib2/patches/patch-meson.build
+++ b/devel/glib2/patches/patch-meson.build
@@ -14,8 +14,8 @@ $NetBSD: patch-meson.build,v 1.21 2024/04/09 16:57:18 wiz Exp $
- Check also for sys/ptrace.h header file.
---- meson.build.orig 2024-03-07 21:35:05.000000000 +0000
-+++ meson.build
+--- meson.build.orig 2024-07-08 14:03:15.000000000 +0000
++++ meson.build 2024-07-26 14:38:02.009750717 +0000
@@ -412,6 +412,7 @@ headers = [
'sys/mount.h',
'sys/param.h',
@@ -54,9 +54,12 @@ $NetBSD: patch-meson.build,v 1.21 2024/04/09 16:57:18 wiz Exp $
if cc.compiles(glib_conf_prefix + '''
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
-@@ -2421,7 +2421,7 @@ glib_conf.set('HAVE_PROC_SELF_CMDLINE',
+@@ -2419,9 +2419,9 @@ endif
- python = import('python').find_installation(modules: ['packaging'])
+ glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)
+
+-python = import('python').find_installation(modules: ['packaging'])
++python = import('python').find_installation('@PYTHONBIN@', modules: ['packaging'])
# used for '#!/usr/bin/env <name>'
-python_name = 'python3'
+python_name = python.path()
Home |
Main Index |
Thread Index |
Old Index