Date: Mon, 10 Dec 2018 17:23:19 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r487193 - in head/devel/gdb: . files Message-ID: <201812101723.wBAHNJfh048231@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb (src,doc committer) Date: Mon Dec 10 17:23:19 2018 New Revision: 487193 URL: https://svnweb.freebsd.org/changeset/ports/487193 Log: Various fixes for GDB's data directory. - Backport a fix from master to fix the setting of the default auto-load paths. - Switch to using the default data directory (PREFIX/share/gdb) instead of a version specific directory. This allows gdb to use auto-load scripts installed by other packages to PREFIX/share/gdb/auto-load. A couple of existing packages already do this such as libglib and libgobject. - Add symlinks for gdb.1 and kgdb.1 manpages without version numbers. This makes 'man gdb' and 'man kgdb' work on 12.0 which doesn't have these manpages in the base system. - Precompile the installed python scripts and add then to the packing list. This avoids leaving .pyc files around after the package is deleted if gdb (or kgdb) is run as root. - Bump PORTREVISION. Reviewed by: pizzamig (maintainer) Differential Revision: https://reviews.freebsd.org/D18476 Added: head/devel/gdb/files/commit-2861ee4fde (contents, props changed) Modified: head/devel/gdb/Makefile head/devel/gdb/pkg-plist Modified: head/devel/gdb/Makefile ============================================================================== --- head/devel/gdb/Makefile Mon Dec 10 17:18:12 2018 (r487192) +++ head/devel/gdb/Makefile Mon Dec 10 17:23:19 2018 (r487193) @@ -3,7 +3,7 @@ PORTNAME= gdb PORTVERSION= 8.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= GNU @@ -29,7 +29,6 @@ GNU_CONFIGURE= yes CONFIGURE_ENV= CONFIGURED_M4=m4 CONFIGURED_BISON=byacc CONFIGURE_ARGS= --program-suffix=${PORTVERSION:S/.//g} \ --enable-targets=all --enable-64-bit-bfd \ - --with-gdb-datadir=${PREFIX}/share/gdb${PORTVERSION:S/.//g} \ --with-separate-debug-dir=/usr/lib/debug \ ${ICONV_CONFIGURE_ARG} \ --with-expat=yes --with-libexpat-prefix=${LOCALBASE} \ @@ -40,7 +39,8 @@ CFLAGS+= -Wno-unknown-warning-option EXCLUDE= dejagnu expect sim texinfo intl EXTRACT_AFTER_ARGS= ${EXCLUDE:S/^/--exclude /} EXTRA_PATCHES= ${FILESDIR}/commit-8aa0243d54 \ - ${FILESDIR}/commit-93579f6f90 + ${FILESDIR}/commit-93579f6f90 \ + ${FILESDIR}/commit-2861ee4fde LIB_DEPENDS+= libexpat.so:textproc/expat2 VER= ${PORTVERSION:S/.//g} @@ -127,16 +127,20 @@ do-install-TUI-on: do-install-GDB_LINK-on: ${LN} -sf gdb${VER} ${STAGEDIR}${PREFIX}/bin/gdb + ${LN} -sf gdb${VER}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/gdb.1 .if ${PORT_OPTIONS:MKGDB} ${LN} -sf kgdb${VER} ${STAGEDIR}${PREFIX}/bin/kgdb + ${LN} -sf kgdb${VER}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/kgdb.1 .endif do-install-PYTHON-on: (cd ${WRKSRC}/gdb; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-python ) (cd ${WRKSRC}/gdb/data-directory ; \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-python ) + @(cd ${STAGEDIR}${PREFIX}/share/gdb/python && \ + ${PYTHON_CMD} -m compileall .) . for f in gdb gdb/command gdb/function gdb/printer - @(cd ${STAGEDIR}${PREFIX}/share/gdb${VER}/python/${f} ; ${CHMOD} 644 *.py* ) + @(cd ${STAGEDIR}${PREFIX}/share/gdb/python/${f} ; ${CHMOD} 644 *.py* ) . endfor do-install-GUILE-on: Added: head/devel/gdb/files/commit-2861ee4fde ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/gdb/files/commit-2861ee4fde Mon Dec 10 17:23:19 2018 (r487193) @@ -0,0 +1,63 @@ +commit 2861ee4fde97d0afafc506380c5deaf71c8439ac +Author: John Baldwin <jhb@FreeBSD.org> +Date: Wed Dec 5 10:51:16 2018 -0800 + + Use separate sed expressions to escape auto-load directories. + + Not all sed implementations support alternation via \| in the default + regular expressions. Instead, resort to separate sed expressions via + -e for $debugdir and $datadir. This fixes the default setting of the + auto-load directories on FreeBSD. Previously on FreeBSD the sed + invocation was a no-op causing the debugdir and datadir values to be + expanded yielding an autoload path of ':${prefix}/share/gdb'. + + gdb/ChangeLog: + + * configure: Re-generate. + * configure.ac: Use separate sed expressions to escape variables + in auto-load directories. + +diff --git gdb/configure gdb/configure +index 7665ba6531..3777230898 100755 +--- gdb/configure ++++ gdb/configure +@@ -6579,7 +6579,7 @@ else + with_auto_load_dir='$debugdir:$datadir/auto-load' + fi + +-escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` ++escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` + + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +@@ -6606,7 +6606,7 @@ else + with_auto_load_safe_path="$with_auto_load_dir" + fi + +-escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` ++escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` + + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +diff --git gdb/configure.ac gdb/configure.ac +index e1ea60660b..eca7ea6d41 100644 +--- gdb/configure.ac ++++ gdb/configure.ac +@@ -146,7 +146,7 @@ AC_ARG_WITH(auto-load-dir, + AS_HELP_STRING([--with-auto-load-dir=PATH], + [directories from which to load auto-loaded scripts @<:@$debugdir:$datadir/auto-load@:>@]),, + [with_auto_load_dir='$debugdir:$datadir/auto-load']) +-escape_dir=`echo $with_auto_load_dir | sed 's/[[$]]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` ++escape_dir=`echo $with_auto_load_dir | sed -e 's/[[$]]datadir\>/\\\\\\\\\\\\&/g' -e 's/[[$]]debugdir\>/\\\\\\\\\\\\&/g'` + AC_DEFINE_DIR(AUTO_LOAD_DIR, escape_dir, + [Directories from which to load auto-loaded scripts.]) + AC_MSG_RESULT([$with_auto_load_dir]) +@@ -161,7 +161,7 @@ AS_HELP_STRING([--without-auto-load-safe-path], + with_auto_load_safe_path="/" + fi], + [with_auto_load_safe_path="$with_auto_load_dir"]) +-escape_dir=`echo $with_auto_load_safe_path | sed 's/[[$]]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` ++escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[[$]]datadir\>/\\\\\\\\\\\\&/g' -e 's/[[$]]debugdir\>/\\\\\\\\\\\\&/g'` + AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir, + [Directories safe to hold auto-loaded files.]) + AC_MSG_RESULT([$with_auto_load_safe_path]) Modified: head/devel/gdb/pkg-plist ============================================================================== --- head/devel/gdb/pkg-plist Mon Dec 10 17:18:12 2018 (r487192) +++ head/devel/gdb/pkg-plist Mon Dec 10 17:23:19 2018 (r487193) @@ -3,57 +3,82 @@ bin/gdb%%VER%% %%TUI%%bin/gdbtui%%VER%% %%KGDB%%bin/kgdb%%VER%% +%%GDB_LINK%%man/man1/gdb.1.gz man/man1/gdb%%VER%%.1.gz +%%GDB_LINK%%%%KGDB%%man/man1/kgdb.1.gz %%KGDB%%man/man1/kgdb%%VER%%.1.gz -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/__init__.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/FrameDecorator.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/FrameIterator.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/frames.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/printing.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/prompt.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/types.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/unwinder.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/xmethod.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/__init__.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/explore.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/frame_filters.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/pretty_printers.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/prompt.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/type_printers.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/unwinders.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/xmethods.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/function/__init__.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/function/as_string.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/function/caller_is.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/function/strfns.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/printer/__init__.py -%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/printer/bound_registers.py -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb.go -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb.scm -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/boot.scm -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/experimental.go -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/experimental.scm -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/init.scm -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/iterator.go -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/iterator.scm -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/printing.go -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/printing.scm -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/support.go -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/support.scm -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/types.go -%%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/types.scm -%%DATADIR%%%%VER%%/syscalls/aarch64-linux.xml -%%DATADIR%%%%VER%%/syscalls/amd64-linux.xml -%%DATADIR%%%%VER%%/syscalls/arm-linux.xml -%%DATADIR%%%%VER%%/syscalls/freebsd.xml -%%DATADIR%%%%VER%%/syscalls/gdb-syscalls.dtd -%%DATADIR%%%%VER%%/syscalls/i386-linux.xml -%%DATADIR%%%%VER%%/syscalls/mips-n32-linux.xml -%%DATADIR%%%%VER%%/syscalls/mips-n64-linux.xml -%%DATADIR%%%%VER%%/syscalls/mips-o32-linux.xml -%%DATADIR%%%%VER%%/syscalls/ppc-linux.xml -%%DATADIR%%%%VER%%/syscalls/ppc64-linux.xml -%%DATADIR%%%%VER%%/syscalls/s390-linux.xml -%%DATADIR%%%%VER%%/syscalls/s390x-linux.xml -%%DATADIR%%%%VER%%/syscalls/sparc-linux.xml -%%DATADIR%%%%VER%%/syscalls/sparc64-linux.xml +%%PYTHON%%%%DATADIR%%/python/gdb/__init__.py +%%PYTHON%%%%DATADIR%%/python/gdb/__init__.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/FrameDecorator.py +%%PYTHON%%%%DATADIR%%/python/gdb/FrameDecorator.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/FrameIterator.py +%%PYTHON%%%%DATADIR%%/python/gdb/FrameIterator.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/frames.py +%%PYTHON%%%%DATADIR%%/python/gdb/frames.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/printing.py +%%PYTHON%%%%DATADIR%%/python/gdb/prompt.py +%%PYTHON%%%%DATADIR%%/python/gdb/prompt.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/printing.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/types.py +%%PYTHON%%%%DATADIR%%/python/gdb/types.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/unwinder.py +%%PYTHON%%%%DATADIR%%/python/gdb/unwinder.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/xmethod.py +%%PYTHON%%%%DATADIR%%/python/gdb/xmethod.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/command/__init__.py +%%PYTHON%%%%DATADIR%%/python/gdb/command/__init__.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/command/explore.py +%%PYTHON%%%%DATADIR%%/python/gdb/command/explore.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/command/frame_filters.py +%%PYTHON%%%%DATADIR%%/python/gdb/command/frame_filters.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/command/pretty_printers.py +%%PYTHON%%%%DATADIR%%/python/gdb/command/pretty_printers.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/command/prompt.py +%%PYTHON%%%%DATADIR%%/python/gdb/command/prompt.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/command/type_printers.py +%%PYTHON%%%%DATADIR%%/python/gdb/command/type_printers.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/command/unwinders.py +%%PYTHON%%%%DATADIR%%/python/gdb/command/unwinders.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/command/xmethods.py +%%PYTHON%%%%DATADIR%%/python/gdb/command/xmethods.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/function/__init__.py +%%PYTHON%%%%DATADIR%%/python/gdb/function/__init__.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/function/as_string.py +%%PYTHON%%%%DATADIR%%/python/gdb/function/as_string.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/function/caller_is.py +%%PYTHON%%%%DATADIR%%/python/gdb/function/caller_is.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/function/strfns.py +%%PYTHON%%%%DATADIR%%/python/gdb/function/strfns.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/printer/__init__.py +%%PYTHON%%%%DATADIR%%/python/gdb/printer/__init__.pyc +%%PYTHON%%%%DATADIR%%/python/gdb/printer/bound_registers.py +%%PYTHON%%%%DATADIR%%/python/gdb/printer/bound_registers.pyc +%%GUILE%%%%DATADIR%%/guile/gdb.go +%%GUILE%%%%DATADIR%%/guile/gdb.scm +%%GUILE%%%%DATADIR%%/guile/gdb/boot.scm +%%GUILE%%%%DATADIR%%/guile/gdb/experimental.go +%%GUILE%%%%DATADIR%%/guile/gdb/experimental.scm +%%GUILE%%%%DATADIR%%/guile/gdb/init.scm +%%GUILE%%%%DATADIR%%/guile/gdb/iterator.go +%%GUILE%%%%DATADIR%%/guile/gdb/iterator.scm +%%GUILE%%%%DATADIR%%/guile/gdb/printing.go +%%GUILE%%%%DATADIR%%/guile/gdb/printing.scm +%%GUILE%%%%DATADIR%%/guile/gdb/support.go +%%GUILE%%%%DATADIR%%/guile/gdb/support.scm +%%GUILE%%%%DATADIR%%/guile/gdb/types.go +%%GUILE%%%%DATADIR%%/guile/gdb/types.scm +%%DATADIR%%/syscalls/aarch64-linux.xml +%%DATADIR%%/syscalls/amd64-linux.xml +%%DATADIR%%/syscalls/arm-linux.xml +%%DATADIR%%/syscalls/freebsd.xml +%%DATADIR%%/syscalls/gdb-syscalls.dtd +%%DATADIR%%/syscalls/i386-linux.xml +%%DATADIR%%/syscalls/mips-n32-linux.xml +%%DATADIR%%/syscalls/mips-n64-linux.xml +%%DATADIR%%/syscalls/mips-o32-linux.xml +%%DATADIR%%/syscalls/ppc-linux.xml +%%DATADIR%%/syscalls/ppc64-linux.xml +%%DATADIR%%/syscalls/s390-linux.xml +%%DATADIR%%/syscalls/s390x-linux.xml +%%DATADIR%%/syscalls/sparc-linux.xml +%%DATADIR%%/syscalls/sparc64-linux.xml
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812101723.wBAHNJfh048231>