git: 92d6b833f0a0 - main - devel/gdb: Handle recent 14.0 systems with libc++ in /lib.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 14 Apr 2022 17:06:10 UTC
The branch main has been updated by jhb (doc, src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=92d6b833f0a0bd5ef69af2b87dbc97174aaa395c commit 92d6b833f0a0bd5ef69af2b87dbc97174aaa395c Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-14 17:00:58 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-14 17:00:58 +0000 devel/gdb: Handle recent 14.0 systems with libc++ in /lib. The auto-load python wrapper for libc++ pretty printers has to be installed at the same path as libc++ to work correctly. Update the port to install the top-level wrapper in lib/ under the auto-load data directory instead of usr/lib on recent 14.0 systems. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D34636 --- devel/gdb/Makefile | 17 +++++++++++++---- devel/gdb/pkg-plist | 4 ++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/devel/gdb/Makefile b/devel/gdb/Makefile index 571e3b460996..66ae1ce8316a 100644 --- a/devel/gdb/Makefile +++ b/devel/gdb/Makefile @@ -92,7 +92,8 @@ PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} .endif .endif -.if ${PORT_OPTIONS:MPYTHON} && exists(/usr/lib/libc++.so.1) +.if ${PORT_OPTIONS:MPYTHON} && \ + (exists(/usr/lib/libc++.so.1) || exists(/lib/libc++.so.1)) USE_GITHUB= nodefault GH_ACCOUNT= bsdjhb:libcxx @@ -102,6 +103,13 @@ GH_TAGNAME= 03d0d9b:libcxx # Workaround USE_GITHUB preventing the default DISTFILES DISTFILES= ${DISTNAME}${EXTRACT_SUFX} +.if exists(/usr/lib/libc++.so.1) +LIBCXX_DIR= /usr/lib +.else +LIBCXX_DIR= /lib +.endif + +PLIST_SUB+= LIBCXX_DIR="${LIBCXX_DIR}" PLIST_SUB+= LIBCXX="" .else PLIST_SUB+= LIBCXX="@comment " @@ -162,10 +170,11 @@ do-install-PYTHON-on: . for f in gdb gdb/command gdb/function gdb/printer @(cd ${STAGEDIR}${PREFIX}/share/gdb/python/${f} ; ${CHMOD} 644 *.py* ) . endfor -.if exists(/usr/lib/libc++.so.1) +.if exists(/usr/lib/libc++.so.1) || exists(/lib/libc++.so.1) @(cd ${WRKSRC_libcxx} ; \ - ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} install ) - @(cd ${STAGEDIR}${PREFIX}/share/gdb/auto-load/usr/lib && \ + ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} \ + LIBCXX_DIR="${LIBCXX_DIR}" install ) + @(cd ${STAGEDIR}${PREFIX}/share/gdb/auto-load/${LIBCXX_DIR} && \ ${PYTHON_CMD} -m compileall .) @(cd ${STAGEDIR}${PREFIX}/share/libcxx-gdbpy/libcxx && \ ${PYTHON_CMD} -m compileall .) diff --git a/devel/gdb/pkg-plist b/devel/gdb/pkg-plist index 653d280c5b1a..4efe03c46e1a 100644 --- a/devel/gdb/pkg-plist +++ b/devel/gdb/pkg-plist @@ -7,8 +7,8 @@ bin/gdb%%VER%% man/man1/gdb%%VER%%.1.gz %%GDB_LINK%%%%KGDB%%man/man1/kgdb.1.gz %%KGDB%%man/man1/kgdb%%VER%%.1.gz -%%LIBCXX%%%%DATADIR%%/auto-load/usr/lib/libc++.so.1-gdb.py -%%LIBCXX%%%%DATADIR%%/auto-load/usr/lib/libc++.so.1-gdb.pyc +%%LIBCXX%%%%DATADIR%%/auto-load%%LIBCXX_DIR%%/libc++.so.1-gdb.py +%%LIBCXX%%%%DATADIR%%/auto-load%%LIBCXX_DIR%%/libc++.so.1-gdb.pyc %%PYTHON%%%%DATADIR%%/python/gdb/__init__.py %%PYTHON%%%%DATADIR%%/python/gdb/__init__.pyc %%PYTHON%%%%DATADIR%%/python/gdb/FrameDecorator.py