From fc741d6e90c7b12216aa27ef82ea4d3a5f64b66f Mon Sep 17 00:00:00 2001 From: Stanislav Sedov Date: Sun, 24 Jun 2007 08:06:54 +0000 Subject: - Add devel/cross-gdb port. GNU gdb for cross-target application development. WWW: http://sourceware.org/gdb/ --- devel/Makefile | 1 + devel/cross-gdb/Makefile | 122 ++++++++++++++++++++++++++++++++++++++++++++++ devel/cross-gdb/distinfo | 6 +++ devel/cross-gdb/pkg-descr | 12 +++++ 4 files changed, 141 insertions(+) create mode 100644 devel/cross-gdb/Makefile create mode 100644 devel/cross-gdb/distinfo create mode 100644 devel/cross-gdb/pkg-descr diff --git a/devel/Makefile b/devel/Makefile index 6aff29fd3899..284d4426efc8 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -180,6 +180,7 @@ SUBDIR += cproto SUBDIR += cross-binutils SUBDIR += cross-gcc + SUBDIR += cross-gdb SUBDIR += crow SUBDIR += cscope SUBDIR += cscout diff --git a/devel/cross-gdb/Makefile b/devel/cross-gdb/Makefile new file mode 100644 index 000000000000..0cd59bd14452 --- /dev/null +++ b/devel/cross-gdb/Makefile @@ -0,0 +1,122 @@ +# New ports collection makefile for: cross-gdb +# Date created: 11 June 2007 +# Whom: Stanislav Sedov +# +# $FreeBSD$ +# + +PORTNAME= gdb +PORTVERSION= 6.6 +CATEGORIES= devel +MASTER_SITES= ${MASTER_SITE_SOURCEWARE} +MASTER_SITE_SUBDIR= gdb/releases +PKGNAMEPREFIX= ${TGTARCH}-${TGTABI}- + +PATCH_SITES= ftp://ftp.rtems.com/pub/rtems/SOURCES/ +PATCH_DIST_STRIP= -p1 + +MAINTAINER= stas@FreeBSD.org +COMMENT= FSF gdb port for cross-target development + +# +# Temporary hack to dial with dependencies during package builds for +# slave ports. +# +.if defined(PACKAGE_BUILDING) +BUILD_DEPENDS= ${OURTARGET}-as:${PORTSDIR}/devel/${OURTARGET}-binutils +.else +BUILD_DEPENDS= ${OURTARGET}-as:${PORTSDIR}/devel/cross-binutils +.endif + +USE_BZIP2= yes +USE_GMAKE= yes +GNU_CONFIGURE= yes +ALL_TARGET= all info + +DEPENDS_ARGS= TGTARCH="${TGTARCH}" TGTABI="${TGTABI}" + +CONFIGURE_TARGET= --target=${OURTARGET} +CONFIGURE_ARGS+= --disable-nls \ + --exec-prefix=${EPRFX}/ + +OURTARGET= ${TGTARCH}-${TGTABI} + +MAN1= ${OURTARGET}-gdb.1 \ + ${OURTARGET}-gdbtui.1 + +INFO= ${OURTARGET}-annotate \ + ${OURTARGET}-gdb \ + ${OURTARGET}-gdbint \ + ${OURTARGET}-stabs + +EPRFX= ${PREFIX}/libexec/${OURTARGET}-gdb + +.if defined(WITH_RTEMS_PATCHES) +PATCHFILES+= ${PORTNAME}-${PORTVERSION}-rtems4.8-20070306.diff +.endif + +.if !defined(TGTARCH) || !defined(TGTABI) +PKGNAMEPREFIX= #empty +IGNORE= you should select ARCH and ABI to build port +.endif + +# +# Macro to fix up info referencies +# +FIXREFS= ${SH} -c '${REINPLACE_CMD} -E \ + -e "s,$$0\.(texi|info),${OURTARGET}-$$0.\1,g" \ + -e "s,(@file)\{$$0\},\1\{${OURTARGET}-$$0\},g" $$*' -- + +post-patch: +# +# Patch and rename info files +# +.for FILE in annotate gdb gdbint stabs + @${FIXREFS} ${FILE} ${WRKSRC}/gdb/doc/${FILE}.texinfo \ + ${WRKSRC}/gdb/doc/Makefile.in + @${MV} ${WRKSRC}/gdb/doc/${FILE}.texinfo \ + ${WRKSRC}/gdb/doc/${OURTARGET}-${FILE}.texinfo +.endfor + +# Don't install run.1 manpage, we'll install it by hand + @${REINPLACE_CMD} -E -e 's,^(install:)[[:space:]]+install-man,\1,' \ + ${WRKSRC}/sim/common/Makefile.in + +# +# Don't install certain infofiles +# + @${REINPLACE_CMD} -E -e 's,^(install:).*,\1,' \ + ${WRKSRC}/etc/Makefile.in \ + ${WRKSRC}/bfd/doc/Makefile.in + +post-install: +# +# Install handy symlinks +# + @${LN} -sf ${EPRFX}/bin/${OURTARGET}-gdb ${PREFIX}/bin/${OURTARGET}-gdb + @${ECHO} "@exec ${LN} -sf ${EPRFX}/bin/${OURTARGET}-gdb " \ + "${PREFIX}/bin/${OURTARGET}-gdb" >> ${TMPPLIST} + @${ECHO} "@unexec ${RM} -f ${PREFIX}/bin/${OURTARGET}-gdb" \ + >> ${TMPPLIST} + +# +# Install link for emulator if exists +# + @if [ -e "${EPRFX}/bin/${OURTARGET}-run" ]; then \ + ${LN} -sf ${EPRFX}/bin/${OURTARGET}-run \ + ${PREFIX}/bin/${OURTARGET}-run && \ + ${ECHO} "@exec ${LN} -sf ${EPRFX}/bin/${OURTARGET}-run " \ + "${PREFIX}/bin/${OURTARGET}-run" >> ${TMPPLIST} && \ + ${ECHO} "@unexec ${RM} -f ${PREFIX}/bin/${OURTARGET}-run" \ + >> ${TMPPLIST}; \ + fi + +# +# Generate packing list +# + @${FIND} ${EPRFX}/ ! -type d | ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} + @${FIND} -ds ${EPRFX}/ -type d | \ + ${SED} -E -e 's,(.*),@unexec rmdir \1 2>/dev/null || true,' >> \ + ${TMPPLIST} + +.include diff --git a/devel/cross-gdb/distinfo b/devel/cross-gdb/distinfo new file mode 100644 index 000000000000..88913b4bbd8b --- /dev/null +++ b/devel/cross-gdb/distinfo @@ -0,0 +1,6 @@ +MD5 (gdb-6.6.tar.bz2) = a4df41d28dd514d64e8ccbfe125fd9a6 +SHA256 (gdb-6.6.tar.bz2) = 6e602987298db5ddb479bbb84ce653eabd9c304957a49552245f65cdc70d43bd +SIZE (gdb-6.6.tar.bz2) = 14535755 +MD5 (gdb-6.6-rtems4.8-20070306.diff) = 45288142add1b4f2345f995e8b2a7756 +SHA256 (gdb-6.6-rtems4.8-20070306.diff) = 60f277070131d72101855fce8a51f25c86620cf7bbacc7f092b9ec28f31674bc +SIZE (gdb-6.6-rtems4.8-20070306.diff) = 4526 diff --git a/devel/cross-gdb/pkg-descr b/devel/cross-gdb/pkg-descr new file mode 100644 index 000000000000..5e972e8b7e91 --- /dev/null +++ b/devel/cross-gdb/pkg-descr @@ -0,0 +1,12 @@ +GNU gdb for cross-target application development. + +Use TGTARCH switch to select target architecture, and TGTABI to select ABI. +E.g. the following command will build binutils for rtems on sparc: +% make TGTARCH=sparc TGTABI=rtems + +If you encounter any problems building/using/installing this port, please +make me know. It would help to improve this port in feature. + +-- Stanislav Sedov + +WWW: http://sourceware.org/gdb/ -- cgit v1.2.3