aboutsummaryrefslogtreecommitdiff
path: root/lang/ponyc
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2018-10-18 22:24:44 +0000
committerSteve Wills <swills@FreeBSD.org>2018-10-18 22:24:44 +0000
commitedb85ee21edc813780de23666d4b84514ec8a8a3 (patch)
tree332c2ce7569da173eb269e8537b3228913a6c038 /lang/ponyc
parent79656f9573b2d98bf8d965154f4e0b93eeb233d0 (diff)
downloadports-edb85ee21edc813780de23666d4b84514ec8a8a3.tar.gz
ports-edb85ee21edc813780de23666d4b84514ec8a8a3.zip
lang/ponyc: update to 0.25.0
PR: 232352 Submitted by: Greg V <greg@unrelenting.technology> (maintainer)
Notes
Notes: svn path=/head/; revision=482384
Diffstat (limited to 'lang/ponyc')
-rw-r--r--lang/ponyc/Makefile34
-rw-r--r--lang/ponyc/distinfo6
-rw-r--r--lang/ponyc/files/patch-Makefile22
-rw-r--r--lang/ponyc/files/patch-src_libponyc_codegen_genexe.c12
-rw-r--r--lang/ponyc/files/patch-src_libponyc_codegen_host.cc17
-rw-r--r--lang/ponyc/pkg-plist5
6 files changed, 73 insertions, 23 deletions
diff --git a/lang/ponyc/Makefile b/lang/ponyc/Makefile
index 857a45edb9c9..417231ddeefe 100644
--- a/lang/ponyc/Makefile
+++ b/lang/ponyc/Makefile
@@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= ponyc
-DISTVERSION= 0.24.4
-PORTREVISION= 1
+DISTVERSION= 0.25.0
CATEGORIES= lang
MAINTAINER= greg@unrelenting.technology
@@ -19,23 +18,31 @@ LIB_DEPENDS= libunwind.so:devel/libunwind
BUILD_DEPENDS= llvm-link${LLVM_VERSION}:devel/llvm${LLVM_VERSION}
RUN_DEPENDS= llvm-link${LLVM_VERSION}:devel/llvm${LLVM_VERSION}
-OPTIONS_DEFINE= DOCS EXAMPLES
-
USES= gmake ncurses compiler:c++11-lang
-MAKE_ARGS= config=release
LLVM_VERSION= 50
+# LLVM 6 has assertion failures when e.g. optimizing the mandelbrot example
PLIST_SUB= VERSION="${DISTVERSION}" PONYARCH="${PONYARCH}"
+OPTIONS_SUB= yes
USE_GITHUB= yes
GH_ACCOUNT= ponylang
PORTDOCS= *.md
-.include <bsd.port.options.mk>
+MAKE_ENV= config=release verbose=true default_pic=true \
+ prefix=${PREFIX} arch=${PONYARCH} \
+ LLVM_CONFIG=llvm-config${LLVM_VERSION}
+
+OPTIONS_DEFINE= DOCS EXAMPLES DTRACE
+OPTIONS_EXCLUDE_aarch64= DTRACE
+# Not enabling DTrace by default yet because it breaks --runtimebc ("super LTO"):
+# https://github.com/ponylang/ponyc/issues/2915
-MAKE_ENV= prefix=${PREFIX} verbose=true arch=${PONYARCH}
+DTRACE_MAKE_ENV= use=dtrace
+
+.include <bsd.port.pre.mk>
# Pony defaults to 'native', which
# a) doesn't work on aarch64
@@ -47,6 +54,17 @@ PONYARCH?= armv8-a
PONYARCH?= core2
.endif
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200085
+MAKE_ENV+= default_ssl=openssl_1.1.0
+.endif
+
+.if ${CHOSEN_COMPILER_TYPE} == clang
+MAKE_ENV+= runtime-bitcode=yes
+PLIST_SUB+= BITCODE=""
+.else
+PLIST_SUB+= BITCODE="@comment "
+.endif
+
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/pony/${DISTVERSION}/bin/ponyc
@@ -58,4 +76,4 @@ post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/lang/ponyc/distinfo b/lang/ponyc/distinfo
index 6e3191d3013f..571ca845d1cf 100644
--- a/lang/ponyc/distinfo
+++ b/lang/ponyc/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1533336886
-SHA256 (ponylang-ponyc-0.24.4_GH0.tar.gz) = 979e443fa27df7b65c3ac35db47fc0b130608f0745d4fa393c451734343c088d
-SIZE (ponylang-ponyc-0.24.4_GH0.tar.gz) = 1361094
+TIMESTAMP = 1539770206
+SHA256 (ponylang-ponyc-0.25.0_GH0.tar.gz) = 8420d84f178db325934d77dc407a7f98d6bd14b8cf8036e17b41f886f5820cb2
+SIZE (ponylang-ponyc-0.25.0_GH0.tar.gz) = 1378042
diff --git a/lang/ponyc/files/patch-Makefile b/lang/ponyc/files/patch-Makefile
index e939a241c7b0..e1d6e8d5e811 100644
--- a/lang/ponyc/files/patch-Makefile
+++ b/lang/ponyc/files/patch-Makefile
@@ -1,13 +1,11 @@
---- Makefile.orig 2018-05-27 18:29:53 UTC
+--- Makefile.orig 2018-10-17 10:11:59 UTC
+++ Makefile
-@@ -221,6 +221,10 @@ ifndef LLVM_CONFIG
- LLVM_CONFIG = llvm-config-3.9
- else ifneq (,$(shell which /usr/local/opt/llvm@3.9/bin/llvm-config 2> /dev/null))
- LLVM_CONFIG = /usr/local/opt/llvm@3.9/bin/llvm-config
-+ else ifneq (,$(shell which llvm-config50 2> /dev/null))
-+ LLVM_CONFIG = llvm-config50
-+ else ifneq (,$(shell which llvm-config40 2> /dev/null))
-+ LLVM_CONFIG = llvm-config40
- else ifneq (,$(shell which llvm-config39 2> /dev/null))
- LLVM_CONFIG = llvm-config39
- else ifneq (,$(shell which /usr/local/opt/llvm/bin/llvm-config 2> /dev/null))
+@@ -806,7 +806,7 @@ $($(1))/libponyrt.$(LIB_EXT): $(depends) $(ofiles)
+ $(SILENT)rm -f $(PONY_BUILD_DIR)/dtrace_probes.o
+ $(SILENT)$(DTRACE) -G -s $(PONY_SOURCE_DIR)/common/dtrace_probes.d -o $(PONY_BUILD_DIR)/dtrace_probes.o $(ofiles)
+ $(SILENT)$(AR) $(AR_FLAGS) $$@ $(ofiles) $(PONY_BUILD_DIR)/dtrace_probes.o
+- $(SILENT)$(AR) $(AR_FLAGS) $(PONY_BUILD_DIR)/libdtrace_probes.a $(PONY_BUILD_DIR)/dtrace_probes.o
++ $(SILENT)$(AR) $(AR_FLAGS) $(lib)/libdtrace_probes.a $(PONY_BUILD_DIR)/dtrace_probes.o
+ else
+ $(SILENT)$(AR) $(AR_FLAGS) $$@ $(ofiles)
+ endif
diff --git a/lang/ponyc/files/patch-src_libponyc_codegen_genexe.c b/lang/ponyc/files/patch-src_libponyc_codegen_genexe.c
new file mode 100644
index 000000000000..2dd9266dbac8
--- /dev/null
+++ b/lang/ponyc/files/patch-src_libponyc_codegen_genexe.c
@@ -0,0 +1,12 @@
+--- src/libponyc/codegen/genexe.c.orig 2018-10-13 12:30:06 UTC
++++ src/libponyc/codegen/genexe.c
+@@ -347,8 +347,7 @@ static bool link_exe(compile_t* c, ast_t* program,
+ "";
+ #endif
+ const char* lexecinfo =
+-#if (defined(PLATFORM_IS_LINUX) && !defined(__GLIBC__)) || \
+- (defined(PLATFORM_IS_BSD) && defined(DEBUG))
++#if (defined(PLATFORM_IS_LINUX) && !defined(__GLIBC__)) || defined(PLATFORM_IS_BSD)
+ "-lexecinfo";
+ #else
+ "";
diff --git a/lang/ponyc/files/patch-src_libponyc_codegen_host.cc b/lang/ponyc/files/patch-src_libponyc_codegen_host.cc
new file mode 100644
index 000000000000..7a34e833a61a
--- /dev/null
+++ b/lang/ponyc/files/patch-src_libponyc_codegen_host.cc
@@ -0,0 +1,17 @@
+--- src/libponyc/codegen/host.cc.orig 2018-10-17 11:42:19 UTC
++++ src/libponyc/codegen/host.cc
+@@ -56,7 +56,14 @@ char* LLVMGetHostCPUFeatures()
+ {
+ StringMap<bool> features;
+ bool got_features = sys::getHostCPUFeatures(features);
++#ifdef PLATFORM_IS_ARM
++ // LLVM might not have CPU features support on e.g. FreeBSD/aarch64
++ if (!got_features) {
++ features["neon"] = true;
++ }
++#else
+ pony_assert(got_features);
++#endif
+ (void)got_features;
+
+ // Calculate the size of buffer that will be needed to return all features.
diff --git a/lang/ponyc/pkg-plist b/lang/ponyc/pkg-plist
index 5e57b97b6aa0..5cce42657fed 100644
--- a/lang/ponyc/pkg-plist
+++ b/lang/ponyc/pkg-plist
@@ -6,15 +6,19 @@ lib/libponyrt.a
lib/pony/%%VERSION%%/bin/ponyc
lib/pony/%%VERSION%%/include/pony.h
lib/pony/%%VERSION%%/include/pony/detail/atomics.h
+%%DTRACE%%lib/pony/%%VERSION%%/lib/%%PONYARCH%%/libdtrace_probes.a
lib/pony/%%VERSION%%/lib/%%PONYARCH%%/libponyc.a
lib/pony/%%VERSION%%/lib/%%PONYARCH%%/libponyrt.a
+%%BITCODE%%lib/pony/%%VERSION%%/lib/%%PONYARCH%%/libponyrt.bc
lib/pony/%%VERSION%%/packages/assert/assert.pony
lib/pony/%%VERSION%%/packages/backpressure/auth.pony
lib/pony/%%VERSION%%/packages/backpressure/backpressure.pony
lib/pony/%%VERSION%%/packages/buffered/_test.pony
+lib/pony/%%VERSION%%/packages/buffered/benchmarks/main.pony
lib/pony/%%VERSION%%/packages/buffered/buffered.pony
lib/pony/%%VERSION%%/packages/buffered/reader.pony
lib/pony/%%VERSION%%/packages/buffered/writer.pony
+lib/pony/%%VERSION%%/packages/builtin/_partial_arithmetic.pony
lib/pony/%%VERSION%%/packages/builtin/_to_string.pony
lib/pony/%%VERSION%%/packages/builtin/ambient_auth.pony
lib/pony/%%VERSION%%/packages/builtin/any.pony
@@ -90,6 +94,7 @@ lib/pony/%%VERSION%%/packages/files/directory.pony
lib/pony/%%VERSION%%/packages/files/file.pony
lib/pony/%%VERSION%%/packages/files/file_caps.pony
lib/pony/%%VERSION%%/packages/files/file_info.pony
+lib/pony/%%VERSION%%/packages/files/file_lines.pony
lib/pony/%%VERSION%%/packages/files/file_mode.pony
lib/pony/%%VERSION%%/packages/files/file_path.pony
lib/pony/%%VERSION%%/packages/files/file_stream.pony