aboutsummaryrefslogtreecommitdiff
path: root/devel/cross-gdb
diff options
context:
space:
mode:
authorStanislav Sedov <stas@FreeBSD.org>2007-06-24 08:06:54 +0000
committerStanislav Sedov <stas@FreeBSD.org>2007-06-24 08:06:54 +0000
commitfc741d6e90c7b12216aa27ef82ea4d3a5f64b66f (patch)
treeaa17ba0064af379bf1c0b166942403179b7e4547 /devel/cross-gdb
parent1b79da633273e8143264f7f0ccfc028f4ac957c2 (diff)
downloadports-fc741d6e90c7b12216aa27ef82ea4d3a5f64b66f.tar.gz
ports-fc741d6e90c7b12216aa27ef82ea4d3a5f64b66f.zip
Notes
Diffstat (limited to 'devel/cross-gdb')
-rw-r--r--devel/cross-gdb/Makefile122
-rw-r--r--devel/cross-gdb/distinfo6
-rw-r--r--devel/cross-gdb/pkg-descr12
3 files changed, 140 insertions, 0 deletions
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 <stas@FreeBSD.org>
+#
+# $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 <bsd.port.mk>
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 <stas@FreeBSD.org>
+
+WWW: http://sourceware.org/gdb/