2013-07-08 13:50:41 +02:00
|
|
|
# Created by: Zhihao Yuan <lichray@gmail.com>
|
2011-03-21 07:14:38 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= pure
|
2015-04-10 02:54:10 +02:00
|
|
|
PORTVERSION= 0.64
|
2018-05-31 03:18:05 +02:00
|
|
|
PORTREVISION= 7
|
2011-03-21 07:14:38 +01:00
|
|
|
CATEGORIES= lang
|
2015-04-09 16:43:41 +02:00
|
|
|
MASTER_SITES= https://bitbucket.org/purelang/pure-lang/downloads/
|
2015-04-10 02:54:10 +02:00
|
|
|
EXTRACT_ONLY= ${DISTNAME}.tar.gz
|
2011-03-21 07:14:38 +01:00
|
|
|
|
|
|
|
MAINTAINER= lichray@gmail.com
|
2013-08-09 15:43:59 +02:00
|
|
|
COMMENT= Modern-style functional programming language
|
2011-03-21 07:14:38 +01:00
|
|
|
|
2012-06-07 00:04:55 +02:00
|
|
|
LICENSE= GPLv3 LGPL3
|
|
|
|
LICENSE_COMB= dual
|
2012-01-26 12:18:51 +01:00
|
|
|
|
2016-04-01 16:08:37 +02: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 07:14:38 +01:00
|
|
|
|
2013-11-06 23:50:21 +01:00
|
|
|
SUB_FILES= pkg-message
|
|
|
|
|
2018-05-20 10:34:11 +02:00
|
|
|
USES= gmake iconv libedit pathfix pkgconfig
|
2011-03-21 07:14:38 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2014-01-08 09:32:42 +01:00
|
|
|
CONFIGURE_ARGS= --with-libgmp-prefix=${LOCALBASE} --enable-release \
|
2015-04-10 02:54:10 +02:00
|
|
|
--with-pcre \
|
2014-01-08 09:32:42 +01:00
|
|
|
--with-tool-prefix=${LOCALBASE}/llvm${LLVM_VERSION}/bin
|
2015-04-10 02:54:10 +02:00
|
|
|
EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude texmacs
|
2018-05-20 10:34:11 +02:00
|
|
|
TEST_TARGET= check # XXX: some tests fail
|
2012-01-26 21:12:37 +01:00
|
|
|
USE_LDCONFIG= yes
|
2011-03-21 07:14:38 +01:00
|
|
|
|
2013-11-06 23:50:21 +01:00
|
|
|
PORTDOCS= *
|
|
|
|
PORTEXAMPLES= *
|
|
|
|
|
|
|
|
OPTIONS_DEFINE= DOCS EMACS ETC EXAMPLES
|
2011-03-21 07:14:38 +01:00
|
|
|
|
2012-10-10 23:02:04 +02:00
|
|
|
EMACS_DESC= Compile pure-mode.el with Emacs
|
2013-11-06 23:50:21 +01:00
|
|
|
ETC_DESC= Copy Pure syntax highlighting to ${DATADIR}/etc
|
2011-04-09 21:21:47 +02:00
|
|
|
|
2015-04-10 02:54:10 +02: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 09:47:39 +02:00
|
|
|
.if ${LLVM_VERSION} >= 35
|
|
|
|
USES+= compiler:c++11-lib
|
2015-04-10 02:54:10 +02:00
|
|
|
.endif
|
|
|
|
|
2013-11-06 23:50:21 +01:00
|
|
|
OPTIONS_DEFAULT= ETC
|
|
|
|
|
|
|
|
OPTIONS_SUB= yes
|
|
|
|
|
2014-01-08 09:32:42 +01:00
|
|
|
EMACS_CONFIGURE_WITH= elisp
|
2013-08-09 15:43:59 +02:00
|
|
|
|
2015-04-10 02:54:10 +02: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 07:14:38 +01:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2015-04-10 02:54:10 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
|
|
|
DISTFILES+= ${EXTRACT_ONLY} ${PORTNAME}-docs-${PORTVERSION}.tar.gz
|
|
|
|
.endif
|
|
|
|
|
2012-06-07 00:04:55 +02:00
|
|
|
.if ${PORT_OPTIONS:MEMACS}
|
2018-02-01 19:03:09 +01:00
|
|
|
USES+= emacs:build
|
2011-04-09 21:21:47 +02:00
|
|
|
MAKE_ARGS+= emacs_prefix=${PREFIX}
|
2013-11-06 23:50:21 +01:00
|
|
|
.endif
|
|
|
|
|
2012-03-22 14:18:26 +01: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 10:20:27 +02: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 23:50:21 +01:00
|
|
|
post-install:
|
2015-04-10 02:54:10 +02:00
|
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/pure \
|
|
|
|
${STAGEDIR}${PREFIX}/lib/libpure.so.*.*
|
2018-05-20 10:34:11 +02:00
|
|
|
|
|
|
|
post-install-ETC-on:
|
2013-11-06 23:50:21 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/etc/
|
2016-10-21 14:51:40 +02:00
|
|
|
@(cd ${WRKSRC} && ${RM} etc/*.in && ${COPYTREE_SHARE} etc/ ${STAGEDIR}${DATADIR})
|
2011-03-21 07:14:38 +01:00
|
|
|
|
2018-05-20 10:34:11 +02:00
|
|
|
|
|
|
|
post-install-DOCS-on:
|
2013-11-06 23:50:21 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
2015-04-10 02:54:10 +02: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-07 00:04:55 +02:00
|
|
|
|
2018-05-20 10:34:11 +02:00
|
|
|
post-install-EXAMPLES-on:
|
2013-11-06 23:50:21 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
2015-04-10 02:54:10 +02:00
|
|
|
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
|
2011-03-21 07:14:38 +01:00
|
|
|
|
2015-04-15 10:20:27 +02:00
|
|
|
.include <bsd.port.post.mk>
|