]> gitweb @ CieloNegro.org - pkgsrc-ghc.git/blob - Makefile
eec39d83cb2020c5c3105b90f5da4e42e2712094
[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=                6.10.3
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
11 DISTFILES=              ${DISTNAME}-src.tar.bz2 \
12                                 ghc-6.6.1-src.tar.bz2 \
13                                 ghc-6.6.1-i386-unknown-freebsd-hc.tar.gz \
14                                 ghc-6.6.1-powerpc-apple-darwin-hc.tar.gz
15
16 SITES.ghc-6.6.1-src.tar.bz2                                             = http://www.haskell.org/ghc/dist/6.6.1/
17 SITES.ghc-6.6.1-powerpc-apple-darwin-hc.tar.gz  = http://static.cielonegro.org/archive/
18 SITES.ghc-6.6.1-i386-unknown-freebsd-hc.tar.gz  = http://static.cielonegro.org/archive/
19
20 PKG_DESTDIR_SUPPORT=    user-destdir
21
22 .include "../../mk/bsd.prefs.mk"
23
24 # Unregisterised HC packages are architecture dependent. We have to
25 # create more HC packages to support more architectures.
26 ONLY_FOR_PLATFORM= *-*-i386 *-*-powerpc
27
28 GNU_CONFIGURE=          yes
29 CONFIGURE_ENV+=         PerlCmd=${PERL5:Q}
30 USE_TOOLS+=                     gmake perl:run find:run cp:run
31
32 # We don't want to extract all of the DISTFILEs.
33 EXTRACT_ONLY=   ${DISTNAME}-src.tar.bz2 \
34                                 ghc-6.6.1-src.tar.bz2
35
36 .if ${MACHINE_ARCH} == "i386"
37 EXTRACT_ONLY += ghc-6.6.1-i386-unknown-freebsd-hc.tar.gz
38 .elif ${MACHINE_ARCH} == "powerpc"
39 EXTRACT_ONLY += ghc-6.6.1-powerpc-apple-darwin-hc.tar.gz
40 .endif
41
42 # Build an unregisterised bootstrap compiler and install it directly
43 # into the .buildlink directory. But we can't use "make install"
44 # because we don't build it in a standard way (./configure && make).
45 #
46 # To install it, we search for any non-symlink executables in
47 # work/ghc-6.4.2 whose name ends with "-inplace". Then copy those
48 # files into ${BUILDLINK_DIR}/bin with dropping the "-inplace" at
49 # their tails.
50 pre-configure:
51         cd ${WRKDIR}/ghc-6.6.1 && \
52                 ${CHMOD} +x ./distrib/hc-build && \
53                 ${ENV} ${CONFIGURE_ENV} ./distrib/hc-build -C --disable-readline --enable-hc-boot-unregisterised && \
54                 ${FIND} . -type f -and -perm -o+x -and -name '*-inplace' | \
55                         while read i; do \
56                                 ${CP} $$i ${BUILDLINK_DIR}/bin/`basename $$i | sed -e 's/-inplace//'`; \
57                         done
58
59 # The ghc compiler does normally split the generated C files into small
60 # parts before sending them to gcc, to enable the linker to eliminate
61 # unused parts.  This does however not play nice with the pkgsrc
62 # framework, and the result is that the build takes more than 5 times
63 # as long than when the files are not split.  See
64 #    http://mail-index.netbsd.org/tech-pkg/2006/07/30/0005.html
65 # for a description of the problem.
66 # Disable file splitting until pkgsrc gets improved.
67 pre-build:
68         ${ECHO} "SplitObjs=NO" > ${WRKSRC}/mk/build.mk
69
70 # Some unused scripts don't pass the portability test.
71 CHECK_PORTABILITY_SKIP+=        distrib/prep-bin-dist-mingw
72
73 .include "../../devel/gmp/buildlink3.mk"
74 .include "../../mk/pthread.buildlink3.mk"
75 .include "../../mk/bsd.pkg.mk"