aboutsummaryrefslogtreecommitdiffstats
path: root/devel/fpc-gdb/Makefile
blob: af63e5eae675aa8f922ae68adce9d6578b3abc8d (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
# ex:ts=8
# Ports collection makefile for:    FPC-GDB 5.2.1
# Date created:             8 February 2004
# Whom:             John Merryweather Cooper <coop9211@uidaho.edu>
#
# $FreeBSD$
#

PORTNAME=   gdb
PORTVERSION=    5.2.1
CATEGORIES= devel lang
MASTER_SITES=   ${MASTER_SITE_SOURCEWARE}
MASTER_SITE_SUBDIR= gdb/old-releases
PKGNAMEPREFIX=  fpc-

PATCH_SITES=    ftp://ftp.freepascal.org/fpc/contrib/libgdb/old/v5.2.1/ \
        ftp://planetmirror.com/pub/fpc/contrib/libgdb/old/v5.2.1/ \
        ftp://ftp.jp.freepascal.org/mirror/fpc/contrib/libgdb/old/v5.2.1/ \
        ftp://freepascal.stack.nl/pub/fpc/contrib/libgdb/old/v5.2.1/ \
        ftp://ftp.no.freepascal.org/pub/fpc/contrib/libgdb/old/v5.2.1/ \
        ftp://ftp.us.freepascal.org/pub/fpc/contrib/libgdb/old/v5.2.1/ \
        ${MASTER_SITE_LOCAL}
PATCH_SITE_SUBDIR=  obrien
PATCHFILES= gdb521.dif gdb521_xfree-loadmod.diff

MAINTAINER= ports@FreeBSD.org
COMMENT=    GNU GDB 5.2.1 modified for Free Pascal

.include <bsd.port.pre.mk>

NO_LATEST_LINK= yes
USE_GMAKE=  yes
GNU_CONFIGURE=  yes
USE_REINPLACE=  yes
CONFIGURE_ARGS= --program-suffix=fpc
AR?=        /usr/bin/ar

ONLY_FOR_ARCHS= i386

pre-configure:
    cd ${WRKSRC} ; ${RM} -rf dejagnu expect sim tcl texinfo

post-configure:
# if devel/bison is installed, build will fail --> force yacc
    @${FIND} ${WRKSRC} -name "Makefile*" | ${XARGS} \
        ${REINPLACE_CMD} 's|bison -y|yacc|g'

do-install:
    @${INSTALL_PROGRAM} ${WRKSRC}/gdb/gdb \
        ${PREFIX}/bin/gdbfpc
    cd ${WRKSRC}/gdb && ${AR} -rs libgdb.a cli*.o mi*.o
    cd ${WRKSRC}/bfd && ${AR} -rs libbfd.a *.o
    cd ${WRKSRC}/opcodes && ${AR} -rs libopcodes.a *.o
    @${MKDIR} ${PREFIX}/lib/fpc/1.0.10/units/freebsd/gdbint/libgdb
    @${INSTALL_DATA} \
        ${WRKSRC}/gdb/libgdb.a \
        ${WRKSRC}/bfd/libbfd.a \
        ${WRKSRC}/opcodes/libopcodes.a \
        ${WRKSRC}/libiberty/libiberty.a \
        ${WRKSRC}/intl/libintl.a \
        ${PREFIX}/lib/fpc/1.0.10/units/freebsd/gdbint/libgdb

cklatest:
    ncftpls \
        ftp://mirrors.rcn.net/mirrors/sources.redhat.com/${MASTER_SITE_SUBDIR}/  \
        | ${GREP} gdb+dejagnu-

.include <bsd.port.post.mk>