summaryrefslogtreecommitdiff
path: root/lang/pcc/Makefile
blob: 9e4573cf1a129d887742ba9cbbc06d801b2b7702 (plain)
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
PORTNAME=	pcc
PORTVERSION=	1.1.0
PORTREVISION=	1
CATEGORIES=	lang
MASTER_SITES=	ftp://pcc.ludd.ltu.se/pub/pcc-releases/ \
		http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ \
		ftp://226.net120.skekraft.net/pcc-releases/

MAINTAINER=	joel@FreeBSD.org
COMMENT=	Portable C Compiler
WWW=		http://pcc.ludd.ltu.se/

LICENSE=	BSDCOMPATIBLE BSD2CLAUSE BSD3CLAUSE
LICENSE_COMB=	multi
LICENSE_NAME_BSDCOMPATIBLE=	BSD-style compatible licenses
LICENSE_TEXT_BSDCOMPATIBLE=	The license: BSDCOMPATIBLE (${LICENSE_NAME_BSDCOMPATIBLE}),\
	please read from the web: http://pcc.ludd.ltu.se/licenses/
LICENSE_PERMS_BSDCOMPATIBLE=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

RUN_DEPENDS=	pcc-libs>=${PORTVERSION}:devel/pcc-libs

ONLY_FOR_ARCHS=	i386 amd64

USES=		gmake tar:tgz
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	YACC=${YACC}

PLIST_FILES=	bin/pcc bin/pcpp \
		libexec/ccom libexec/cxxcom libexec/cpp \
		man/man1/ccom.1.gz man/man1/cpp.1.gz \
		man/man1/pcc.1.gz

MAKE_JOBS_UNSAFE=	yes

OPTIONS_DEFINE=	THREADS
OPTIONS_DEFAULT=	THREADS
THREADS_DESC=	Enable Thread-local storage (TLS)
THREADS_CONFIGURE_ENABLE=	tls

.include <bsd.port.pre.mk>

post-patch:
	# Don't make empty directories, which created by devel/pcc-libs port
	@${REINPLACE_CMD} -e '/mkdir -p.*PCC.*DIR/d' \
		${WRKSRC}/cc/cc/Makefile.in
.if ${OPSYS} == FreeBSD
	@${REINPLACE_CMD} -e '/targmach=amd64/s/x86_64/amd64/' \
		${WRKSRC}/configure
	@${REINPLACE_CMD} -e 's,\" MKS(TARGOSVER),${OSREL:R}\",' \
		${WRKSRC}/os/freebsd/ccconfig.h
.endif

.include <bsd.port.post.mk>