Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Feb 2019 18:44:48 +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: r493008 - head/devel/gdb
Message-ID:  <201902151844.x1FIim6w087225@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb (src,doc committer)
Date: Fri Feb 15 18:44:48 2019
New Revision: 493008
URL: https://svnweb.freebsd.org/changeset/ports/493008

Log:
  Include pretty printers for libc++ when Python is enabled.
  
  The pretty printers are pulled from github/bsdjhb/libcxx-gdbpy.git.
  They are not complete and only support a subset of STL classes.
  
  Bump PORTREVISION.
  
  PR:		235539
  Reviewed by:	pizzamig (maintainer)
  Differential Revision:	https://reviews.freebsd.org/D19087

Modified:
  head/devel/gdb/Makefile
  head/devel/gdb/distinfo
  head/devel/gdb/pkg-plist

Modified: head/devel/gdb/Makefile
==============================================================================
--- head/devel/gdb/Makefile	Fri Feb 15 18:26:23 2019	(r493007)
+++ head/devel/gdb/Makefile	Fri Feb 15 18:44:48 2019	(r493008)
@@ -3,7 +3,7 @@
 
 PORTNAME=	gdb
 PORTVERSION=	8.2.1
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	GNU
 
@@ -91,6 +91,21 @@ PKGNAMESUFFIX=	${PYTHON_PKGNAMESUFFIX}
 .endif
 .endif
 
+.if ${PORT_OPTIONS:MPYTHON} && exists(/usr/lib/libc++.so.1)
+USE_GITHUB=	nodefault
+
+GH_ACCOUNT=	bsdjhb:libcxx
+GH_PROJECT=	libcxx-gdbpy:libcxx
+GH_TAGNAME=	99aae0c:libcxx
+
+# Workaround USE_GITHUB preventing the default DISTFILES
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
+
+PLIST_SUB+=	LIBCXX=""
+.else
+PLIST_SUB+=	LIBCXX="@comment"
+.endif
+
 .if ! ${PORT_OPTIONS:MBUNDLED_READLINE}
 EXCLUDE+=	readline
 .endif
@@ -149,6 +164,14 @@ 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)
+	@(cd ${WRKSRC_libcxx} ; \
+		${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} install )
+	@(cd ${STAGEDIR}${PREFIX}/share/gdb/auto-load/usr/lib && \
+		${PYTHON_CMD} -m compileall .)
+	@(cd ${STAGEDIR}${PREFIX}/share/libcxx-gdbpy/libcxx && \
+		${PYTHON_CMD} -m compileall .)
+.endif
 
 do-install-GUILE-on:
 	(cd ${WRKSRC}/gdb; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-guile )

Modified: head/devel/gdb/distinfo
==============================================================================
--- head/devel/gdb/distinfo	Fri Feb 15 18:26:23 2019	(r493007)
+++ head/devel/gdb/distinfo	Fri Feb 15 18:44:48 2019	(r493008)
@@ -1,3 +1,5 @@
-TIMESTAMP = 1547729301
+TIMESTAMP = 1550011043
 SHA256 (gdb-8.2.1.tar.xz) = 0a6a432907a03c5c8eaad3c3cffd50c00a40c3a5e3c4039440624bae703f2202
 SIZE (gdb-8.2.1.tar.xz) = 20170388
+SHA256 (bsdjhb-libcxx-gdbpy-99aae0c_GH0.tar.gz) = 101425f8041489e31370ddd5938b41541b88a2e1051da70fe12d37c9186aa7eb
+SIZE (bsdjhb-libcxx-gdbpy-99aae0c_GH0.tar.gz) = 4607

Modified: head/devel/gdb/pkg-plist
==============================================================================
--- head/devel/gdb/pkg-plist	Fri Feb 15 18:26:23 2019	(r493007)
+++ head/devel/gdb/pkg-plist	Fri Feb 15 18:44:48 2019	(r493008)
@@ -7,6 +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
 %%PYTHON%%%%DATADIR%%/python/gdb/__init__.py
 %%PYTHON%%%%DATADIR%%/python/gdb/__init__.pyc
 %%PYTHON%%%%DATADIR%%/python/gdb/FrameDecorator.py
@@ -82,3 +84,9 @@ man/man1/gdb%%VER%%.1.gz
 %%DATADIR%%/syscalls/s390x-linux.xml
 %%DATADIR%%/syscalls/sparc-linux.xml
 %%DATADIR%%/syscalls/sparc64-linux.xml
+%%LIBCXX%%share/libcxx-gdbpy/libcxx/__init__.py
+%%LIBCXX%%share/libcxx-gdbpy/libcxx/__init__.pyc
+%%LIBCXX%%share/libcxx-gdbpy/libcxx/printers.py
+%%LIBCXX%%share/libcxx-gdbpy/libcxx/printers.pyc
+%%LIBCXX%%share/libcxx-gdbpy/libcxx/xmethods.py
+%%LIBCXX%%share/libcxx-gdbpy/libcxx/xmethods.pyc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902151844.x1FIim6w087225>