2017-02-28 15:52:45 +01:00
|
|
|
# Created by: Alonso Cardenas Marquez <acm@FreeBSD.org>
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= ldc
|
2018-02-01 21:03:30 +01:00
|
|
|
PORTVERSION= 1.7.0
|
2018-02-10 11:12:04 +01:00
|
|
|
PORTREVISION= 2
|
2017-02-28 15:52:45 +01:00
|
|
|
CATEGORIES= lang
|
|
|
|
MASTER_SITES= https://github.com/ldc-developers/ldc/releases/download/v${PORTVERSION}/:source \
|
|
|
|
https://github.com/ldc-developers/ldc/releases/download/v${BOOTVER}/:bootstrap
|
|
|
|
DISTFILES= ${DISTNAME:S/$/-src/}${EXTRACT_SUFX}:source
|
|
|
|
|
|
|
|
MAINTAINER= acm@FreeBSD.org
|
|
|
|
COMMENT= The LLVM-based D compiler
|
|
|
|
|
2017-03-05 04:07:52 +01:00
|
|
|
LICENSE= BSD3CLAUSE
|
|
|
|
|
2018-02-11 08:44:21 +01:00
|
|
|
BUILD_DEPENDS= llvm40>0:devel/llvm40
|
|
|
|
RUN_DEPENDS= llvm40>0:devel/llvm40
|
2017-02-28 15:52:45 +01:00
|
|
|
LIB_DEPENDS= libconfig.so:devel/libconfig
|
|
|
|
|
2017-05-03 00:23:52 +02:00
|
|
|
BROKEN_aarch64= fails to compile: Error: undefined identifier _jmp_buf, did you mean alias jmp_buf?
|
|
|
|
BROKEN_armv6= fails to compile: Error: undefined identifier _jmp_buf, did you mean alias jmp_buf?
|
2017-11-30 07:13:34 +01:00
|
|
|
BROKEN_armv7= fails to compile: Error: undefined identifier _jmp_buf, did you mean alias jmp_buf?
|
2017-05-20 18:58:10 +02:00
|
|
|
BROKEN_powerpc64= fails to compile: cc1plus: error: unrecognized command line option "-std=c++11"
|
2017-05-03 00:23:52 +02:00
|
|
|
|
2017-02-28 15:52:45 +01:00
|
|
|
USES= cmake
|
2017-07-16 10:49:32 +02:00
|
|
|
CMAKE_ARGS+= -DD_COMPILER:STRING="${WRKDIR}/${PORTNAME}-${BOOTVER:S/$/-src/}/bin/ldmd2" \
|
|
|
|
-DBUILD_SHARED_LIBS:STRING="BOTH"
|
2018-02-01 21:03:30 +01:00
|
|
|
|
2018-02-03 05:36:22 +01:00
|
|
|
CC= clang40
|
|
|
|
CXX= clang++40
|
2017-02-28 15:52:45 +01:00
|
|
|
|
2018-02-01 21:03:30 +01:00
|
|
|
BOOTVER= 0.17.5
|
2018-02-03 05:36:22 +01:00
|
|
|
LLVM_CONFIG= llvm-config40
|
2017-02-28 15:52:45 +01:00
|
|
|
LDCVER= ${PORTVERSION}
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/$/-src/}
|
|
|
|
|
|
|
|
DISTFILES+= ${PORTNAME}-${BOOTVER}-src.tar.gz:bootstrap
|
|
|
|
|
2017-07-16 10:49:32 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${ARCH} == "amd64"
|
2018-02-01 21:03:30 +01:00
|
|
|
CFLAGS+= -fPIC
|
2017-07-16 10:49:32 +02:00
|
|
|
.endif
|
|
|
|
|
2018-02-03 05:36:22 +01:00
|
|
|
post-patch:
|
|
|
|
${REINPLACE_CMD} -e 's|$${llvm_config_names}|${LLVM_CONFIG}|g' \
|
|
|
|
${WRKDIR}/${PORTNAME}-${BOOTVER:S/$/-src/}/cmake/Modules/FindLLVM.cmake \
|
|
|
|
${WRKSRC}/cmake/Modules/FindLLVM.cmake
|
|
|
|
|
2017-02-28 15:52:45 +01:00
|
|
|
pre-configure:
|
2018-02-03 05:36:22 +01:00
|
|
|
@cd ${WRKDIR}/${PORTNAME}-${BOOTVER:S/$/-src/} && ${CMAKE_BIN} .
|
|
|
|
@cd ${WRKDIR}/${PORTNAME}-${BOOTVER:S/$/-src/} && ${MAKE}
|
2017-02-28 15:52:45 +01:00
|
|
|
|
2017-07-16 10:49:32 +02:00
|
|
|
.include <bsd.port.post.mk>
|