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

(-)lang/Makefile (-4 lines)
Lines 65-74 Link Here
65
    SUBDIR += erlang-doc
65
    SUBDIR += erlang-doc
66
    SUBDIR += erlang-java
66
    SUBDIR += erlang-java
67
    SUBDIR += erlang-riak
67
    SUBDIR += erlang-riak
68
    SUBDIR += erlang-runtime15
69
    SUBDIR += erlang-runtime16
70
    SUBDIR += erlang-runtime17
71
    SUBDIR += erlang-runtime18
72
    SUBDIR += erlang-runtime19
68
    SUBDIR += erlang-runtime19
73
    SUBDIR += erlang-runtime20
69
    SUBDIR += erlang-runtime20
74
    SUBDIR += erlang-runtime21
70
    SUBDIR += erlang-runtime21
(-)lang/erlang-runtime15/Makefile (-128 lines)
Removed Link Here
1
# Created by: ruslan@shevchenko.kiev.ua
2
# $FreeBSD$
3
4
PORTNAME=	erlang
5
PORTVERSION=	15.b.03.1
6
PORTREVISION=	13
7
CATEGORIES=	lang parallel java
8
MASTER_SITES=	http://www.erlang.org/download/:erlangorg			\
9
		http://erlang.stacken.kth.se/download/:erlangorg		\
10
		http://www.csd.uu.se/ftp/mirror/erlang/download/:erlangorg	\
11
		http://olgeni.olgeni.com/~olgeni/distfiles/:local		\
12
		LOCAL/olgeni:local
13
PKGNAMESUFFIX=	-runtime15
14
DISTNAME=	otp_src_${ERLANG_REL}
15
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:erlangorg
16
DIST_SUBDIR=	erlang
17
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
18
19
MAINTAINER=	erlang@FreeBSD.org
20
COMMENT=	Functional programming language from Ericsson
21
22
WRKSRC=		${WRKDIR}/otp_src_R15B03
23
24
ERLANG_LIB=	${PORTNAME}${PORTVERSION:C/\..*//}
25
ERLANG_REL=	R${PORTVERSION:S/.//g:tu:S/1$/-1/}
26
27
SUB_FILES=	pkg-message
28
SUB_LIST=	ERLANG_LIB=${ERLANG_LIB}
29
30
MAKE_JOBS_UNSAFE=yes
31
32
OPTIONS_DEFINE=	DTRACE GS HIPE JAVA KQUEUE ODBC OPENSSL SCTP SMP THREADS WX
33
OPTIONS_DEFAULT=KQUEUE OPENSSL SCTP SMP THREADS
34
35
GS_DESC=	Enable GS application (deprecated)
36
HIPE_DESC=	Build native HiPE compiler
37
KQUEUE_DESC=	Enable Kernel Poll (kqueue) support
38
SCTP_DESC=	Enable SCTP support
39
SMP_DESC=	Enable SMP support
40
WX_DESC=	Enable WX application
41
42
.if !exists(/usr/sbin/dtrace)
43
OPTIONS_EXCLUDE+=	DTRACE
44
.endif
45
46
OPTIONS_EXCLUDE_DragonFly=	HIPE SCTP
47
48
OPENSSL_VARS=	BROKEN_SSL=openssl111
49
50
GNU_CONFIGURE=	yes
51
LDFLAGS+=	-L${LOCALBASE}/lib
52
USES=		gmake ncurses perl5
53
USE_PERL5=	build
54
55
# If you run Erlang and get a message resembling "WARNING: number of
56
# probes fixed does not match the number of defined probes (54 != 132,
57
# respectively)" you probably misconfigured DTrace in some way.
58
59
DTRACE_CFLAGS=		-fno-omit-frame-pointer
60
DTRACE_CONFIGURE_WITH=	dynamic-trace=dtrace
61
DTRACE_VARS=		STRIP=""
62
GS_USES=		tk:run
63
HIPE_CONFIGURE_ENABLE=	hipe
64
JAVA_CONFIGURE_ENV=	ac_cv_prog_JAVAC="${JAVAC}"
65
JAVA_CONFIGURE_WITH=	javac
66
JAVA_VARS=		USE_JAVA=yes
67
KQUEUE_CONFIGURE_ENABLE=kernel-poll
68
ODBC_CONFIGURE_WITH=	odbc
69
ODBC_LIB_DEPENDS=	libodbc.so:databases/unixODBC
70
OPENSSL_CONFIGURE_WITH=	ssl=${OPENSSLBASE}
71
OPENSSL_USES=		ssl
72
SCTP_CONFIGURE_ENABLE=	sctp
73
SMP_CONFIGURE_ENABLE=	smp-support
74
THREADS_CONFIGURE_ENABLE=	threads
75
WX_CONFIGURE_WITH=	wx-config=${WX_CONFIG}
76
WX_VARS=		USE_WX=2.8+ WX_COMPS="wx contrib" USE_GL="gl glu"
77
78
.include <bsd.port.options.mk>
79
80
.include <bsd.port.pre.mk>
81
82
.if ${OPSYS} == FreeBSD
83
.  if ${OSVERSION} >= 1200085 && ${SSL_DEFAULT} == base
84
BROKEN=	Does not support OpenSSL 1.1, use Erlang 19+
85
.  endif
86
.endif
87
88
.if ${OPSYS} == FreeBSD
89
CFLAGS+=	-DMAP_NORESERVE=0
90
.endif
91
92
.if ${ARCH} == i386
93
MAKE_ARGS+=	ARCH=x86
94
.endif
95
96
.if ${ARCH} == armv6 || ${ARCH} == armv7
97
MAKE_ARGS+=	ARCH=arm
98
.endif
99
100
pre-configure-MX-off:
101
	echo "disabled by port options" > ${WRKSRC}/lib/wx/SKIP
102
103
post-configure-ODBC-on:
104
	${RM} ${WRKSRC}/lib/odbc/SKIP
105
106
post-install-GS-off:
107
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/gs-*
108
109
post-install-JAVA-off:
110
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/jinterface-*
111
112
post-install-ODBC-off:
113
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/odbc-*
114
115
post-install-OPENSSL-off:
116
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/crypto-*
117
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssh-*
118
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssl-*
119
120
post-install-WX-off:
121
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/wx-*
122
123
post-stage:
124
	${FIND} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/* -type d -empty -delete
125
	@cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
126
		| ${SORT} >> ${TMPPLIST}
127
128
.include <bsd.port.post.mk>
(-)lang/erlang-runtime15/distinfo (-3 lines)
Removed Link Here
1
TIMESTAMP = 1523228884
2
SHA256 (erlang/otp_src_R15B03-1.tar.gz) = 4bccac86dd76aec050252e44276a0283a0df9218e6470cf042a9b9f9dfc9476c
3
SIZE (erlang/otp_src_R15B03-1.tar.gz) = 76123810
(-)lang/erlang-runtime15/files/patch-Makefile.in (-20 lines)
Removed Link Here
1
--- Makefile.in.orig
2
+++ Makefile.in
3
@@ -56,7 +56,7 @@
4
 libdir		= @libdir@
5
 
6
 # Where Erlang/OTP is located
7
-libdir_suffix	= /erlang
8
+libdir_suffix	= /erlang15
9
 erlang_libdir	= $(libdir)$(libdir_suffix)
10
 erlang_bindir	= $(erlang_libdir)/bin
11
 
12
@@ -913,7 +913,7 @@
13
 #
14
 # Order is important here, don't change it!
15
 #
16
-INST_DEP += install.dirs install.emulator install.libs install.Install install.bin
17
+INST_DEP += install.dirs install.emulator install.libs install.Install
18
 
19
 install: $(INST_DEP)
20
 
(-)lang/erlang-runtime15/files/patch-erts-emulator-Makefile.in (-11 lines)
Removed Link Here
1
--- erts/emulator/Makefile.in.orig
2
+++ erts/emulator/Makefile.in
3
@@ -544,7 +546,7 @@
4
 endif
5
 
6
 $(OBJDIR)/%.o: beam/%.c
7
-	$(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
8
+	$(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
9
 
10
 else
11
 
(-)lang/erlang-runtime15/files/patch-erts_emulator_drivers_common_efile__drv.c (-341 lines)
Removed Link Here
1
--- erts/emulator/drivers/common/efile_drv.c.orig
2
+++ erts/emulator/drivers/common/efile_drv.c
3
@@ -311,6 +311,18 @@
4
     unsigned        flags;    /* Original flags from FILE_OPEN. */
5
     void          (*invoke)(void *);
6
     struct t_data  *d;
7
+    /*
8
+     * If an operation against a compressed file is being executed
9
+     * by an async thread, ensure the stop callback doesn't close
10
+     * the fd (gzFile) while the async thread doesn't finish using
11
+     * the fd (gzFile) - otherwise it accesses a dangling pointer.
12
+     * The following comp_op_* variables are used to coordinate the
13
+     * driver stop callback with the ongoing async operation.
14
+     */
15
+    int             comp_op_in_progress;
16
+    volatile int    comp_op_done;
17
+    erts_mtx_t      comp_op_mtx;
18
+    erts_cnd_t      comp_op_cnd;
19
     void          (*free)(void *);
20
     struct t_data  *cq_head;  /* Queue of incoming commands */
21
     struct t_data  *cq_tail;  /* -""- */
22
@@ -426,6 +438,9 @@
23
     struct t_data *next;
24
     int            command;
25
     int            level;
26
+    int volatile  *comp_op_done;
27
+    erts_mtx_t    *comp_op_mtx;
28
+    erts_cnd_t    *comp_op_cnd;
29
     void         (*invoke)(void *);
30
     void         (*free)(void *);
31
     int            again;
32
@@ -714,6 +729,14 @@
33
     return d;
34
 }
35
 
36
+static void signal_comp_op_done(struct t_data *d) {
37
+    if (d->comp_op_done != NULL) {
38
+        erts_mtx_lock(d->comp_op_mtx);
39
+        *(d->comp_op_done) = 1;
40
+        erts_cnd_signal(d->comp_op_cnd);
41
+        erts_mtx_unlock(d->comp_op_mtx);
42
+    }
43
+}
44
 
45
 /*********************************************************************
46
  * Driver entry point -> init
47
@@ -757,6 +780,8 @@
48
     desc->key = (unsigned int) (UWord) port;
49
     desc->flags = 0;
50
     desc->invoke = NULL;
51
+    desc->comp_op_in_progress = 0;
52
+    desc->comp_op_done = 0;
53
     desc->d = NULL;
54
     desc->free = NULL;
55
     desc->cq_head = NULL;
56
@@ -800,6 +825,7 @@
57
     DTRACE_INVOKE_SETUP(FILE_CLOSE);
58
     d->again = 0;
59
     do_close(d->flags, d->fd);
60
+    signal_comp_op_done(d);
61
     DTRACE_INVOKE_RETURN(FILE_CLOSE);
62
 }
63
 
64
@@ -814,9 +840,20 @@
65
     TRACE_C('p');
66
 
67
     if (desc->fd != FILE_FD_INVALID) {
68
+	if (desc->comp_op_in_progress) {
69
+	    erts_mtx_lock(&desc->comp_op_mtx);
70
+	    while (!desc->comp_op_done) {
71
+		erts_cnd_wait(&desc->comp_op_cnd, &desc->comp_op_mtx);
72
+	    }
73
+	    erts_mtx_unlock(&desc->comp_op_mtx);
74
+	}
75
 	do_close(desc->flags, desc->fd);
76
 	desc->fd = FILE_FD_INVALID;
77
 	desc->flags = 0;
78
+	if (sys_info.async_threads > 0 && (desc->flags & EFILE_COMPRESSED)) {
79
+	    erts_cnd_destroy(&desc->comp_op_cnd);
80
+	    erts_mtx_destroy(&desc->comp_op_mtx);
81
+	}
82
     }
83
     if (desc->read_binp) {
84
 	driver_free_binary(desc->read_binp);
85
@@ -1032,6 +1069,7 @@
86
 {
87
     DTRACE_INVOKE_SETUP_BY_NAME(FILE_MKDIR);
88
     invoke_name(data, efile_mkdir);
89
+    signal_comp_op_done((struct t_data *) data);
90
     DTRACE_INVOKE_RETURN(FILE_MKDIR);
91
 }
92
 
93
@@ -1039,6 +1077,7 @@
94
 {
95
     DTRACE_INVOKE_SETUP_BY_NAME(FILE_RMDIR);
96
     invoke_name(data, efile_rmdir);
97
+    signal_comp_op_done((struct t_data *) data);
98
     DTRACE_INVOKE_RETURN(FILE_RMDIR);
99
 }
100
 
101
@@ -1046,6 +1085,7 @@
102
 {
103
     DTRACE_INVOKE_SETUP_BY_NAME(FILE_DELETE);
104
     invoke_name(data, efile_delete_file);
105
+    signal_comp_op_done((struct t_data *) data);
106
     DTRACE_INVOKE_RETURN(FILE_DELETE);
107
 }
108
 
109
@@ -1053,6 +1093,7 @@
110
 {
111
     DTRACE_INVOKE_SETUP_BY_NAME(FILE_CHDIR);
112
     invoke_name(data, efile_chdir);
113
+    signal_comp_op_done((struct t_data *) data);
114
     DTRACE_INVOKE_RETURN(FILE_CHDIR);
115
 }
116
 
117
@@ -1064,6 +1105,7 @@
118
 
119
     d->again = 0;
120
     d->result_ok = efile_fdatasync(&d->errInfo, fd);
121
+    signal_comp_op_done(d);
122
     DTRACE_INVOKE_RETURN(FILE_FDATASYNC);
123
 }
124
 
125
@@ -1075,6 +1117,7 @@
126
 
127
     d->again = 0;
128
     d->result_ok = efile_fsync(&d->errInfo, fd);
129
+    signal_comp_op_done(d);
130
     DTRACE_INVOKE_RETURN(FILE_FSYNC);
131
 }
132
 
133
@@ -1086,6 +1129,7 @@
134
 
135
     d->again = 0;
136
     d->result_ok = efile_truncate_file(&d->errInfo, &fd, d->flags);
137
+    signal_comp_op_done(d);
138
     DTRACE_INVOKE_RETURN(FILE_TRUNCATE);
139
 }
140
 
141
@@ -1129,6 +1173,7 @@
142
     } else {
143
 	d->again = 0;
144
     }
145
+    signal_comp_op_done(d);
146
     DTRACE_INVOKE_RETURN(FILE_READ);
147
 }
148
 
149
@@ -1238,6 +1283,7 @@
150
 	    break;
151
 	}
152
     } while (local_loop);
153
+    signal_comp_op_done(d);
154
     DTRACE_INVOKE_RETURN(FILE_READ_LINE);
155
 }
156
 
157
@@ -1298,6 +1344,7 @@
158
  done:
159
     d->again = 0;
160
  chop_done:
161
+    signal_comp_op_done(d);
162
     DTRACE_INVOKE_RETURN(FILE_READ_FILE);
163
 }
164
 
165
@@ -1363,6 +1410,7 @@
166
     }					
167
     d->again = 0;
168
  done:
169
+    signal_comp_op_done(d);
170
     DTRACE_INVOKE_RETURN(FILE_PREADV);
171
 }
172
 
173
@@ -1434,6 +1482,7 @@
174
  done:
175
     d->result_ok = !0;
176
     d->again = 0;
177
+    signal_comp_op_done(d);
178
     DTRACE_INVOKE_RETURN(FILE_IPREAD);
179
 }
180
 
181
@@ -1531,6 +1580,7 @@
182
 	TRACE_F(("w%lu", (unsigned long)size));
183
 
184
     }
185
+    signal_comp_op_done(d);
186
     DTRACE_INVOKE_RETURN(FILE_WRITE);
187
 }
188
 
189
@@ -1550,6 +1600,7 @@
190
     d->again = 0;
191
     d->result_ok = efile_getdcwd(&d->errInfo,d->drive, d->b+1,
192
 				 RESBUFSIZE-1);
193
+    signal_comp_op_done(d);
194
     DTRACE_INVOKE_RETURN(FILE_PWD);
195
 }
196
 
197
@@ -1564,6 +1615,7 @@
198
 				  RESBUFSIZE-1);
199
     if (d->result_ok != 0)
200
 	FILENAME_COPY((char *) d->b + 1, resbuf+1);
201
+    signal_comp_op_done(d);
202
     DTRACE_INVOKE_RETURN(FILE_READLINK);
203
 }
204
 
205
@@ -1578,6 +1630,7 @@
206
 				  RESBUFSIZE-1);
207
     if (d->result_ok != 0)
208
 	FILENAME_COPY((char *) d->b + 1, resbuf+1);
209
+    signal_comp_op_done(d);
210
     DTRACE_INVOKE_RETURN(FILE_ALTNAME);
211
 }
212
 
213
@@ -1670,6 +1723,7 @@
214
 	}
215
     }
216
  done:
217
+    signal_comp_op_done(d);
218
     EF_FREE(iov); /* Free our copy of the vector, nothing to restore */
219
     DTRACE_INVOKE_RETURN(FILE_PWRITEV);
220
 }
221
@@ -1695,6 +1749,7 @@
222
     DTRACE3(efile_drv_int_entry, d->sched_i1, d->sched_i2,
223
             d->command == FILE_LSTAT ? FILE_LSTAT : FILE_FSTAT);
224
     gcc_optimizer_hack++;
225
+    signal_comp_op_done(d);
226
 }
227
 
228
 static void invoke_link(void *data)
229
@@ -1707,6 +1762,7 @@
230
     d->again = 0;
231
     new_name = name+FILENAME_BYTELEN(name)+FILENAME_CHARSIZE;
232
     d->result_ok = efile_link(&d->errInfo, name, new_name);
233
+    signal_comp_op_done(d);
234
     DTRACE_INVOKE_RETURN(FILE_LINK);
235
 }
236
 
237
@@ -1720,6 +1776,7 @@
238
     d->again = 0;
239
     new_name = name+FILENAME_BYTELEN(name)+FILENAME_CHARSIZE;
240
     d->result_ok = efile_symlink(&d->errInfo, name, new_name);
241
+    signal_comp_op_done(d);
242
     DTRACE_INVOKE_RETURN(FILE_SYMLINK);
243
 }
244
 
245
@@ -1733,6 +1790,7 @@
246
     d->again = 0;
247
     new_name = name+FILENAME_BYTELEN(name)+FILENAME_CHARSIZE;
248
     d->result_ok = efile_rename(&d->errInfo, name, new_name);
249
+    signal_comp_op_done(d);
250
     DTRACE_INVOKE_RETURN(FILE_RENAME);
251
 }
252
 
253
@@ -1743,6 +1801,7 @@
254
 
255
     d->again = 0;
256
     d->result_ok = efile_write_info(&d->errInfo, &d->info, d->b);
257
+    signal_comp_op_done(d);
258
     DTRACE_INVOKE_RETURN(FILE_WRITE_INFO);
259
 }
260
 
261
@@ -1775,6 +1834,7 @@
262
 			    &d->c.lseek.location);
263
     }
264
     d->result_ok = status;
265
+    signal_comp_op_done(d);
266
     DTRACE_INVOKE_RETURN(FILE_LSEEK);
267
 }
268
 
269
@@ -1822,6 +1882,7 @@
270
     } while(res);
271
 
272
     d->result_ok = (d->errInfo.posix_errno == 0);
273
+    signal_comp_op_done(d);
274
     DTRACE_INVOKE_RETURN(FILE_READDIR);
275
 }
276
 
277
@@ -1876,6 +1937,7 @@
278
 
279
     d->again = 0;
280
     d->result_ok = efile_fadvise(&d->errInfo, fd, offset, length, advise);
281
+    signal_comp_op_done(d);
282
     DTRACE_INVOKE_RETURN(FILE_FADVISE);
283
 }
284
 
285
@@ -1901,11 +1963,14 @@
286
 	d->result_ok = 1;
287
 	if (d->c.sendfile.nbytes != 0)
288
 	  d->c.sendfile.nbytes -= nbytes;
289
+      } else if (nbytes == 0 && d->c.sendfile.nbytes == 0) {
290
+	d->result_ok = 1;
291
       } else
292
 	d->result_ok = 0;
293
     } else {
294
 	d->result_ok = -1;
295
     }
296
+    signal_comp_op_done(d);
297
 }
298
 
299
 static void free_sendfile(void *data) {
300
@@ -2023,6 +2088,21 @@
301
 	return;
302
     TRACE_F(("x%i", (int) d->command));
303
     d->again = sys_info.async_threads == 0;
304
+
305
+    if ((desc->flags & EFILE_COMPRESSED) && (sys_info.async_threads > 0) &&
306
+        (desc->fd != FILE_FD_INVALID)) {
307
+
308
+	desc->comp_op_in_progress = 1;
309
+	desc->comp_op_done = 0;
310
+	d->comp_op_done = &desc->comp_op_done;
311
+	d->comp_op_mtx = &desc->comp_op_mtx;
312
+	d->comp_op_cnd = &desc->comp_op_cnd;
313
+    } else {
314
+	d->comp_op_done = NULL;
315
+	d->comp_op_mtx = NULL;
316
+	d->comp_op_cnd = NULL;
317
+    }
318
+
319
     DRIVER_ASYNC(d->level, desc, d->invoke, void_ptr=d, d->free);
320
 }
321
 
322
@@ -2247,6 +2327,8 @@
323
 	return;
324
     }
325
 
326
+    desc->comp_op_in_progress = 0;
327
+
328
     switch (d->command)
329
     {
330
     case FILE_READ:
331
@@ -2375,6 +2457,10 @@
332
 	} else {
333
 	    desc->fd = d->fd;
334
 	    desc->flags = d->flags;
335
+	    if (sys_info.async_threads > 0 && (desc->flags & EFILE_COMPRESSED)) {
336
+		erts_mtx_init(&desc->comp_op_mtx, "efile_drv comp op mutex");
337
+		erts_cnd_init(&desc->comp_op_cnd);
338
+	    }
339
 	    reply_Uint(desc, d->fd);
340
 	}
341
 	free_data(data);
(-)lang/erlang-runtime15/files/patch-erts_emulator_utils_beam__makeops (-11 lines)
Removed Link Here
1
--- erts/emulator/utils/beam_makeops.orig	2015-04-12 21:52:03 UTC
2
+++ erts/emulator/utils/beam_makeops
3
@@ -1711,7 +1711,7 @@ sub tr_gen_to {
4
 
5
     my $prev_last;
6
     $prev_last = pop(@{$gen_transform{$key}})
7
-	if defined @{$gen_transform{$key}}; # Fail
8
+	if defined($gen_transform{$key}) && @{$gen_transform{$key}}; # Fail
9
 
10
     if ($prev_last && !is_instr($prev_last, 'fail')) {
11
 	error("Line $line: A previous transformation shadows '$orig_transform'");
(-)lang/erlang-runtime15/files/patch-erts_etc_unix_run__erl.c (-12 lines)
Removed Link Here
1
--- erts/etc/unix/run_erl.c.orig
2
+++ erts/etc/unix/run_erl.c
3
@@ -69,9 +69,6 @@
4
 #ifdef HAVE_UTMP_H
5
 #  include <utmp.h>
6
 #endif
7
-#ifdef HAVE_UTIL_H
8
-#  include <util.h>
9
-#endif
10
 #ifdef HAVE_SYS_IOCTL_H
11
 #  include <sys/ioctl.h>
12
 #endif
(-)lang/erlang-runtime15/files/patch-lib_erl__interface_src_connect_ei__resolve.c (-12 lines)
Removed Link Here
1
--- lib/erl_interface/src/connect/ei_resolve.c.orig
2
+++ lib/erl_interface/src/connect/ei_resolve.c
3
@@ -621,7 +621,8 @@
4
 
5
   return result;
6
 #else
7
-  return gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
8
+  struct hostent *dummy;
9
+  return gethostbyname_r(name,hostp,buffer,buflen,&dummy,h_errnop);
10
 #endif
11
 #endif
12
 #endif
(-)lang/erlang-runtime15/files/patch-lib_et_src_et__gs__contents__viewer.erl (-10 lines)
Removed Link Here
1
--- lib/et/src/et_gs_contents_viewer.erl.orig	2010-03-11 16:24:41.000000000 +0800
2
+++ lib/et/src/et_gs_contents_viewer.erl	2010-03-11 16:24:53.000000000 +0800
3
@@ -347,7 +347,6 @@ handle_info({gs, _Obj, keypress, _, [Key
4
         'Caps_Lock' ->
5
             {noreply, S};
6
         _ ->
7
-            io:format("~p: ignored: ~p~n", [?MODULE, KeySym]),
8
             {noreply, S}
9
     end;
10
 handle_info({gs, _Obj, configure, [], [W, H | _]}, S) ->
(-)lang/erlang-runtime15/files/patch-lib_et_src_et__gs__viewer.erl (-12 lines)
Removed Link Here
1
--- lib/et/src/et_gs_viewer.erl.orig	2010-03-11 16:26:59.000000000 +0800
2
+++ lib/et/src/et_gs_viewer.erl	2010-03-11 16:27:16.000000000 +0800
3
@@ -855,8 +855,7 @@ close_all_others(S) ->
4
     noreply(S).
5
 
6
 click_error(Click, S) ->
7
-    gs:config(S#state.canvas, beep),
8
-    io:format("~p: ignored: ~p~n", [?MODULE, Click]).
9
+    gs:config(S#state.canvas, beep).
10
 
11
 %%%----------------------------------------------------------------------
12
 %%% Clone viewer
(-)lang/erlang-runtime15/files/patch-lib_gs_src_tool__utils.erl (-84 lines)
Removed Link Here
1
--- lib/gs/src/tool_utils.erl.orig
2
+++ lib/gs/src/tool_utils.erl
3
@@ -27,6 +27,9 @@
4
 -export([file_dialog/1]).
5
 -export([notify/2, confirm/2, confirm_yesno/2, request/2]).
6
 
7
+%% Browser executable list (openURL command line protocol required)
8
+-define(BROWSERS, ["netscape", "mozilla", "MozillaFirebird", "opera", "firefox", "seamonkey"]).
9
+
10
 %%----------------------------------------------------------------------
11
 %% open_help(GS, File)
12
 %%   GS = gsobj()  (GS root object returned by gs:start/0,1)
13
@@ -67,7 +70,7 @@
14
 		      {unix,Type} ->
15
                           case Type of
16
                                darwin -> "open " ++ File;
17
-                               _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
18
+                               _Else -> unix_url_command("file:" ++ File)
19
 			  end;
20
 		      {win32,_AnyType} ->
21
 			  "start " ++ filename:nativename(File);
22
@@ -82,7 +85,7 @@
23
 		      {unix,Type} ->
24
                           case Type of
25
                                darwin -> "open " ++ File;
26
-                               _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
27
+                               _Else -> unix_url_command("file:" ++ File)
28
 			  end;
29
 		      {win32,_AnyType} ->
30
 			  "netscape.exe -h " ++ regexp:gsub(File,"\\\\","/");
31
@@ -342,3 +345,53 @@
32
     [Last];
33
 insert_newlines(Other) ->
34
     Other.
35
+
36
+%% find_browser(BrowserList) => string() | false
37
+%%   BrowserList - [string()]
38
+%% Given a list of basenames, find the first available executable.
39
+
40
+find_browser([]) ->
41
+    false;
42
+
43
+find_browser([H | T]) ->
44
+    case os:find_executable(H) of
45
+        false ->
46
+          find_browser(T);
47
+        Browser ->
48
+          Browser
49
+    end.
50
+
51
+%% unix_url_command(URL) => string()
52
+%%   URL - string()
53
+%% Open an URL, using a browser which supports the openURL command
54
+%% line protocol. If no browser is found, the empty string will be
55
+%% returned.
56
+
57
+unix_url_command(URL) ->
58
+    Template = "BROWSER -remote \"openURL(" ++ URL ++ ")\" || BROWSER " ++ URL ++ "&",
59
+
60
+    case os:getenv("BROWSER") of
61
+	false ->
62
+	    %% look for a compatible browser
63
+	    case find_browser(?BROWSERS) of
64
+		false ->
65
+		    "";
66
+		Browser ->
67
+		    case regexp:gsub(Template, "BROWSER", Browser) of
68
+			{ok, Command, 0} ->
69
+			    %% Template does not contain "BROWSER" placeholder
70
+			    "";
71
+			{ok, Command, _} ->
72
+			    Command
73
+		    end
74
+	    end;
75
+
76
+	Value ->
77
+	    case regexp:gsub(Template, "BROWSER", Value) of
78
+		{ok, Command2, 0} ->
79
+		    %% no placeholder
80
+		    "";
81
+		{ok, Command2, _} ->
82
+		    Command2
83
+	    end
84
+    end.
(-)lang/erlang-runtime15/files/patch-lib_kernel_test_file__SUITE.erl (-80 lines)
Removed Link Here
1
--- lib/kernel/test/file_SUITE.erl.orig
2
+++ lib/kernel/test/file_SUITE.erl
3
@@ -60,7 +60,8 @@
4
 -export([ read_not_really_compressed/1,
5
 	 read_compressed_cooked/1, read_compressed_cooked_binary/1,
6
 	 read_cooked_tar_problem/1,
7
-	 write_compressed/1, compress_errors/1, catenated_gzips/1]).
8
+	 write_compressed/1, compress_errors/1, catenated_gzips/1,
9
+	 compress_async_crash/1]).
10
 
11
 -export([ make_link/1, read_link_info_for_non_link/1, symlinks/1]).
12
 
13
@@ -133,7 +134,8 @@
14
      {compression, [],
15
       [read_compressed_cooked, read_compressed_cooked_binary,
16
        read_cooked_tar_problem, read_not_really_compressed,
17
-       write_compressed, compress_errors, catenated_gzips]},
18
+       write_compressed, compress_errors, catenated_gzips,
19
+       compress_async_crash]},
20
      {links, [],
21
       [make_link, read_link_info_for_non_link, symlinks]}].
22
 
23
@@ -2271,6 +2273,57 @@
24
 
25
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26
 
27
+compress_async_crash(suite) -> [];
28
+compress_async_crash(doc) -> [];
29
+compress_async_crash(Config) when is_list(Config) ->
30
+    ?line DataDir = ?config(data_dir, Config),
31
+    ?line Path = filename:join(DataDir, "test.gz"),
32
+    ExpectedData = <<"qwerty">>,
33
+
34
+    ?line _ = ?FILE_MODULE:delete(Path),
35
+    ?line {ok, Fd} = ?FILE_MODULE:open(Path, [write, binary, compressed]),
36
+    ?line ok = ?FILE_MODULE:write(Fd, ExpectedData),
37
+    ?line ok = ?FILE_MODULE:close(Fd),
38
+
39
+    % Test that when using async thread pool, the emulator doesn't crash
40
+    % when the efile port driver is stopped while a compressed file operation
41
+    % is in progress (being carried by an async thread).
42
+    ?line ok = compress_async_crash_loop(10000, Path, ExpectedData),
43
+    ?line ok = ?FILE_MODULE:delete(Path),
44
+    ok.
45
+
46
+compress_async_crash_loop(0, _Path, _ExpectedData) ->
47
+    ok;
48
+compress_async_crash_loop(N, Path, ExpectedData) ->
49
+    Parent = self(),
50
+    {Pid, Ref} = spawn_monitor(
51
+            fun() ->
52
+                    ?line {ok, Fd} = ?FILE_MODULE:open(
53
+                                        Path, [read, compressed, raw, binary]),
54
+                    Len = byte_size(ExpectedData),
55
+                    Parent ! {self(), continue},
56
+                    ?line {ok, ExpectedData} = ?FILE_MODULE:read(Fd, Len),
57
+                    ?line ok = ?FILE_MODULE:close(Fd),
58
+                    receive foobar -> ok end
59
+            end),
60
+    receive
61
+        {Pid, continue} ->
62
+            exit(Pid, shutdown),
63
+            receive
64
+                {'DOWN', Ref, _, _, Reason} ->
65
+                    ?line shutdown = Reason
66
+            end;
67
+        {'DOWN', Ref, _, _, Reason2} ->
68
+            test_server:fail({worker_exited, Reason2})
69
+    after 60000 ->
70
+            exit(Pid, shutdown),
71
+            erlang:demonitor(Ref, [flush]),
72
+            test_server:fail(worker_timeout)
73
+    end,
74
+    compress_async_crash_loop(N - 1, Path, ExpectedData).
75
+
76
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
77
+
78
 altname(doc) ->
79
     "Test the file:altname/1 function";
80
 altname(suite) ->
(-)lang/erlang-runtime15/files/patch-lib_odbc_c__src_odbcserver.c (-11 lines)
Removed Link Here
1
--- lib/odbc/c_src/odbcserver.c.orig
2
+++ lib/odbc/c_src/odbcserver.c
3
@@ -1150,7 +1150,7 @@
4
 					   (column.type.strlen_or_indptr_array[j]));
5
 			break;
6
                 case SQL_C_SLONG:
7
-                    ei_x_encode_long(&dynamic_buffer(state), ((long*)values)[j]);
8
+                    ei_x_encode_long(&dynamic_buffer(state), ((SQLINTEGER*)values)[j]);
9
                     break;
10
                 case SQL_C_DOUBLE:
11
                     ei_x_encode_double(&dynamic_buffer(state),
(-)lang/erlang-runtime15/files/patch-lib_runtime__tools_src_observer__backend.erl (-11 lines)
Removed Link Here
1
--- lib/runtime_tools/src/observer_backend.erl.orig
2
+++ lib/runtime_tools/src/observer_backend.erl
3
@@ -83,7 +83,7 @@
4
 	       ets -> ets:info(Table, size);
5
 	       mnesia -> mnesia:table_info(Table, size)
6
 	   end,
7
-    case Size > 0 of
8
+    case Size =/= undefined andalso Size > 0 of
9
 	false ->
10
 	    Parent ! {self(), '$end_of_table'},
11
 	    normal;
(-)lang/erlang-runtime15/files/patch-lib_ssl_src_ssl__manager.erl (-11 lines)
Removed Link Here
1
--- lib/ssl/src/ssl_manager.erl.orig
2
+++ lib/ssl/src/ssl_manager.erl
3
@@ -145,7 +145,7 @@
4
     call({new_session_id, Port}).
5
 
6
 clean_cert_db(Ref, File) ->
7
-    erlang:send_after(?CLEAN_CERT_DB, self(), {clean_cert_db, Ref, File}).
8
+    erlang:send_after(?CLEAN_CERT_DB, get(ssl_manager), {clean_cert_db, Ref, File}).
9
 
10
 %%--------------------------------------------------------------------
11
 -spec register_session(inet:port_number(), #session{}) -> ok.
(-)lang/erlang-runtime15/files/patch-lib_stdlib_src_calendar.erl (-26 lines)
Removed Link Here
1
--- lib/stdlib/src/calendar.erl.orig
2
+++ lib/stdlib/src/calendar.erl
3
@@ -215,11 +215,19 @@
4
 
5
 -spec local_time_to_universal_time_dst(t_datetime1970()) -> [t_datetime1970()].
6
 local_time_to_universal_time_dst(DateTime) ->
7
-    UtDst = erlang:localtime_to_universaltime(DateTime, true),
8
-    Ut    = erlang:localtime_to_universaltime(DateTime, false),
9
     %% Reverse check the universal times
10
-    LtDst = erlang:universaltime_to_localtime(UtDst),
11
-    Lt    = erlang:universaltime_to_localtime(Ut),
12
+    {UtDst, LtDst} =
13
+        try
14
+            UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
15
+            {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
16
+        catch error:badarg -> {error, error}
17
+        end,
18
+    {Ut, Lt} =
19
+        try
20
+            Ut0 = erlang:localtime_to_universaltime(DateTime, false),
21
+            {Ut0, erlang:universaltime_to_localtime(Ut0)}
22
+        catch error:badarg -> {error, error}
23
+        end,
24
     %% Return the valid universal times
25
     case {LtDst,Lt} of
26
 	{DateTime,DateTime} when UtDst =/= Ut ->
(-)lang/erlang-runtime15/files/pkg-message.in (-6 lines)
Removed Link Here
1
===========================================================================
2
3
To use this runtime port for development or testing, just prepend
4
its binary path ("%%LOCALBASE%%/lib/%%ERLANG_LIB%%/bin") to your PATH variable.
5
6
===========================================================================
(-)lang/erlang-runtime15/pkg-descr (-10 lines)
Removed Link Here
1
Erlang is a programming language used to build massively scalable soft
2
real-time systems with requirements on high availability. Some of its
3
uses are in telecoms, banking, e-commerce, computer telephony and
4
instant messaging. Erlang's runtime system has built-in support for
5
concurrency, distribution and fault tolerance.
6
7
This port contains a standalone runtime environment of Erlang R15
8
to be used during the development of OTP applications.
9
10
WWW: http://www.erlang.org/
(-)lang/erlang-runtime16/Makefile (-128 lines)
Removed Link Here
1
# Created by: ruslan@shevchenko.kiev.ua
2
# $FreeBSD$
3
4
PORTNAME=	erlang
5
PORTVERSION=	16.b.03.1
6
PORTREVISION=	13
7
CATEGORIES=	lang parallel java
8
MASTER_SITES=	http://www.erlang.org/download/:erlangorg			\
9
		http://erlang.stacken.kth.se/download/:erlangorg		\
10
		http://www.csd.uu.se/ftp/mirror/erlang/download/:erlangorg	\
11
		http://olgeni.olgeni.com/~olgeni/distfiles/:local		\
12
		LOCAL/olgeni:local
13
PKGNAMESUFFIX=	-runtime16
14
DISTNAME=	otp_src_${ERLANG_REL}
15
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:erlangorg
16
DIST_SUBDIR=	erlang
17
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
18
19
MAINTAINER=	erlang@FreeBSD.org
20
COMMENT=	Functional programming language from Ericsson
21
22
WRKSRC=		${WRKDIR}/otp_src_${ERLANG_REL}
23
24
ERLANG_LIB=	${PORTNAME}${PORTVERSION:C/\..*//}
25
ERLANG_REL=	R${PORTVERSION:S/.//g:tu:S/1$/-1/}
26
27
SUB_FILES=	pkg-message
28
SUB_LIST=	ERLANG_LIB=${ERLANG_LIB}
29
30
MAKE_JOBS_UNSAFE=yes
31
32
OPTIONS_DEFINE=	DTRACE GS HIPE JAVA KQUEUE ODBC OPENSSL SCTP SMP THREADS WX
33
OPTIONS_DEFAULT=KQUEUE OPENSSL SCTP SMP THREADS
34
35
GS_DESC=	Enable GS application (deprecated)
36
HIPE_DESC=	Build native HiPE compiler
37
KQUEUE_DESC=	Enable Kernel Poll (kqueue) support
38
SCTP_DESC=	Enable SCTP support
39
SMP_DESC=	Enable SMP support
40
WX_DESC=	Enable WX application
41
42
.if !exists(/usr/sbin/dtrace)
43
OPTIONS_EXCLUDE+=	DTRACE
44
.endif
45
46
OPTIONS_EXCLUDE_DragonFly=	HIPE SCTP
47
48
OPENSSL_VARS=	BROKEN_SSL=openssl111
49
50
GNU_CONFIGURE=	yes
51
LDFLAGS+=	-L${LOCALBASE}/lib
52
USES=		gmake ncurses perl5
53
USE_PERL5=	build
54
55
# If you run Erlang and get a message resembling "WARNING: number of
56
# probes fixed does not match the number of defined probes (54 != 132,
57
# respectively)" you probably misconfigured DTrace in some way.
58
59
DTRACE_CFLAGS=		-fno-omit-frame-pointer
60
DTRACE_CONFIGURE_WITH=	dynamic-trace=dtrace
61
DTRACE_VARS=		STRIP=""
62
GS_USES=		tk:run
63
HIPE_CONFIGURE_ENABLE=	hipe
64
JAVA_CONFIGURE_ENV=	ac_cv_prog_JAVAC="${JAVAC}"
65
JAVA_CONFIGURE_WITH=	javac
66
JAVA_VARS=		USE_JAVA=yes
67
KQUEUE_CONFIGURE_ENABLE=kernel-poll
68
ODBC_CONFIGURE_WITH=	odbc
69
ODBC_LIB_DEPENDS=	libodbc.so:databases/unixODBC
70
OPENSSL_CONFIGURE_WITH=	ssl=${OPENSSLBASE}
71
OPENSSL_USES=		ssl
72
SCTP_CONFIGURE_ENABLE=	sctp
73
SMP_CONFIGURE_ENABLE=	smp-support
74
THREADS_CONFIGURE_ENABLE=	threads
75
WX_CONFIGURE_WITH=	wx-config=${WX_CONFIG}
76
WX_VARS=		USE_WX=2.8+ WX_COMPS="wx contrib" USE_GL="gl glu"
77
78
.include <bsd.port.options.mk>
79
80
.include <bsd.port.pre.mk>
81
82
.if ${OPSYS} == FreeBSD
83
.  if ${OSVERSION} >= 1200085 && ${SSL_DEFAULT} == base
84
BROKEN=	Does not support OpenSSL 1.1, use Erlang 19+
85
.  endif
86
.endif
87
88
.if ${OPSYS} == FreeBSD
89
CFLAGS+=	-DMAP_NORESERVE=0
90
.endif
91
92
.if ${ARCH} == i386
93
MAKE_ARGS+=	ARCH=x86
94
.endif
95
96
.if ${ARCH} == armv6 || ${ARCH} == armv7
97
MAKE_ARGS+=	ARCH=arm
98
.endif
99
100
pre-configure-MX-off:
101
	echo "disabled by port options" > ${WRKSRC}/lib/wx/SKIP
102
103
post-configure-ODBC-on:
104
	${RM} ${WRKSRC}/lib/odbc/SKIP
105
106
post-install-GS-off:
107
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/gs-*
108
109
post-install-JAVA-off:
110
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/jinterface-*
111
112
post-install-ODBC-off:
113
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/odbc-*
114
115
post-install-OPENSSL-off:
116
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/crypto-*
117
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssh-*
118
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssl-*
119
120
post-install-WX-off:
121
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/wx-*
122
123
post-stage:
124
	${FIND} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/* -type d -empty -delete
125
	@cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
126
		| ${SORT} >> ${TMPPLIST}
127
128
.include <bsd.port.post.mk>
(-)lang/erlang-runtime16/distinfo (-3 lines)
Removed Link Here
1
TIMESTAMP = 1523227942
2
SHA256 (erlang/otp_src_R16B03-1.tar.gz) = 17ce53459bc5ceb34fc2da412e15ac8c23835a15fbd84e62c8d1852704747ee7
3
SIZE (erlang/otp_src_R16B03-1.tar.gz) = 66253556
(-)lang/erlang-runtime16/files/patch-Makefile.in (-20 lines)
Removed Link Here
1
--- Makefile.in.orig
2
+++ Makefile.in
3
@@ -56,7 +56,7 @@
4
 libdir		= @libdir@
5
 
6
 # Where Erlang/OTP is located
7
-libdir_suffix	= /erlang
8
+libdir_suffix	= /erlang16
9
 erlang_libdir	= $(libdir)$(libdir_suffix)
10
 erlang_bindir	= $(erlang_libdir)/bin
11
 
12
@@ -913,7 +913,7 @@
13
 #
14
 # Order is important here, don't change it!
15
 #
16
-INST_DEP += install.dirs install.emulator install.libs install.Install install.bin
17
+INST_DEP += install.dirs install.emulator install.libs install.Install
18
 
19
 install: $(INST_DEP)
20
 
(-)lang/erlang-runtime16/files/patch-erts_emulator_drivers_common_efile__drv.c (-11 lines)
Removed Link Here
1
--- erts/emulator/drivers/common/efile_drv.c.orig
2
+++ erts/emulator/drivers/common/efile_drv.c
3
@@ -1938,6 +1938,8 @@
4
 	d->result_ok = 1;
5
 	if (d->c.sendfile.nbytes != 0)
6
 	  d->c.sendfile.nbytes -= nbytes;
7
+      } else if (nbytes == 0 && d->c.sendfile.nbytes == 0) {
8
+	d->result_ok = 1;
9
       } else
10
 	d->result_ok = 0;
11
     } else {
(-)lang/erlang-runtime16/files/patch-erts_etc_unix_run__erl.c (-12 lines)
Removed Link Here
1
--- erts/etc/unix/run_erl.c.orig
2
+++ erts/etc/unix/run_erl.c
3
@@ -69,9 +69,6 @@
4
 #ifdef HAVE_UTMP_H
5
 #  include <utmp.h>
6
 #endif
7
-#ifdef HAVE_UTIL_H
8
-#  include <util.h>
9
-#endif
10
 #ifdef HAVE_SYS_IOCTL_H
11
 #  include <sys/ioctl.h>
12
 #endif
(-)lang/erlang-runtime16/files/patch-lib_crypto_c__src_Makefile.in (-11 lines)
Removed Link Here
1
--- lib/crypto/c_src/Makefile.in.orig	2016-03-14 20:11:15 UTC
2
+++ lib/crypto/c_src/Makefile.in
3
@@ -90,7 +90,7 @@ endif
4
 DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
5
 
6
 ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
7
-SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
8
+SSL_DED_LD_RUNTIME_LIBRARY_PATH =
9
 CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME)
10
 EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
11
 else
(-)lang/erlang-runtime16/files/patch-lib_crypto_priv_Makefile (-11 lines)
Removed Link Here
1
--- lib/crypto/priv/Makefile.orig	2016-03-14 20:11:15 UTC
2
+++ lib/crypto/priv/Makefile
3
@@ -61,7 +61,7 @@ OBJS = $(OBJDIR)/crypto.o
4
 # ----------------------------------------------------
5
 
6
 $(SO_NIFLIB): $(OBJS)
7
-	$(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
8
+	$(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
9
 	-o $@ $^ -lcrypto
10
 
11
 $(DLL_NIFLIB): $(OBJS)
(-)lang/erlang-runtime16/files/patch-lib_erl__interface_src_connect_ei__resolve.c (-12 lines)
Removed Link Here
1
--- lib/erl_interface/src/connect/ei_resolve.c.orig
2
+++ lib/erl_interface/src/connect/ei_resolve.c
3
@@ -621,7 +621,8 @@
4
 
5
   return result;
6
 #else
7
-  return gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
8
+  struct hostent *dummy;
9
+  return gethostbyname_r(name,hostp,buffer,buflen,&dummy,h_errnop);
10
 #endif
11
 #endif
12
 #endif
(-)lang/erlang-runtime16/files/patch-lib_et_src_et__gs__contents__viewer.erl (-10 lines)
Removed Link Here
1
--- lib/et/src/et_gs_contents_viewer.erl.orig	2010-03-11 16:24:41.000000000 +0800
2
+++ lib/et/src/et_gs_contents_viewer.erl	2010-03-11 16:24:53.000000000 +0800
3
@@ -347,7 +347,6 @@ handle_info({gs, _Obj, keypress, _, [Key
4
         'Caps_Lock' ->
5
             {noreply, S};
6
         _ ->
7
-            io:format("~p: ignored: ~p~n", [?MODULE, KeySym]),
8
             {noreply, S}
9
     end;
10
 handle_info({gs, _Obj, configure, [], [W, H | _]}, S) ->
(-)lang/erlang-runtime16/files/patch-lib_et_src_et__gs__viewer.erl (-12 lines)
Removed Link Here
1
--- lib/et/src/et_gs_viewer.erl.orig	2010-03-11 16:26:59.000000000 +0800
2
+++ lib/et/src/et_gs_viewer.erl	2010-03-11 16:27:16.000000000 +0800
3
@@ -855,8 +855,7 @@ close_all_others(S) ->
4
     noreply(S).
5
 
6
 click_error(Click, S) ->
7
-    gs:config(S#state.canvas, beep),
8
-    io:format("~p: ignored: ~p~n", [?MODULE, Click]).
9
+    gs:config(S#state.canvas, beep).
10
 
11
 %%%----------------------------------------------------------------------
12
 %%% Clone viewer
(-)lang/erlang-runtime16/files/patch-lib_gs_src_tool__utils.erl (-84 lines)
Removed Link Here
1
--- lib/gs/src/tool_utils.erl.orig
2
+++ lib/gs/src/tool_utils.erl
3
@@ -27,6 +27,9 @@
4
 -export([file_dialog/1]).
5
 -export([notify/2, confirm/2, confirm_yesno/2, request/2]).
6
 
7
+%% Browser executable list (openURL command line protocol required)
8
+-define(BROWSERS, ["netscape", "mozilla", "MozillaFirebird", "opera", "firefox", "seamonkey"]).
9
+
10
 %%----------------------------------------------------------------------
11
 %% open_help(GS, File)
12
 %%   GS = gsobj()  (GS root object returned by gs:start/0,1)
13
@@ -67,7 +70,7 @@
14
 		      {unix,Type} ->
15
                           case Type of
16
                                darwin -> "open " ++ File;
17
-                               _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
18
+                               _Else -> unix_url_command("file:" ++ File)
19
 			  end;
20
 		      {win32,_AnyType} ->
21
 			  "start " ++ filename:nativename(File);
22
@@ -82,7 +85,7 @@
23
 		      {unix,Type} ->
24
                           case Type of
25
                                darwin -> "open " ++ File;
26
-                               _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
27
+                               _Else -> unix_url_command("file:" ++ File)
28
 			  end;
29
 		      {win32,_AnyType} ->
30
 			  "netscape.exe -h " ++ regexp:gsub(File,"\\\\","/");
31
@@ -342,3 +345,53 @@
32
     [Last];
33
 insert_newlines(Other) ->
34
     Other.
35
+
36
+%% find_browser(BrowserList) => string() | false
37
+%%   BrowserList - [string()]
38
+%% Given a list of basenames, find the first available executable.
39
+
40
+find_browser([]) ->
41
+    false;
42
+
43
+find_browser([H | T]) ->
44
+    case os:find_executable(H) of
45
+        false ->
46
+          find_browser(T);
47
+        Browser ->
48
+          Browser
49
+    end.
50
+
51
+%% unix_url_command(URL) => string()
52
+%%   URL - string()
53
+%% Open an URL, using a browser which supports the openURL command
54
+%% line protocol. If no browser is found, the empty string will be
55
+%% returned.
56
+
57
+unix_url_command(URL) ->
58
+    Template = "BROWSER -remote \"openURL(" ++ URL ++ ")\" || BROWSER " ++ URL ++ "&",
59
+
60
+    case os:getenv("BROWSER") of
61
+	false ->
62
+	    %% look for a compatible browser
63
+	    case find_browser(?BROWSERS) of
64
+		false ->
65
+		    "";
66
+		Browser ->
67
+		    case regexp:gsub(Template, "BROWSER", Browser) of
68
+			{ok, Command, 0} ->
69
+			    %% Template does not contain "BROWSER" placeholder
70
+			    "";
71
+			{ok, Command, _} ->
72
+			    Command
73
+		    end
74
+	    end;
75
+
76
+	Value ->
77
+	    case regexp:gsub(Template, "BROWSER", Value) of
78
+		{ok, Command2, 0} ->
79
+		    %% no placeholder
80
+		    "";
81
+		{ok, Command2, _} ->
82
+		    Command2
83
+	    end
84
+    end.
(-)lang/erlang-runtime16/files/patch-lib_stdlib_src_calendar.erl (-26 lines)
Removed Link Here
1
--- lib/stdlib/src/calendar.erl.orig
2
+++ lib/stdlib/src/calendar.erl
3
@@ -215,11 +215,19 @@
4
 
5
 -spec local_time_to_universal_time_dst(t_datetime1970()) -> [t_datetime1970()].
6
 local_time_to_universal_time_dst(DateTime) ->
7
-    UtDst = erlang:localtime_to_universaltime(DateTime, true),
8
-    Ut    = erlang:localtime_to_universaltime(DateTime, false),
9
     %% Reverse check the universal times
10
-    LtDst = erlang:universaltime_to_localtime(UtDst),
11
-    Lt    = erlang:universaltime_to_localtime(Ut),
12
+    {UtDst, LtDst} =
13
+        try
14
+            UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
15
+            {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
16
+        catch error:badarg -> {error, error}
17
+        end,
18
+    {Ut, Lt} =
19
+        try
20
+            Ut0 = erlang:localtime_to_universaltime(DateTime, false),
21
+            {Ut0, erlang:universaltime_to_localtime(Ut0)}
22
+        catch error:badarg -> {error, error}
23
+        end,
24
     %% Return the valid universal times
25
     case {LtDst,Lt} of
26
 	{DateTime,DateTime} when UtDst =/= Ut ->
(-)lang/erlang-runtime16/files/patch-lib_wx_c__src_wxe__impl.cpp (-20 lines)
Removed Link Here
1
--- lib/wx/c_src/wxe_impl.cpp.orig	2017-01-30 23:13:25 UTC
2
+++ lib/wx/c_src/wxe_impl.cpp
3
@@ -666,7 +666,7 @@ void * WxeApp::getPtr(char * bp, wxeMemE
4
     throw wxe_badarg(index);
5
   }
6
   void * temp = memenv->ref2ptr[index];
7
-  if((index < memenv->next) && ((index == 0) || (temp > NULL)))
8
+  if((index < memenv->next) && ((index == 0) || (temp != NULL)))
9
     return temp;
10
   else {
11
     throw wxe_badarg(index);
12
@@ -678,7 +678,7 @@ void WxeApp::registerPid(char * bp, ErlD
13
   if(!memenv)
14
     throw wxe_badarg(index);
15
   void * temp = memenv->ref2ptr[index];
16
-  if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
17
+  if((index < memenv->next) && ((index == 0) || (temp != NULL))) {
18
     ptrMap::iterator it;
19
     it = ptr2ref.find(temp);
20
     if(it != ptr2ref.end()) {
(-)lang/erlang-runtime16/files/pkg-message.in (-6 lines)
Removed Link Here
1
===========================================================================
2
3
To use this runtime port for development or testing, just prepend
4
its binary path ("%%LOCALBASE%%/lib/%%ERLANG_LIB%%/bin") to your PATH variable.
5
6
===========================================================================
(-)lang/erlang-runtime16/pkg-descr (-10 lines)
Removed Link Here
1
Erlang is a programming language used to build massively scalable soft
2
real-time systems with requirements on high availability. Some of its
3
uses are in telecoms, banking, e-commerce, computer telephony and
4
instant messaging. Erlang's runtime system has built-in support for
5
concurrency, distribution and fault tolerance.
6
7
This port contains a standalone runtime environment of Erlang R16
8
to be used during the development of OTP applications.
9
10
WWW: http://www.erlang.org/
(-)lang/erlang-runtime17/Makefile (-155 lines)
Removed Link Here
1
# Created by: ruslan@shevchenko.kiev.ua
2
# $FreeBSD$
3
4
PORTNAME=	erlang
5
PORTVERSION=	17.5.6.10
6
CATEGORIES=	lang parallel java
7
MASTER_SITES=	http://www.erlang.org/download/:erlangorg			\
8
		http://erlang.stacken.kth.se/download/:erlangorg		\
9
		http://www.csd.uu.se/ftp/mirror/erlang/download/:erlangorg	\
10
		http://olgeni.olgeni.com/~olgeni/distfiles/:local		\
11
		LOCAL/olgeni:local
12
PKGNAMESUFFIX=	-runtime17
13
DISTNAME=	otp_src_${ERLANG_REL}
14
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:erlangorg		\
15
		preloaded-${PORTVERSION}${EXTRACT_SUFX}:local
16
DIST_SUBDIR=	erlang
17
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
18
19
PATCH_SITES=	http://olgeni.olgeni.com/~olgeni/distfiles/ \
20
		LOCAL/olgeni
21
PATCHFILES=	patch-otp-17.5.1 patch-otp-17.5.2 patch-otp-17.5.3 \
22
		patch-otp-17.5.4 patch-otp-17.5.5 patch-otp-17.5.6 \
23
		patch-otp-17.5.6.1 patch-otp-17.5.6.2 patch-otp-17.5.6.3 \
24
		patch-otp-17.5.6.4 patch-otp-17.5.6.5 patch-otp-17.5.6.6 \
25
		patch-otp-17.5.6.7 patch-otp-17.5.6.8 patch-otp-17.5.6.9 \
26
		patch-otp-17.5.6.10
27
28
MAINTAINER=	erlang@FreeBSD.org
29
COMMENT=	Functional programming language from Ericsson
30
31
WRKSRC=		${WRKDIR}/otp_src_${ERLANG_REL}
32
33
ERLANG_LIB=	${PORTNAME}${PORTVERSION:C/\..*//}
34
ERLANG_REL=	17.5
35
36
OPTIONS_SUB=	yes
37
SUB_FILES=	pkg-message
38
SUB_LIST=	ERLANG_LIB=${ERLANG_LIB}
39
40
MAKE_JOBS_UNSAFE=yes
41
42
OPTIONS_DEFINE=	DIRTY DTRACE GS HIPE JAVA KQUEUE NATIVE ODBC OPENSSL SCTP SMP THREADS WX
43
OPTIONS_DEFAULT=DTRACE HIPE KQUEUE OPENSSL SCTP SMP THREADS
44
45
DIRTY_DESC=	Enable Dirty schedulers (experimental)
46
GS_DESC=	Enable GS application (deprecated)
47
HIPE_DESC=	Build native HiPE compiler
48
KQUEUE_DESC=	Enable Kernel Poll (kqueue) support
49
NATIVE_DESC=	Enable native libraries
50
SCTP_DESC=	Enable SCTP support
51
SMP_DESC=	Enable SMP support
52
WX_DESC=	Enable WX application
53
54
NATIVE_IMPLIES=	HIPE
55
56
.if !exists(/usr/sbin/dtrace)
57
OPTIONS_EXCLUDE+=	DTRACE
58
.endif
59
60
OPTIONS_EXCLUDE_DragonFly=	HIPE NATIVE SCTP
61
# ld(1) fails to link probes: missing __dtrace_erlang___* symbols
62
OPTIONS_EXCLUDE_aarch64=	DTRACE
63
OPTIONS_EXCLUDE_armv6=		DTRACE
64
OPTIONS_EXCLUDE_armv7=		DTRACE
65
OPTIONS_EXCLUDE_i386=		DTRACE
66
67
OPENSSL_VARS=	BROKEN_SSL=openssl111
68
69
GNU_CONFIGURE=	yes
70
LDFLAGS+=	-L${LOCALBASE}/lib
71
USES=		gmake ncurses perl5
72
USE_PERL5=	build
73
74
# If you run Erlang and get a message resembling "WARNING: number of
75
# probes fixed does not match the number of defined probes (54 != 132,
76
# respectively)" you probably misconfigured DTrace in some way.
77
78
DIRTY_CONFIGURE_ENABLE=	dirty-schedulers
79
DTRACE_CFLAGS=		-fno-omit-frame-pointer
80
DTRACE_CONFIGURE_WITH=	dynamic-trace=dtrace
81
DTRACE_VARS=		STRIP=""
82
GS_USES=		tk:run
83
HIPE_CONFIGURE_ENABLE=	hipe
84
JAVA_CONFIGURE_ENV=	ac_cv_prog_JAVAC="${JAVAC}"
85
JAVA_CONFIGURE_WITH=	javac
86
JAVA_VARS=		USE_JAVA=yes
87
KQUEUE_CONFIGURE_ENABLE=kernel-poll
88
NATIVE_CONFIGURE_ENABLE=native-libs
89
ODBC_CONFIGURE_WITH=	odbc
90
ODBC_LIB_DEPENDS=	libodbc.so:databases/unixODBC
91
OPENSSL_CONFIGURE_WITH=	ssl=${OPENSSLBASE}
92
OPENSSL_USES=		ssl
93
SCTP_CONFIGURE_ENABLE=	sctp
94
SMP_CONFIGURE_ENABLE=	smp-support
95
THREADS_CONFIGURE_ENABLE=	threads
96
WX_CONFIGURE_WITH=	wx-config=${WX_CONFIG}
97
WX_VARS=		USE_WX=2.8+ WX_COMPS="wx contrib" USE_GL="gl glu"
98
99
.include <bsd.port.options.mk>
100
101
.include <bsd.port.pre.mk>
102
103
.if ${OPSYS} == FreeBSD
104
.  if ${OSVERSION} >= 1200085 && ${SSL_DEFAULT} == base
105
BROKEN=	Does not support OpenSSL 1.1, use Erlang 19+
106
.  endif
107
.endif
108
109
.if ${OPSYS} == FreeBSD
110
CFLAGS+=	-DMAP_NORESERVE=0
111
.endif
112
113
.if ${ARCH} == i386
114
MAKE_ARGS+=	ARCH=x86
115
.endif
116
117
.if ${ARCH} == armv6 || ${ARCH} == armv7
118
MAKE_ARGS+=	ARCH=arm
119
.endif
120
121
pre-configure:
122
	cd ${WRKSRC} && ${TAR} --unlink -xzpf ${DISTDIR}/${DIST_SUBDIR}/preloaded-${PORTVERSION}${EXTRACT_SUFX}
123
124
pre-configure-MX-off:
125
	echo "disabled by port options" > ${WRKSRC}/lib/wx/SKIP
126
127
post-configure-ODBC-on:
128
	${RM} ${WRKSRC}/lib/odbc/SKIP
129
130
pre-build-NATIVE-on:
131
	@cd ${WRKSRC} && ${MAKE_CMD} clean
132
133
post-install-GS-off:
134
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/gs-*
135
136
post-install-JAVA-off:
137
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/jinterface-*
138
139
post-install-ODBC-off:
140
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/odbc-*
141
142
post-install-OPENSSL-off:
143
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/crypto-*
144
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssh-*
145
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssl-*
146
147
post-install-WX-off:
148
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/wx-*
149
150
post-stage:
151
	${FIND} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/* -type d -empty -delete
152
	@cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
153
		| ${SORT} >> ${TMPPLIST}
154
155
.include <bsd.port.post.mk>
(-)lang/erlang-runtime17/distinfo (-37 lines)
Removed Link Here
1
TIMESTAMP = 1540245123
2
SHA256 (erlang/otp_src_17.5.tar.gz) = 3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474
3
SIZE (erlang/otp_src_17.5.tar.gz) = 67242289
4
SHA256 (erlang/preloaded-17.5.6.10.tar.gz) = 4a44e5a76fdd5b448f35455babc1f74639f5c7f2dcc509bfd6d3237b517d8ff6
5
SIZE (erlang/preloaded-17.5.6.10.tar.gz) = 297377
6
SHA256 (erlang/patch-otp-17.5.1) = e95b17b539b84b2408cbdd8af68ea96ad239a1b38117243d21ebb809ab3ca1c3
7
SIZE (erlang/patch-otp-17.5.1) = 36012
8
SHA256 (erlang/patch-otp-17.5.2) = 9c70e90c3b040ab1e136738f355f0925f64afd5a4b28f1c9a6f4035f2bf03b1b
9
SIZE (erlang/patch-otp-17.5.2) = 17821
10
SHA256 (erlang/patch-otp-17.5.3) = fd2879176733c34c002123da9d9b96ac3cf1857c7422a061711be818aecc9e13
11
SIZE (erlang/patch-otp-17.5.3) = 135959
12
SHA256 (erlang/patch-otp-17.5.4) = dce1130adfabe4fdecd1e5e700bea70a5e9ba7886b51c81a7a2371e204d725ca
13
SIZE (erlang/patch-otp-17.5.4) = 14618
14
SHA256 (erlang/patch-otp-17.5.5) = 78f81dc17c52b73d45819de50fc11df3a19ff0593a6d5c6d105b5875c1e654f6
15
SIZE (erlang/patch-otp-17.5.5) = 44523
16
SHA256 (erlang/patch-otp-17.5.6) = 25461538cf79af56ee64019cfb76764bc5c2ac7cc9d3f9061ef01dd93d46ef36
17
SIZE (erlang/patch-otp-17.5.6) = 57264
18
SHA256 (erlang/patch-otp-17.5.6.1) = 695bea19a372d58fc94ca79e84054524e7895516aab3a1d03905dd5971779ed7
19
SIZE (erlang/patch-otp-17.5.6.1) = 9062
20
SHA256 (erlang/patch-otp-17.5.6.2) = 47fc4468fdc75249f30a4ba120ed39db03dfb5ebc5c2b1c7e94eb43d8c221002
21
SIZE (erlang/patch-otp-17.5.6.2) = 14293
22
SHA256 (erlang/patch-otp-17.5.6.3) = 75e91ad34a910353452cc1cf26ffb6936e9df3f0d1144793eb83ac7ab3074486
23
SIZE (erlang/patch-otp-17.5.6.3) = 63652
24
SHA256 (erlang/patch-otp-17.5.6.4) = 9156ea7d173b8fef62ee1eb2483b943cfdbeca80b74177f51aa131a688db8ed5
25
SIZE (erlang/patch-otp-17.5.6.4) = 11945
26
SHA256 (erlang/patch-otp-17.5.6.5) = 270501a8ab836456aeddf2601996601b3b7f040dc360a438319434b21c26e1b0
27
SIZE (erlang/patch-otp-17.5.6.5) = 16967
28
SHA256 (erlang/patch-otp-17.5.6.6) = 53125e68a9a8530e1eaa6451a0849b8b458d40b6611ded9c1cae2936166f65bf
29
SIZE (erlang/patch-otp-17.5.6.6) = 5252
30
SHA256 (erlang/patch-otp-17.5.6.7) = cd40675b3d75b0a92617c4ebdc361af420a3eb9af00b851a47bd36a223af0f0a
31
SIZE (erlang/patch-otp-17.5.6.7) = 25609
32
SHA256 (erlang/patch-otp-17.5.6.8) = a5f4b28ecea04a6ba9c5c042963a7d2258f2bc50dc0a4c4d8e42198c7f225c89
33
SIZE (erlang/patch-otp-17.5.6.8) = 39537
34
SHA256 (erlang/patch-otp-17.5.6.9) = 4380bea95d906eea5c2caaeac4ae830347bd502332c3656d85e0f7642fc52397
35
SIZE (erlang/patch-otp-17.5.6.9) = 16067
36
SHA256 (erlang/patch-otp-17.5.6.10) = 856461e3efe69629c65c38651c2b46addc7e8f0aaa3ab88221ad27f928a29508
37
SIZE (erlang/patch-otp-17.5.6.10) = 19618
(-)lang/erlang-runtime17/files/patch-Makefile.in (-20 lines)
Removed Link Here
1
--- Makefile.in.orig
2
+++ Makefile.in
3
@@ -59,7 +59,7 @@
4
 libdir		= @libdir@
5
 
6
 # Where Erlang/OTP is located
7
-libdir_suffix	= /erlang
8
+libdir_suffix	= /erlang17
9
 erlang_libdir	= $(libdir)$(libdir_suffix)
10
 erlang_bindir	= $(erlang_libdir)/bin
11
 
12
@@ -1007,7 +1007,7 @@
13
 #
14
 # Order is important here, don't change it!
15
 #
16
-INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version install.bin
17
+INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version
18
 
19
 install: $(INST_DEP)
20
 
(-)lang/erlang-runtime17/files/patch-erts_emulator_drivers_common_efile__drv.c (-11 lines)
Removed Link Here
1
--- erts/emulator/drivers/common/efile_drv.c.orig	2015-03-31 12:32:52 UTC
2
+++ erts/emulator/drivers/common/efile_drv.c
3
@@ -1938,6 +1938,8 @@ static void invoke_sendfile(void *data)
4
 	d->result_ok = 1;
5
 	if (d->c.sendfile.nbytes != 0)
6
 	  d->c.sendfile.nbytes -= nbytes;
7
+      } else if (nbytes == 0 && d->c.sendfile.nbytes == 0) {
8
+	d->result_ok = 1;
9
       } else
10
 	d->result_ok = 0;
11
     } else {
(-)lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c (-12 lines)
Removed Link Here
1
--- erts/etc/unix/run_erl.c.orig	2015-03-31 12:32:52 UTC
2
+++ erts/etc/unix/run_erl.c
3
@@ -73,9 +73,6 @@
4
 #ifdef HAVE_UTMP_H
5
 #  include <utmp.h>
6
 #endif
7
-#ifdef HAVE_UTIL_H
8
-#  include <util.h>
9
-#endif
10
 #ifdef HAVE_SYS_IOCTL_H
11
 #  include <sys/ioctl.h>
12
 #endif
(-)lang/erlang-runtime17/files/patch-lib_crypto_c__src_Makefile.in (-11 lines)
Removed Link Here
1
--- lib/crypto/c_src/Makefile.in.orig	2016-03-14 20:11:15 UTC
2
+++ lib/crypto/c_src/Makefile.in
3
@@ -90,7 +90,7 @@ endif
4
 DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
5
 
6
 ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
7
-SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
8
+SSL_DED_LD_RUNTIME_LIBRARY_PATH =
9
 CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME)
10
 EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
11
 else
(-)lang/erlang-runtime17/files/patch-lib_crypto_priv_Makefile (-11 lines)
Removed Link Here
1
--- lib/crypto/priv/Makefile.orig	2016-03-14 20:11:15 UTC
2
+++ lib/crypto/priv/Makefile
3
@@ -61,7 +61,7 @@ OBJS = $(OBJDIR)/crypto.o
4
 # ----------------------------------------------------
5
 
6
 $(SO_NIFLIB): $(OBJS)
7
-	$(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
8
+	$(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
9
 	-o $@ $^ -lcrypto
10
 
11
 $(DLL_NIFLIB): $(OBJS)
(-)lang/erlang-runtime17/files/patch-lib_erl__interface_src_connect_ei__resolve.c (-12 lines)
Removed Link Here
1
--- lib/erl_interface/src/connect/ei_resolve.c.orig	2015-03-31 12:32:52 UTC
2
+++ lib/erl_interface/src/connect/ei_resolve.c
3
@@ -649,7 +649,8 @@ struct hostent *ei_gethostbyname_r(const
4
 
5
   return result;
6
 #else
7
-  return gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
8
+  struct hostent *dummy;
9
+  return gethostbyname_r(name,hostp,buffer,buflen,&dummy,h_errnop);
10
 #endif
11
 #endif
12
 #endif
(-)lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__connection.erl (-30 lines)
Removed Link Here
1
--- lib/ssl/src/ssl_connection.erl.orig	2015-03-31 12:32:52.000000000 +0000
2
+++ lib/ssl/src/ssl_connection.erl	2017-12-14 13:13:46.570861000 +0000
3
@@ -1135,8 +1135,25 @@
4
     request_client_cert(State2, Connection).
5
 
6
 certify_client_key_exchange(#encrypted_premaster_secret{premaster_secret= EncPMS},
7
-			    #state{private_key = Key} = State, Connection) ->
8
-    PremasterSecret = ssl_handshake:premaster_secret(EncPMS, Key),
9
+			    #state{private_key = Key, client_hello_version = {Major, Minor} = Version } = State, Connection) ->
10
+
11
+    %% Countermeasure for Bleichenbacher attack always provide some kind of premaster secret
12
+    %% and fail handshake later.RFC 5246 section 7.4.7.1.
13
+    PremasterSecret =
14
+	try ssl_handshake:premaster_secret(EncPMS, Key) of
15
+	    Secret when erlang:byte_size(Secret) == ?NUM_OF_PREMASTERSECRET_BYTES ->
16
+		case Secret of
17
+		    <<?BYTE(Major), ?BYTE(Minor), _/binary>> -> %% Correct
18
+			Secret;
19
+		    <<?BYTE(_), ?BYTE(_), Rest/binary>> -> %% Version mismatch
20
+			<<?BYTE(Major), ?BYTE(Minor), Rest/binary>>
21
+		end;
22
+	    _ -> %% erlang:byte_size(Secret) =/= ?NUM_OF_PREMASTERSECRET_BYTES
23
+		make_premaster_secret(Version, rsa)
24
+	catch
25
+	    #alert{description = ?DECRYPT_ERROR} ->
26
+		make_premaster_secret(Version, rsa)
27
+	end,
28
     calculate_master_secret(PremasterSecret, State, Connection, certify, cipher);
29
 
30
 certify_client_key_exchange(#client_diffie_hellman_public{dh_public = ClientPublicDhKey},
(-)lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__connection.hrl (-12 lines)
Removed Link Here
1
--- lib/ssl/src/ssl_connection.hrl.orig	2015-03-31 12:32:52.000000000 +0000
2
+++ lib/ssl/src/ssl_connection.hrl	2017-12-14 13:18:02.736638000 +0000
3
@@ -53,7 +53,8 @@
4
           session               :: #session{} | secret_printout(),
5
 	  session_cache         :: db_handle(),
6
 	  session_cache_cb      :: atom(),
7
-          negotiated_version    :: ssl_record:ssl_version(),
8
+          negotiated_version    :: ssl_record:ssl_version() | 'undefined',
9
+          client_hello_version  :: ssl_record:ssl_version() | 'undefined',
10
           client_certificate_requested = false :: boolean(),
11
 	  key_algorithm         :: ssl_cipher:key_algo(),
12
 	  hashsign_algorithm = {undefined, undefined},
(-)lang/erlang-runtime17/files/patch-lib_ssl_src_tls__connection.erl (-10 lines)
Removed Link Here
1
--- lib/ssl/src/tls_connection.erl.orig	2015-03-31 12:32:52.000000000 +0000
2
+++ lib/ssl/src/tls_connection.erl	2017-12-14 13:22:41.792681000 +0000
3
@@ -197,6 +197,7 @@
4
             ssl_connection:hello({common_client_hello, Type, ServerHelloExt, HashSign},
5
 				 State#state{connection_states  = ConnectionStates,
6
 					     negotiated_version = Version,
7
+					     client_hello_version = ClientVersion,
8
 					     session = Session,
9
 					     client_ecc = {EllipticCurves, EcPointFormats}}, ?MODULE);
10
         #alert{} = Alert ->
(-)lang/erlang-runtime17/files/patch-lib_stdlib_src_calendar.erl (-26 lines)
Removed Link Here
1
--- lib/stdlib/src/calendar.erl.orig	2015-03-31 12:32:52 UTC
2
+++ lib/stdlib/src/calendar.erl
3
@@ -279,11 +279,19 @@ local_time_to_universal_time(DateTime, I
4
       DateTime1 :: datetime1970(),
5
       DateTime :: datetime1970().
6
 local_time_to_universal_time_dst(DateTime) ->
7
-    UtDst = erlang:localtime_to_universaltime(DateTime, true),
8
-    Ut    = erlang:localtime_to_universaltime(DateTime, false),
9
     %% Reverse check the universal times
10
-    LtDst = erlang:universaltime_to_localtime(UtDst),
11
-    Lt    = erlang:universaltime_to_localtime(Ut),
12
+    {UtDst, LtDst} =
13
+        try
14
+            UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
15
+            {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
16
+        catch error:badarg -> {error, error}
17
+        end,
18
+    {Ut, Lt} =
19
+        try
20
+            Ut0 = erlang:localtime_to_universaltime(DateTime, false),
21
+            {Ut0, erlang:universaltime_to_localtime(Ut0)}
22
+        catch error:badarg -> {error, error}
23
+        end,
24
     %% Return the valid universal times
25
     case {LtDst,Lt} of
26
 	{DateTime,DateTime} when UtDst =/= Ut ->
(-)lang/erlang-runtime17/files/patch-lib_wx_c__src_wxe__impl.cpp (-20 lines)
Removed Link Here
1
--- lib/wx/c_src/wxe_impl.cpp.orig	2017-01-30 23:13:25 UTC
2
+++ lib/wx/c_src/wxe_impl.cpp
3
@@ -666,7 +666,7 @@ void * WxeApp::getPtr(char * bp, wxeMemE
4
     throw wxe_badarg(index);
5
   }
6
   void * temp = memenv->ref2ptr[index];
7
-  if((index < memenv->next) && ((index == 0) || (temp > NULL)))
8
+  if((index < memenv->next) && ((index == 0) || (temp != NULL)))
9
     return temp;
10
   else {
11
     throw wxe_badarg(index);
12
@@ -678,7 +678,7 @@ void WxeApp::registerPid(char * bp, ErlD
13
   if(!memenv)
14
     throw wxe_badarg(index);
15
   void * temp = memenv->ref2ptr[index];
16
-  if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
17
+  if((index < memenv->next) && ((index == 0) || (temp != NULL))) {
18
     ptrMap::iterator it;
19
     it = ptr2ref.find(temp);
20
     if(it != ptr2ref.end()) {
(-)lang/erlang-runtime17/files/pkg-message.in (-6 lines)
Removed Link Here
1
===========================================================================
2
3
To use this runtime port for development or testing, just prepend
4
its binary path ("%%LOCALBASE%%/lib/%%ERLANG_LIB%%/bin") to your PATH variable.
5
6
===========================================================================
(-)lang/erlang-runtime17/pkg-descr (-10 lines)
Removed Link Here
1
Erlang is a programming language used to build massively scalable soft
2
real-time systems with requirements on high availability. Some of its
3
uses are in telecoms, banking, e-commerce, computer telephony and
4
instant messaging. Erlang's runtime system has built-in support for
5
concurrency, distribution and fault tolerance.
6
7
This port contains a standalone runtime environment of Erlang 17
8
to be used during the development of OTP applications.
9
10
WWW: http://www.erlang.org/
(-)lang/erlang-runtime18/Makefile (-156 lines)
Removed Link Here
1
# Created by: ruslan@shevchenko.kiev.ua
2
# $FreeBSD$
3
4
PORTNAME=	erlang
5
PORTVERSION=	18.3.4.11
6
CATEGORIES=	lang parallel java
7
MASTER_SITES=	http://www.erlang.org/download/:erlangorg			\
8
		http://erlang.stacken.kth.se/download/:erlangorg		\
9
		http://www.csd.uu.se/ftp/mirror/erlang/download/:erlangorg	\
10
		http://olgeni.olgeni.com/~olgeni/distfiles/:local		\
11
		LOCAL/olgeni:local
12
PKGNAMESUFFIX=	-runtime18
13
DISTNAME=	otp_src_${ERLANG_REL}
14
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:erlangorg		\
15
		preloaded-${PORTVERSION}${EXTRACT_SUFX}:local
16
DIST_SUBDIR=	erlang
17
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
18
19
PATCH_SITES=	http://olgeni.olgeni.com/~olgeni/distfiles/ \
20
		LOCAL/olgeni
21
PATCHFILES=	patch-otp-18.3.1 patch-otp-18.3.2 patch-otp-18.3.3 \
22
		patch-otp-18.3.4 patch-otp-18.3.4.1 patch-otp-18.3.4.2 \
23
		patch-otp-18.3.4.3 patch-otp-18.3.4.4 patch-otp-18.3.4.5 \
24
		patch-otp-18.3.4.6 patch-otp-18.3.4.7 patch-otp-18.3.4.8 \
25
		patch-otp-18.3.4.9 patch-otp-18.3.4.10 patch-otp-18.3.4.11
26
27
MAINTAINER=	erlang@FreeBSD.org
28
COMMENT=	Functional programming language from Ericsson
29
30
LICENSE=	APACHE20
31
32
WRKSRC=		${WRKDIR}/otp_src_${ERLANG_REL}
33
34
ERLANG_LIB=	${PORTNAME}${PORTVERSION:C/\..*//}
35
ERLANG_REL=	18.3
36
37
OPTIONS_SUB=	yes
38
SUB_FILES=	pkg-message
39
SUB_LIST=	ERLANG_LIB=${ERLANG_LIB}
40
41
MAKE_JOBS_UNSAFE=yes
42
43
OPTIONS_DEFINE=	DIRTY DTRACE GS HIPE JAVA KQUEUE NATIVE ODBC OPENSSL SCTP SMP THREADS WX
44
OPTIONS_DEFAULT=DTRACE HIPE KQUEUE OPENSSL SCTP SMP THREADS
45
46
DIRTY_DESC=	Enable Dirty schedulers (experimental)
47
GS_DESC=	Enable GS application (deprecated)
48
HIPE_DESC=	Build native HiPE compiler
49
KQUEUE_DESC=	Enable Kernel Poll (kqueue) support
50
NATIVE_DESC=	Enable native libraries
51
SCTP_DESC=	Enable SCTP support
52
SMP_DESC=	Enable SMP support
53
WX_DESC=	Enable WX application
54
55
NATIVE_IMPLIES=	HIPE
56
57
.if !exists(/usr/sbin/dtrace)
58
OPTIONS_EXCLUDE+=	DTRACE
59
.endif
60
61
OPTIONS_EXCLUDE_DragonFly=	HIPE NATIVE SCTP
62
# ld(1) fails to link probes: missing __dtrace_erlang___* symbols
63
OPTIONS_EXCLUDE_aarch64=	DTRACE
64
OPTIONS_EXCLUDE_armv6=		DTRACE
65
OPTIONS_EXCLUDE_armv7=		DTRACE
66
OPTIONS_EXCLUDE_i386=		DTRACE
67
68
OPENSSL_VARS=	BROKEN_SSL=openssl111
69
70
GNU_CONFIGURE=	yes
71
LDFLAGS+=	-L${LOCALBASE}/lib
72
USES=		gmake ncurses perl5
73
USE_PERL5=	build
74
75
# If you run Erlang and get a message resembling "WARNING: number of
76
# probes fixed does not match the number of defined probes (54 != 132,
77
# respectively)" you probably misconfigured DTrace in some way.
78
79
DIRTY_CONFIGURE_ENABLE=	dirty-schedulers
80
DTRACE_CFLAGS=		-fno-omit-frame-pointer
81
DTRACE_CONFIGURE_WITH=	dynamic-trace=dtrace
82
DTRACE_VARS=		STRIP=""
83
GS_USES=		tk:run
84
HIPE_CONFIGURE_ENABLE=	hipe
85
JAVA_CONFIGURE_ENV=	ac_cv_prog_JAVAC="${JAVAC}"
86
JAVA_CONFIGURE_WITH=	javac
87
JAVA_VARS=		USE_JAVA=yes
88
KQUEUE_CONFIGURE_ENABLE=kernel-poll
89
NATIVE_CONFIGURE_ENABLE=native-libs
90
ODBC_CONFIGURE_WITH=	odbc
91
ODBC_LIB_DEPENDS=	libodbc.so:databases/unixODBC
92
OPENSSL_CONFIGURE_WITH=	ssl=${OPENSSLBASE}
93
OPENSSL_USES=		ssl
94
SCTP_CONFIGURE_ENABLE=	sctp
95
SMP_CONFIGURE_ENABLE=	smp-support
96
THREADS_CONFIGURE_ENABLE=	threads
97
WX_CONFIGURE_WITH=	wx-config=${WX_CONFIG}
98
WX_VARS=		USE_WX=2.8+ WX_COMPS="wx contrib" USE_GL="gl glu"
99
100
.include <bsd.port.options.mk>
101
102
.include <bsd.port.pre.mk>
103
104
.if ${OPSYS} == FreeBSD
105
.  if ${OSVERSION} >= 1200085 && ${SSL_DEFAULT} == base
106
BROKEN=	Does not support OpenSSL 1.1, use Erlang 19+
107
.  endif
108
.endif
109
110
.if ${OPSYS} == FreeBSD
111
CFLAGS+=	-DMAP_NORESERVE=0
112
.endif
113
114
.if ${ARCH} == i386
115
MAKE_ARGS+=	ARCH=x86
116
.endif
117
118
.if ${ARCH} == armv6 || ${ARCH} == armv7
119
MAKE_ARGS+=	ARCH=arm
120
.endif
121
122
pre-configure:
123
	cd ${WRKSRC} && ${TAR} --unlink -xzpf ${DISTDIR}/${DIST_SUBDIR}/preloaded-${PORTVERSION}${EXTRACT_SUFX}
124
125
pre-configure-MX-off:
126
	echo "disabled by port options" > ${WRKSRC}/lib/wx/SKIP
127
128
post-configure-ODBC-on:
129
	${RM} ${WRKSRC}/lib/odbc/SKIP
130
131
pre-build-NATIVE-on:
132
	@cd ${WRKSRC} && ${MAKE_CMD} clean
133
134
post-install-GS-off:
135
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/gs-*
136
137
post-install-JAVA-off:
138
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/jinterface-*
139
140
post-install-ODBC-off:
141
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/odbc-*
142
143
post-install-OPENSSL-off:
144
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/crypto-*
145
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssh-*
146
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssl-*
147
148
post-install-WX-off:
149
	${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/wx-*
150
151
post-stage:
152
	${FIND} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/* -type d -empty -delete
153
	@cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
154
		| ${SORT} >> ${TMPPLIST}
155
156
.include <bsd.port.post.mk>
(-)lang/erlang-runtime18/distinfo (-35 lines)
Removed Link Here
1
TIMESTAMP = 1542300070
2
SHA256 (erlang/otp_src_18.3.tar.gz) = fdab8129a1cb935db09f1832e3a7d511a4aeb2b9bb3602ca6a7ccb9730d5c9c3
3
SIZE (erlang/otp_src_18.3.tar.gz) = 68292101
4
SHA256 (erlang/preloaded-18.3.4.11.tar.gz) = 70bb83686445e4960ff178dfc9df7ad6e9bf018ec9cf45526fe5300cfb0c1b92
5
SIZE (erlang/preloaded-18.3.4.11.tar.gz) = 305266
6
SHA256 (erlang/patch-otp-18.3.1) = 19a45ed599f4348dd83540c4c3a60bfe20dac5f83643cff1dd71d1b5af1e9bae
7
SIZE (erlang/patch-otp-18.3.1) = 20435
8
SHA256 (erlang/patch-otp-18.3.2) = 064065ebeadc26a76fcd1b291bc884039117ee8699fe5015809a025dc63a0f35
9
SIZE (erlang/patch-otp-18.3.2) = 70255
10
SHA256 (erlang/patch-otp-18.3.3) = 5a55b18ee8ec15c8cfe9ffd4687588c0a6f71216538575ae3bbbf67eb5a0485a
11
SIZE (erlang/patch-otp-18.3.3) = 87238
12
SHA256 (erlang/patch-otp-18.3.4) = 33ceea8b53d7d2a67b78085d7bc80c8b04f5cac792aee49410c86ac45895151a
13
SIZE (erlang/patch-otp-18.3.4) = 31596
14
SHA256 (erlang/patch-otp-18.3.4.1) = 5998c9578b92cbc4e12d47ae7001f52150d3a065e8101569977e2caa62674456
15
SIZE (erlang/patch-otp-18.3.4.1) = 23095
16
SHA256 (erlang/patch-otp-18.3.4.2) = 4bce5c1965d4924463c6a243e014cdf5120cd8e75b903e0d00b8557fc00b7bad
17
SIZE (erlang/patch-otp-18.3.4.2) = 23520
18
SHA256 (erlang/patch-otp-18.3.4.3) = 594be3196ea5a87bebcbc414b189efced68a6de0ddee12bcab7089d5de51f85f
19
SIZE (erlang/patch-otp-18.3.4.3) = 5893
20
SHA256 (erlang/patch-otp-18.3.4.4) = a2cfac97e2ecb09ec53ebe7fcba953382e4b01b567219ad4abdd63652da9dc91
21
SIZE (erlang/patch-otp-18.3.4.4) = 6547
22
SHA256 (erlang/patch-otp-18.3.4.5) = d539ac9b72adbda634adfc0fe391e32c0a82c7b4a8807dc606f98bf816397821
23
SIZE (erlang/patch-otp-18.3.4.5) = 34006
24
SHA256 (erlang/patch-otp-18.3.4.6) = dc3682fb9c2f456cd9b4eb9ab8d00c09f6012a2123e416e2fee8e17ce69ac4ef
25
SIZE (erlang/patch-otp-18.3.4.6) = 37943
26
SHA256 (erlang/patch-otp-18.3.4.7) = 8b79ab844e465e790eb4ef016d49b917444371190fead05cee2675b435d8a029
27
SIZE (erlang/patch-otp-18.3.4.7) = 10475
28
SHA256 (erlang/patch-otp-18.3.4.8) = bcac3fe782e7a4b78f36d9d5c928b1d7a2e67aff20ac7bf8f82e5eaab33a60a1
29
SIZE (erlang/patch-otp-18.3.4.8) = 19206
30
SHA256 (erlang/patch-otp-18.3.4.9) = 3d031267f0111c9bd9a55d44a4f8cb67ad4cfda44f25d5a01e459640b7905d89
31
SIZE (erlang/patch-otp-18.3.4.9) = 5284
32
SHA256 (erlang/patch-otp-18.3.4.10) = 51f1840f3969fe28a042507a803871a132a483008e58a80e15877c8938bc0175
33
SIZE (erlang/patch-otp-18.3.4.10) = 5159
34
SHA256 (erlang/patch-otp-18.3.4.11) = ff2402592d1d6ba44043b8cdb28b7f569c48e1920691e2709dad2e8f9bd2b850
35
SIZE (erlang/patch-otp-18.3.4.11) = 34336
(-)lang/erlang-runtime18/files/patch-Makefile.in (-20 lines)
Removed Link Here
1
--- Makefile.in.orig	2015-06-23 18:56:21 UTC
2
+++ Makefile.in
3
@@ -60,7 +60,7 @@ bindir		= @bindir@
4
 libdir		= @libdir@
5
 
6
 # Where Erlang/OTP is located
7
-libdir_suffix	= /erlang
8
+libdir_suffix	= /erlang18
9
 erlang_libdir	= $(libdir)$(libdir_suffix)
10
 erlang_bindir	= $(erlang_libdir)/bin
11
 
12
@@ -1013,7 +1013,7 @@ $(TEST_DIRS):
13
 #
14
 # Order is important here, don't change it!
15
 #
16
-INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version install.bin
17
+INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version
18
 
19
 install: $(INST_DEP)
20
 
(-)lang/erlang-runtime18/files/patch-erts_etc_unix_run__erl.c (-12 lines)
Removed Link Here
1
--- erts/etc/unix/run_erl.c.orig	2015-03-31 12:32:52 UTC
2
+++ erts/etc/unix/run_erl.c
3
@@ -73,9 +73,6 @@
4
 #ifdef HAVE_UTMP_H
5
 #  include <utmp.h>
6
 #endif
7
-#ifdef HAVE_UTIL_H
8
-#  include <util.h>
9
-#endif
10
 #ifdef HAVE_SYS_IOCTL_H
11
 #  include <sys/ioctl.h>
12
 #endif
(-)lang/erlang-runtime18/files/patch-lib_crypto_c__src_Makefile.in (-11 lines)
Removed Link Here
1
--- lib/crypto/c_src/Makefile.in.orig	2016-03-14 20:11:15 UTC
2
+++ lib/crypto/c_src/Makefile.in
3
@@ -90,7 +90,7 @@ endif
4
 DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
5
 
6
 ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
7
-SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
8
+SSL_DED_LD_RUNTIME_LIBRARY_PATH =
9
 CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME)
10
 EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
11
 else
(-)lang/erlang-runtime18/files/patch-lib_crypto_priv_Makefile (-11 lines)
Removed Link Here
1
--- lib/crypto/priv/Makefile.orig	2016-03-14 20:11:15 UTC
2
+++ lib/crypto/priv/Makefile
3
@@ -61,7 +61,7 @@ OBJS = $(OBJDIR)/crypto.o
4
 # ----------------------------------------------------
5
 
6
 $(SO_NIFLIB): $(OBJS)
7
-	$(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
8
+	$(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
9
 	-o $@ $^ -lcrypto
10
 
11
 $(DLL_NIFLIB): $(OBJS)
(-)lang/erlang-runtime18/files/patch-lib_erl__interface_src_connect_ei__resolve.c (-12 lines)
Removed Link Here
1
--- lib/erl_interface/src/connect/ei_resolve.c.orig	2015-03-31 12:32:52 UTC
2
+++ lib/erl_interface/src/connect/ei_resolve.c
3
@@ -649,7 +649,8 @@ struct hostent *ei_gethostbyname_r(const
4
 
5
   return result;
6
 #else
7
-  return gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
8
+  struct hostent *dummy;
9
+  return gethostbyname_r(name,hostp,buffer,buflen,&dummy,h_errnop);
10
 #endif
11
 #endif
12
 #endif
(-)lang/erlang-runtime18/files/patch-lib_stdlib_src_calendar.erl (-26 lines)
Removed Link Here
1
--- lib/stdlib/src/calendar.erl.orig	2015-03-31 12:32:52 UTC
2
+++ lib/stdlib/src/calendar.erl
3
@@ -279,11 +279,19 @@ local_time_to_universal_time(DateTime, I
4
       DateTime1 :: datetime1970(),
5
       DateTime :: datetime1970().
6
 local_time_to_universal_time_dst(DateTime) ->
7
-    UtDst = erlang:localtime_to_universaltime(DateTime, true),
8
-    Ut    = erlang:localtime_to_universaltime(DateTime, false),
9
     %% Reverse check the universal times
10
-    LtDst = erlang:universaltime_to_localtime(UtDst),
11
-    Lt    = erlang:universaltime_to_localtime(Ut),
12
+    {UtDst, LtDst} =
13
+        try
14
+            UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
15
+            {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
16
+        catch error:badarg -> {error, error}
17
+        end,
18
+    {Ut, Lt} =
19
+        try
20
+            Ut0 = erlang:localtime_to_universaltime(DateTime, false),
21
+            {Ut0, erlang:universaltime_to_localtime(Ut0)}
22
+        catch error:badarg -> {error, error}
23
+        end,
24
     %% Return the valid universal times
25
     case {LtDst,Lt} of
26
 	{DateTime,DateTime} when UtDst =/= Ut ->
(-)lang/erlang-runtime18/files/patch-lib_wx_c__src_wxe__impl.cpp (-20 lines)
Removed Link Here
1
--- lib/wx/c_src/wxe_impl.cpp.orig	2017-01-30 23:13:25 UTC
2
+++ lib/wx/c_src/wxe_impl.cpp
3
@@ -666,7 +666,7 @@ void * WxeApp::getPtr(char * bp, wxeMemE
4
     throw wxe_badarg(index);
5
   }
6
   void * temp = memenv->ref2ptr[index];
7
-  if((index < memenv->next) && ((index == 0) || (temp > NULL)))
8
+  if((index < memenv->next) && ((index == 0) || (temp != NULL)))
9
     return temp;
10
   else {
11
     throw wxe_badarg(index);
12
@@ -678,7 +678,7 @@ void WxeApp::registerPid(char * bp, ErlD
13
   if(!memenv)
14
     throw wxe_badarg(index);
15
   void * temp = memenv->ref2ptr[index];
16
-  if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
17
+  if((index < memenv->next) && ((index == 0) || (temp != NULL))) {
18
     ptrMap::iterator it;
19
     it = ptr2ref.find(temp);
20
     if(it != ptr2ref.end()) {
(-)lang/erlang-runtime18/files/pkg-message.in (-6 lines)
Removed Link Here
1
===========================================================================
2
3
To use this runtime port for development or testing, just prepend
4
its binary path ("%%LOCALBASE%%/lib/%%ERLANG_LIB%%/bin") to your PATH variable.
5
6
===========================================================================
(-)lang/erlang-runtime18/pkg-descr (-10 lines)
Removed Link Here
1
Erlang is a programming language used to build massively scalable soft
2
real-time systems with requirements on high availability. Some of its
3
uses are in telecoms, banking, e-commerce, computer telephony and
4
instant messaging. Erlang's runtime system has built-in support for
5
concurrency, distribution and fault tolerance.
6
7
This port contains a standalone runtime environment of Erlang 18
8
to be used during the development of OTP applications.
9
10
WWW: http://www.erlang.org/

Return to bug 235733