[Midnightbsd-cvs] mports [15442] trunk/devel/gdb: fix build on current

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Sep 12 19:53:00 EDT 2013


Revision: 15442
          http://svnweb.midnightbsd.org/mports/?rev=15442
Author:   laffer1
Date:     2013-09-12 19:52:59 -0400 (Thu, 12 Sep 2013)
Log Message:
-----------
fix build on current

Modified Paths:
--------------
    trunk/devel/gdb/Makefile
    trunk/devel/gdb/files/extrapatch-gdb-Makefile.in
    trunk/devel/gdb/files/extrapatch-gdb-configure.tgt

Removed Paths:
-------------
    trunk/devel/gdb/files/patch-include-cgen-basic-ops.h

Modified: trunk/devel/gdb/Makefile
===================================================================
--- trunk/devel/gdb/Makefile	2013-09-12 23:43:39 UTC (rev 15441)
+++ trunk/devel/gdb/Makefile	2013-09-12 23:52:59 UTC (rev 15442)
@@ -2,83 +2,131 @@
 
 PORTNAME=	gdb
 PORTVERSION=	7.6
+PORTREVISION=	1
 CATEGORIES=	devel
-MASTER_SITES=   GNU
+MASTER_SITES=	GNU
 
 MAINTAINER=	ports at MidnightBSD.org
 COMMENT=	GNU GDB of newer version than comes with the system
+
 LICENSE=	gpl3
 
 USE_BZIP2=	yes
+USE_CSTD=	gnu89
 USE_GMAKE=	yes
-USE_ICONV=	yes
+USES=		iconv
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV+=	CONFIGURED_M4=m4 CONFIGURED_BISON=byacc
+CONFIGURE_ENV=	CONFIGURED_M4=m4 CONFIGURED_BISON=byacc
 CONFIGURE_ARGS=	--program-suffix=${PORTVERSION:S/.//g} \
-		--with-libiconv-prefix=${LOCALBASE} \
-		--with-system-readline \
-		--without-libunwind \
-		--enable-target=all \
-		--enable-tui \
-		--disable-werror
+		--with-gdb-datadir=${PREFIX}/share/gdb${PORTVERSION:S/.//g} \
+		${ICONV_CONFIGURE_ARG} \
+		--without-libunwind-ia64 \
+		--enable-targets=all
 CFLAGS:=	${CFLAGS:C/ +$//}	# blanks at EOL creep in sometimes
 CFLAGS+=	-DRL_NO_COMPAT
-EXCLUDE=	dejagnu expect readline sim texinfo intl
-EXTRACT_AFTER_ARGS=| ${TAR} -xf - ${EXCLUDE:S/^/--exclude /}
-VER=	${PORTVERSION:S/.//}
+EXCLUDE=	dejagnu expect sim texinfo intl
+EXTRACT_AFTER_ARGS=	${EXCLUDE:S/^/--exclude /}
+VER=	${PORTVERSION:S/.//g}
 PLIST_SUB=	VER=${VER}
 MAN1=	gdb${VER}.1
 
 ONLY_FOR_ARCHS=	i386 amd64	# untested elsewhere, might work
 
-OPTIONS=	DEBUG "Build with debugging symbols" off \
-		EXPAT "Enable XML parsing for metadata" off \
-		PYTHON "Enable Python support" off
+OPTIONS_DEFINE=	DEBUG EXPAT PYTHON THREADS TUI GDB_LINK
+OPTIONS_SINGLE_READLINE=	BASE_READLINE BUNDLED_READLINE PORT_READLINE
+OPTIONS_SINGLE=	READLINE
+BASE_READLINE_DESC=	from base system(EXPERIMENTAL)
+BUNDLED_READLINE_DESC=	from gdb distfile
+PORT_READLINE_DESC=	from devel/readline port
+GDB_LINK_DESC=	Create the gdb link
+TUI_DESC=	Text User Interface enabled
+OPTIONS_DEFAULT=	THREADS TUI GDB_LINK PORT_READLINE
 
 .include <bsd.mport.options.mk>
 
-.if defined(WITH_PYTHON)
+.if ${PORT_OPTIONS:MGDB_LINK}
+PLIST_SUB+=	GDB_LINK=""
+.else
+PLIST_SUB+=	GDB_LINK="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MTUI}
+CONFIGURE_ARGS+=	--enable-tui
+PLIST_SUB+=	TUI_LINK=""
+.else
+CONFIGURE_ARGS+=	--disable-tui
+PLIST_SUB+=	TUI_LINK="@comment "
+.endif
+
+.if empty(PORT_OPTIONS:MBUNDLED_READLINE)
+EXCLUDE+=	readline
+CONFIGURE_ARGS+=	--with-system-readline
+.endif
+
+.if ${PORT_OPTIONS:MBASE_READLINE}
+CFLAGS+=	-D_rl_echoing_p=readline_echoing_p
+USES+=		readline
+.endif
+
+.if ${PORT_OPTIONS:MPORT_READLINE}
+USES+=		readline:port
+.endif
+
+.if ${PORT_OPTIONS:MPYTHON}
 USE_PYTHON=	2.5-2.7
+CONFIGURE_ARGS+=	--with-python=${PYTHON_CMD}
+PLIST_SUB+=		PYTHON=""
+.else
+CONFIGURE_ARGS+=	--without-python
+PLIST_SUB+=		PYTHON="@comment "
 .endif
 
 .include <bsd.port.pre.mk>
 
-.if defined(WITH_DEBUG)
-CFLAGS+=	-g
+.if ${PORT_OPTIONS:MTHREADS}
+EXTRA_PATCHES=	${FILESDIR}/extrapatch-gdb-configure.tgt ${FILESDIR}/extrapatch-gdb-Makefile.in
 .endif
 
-.if defined(WITH_EXPAT)
-LIB_DEPENDS+=	expat.6:${PORTSDIR}/textproc/expat2
-CONFIGURE_ARGS+= --with-expat=yes
-.else
-CONFIGURE_ARGS+= --without-expat
+.if ${PORT_OPTIONS:MDEBUG}
+CFLAGS+=	-g
 .endif
 
-.if defined(WITH_PYTHON)
-CONFIGURE_ARGS+= --with-python=${PYTHON_CMD}
+.if ${PORT_OPTIONS:MEXPAT}
+LIB_DEPENDS+=	expat:${PORTSDIR}/textproc/expat2
+CONFIGURE_ARGS+=	--with-expat=yes
 .else
-CONFIGURE_ARGS+= --without-python
+CONFIGURE_ARGS+=	--without-expat
 .endif
 
-# XXX: add OSVERSION check after readline is removed from base
-.if exists(${LOCALBASE}/lib/libreadline.so)
-LIB_DEPENDS+=	readline.6:${PORTSDIR}/devel/readline
-CFLAGS+=	-isystem ${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
-.endif
-
 .if ${ARCH} == "amd64"
-CONFIGURE_TARGET=	x86_64-portbld-freebsd7.0
+CONFIGURE_TARGET=	x86_64-portbld-freebsd9.1
 .endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's/$$/ [GDB v${PORTVERSION} for FreeBSD]/' \
 		${WRKSRC}/gdb/version.in
-	@${CP} ${FILESDIR}/fbsd-threads.c ${WRKSRC}/gdb
+.if ${PORT_OPTIONS:MTHREADS}
+	@${CP} ${FILESDIR}/fbsd-threads.c ${WRKSRC}/gdb/
+.endif
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/gdb/gdb ${PREFIX}/bin/gdb${VER}
-	${LN} ${PREFIX}/bin/gdb${VER} ${PREFIX}/bin/gdbtui${VER}
 	${INSTALL_MAN} ${WRKSRC}/gdb/gdb.1 ${MAN1PREFIX}/man/man1/gdb${VER}.1
+.if ${PORT_OPTIONS:MTUI}
+	${LN} -sf ${PREFIX}/bin/gdb${VER} ${PREFIX}/bin/gdbtui${VER}
+.endif
+.if ${PORT_OPTIONS:MGDB_LINK}
+	${LN} -sf gdb${VER} ${PREFIX}/bin/gdb
+.endif
+.if ${PORT_OPTIONS:MPYTHON}
+	(cd ${WRKSRC}/gdb; ${GMAKE} install-python )
+	(cd ${WRKSRC}/gdb/data-directory; ${GMAKE} install-python )
+.endif
 
+post-install:
+.if ${PORT_OPTIONS:MPYTHON}
+	${CHMOD} u+w ${PREFIX}/share/gdb${VER}/python/gdb/*.py*
+	${CHMOD} u+w ${PREFIX}/share/gdb${VER}/python/gdb/command/*.py*
+.endif
+
 .include <bsd.port.post.mk>

Modified: trunk/devel/gdb/files/extrapatch-gdb-Makefile.in
===================================================================
--- trunk/devel/gdb/files/extrapatch-gdb-Makefile.in	2013-09-12 23:43:39 UTC (rev 15441)
+++ trunk/devel/gdb/files/extrapatch-gdb-Makefile.in	2013-09-12 23:52:59 UTC (rev 15442)
@@ -1,9 +1,20 @@
---- gdb/Makefile.in.orig	2012-07-02 17:29:33.000000000 +0200
-+++ gdb/Makefile.in	2012-08-26 21:01:45.589052997 +0200
-@@ -573,6 +573,7 @@
+--- gdb/Makefile.in.orig	2013-04-02 19:38:43.000000000 +0200
++++ gdb/Makefile.in	2013-05-18 13:08:47.000000000 +0200
+@@ -566,8 +566,8 @@
+ 	moxie-tdep.o \
+ 	mt-tdep.o \
+ 	nto-tdep.o \
+-	ppc-linux-tdep.o ppcnbsd-tdep.o ppcobsd-tdep.o ppc-sysv-tdep.o \
+-	ppc64-tdep.o rl78-tdep.o \
++	ppc-linux-tdep.o ppcfbsd-tdep.o ppcnbsd-tdep.o ppcobsd-tdep.o \
++	ppc-sysv-tdep.o ppc64-tdep.o rl78-tdep.o \
+ 	rs6000-aix-tdep.o rs6000-tdep.o ppc-ravenscar-thread.o \
+ 	rs6000-lynx178-tdep.o \
+ 	rx-tdep.o \
+@@ -585,6 +585,7 @@
  	xtensa-config.o xtensa-tdep.o xtensa-linux-tdep.o \
  	glibc-tdep.o \
-	bsd-uthread.o \
+ 	bsd-uthread.o \
 +	fbsd-threads.o \
  	nbsd-tdep.o obsd-tdep.o \
  	sol2-tdep.o \

Modified: trunk/devel/gdb/files/extrapatch-gdb-configure.tgt
===================================================================
--- trunk/devel/gdb/files/extrapatch-gdb-configure.tgt	2013-09-12 23:43:39 UTC (rev 15441)
+++ trunk/devel/gdb/files/extrapatch-gdb-configure.tgt	2013-09-12 23:52:59 UTC (rev 15442)
@@ -1,6 +1,6 @@
---- gdb/configure.tgt.orig	2012-08-01 21:48:44.000000000 +0200
-+++ gdb/configure.tgt	2012-08-22 16:47:02.000000000 +0200
-@@ -176,7 +176,7 @@
+--- gdb/configure.tgt.orig	2013-03-05 14:37:10.000000000 +0100
++++ gdb/configure.tgt	2013-05-18 13:11:06.000000000 +0200
+@@ -188,7 +188,7 @@
  i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu)
  	# Target: FreeBSD/i386
  	gdb_target_obs="i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
@@ -9,7 +9,16 @@
  	;;
  i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu)
  	# Target: NetBSD/i386
-@@ -606,7 +606,7 @@
+@@ -398,7 +398,7 @@
+ powerpc*-*-freebsd*)
+ 	# Target: FreeBSD/powerpc
+ 	gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc64-tdep.o \
+-		        ppcfbsd-tdep.o solib-svr4.o \
++		        ppcfbsd-tdep.o solib-svr4.o fbsd-threads.o \
+ 			ravenscar-thread.o ppc-ravenscar-thread.o"
+ 	;;
+ 
+@@ -650,7 +650,7 @@
  	# Target: FreeBSD/amd64
  	gdb_target_obs="amd64-tdep.o amd64fbsd-tdep.o i386-tdep.o \
  			i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \

Deleted: trunk/devel/gdb/files/patch-include-cgen-basic-ops.h
===================================================================
--- trunk/devel/gdb/files/patch-include-cgen-basic-ops.h	2013-09-12 23:43:39 UTC (rev 15441)
+++ trunk/devel/gdb/files/patch-include-cgen-basic-ops.h	2013-09-12 23:52:59 UTC (rev 15442)
@@ -1,43 +0,0 @@
---- include/cgen/basic-ops.h.orig	2013-03-07 17:31:21.000000000 +0100
-+++ include/cgen/basic-ops.h	2013-03-07 17:31:28.000000000 +0100
-@@ -24,11 +24,16 @@
- 
- #include <assert.h>
- 
--#if defined (__GNUC__) && ! defined (SEMOPS_DEFINE_INLINE)
-+#if defined (__GNUC__) && ! defined (SEMOPS_DEFINE_INLINE) && ! defined (__clang__)
- #define SEMOPS_DEFINE_INLINE
- #define SEMOPS_INLINE extern inline
- #else
--#define SEMOPS_INLINE
-+# if defined (__clang__) && ! defined (SEMOPS_DEFINE_INLINE)
-+#  define SEMOPS_DEFINE_INLINE
-+#  define SEMOPS_INLINE static inline
-+# else
-+#  define SEMOPS_INLINE
-+# endif
- #endif
- 
- /* These don't really have a mode.  */
-@@ -295,11 +300,16 @@
-    significant and word number 0 is the most significant word.
-    ??? May also wish an endian-dependent version.  Later.  */
- 
--QI SUBWORDSIQI (SI, int);
--HI SUBWORDSIHI (SI, int);
--QI SUBWORDDIQI (DI, int);
--HI SUBWORDDIHI (DI, int);
--SI SUBWORDDISI (DI, int);
-+#if defined (__clang__) && defined (SEMOPS_DEFINE_INLINE)
-+#define SEMOPS_STATIC static
-+#else
-+#define SEMOPS_STATIC
-+#endif
-+SEMOPS_STATIC QI SUBWORDSIQI (SI, int);
-+SEMOPS_STATIC HI SUBWORDSIHI (SI, int);
-+SEMOPS_STATIC QI SUBWORDDIQI (DI, int);
-+SEMOPS_STATIC HI SUBWORDDIHI (DI, int);
-+SEMOPS_STATIC SI SUBWORDDISI (DI, int);
- 
- #ifdef SEMOPS_DEFINE_INLINE
- 



More information about the Midnightbsd-cvs mailing list