2013-07-08 11:50:41 +00:00
|
|
|
# Created by: Zhihao Yuan <lichray@gmail.com>
|
2011-03-21 06:14:38 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= pure
|
2015-04-10 00:54:10 +00:00
|
|
|
PORTVERSION= 0.64
|
Bump PORTREVISION for ports depending on the canonical version of GCC
defined via Mk/bsd.default-versions.mk which has moved from GCC 7.4 t
GCC 8.2 under most circumstances.
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c11, c++0x, c++11-lang,
c++11-lib, c++14-lang, c++17-lang, or gcc-c++11-lib
plus, as a double check, everything INDEX-11 showed depending on lang/gcc7.
PR: 231590
2018-12-12 01:35:33 +00:00
|
|
|
PORTREVISION= 9
|
2011-03-21 06:14:38 +00:00
|
|
|
CATEGORIES= lang
|
2015-04-09 14:43:41 +00:00
|
|
|
MASTER_SITES= https://bitbucket.org/purelang/pure-lang/downloads/
|
2015-04-10 00:54:10 +00:00
|
|
|
EXTRACT_ONLY= ${DISTNAME}.tar.gz
|
2011-03-21 06:14:38 +00:00
|
|
|
|
|
|
|
MAINTAINER= lichray@gmail.com
|
2013-08-09 13:43:59 +00:00
|
|
|
COMMENT= Modern-style functional programming language
|
2011-03-21 06:14:38 +00:00
|
|
|
|
2012-06-06 22:04:55 +00:00
|
|
|
LICENSE= GPLv3 LGPL3
|
|
|
|
LICENSE_COMB= dual
|
2012-01-26 11:18:51 +00:00
|
|
|
|
2016-04-01 14:08:37 +00:00
|
|
|
LIB_DEPENDS= libgmp.so:math/gmp \
|
|
|
|
libmpfr.so:math/mpfr \
|
|
|
|
libpcreposix.so:devel/pcre \
|
|
|
|
libLLVM-${LLVM_VERSION:C/./&./}.so:devel/llvm${LLVM_VERSION}
|
2011-03-21 06:14:38 +00:00
|
|
|
|
2013-11-06 22:50:21 +00:00
|
|
|
SUB_FILES= pkg-message
|
|
|
|
|
2018-05-20 08:34:11 +00:00
|
|
|
USES= gmake iconv libedit pathfix pkgconfig
|
2011-03-21 06:14:38 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2014-01-08 08:32:42 +00:00
|
|
|
CONFIGURE_ARGS= --with-libgmp-prefix=${LOCALBASE} --enable-release \
|
2015-04-10 00:54:10 +00:00
|
|
|
--with-pcre \
|
2014-01-08 08:32:42 +00:00
|
|
|
--with-tool-prefix=${LOCALBASE}/llvm${LLVM_VERSION}/bin
|
2015-04-10 00:54:10 +00:00
|
|
|
EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude texmacs
|
2018-05-20 08:34:11 +00:00
|
|
|
TEST_TARGET= check # XXX: some tests fail
|
2012-01-26 20:12:37 +00:00
|
|
|
USE_LDCONFIG= yes
|
2011-03-21 06:14:38 +00:00
|
|
|
|
2013-11-06 22:50:21 +00:00
|
|
|
PORTDOCS= *
|
|
|
|
PORTEXAMPLES= *
|
|
|
|
|
|
|
|
OPTIONS_DEFINE= DOCS EMACS ETC EXAMPLES
|
2011-03-21 06:14:38 +00:00
|
|
|
|
2012-10-10 21:02:04 +00:00
|
|
|
EMACS_DESC= Compile pure-mode.el with Emacs
|
2013-11-06 22:50:21 +00:00
|
|
|
ETC_DESC= Copy Pure syntax highlighting to ${DATADIR}/etc
|
2011-04-09 19:21:47 +00:00
|
|
|
|
2015-04-10 00:54:10 +00:00
|
|
|
.if !defined(LLVM_VERSION)
|
|
|
|
. for v in 33 34 35
|
|
|
|
. if exists(${LOCALBASE}/bin/llvm-config$v)
|
|
|
|
LLVM_VERSION= $v
|
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
.endif
|
|
|
|
LLVM_VERSION?= 35 # Pure does not build with llvm36. Yet?
|
|
|
|
SUB_LIST+= LLVM_VERSION=${LLVM_VERSION}
|
2015-04-20 07:47:39 +00:00
|
|
|
.if ${LLVM_VERSION} >= 35
|
|
|
|
USES+= compiler:c++11-lib
|
2015-04-10 00:54:10 +00:00
|
|
|
.endif
|
|
|
|
|
2013-11-06 22:50:21 +00:00
|
|
|
OPTIONS_DEFAULT= ETC
|
|
|
|
|
|
|
|
OPTIONS_SUB= yes
|
|
|
|
|
2014-01-08 08:32:42 +00:00
|
|
|
EMACS_CONFIGURE_WITH= elisp
|
2013-08-09 13:43:59 +00:00
|
|
|
|
2015-04-10 00:54:10 +00:00
|
|
|
post-patch:
|
|
|
|
${REINPLACE_CMD} -e \
|
|
|
|
's,defcustom pure-docs-dir .*,defcustom pure-docs-dir "${DOCSDIR}",' \
|
|
|
|
${WRKSRC}/etc/pure-mode.el.in
|
|
|
|
${REINPLACE_CMD} \
|
|
|
|
-e 's,default_doc =.*;$$,default_doc = "${DOCSDIR}/index.html";,' \
|
|
|
|
-e 's,"+interp.libdir+"docs,${DOCSDIR},g' \
|
|
|
|
${WRKSRC}/lexer.cc
|
|
|
|
|
2011-03-21 06:14:38 +00:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2015-04-10 00:54:10 +00:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
|
|
|
DISTFILES+= ${EXTRACT_ONLY} ${PORTNAME}-docs-${PORTVERSION}.tar.gz
|
|
|
|
.endif
|
|
|
|
|
2012-06-06 22:04:55 +00:00
|
|
|
.if ${PORT_OPTIONS:MEMACS}
|
2018-02-01 18:03:09 +00:00
|
|
|
USES+= emacs:build
|
2011-04-09 19:21:47 +00:00
|
|
|
MAKE_ARGS+= emacs_prefix=${PREFIX}
|
2013-11-06 22:50:21 +00:00
|
|
|
.endif
|
|
|
|
|
2012-03-22 13:18:26 +00:00
|
|
|
# automatically disable readline support if editline support is available
|
|
|
|
.if exists(/usr/include/edit/readline/readline.h)
|
|
|
|
CONFIGURE_ARGS+= --without-readline
|
|
|
|
.endif
|
|
|
|
|
2015-04-15 08:20:27 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if empty(ICONV_LIB)
|
|
|
|
CONFIGURE_ARGS+=ac_cv_lib_iconv_libiconv=no ac_cv_lib_iconv_iconv=no
|
|
|
|
.endif
|
|
|
|
|
2013-11-06 22:50:21 +00:00
|
|
|
post-install:
|
2015-04-10 00:54:10 +00:00
|
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/pure \
|
|
|
|
${STAGEDIR}${PREFIX}/lib/libpure.so.*.*
|
2018-05-20 08:34:11 +00:00
|
|
|
|
|
|
|
post-install-ETC-on:
|
2013-11-06 22:50:21 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/etc/
|
2016-10-21 12:51:40 +00:00
|
|
|
@(cd ${WRKSRC} && ${RM} etc/*.in && ${COPYTREE_SHARE} etc/ ${STAGEDIR}${DATADIR})
|
2011-03-21 06:14:38 +00:00
|
|
|
|
2018-05-20 08:34:11 +00:00
|
|
|
|
|
|
|
post-install-DOCS-on:
|
2013-11-06 22:50:21 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
2015-04-10 00:54:10 +00:00
|
|
|
${TAR} -C ${STAGEDIR}${DOCSDIR} --strip-components 1 \
|
|
|
|
--exclude Makefile --exclude '*.tm' \
|
|
|
|
${EXTRACT_AFTER_ARGS} \
|
|
|
|
-xpf ${_DISTDIR}${_DISTFILES:M*-docs*}
|
|
|
|
${FIND} ${STAGEDIR}${DOCSDIR} -type f | ${XARGS} ${CHMOD} ${SHAREMODE}
|
2012-06-06 22:04:55 +00:00
|
|
|
|
2018-05-20 08:34:11 +00:00
|
|
|
post-install-EXAMPLES-on:
|
2013-11-06 22:50:21 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
2015-04-10 00:54:10 +00:00
|
|
|
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
|
2011-03-21 06:14:38 +00:00
|
|
|
|
2015-04-15 08:20:27 +00:00
|
|
|
.include <bsd.port.post.mk>
|