From owner-svn-ports-head@FreeBSD.ORG Sun Feb 16 10:11:00 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9B81114; Sun, 16 Feb 2014 10:11:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B25BB1001; Sun, 16 Feb 2014 10:11:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1GAB0OC051507; Sun, 16 Feb 2014 10:11:00 GMT (envelope-from pgj@svn.freebsd.org) Received: (from pgj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1GAAxqI051441; Sun, 16 Feb 2014 10:10:59 GMT (envelope-from pgj@svn.freebsd.org) Message-Id: <201402161010.s1GAAxqI051441@svn.freebsd.org> From: Gabor Pali Date: Sun, 16 Feb 2014 10:10:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r344511 - head/lang/ghc X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Feb 2014 10:11:00 -0000 Author: pgj Date: Sun Feb 16 10:10:59 2014 New Revision: 344511 URL: http://svnweb.freebsd.org/changeset/ports/344511 QAT: https://qat.redports.org/buildarchive/r344511/ Log: - Fix build with DOCS disabled [1] - Revamp LLVM code generation support [2] - Fix a bug in handling hs- port OPTIONS [3] Reported by: obraun [1], skinnr [2] Submitted by: antoine [3] Obtained from: FreeBSD Haskell Modified: head/lang/ghc/Makefile head/lang/ghc/bsd.cabal.mk head/lang/ghc/bsd.cabal.options.mk head/lang/ghc/pkg-plist Modified: head/lang/ghc/Makefile ============================================================================== --- head/lang/ghc/Makefile Sun Feb 16 09:38:19 2014 (r344510) +++ head/lang/ghc/Makefile Sun Feb 16 10:10:59 2014 (r344511) @@ -44,13 +44,14 @@ MAKE_ENV= LC_ALL=en_US.UTF-8 LANG=en_US. # You can view below. GNU_CONFIGURE= yes -OPTIONS_DEFINE= PROFILE DYNAMIC DOCS +OPTIONS_DEFINE= PROFILE DYNAMIC LLVM DOCS OPTIONS_DEFAULT= PROFILE DYNAMIC DOCS BOOT_DESC= Use installed GHC for bootstrapping BOOTH_DESC= Use installed HsColour for bootstrapping PROFILE_DESC= Add support for performance profiling DYNAMIC_DESC= Add support for dynamic linking +LLVM_DESC= Add support for generating code via LLVM DOCS_DESC= Install HTML documentation LOCALBASE?= /usr/local @@ -131,6 +132,14 @@ CONFIGURE_ARGS+= --with-system-libffi \ --with-ffi-libraries=${LOCALBASE}/lib .endif +.if ${PORT_OPTIONS:MLLVM} +BUILD_DEPENDS+= ${LOCALBASE}/bin/opt32:${PORTSDIR}/devel/llvm32 +RUN_DEPENDS+= ${LOCALBASE}/bin/opt32:${PORTSDIR}/devel/llvm32 + +CONFIGURE_ARGS+= --with-opt=${LOCALBASE}/bin/opt32 \ + --with-llc=${LOCALBASE}/bin/llc32 +.endif + .if empty(PORT_OPTIONS:MBOOT) BOOT_DIR= ${WRKDIR}/ghc-${BOOT_GHC_VERSION}-boot Modified: head/lang/ghc/bsd.cabal.mk ============================================================================== --- head/lang/ghc/bsd.cabal.mk Sun Feb 16 09:38:19 2014 (r344510) +++ head/lang/ghc/bsd.cabal.mk Sun Feb 16 10:10:59 2014 (r344511) @@ -86,8 +86,11 @@ CONFIGURE_ARGS+= --with-gcc=${CC} --with --with-ranlib=${RANLIB} .if ${PORT_OPTIONS:MLLVM} -BUILD_DEPENDS+= llvm>=3.0:${PORTSDIR}/devel/llvm -CONFIGURE_ARGS+= --ghc-option=-fllvm +CONFIGURE_ARGS+= --ghc-option=-fllvm \ + --ghc-option=-pgmlo --ghc-option=${LOCALBASE}/bin/opt32 \ + --ghc-option=-pgmlc --ghc-option=${LOCALBASE}/bin/llc32 + +BUILD_DEPENDS+= ${LOCALBASE}/bin/opt32:${PORTSDIR}/devel/llvm32 .endif .if defined(USE_ALEX) Modified: head/lang/ghc/bsd.cabal.options.mk ============================================================================== --- head/lang/ghc/bsd.cabal.options.mk Sun Feb 16 09:38:19 2014 (r344510) +++ head/lang/ghc/bsd.cabal.options.mk Sun Feb 16 10:10:59 2014 (r344511) @@ -24,12 +24,12 @@ DYNAMIC_DESC?= Add support for dynamic l PROFILE_DESC?= Add support for profiling LLVM_DESC?= Use the LLVM backend for code generation -.if !exists(${GHC_CMD}) || (exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/ghc-${GHC_VERSION}/GHC.dyn_hi) && !defined(IGNORE_DYNAMIC)) +.if (!exists(${GHC_CMD}) || exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/ghc-${GHC_VERSION}/GHC.dyn_hi)) && !defined(IGNORE_DYNAMIC) OPTIONS_DEFINE+= DYNAMIC OPTIONS_DEFAULT+= DYNAMIC .endif -.if !exists(${GHC_CMD}) || (exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/ghc-${GHC_VERSION}/GHC.p_hi) && !defined(IGNORE_PROFILE)) +.if (!exists(${GHC_CMD}) || exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/ghc-${GHC_VERSION}/GHC.p_hi)) && !defined(IGNORE_PROFILE) OPTIONS_DEFINE+= PROFILE .endif @@ -37,7 +37,7 @@ OPTIONS_DEFINE+= PROFILE OPTIONS_DEFINE+= LLVM .endif -.if !exists(${GHC_CMD}) || ((exists(${HADDOCK_CMD}) && exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/html)) && !defined(NOPORTDOCS)) +.if (!exists(${GHC_CMD}) || (exists(${HADDOCK_CMD}) && exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/html))) && !defined(NOPORTDOCS) OPTIONS_DEFINE+= DOCS OPTIONS_DEFAULT+= DOCS HADDOCK_AVAILABLE= yes Modified: head/lang/ghc/pkg-plist ============================================================================== --- head/lang/ghc/pkg-plist Sun Feb 16 09:38:19 2014 (r344510) +++ head/lang/ghc/pkg-plist Sun Feb 16 10:10:59 2014 (r344511) @@ -11,7 +11,7 @@ bin/ghci-%%GHC_VERSION%% bin/ghc-pkg-%%GHC_VERSION%% bin/haddock-ghc-%%GHC_VERSION%% bin/runghc-%%GHC_VERSION%% -man/man1/ghc.1.gz +%%PORTDOCS%%man/man1/ghc.1.gz @exec /bin/ln -sf %D/bin/haddock-ghc-%%GHC_VERSION%% %D/bin/haddock || return true @unexec /bin/rm -f %D/bin/haddock || return true @exec /bin/mkdir -p %D/lib/cabal/ghc-%%GHC_VERSION%% || return true