1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00
freebsd-ports/lang/pure/Makefile

113 lines
2.9 KiB
Makefile
Raw Normal View History

# Created by: Zhihao Yuan <lichray@gmail.com>
# $FreeBSD$
PORTNAME= pure
PORTVERSION= 0.64
PORTREVISION= 9
CATEGORIES= lang
MASTER_SITES= https://bitbucket.org/purelang/pure-lang/downloads/
EXTRACT_ONLY= ${DISTNAME}.tar.gz
MAINTAINER= lichray@gmail.com
COMMENT= Modern-style functional programming language
LICENSE= GPLv3 LGPL3
LICENSE_COMB= dual
LIB_DEPENDS= libgmp.so:math/gmp \
libmpfr.so:math/mpfr \
libpcreposix.so:devel/pcre \
libLLVM-${LLVM_VERSION:C/./&./}.so:devel/llvm${LLVM_VERSION}
SUB_FILES= pkg-message
USES= gmake iconv libedit pathfix pkgconfig
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-libgmp-prefix=${LOCALBASE} --enable-release \
--with-pcre \
--with-tool-prefix=${LOCALBASE}/llvm${LLVM_VERSION}/bin
EXTRACT_AFTER_ARGS=--no-same-owner --no-same-permissions --exclude texmacs
TEST_TARGET= check # XXX: some tests fail
USE_LDCONFIG= yes
PORTDOCS= *
PORTEXAMPLES= *
OPTIONS_DEFINE= DOCS EMACS ETC EXAMPLES
EMACS_DESC= Compile pure-mode.el with Emacs
ETC_DESC= Copy Pure syntax highlighting to ${DATADIR}/etc
.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}
.if ${LLVM_VERSION} >= 35
USES+= compiler:c++11-lib
.endif
OPTIONS_DEFAULT= ETC
OPTIONS_SUB= yes
EMACS_CONFIGURE_WITH= elisp
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
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
DISTFILES+= ${EXTRACT_ONLY} ${PORTNAME}-docs-${PORTVERSION}.tar.gz
.endif
.if ${PORT_OPTIONS:MEMACS}
USES+= emacs:build
MAKE_ARGS+= emacs_prefix=${PREFIX}
.endif
# automatically disable readline support if editline support is available
.if exists(/usr/include/edit/readline/readline.h)
CONFIGURE_ARGS+= --without-readline
.endif
converters/libiconv: - Remove const qualifier from iconv(3) to match POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html - Patch iconv.h to expose more GNU extensions when LIBICONV_PLUG is defined because the base system iconv supports these extensions too. Add/remove patches to/from ports to call iconv with non-const arguments. This breaks some ports on FreeBSD 10 because base system iconv.h still has the const qualifier. Fix this by letting USES=iconv add a build dependency on converters/libiconv so ports can use its iconv.h (with LIBICONV_PLUG defined) instead of the base system iconv.h. This exposed some ports that link with libiconv when it is available instead of using libc iconv. In these cases one of the following changes has been made: - patch configure scripts to test for libc iconv first - add ac_cv_lib_iconv_libiconv=no or similar to CONFIGURE_ARGS to disable some configure tests - converters/wkhtmltopdf: this includes Qt4 so add a patch from devel/qt4 - lang/gcc5-aux: respect CFLAGS and friends during configure such that LIBICONV_PLUG is defined in the iconv test, also switch to external gettext - mail/gnarwl: replace patches with CPPFLAGS/LIBS - multimedia/ffmpeg2theora: remove iconv test from SConstruct and use ICONV_LIB in port Makefile instead, also fix a bug in subtitles.c - net-im/licq: finish conversion to cmake - net-mgmt/bandwidthd, net-mgmt/icinga, net-mgmt/nagios, net-mgmt/nagios4: don't need iconv - textproc/p5-XML-TinyXML: finish conversion to USES=perl5 Other changes: - databases/qdbm and slaves: respect CFLAGS and friends, also enable bzip2 and lzo support - games/ldmud: respect CFLAGS and friends - graphics/inventor: replace some patches with MAKE_ARGS/MAKE_ENV to respect CFLAGS and friends, also remove FreeBSD/alpha patch and add missing xorg dependencies PR: 199099 Exp-run by: antoine Approved by: portmgr (antoine)
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
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/pure \
${STAGEDIR}${PREFIX}/lib/libpure.so.*.*
post-install-ETC-on:
@${MKDIR} ${STAGEDIR}${DATADIR}/etc/
@(cd ${WRKSRC} && ${RM} etc/*.in && ${COPYTREE_SHARE} etc/ ${STAGEDIR}${DATADIR})
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${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}
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
converters/libiconv: - Remove const qualifier from iconv(3) to match POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html - Patch iconv.h to expose more GNU extensions when LIBICONV_PLUG is defined because the base system iconv supports these extensions too. Add/remove patches to/from ports to call iconv with non-const arguments. This breaks some ports on FreeBSD 10 because base system iconv.h still has the const qualifier. Fix this by letting USES=iconv add a build dependency on converters/libiconv so ports can use its iconv.h (with LIBICONV_PLUG defined) instead of the base system iconv.h. This exposed some ports that link with libiconv when it is available instead of using libc iconv. In these cases one of the following changes has been made: - patch configure scripts to test for libc iconv first - add ac_cv_lib_iconv_libiconv=no or similar to CONFIGURE_ARGS to disable some configure tests - converters/wkhtmltopdf: this includes Qt4 so add a patch from devel/qt4 - lang/gcc5-aux: respect CFLAGS and friends during configure such that LIBICONV_PLUG is defined in the iconv test, also switch to external gettext - mail/gnarwl: replace patches with CPPFLAGS/LIBS - multimedia/ffmpeg2theora: remove iconv test from SConstruct and use ICONV_LIB in port Makefile instead, also fix a bug in subtitles.c - net-im/licq: finish conversion to cmake - net-mgmt/bandwidthd, net-mgmt/icinga, net-mgmt/nagios, net-mgmt/nagios4: don't need iconv - textproc/p5-XML-TinyXML: finish conversion to USES=perl5 Other changes: - databases/qdbm and slaves: respect CFLAGS and friends, also enable bzip2 and lzo support - games/ldmud: respect CFLAGS and friends - graphics/inventor: replace some patches with MAKE_ARGS/MAKE_ENV to respect CFLAGS and friends, also remove FreeBSD/alpha patch and add missing xorg dependencies PR: 199099 Exp-run by: antoine Approved by: portmgr (antoine)
2015-04-15 08:20:27 +00:00
.include <bsd.port.post.mk>