View | Details | Raw Unified | Return to bug 259998
Collapse All | Expand All

(-)b/lang/ponyc/Makefile (-1 / +1 lines)
Lines 1-94 Link Here
1
PORTNAME=	ponyc
1
PORTNAME=	ponyc
2
DISTVERSION=	0.33.2
2
DISTVERSION=	0.33.2
3
CATEGORIES=	lang
3
CATEGORIES=	lang
4
4
5
MAINTAINER=	greg@unrelenting.technology
5
MAINTAINER=	ports@FreeBSD.org
6
COMMENT=	Pony language compiler
6
COMMENT=	Pony language compiler
7
7
8
LICENSE=	BSD2CLAUSE
8
LICENSE=	BSD2CLAUSE
9
LICENSE_FILE=	${WRKSRC}/LICENSE
9
LICENSE_FILE=	${WRKSRC}/LICENSE
10
10
11
ONLY_FOR_ARCHS=		aarch64 amd64
11
ONLY_FOR_ARCHS=		aarch64 amd64
12
ONLY_FOR_ARCHS_REASON=	undefined reference to __atomic_compare_exchange_8
12
ONLY_FOR_ARCHS_REASON=	undefined reference to __atomic_compare_exchange_8
13
13
14
BUILD_DEPENDS=	llvm-link${LLVM_VERSION}:devel/llvm${LLVM_VERSION}
14
BUILD_DEPENDS=	llvm-link${LLVM_VERSION}:devel/llvm${LLVM_VERSION}
15
15
16
FLAVORS=	llvm_dynamic llvm_static
16
FLAVORS=	llvm_dynamic llvm_static
17
FLAVOR?=	${FLAVORS:[1]}
17
FLAVOR?=	${FLAVORS:[1]}
18
18
19
llvm_dynamic_RUN_DEPENDS=	llvm-link${LLVM_VERSION}:devel/llvm${LLVM_VERSION}
19
llvm_dynamic_RUN_DEPENDS=	llvm-link${LLVM_VERSION}:devel/llvm${LLVM_VERSION}
20
llvm_dynamic_CONFLICTS_INSTALL=	ponyc-static
20
llvm_dynamic_CONFLICTS_INSTALL=	ponyc-static
21
llvm_static_PKGNAMESUFFIX=	-static
21
llvm_static_PKGNAMESUFFIX=	-static
22
llvm_static_CONFLICTS_INSTALL=	ponyc
22
llvm_static_CONFLICTS_INSTALL=	ponyc
23
.if ${FLAVOR} == llvm_static
23
.if ${FLAVOR} == llvm_static
24
COMMENT+=			(statically linked with LLVM)
24
COMMENT+=			(statically linked with LLVM)
25
.endif
25
.endif
26
26
27
USES=		gmake ncurses compiler:c++11-lang
27
USES=		gmake ncurses compiler:c++11-lang
28
28
29
LLVM_VERSION?=	70
29
LLVM_VERSION?=	70
30
30
31
PLIST_SUB=	VERSION="${DISTVERSION}" PONYARCH="${PONYARCH}"
31
PLIST_SUB=	VERSION="${DISTVERSION}" PONYARCH="${PONYARCH}"
32
OPTIONS_SUB=	yes
32
OPTIONS_SUB=	yes
33
33
34
USE_GITHUB=	yes
34
USE_GITHUB=	yes
35
GH_ACCOUNT=	ponylang
35
GH_ACCOUNT=	ponylang
36
36
37
PORTDOCS=	*.md
37
PORTDOCS=	*.md
38
38
39
MAKE_ENV=	config=release verbose=true default_pic=true \
39
MAKE_ENV=	config=release verbose=true default_pic=true \
40
		prefix=${PREFIX} arch=${PONYARCH} \
40
		prefix=${PREFIX} arch=${PONYARCH} \
41
		LLVM_CONFIG=llvm-config${LLVM_VERSION}
41
		LLVM_CONFIG=llvm-config${LLVM_VERSION}
42
.if ${FLAVOR} == llvm_dynamic
42
.if ${FLAVOR} == llvm_dynamic
43
MAKE_ENV+=	link=llvm-dynamic
43
MAKE_ENV+=	link=llvm-dynamic
44
.else
44
.else
45
MAKE_ENV+=	link=llvm-static
45
MAKE_ENV+=	link=llvm-static
46
.endif
46
.endif
47
47
48
OPTIONS_DEFINE=			DOCS DTRACE EXAMPLES
48
OPTIONS_DEFINE=			DOCS DTRACE EXAMPLES
49
OPTIONS_EXCLUDE_aarch64=	DTRACE
49
OPTIONS_EXCLUDE_aarch64=	DTRACE
50
# Not enabling DTrace by default yet because it breaks --runtimebc ("super LTO"):
50
# Not enabling DTrace by default yet because it breaks --runtimebc ("super LTO"):
51
# https://github.com/ponylang/ponyc/issues/2915
51
# https://github.com/ponylang/ponyc/issues/2915
52
52
53
DTRACE_MAKE_ENV=		use=dtrace
53
DTRACE_MAKE_ENV=		use=dtrace
54
54
55
.include <bsd.port.pre.mk>
55
.include <bsd.port.pre.mk>
56
56
57
# Pony defaults to 'native', which
57
# Pony defaults to 'native', which
58
# a) doesn't work on aarch64
58
# a) doesn't work on aarch64
59
# b) is not appropriate for official OS packages
59
# b) is not appropriate for official OS packages
60
.if "${ARCH}" == aarch64
60
.if "${ARCH}" == aarch64
61
PONYARCH?=	armv8-a
61
PONYARCH?=	armv8-a
62
.elif "${ARCH}" == amd64
62
.elif "${ARCH}" == amd64
63
# Can't use 'x86-64' because atomics are required
63
# Can't use 'x86-64' because atomics are required
64
PONYARCH?=	core2
64
PONYARCH?=	core2
65
.endif
65
.endif
66
66
67
# keep in sync with all platforms where libunwind is available
67
# keep in sync with all platforms where libunwind is available
68
.if (${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == aarch64)
68
.if (${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == aarch64)
69
LIB_DEPENDS+=	libunwind.so:devel/libunwind
69
LIB_DEPENDS+=	libunwind.so:devel/libunwind
70
.endif
70
.endif
71
71
72
.if ${CHOSEN_COMPILER_TYPE} == clang
72
.if ${CHOSEN_COMPILER_TYPE} == clang
73
# Building the bitcode with clangX and linking with llvmY often fails,
73
# Building the bitcode with clangX and linking with llvmY often fails,
74
# so let's use the clang from the LLVM version that will be used by ponyc
74
# so let's use the clang from the LLVM version that will be used by ponyc
75
CC=		${LOCALBASE}/bin/clang${LLVM_VERSION}
75
CC=		${LOCALBASE}/bin/clang${LLVM_VERSION}
76
CXX=		${LOCALBASE}/bin/clang++${LLVM_VERSION}
76
CXX=		${LOCALBASE}/bin/clang++${LLVM_VERSION}
77
MAKE_ENV+=	runtime-bitcode=yes
77
MAKE_ENV+=	runtime-bitcode=yes
78
PLIST_SUB+=	BITCODE=""
78
PLIST_SUB+=	BITCODE=""
79
.else
79
.else
80
PLIST_SUB+=	BITCODE="@comment "
80
PLIST_SUB+=	BITCODE="@comment "
81
.endif
81
.endif
82
82
83
post-install:
83
post-install:
84
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/pony/${DISTVERSION}/bin/ponyc
84
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/pony/${DISTVERSION}/bin/ponyc
85
85
86
post-install-DOCS-on:
86
post-install-DOCS-on:
87
	${MKDIR} ${STAGEDIR}${DOCSDIR}
87
	${MKDIR} ${STAGEDIR}${DOCSDIR}
88
	${INSTALL_DATA} ${WRKSRC}/*.md ${STAGEDIR}${DOCSDIR}
88
	${INSTALL_DATA} ${WRKSRC}/*.md ${STAGEDIR}${DOCSDIR}
89
89
90
post-install-EXAMPLES-on:
90
post-install-EXAMPLES-on:
91
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
91
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
92
	@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
92
	@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
93
93
94
.include <bsd.port.post.mk>
94
.include <bsd.port.post.mk>
(-)b/lang/ponyc/files/patch-Makefile-ponyc (-3 / +9 lines)
Lines 1-13 Link Here
1
Avoid hardcoding /usr/local/bin/clang70 as fallback linker
1
Avoid hardcoding /usr/local/bin/clang70 as fallback linker
2
2
3
--- Makefile-ponyc.orig	2019-11-02 05:19:12 UTC
3
--- Makefile-ponyc.orig	2020-02-03 03:34:35 UTC
4
+++ Makefile-ponyc
4
+++ Makefile-ponyc
5
@@ -130,7 +130,7 @@ LINKER_FLAGS = -march=$(arch) -mtune=$(tune) $(LDFLAGS
5
@@ -146,13 +146,13 @@ else
6
 endif
7
 
8
 LIB_EXT ?= a
9
-BUILD_FLAGS = -march=$(arch) -mtune=$(tune) -Werror -Wconversion \
10
+BUILD_FLAGS = -march=$(arch) -mtune=$(tune) -Wconversion \
11
   -Wno-sign-conversion -Wextra -Wall
12
 LINKER_FLAGS = -march=$(arch) -mtune=$(tune) $(LDFLAGS)
6
 AR_FLAGS ?= rcs
13
 AR_FLAGS ?= rcs
7
 ALL_CFLAGS = -std=gnu11 -fexceptions \
14
 ALL_CFLAGS = -std=gnu11 -fexceptions \
8
   -DPONY_VERSION=\"$(tag)\" -DLLVM_VERSION=\"$(llvm_version)\" \
15
   -DPONY_VERSION=\"$(tag)\" -DLLVM_VERSION=\"$(llvm_version)\" \
9
-  -DPONY_COMPILER=\"$(CC)\" -DPONY_ARCH=\"$(arch)\" \
16
-  -DPONY_COMPILER=\"$(CC)\" -DPONY_ARCH=\"$(arch)\" \
10
+  -DPONY_COMPILER=\"/usr/bin/cc\" -DPONY_ARCH=\"$(arch)\" \
17
+  -DPONY_COMPILER=\"/usr/bin/cc\" -DPONY_ARCH=\"$(arch)\" \
11
   -DBUILD_COMPILER=\"$(compiler_version)\" \
18
   -DBUILD_COMPILER=\"$(compiler_version)\" \
12
   -DPONY_BUILD_CONFIG=\"$(config)\" \
19
   -DPONY_BUILD_CONFIG=\"$(config)\" \
13
   -DPONY_VERSION_STR=\"$(version_str)\" \
20
   -DPONY_VERSION_STR=\"$(version_str)\" \
14
- 

Return to bug 259998