]> gitweb @ CieloNegro.org - pkgsrc-ghc.git/blob - Makefile
Drop superfluous PKG_DESTDIR_SUPPORT, "user-destdir" is default these days.
[pkgsrc-ghc.git] / Makefile
1 # $NetBSD: Makefile,v 1.42 2008/07/07 14:58:00 kristerw Exp $
2
3 DISTNAME=       ghc-${VERSION}
4 VERSION=        7.4.1
5 CATEGORIES=     lang
6 MASTER_SITES=   http://www.haskell.org/ghc/dist/${VERSION}/
7 MAINTAINER=     kristerw@NetBSD.org
8 HOMEPAGE=       http://www.haskell.org/ghc/
9 COMMENT=        Compiler for the functional language Haskell
10 LICENSE=        modified-bsd
11
12 DISTFILES=      ${DISTNAME}-src.tar.bz2
13 DISTFILES+=     ${DISTNAME}-boot-i386-unknown-freebsd8.0.tar.bz2
14 DISTFILES+=     ${DISTNAME}-boot-i386-unknown-netbsdelf6.99.1.tar.bz2
15 DISTFILES+=     ${DISTNAME}-boot-powerpc-apple-darwin9.8.0.tar.bz2
16 DISTFILES+=     ${DISTNAME}-boot-x86_64-unknown-linux-gnu.tar.bz2
17
18 .for i in ${DISTFILES:M*-boot-*}
19 SITES.${i}=     http://static.cielonegro.org/archive/
20 .endfor
21
22 # Unregisterised HC packages are platform-dependent C sources. Yes,
23 # they are C sources but are totally non-portable. We have to create
24 # more HC packages to support more platforms. Note that those packages
25 # are built with integer-simple, not integer-gmp, to reduce some
26 # complexity by not depending on the GMP. The resulting registerised
27 # GHC uses integer-gmp so this won't be a problem.
28 #
29 # If you want to build HC packages yourself, follow instructions in
30 # the ./TODO file.
31 ONLY_FOR_PLATFORM= \
32         Darwin-*-powerpc \
33         FreeBSD-*-i386 \
34         Linux-*-x86_64 \
35         NetBSD-*-i386
36
37 # We must provide the real path to gcc to the ./configure script,
38 # because GHC has a runtime dependency on it. Aren't there any ways
39 # better than this?
40 .include "../../mk/bsd.prefs.mk"
41 .include "../../mk/compiler.mk"
42 .if empty(CCPATH)
43 WARNINGS+= "This package depends on pkgsrc's undocumented variable \
44 CCPATH but it disappeared somehow."
45 WARNINGS+= "Using hard-coded /usr/bin/gcc as the C compiler..."
46 CONFIGURE_ARGS+= --with-gcc=/usr/bin/gcc
47 .else
48 CONFIGURE_ARGS+= --with-gcc=${CCPATH}
49 .endif
50
51 USE_TOOLS+=     gmake perl:run
52 CONFIGURE_ENV+= PerlCmd=${PERL5:Q}
53
54 # We don't want to extract all of the DISTFILEs.
55 EXTRACT_ONLY=   ${DISTNAME}-src.tar.bz2
56
57 CONFIGURE_ARGS += \
58         --build=${PLATFORM} \
59         --host=${PLATFORM} \
60         --target=${PLATFORM} \
61         --prefix=${PREFIX} \
62         --mandir=${PREFIX}/${PKGMANDIR} \
63         --with-gmp-includes=${PREFIX}/include \
64         --with-gmp-libraries=${PREFIX}/lib \
65         --with-iconv-includes=${PREFIX}/include \
66         --with-iconv-libraries=${PREFIX}/lib
67
68 # Define ${PLATFORM} and the target "pre-configure".
69 .include "../../wip/ghc/bootstrap.mk"
70
71 do-configure:
72         ${RUN} cd ${WRKSRC} && \
73                 ${SETENV} ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS}
74 # We need to tell the libraries/terminfo/configure that our ncurses is
75 # in a non-standard path. Without that, the resulting GHC tries to
76 # link programs by executing ld(1) without passing it -L${PREFIX}/lib.
77         ${RUN} ${ECHO} "libraries/terminfo_CONFIGURE_OPTS += \
78                 --configure-option=--with-curses-includes=${PREFIX}/include \
79                 --configure-option=--with-curses-libraries=${PREFIX}/lib" >> ${WRKSRC}/mk/build.mk
80 # The ghc compiler does normally split the generated asm files into small
81 # parts before sending them to gcc, to enable the linker to eliminate
82 # unused parts.  This does however not play nice with the pkgsrc
83 # framework, and the result is that the build takes more than 5 times
84 # as long than when the files are not split.  See
85 #    http://mail-index.netbsd.org/tech-pkg/2006/07/30/0005.html
86 # for a description of the problem.
87 # Disable file splitting until pkgsrc gets improved.
88         ${RUN} ${ECHO} "SplitObjs = NO" >> ${WRKSRC}/mk/build.mk
89 # If we don't explicitly disable HsColour, PLIST gets changed
90 # depending on whether we have installed it or not.
91         ${RUN} ${ECHO} "HSCOLOUR_SRCS = NO" >> ${WRKSRC}/mk/build.mk
92
93 # Substitutions for INSTALL and DEINSTALL.
94 FILES_SUBST+=   DISTNAME=${DISTNAME}
95
96 # There is an unused script which don't pass the portability test.
97 CHECK_PORTABILITY_SKIP+=        distrib/prep-bin-dist-mingw
98
99 # GHC currently *requires* ${PREFIX}/lib to be in
100 # "/etc/ld-elf.so.conf". See
101 # http://hackage.haskell.org/trac/ghc/ticket/2933
102 CHECK_SHLIBS_SUPPORTED= no
103
104 # I guess pdcurses works well but not tested.
105 USE_NCURSES=    yes
106 .include "../../devel/ncurses/buildlink3.mk"
107
108 BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl
109 BUILDLINK_DEPMETHOD.libxslt = build
110 .include "../../converters/libiconv/buildlink3.mk"
111 .include "../../devel/gmp/buildlink3.mk"
112 .include "../../textproc/libxslt/buildlink3.mk"
113 .include "../../mk/pthread.buildlink3.mk"
114 .include "../../mk/bsd.pkg.mk"