pkgconf: Update to 1.8.0, remove runtime dep on environment variable SAGE_LOCAL
Closed this issue · 23 comments
(from #29411)
We upgrade pkgconf from the ancient version 0.9.7 and make it work outside of sage-env.
CC: @orlitzky @dimpase @vbraun
Component: packages: standard
Keywords: sd111
Author: Matthias Koeppe
Branch/Commit: 9c123af
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/29779
It looks like we can specify the *.pc file location at build time using --with-pkg-config-dir:
https://github.com/pkgconf/pkgconf/blob/master/configure.ac
Afterwards, we can probably just symlink pkgconf to "pkg-config", and then rely on PATH to choose the right one.
src/bin/sage-env already prepends the sage-specific *.pc file path to PKG_CONFIG_PATH in case the system pkg-config is used. From pkgconf's spkg-configure.m4:
AS_IF([test -z "$ac_cv_path_PKGCONF"], [
sage_spkg_install_pkgconf=yes
AC_SUBST(SAGE_PKG_CONFIG_PATH, [''])
AC_MSG_RESULT([installing pkgconf spkg])], [
dnl the following as needed as long as Sage creates .pc files during build and/or configure
AC_SUBST(SAGE_PKG_CONFIG_PATH, ['$SAGE_LOCAL/lib/pkgconfig'])
AC_MSG_RESULT([using pkg-config from the system])
])
Then in sage-env,
if [ -n "$SAGE_PKG_CONFIG_PATH" ]; then
# set up external pkg-config to look into SAGE_LOCAL/lib/pkgconfig/
# (Sage's pkgconf spkg takes care of this, if installed)
export PKG_CONFIG_PATH="$SAGE_PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
fi
So we "shouldn't" be hurt by ditching the pkgconf wrapper script and hard-coding the full list of paths into pkgconf at build time.
Sounds right to me
Changed keywords from none to sd111
Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111
Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.
Any progress here?
@orlitzky, it sounds like you have some free time. Care to work on this ticket?
I never wanted to work on it in the first place. pkg-config is a standard, stable, system utility that's available everywhere. We should delete the SPKG and require that the user have it installed. Treadmill tickets like these are a complete waste of time, but not mine.
Author: Matthias Koeppe
Description changed:
---
+++
@@ -1,2 +1,3 @@
(from #29411)
+We upgrade pkgconf from the ancient version 0.9.7 and make it work outside of `sage-env`.there are changes of $SAGE_LOCAL to unprefixed by $. What does it do - if it was to be substituted I'd expect @SAGE_LOCAL@?
These are resolved as m4 macros - see the m4 invocation in spkg-postinst.in
Branch pushed to git repo; I updated commit sha1. New commits:
9c123af | build/pkgs/sagelib/spkg-install: Poison SAGE_LOCAL |
Let's get this in please
lgtm
Reviewer: Dima Pasechnik
Thanks!