aboutsummaryrefslogtreecommitdiffstats
path: root/devel/gdb66/Makefile
blob: c9e834ca53056212fa82e4ac29245d4d3c925501 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# ex:ts=8
# Ports collection makefile for:    GDB 6
# Date created:             30 March 2001
# Whom:                 David O'Brien <obrien@NUXI.com>
#
# $FreeBSD$
#

SNAPDATE=   2004-08-10
SNAPVER=    ${SNAPDATE:S/-//g}

PORTNAME=   gdb
PORTVERSION=    6
PORTREVISION=   ${SNAPVER}
CATEGORIES= devel
MASTER_SITES=   ${MASTER_SITE_SOURCEWARE} ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= gdb/snapshots/current obrien
DISTNAME=   gdb+dejagnu-weekly-${SNAPVER}

PATCH_SITES=    ${MASTER_SITE_LOCAL}
PATCH_SITE_SUBDIR=  obrien
#PATCHFILES=    gdb60_xfree-loadmod.diff

MAINTAINER= obrien@FreeBSD.org
COMMENT=    GNU GDB 6

WRKSRC=     ${WRKDIR}/${DISTNAME:S/-weekly//}
USE_BZIP2=  yes
USE_GMAKE=  yes
USE_REINPLACE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --program-suffix=6
CFLAGS+=    -DRL_NO_COMPAT -DKGDB

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
USE_GCC?=   3.4
LIB_DEPENDS=    readline.4:${PORTSDIR}/devel/readline
CFLAGS+=    -Wl,--rpath -Wl,${PREFIX}/lib
.endif

.if ${ARCH} == "amd64"
CONFIGURE_TARGET=   x86_64-portbld-freebsd${OSREL}
.endif
.if ${ARCH} == "amd64" || ${ARCH} == "sparc64" || ${ARCH} == "ia64"
PLIST_SUB+= NO_NATIVE_GDB=""
post-install:
    cd ${PREFIX}/bin ; ${LN} -sf gdb${PORTVERSION} gdb
.else
PLIST_SUB+= NO_NATIVE_GDB="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e 's/$$/ [GDB v6.x 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

.include <bsd.port.post.mk>