aboutsummaryrefslogtreecommitdiffstats
path: root/lang/gpc/Makefile
blob: 0a897b07cbacba8db274b899f265c8fe7629a820 (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
# New ports collection makefile for:    gpc
# Date created:             28 Jun 2006
# Whom:                 alepulver
#
# $FreeBSD$
#

PORTNAME=   gpc
PORTVERSION=    20060325
CATEGORIES= lang
MASTER_SITES=   http://www.gnu-pascal.de/alpha/:gpc \
        ${MASTER_SITE_GCC}
MASTER_SITE_SUBDIR= releases/gcc-${GCC_VER}
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX}:gpc \
        gcc-core-${GCC_VER}${EXTRACT_SUFX}

MAINTAINER= alepulver@FreeBSD.org
COMMENT=    GNU Pascal compiler

BUILD_DEPENDS=  bash:${PORTSDIR}/shells/bash \
        gsed:${PORTSDIR}/textproc/gsed \
        help2man:${PORTSDIR}/misc/help2man

USE_BISON=  yes
USE_BZIP2=  yes
USE_GMAKE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS+=--disable-nls \
        --enable-languages=pascal \
        --with-system-zlib \
        --with-libiconv-prefix=${LOCALBASE} \
        --libdir=${PREFIX}/lib/${PORTNAME} \
        --libexecdir=${PREFIX}/libexec/${PORTNAME}

WRKSRC=     ${WRKDIR}/gcc-${GCC_VER}
INSTALL_WRKSRC= ${WRKSRC}/gcc
INSTALL_TARGET= pascal.install-with-gcc

MAN1=       binobj.1 gpc.1 gpc-run.1 gpidump.1
INFO=       gpc gpcs gpcs-de gpcs-es gpcs-hr

PLIST_SUB=  GCC_VER="${GCC_VER}" GNU_HOST="${CONFIGURE_TARGET}"

# This port can be compiled with GCC versions 2.8.1 to 2.95 and 3.2 to 3.4.3.
GCC_VER?=   3.4.3

.include <bsd.port.pre.mk>

.if ${ARCH} == "amd64"
CONFIGURE_TARGET=   x86_64-portbld-freebsd${OSREL}
.endif

post-extract:
    @${MV} ${WRKDIR}/${DISTNAME}/p ${WRKSRC}/gcc

post-patch:
    @${REINPLACE_CMD} -e 's|read junk||' ${WRKSRC}/gcc/p/config-lang.in
    @${REINPLACE_CMD} -e 's|sed -|gsed -|' ${WRKSRC}/gcc/p/utils/mk-t-inc
    @${REINPLACE_CMD} -Ee \
        's|^(P_DOC_DIR=).*|\1${DOCSDIR:S/${PREFIX}\///}|' \
        ${WRKSRC}/gcc/p/Make-lang.in
.if defined(NOPORTDOCS)
    @${REINPLACE_CMD} -Ee 's|^(PASCAL_INSTALL_DOC=).*|\1|' \
        ${WRKSRC}/gcc/p/Make-lang.in
.endif

post-install:
    @${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}

.include <bsd.port.post.mk>