aboutsummaryrefslogtreecommitdiffstats
path: root/devel/gdb6/Makefile
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2007-06-28 01:31:13 +0800
committermi <mi@FreeBSD.org>2007-06-28 01:31:13 +0800
commit320dbce69ffd370f3b0a533441128ca78994ab0e (patch)
treea8ceeb0f12157cad77c4c96433f16ed9a2038918 /devel/gdb6/Makefile
parent9f8c7fcff9bebae4114e3c79f3b4616a03274f35 (diff)
downloadfreebsd-ports-gnome-320dbce69ffd370f3b0a533441128ca78994ab0e.tar.gz
freebsd-ports-gnome-320dbce69ffd370f3b0a533441128ca78994ab0e.tar.zst
freebsd-ports-gnome-320dbce69ffd370f3b0a533441128ca78994ab0e.zip
Update the stale port from a 3 year-old snapshot to the most recent
release 6.6 based on own work and that of the PR's submitter. Our patches appear to be part of the distribution mostly. Many thanks to the previous maintainer for his diligence and hardwork. Begin bringing INSIGHT (gdb's GUI-frontend) in. Insight is currently broken, but enabling it (via OPTIONS) will allow someone with ITk/Iwidgets expertise to port it to the recent version of ITk, as installed by the itk port. Take over maintainership for the time being. PR: 100067 Submitted by: Philip M. Gollucci Approved by: maintainer timeout
Diffstat (limited to 'devel/gdb6/Makefile')
-rw-r--r--devel/gdb6/Makefile105
1 files changed, 68 insertions, 37 deletions
diff --git a/devel/gdb6/Makefile b/devel/gdb6/Makefile
index 7a63f45b5fc4..5fd51d81d3d1 100644
--- a/devel/gdb6/Makefile
+++ b/devel/gdb6/Makefile
@@ -6,41 +6,66 @@
# $FreeBSD$
#
-SNAPDATE= 2004-08-10
-SNAPVER= ${SNAPDATE:S/-//g}
-
PORTNAME= gdb
-PORTVERSION= 6
-PORTREVISION= ${SNAPVER}
+PORTVERSION= 6.6
CATEGORIES= devel
-MASTER_SITES= ${MASTER_SITE_SOURCEWARE:S/$/:sw/} \
- ${MASTER_SITE_LOCAL:S/$/:local/}
-MASTER_SITE_SUBDIR= gdb/snapshots/current/:sw obrien/:local
-DISTNAME= gdb+dejagnu-weekly-${SNAPVER}
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:sw,local
+MASTER_SITES= ${MASTER_SITE_GNU:S,$,:gdb,} \
+ http://aldan.algebra.com/~mi/:gdbtk
+MASTER_SITE_SUBDIR=gdb/:gdb
+DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:gdb
-PATCH_SITES= ${MASTER_SITE_LOCAL}
-PATCH_SITE_SUBDIR= obrien
-#PATCHFILES= gdb60_xfree-loadmod.diff
+MAINTAINER= mi@aldan.algebra.com
+COMMENT= GNU GDB of newer version than comes with the system
-MAINTAINER= obrien@FreeBSD.org
-COMMENT= GNU GDB 6
+OPTIONS= INSIGHT "Build the Tcl/Tk GUI (broken!)" off
-WRKSRC= ${WRKDIR}/${DISTNAME:S/-weekly//}
USE_BZIP2= yes
USE_GMAKE= yes
+USE_GETTEXT= yes
+USE_ICONV= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --program-suffix=6
-CFLAGS+= -DRL_NO_COMPAT -DKGDB
+CONFIGURE_ENV+= CONFIGURED_M4=m4 CONFIGURED_BISON=byacc
+CONFIGURE_ARGS= --program-suffix=${PORTVERSION:S/.//g} \
+ --enable-target=all \
+ --enable-tui --with-libiconv-prefix=${PREFIX}
+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/.//}
+PLIST_SUB= VER=${VER}
+MAN1= gdb${VER}.1
+
+#ONLY_FOR_ARCHS= i386 amd64 # untested elsewhere, might work
.include <bsd.port.pre.mk>
-.if ${ARCH} == "ia64" || ${ARCH} == "sparc64" || ${ARCH} == "alpha"
-BROKEN= "Does not build on ia64, sparc64 or alpha"
-.endif
+.if defined(WITH_INSIGHT)
+LIB_DEPENDS= itk:${PORTSDIR}/x11-toolkits/itk
+RUN_DEPENDS= ${LOCALBASE}/lib/iwidgets:${PORTSDIR}/x11-toolkits/iwidgets
+DISTFILES+= gdbtk-6.6${EXTRACT_SUFX}:gdbtk
+PLIST_SUB+= INSIGHT=''
+CONFIGURE_ARGS+=--enable-gdbtk \
+ --with-tclconfig=${LOCALBASE}/lib/tcl8.4 \
+ --with-tclinclude=${LOCALBASE}/include/tcl8.4/generic \
+ --with-tkconfig=${LOCALBASE}/lib/tk8.4 \
+ --with-tkinclude=${LOCALBASE}/include/tk8.4/generic \
+ --with-itclconfig=${LOCALBASE}/lib/itcl3.3 \
+ --with-itkconfig=${LOCALBASE}/lib/itk3.3
+
+pre-everything::
+ #
+ # The Tk-based GUI (Insight) is severely broken at the moment.
+ # Do not submit bug-reports, unless you have fixes for them --
+ # insight code needs to be ported to use the most recent ITk and
+ # IWidgets.
+ #
-.if ${OSVERSION} < 500000
-CFLAGS+= -include ${FILESDIR}/fbsd4.h
+pre-configure:
+ ${MKDIR} ${WRKSRC}/itcl/generic
+ ${LN} -s ${LOCALBASE}/include/it*3.3/*.h ${WRKSRC}/itcl/generic/
+.else
+PLIST_SUB+= INSIGHT='@comment '
.endif
.if ${ARCH} == "amd64"
@@ -48,26 +73,32 @@ CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
.endif
post-patch:
- @${REINPLACE_CMD} -e 's/$$/ [GDB v6.x for FreeBSD]/' \
+ @${REINPLACE_CMD} -e 's/$$/ [GDB v${PORTVERSION} for FreeBSD]/' \
${WRKSRC}/gdb/version.in
@${REINPLACE_CMD} -e 's/^READLINE/#READLINE/' \
-e 's/^readline/#readline/' \
${WRKSRC}/gdb/Makefile.in
${ECHO} 'READLINE = -lreadline' >> ${WRKSRC}/gdb/Makefile.in
-pre-configure:
- cd ${WRKSRC} ; ${RM} -rf dejagnu expect readline sim tcl texinfo
-.for f in freebsd-uthread.c kvm-fbsd.c kvm-fbsd-${ARCH}.h
- ${LN} -sf ${FILESDIR}/${f} ${WRKSRC}/gdb/${f:C/-${ARCH}//}
-.endfor
- ${LN} -sf ${FILESDIR}/nm-fbsd.h ${WRKSRC}/gdb/config
-
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/gdb/gdb \
- ${PREFIX}/bin/${PORTNAME}${PORTVERSION:S/.//g}
-cklatest:
- ncftpls \
- ftp://sources.redhat.com/pub/${MASTER_SITE_SUBDIR}/ \
- | ${GREP} gdb+dejagnu-weekly
+ ${INSTALL_PROGRAM} ${WRKSRC}/gdb/gdb ${PREFIX}/bin/gdb${VER}
+ ${LN} ${PREFIX}/bin/gdb${VER} ${PREFIX}/bin/gdbtui${VER}
+ ${INSTALL_DATA} ${WRKSRC}/gdb/gdb.1 ${PREFIX}/man/man1/gdb${VER}.1
+.if defined(WITH_INSIGHT)
+ ${LN} ${PREFIX}/bin/gdb${VER} ${PREFIX}/bin/insight
+ ${MKDIR} ${PREFIX}/share/redhat/gui
+ ${CP} -p ${WRKSRC}/libgui/library/*.tcl \
+ ${WRKSRC}/libgui/library/tclIndex \
+ ${PREFIX}/share/redhat/gui/
+ ${MKDIR} ${PREFIX}/lib/insight1.0
+ ${CP} -Rp ${WRKSRC}/gdb/gdbtk/library/*.tcl \
+ ${WRKSRC}/gdb/gdbtk/library/*.itcl \
+ ${WRKSRC}/gdb/gdbtk/library/*.ith \
+ ${WRKSRC}/gdb/gdbtk/library/*.itb \
+ ${WRKSRC}/gdb/gdbtk/library/help \
+ ${WRKSRC}/gdb/gdbtk/library/images* \
+ ${WRKSRC}/gdb/gdbtk/library/tclIndex \
+ ${PREFIX}/lib/insight1.0
+.endif
.include <bsd.port.post.mk>