summaryrefslogtreecommitdiff
path: root/lang/gpc/Makefile
blob: bce2952fe832bf472e8fbc41fe0cbc0aeb766f6f (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# $NetBSD: Makefile,v 1.6 2003/06/02 01:19:03 jschauma Exp $

DISTNAME=		gpc-2.1
PKGREVISION=		1
WRKSRC=			${WRKDIR}/gcc-2.95.3
CATEGORIES=		lang
MASTER_SITES=		http://www.gnu-pascal.de/current/ \
			${MASTER_SITE_GNU:=gcc/}
DISTFILES=		${DISTNAME}${EXTRACT_SUFX}
DISTFILES+=		gcc-2.95.3.tar.gz

MAINTAINER=		tech-pkg@netbsd.org
HOMEPAGE=		http://www.gnu-pascal.de
COMMENT=		GNU Pascal Compiler

PATCH_SITES=		${MASTER_SITE_LOCAL}
PATCHFILES=		gcc-2.95.3-diff-2002-08-29.gz

DEPENDS+=		gcc-2.95.3nb1:../../lang/gcc
DEPENDS+=		gmp-[0-9]*:../../devel/gmp
DEPENDS+=		ncurses-[0-9]*:../../devel/ncurses
DEPENDS+=		rx-[0-9]*:../../devel/rx

BUILD_DEPENDS+=		bison-[0-9]*:../../devel/bison
BUILD_DEPENDS+=		gsed-[0-9]*:../../textproc/gsed

USE_GMAKE=		# defined
USE_NCURSES=		# defined
USE_PKGSRC_GCC=		# defined

GPC_PREFIX=		${_GCC_PREFIX}
GPC_SUBPREFIX=		${_GCC_SUBPREFIX}

HAS_CONFIGURE=		# defined
CONFIGURE_SCRIPT=	${WRKSRC}/configure
CONFIGURE_ARGS=		--host=${MACHINE_GNU_PLATFORM}
CONFIGURE_ARGS+=	--prefix=${GPC_PREFIX}
CONFIGURE_ARGS+=	--infodir=${PREFIX}/info
CONFIGURE_ARGS+=	--enable-shared
CONFIGURE_ARGS+=	--enable-languages=pascal

PLIST_SUBST+=		GPC_SUBPREFIX=${GPC_SUBPREFIX}

CONFIGURE_DIRS=		${WRKDIR}/objdir
BUILD_DIRS=		${CONFIGURE_DIRS}
INSTALL_DIRS=		${BUILD_DIRS}/gcc

INSTALL_TARGET=		pascal.install

INFO_FILES=		gpc.info gpcs.info

.include "../../mk/bsd.prefs.mk"

post-extract:
	${MKDIR} ${WRKSRC}
	${CP} ${.CURDIR}/../gcc/files/xm-netbsd.h ${WRKSRC}/gcc/config
	${CP} ${.CURDIR}/../gcc/files/xm-target64.h ${WRKSRC}/gcc/config
	for file in ${.CURDIR}/../gcc/files/*_* ; do			 \
		arch=`${BASENAME} $${file} | ${SED} -e "s/_.*//"`;	 \
		dest=`${BASENAME} $${file} | ${SED} -e "s/$${arch}_//"`; \
		${MKDIR} ${WRKSRC}/gcc/config/$${arch};			 \
		${CP} $${file} ${WRKSRC}/gcc/config/$${arch}/$${dest};	 \
	done
	${RM} ${WRKSRC}/gcc/config/alpha/netbsd-elf.h
	${RM} ${WRKSRC}/gcc/config/arm/t-netbsd
	${RM} ${WRKSRC}/gcc/config/mips/x-netbsd

pre-patch:
	${MV} -f ${WRKDIR}/gpc-20020510/p ${WRKDIR}/gcc-2.95.3/gcc/

pre-configure:
	${MKDIR} ${BUILD_DIRS}
	${TOUCH} ${TOUCH_FLAGS}	${WRKSRC}/gcc/c-gperf.h
	${ECHO} "bogus" > ${WRKSRC}/gcc/cstamp-h.in

.include "../../lang/gcc/buildlink2.mk"
.include "../../mk/texinfo.mk"
.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"