diff --git a/lang/crystal/Makefile b/lang/crystal/Makefile index 9f169d437475..4daf2cdbc77f 100644 --- a/lang/crystal/Makefile +++ b/lang/crystal/Makefile @@ -1,120 +1,120 @@ PORTNAME= crystal DISTVERSION= 1.5.1 CATEGORIES= lang MASTER_SITES= https://dl.unrelenting.technology/crystal/:bootstrap DISTFILES= ${BOOTSTRAP_PATH}:bootstrap DIST_SUBDIR= ${PORTNAME} EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= dmgk@FreeBSD.org COMMENT= Language with Ruby-like syntax and static type checking WWW= https://crystal-lang.org LICENSE= APACHE20 ONLY_FOR_ARCHS= aarch64 amd64 ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler BUILD_DEPENDS= ${LOCALBASE}/bin/llvm-config${LLVM_VERSION}:devel/llvm${BOOTSTRAP_LLVM_VERSION} \ git:devel/git LIB_DEPENDS= libgc-threaded.so:devel/boehm-gc-threaded \ libevent.so:devel/libevent \ libpcre.so:devel/pcre \ libLLVM-${LLVM_VERSION:C/^([6-9])0/\1/:S/-devel/15/}.so:devel/llvm${LLVM_VERSION} RUN_DEPENDS= pkg-config:devel/pkgconf USES= compiler gmake pkgconfig ssl USE_GITHUB= yes GH_ACCOUNT= crystal-lang LLVM_VERSION?= 10 BOOTSTRAP_LLVM_VERSION= 10 BOOTSTRAP_PATH= crystal-${BOOTSTRAP_VER}-freebsd12-${ARCH}-llvm${BOOTSTRAP_LLVM_VERSION} BOOTSTRAP_VER?= 1.1.1 MAKE_ARGS= SHELL=sh \ LLVM_CONFIG="${LOCALBASE}/bin/llvm-config${LLVM_VERSION}" \ FLAGS="--release --no-debug --progress --threads=${MAKE_JOBS_NUMBER}" \ EXPORTS='CRYSTAL_CONFIG_PATH="lib:${PREFIX}/lib/${PORTNAME}"' \ CRYSTAL_CACHE_DIR="${WRKDIR}/cache" \ CRYSTAL_CONFIG_VERSION="${DISTVERSION}" TEST_TARGET= spec PORTDOCS= * PORTEXAMPLES= * OPTIONS_DEFINE= DOCS EXAMPLES BASH ZSH OPTIONS_DEFAULT= BASH ZSH OPTIONS_SUB= yes .include .if ${OPSYS} != FreeBSD IGNORE= not supported on anything but FreeBSD .endif # crystal needs pkgconfig to determine SSL variants but these are not # present in FreeBSD base. We splice in the correct info based on # FreeBSD version and hope it doesn't change during minor releases. # See post-patch for the substitutions of these patches. .if ${SSL_DEFAULT} == "base" EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_openssl_lib__crypto.cr \ ${PATCHDIR}/extra-patch-src_openssl_lib__ssl.cr .endif post-extract: ${MKDIR} ${WRKSRC}/.build ${CP} ${DISTDIR}/${DIST_SUBDIR}/${BOOTSTRAP_PATH} ${WRKSRC}/.build/crystal ${CHMOD} +x ${WRKSRC}/.build/crystal ${LN} -s x86_64-freebsd ${WRKSRC}/src/lib_c/aarch64-portbld-freebsd ${LN} -s x86_64-freebsd ${WRKSRC}/src/lib_c/aarch64-freebsd post-patch: .if ${SSL_DEFAULT} == "base" && ${OSREL:R} < 15 @${REINPLACE_CMD} -i '' \ -e 's|CRYSTAL_SSL_VERSION|1.1.1|g' \ -e 's|CRYSTAL_SSL_LDFLAGS|${OPENSSLLIB}|g' \ ${WRKSRC}/src/openssl/lib_ssl.cr \ ${WRKSRC}/src/openssl/lib_crypto.cr .endif do-build-DOCS-on: cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} docs \ CRYSTAL_CACHE_DIR="${WRKDIR}/cache" do-install: ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/.build/crystal ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_MAN} ${INSTALL_WRKSRC}/man/crystal.1 ${STAGEDIR}${MANPREFIX}/man/man1/ (cd ${INSTALL_WRKSRC}/src && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/${PORTNAME}) do-install-DOCS-on: (cd ${INSTALL_WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) do-install-EXAMPLES-on: (cd ${INSTALL_WRKSRC}/samples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) do-install-BASH-on: ${MKDIR} ${STAGEDIR}${LOCALBASE}/etc/bash_completion.d ${INSTALL_DATA} ${INSTALL_WRKSRC}/etc/completion.bash \ ${STAGEDIR}${LOCALBASE}/etc/bash_completion.d/_crystal.bash do-install-ZSH-on: ${MKDIR} ${STAGEDIR}${LOCALBASE}/share/zsh/site-functions ${INSTALL_DATA} ${INSTALL_WRKSRC}/etc/completion.zsh \ ${STAGEDIR}${LOCALBASE}/share/zsh/site-functions/_crystal .if !defined(_CRYSTAL_MAKESUM_GUARD) makesum: ${MAKE} -D_CRYSTAL_MAKESUM_GUARD makesum ARCH=${ONLY_FOR_ARCHS:O:[1]} DISTINFO_FILE=${DISTINFO_FILE}.tmp .for arch in ${ONLY_FOR_ARCHS:O:[2..-1]} ${MAKE} -D_CRYSTAL_MAKESUM_GUARD makesum ARCH=${arch} DISTINFO_FILE=${DISTINFO_FILE}.${arch} ${SED} 1d ${DISTINFO_FILE}.${arch} >> ${DISTINFO_FILE}.tmp ${RM} ${DISTINFO_FILE}.${arch} .endfor ${AWK} '!seen[$$0]++' ${DISTINFO_FILE}.tmp > ${DISTINFO_FILE} ${RM} ${DISTINFO_FILE}.tmp .endif .include