summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2020-01-01 14:20:43 +0000
committerRene Ladan <rene@FreeBSD.org>2020-01-01 14:20:43 +0000
commit758edde62973c24d29b0c082f9cab9329b405194 (patch)
tree814d3f82f4830b66ab0ffc2cdbfd041d23929b49
parent1748f8c64c57c4a14ad519c67b1e2166506c444d (diff)
downloadfreebsd-ports-758edde62973c24d29b0c082f9cab9329b405194.zip
Remove expired ports:
2020-01-01 databases/couchdb: No longer supported upstream, move to databases/couchdb2 2020-01-01 databases/riak: No longer supported upstream, see riak 2.9.0 and newer 2020-01-01 lang/erlang-runtime15: No longer supported upstream, use lang/erlang >= 21 2020-01-01 lang/erlang-runtime16: No longer supported upstream, use lang/erlang >=21 2020-01-01 lang/erlang-runtime17: No longer supported upstream, use lang/erlang >=21 2020-01-01 lang/erlang-runtime18: No longer supported upstream, use lang/erlang >=21 2020-01-01 lang/erlang-runtime19: No longer supported upstream, use lang/erlang >=21
-rw-r--r--MOVED7
-rw-r--r--databases/Makefile2
-rw-r--r--databases/couchdb/Makefile78
-rw-r--r--databases/couchdb/distinfo3
-rw-r--r--databases/couchdb/files/couchdb.in82
-rw-r--r--databases/couchdb/files/pkg-message.in10
-rw-r--r--databases/couchdb/pkg-descr7
-rw-r--r--databases/couchdb/pkg-plist611
-rw-r--r--databases/riak/Makefile91
-rw-r--r--databases/riak/distinfo2
-rw-r--r--databases/riak/files/patch-deps-eleveldb-c_src-leveldb-build_detect_platform29
-rw-r--r--databases/riak/files/patch-deps-eleveldb-c_src-leveldb-db-version_set.cc36
-rw-r--r--databases/riak/files/patch-deps-erlang_js-c_src-patches-js-src-config-FreeBSD.mk.patch18
-rw-r--r--databases/riak/files/patch-deps-erlang_js-c_src-patches-nspr-src-ptsynch.c.patch20
-rw-r--r--databases/riak/files/patch-deps-node_package-priv-base-env.sh28
-rw-r--r--databases/riak/files/patch-rel-reltool.config16
-rw-r--r--databases/riak/files/patch-rel-vars.config41
-rw-r--r--databases/riak/files/riak.in84
-rw-r--r--databases/riak/pkg-descr6
-rw-r--r--databases/riak/pkg-plist19
-rw-r--r--lang/Makefile5
-rw-r--r--lang/erlang-runtime15/Makefile131
-rw-r--r--lang/erlang-runtime15/distinfo3
-rw-r--r--lang/erlang-runtime15/files/patch-Makefile.in20
-rw-r--r--lang/erlang-runtime15/files/patch-erts-emulator-Makefile.in11
-rw-r--r--lang/erlang-runtime15/files/patch-erts_emulator_drivers_common_efile__drv.c341
-rw-r--r--lang/erlang-runtime15/files/patch-erts_emulator_utils_beam__makeops11
-rw-r--r--lang/erlang-runtime15/files/patch-erts_etc_unix_run__erl.c12
-rw-r--r--lang/erlang-runtime15/files/patch-lib_erl__interface_src_connect_ei__resolve.c12
-rw-r--r--lang/erlang-runtime15/files/patch-lib_et_src_et__gs__contents__viewer.erl10
-rw-r--r--lang/erlang-runtime15/files/patch-lib_et_src_et__gs__viewer.erl12
-rw-r--r--lang/erlang-runtime15/files/patch-lib_gs_src_tool__utils.erl84
-rw-r--r--lang/erlang-runtime15/files/patch-lib_kernel_test_file__SUITE.erl80
-rw-r--r--lang/erlang-runtime15/files/patch-lib_odbc_c__src_odbcserver.c11
-rw-r--r--lang/erlang-runtime15/files/patch-lib_runtime__tools_src_observer__backend.erl11
-rw-r--r--lang/erlang-runtime15/files/patch-lib_ssl_src_ssl__manager.erl11
-rw-r--r--lang/erlang-runtime15/files/patch-lib_stdlib_src_calendar.erl26
-rw-r--r--lang/erlang-runtime15/files/pkg-message.in8
-rw-r--r--lang/erlang-runtime15/pkg-descr10
-rw-r--r--lang/erlang-runtime16/Makefile131
-rw-r--r--lang/erlang-runtime16/distinfo3
-rw-r--r--lang/erlang-runtime16/files/patch-Makefile.in20
-rw-r--r--lang/erlang-runtime16/files/patch-erts_emulator_drivers_common_efile__drv.c11
-rw-r--r--lang/erlang-runtime16/files/patch-erts_etc_unix_run__erl.c12
-rw-r--r--lang/erlang-runtime16/files/patch-lib_crypto_c__src_Makefile.in11
-rw-r--r--lang/erlang-runtime16/files/patch-lib_crypto_priv_Makefile11
-rw-r--r--lang/erlang-runtime16/files/patch-lib_erl__interface_src_connect_ei__resolve.c12
-rw-r--r--lang/erlang-runtime16/files/patch-lib_et_src_et__gs__contents__viewer.erl10
-rw-r--r--lang/erlang-runtime16/files/patch-lib_et_src_et__gs__viewer.erl12
-rw-r--r--lang/erlang-runtime16/files/patch-lib_gs_src_tool__utils.erl84
-rw-r--r--lang/erlang-runtime16/files/patch-lib_stdlib_src_calendar.erl26
-rw-r--r--lang/erlang-runtime16/files/patch-lib_wx_c__src_wxe__impl.cpp20
-rw-r--r--lang/erlang-runtime16/files/pkg-message.in8
-rw-r--r--lang/erlang-runtime16/pkg-descr10
-rw-r--r--lang/erlang-runtime17/Makefile144
-rw-r--r--lang/erlang-runtime17/distinfo3
-rw-r--r--lang/erlang-runtime17/files/patch-Makefile.in20
-rw-r--r--lang/erlang-runtime17/files/patch-erts_emulator_drivers_common_efile__drv.c11
-rw-r--r--lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c12
-rw-r--r--lang/erlang-runtime17/files/patch-lib_crypto_c__src_Makefile.in11
-rw-r--r--lang/erlang-runtime17/files/patch-lib_crypto_priv_Makefile11
-rw-r--r--lang/erlang-runtime17/files/patch-lib_erl__interface_src_connect_ei__resolve.c12
-rw-r--r--lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__connection.erl30
-rw-r--r--lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__connection.hrl12
-rw-r--r--lang/erlang-runtime17/files/patch-lib_ssl_src_tls__connection.erl10
-rw-r--r--lang/erlang-runtime17/files/patch-lib_stdlib_src_calendar.erl26
-rw-r--r--lang/erlang-runtime17/files/patch-lib_wx_c__src_wxe__impl.cpp20
-rw-r--r--lang/erlang-runtime17/files/pkg-message.in8
-rw-r--r--lang/erlang-runtime17/pkg-descr10
-rw-r--r--lang/erlang-runtime18/Makefile146
-rw-r--r--lang/erlang-runtime18/distinfo3
-rw-r--r--lang/erlang-runtime18/files/patch-Makefile.in20
-rw-r--r--lang/erlang-runtime18/files/patch-erts_etc_unix_run__erl.c12
-rw-r--r--lang/erlang-runtime18/files/patch-lib_crypto_c__src_Makefile.in11
-rw-r--r--lang/erlang-runtime18/files/patch-lib_crypto_priv_Makefile11
-rw-r--r--lang/erlang-runtime18/files/patch-lib_erl__interface_src_connect_ei__resolve.c12
-rw-r--r--lang/erlang-runtime18/files/patch-lib_stdlib_src_calendar.erl26
-rw-r--r--lang/erlang-runtime18/files/patch-lib_wx_c__src_wxe__impl.cpp20
-rw-r--r--lang/erlang-runtime18/files/pkg-message.in8
-rw-r--r--lang/erlang-runtime18/pkg-descr10
-rw-r--r--lang/erlang-runtime19/Makefile143
-rw-r--r--lang/erlang-runtime19/distinfo3
-rw-r--r--lang/erlang-runtime19/files/patch-Makefile.in20
-rw-r--r--lang/erlang-runtime19/files/patch-OpenSSL-1.1-a1083
-rw-r--r--lang/erlang-runtime19/files/patch-OpenSSL-1.1-b293
-rw-r--r--lang/erlang-runtime19/files/patch-erts_etc_unix_run__erl.c12
-rw-r--r--lang/erlang-runtime19/files/patch-lib_crypto_c__src_Makefile.in11
-rw-r--r--lang/erlang-runtime19/files/patch-lib_crypto_priv_Makefile11
-rw-r--r--lang/erlang-runtime19/files/patch-lib_erl__interface_src_connect_ei__resolve.c12
-rw-r--r--lang/erlang-runtime19/files/patch-lib_hipe_llvm_hipe__llvm__main.erl11
-rw-r--r--lang/erlang-runtime19/files/patch-lib_stdlib_src_calendar.erl26
-rw-r--r--lang/erlang-runtime19/files/patch-lib_wx_c__src_wxe__impl.cpp20
-rw-r--r--lang/erlang-runtime19/files/pkg-message.in8
-rw-r--r--lang/erlang-runtime19/pkg-descr10
94 files changed, 7 insertions, 4655 deletions
diff --git a/MOVED b/MOVED
index 2286b408b6cb..9b8ccd815e0f 100644
--- a/MOVED
+++ b/MOVED
@@ -13717,3 +13717,10 @@ x11-fm/thunar-vfs||2020-01-01|Has expired: Functionality included in Thunar
sysutils/ansible1||2020-01-01|Has expired: please upgrade to sysutils/ansible
sysutils/bsdploy||2020-01-01|Removed, depends on expired sysutils/ansible1
sysutils/py-ploy_ansible||2020-01-01|Removed, depends on expired sysutils/ansible1
+databases/couchdb|databases/couchdb2|2020-01-01|Has expired: No longer supported upstream, move to databases/couchdb2
+databases/riak||2020-01-01|Has expired: No longer supported upstream, see riak 2.9.0 and newer
+lang/erlang-runtime15|lang/erlang-runtime21|2020-01-01|Has expired: No longer supported upstream, use lang/erlang >= 21
+lang/erlang-runtime16|lang/erlang-runtime21|2020-01-01|Has expired: No longer supported upstream, use lang/erlang >=21
+lang/erlang-runtime17|lang/erlang-runtime21|2020-01-01|Has expired: No longer supported upstream, use lang/erlang >=21
+lang/erlang-runtime18|lang/erlang-runtime21|2020-01-01|Has expired: No longer supported upstream, use lang/erlang >=21
+lang/erlang-runtime19|lang/erlang-runtime21|2020-01-01|Has expired: No longer supported upstream, use lang/erlang >=21
diff --git a/databases/Makefile b/databases/Makefile
index 9c9946f423e2..e330ea559ea8 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -39,7 +39,6 @@
SUBDIR += cegobridge
SUBDIR += clickhouse
SUBDIR += cockroach
- SUBDIR += couchdb
SUBDIR += couchdb2
SUBDIR += courier-authlib-mysql
SUBDIR += courier-authlib-pgsql
@@ -882,7 +881,6 @@
SUBDIR += redis_exporter
SUBDIR += redisdesktopmanager
SUBDIR += retcl
- SUBDIR += riak
SUBDIR += rocksdb
SUBDIR += rocksdb-lite
SUBDIR += rrdman
diff --git a/databases/couchdb/Makefile b/databases/couchdb/Makefile
deleted file mode 100644
index 714532ff9f2e..000000000000
--- a/databases/couchdb/Makefile
+++ /dev/null
@@ -1,78 +0,0 @@
-# Created by: Ditesh Shashikant Gathani <ditesh@gathani.org>
-# $FreeBSD$
-
-PORTNAME= couchdb
-DISTVERSION= 1.7.2
-PORTREVISION= 5
-PORTEPOCH= 2
-CATEGORIES= databases
-MASTER_SITES= APACHE/couchdb/source/${DISTVERSION}
-DISTNAME= apache-couchdb-${DISTVERSION}
-
-MAINTAINER= erlang@FreeBSD.org
-COMMENT= Document database server, accessible via a RESTful JSON API
-
-LICENSE= APACHE20 BSD3CLAUSE ISCL WTFPL OFL11
-LICENSE_COMB= multi
-
-DEPRECATED= No longer supported upstream, move to databases/couchdb2
-EXPIRATION_DATE= 2020-01-01
-
-LIB_DEPENDS= libicudata.so:devel/icu \
- libmozjs185.so:lang/spidermonkey185 \
- libcurl.so:ftp/curl
-BUILD_DEPENDS= ${LOCALBASE}/bin/help2man:misc/help2man \
- erlang-runtime19>=19.3:lang/erlang-runtime19
-RUN_DEPENDS= erlang-runtime19>=19.3:lang/erlang-runtime19
-
-USES= cpe gmake libtool
-USE_RC_SUBR= couchdb
-SUB_FILES= pkg-message
-PLIST_SUB= VERSION=${DISTVERSION}
-CPE_VENDOR= apache
-GNU_CONFIGURE= yes
-USE_LDCONFIG= yes
-CONFIGURE_ARGS= --with-erlang=${LOCALBASE}/lib/erlang19/usr/include \
- --localstatedir=/var \
- --disable-init \
- --with-js-include=${LOCALBASE}/include/js \
- --with-js-lib=${LOCALBASE}/lib
-CONFIGURE_ENV+= ERL=${LOCALBASE}/lib/erlang19/bin/erl \
- ERLC=${LOCALBASE}/lib/erlang19/bin/erlc
-
-USERS= couchdb
-GROUPS= couchdb
-
-# Override default value of ${STRIP} because the underlying Makefile
-# erroneously tries to install a shell script with ${STRIP}, causing
-# an install error.
-STRIP= #empty
-
-INFO= CouchDB
-
-OPTIONS_DEFINE= DOCS
-
-.include <bsd.port.options.mk>
-
-post-patch:
-# DB files are stored by default in /var/db/couchdb
-# Ports framework expects info pages to have an info extension
- @${REINPLACE_CMD} '/localstatelibdir=/s|/lib/|/db/|' \
- ${WRKSRC}/configure
- @${REINPLACE_CMD} 's|\(info_file_inst = CouchDB\)$$|\1.info|' \
- ${WRKSRC}/share/doc/build/Makefile.in
-
-post-patch-DOCS-off:
- @${REINPLACE_CMD} -e 's/install-data-am$$//' ${WRKSRC}/Makefile.in
-
-post-configure:
-# Cater for parallel Spidermonkey v1.7 and v1.8.5 installs by ensuring that
-# jsapi.h gets pulled from /usr/local/include/js/ instead of /usr/local/include
- @${FIND} ${WRKSRC} -name Makefile|${XARGS} ${REINPLACE_CMD} \
- -e 's|include -I/usr/local/include/js|include/js -I/usr/local/include|'
-post-install:
- @${MV} ${STAGEDIR}${PREFIX}/lib/couchdb/bin/couchjs ${STAGEDIR}${PREFIX}/bin/couchjs
- @${RMDIR} ${STAGEDIR}${PREFIX}/lib/couchdb/bin
- @${MV} ${WRKSRC}/etc/couchdb/local.ini ${STAGEDIR}${PREFIX}/etc/couchdb/local.ini.sample
-
-.include <bsd.port.mk>
diff --git a/databases/couchdb/distinfo b/databases/couchdb/distinfo
deleted file mode 100644
index 630f8720260a..000000000000
--- a/databases/couchdb/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-TIMESTAMP = 1531177411
-SHA256 (apache-couchdb-1.7.2.tar.gz) = 7b7c0db046ded544a587a8935d495610dd10f01a9cae3cd42cf88c5ae40bc431
-SIZE (apache-couchdb-1.7.2.tar.gz) = 10009424
diff --git a/databases/couchdb/files/couchdb.in b/databases/couchdb/files/couchdb.in
deleted file mode 100644
index 25b66e6043c7..000000000000
--- a/databases/couchdb/files/couchdb.in
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-#
-# PROVIDE: couchdb
-# REQUIRE: LOGIN
-# KEYWORD: shutdown
-#
-# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
-# to enable this service:
-#
-# couchdb_enable (bool): Set to NO by default.
-# Set it to YES to enable couchdb.
-#
-# couchdb_enablelogs (bool): Set to YES by default.
-#
-# couchdb_etcdir (string): In case you want another dir
-# for default.ini/local.ini.
-#
-# couchdb_respawn (int): Set to none by default. If CouchDB crashes,
-# respawn after this many seconds.
-#
-# couchdb_erl_flags (string): Set to none by default. Additional Erlang flags
-# that are appended via ERL_ZFLAGS to the Erlang VM parameters.
-
-. /etc/rc.subr
-
-name="couchdb"
-rcvar=couchdb_enable
-
-load_rc_config $name
-
-: ${couchdb_enable:="NO"}
-couchdb_user="${couchdb_user:-"couchdb"}"
-couchdb_enablelogs="${couchdb_enablelogs:-"YES"}"
-couchdb_etcdir="${couchdb_etcdir:-"%%PREFIX%%/etc/couchdb"}"
-couchdb_respawn="${couchdb_respawn:-"0"}"
-couchdb_erl_flags="${couchdb_erl_flags:-""}"
-
-command="%%PREFIX%%/bin/${name}"
-pidfile="/var/run/${name}/${name}.pid"
-urifile="/var/run/${name}/couch.uri"
-
-command_args="-p ${pidfile} -b"
-
-couchdb_prestart()
-{
- install -o $couchdb_user /dev/null $pidfile
- install -o $couchdb_user /dev/null $urifile
-
- if [ -n "$couchdb_flags" ]; then
- case "$couchdb_flags" in
- *-[bp]*) err 1 'The -b and -p options should be removed from couchdb_flags' ;;
- esac
- return 0
- fi
-
- if [ $couchdb_respawn -gt 0 ]; then
- respawn="-r ${couchdb_respawn}"
- fi
-
- if checkyesno couchdb_enablelogs; then
- logfile=/var/log/${name}/couch.log
- errfile=/var/log/${name}/err.log
- else
- logfile=/dev/null
- errfile=/dev/null
- fi
-
- # couchdb supports passing options through to the erlang vm directly in
- # ERL_ZFLAGS which is appended to CouchDB own flags.
- ERL_ZFLAGS=${couchdb_erl_flags}
- export ERL_ZFLAGS
-
- command_args="-a ${couchdb_etcdir}/default.ini -a ${couchdb_etcdir}/local.ini ${respawn} -o ${logfile} -e ${errfile} ${command_args}"
-}
-
-start_precmd=${name}_prestart
-stop_cmd="${command} -d"
-status_cmd="${command} -s"
-
-run_rc_command "$1"
diff --git a/databases/couchdb/files/pkg-message.in b/databases/couchdb/files/pkg-message.in
deleted file mode 100644
index 9eda85a03a7c..000000000000
--- a/databases/couchdb/files/pkg-message.in
+++ /dev/null
@@ -1,10 +0,0 @@
-[
-{ type: install
- message: <<EOM
-ADMIN ACCOUNT
-By default no admin password or account is configured which leaves the DB
-server open. Add accounts to the bottom of %%PREFIX%%/etc/couchdb/local.ini
-to secure your installation (by default CouchDB listens on localhost only).
-EOM
-}
-]
diff --git a/databases/couchdb/pkg-descr b/databases/couchdb/pkg-descr
deleted file mode 100644
index 002b6bb486a8..000000000000
--- a/databases/couchdb/pkg-descr
+++ /dev/null
@@ -1,7 +0,0 @@
-Couchdb is a document database server, accessible via a RESTful JSON API. It has
-an ad-hoc and schema-free with a flat address space. CouchDB is distributed,
-featuring robust, incremental replication with bi-directional conflict detection
-and management. It features a table oriented reporting engine that uses
-Javascript as a query language.
-
-WWW: http://couchdb.org/
diff --git a/databases/couchdb/pkg-plist b/databases/couchdb/pkg-plist
deleted file mode 100644
index 95a93460b731..000000000000
--- a/databases/couchdb/pkg-plist
+++ /dev/null
@@ -1,611 +0,0 @@
-bin/couch-config
-bin/couchdb
-bin/couchjs
-%%ETCDIR%%/default.ini
-@dir(couchdb,couchdb,0750) %%ETCDIR%%/default.d
-@dir(couchdb,couchdb,0750) %%ETCDIR%%/local.d
-@dir(couchdb,couchdb,0750) /var/db/couchdb
-@dir(couchdb,couchdb,0750) /var/log/couchdb
-@dir(couchdb,couchdb,0750) /var/run/couchdb
-@sample(couchdb,couchdb,600) %%ETCDIR%%/local.ini.sample
-etc/logrotate.d/couchdb
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch.app
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_app.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_auth_cache.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_btree.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_changes.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_compaction_daemon.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_compress.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_config.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_config_writer.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_db.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_db_update_notifier.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_db_update_notifier_sup.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_db_updater.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_doc.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_drv.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_ejson_compare.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_event_sup.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_external_manager.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_external_server.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_file.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd_auth.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd_cors.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd_db.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd_external.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd_misc_handlers.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd_oauth.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd_proxy.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd_rewrite.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd_stats_handlers.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_httpd_vhost.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_key_tree.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_log.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_native_process.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_os_daemons.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_os_process.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_passwords.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_primary_sup.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_query_servers.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_rand.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_ref_counter.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_secondary_sup.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_server.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_server_sup.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_stats_aggregator.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_stats_collector.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_stream.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_task_status.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_users_db.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_util.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_uuids.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/couch_work_queue.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/ebin/json_stream_parse.beam
-lib/couchdb/erlang/lib/couch-%%VERSION%%/include/couch_db.hrl
-lib/couchdb/erlang/lib/couch-%%VERSION%%/include/couch_js_functions.hrl
-lib/couchdb/erlang/lib/couch-%%VERSION%%/priv/couchspawnkillable
-lib/couchdb/erlang/lib/couch-%%VERSION%%/priv/lib/couch_ejson_compare.so
-lib/couchdb/erlang/lib/couch-%%VERSION%%/priv/lib/couch_icu_driver.so
-lib/couchdb/erlang/lib/couch-%%VERSION%%/priv/stat_descriptions.cfg
-lib/couchdb/erlang/lib/couch_dbupdates-0.1/ebin/couch_dbupdates.beam
-lib/couchdb/erlang/lib/couch_dbupdates-0.1/ebin/couch_dbupdates_httpd.beam
-lib/couchdb/erlang/lib/couch_index-0.1/ebin/couch_index.beam
-lib/couchdb/erlang/lib/couch_index-0.1/ebin/couch_index_compactor.beam
-lib/couchdb/erlang/lib/couch_index-0.1/ebin/couch_index_server.beam
-lib/couchdb/erlang/lib/couch_index-0.1/ebin/couch_index_updater.beam
-lib/couchdb/erlang/lib/couch_index-0.1/ebin/couch_index_util.beam
-lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview.app
-lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview.beam
-lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview_cleanup.beam
-lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview_compactor.beam
-lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview_http.beam
-lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview_index.beam
-lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview_show.beam
-lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview_test_util.beam
-lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview_updater.beam
-lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview_util.beam
-lib/couchdb/erlang/lib/couch_mrview-0.1/include/couch_mrview.hrl
-lib/couchdb/erlang/lib/couch_plugins-0.1/ebin/couch_plugins.app
-lib/couchdb/erlang/lib/couch_plugins-0.1/ebin/couch_plugins.beam
-lib/couchdb/erlang/lib/couch_plugins-0.1/ebin/couch_plugins_httpd.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator.app
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator_api_wrap.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator_httpc.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator_httpc_pool.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator_httpd.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator_job_sup.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator_manager.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator_notifier.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator_utils.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator_worker.beam
-lib/couchdb/erlang/lib/couch_replicator-0.1/include/couch_replicator.hrl
-lib/couchdb/erlang/lib/couch_replicator-0.1/include/couch_replicator_api_wrap.hrl
-lib/couchdb/erlang/lib/couch_replicator-0.1/include/couch_replicator_js_functions.hrl
-lib/couchdb/erlang/lib/ejson-0.1.0/ebin/ejson.app
-lib/couchdb/erlang/lib/ejson-0.1.0/ebin/ejson.beam
-lib/couchdb/erlang/lib/ejson-0.1.0/ebin/mochijson2.beam
-lib/couchdb/erlang/lib/ejson-0.1.0/ebin/mochinum.beam
-lib/couchdb/erlang/lib/ejson-0.1.0/priv/ejson.so
-lib/couchdb/erlang/lib/erlang-oauth/ebin/oauth.app
-lib/couchdb/erlang/lib/erlang-oauth/ebin/oauth.beam
-lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse.app
-lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse.beam
-lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse_app.beam
-lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse_http_client.beam
-lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse_lb.beam
-lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse_lib.beam
-lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse_socks5.beam
-lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse_sup.beam
-lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse_test.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochifmt.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochifmt_records.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochifmt_std.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiglobal.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochihex.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochijson.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochijson2.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochilists.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochilogfile2.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochinum.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochitemp.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiutf8.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb.app
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_acceptor.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_app.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_charref.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_cookies.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_cover.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_echo.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_headers.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_html.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_http.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_io.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_mime.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_multipart.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_request.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_response.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_skel.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_socket.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_socket_server.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_sup.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb_util.beam
-lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/reloader.beam
-lib/couchdb/erlang/lib/snappy-1.0.5/ebin/snappy.app
-lib/couchdb/erlang/lib/snappy-1.0.5/ebin/snappy.beam
-lib/couchdb/erlang/lib/snappy-1.0.5/priv/snappy_nif.so
-man/man1/couchdb.1.gz
-man/man1/couchjs.1.gz
-%%DATADIR%%/server/main-coffee.js
-%%DATADIR%%/server/main.js
-%%DATADIR%%/www/_sidebar.html
-%%DATADIR%%/www/config.html
-%%DATADIR%%/www/couch_tests.html
-%%DATADIR%%/www/custom_test.html
-%%DATADIR%%/www/database.html
-%%DATADIR%%/www/dialog/_admin_party.html
-%%DATADIR%%/www/dialog/_change_password.html
-%%DATADIR%%/www/dialog/_compact_cleanup.html
-%%DATADIR%%/www/dialog/_copy_document.html
-%%DATADIR%%/www/dialog/_create_admin.html
-%%DATADIR%%/www/dialog/_create_config.html
-%%DATADIR%%/www/dialog/_create_database.html
-%%DATADIR%%/www/dialog/_database_security.html
-%%DATADIR%%/www/dialog/_delete_database.html
-%%DATADIR%%/www/dialog/_delete_document.html
-%%DATADIR%%/www/dialog/_login.html
-%%DATADIR%%/www/dialog/_save_view_as.html
-%%DATADIR%%/www/dialog/_share_test_reports.html
-%%DATADIR%%/www/dialog/_signup.html
-%%DATADIR%%/www/dialog/_upload_attachment.html
-%%DATADIR%%/www/docs/_images/futon-createdb.png
-%%DATADIR%%/www/docs/_images/futon-editdoc.png
-%%DATADIR%%/www/docs/_images/futon-editeddoc.png
-%%DATADIR%%/www/docs/_images/futon-overview.png
-%%DATADIR%%/www/docs/_images/futon-replform.png
-%%DATADIR%%/www/docs/_images/intro-consistency-01.png
-%%DATADIR%%/www/docs/_images/intro-consistency-02.png
-%%DATADIR%%/www/docs/_images/intro-consistency-03.png
-%%DATADIR%%/www/docs/_images/intro-consistency-04.png
-%%DATADIR%%/www/docs/_images/intro-consistency-05.png
-%%DATADIR%%/www/docs/_images/intro-consistency-06.png
-%%DATADIR%%/www/docs/_images/intro-consistency-07.png
-%%DATADIR%%/www/docs/_images/intro-tour-01.png
-%%DATADIR%%/www/docs/_images/intro-tour-03.png
-%%DATADIR%%/www/docs/_images/intro-tour-04.png
-%%DATADIR%%/www/docs/_images/intro-tour-05.png
-%%DATADIR%%/www/docs/_images/intro-tour-06.png
-%%DATADIR%%/www/docs/_images/intro-tour-07.png
-%%DATADIR%%/www/docs/_images/intro-tour-08.png
-%%DATADIR%%/www/docs/_images/intro-tour-09.png
-%%DATADIR%%/www/docs/_images/intro-tour-10.png
-%%DATADIR%%/www/docs/_images/intro-why-01.png
-%%DATADIR%%/www/docs/_images/intro-why-02.png
-%%DATADIR%%/www/docs/_images/intro-why-03.png
-%%DATADIR%%/www/docs/_images/views-intro-01.png
-%%DATADIR%%/www/docs/_images/views-intro-02.png
-%%DATADIR%%/www/docs/_images/views-intro-03.png
-%%DATADIR%%/www/docs/_images/views-intro-04.png
-%%DATADIR%%/www/docs/_sources/about.txt
-%%DATADIR%%/www/docs/_sources/api/basics.txt
-%%DATADIR%%/www/docs/_sources/api/database/bulk-api.txt
-%%DATADIR%%/www/docs/_sources/api/database/changes.txt
-%%DATADIR%%/www/docs/_sources/api/database/common.txt
-%%DATADIR%%/www/docs/_sources/api/database/compact.txt
-%%DATADIR%%/www/docs/_sources/api/database/index.txt
-%%DATADIR%%/www/docs/_sources/api/database/misc.txt
-%%DATADIR%%/www/docs/_sources/api/database/security.txt
-%%DATADIR%%/www/docs/_sources/api/database/temp-views.txt
-%%DATADIR%%/www/docs/_sources/api/ddoc/common.txt
-%%DATADIR%%/www/docs/_sources/api/ddoc/index.txt
-%%DATADIR%%/www/docs/_sources/api/ddoc/render.txt
-%%DATADIR%%/www/docs/_sources/api/ddoc/rewrites.txt
-%%DATADIR%%/www/docs/_sources/api/ddoc/views.txt
-%%DATADIR%%/www/docs/_sources/api/document/attachments.txt
-%%DATADIR%%/www/docs/_sources/api/document/common.txt
-%%DATADIR%%/www/docs/_sources/api/document/index.txt
-%%DATADIR%%/www/docs/_sources/api/index.txt
-%%DATADIR%%/www/docs/_sources/api/local.txt
-%%DATADIR%%/www/docs/_sources/api/server/authn.txt
-%%DATADIR%%/www/docs/_sources/api/server/common.txt
-%%DATADIR%%/www/docs/_sources/api/server/configuration.txt
-%%DATADIR%%/www/docs/_sources/api/server/index.txt
-%%DATADIR%%/www/docs/_sources/config/auth.txt
-%%DATADIR%%/www/docs/_sources/config/compaction.txt
-%%DATADIR%%/www/docs/_sources/config/couchdb.txt
-%%DATADIR%%/www/docs/_sources/config/externals.txt
-%%DATADIR%%/www/docs/_sources/config/http-handlers.txt
-%%DATADIR%%/www/docs/_sources/config/http.txt
-%%DATADIR%%/www/docs/_sources/config/index.txt
-%%DATADIR%%/www/docs/_sources/config/intro.txt
-%%DATADIR%%/www/docs/_sources/config/logging.txt
-%%DATADIR%%/www/docs/_sources/config/misc.txt
-%%DATADIR%%/www/docs/_sources/config/proxying.txt
-%%DATADIR%%/www/docs/_sources/config/query-servers.txt
-%%DATADIR%%/www/docs/_sources/config/replicator.txt
-%%DATADIR%%/www/docs/_sources/config/services.txt
-%%DATADIR%%/www/docs/_sources/contents.txt
-%%DATADIR%%/www/docs/_sources/contributing.txt
-%%DATADIR%%/www/docs/_sources/couchapp/ddocs.txt
-%%DATADIR%%/www/docs/_sources/couchapp/index.txt
-%%DATADIR%%/www/docs/_sources/couchapp/views/collation.txt
-%%DATADIR%%/www/docs/_sources/couchapp/views/index.txt
-%%DATADIR%%/www/docs/_sources/couchapp/views/intro.txt
-%%DATADIR%%/www/docs/_sources/couchapp/views/joins.txt
-%%DATADIR%%/www/docs/_sources/couchapp/views/nosql.txt
-%%DATADIR%%/www/docs/_sources/couchapp/views/pagination.txt
-%%DATADIR%%/www/docs/_sources/cve/2010-0009.txt
-%%DATADIR%%/www/docs/_sources/cve/2010-2234.txt
-%%DATADIR%%/www/docs/_sources/cve/2010-3854.txt
-%%DATADIR%%/www/docs/_sources/cve/2012-5641.txt
-%%DATADIR%%/www/docs/_sources/cve/2012-5649.txt
-%%DATADIR%%/www/docs/_sources/cve/2012-5650.txt
-%%DATADIR%%/www/docs/_sources/cve/index.txt
-%%DATADIR%%/www/docs/_sources/experimental.txt
-%%DATADIR%%/www/docs/_sources/externals.txt
-%%DATADIR%%/www/docs/_sources/install/freebsd.txt
-%%DATADIR%%/www/docs/_sources/install/index.txt
-%%DATADIR%%/www/docs/_sources/install/mac.txt
-%%DATADIR%%/www/docs/_sources/install/unix.txt
-%%DATADIR%%/www/docs/_sources/install/windows.txt
-%%DATADIR%%/www/docs/_sources/intro/api.txt
-%%DATADIR%%/www/docs/_sources/intro/consistency.txt
-%%DATADIR%%/www/docs/_sources/intro/curl.txt
-%%DATADIR%%/www/docs/_sources/intro/futon.txt
-%%DATADIR%%/www/docs/_sources/intro/index.txt
-%%DATADIR%%/www/docs/_sources/intro/overview.txt
-%%DATADIR%%/www/docs/_sources/intro/security.txt
-%%DATADIR%%/www/docs/_sources/intro/tour.txt
-%%DATADIR%%/www/docs/_sources/intro/why.txt
-%%DATADIR%%/www/docs/_sources/json-structure.txt
-%%DATADIR%%/www/docs/_sources/maintenance/compaction.txt
-%%DATADIR%%/www/docs/_sources/maintenance/index.txt
-%%DATADIR%%/www/docs/_sources/maintenance/performance.txt
-%%DATADIR%%/www/docs/_sources/query-server/erlang.txt
-%%DATADIR%%/www/docs/_sources/query-server/index.txt
-%%DATADIR%%/www/docs/_sources/query-server/javascript.txt
-%%DATADIR%%/www/docs/_sources/query-server/protocol.txt
-%%DATADIR%%/www/docs/_sources/replication/conflicts.txt
-%%DATADIR%%/www/docs/_sources/replication/index.txt
-%%DATADIR%%/www/docs/_sources/replication/intro.txt
-%%DATADIR%%/www/docs/_sources/replication/protocol.txt
-%%DATADIR%%/www/docs/_sources/replication/replicator.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/0.10.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/0.11.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/0.8.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/0.9.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/1.0.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/1.1.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/1.2.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/1.3.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/1.4.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/1.5.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/1.6.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/1.7.txt
-%%DATADIR%%/www/docs/_sources/whatsnew/index.txt
-%%DATADIR%%/www/docs/_static/ajax-loader.gif
-%%DATADIR%%/www/docs/_static/basic.css
-%%DATADIR%%/www/docs/_static/comment-bright.png
-%%DATADIR%%/www/docs/_static/comment-close.png
-%%DATADIR%%/www/docs/_static/comment.png
-%%DATADIR%%/www/docs/_static/default.css
-%%DATADIR%%/www/docs/_static/doctools.js
-%%DATADIR%%/www/docs/_static/down-pressed.png
-%%DATADIR%%/www/docs/_static/down.png
-%%DATADIR%%/www/docs/_static/favicon.ico
-%%DATADIR%%/www/docs/_static/file.png
-%%DATADIR%%/www/docs/_static/jquery.js
-%%DATADIR%%/www/docs/_static/logo.png
-%%DATADIR%%/www/docs/_static/minus.png
-%%DATADIR%%/www/docs/_static/plus.png
-%%DATADIR%%/www/docs/_static/pygments.css
-%%DATADIR%%/www/docs/_static/rtd.css
-%%DATADIR%%/www/docs/_static/searchtools.js
-%%DATADIR%%/www/docs/_static/sidebar.js
-%%DATADIR%%/www/docs/_static/underscore.js
-%%DATADIR%%/www/docs/_static/up-pressed.png
-%%DATADIR%%/www/docs/_static/up.png
-%%DATADIR%%/www/docs/_static/websupport.js
-%%DATADIR%%/www/docs/about.html
-%%DATADIR%%/www/docs/api/basics.html
-%%DATADIR%%/www/docs/api/database/bulk-api.html
-%%DATADIR%%/www/docs/api/database/changes.html
-%%DATADIR%%/www/docs/api/database/common.html
-%%DATADIR%%/www/docs/api/database/compact.html
-%%DATADIR%%/www/docs/api/database/index.html
-%%DATADIR%%/www/docs/api/database/misc.html
-%%DATADIR%%/www/docs/api/database/security.html
-%%DATADIR%%/www/docs/api/database/temp-views.html
-%%DATADIR%%/www/docs/api/ddoc/common.html
-%%DATADIR%%/www/docs/api/ddoc/index.html
-%%DATADIR%%/www/docs/api/ddoc/render.html
-%%DATADIR%%/www/docs/api/ddoc/rewrites.html
-%%DATADIR%%/www/docs/api/ddoc/views.html
-%%DATADIR%%/www/docs/api/document/attachments.html
-%%DATADIR%%/www/docs/api/document/common.html
-%%DATADIR%%/www/docs/api/document/index.html
-%%DATADIR%%/www/docs/api/index.html
-%%DATADIR%%/www/docs/api/local.html
-%%DATADIR%%/www/docs/api/server/authn.html
-%%DATADIR%%/www/docs/api/server/common.html
-%%DATADIR%%/www/docs/api/server/configuration.html
-%%DATADIR%%/www/docs/api/server/index.html
-%%DATADIR%%/www/docs/config-ref.html
-%%DATADIR%%/www/docs/config/auth.html
-%%DATADIR%%/www/docs/config/compaction.html
-%%DATADIR%%/www/docs/config/couchdb.html
-%%DATADIR%%/www/docs/config/externals.html
-%%DATADIR%%/www/docs/config/http-handlers.html
-%%DATADIR%%/www/docs/config/http.html
-%%DATADIR%%/www/docs/config/index.html
-%%DATADIR%%/www/docs/config/intro.html
-%%DATADIR%%/www/docs/config/logging.html
-%%DATADIR%%/www/docs/config/misc.html
-%%DATADIR%%/www/docs/config/proxying.html
-%%DATADIR%%/www/docs/config/query-servers.html
-%%DATADIR%%/www/docs/config/replicator.html
-%%DATADIR%%/www/docs/config/services.html
-%%DATADIR%%/www/docs/contents.html
-%%DATADIR%%/www/docs/contributing.html
-%%DATADIR%%/www/docs/couchapp/ddocs.html
-%%DATADIR%%/www/docs/couchapp/index.html
-%%DATADIR%%/www/docs/couchapp/views/collation.html
-%%DATADIR%%/www/docs/couchapp/views/index.html
-%%DATADIR%%/www/docs/couchapp/views/intro.html
-%%DATADIR%%/www/docs/couchapp/views/joins.html
-%%DATADIR%%/www/docs/couchapp/views/nosql.html
-%%DATADIR%%/www/docs/couchapp/views/pagination.html
-%%DATADIR%%/www/docs/cve/2010-0009.html
-%%DATADIR%%/www/docs/cve/2010-2234.html
-%%DATADIR%%/www/docs/cve/2010-3854.html
-%%DATADIR%%/www/docs/cve/2012-5641.html
-%%DATADIR%%/www/docs/cve/2012-5649.html
-%%DATADIR%%/www/docs/cve/2012-5650.html
-%%DATADIR%%/www/docs/cve/index.html
-%%DATADIR%%/www/docs/download.html
-%%DATADIR%%/www/docs/experimental.html
-%%DATADIR%%/www/docs/externals.html
-%%DATADIR%%/www/docs/http-api.html
-%%DATADIR%%/www/docs/index.html
-%%DATADIR%%/www/docs/install/freebsd.html
-%%DATADIR%%/www/docs/install/index.html
-%%DATADIR%%/www/docs/install/mac.html
-%%DATADIR%%/www/docs/install/unix.html
-%%DATADIR%%/www/docs/install/windows.html
-%%DATADIR%%/www/docs/intro/api.html
-%%DATADIR%%/www/docs/intro/consistency.html
-%%DATADIR%%/www/docs/intro/curl.html
-%%DATADIR%%/www/docs/intro/futon.html
-%%DATADIR%%/www/docs/intro/index.html
-%%DATADIR%%/www/docs/intro/overview.html
-%%DATADIR%%/www/docs/intro/security.html
-%%DATADIR%%/www/docs/intro/tour.html
-%%DATADIR%%/www/docs/intro/why.html
-%%DATADIR%%/www/docs/json-structure.html
-%%DATADIR%%/www/docs/maintenance/compaction.html
-%%DATADIR%%/www/docs/maintenance/index.html
-%%DATADIR%%/www/docs/maintenance/performance.html
-%%DATADIR%%/www/docs/objects.inv
-%%DATADIR%%/www/docs/query-server/erlang.html
-%%DATADIR%%/www/docs/query-server/index.html
-%%DATADIR%%/www/docs/query-server/javascript.html
-%%DATADIR%%/www/docs/query-server/protocol.html
-%%DATADIR%%/www/docs/replication/conflicts.html
-%%DATADIR%%/www/docs/replication/index.html
-%%DATADIR%%/www/docs/replication/intro.html
-%%DATADIR%%/www/docs/replication/protocol.html
-%%DATADIR%%/www/docs/replication/replicator.html
-%%DATADIR%%/www/docs/search.html
-%%DATADIR%%/www/docs/searchindex.js
-%%DATADIR%%/www/docs/whatsnew/0.10.html
-%%DATADIR%%/www/docs/whatsnew/0.11.html
-%%DATADIR%%/www/docs/whatsnew/0.8.html
-%%DATADIR%%/www/docs/whatsnew/0.9.html
-%%DATADIR%%/www/docs/whatsnew/1.0.html
-%%DATADIR%%/www/docs/whatsnew/1.1.html
-%%DATADIR%%/www/docs/whatsnew/1.2.html
-%%DATADIR%%/www/docs/whatsnew/1.3.html
-%%DATADIR%%/www/docs/whatsnew/1.4.html
-%%DATADIR%%/www/docs/whatsnew/1.5.html
-%%DATADIR%%/www/docs/whatsnew/1.6.html
-%%DATADIR%%/www/docs/whatsnew/1.7.html
-%%DATADIR%%/www/docs/whatsnew/index.html
-%%DATADIR%%/www/document.html
-%%DATADIR%%/www/favicon.ico
-%%DATADIR%%/www/image/add.png
-%%DATADIR%%/www/image/apply.gif
-%%DATADIR%%/www/image/bg.png
-%%DATADIR%%/www/image/cancel.gif
-%%DATADIR%%/www/image/compact.png
-%%DATADIR%%/www/image/copy.png
-%%DATADIR%%/www/image/delete-mini.png
-%%DATADIR%%/www/image/delete.png
-%%DATADIR%%/www/image/grippie.gif
-%%DATADIR%%/www/image/hgrad.gif
-%%DATADIR%%/www/image/key.png
-%%DATADIR%%/www/image/load.png
-%%DATADIR%%/www/image/logo.png
-%%DATADIR%%/www/image/order-asc.gif
-%%DATADIR%%/www/image/order-desc.gif
-%%DATADIR%%/www/image/path.gif
-%%DATADIR%%/www/image/progress.gif
-%%DATADIR%%/www/image/rarrow.png
-%%DATADIR%%/www/image/run-mini.png
-%%DATADIR%%/www/image/run.png
-%%DATADIR%%/www/image/running.png
-%%DATADIR%%/www/image/save.png
-%%DATADIR%%/www/image/sidebar-toggle.png
-%%DATADIR%%/www/image/spinner.gif
-%%DATADIR%%/www/image/spinner_33.gif
-%%DATADIR%%/www/image/spinner_6b.gif
-%%DATADIR%%/www/image/test_failure.gif
-%%DATADIR%%/www/image/test_success.gif
-%%DATADIR%%/www/image/thead-key.gif
-%%DATADIR%%/www/image/thead.gif
-%%DATADIR%%/www/image/toggle-collapse.gif
-%%DATADIR%%/www/image/toggle-expand.gif
-%%DATADIR%%/www/image/twisty.gif
-%%DATADIR%%/www/index.html
-%%DATADIR%%/www/plugins.html
-%%DATADIR%%/www/replicator.html
-%%DATADIR%%/www/script/base64.js
-%%DATADIR%%/www/script/couch.js
-%%DATADIR%%/www/script/couch_test_runner.js
-%%DATADIR%%/www/script/couch_tests.js
-%%DATADIR%%/www/script/futon.browse.js
-%%DATADIR%%/www/script/futon.format.js
-%%DATADIR%%/www/script/futon.js
-%%DATADIR%%/www/script/jquery-ui-1.10.4.custom.min.js
-%%DATADIR%%/www/script/jquery.couch.js
-%%DATADIR%%/www/script/jquery.dialog.js
-%%DATADIR%%/www/script/jquery.editinline.js
-%%DATADIR%%/www/script/jquery.form.js
-%%DATADIR%%/www/script/jquery.js
-%%DATADIR%%/www/script/jquery.resizer.js
-%%DATADIR%%/www/script/jquery.suggest.js
-%%DATADIR%%/www/script/json2.js
-%%DATADIR%%/www/script/jspec/jspec.css
-%%DATADIR%%/www/script/jspec/jspec.jquery.js
-%%DATADIR%%/www/script/jspec/jspec.js
-%%DATADIR%%/www/script/jspec/jspec.xhr.js
-%%DATADIR%%/www/script/oauth.js
-%%DATADIR%%/www/script/replicator_db_inc.js
-%%DATADIR%%/www/script/sha1.js
-%%DATADIR%%/www/script/test/all_docs.js
-%%DATADIR%%/www/script/test/attachment_names.js
-%%DATADIR%%/www/script/test/attachment_paths.js
-%%DATADIR%%/www/script/test/attachment_ranges.js
-%%DATADIR%%/www/script/test/attachment_views.js
-%%DATADIR%%/www/script/test/attachments.js
-%%DATADIR%%/www/script/test/attachments_multipart.js
-%%DATADIR%%/www/script/test/auth_cache.js
-%%DATADIR%%/www/script/test/basics.js
-%%DATADIR%%/www/script/test/batch_save.js
-%%DATADIR%%/www/script/test/bulk_docs.js
-%%DATADIR%%/www/script/test/changes.js
-%%DATADIR%%/www/script/test/coffee.js
-%%DATADIR%%/www/script/test/compact.js
-%%DATADIR%%/www/script/test/config.js
-%%DATADIR%%/www/script/test/conflicts.js
-%%DATADIR%%/www/script/test/content_negotiation.js
-%%DATADIR%%/www/script/test/cookie_auth.js
-%%DATADIR%%/www/script/test/copy_doc.js
-%%DATADIR%%/www/script/test/delayed_commits.js
-%%DATADIR%%/www/script/test/design_docs.js
-%%DATADIR%%/www/script/test/design_options.js
-%%DATADIR%%/www/script/test/design_paths.js
-%%DATADIR%%/www/script/test/erlang_views.js
-%%DATADIR%%/www/script/test/etags_head.js
-%%DATADIR%%/www/script/test/etags_views.js
-%%DATADIR%%/www/script/test/form_submit.js
-%%DATADIR%%/www/script/test/http.js
-%%DATADIR%%/www/script/test/invalid_docids.js
-%%DATADIR%%/www/script/test/jsonp.js
-%%DATADIR%%/www/script/test/large_docs.js
-%%DATADIR%%/www/script/test/list_views.js
-%%DATADIR%%/www/script/test/lorem.txt
-%%DATADIR%%/www/script/test/lorem_b64.txt
-%%DATADIR%%/www/script/test/lots_of_docs.js
-%%DATADIR%%/www/script/test/method_override.js
-%%DATADIR%%/www/script/test/multiple_rows.js
-%%DATADIR%%/www/script/test/oauth.js
-%%DATADIR%%/www/script/test/oauth_users_db.js
-%%DATADIR%%/www/script/test/proxyauth.js
-%%DATADIR%%/www/script/test/purge.js
-%%DATADIR%%/www/script/test/reader_acl.js
-%%DATADIR%%/www/script/test/recreate_doc.js
-%%DATADIR%%/www/script/test/reduce.js
-%%DATADIR%%/www/script/test/reduce_builtin.js
-%%DATADIR%%/www/script/test/reduce_false.js
-%%DATADIR%%/www/script/test/reduce_false_temp.js
-%%DATADIR%%/www/script/test/replication.js
-%%DATADIR%%/www/script/test/replicator_db_bad_rep_id.js
-%%DATADIR%%/www/script/test/replicator_db_by_doc_id.js
-%%DATADIR%%/www/script/test/replicator_db_compact_rep_db.js
-%%DATADIR%%/www/script/test/replicator_db_continuous.js
-%%DATADIR%%/www/script/test/replicator_db_credential_delegation.js
-%%DATADIR%%/www/script/test/replicator_db_field_validation.js
-%%DATADIR%%/www/script/test/replicator_db_filtered.js
-%%DATADIR%%/www/script/test/replicator_db_identical.js
-%%DATADIR%%/www/script/test/replicator_db_identical_continuous.js
-%%DATADIR%%/www/script/test/replicator_db_invalid_filter.js
-%%DATADIR%%/www/script/test/replicator_db_security.js
-%%DATADIR%%/www/script/test/replicator_db_simple.js
-%%DATADIR%%/www/script/test/replicator_db_successive.js
-%%DATADIR%%/www/script/test/replicator_db_survives.js
-%%DATADIR%%/www/script/test/replicator_db_swap_rep_db.js
-%%DATADIR%%/www/script/test/replicator_db_update_security.js
-%%DATADIR%%/www/script/test/replicator_db_user_ctx.js
-%%DATADIR%%/www/script/test/replicator_db_write_auth.js
-%%DATADIR%%/www/script/test/rev_stemming.js
-%%DATADIR%%/www/script/test/rewrite.js
-%%DATADIR%%/www/script/test/security_validation.js
-%%DATADIR%%/www/script/test/show_documents.js
-%%DATADIR%%/www/script/test/stats.js
-%%DATADIR%%/www/script/test/update_documents.js
-%%DATADIR%%/www/script/test/users_db.js
-%%DATADIR%%/www/script/test/users_db_security.js
-%%DATADIR%%/www/script/test/utf8.js
-%%DATADIR%%/www/script/test/uuids.js
-%%DATADIR%%/www/script/test/view_collation.js
-%%DATADIR%%/www/script/test/view_collation_raw.js
-%%DATADIR%%/www/script/test/view_compaction.js
-%%DATADIR%%/www/script/test/view_conflicts.js
-%%DATADIR%%/www/script/test/view_errors.js
-%%DATADIR%%/www/script/test/view_include_docs.js
-%%DATADIR%%/www/script/test/view_multi_key_all_docs.js
-%%DATADIR%%/www/script/test/view_multi_key_design.js
-%%DATADIR%%/www/script/test/view_multi_key_temp.js
-%%DATADIR%%/www/script/test/view_offsets.js
-%%DATADIR%%/www/script/test/view_pagination.js
-%%DATADIR%%/www/script/test/view_sandboxing.js
-%%DATADIR%%/www/script/test/view_update_seq.js
-%%DATADIR%%/www/session.html
-%%DATADIR%%/www/spec/couch_js_class_methods_spec.js
-%%DATADIR%%/www/spec/couch_js_instance_methods_1_spec.js
-%%DATADIR%%/www/spec/couch_js_instance_methods_2_spec.js
-%%DATADIR%%/www/spec/couch_js_instance_methods_3_spec.js
-%%DATADIR%%/www/spec/custom_helpers.js
-%%DATADIR%%/www/spec/jquery_couch_js_class_methods_spec.js
-%%DATADIR%%/www/spec/jquery_couch_js_instance_methods_1_spec.js
-%%DATADIR%%/www/spec/jquery_couch_js_instance_methods_2_spec.js
-%%DATADIR%%/www/spec/jquery_couch_js_instance_methods_3_spec.js
-%%DATADIR%%/www/spec/run.html
-%%DATADIR%%/www/status.html
-%%DATADIR%%/www/style/jquery-ui-1.8.11.custom.css
-%%DATADIR%%/www/style/layout.css
-%%DATADIR%%/www/verify_install.html
-%%PORTDOCS%%%%DOCSDIR%%/AUTHORS.gz
-%%PORTDOCS%%%%DOCSDIR%%/BUGS.gz
-%%PORTDOCS%%%%DOCSDIR%%/CouchDB.pdf.gz
-%%PORTDOCS%%%%DOCSDIR%%/DEVELOPERS.gz
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL.Unix.gz
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL.Windows.gz
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL.gz
-%%PORTDOCS%%%%DOCSDIR%%/LICENSE.gz
-%%PORTDOCS%%%%DOCSDIR%%/NOTICE.gz
-%%PORTDOCS%%%%DOCSDIR%%/README.gz
-%%PORTDOCS%%%%DOCSDIR%%/THANKS.gz
diff --git a/databases/riak/Makefile b/databases/riak/Makefile
deleted file mode 100644
index 44665b1fb45b..000000000000
--- a/databases/riak/Makefile
+++ /dev/null
@@ -1,91 +0,0 @@
-# $FreeBSD$
-
-PORTNAME= riak
-PORTVERSION= 1.4.12
-PORTREVISION= 5
-CATEGORIES= databases
-MASTER_SITES= http://s3.amazonaws.com/downloads.basho.com/riak/${PORTVERSION:R}/${PORTVERSION}/ \
- http://downloads.basho.com.s3.amazonaws.com/riak/${PORTVERSION:R}/${PORTVERSION}/
-
-MAINTAINER= rm@FreeBSD.org
-COMMENT= Open source, distributed, noSQL database
-
-LICENSE= APACHE20
-LICENSE_FILE= ${WRKSRC}/LICENSE
-
-DEPRECATED= No longer supported upstream, see riak 2.9.0 and newer
-EXPIRATION_DATE= 2020-01-01
-BROKEN_aarch64= Does not compile: error: Unknown CPU architecture
-BROKEN_powerpc64= Does not compile: error: Unknown CPU architecture
-BROKEN_sparc64= Does not compile: Please implement AtomicPointer for this platform
-
-BUILD_DEPENDS= ${LOCALBASE}/lib/erlang15/bin/erlc:lang/erlang-runtime15
-
-USES= gmake readline shebangfix
-SHEBANG_FILES= deps/eper/priv/bin/dtop \
- deps/eper/priv/bin/gperf \
- deps/eper/priv/bin/ntop \
- deps/eper/priv/bin/redbug \
- deps/eper/priv/bin/sherk
-USE_RC_SUBR= riak
-
-PLIST= ${WRKDIR}/pkg-plist
-PLIST_SUB+= GROUPS=${GROUPS} \
- RIAK_CONFDIR=${RIAK_CONFDIR} \
- RIAK_DBDIR=${RIAK_DBDIR} \
- RIAK_HOMEDIR=${RIAK_HOMEDIR} \
- RIAK_LIBDIR=${RIAK_LIBDIR} \
- RIAK_LOGDIR=${RIAK_LOGDIR} \
- USERS=${USERS}
-
-USERS= riak
-GROUPS= riak
-
-RIAK_CONFDIR?= ${PREFIX}/etc/${PORTNAME}
-RIAK_LOGDIR?= /var/log/${PORTNAME}
-RIAK_DBDIR?= /var/db/${PORTNAME}
-RIAK_LIBDIR?= ${PREFIX}/lib/${PORTNAME}/lib
-RIAK_HOMEDIR?= ${PREFIX}/lib/${PORTNAME}
-
-ALL_TARGET= rel
-MAKE_ENV= PATH=${LOCALBASE}/lib/erlang15/bin:${PATH}
-
-.include <bsd.port.pre.mk>
-
-post-patch:
- @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/rel/vars.config
-
-pre-install:
- ${RM} ${PLIST}
- ${CAT} ${PKGDIR}/pkg-plist >> ${PLIST}
- (cd ${WRKSRC}/rel/${PORTNAME}; ${FIND} releases -type f \
- | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \
- | ${AWK} '{print "lib/riak/"$$2 }' >> ${PLIST})
- (cd ${WRKSRC}/rel/${PORTNAME}; ${FIND} erts-* -type f \
- | ${AWK} '{print length, $$0}' | ${SORT} -rn \
- | ${AWK} '{print "lib/riak/"$$2 }' >> ${PLIST})
- (cd ${WRKSRC}/rel; ${FIND} ${PORTNAME}/lib -type f \
- | ${AWK} '{print length, $$0}' | ${SORT} -rn | ${SED} -e 's/^/lib\//' \
- | ${AWK} '{print "lib/"$$2 }' >> ${PLIST})
- ${ECHO} "@owner" >> ${PLIST}
- ${ECHO} "@group" >> ${PLIST}
-
-do-install:
-.for d in ${RIAK_CONFDIR} ${RIAK_LOGDIR} ${RIAK_DBDIR} ${RIAK_LIBDIR} ${RIAK_HOMEDIR}
- ${MKDIR} ${STAGEDIR}${d}
-.endfor
- ${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/vm.args ${STAGEDIR}${RIAK_CONFDIR}/vm.args.sample
- ${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/app.config ${STAGEDIR}${RIAK_CONFDIR}/app.config.sample
- ${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/cert.pem ${STAGEDIR}${RIAK_CONFDIR}/cert.pem.sample
- ${INSTALL_DATA} ${WRKSRC}/rel/riak/etc/key.pem ${STAGEDIR}${RIAK_CONFDIR}/key.pem.sample
- (cd ${WRKSRC}/rel/riak/lib/ && ${COPYTREE_BIN} . ${STAGEDIR}${RIAK_LIBDIR})
- (cd ${WRKSRC}/rel/riak/bin/ && ${COPYTREE_BIN} . ${STAGEDIR}${PREFIX}/sbin/)
- (cd ${WRKSRC}/rel/riak/lib/basho-patches && ${COPYTREE_SHARE} . ${STAGEDIR}${RIAK_LIBDIR}/basho-patches)
- (cd ${WRKSRC}/rel/riak/releases && ${COPYTREE_SHARE} . ${STAGEDIR}${RIAK_HOMEDIR}/releases)
- ${CP} -R ${WRKSRC}/rel/riak/erts-* ${STAGEDIR}${RIAK_HOMEDIR}
- ${INSTALL_MAN} ${WRKSRC}/doc/man/man1/riak.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/
- ${INSTALL_MAN} ${WRKSRC}/doc/man/man1/riak-admin.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/
- ${INSTALL_MAN} ${WRKSRC}/doc/man/man1/riak-debug.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/
- ${INSTALL_MAN} ${WRKSRC}/doc/man/man1/search-cmd.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/
-
-.include <bsd.port.post.mk>
diff --git a/databases/riak/distinfo b/databases/riak/distinfo
deleted file mode 100644
index 3ac05542d6e3..000000000000
--- a/databases/riak/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (riak-1.4.12.tar.gz) = 2ae63ba183ce457399a21542c75aa6149481c972ebac739a1599e93e81982c91
-SIZE (riak-1.4.12.tar.gz) = 13821609
diff --git a/databases/riak/files/patch-deps-eleveldb-c_src-leveldb-build_detect_platform b/databases/riak/files/patch-deps-eleveldb-c_src-leveldb-build_detect_platform
deleted file mode 100644
index 91c1596839e0..000000000000
--- a/databases/riak/files/patch-deps-eleveldb-c_src-leveldb-build_detect_platform
+++ /dev/null
@@ -1,29 +0,0 @@
---- deps/eleveldb/c_src/leveldb/build_detect_platform.orig 2014-12-04 17:57:13 UTC
-+++ deps/eleveldb/c_src/leveldb/build_detect_platform
-@@ -134,7 +134,7 @@ if [ "$CROSS_COMPILE" = "true" ]; then
- true
- else
- # If -std=c++0x works, use <cstdatomic>. Otherwise use port_posix.h.
-- $CXX $CFLAGS -std=c++0x -x c++ - -o /dev/null 2>/dev/null <<EOF
-+ $CXX $CFLAGS -std=c++0x -x c++ - 2>/dev/null <<EOF
- #include <cstdatomic>
- int main() {}
- EOF
-@@ -147,7 +147,7 @@ EOF
-
- # Test whether Snappy library is installed
- # http://code.google.com/p/snappy/
-- $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF
-+ $CXX $CFLAGS -x c++ - 2>/dev/null <<EOF
- #include <snappy.h>
- int main() {}
- EOF
-@@ -157,7 +157,7 @@ EOF
- fi
-
- # Test whether tcmalloc is available
-- $CXX $CFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null <<EOF
-+ $CXX $CFLAGS -x c++ - -ltcmalloc 2>/dev/null <<EOF
- int main() {}
- EOF
- if [ "$?" = 0 ]; then
diff --git a/databases/riak/files/patch-deps-eleveldb-c_src-leveldb-db-version_set.cc b/databases/riak/files/patch-deps-eleveldb-c_src-leveldb-db-version_set.cc
deleted file mode 100644
index 6fffbb8345f8..000000000000
--- a/databases/riak/files/patch-deps-eleveldb-c_src-leveldb-db-version_set.cc
+++ /dev/null
@@ -1,36 +0,0 @@
---- deps/eleveldb/c_src/leveldb/db/version_set.cc.orig 2014-12-04 17:57:13 UTC
-+++ deps/eleveldb/c_src/leveldb/db/version_set.cc
-@@ -2,10 +2,12 @@
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file. See the AUTHORS file for names of contributors.
-
-+#define __STDC_CONSTANT_MACROS
- #include "db/version_set.h"
-
- #include <algorithm>
- #include <stdio.h>
-+#include <stdint.h>
- #include "db/filename.h"
- #include "db/log_reader.h"
- #include "db/log_writer.h"
-@@ -56,13 +58,13 @@ static struct
-
- // WARNING: m_OverlappedFiles flags need to match config::kNumOverlapFiles ... until unified
- {
-- {10485760, 262144000, 57671680, 209715200, 0, 300000000, true},
-- {10485760, 82914560, 57671680, 419430400, 0, 209715200, true},
-- {10485760, 314572800, 57671680, 1006632960, 200000000, 314572800, false},
-- {10485760, 419430400, 57671680, 4094304000ULL, 3355443200ULL, 419430400, false},
-- {10485760, 524288000, 57671680, 41943040000ULL, 33554432000ULL, 524288000, false},
-- {10485760, 629145600, 57671680, 419430400000ULL, 335544320000ULL, 629145600, false},
-- {10485760, 734003200, 57671680, 4194304000000ULL, 3355443200000ULL, 734003200, false}
-+ {UINT64_C(10485760), UINT64_C(262144000), INT64_C(57671680), UINT64_C( 209715200), UINT64_C( 0), UINT64_C(300000000), true},
-+ {UINT64_C(10485760), UINT64_C( 82914560), INT64_C(57671680), UINT64_C( 419430400), UINT64_C( 0), UINT64_C(209715200), true},
-+ {UINT64_C(10485760), UINT64_C(314572800), INT64_C(57671680), UINT64_C( 1006632960), UINT64_C( 200000000), UINT64_C(314572800), false},
-+ {UINT64_C(10485760), UINT64_C(419430400), INT64_C(57671680), UINT64_C( 4094304000), UINT64_C( 3355443200), UINT64_C(419430400), false},
-+ {UINT64_C(10485760), UINT64_C(524288000), INT64_C(57671680), UINT64_C( 41943040000), UINT64_C( 33554432000), UINT64_C(524288000), false},
-+ {UINT64_C(10485760), UINT64_C(629145600), INT64_C(57671680), UINT64_C( 419430400000), UINT64_C( 335544320000), UINT64_C(629145600), false},
-+ {UINT64_C(10485760), UINT64_C(734003200), INT64_C(57671680), UINT64_C(4194304000000), UINT64_C(3355443200000), UINT64_C(734003200), false}
- };
-
- /// ULL above needed to compile on OSX 10.7.3
diff --git a/databases/riak/files/patch-deps-erlang_js-c_src-patches-js-src-config-FreeBSD.mk.patch b/databases/riak/files/patch-deps-erlang_js-c_src-patches-js-src-config-FreeBSD.mk.patch
deleted file mode 100644
index c34773ac485f..000000000000
--- a/databases/riak/files/patch-deps-erlang_js-c_src-patches-js-src-config-FreeBSD.mk.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- deps/erlang_js/c_src/patches/js-src-config-FreeBSD.mk.patch.orig 2013-01-29 20:13:01 UTC
-+++ deps/erlang_js/c_src/patches/js-src-config-FreeBSD.mk.patch
-@@ -1,6 +1,6 @@
- --- c_src.orig/js/src/config/FreeBSD.mk 1969-12-31 19:00:00.000000000 -0500
- +++ c_src/js/src/config/FreeBSD.mk 2011-03-30 20:12:51.000000000 -0400
--@@ -0,0 +1,99 @@
-+@@ -0,0 +1,100 @@
- +# -*- Mode: makefile -*-
- +#
- +# ***** BEGIN LICENSE BLOCK *****
-@@ -46,6 +46,7 @@
- +
- +CC ?= gcc
- +CCC ?= g++
-++LD = $(CC)
- +CFLAGS += -Wall -Wno-format
- +OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R
- +
diff --git a/databases/riak/files/patch-deps-erlang_js-c_src-patches-nspr-src-ptsynch.c.patch b/databases/riak/files/patch-deps-erlang_js-c_src-patches-nspr-src-ptsynch.c.patch
deleted file mode 100644
index 21faee41c0f2..000000000000
--- a/databases/riak/files/patch-deps-erlang_js-c_src-patches-nspr-src-ptsynch.c.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-The same patch as here:
-https://bugzilla.mozilla.org/show_bug.cgi?id=1444953
-
-Fix build on -current after 1200059
-
---- deps/erlang_js/c_src/patches/nspr-src-ptsynch.c.patch 1970-01-01 03:00:00 UTC
-+++ deps/erlang_js/c_src/patches/nspr-src-ptsynch.c.patch
-@@ -0,0 +1,12 @@
-+--- c_src/nsprpub/pr/src/pthreads/ptsynch.c.orig 2009-03-19 00:29:32.000000000 +0300
-++++ c_src/nsprpub/pr/src/pthreads/ptsynch.c 2018-07-10 14:59:52.818165000 +0300
-+@@ -828,7 +828,8 @@
-+ * From the semctl(2) man page in glibc 2.0
-+ */
-+ #if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) \
-+- || defined(FREEBSD) || defined(OPENBSD) || defined(BSDI) \
-++ || (defined(FREEBSD) && __FreeBSD_version < 1200059) \
-++ || defined(OPENBSD) || defined(BSDI) \
-+ || defined(DARWIN) || defined(SYMBIAN)
-+ /* union semun is defined by including <sys/sem.h> */
-+ #else
diff --git a/databases/riak/files/patch-deps-node_package-priv-base-env.sh b/databases/riak/files/patch-deps-node_package-priv-base-env.sh
deleted file mode 100644
index 75c35f00088e..000000000000
--- a/databases/riak/files/patch-deps-node_package-priv-base-env.sh
+++ /dev/null
@@ -1,28 +0,0 @@
---- deps/node_package/priv/base/env.sh.orig 2013-11-08 18:56:54 UTC
-+++ deps/node_package/priv/base/env.sh
-@@ -100,7 +100,7 @@ ping_node() {
- # read/write/delete .pid files during startup/shutdown
- create_pid_dir() {
- # Validate RUNNER_USER is set and they have permissions to write to /var/run
-- # Don't continue if we've already sudo'd to RUNNER_USER
-+ # Don't continue if we've already su'd to RUNNER_USER
- if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" != "x$RUNNER_USER" ]); then
- if [ -w $RUN_DIR ]; then
- mkdir -p $PID_DIR
-@@ -161,12 +161,13 @@ check_user() {
- # Validate that the user running the script is the owner of the
- # RUN_DIR.
- if ([ "$RUNNER_USER" ] && [ "x$WHOAMI" != "x$RUNNER_USER" ]); then
-- type sudo > /dev/null 2>&1
-+ type su > /dev/null 2>&1
- if [ "$?" -ne 0 ]; then
-- echoerr "sudo doesn't appear to be installed and your EUID isn't $RUNNER_USER" 1>&2
-+ echoerr "su doesn't appear to be installed and your EUID isn't $RUNNER_USER" 1>&2
- exit 1
- fi
-- exec sudo -H -u $RUNNER_USER -i $RUNNER_SCRIPT_DIR/$RUNNER_SCRIPT $@
-+ ESCAPED_ARGS=`echo "$@" | sed -e 's/\([{}"]\)/\\\\\1/g'`
-+ exec su - $RUNNER_USER -c "$RUNNER_SCRIPT_DIR/$RUNNER_SCRIPT $ESCAPED_ARGS"
- fi
- }
-
diff --git a/databases/riak/files/patch-rel-reltool.config b/databases/riak/files/patch-rel-reltool.config
deleted file mode 100644
index a942dad4974f..000000000000
--- a/databases/riak/files/patch-rel-reltool.config
+++ /dev/null
@@ -1,16 +0,0 @@
---- rel/reltool.config.orig 2014-12-04 17:55:03 UTC
-+++ rel/reltool.config
-@@ -37,8 +37,12 @@
- {boot_rel, "riak"},
- {profile, embedded},
- {excl_sys_filters, ["^bin/.*",
-- "^erts.*/bin/(dialyzer|typer)"]},
-+ "^erts.*/bin/(dialyzer|typer)",
-+ "^erts.*/bin/(dialyzer|typer)",
-+ "^erts.*/doc",
-+ "^erts.*/man"]},
- {excl_archive_filters, [".*"]},
-+ {app, mnesia, [{incl_app_filters, ["ebin/*"]}]},
- {app, cluster_info, [{incl_cond, include}]},
- {app, erlang_js, [{incl_cond, include}]},
- {app, ebloom, []},
diff --git a/databases/riak/files/patch-rel-vars.config b/databases/riak/files/patch-rel-vars.config
deleted file mode 100644
index a08de22f5f7d..000000000000
--- a/databases/riak/files/patch-rel-vars.config
+++ /dev/null
@@ -1,41 +0,0 @@
---- rel/vars.config.orig 2014-12-04 17:55:03 UTC
-+++ rel/vars.config
-@@ -2,11 +2,12 @@
- %% ex: ft=erlang ts=4 sw=4 et
-
- %% Platform-specific installation paths
--{platform_bin_dir, "./bin"}.
--{platform_data_dir, "./data"}.
--{platform_etc_dir, "./etc"}.
--{platform_lib_dir, "./lib"}.
--{platform_log_dir, "./log"}.
-+{platform_bin_dir, "/usr/local/sbin"}.
-+{platform_data_dir, "/var/db/riak"}.
-+{platform_etc_dir, "/usr/local/etc/riak"}.
-+{platform_base_dir, "/usr/local/lib/riak"}.
-+{platform_lib_dir, "/usr/local/lib/riak/lib"}.
-+{platform_log_dir, "/var/log/riak"}.
-
- %%
- %% etc/app.config
-@@ -47,12 +48,12 @@
- %%
- %% bin/riak
- %%
--{runner_script_dir, "$(cd ${0%/*} && pwd)"}.
--{runner_base_dir, "{{runner_script_dir}}/.."}.
--{runner_etc_dir, "$RUNNER_BASE_DIR/etc"}.
--{runner_log_dir, "$RUNNER_BASE_DIR/log"}.
--{runner_lib_dir, "$RUNNER_BASE_DIR/lib"}.
--{runner_patch_dir, "$RUNNER_BASE_DIR/lib/basho-patches"}.
--{pipe_dir, "/tmp/$RUNNER_BASE_DIR/"}.
--{runner_user, ""}.
-+{runner_script_dir, "{{platform_bin_dir}}"}.
-+{runner_base_dir, "{{platform_base_dir}}"}.
-+{runner_etc_dir, "{{platform_etc_dir}}"}.
-+{runner_log_dir, "{{platform_log_dir}}"}.
-+{runner_lib_dir, "{{platform_lib_dir}}"}.
-+{runner_patch_dir, "{{platform_lib_dir}}/basho-patches"}.
-+{pipe_dir, "/tmp/riak"}.
-+{runner_user, "riak"}.
- {runner_wait_process, "riak_core_node_watcher"}.
diff --git a/databases/riak/files/riak.in b/databases/riak/files/riak.in
deleted file mode 100644
index 2ab086f60959..000000000000
--- a/databases/riak/files/riak.in
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-# PROVIDE: riak
-# REQUIRE: LOGIN cleanvar
-# KEYWORD: shutdown
-
-#
-# Add the following lines to /etc/rc.conf to enable riak:
-# riak_enable (bool): Set to "NO" by default.
-# Set it to "YES" to enable riak on boot.
-#
-
-. /etc/rc.subr
-
-name="riak"
-rcvar=riak_enable
-
-pidfile=/var/run/riak/riak.pid
-
-start_cmd="riak_start"
-stop_cmd="riak_stop"
-restart_cdm="riak_restart"
-status_cmd="riak_status"
-command="%%PREFIX%%/sbin/riak"
-
-load_rc_config $name
-
-# Read rc.d config and set defaults
-load_rc_config "$name"
-: ${riak_enable="NO"}
-
-riak_start()
-{
- echo "Starting Riak."
- %%PREFIX%%/sbin/riak start
- return 0
-}
-
-riak_stop()
-{
- echo "Stopping Riak processes"
- %%PREFIX%%/sbin/riak stop
- killall -9 epmd
- return 0
-}
-
-riak_restart()
-{
- riak_stop
- riak_start
- return 0
-}
-
-riak_status()
-{
- if riak_running; then
- echo "Riak is running."
- return 0
- else
- echo "Riak is not running"
- return 1
- fi
-}
-
-riak_running()
-{
- local pid result ps
- pid=`%%PREFIX%%/sbin/riak getpid`
- result=`echo $?`
- if [ "$result" == 0 ]; then
- ps=`ps -waux | grep ${pid} | grep riak`
- result=`echo $?`
- if [ "$result" ]; then
- return 0
- else
- return 1
- fi
- else
- return 1
- fi
-}
-
-run_rc_command "$1"
diff --git a/databases/riak/pkg-descr b/databases/riak/pkg-descr
deleted file mode 100644
index ceddb0d6acec..000000000000
--- a/databases/riak/pkg-descr
+++ /dev/null
@@ -1,6 +0,0 @@
-Riak is a distributed database designed for maximum availability:
-so long as your client can reach one server, it should be able to
-write data. In most failure scenarios the data you want to read
-should be available, albeit possibly stale.
-
-WWW: http://basho.com/products/riak-kv/
diff --git a/databases/riak/pkg-plist b/databases/riak/pkg-plist
deleted file mode 100644
index 85c203663bd8..000000000000
--- a/databases/riak/pkg-plist
+++ /dev/null
@@ -1,19 +0,0 @@
-sbin/riak
-sbin/riak-admin
-sbin/riak-debug
-sbin/search-cmd
-man/man1/riak-admin.1.gz
-man/man1/riak-debug.1.gz
-man/man1/riak.1.gz
-man/man1/search-cmd.1.gz
-@sample %%ETCDIR%%/vm.args.sample
-@sample %%ETCDIR%%/app.config.sample
-@sample %%ETCDIR%%/cert.pem.sample
-@sample %%ETCDIR%%/key.pem.sample
-@dir %%RIAK_CONFDIR%%
-@owner %%USERS%%
-@group %%GROUPS%%
-@dir %%RIAK_DBDIR%%
-@dir %%RIAK_HOMEDIR%%
-@dir %%RIAK_LIBDIR%%
-@dir %%RIAK_LOGDIR%%
diff --git a/lang/Makefile b/lang/Makefile
index 153cff2c2853..dfacc2afb7d8 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -64,11 +64,6 @@
SUBDIR += erlang-java
SUBDIR += erlang-man
SUBDIR += erlang-riak
- SUBDIR += erlang-runtime15
- SUBDIR += erlang-runtime16
- SUBDIR += erlang-runtime17
- SUBDIR += erlang-runtime18
- SUBDIR += erlang-runtime19
SUBDIR += erlang-runtime20
SUBDIR += erlang-runtime21
SUBDIR += erlang-runtime22
diff --git a/lang/erlang-runtime15/Makefile b/lang/erlang-runtime15/Makefile
deleted file mode 100644
index a10e7abb13ae..000000000000
--- a/lang/erlang-runtime15/Makefile
+++ /dev/null
@@ -1,131 +0,0 @@
-# Created by: ruslan@shevchenko.kiev.ua
-# $FreeBSD$
-
-PORTNAME= erlang
-DISTVERSIONPREFIX= OTP_R
-DISTVERSION= 15B03-1
-PORTREVISION= 1
-PORTEPOCH= 1
-CATEGORIES= lang parallel java
-PKGNAMESUFFIX= -runtime15
-DIST_SUBDIR= erlang
-
-MAINTAINER= rm@FreeBSD.org
-COMMENT= Functional programming language from Ericsson
-
-DEPRECATED= No longer supported upstream, use lang/erlang >= 21
-EXPIRATION_DATE= 2020-01-01
-
-USES= autoreconf:build gmake ncurses perl5
-USE_GITHUB= yes
-GH_PROJECT= otp
-USE_PERL5= build
-
-GNU_CONFIGURE= yes
-MAKE_JOBS_UNSAFE=yes
-
-SUB_FILES= pkg-message
-SUB_LIST= ERLANG_LIB=${ERLANG_LIB}
-
-ERLANG_LIB= ${PORTNAME}${PORTVERSION:C/\..*//}
-
-OPTIONS_DEFINE= DTRACE GS HIPE JAVA KQUEUE ODBC OPENSSL SCTP SMP THREADS WX
-OPTIONS_DEFAULT=KQUEUE OPENSSL SCTP SMP THREADS
-
-GS_DESC= Enable GS application (deprecated)
-HIPE_DESC= Build native HiPE compiler
-KQUEUE_DESC= Enable Kernel Poll (kqueue) support
-SCTP_DESC= Enable SCTP support
-SMP_DESC= Enable SMP support
-WX_DESC= Enable WX application
-
-.if !exists(/usr/sbin/dtrace)
-OPTIONS_EXCLUDE+= DTRACE
-.endif
-
-OPTIONS_EXCLUDE_DragonFly= HIPE SCTP
-
-OPENSSL_VARS= BROKEN_SSL=openssl111
-
-# If you run Erlang and get a message resembling "WARNING: number of
-# probes fixed does not match the number of defined probes (54 != 132,
-# respectively)" you probably misconfigured DTrace in some way.
-
-DTRACE_CFLAGS= -fno-omit-frame-pointer
-DTRACE_CONFIGURE_WITH= dynamic-trace=dtrace
-DTRACE_VARS= STRIP=""
-GS_USES= tk:run
-HIPE_CONFIGURE_ENABLE= hipe
-JAVA_CONFIGURE_ENV= ac_cv_prog_JAVAC="${JAVAC}"
-JAVA_CONFIGURE_WITH= javac
-JAVA_VARS= USE_JAVA=yes
-KQUEUE_CONFIGURE_ENABLE=kernel-poll
-ODBC_CONFIGURE_WITH= odbc
-ODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
-OPENSSL_CONFIGURE_WITH= ssl=${OPENSSLBASE}
-OPENSSL_USES= ssl
-SCTP_CONFIGURE_ENABLE= sctp
-SMP_CONFIGURE_ENABLE= smp-support
-THREADS_CONFIGURE_ENABLE= threads
-WX_CONFIGURE_WITH= wx-config=${WX_CONFIG}
-WX_USES= gl
-WX_VARS= USE_WX=2.8+ WX_COMPS="wx contrib" USE_GL="gl glu"
-
-.include <bsd.port.pre.mk>
-
-.if ${OPSYS} == FreeBSD
-. if ${OSVERSION} >= 1200085 && ${SSL_DEFAULT} == base
-BROKEN= Does not support OpenSSL 1.1, use Erlang 19+
-. endif
-.endif
-
-.if ${OPSYS} == FreeBSD
-CFLAGS+= -DMAP_NORESERVE=0
-.endif
-
-.if ${ARCH} == i386
-MAKE_ARGS+= ARCH=x86
-.endif
-
-.if ${ARCH} == armv6 || ${ARCH} == armv7
-MAKE_ARGS+= ARCH=arm
-.endif
-
-pre-configure:
- @cd ${WRKSRC} && ./otp_build autoconf
-
-pre-configure-WX-off:
- echo "disabled by port options" > ${WRKSRC}/lib/debugger/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/et/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/observer/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/wx/SKIP
-
-post-configure-ODBC-on:
- ${RM} ${WRKSRC}/lib/odbc/SKIP
-
-post-install-GS-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/gs-*
-
-post-install-JAVA-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/jinterface-*
-
-post-install-ODBC-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/odbc-*
-
-post-install-OPENSSL-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/crypto-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssh-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssl-*
-
-post-install-WX-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/debugger-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/et-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/observer-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/wx-*
-
-post-stage:
- ${FIND} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/* -type d -empty -delete
- @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
- | ${SORT} >> ${TMPPLIST}
-
-.include <bsd.port.post.mk>
diff --git a/lang/erlang-runtime15/distinfo b/lang/erlang-runtime15/distinfo
deleted file mode 100644
index 5b6fa6a42ba4..000000000000
--- a/lang/erlang-runtime15/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-TIMESTAMP = 1552839129
-SHA256 (erlang/erlang-otp-OTP_R15B03-1_GH0.tar.gz) = bc0defdb2b234e56a39a28ca8341ea102d5aa09a41b64258bee199ef912b47eb
-SIZE (erlang/erlang-otp-OTP_R15B03-1_GH0.tar.gz) = 33936773
diff --git a/lang/erlang-runtime15/files/patch-Makefile.in b/lang/erlang-runtime15/files/patch-Makefile.in
deleted file mode 100644
index 78481057f296..000000000000
--- a/lang/erlang-runtime15/files/patch-Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
---- Makefile.in.orig
-+++ Makefile.in
-@@ -56,7 +56,7 @@
- libdir = @libdir@
-
- # Where Erlang/OTP is located
--libdir_suffix = /erlang
-+libdir_suffix = /erlang15
- erlang_libdir = $(libdir)$(libdir_suffix)
- erlang_bindir = $(erlang_libdir)/bin
-
-@@ -913,7 +913,7 @@
- #
- # Order is important here, don't change it!
- #
--INST_DEP += install.dirs install.emulator install.libs install.Install install.bin
-+INST_DEP += install.dirs install.emulator install.libs install.Install
-
- install: $(INST_DEP)
-
diff --git a/lang/erlang-runtime15/files/patch-erts-emulator-Makefile.in b/lang/erlang-runtime15/files/patch-erts-emulator-Makefile.in
deleted file mode 100644
index 6fb3ee10e081..000000000000
--- a/lang/erlang-runtime15/files/patch-erts-emulator-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- erts/emulator/Makefile.in.orig
-+++ erts/emulator/Makefile.in
-@@ -544,7 +546,7 @@
- endif
-
- $(OBJDIR)/%.o: beam/%.c
-- $(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
-+ $(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
-
- else
-
diff --git a/lang/erlang-runtime15/files/patch-erts_emulator_drivers_common_efile__drv.c b/lang/erlang-runtime15/files/patch-erts_emulator_drivers_common_efile__drv.c
deleted file mode 100644
index b36abb3db944..000000000000
--- a/lang/erlang-runtime15/files/patch-erts_emulator_drivers_common_efile__drv.c
+++ /dev/null
@@ -1,341 +0,0 @@
---- erts/emulator/drivers/common/efile_drv.c.orig
-+++ erts/emulator/drivers/common/efile_drv.c
-@@ -311,6 +311,18 @@
- unsigned flags; /* Original flags from FILE_OPEN. */
- void (*invoke)(void *);
- struct t_data *d;
-+ /*
-+ * If an operation against a compressed file is being executed
-+ * by an async thread, ensure the stop callback doesn't close
-+ * the fd (gzFile) while the async thread doesn't finish using
-+ * the fd (gzFile) - otherwise it accesses a dangling pointer.
-+ * The following comp_op_* variables are used to coordinate the
-+ * driver stop callback with the ongoing async operation.
-+ */
-+ int comp_op_in_progress;
-+ volatile int comp_op_done;
-+ erts_mtx_t comp_op_mtx;
-+ erts_cnd_t comp_op_cnd;
- void (*free)(void *);
- struct t_data *cq_head; /* Queue of incoming commands */
- struct t_data *cq_tail; /* -""- */
-@@ -426,6 +438,9 @@
- struct t_data *next;
- int command;
- int level;
-+ int volatile *comp_op_done;
-+ erts_mtx_t *comp_op_mtx;
-+ erts_cnd_t *comp_op_cnd;
- void (*invoke)(void *);
- void (*free)(void *);
- int again;
-@@ -714,6 +729,14 @@
- return d;
- }
-
-+static void signal_comp_op_done(struct t_data *d) {
-+ if (d->comp_op_done != NULL) {
-+ erts_mtx_lock(d->comp_op_mtx);
-+ *(d->comp_op_done) = 1;
-+ erts_cnd_signal(d->comp_op_cnd);
-+ erts_mtx_unlock(d->comp_op_mtx);
-+ }
-+}
-
- /*********************************************************************
- * Driver entry point -> init
-@@ -757,6 +780,8 @@
- desc->key = (unsigned int) (UWord) port;
- desc->flags = 0;
- desc->invoke = NULL;
-+ desc->comp_op_in_progress = 0;
-+ desc->comp_op_done = 0;
- desc->d = NULL;
- desc->free = NULL;
- desc->cq_head = NULL;
-@@ -800,6 +825,7 @@
- DTRACE_INVOKE_SETUP(FILE_CLOSE);
- d->again = 0;
- do_close(d->flags, d->fd);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_CLOSE);
- }
-
-@@ -814,9 +840,20 @@
- TRACE_C('p');
-
- if (desc->fd != FILE_FD_INVALID) {
-+ if (desc->comp_op_in_progress) {
-+ erts_mtx_lock(&desc->comp_op_mtx);
-+ while (!desc->comp_op_done) {
-+ erts_cnd_wait(&desc->comp_op_cnd, &desc->comp_op_mtx);
-+ }
-+ erts_mtx_unlock(&desc->comp_op_mtx);
-+ }
- do_close(desc->flags, desc->fd);
- desc->fd = FILE_FD_INVALID;
- desc->flags = 0;
-+ if (sys_info.async_threads > 0 && (desc->flags & EFILE_COMPRESSED)) {
-+ erts_cnd_destroy(&desc->comp_op_cnd);
-+ erts_mtx_destroy(&desc->comp_op_mtx);
-+ }
- }
- if (desc->read_binp) {
- driver_free_binary(desc->read_binp);
-@@ -1032,6 +1069,7 @@
- {
- DTRACE_INVOKE_SETUP_BY_NAME(FILE_MKDIR);
- invoke_name(data, efile_mkdir);
-+ signal_comp_op_done((struct t_data *) data);
- DTRACE_INVOKE_RETURN(FILE_MKDIR);
- }
-
-@@ -1039,6 +1077,7 @@
- {
- DTRACE_INVOKE_SETUP_BY_NAME(FILE_RMDIR);
- invoke_name(data, efile_rmdir);
-+ signal_comp_op_done((struct t_data *) data);
- DTRACE_INVOKE_RETURN(FILE_RMDIR);
- }
-
-@@ -1046,6 +1085,7 @@
- {
- DTRACE_INVOKE_SETUP_BY_NAME(FILE_DELETE);
- invoke_name(data, efile_delete_file);
-+ signal_comp_op_done((struct t_data *) data);
- DTRACE_INVOKE_RETURN(FILE_DELETE);
- }
-
-@@ -1053,6 +1093,7 @@
- {
- DTRACE_INVOKE_SETUP_BY_NAME(FILE_CHDIR);
- invoke_name(data, efile_chdir);
-+ signal_comp_op_done((struct t_data *) data);
- DTRACE_INVOKE_RETURN(FILE_CHDIR);
- }
-
-@@ -1064,6 +1105,7 @@
-
- d->again = 0;
- d->result_ok = efile_fdatasync(&d->errInfo, fd);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_FDATASYNC);
- }
-
-@@ -1075,6 +1117,7 @@
-
- d->again = 0;
- d->result_ok = efile_fsync(&d->errInfo, fd);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_FSYNC);
- }
-
-@@ -1086,6 +1129,7 @@
-
- d->again = 0;
- d->result_ok = efile_truncate_file(&d->errInfo, &fd, d->flags);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_TRUNCATE);
- }
-
-@@ -1129,6 +1173,7 @@
- } else {
- d->again = 0;
- }
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_READ);
- }
-
-@@ -1238,6 +1283,7 @@
- break;
- }
- } while (local_loop);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_READ_LINE);
- }
-
-@@ -1298,6 +1344,7 @@
- done:
- d->again = 0;
- chop_done:
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_READ_FILE);
- }
-
-@@ -1363,6 +1410,7 @@
- }
- d->again = 0;
- done:
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_PREADV);
- }
-
-@@ -1434,6 +1482,7 @@
- done:
- d->result_ok = !0;
- d->again = 0;
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_IPREAD);
- }
-
-@@ -1531,6 +1580,7 @@
- TRACE_F(("w%lu", (unsigned long)size));
-
- }
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_WRITE);
- }
-
-@@ -1550,6 +1600,7 @@
- d->again = 0;
- d->result_ok = efile_getdcwd(&d->errInfo,d->drive, d->b+1,
- RESBUFSIZE-1);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_PWD);
- }
-
-@@ -1564,6 +1615,7 @@
- RESBUFSIZE-1);
- if (d->result_ok != 0)
- FILENAME_COPY((char *) d->b + 1, resbuf+1);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_READLINK);
- }
-
-@@ -1578,6 +1630,7 @@
- RESBUFSIZE-1);
- if (d->result_ok != 0)
- FILENAME_COPY((char *) d->b + 1, resbuf+1);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_ALTNAME);
- }
-
-@@ -1670,6 +1723,7 @@
- }
- }
- done:
-+ signal_comp_op_done(d);
- EF_FREE(iov); /* Free our copy of the vector, nothing to restore */
- DTRACE_INVOKE_RETURN(FILE_PWRITEV);
- }
-@@ -1695,6 +1749,7 @@
- DTRACE3(efile_drv_int_entry, d->sched_i1, d->sched_i2,
- d->command == FILE_LSTAT ? FILE_LSTAT : FILE_FSTAT);
- gcc_optimizer_hack++;
-+ signal_comp_op_done(d);
- }
-
- static void invoke_link(void *data)
-@@ -1707,6 +1762,7 @@
- d->again = 0;
- new_name = name+FILENAME_BYTELEN(name)+FILENAME_CHARSIZE;
- d->result_ok = efile_link(&d->errInfo, name, new_name);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_LINK);
- }
-
-@@ -1720,6 +1776,7 @@
- d->again = 0;
- new_name = name+FILENAME_BYTELEN(name)+FILENAME_CHARSIZE;
- d->result_ok = efile_symlink(&d->errInfo, name, new_name);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_SYMLINK);
- }
-
-@@ -1733,6 +1790,7 @@
- d->again = 0;
- new_name = name+FILENAME_BYTELEN(name)+FILENAME_CHARSIZE;
- d->result_ok = efile_rename(&d->errInfo, name, new_name);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_RENAME);
- }
-
-@@ -1743,6 +1801,7 @@
-
- d->again = 0;
- d->result_ok = efile_write_info(&d->errInfo, &d->info, d->b);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_WRITE_INFO);
- }
-
-@@ -1775,6 +1834,7 @@
- &d->c.lseek.location);
- }
- d->result_ok = status;
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_LSEEK);
- }
-
-@@ -1822,6 +1882,7 @@
- } while(res);
-
- d->result_ok = (d->errInfo.posix_errno == 0);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_READDIR);
- }
-
-@@ -1876,6 +1937,7 @@
-
- d->again = 0;
- d->result_ok = efile_fadvise(&d->errInfo, fd, offset, length, advise);
-+ signal_comp_op_done(d);
- DTRACE_INVOKE_RETURN(FILE_FADVISE);
- }
-
-@@ -1901,11 +1963,14 @@
- d->result_ok = 1;
- if (d->c.sendfile.nbytes != 0)
- d->c.sendfile.nbytes -= nbytes;
-+ } else if (nbytes == 0 && d->c.sendfile.nbytes == 0) {
-+ d->result_ok = 1;
- } else
- d->result_ok = 0;
- } else {
- d->result_ok = -1;
- }
-+ signal_comp_op_done(d);
- }
-
- static void free_sendfile(void *data) {
-@@ -2023,6 +2088,21 @@
- return;
- TRACE_F(("x%i", (int) d->command));
- d->again = sys_info.async_threads == 0;
-+
-+ if ((desc->flags & EFILE_COMPRESSED) && (sys_info.async_threads > 0) &&
-+ (desc->fd != FILE_FD_INVALID)) {
-+
-+ desc->comp_op_in_progress = 1;
-+ desc->comp_op_done = 0;
-+ d->comp_op_done = &desc->comp_op_done;
-+ d->comp_op_mtx = &desc->comp_op_mtx;
-+ d->comp_op_cnd = &desc->comp_op_cnd;
-+ } else {
-+ d->comp_op_done = NULL;
-+ d->comp_op_mtx = NULL;
-+ d->comp_op_cnd = NULL;
-+ }
-+
- DRIVER_ASYNC(d->level, desc, d->invoke, void_ptr=d, d->free);
- }
-
-@@ -2247,6 +2327,8 @@
- return;
- }
-
-+ desc->comp_op_in_progress = 0;
-+
- switch (d->command)
- {
- case FILE_READ:
-@@ -2375,6 +2457,10 @@
- } else {
- desc->fd = d->fd;
- desc->flags = d->flags;
-+ if (sys_info.async_threads > 0 && (desc->flags & EFILE_COMPRESSED)) {
-+ erts_mtx_init(&desc->comp_op_mtx, "efile_drv comp op mutex");
-+ erts_cnd_init(&desc->comp_op_cnd);
-+ }
- reply_Uint(desc, d->fd);
- }
- free_data(data);
diff --git a/lang/erlang-runtime15/files/patch-erts_emulator_utils_beam__makeops b/lang/erlang-runtime15/files/patch-erts_emulator_utils_beam__makeops
deleted file mode 100644
index beacdf34f0b1..000000000000
--- a/lang/erlang-runtime15/files/patch-erts_emulator_utils_beam__makeops
+++ /dev/null
@@ -1,11 +0,0 @@
---- erts/emulator/utils/beam_makeops.orig 2015-04-12 21:52:03 UTC
-+++ erts/emulator/utils/beam_makeops
-@@ -1711,7 +1711,7 @@ sub tr_gen_to {
-
- my $prev_last;
- $prev_last = pop(@{$gen_transform{$key}})
-- if defined @{$gen_transform{$key}}; # Fail
-+ if defined($gen_transform{$key}) && @{$gen_transform{$key}}; # Fail
-
- if ($prev_last && !is_instr($prev_last, 'fail')) {
- error("Line $line: A previous transformation shadows '$orig_transform'");
diff --git a/lang/erlang-runtime15/files/patch-erts_etc_unix_run__erl.c b/lang/erlang-runtime15/files/patch-erts_etc_unix_run__erl.c
deleted file mode 100644
index 1a1306e79a21..000000000000
--- a/lang/erlang-runtime15/files/patch-erts_etc_unix_run__erl.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- erts/etc/unix/run_erl.c.orig
-+++ erts/etc/unix/run_erl.c
-@@ -69,9 +69,6 @@
- #ifdef HAVE_UTMP_H
- # include <utmp.h>
- #endif
--#ifdef HAVE_UTIL_H
--# include <util.h>
--#endif
- #ifdef HAVE_SYS_IOCTL_H
- # include <sys/ioctl.h>
- #endif
diff --git a/lang/erlang-runtime15/files/patch-lib_erl__interface_src_connect_ei__resolve.c b/lang/erlang-runtime15/files/patch-lib_erl__interface_src_connect_ei__resolve.c
deleted file mode 100644
index a39b391e06f0..000000000000
--- a/lang/erlang-runtime15/files/patch-lib_erl__interface_src_connect_ei__resolve.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/erl_interface/src/connect/ei_resolve.c.orig
-+++ lib/erl_interface/src/connect/ei_resolve.c
-@@ -621,7 +621,8 @@
-
- return result;
- #else
-- return gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
-+ struct hostent *dummy;
-+ return gethostbyname_r(name,hostp,buffer,buflen,&dummy,h_errnop);
- #endif
- #endif
- #endif
diff --git a/lang/erlang-runtime15/files/patch-lib_et_src_et__gs__contents__viewer.erl b/lang/erlang-runtime15/files/patch-lib_et_src_et__gs__contents__viewer.erl
deleted file mode 100644
index 6497db89363c..000000000000
--- a/lang/erlang-runtime15/files/patch-lib_et_src_et__gs__contents__viewer.erl
+++ /dev/null
@@ -1,10 +0,0 @@
---- lib/et/src/et_gs_contents_viewer.erl.orig 2010-03-11 16:24:41.000000000 +0800
-+++ lib/et/src/et_gs_contents_viewer.erl 2010-03-11 16:24:53.000000000 +0800
-@@ -347,7 +347,6 @@ handle_info({gs, _Obj, keypress, _, [Key
- 'Caps_Lock' ->
- {noreply, S};
- _ ->
-- io:format("~p: ignored: ~p~n", [?MODULE, KeySym]),
- {noreply, S}
- end;
- handle_info({gs, _Obj, configure, [], [W, H | _]}, S) ->
diff --git a/lang/erlang-runtime15/files/patch-lib_et_src_et__gs__viewer.erl b/lang/erlang-runtime15/files/patch-lib_et_src_et__gs__viewer.erl
deleted file mode 100644
index ee98410a1675..000000000000
--- a/lang/erlang-runtime15/files/patch-lib_et_src_et__gs__viewer.erl
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/et/src/et_gs_viewer.erl.orig 2010-03-11 16:26:59.000000000 +0800
-+++ lib/et/src/et_gs_viewer.erl 2010-03-11 16:27:16.000000000 +0800
-@@ -855,8 +855,7 @@ close_all_others(S) ->
- noreply(S).
-
- click_error(Click, S) ->
-- gs:config(S#state.canvas, beep),
-- io:format("~p: ignored: ~p~n", [?MODULE, Click]).
-+ gs:config(S#state.canvas, beep).
-
- %%%----------------------------------------------------------------------
- %%% Clone viewer
diff --git a/lang/erlang-runtime15/files/patch-lib_gs_src_tool__utils.erl b/lang/erlang-runtime15/files/patch-lib_gs_src_tool__utils.erl
deleted file mode 100644
index 94d64aaf2a94..000000000000
--- a/lang/erlang-runtime15/files/patch-lib_gs_src_tool__utils.erl
+++ /dev/null
@@ -1,84 +0,0 @@
---- lib/gs/src/tool_utils.erl.orig
-+++ lib/gs/src/tool_utils.erl
-@@ -27,6 +27,9 @@
- -export([file_dialog/1]).
- -export([notify/2, confirm/2, confirm_yesno/2, request/2]).
-
-+%% Browser executable list (openURL command line protocol required)
-+-define(BROWSERS, ["netscape", "mozilla", "MozillaFirebird", "opera", "firefox", "seamonkey"]).
-+
- %%----------------------------------------------------------------------
- %% open_help(GS, File)
- %% GS = gsobj() (GS root object returned by gs:start/0,1)
-@@ -67,7 +70,7 @@
- {unix,Type} ->
- case Type of
- darwin -> "open " ++ File;
-- _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
-+ _Else -> unix_url_command("file:" ++ File)
- end;
- {win32,_AnyType} ->
- "start " ++ filename:nativename(File);
-@@ -82,7 +85,7 @@
- {unix,Type} ->
- case Type of
- darwin -> "open " ++ File;
-- _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
-+ _Else -> unix_url_command("file:" ++ File)
- end;
- {win32,_AnyType} ->
- "netscape.exe -h " ++ regexp:gsub(File,"\\\\","/");
-@@ -342,3 +345,53 @@
- [Last];
- insert_newlines(Other) ->
- Other.
-+
-+%% find_browser(BrowserList) => string() | false
-+%% BrowserList - [string()]
-+%% Given a list of basenames, find the first available executable.
-+
-+find_browser([]) ->
-+ false;
-+
-+find_browser([H | T]) ->
-+ case os:find_executable(H) of
-+ false ->
-+ find_browser(T);
-+ Browser ->
-+ Browser
-+ end.
-+
-+%% unix_url_command(URL) => string()
-+%% URL - string()
-+%% Open an URL, using a browser which supports the openURL command
-+%% line protocol. If no browser is found, the empty string will be
-+%% returned.
-+
-+unix_url_command(URL) ->
-+ Template = "BROWSER -remote \"openURL(" ++ URL ++ ")\" || BROWSER " ++ URL ++ "&",
-+
-+ case os:getenv("BROWSER") of
-+ false ->
-+ %% look for a compatible browser
-+ case find_browser(?BROWSERS) of
-+ false ->
-+ "";
-+ Browser ->
-+ case regexp:gsub(Template, "BROWSER", Browser) of
-+ {ok, Command, 0} ->
-+ %% Template does not contain "BROWSER" placeholder
-+ "";
-+ {ok, Command, _} ->
-+ Command
-+ end
-+ end;
-+
-+ Value ->
-+ case regexp:gsub(Template, "BROWSER", Value) of
-+ {ok, Command2, 0} ->
-+ %% no placeholder
-+ "";
-+ {ok, Command2, _} ->
-+ Command2
-+ end
-+ end.
diff --git a/lang/erlang-runtime15/files/patch-lib_kernel_test_file__SUITE.erl b/lang/erlang-runtime15/files/patch-lib_kernel_test_file__SUITE.erl
deleted file mode 100644
index 5aec4b58b685..000000000000
--- a/lang/erlang-runtime15/files/patch-lib_kernel_test_file__SUITE.erl
+++ /dev/null
@@ -1,80 +0,0 @@
---- lib/kernel/test/file_SUITE.erl.orig
-+++ lib/kernel/test/file_SUITE.erl
-@@ -60,7 +60,8 @@
- -export([ read_not_really_compressed/1,
- read_compressed_cooked/1, read_compressed_cooked_binary/1,
- read_cooked_tar_problem/1,
-- write_compressed/1, compress_errors/1, catenated_gzips/1]).
-+ write_compressed/1, compress_errors/1, catenated_gzips/1,
-+ compress_async_crash/1]).
-
- -export([ make_link/1, read_link_info_for_non_link/1, symlinks/1]).
-
-@@ -133,7 +134,8 @@
- {compression, [],
- [read_compressed_cooked, read_compressed_cooked_binary,
- read_cooked_tar_problem, read_not_really_compressed,
-- write_compressed, compress_errors, catenated_gzips]},
-+ write_compressed, compress_errors, catenated_gzips,
-+ compress_async_crash]},
- {links, [],
- [make_link, read_link_info_for_non_link, symlinks]}].
-
-@@ -2271,6 +2273,57 @@
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-+compress_async_crash(suite) -> [];
-+compress_async_crash(doc) -> [];
-+compress_async_crash(Config) when is_list(Config) ->
-+ ?line DataDir = ?config(data_dir, Config),
-+ ?line Path = filename:join(DataDir, "test.gz"),
-+ ExpectedData = <<"qwerty">>,
-+
-+ ?line _ = ?FILE_MODULE:delete(Path),
-+ ?line {ok, Fd} = ?FILE_MODULE:open(Path, [write, binary, compressed]),
-+ ?line ok = ?FILE_MODULE:write(Fd, ExpectedData),
-+ ?line ok = ?FILE_MODULE:close(Fd),
-+
-+ % Test that when using async thread pool, the emulator doesn't crash
-+ % when the efile port driver is stopped while a compressed file operation
-+ % is in progress (being carried by an async thread).
-+ ?line ok = compress_async_crash_loop(10000, Path, ExpectedData),
-+ ?line ok = ?FILE_MODULE:delete(Path),
-+ ok.
-+
-+compress_async_crash_loop(0, _Path, _ExpectedData) ->
-+ ok;
-+compress_async_crash_loop(N, Path, ExpectedData) ->
-+ Parent = self(),
-+ {Pid, Ref} = spawn_monitor(
-+ fun() ->
-+ ?line {ok, Fd} = ?FILE_MODULE:open(
-+ Path, [read, compressed, raw, binary]),
-+ Len = byte_size(ExpectedData),
-+ Parent ! {self(), continue},
-+ ?line {ok, ExpectedData} = ?FILE_MODULE:read(Fd, Len),
-+ ?line ok = ?FILE_MODULE:close(Fd),
-+ receive foobar -> ok end
-+ end),
-+ receive
-+ {Pid, continue} ->
-+ exit(Pid, shutdown),
-+ receive
-+ {'DOWN', Ref, _, _, Reason} ->
-+ ?line shutdown = Reason
-+ end;
-+ {'DOWN', Ref, _, _, Reason2} ->
-+ test_server:fail({worker_exited, Reason2})
-+ after 60000 ->
-+ exit(Pid, shutdown),
-+ erlang:demonitor(Ref, [flush]),
-+ test_server:fail(worker_timeout)
-+ end,
-+ compress_async_crash_loop(N - 1, Path, ExpectedData).
-+
-+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-+
- altname(doc) ->
- "Test the file:altname/1 function";
- altname(suite) ->
diff --git a/lang/erlang-runtime15/files/patch-lib_odbc_c__src_odbcserver.c b/lang/erlang-runtime15/files/patch-lib_odbc_c__src_odbcserver.c
deleted file mode 100644
index 596c5a6c2216..000000000000
--- a/lang/erlang-runtime15/files/patch-lib_odbc_c__src_odbcserver.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/odbc/c_src/odbcserver.c.orig
-+++ lib/odbc/c_src/odbcserver.c
-@@ -1150,7 +1150,7 @@
- (column.type.strlen_or_indptr_array[j]));
- break;
- case SQL_C_SLONG:
-- ei_x_encode_long(&dynamic_buffer(state), ((long*)values)[j]);
-+ ei_x_encode_long(&dynamic_buffer(state), ((SQLINTEGER*)values)[j]);
- break;
- case SQL_C_DOUBLE:
- ei_x_encode_double(&dynamic_buffer(state),
diff --git a/lang/erlang-runtime15/files/patch-lib_runtime__tools_src_observer__backend.erl b/lang/erlang-runtime15/files/patch-lib_runtime__tools_src_observer__backend.erl
deleted file mode 100644
index c2dd3a638247..000000000000
--- a/lang/erlang-runtime15/files/patch-lib_runtime__tools_src_observer__backend.erl
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/runtime_tools/src/observer_backend.erl.orig
-+++ lib/runtime_tools/src/observer_backend.erl
-@@ -83,7 +83,7 @@
- ets -> ets:info(Table, size);
- mnesia -> mnesia:table_info(Table, size)
- end,
-- case Size > 0 of
-+ case Size =/= undefined andalso Size > 0 of
- false ->
- Parent ! {self(), '$end_of_table'},
- normal;
diff --git a/lang/erlang-runtime15/files/patch-lib_ssl_src_ssl__manager.erl b/lang/erlang-runtime15/files/patch-lib_ssl_src_ssl__manager.erl
deleted file mode 100644
index 9cc0997805ed..000000000000
--- a/lang/erlang-runtime15/files/patch-lib_ssl_src_ssl__manager.erl
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/ssl/src/ssl_manager.erl.orig
-+++ lib/ssl/src/ssl_manager.erl
-@@ -145,7 +145,7 @@
- call({new_session_id, Port}).
-
- clean_cert_db(Ref, File) ->
-- erlang:send_after(?CLEAN_CERT_DB, self(), {clean_cert_db, Ref, File}).
-+ erlang:send_after(?CLEAN_CERT_DB, get(ssl_manager), {clean_cert_db, Ref, File}).
-
- %%--------------------------------------------------------------------
- -spec register_session(inet:port_number(), #session{}) -> ok.
diff --git a/lang/erlang-runtime15/files/patch-lib_stdlib_src_calendar.erl b/lang/erlang-runtime15/files/patch-lib_stdlib_src_calendar.erl
deleted file mode 100644
index 0af0683acb27..000000000000
--- a/lang/erlang-runtime15/files/patch-lib_stdlib_src_calendar.erl
+++ /dev/null
@@ -1,26 +0,0 @@
---- lib/stdlib/src/calendar.erl.orig
-+++ lib/stdlib/src/calendar.erl
-@@ -215,11 +215,19 @@
-
- -spec local_time_to_universal_time_dst(t_datetime1970()) -> [t_datetime1970()].
- local_time_to_universal_time_dst(DateTime) ->
-- UtDst = erlang:localtime_to_universaltime(DateTime, true),
-- Ut = erlang:localtime_to_universaltime(DateTime, false),
- %% Reverse check the universal times
-- LtDst = erlang:universaltime_to_localtime(UtDst),
-- Lt = erlang:universaltime_to_localtime(Ut),
-+ {UtDst, LtDst} =
-+ try
-+ UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
-+ {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
-+ catch error:badarg -> {error, error}
-+ end,
-+ {Ut, Lt} =
-+ try
-+ Ut0 = erlang:localtime_to_universaltime(DateTime, false),
-+ {Ut0, erlang:universaltime_to_localtime(Ut0)}
-+ catch error:badarg -> {error, error}
-+ end,
- %% Return the valid universal times
- case {LtDst,Lt} of
- {DateTime,DateTime} when UtDst =/= Ut ->
diff --git a/lang/erlang-runtime15/files/pkg-message.in b/lang/erlang-runtime15/files/pkg-message.in
deleted file mode 100644
index 3564b8665b2a..000000000000
--- a/lang/erlang-runtime15/files/pkg-message.in
+++ /dev/null
@@ -1,8 +0,0 @@
-[
-{ type: install
- message: <<EOM
-To use this runtime port for development or testing, just prepend
-its binary path ("%%LOCALBASE%%/lib/%%ERLANG_LIB%%/bin") to your PATH variable.
-EOM
-}
-]
diff --git a/lang/erlang-runtime15/pkg-descr b/lang/erlang-runtime15/pkg-descr
deleted file mode 100644
index 1453b5442f1f..000000000000
--- a/lang/erlang-runtime15/pkg-descr
+++ /dev/null
@@ -1,10 +0,0 @@
-Erlang is a programming language used to build massively scalable soft
-real-time systems with requirements on high availability. Some of its
-uses are in telecoms, banking, e-commerce, computer telephony and
-instant messaging. Erlang's runtime system has built-in support for
-concurrency, distribution and fault tolerance.
-
-This port contains a standalone runtime environment of Erlang R15
-to be used during the development of OTP applications.
-
-WWW: https://www.erlang.org/
diff --git a/lang/erlang-runtime16/Makefile b/lang/erlang-runtime16/Makefile
deleted file mode 100644
index 1a09225ddeee..000000000000
--- a/lang/erlang-runtime16/Makefile
+++ /dev/null
@@ -1,131 +0,0 @@
-# Created by: ruslan@shevchenko.kiev.ua
-# $FreeBSD$
-
-PORTNAME= erlang
-DISTVERSIONPREFIX= OTP_R
-DISTVERSION= 16B03-1
-PORTREVISION= 1
-PORTEPOCH= 1
-CATEGORIES= lang parallel java
-PKGNAMESUFFIX= -runtime16
-DIST_SUBDIR= erlang
-
-MAINTAINER= erlang@FreeBSD.org
-COMMENT= Functional programming language from Ericsson
-
-DEPRECATED= No longer supported upstream, use lang/erlang >=21
-EXPIRATION_DATE= 2020-01-01
-
-USES= autoreconf:build gmake ncurses perl5
-USE_GITHUB= yes
-GH_PROJECT= otp
-USE_PERL5= build
-
-GNU_CONFIGURE= yes
-MAKE_JOBS_UNSAFE=yes
-
-SUB_FILES= pkg-message
-SUB_LIST= ERLANG_LIB=${ERLANG_LIB}
-
-ERLANG_LIB= ${PORTNAME}${PORTVERSION:C/\..*//}
-
-OPTIONS_DEFINE= DTRACE GS HIPE JAVA KQUEUE ODBC OPENSSL SCTP SMP THREADS WX
-OPTIONS_DEFAULT=KQUEUE OPENSSL SCTP SMP THREADS
-
-GS_DESC= Enable GS application (deprecated)
-HIPE_DESC= Build native HiPE compiler
-KQUEUE_DESC= Enable Kernel Poll (kqueue) support
-SCTP_DESC= Enable SCTP support
-SMP_DESC= Enable SMP support
-WX_DESC= Enable WX application
-
-.if !exists(/usr/sbin/dtrace)
-OPTIONS_EXCLUDE+= DTRACE
-.endif
-
-OPTIONS_EXCLUDE_DragonFly= HIPE SCTP
-
-OPENSSL_VARS= BROKEN_SSL=openssl111
-
-# If you run Erlang and get a message resembling "WARNING: number of
-# probes fixed does not match the number of defined probes (54 != 132,
-# respectively)" you probably misconfigured DTrace in some way.
-
-DTRACE_CFLAGS= -fno-omit-frame-pointer
-DTRACE_CONFIGURE_WITH= dynamic-trace=dtrace
-DTRACE_VARS= STRIP=""
-GS_USES= tk:run
-HIPE_CONFIGURE_ENABLE= hipe
-JAVA_CONFIGURE_ENV= ac_cv_prog_JAVAC="${JAVAC}"
-JAVA_CONFIGURE_WITH= javac
-JAVA_VARS= USE_JAVA=yes
-KQUEUE_CONFIGURE_ENABLE=kernel-poll
-ODBC_CONFIGURE_WITH= odbc
-ODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
-OPENSSL_CONFIGURE_WITH= ssl=${OPENSSLBASE}
-OPENSSL_USES= ssl
-SCTP_CONFIGURE_ENABLE= sctp
-SMP_CONFIGURE_ENABLE= smp-support
-THREADS_CONFIGURE_ENABLE= threads
-WX_CONFIGURE_WITH= wx-config=${WX_CONFIG}
-WX_USES= gl
-WX_VARS= USE_WX=2.8+ WX_COMPS="wx contrib" USE_GL="gl glu"
-
-.include <bsd.port.pre.mk>
-
-.if ${OPSYS} == FreeBSD
-. if ${OSVERSION} >= 1200085 && ${SSL_DEFAULT} == base
-BROKEN= Does not support OpenSSL 1.1, use Erlang 19+
-. endif
-.endif
-
-.if ${OPSYS} == FreeBSD
-CFLAGS+= -DMAP_NORESERVE=0
-.endif
-
-.if ${ARCH} == i386
-MAKE_ARGS+= ARCH=x86
-.endif
-
-.if ${ARCH} == armv6 || ${ARCH} == armv7
-MAKE_ARGS+= ARCH=arm
-.endif
-
-pre-configure:
- @cd ${WRKSRC} && ./otp_build autoconf
-
-pre-configure-WX-off:
- echo "disabled by port options" > ${WRKSRC}/lib/debugger/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/et/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/observer/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/wx/SKIP
-
-post-configure-ODBC-on:
- ${RM} ${WRKSRC}/lib/odbc/SKIP
-
-post-install-GS-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/gs-*
-
-post-install-JAVA-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/jinterface-*
-
-post-install-ODBC-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/odbc-*
-
-post-install-OPENSSL-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/crypto-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssh-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssl-*
-
-post-install-WX-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/debugger-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/et-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/observer-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/wx-*
-
-post-stage:
- ${FIND} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/* -type d -empty -delete
- @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
- | ${SORT} >> ${TMPPLIST}
-
-.include <bsd.port.post.mk>
diff --git a/lang/erlang-runtime16/distinfo b/lang/erlang-runtime16/distinfo
deleted file mode 100644
index 46584227b557..000000000000
--- a/lang/erlang-runtime16/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-TIMESTAMP = 1552763013
-SHA256 (erlang/erlang-otp-OTP_R16B03-1_GH0.tar.gz) = bf2aea30104526999d9d1547da84fc115dd706a24fa5b706dfcace1290b351ef
-SIZE (erlang/erlang-otp-OTP_R16B03-1_GH0.tar.gz) = 32821912
diff --git a/lang/erlang-runtime16/files/patch-Makefile.in b/lang/erlang-runtime16/files/patch-Makefile.in
deleted file mode 100644
index 8ebb6063d76d..000000000000
--- a/lang/erlang-runtime16/files/patch-Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
---- Makefile.in.orig
-+++ Makefile.in
-@@ -56,7 +56,7 @@
- libdir = @libdir@
-
- # Where Erlang/OTP is located
--libdir_suffix = /erlang
-+libdir_suffix = /erlang16
- erlang_libdir = $(libdir)$(libdir_suffix)
- erlang_bindir = $(erlang_libdir)/bin
-
-@@ -913,7 +913,7 @@
- #
- # Order is important here, don't change it!
- #
--INST_DEP += install.dirs install.emulator install.libs install.Install install.bin
-+INST_DEP += install.dirs install.emulator install.libs install.Install
-
- install: $(INST_DEP)
-
diff --git a/lang/erlang-runtime16/files/patch-erts_emulator_drivers_common_efile__drv.c b/lang/erlang-runtime16/files/patch-erts_emulator_drivers_common_efile__drv.c
deleted file mode 100644
index bc3c37541f66..000000000000
--- a/lang/erlang-runtime16/files/patch-erts_emulator_drivers_common_efile__drv.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- erts/emulator/drivers/common/efile_drv.c.orig
-+++ erts/emulator/drivers/common/efile_drv.c
-@@ -1938,6 +1938,8 @@
- d->result_ok = 1;
- if (d->c.sendfile.nbytes != 0)
- d->c.sendfile.nbytes -= nbytes;
-+ } else if (nbytes == 0 && d->c.sendfile.nbytes == 0) {
-+ d->result_ok = 1;
- } else
- d->result_ok = 0;
- } else {
diff --git a/lang/erlang-runtime16/files/patch-erts_etc_unix_run__erl.c b/lang/erlang-runtime16/files/patch-erts_etc_unix_run__erl.c
deleted file mode 100644
index 1a1306e79a21..000000000000
--- a/lang/erlang-runtime16/files/patch-erts_etc_unix_run__erl.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- erts/etc/unix/run_erl.c.orig
-+++ erts/etc/unix/run_erl.c
-@@ -69,9 +69,6 @@
- #ifdef HAVE_UTMP_H
- # include <utmp.h>
- #endif
--#ifdef HAVE_UTIL_H
--# include <util.h>
--#endif
- #ifdef HAVE_SYS_IOCTL_H
- # include <sys/ioctl.h>
- #endif
diff --git a/lang/erlang-runtime16/files/patch-lib_crypto_c__src_Makefile.in b/lang/erlang-runtime16/files/patch-lib_crypto_c__src_Makefile.in
deleted file mode 100644
index 65e1b759ad66..000000000000
--- a/lang/erlang-runtime16/files/patch-lib_crypto_c__src_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/crypto/c_src/Makefile.in.orig 2016-03-14 20:11:15 UTC
-+++ lib/crypto/c_src/Makefile.in
-@@ -90,7 +90,7 @@ endif
- DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
-
- ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
--SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
-+SSL_DED_LD_RUNTIME_LIBRARY_PATH =
- CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME)
- EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
- else
diff --git a/lang/erlang-runtime16/files/patch-lib_crypto_priv_Makefile b/lang/erlang-runtime16/files/patch-lib_crypto_priv_Makefile
deleted file mode 100644
index 26f2c38e360d..000000000000
--- a/lang/erlang-runtime16/files/patch-lib_crypto_priv_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/crypto/priv/Makefile.orig 2016-03-14 20:11:15 UTC
-+++ lib/crypto/priv/Makefile
-@@ -61,7 +61,7 @@ OBJS = $(OBJDIR)/crypto.o
- # ----------------------------------------------------
-
- $(SO_NIFLIB): $(OBJS)
-- $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
-+ $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
- -o $@ $^ -lcrypto
-
- $(DLL_NIFLIB): $(OBJS)
diff --git a/lang/erlang-runtime16/files/patch-lib_erl__interface_src_connect_ei__resolve.c b/lang/erlang-runtime16/files/patch-lib_erl__interface_src_connect_ei__resolve.c
deleted file mode 100644
index a39b391e06f0..000000000000
--- a/lang/erlang-runtime16/files/patch-lib_erl__interface_src_connect_ei__resolve.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/erl_interface/src/connect/ei_resolve.c.orig
-+++ lib/erl_interface/src/connect/ei_resolve.c
-@@ -621,7 +621,8 @@
-
- return result;
- #else
-- return gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
-+ struct hostent *dummy;
-+ return gethostbyname_r(name,hostp,buffer,buflen,&dummy,h_errnop);
- #endif
- #endif
- #endif
diff --git a/lang/erlang-runtime16/files/patch-lib_et_src_et__gs__contents__viewer.erl b/lang/erlang-runtime16/files/patch-lib_et_src_et__gs__contents__viewer.erl
deleted file mode 100644
index 6497db89363c..000000000000
--- a/lang/erlang-runtime16/files/patch-lib_et_src_et__gs__contents__viewer.erl
+++ /dev/null
@@ -1,10 +0,0 @@
---- lib/et/src/et_gs_contents_viewer.erl.orig 2010-03-11 16:24:41.000000000 +0800
-+++ lib/et/src/et_gs_contents_viewer.erl 2010-03-11 16:24:53.000000000 +0800
-@@ -347,7 +347,6 @@ handle_info({gs, _Obj, keypress, _, [Key
- 'Caps_Lock' ->
- {noreply, S};
- _ ->
-- io:format("~p: ignored: ~p~n", [?MODULE, KeySym]),
- {noreply, S}
- end;
- handle_info({gs, _Obj, configure, [], [W, H | _]}, S) ->
diff --git a/lang/erlang-runtime16/files/patch-lib_et_src_et__gs__viewer.erl b/lang/erlang-runtime16/files/patch-lib_et_src_et__gs__viewer.erl
deleted file mode 100644
index ee98410a1675..000000000000
--- a/lang/erlang-runtime16/files/patch-lib_et_src_et__gs__viewer.erl
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/et/src/et_gs_viewer.erl.orig 2010-03-11 16:26:59.000000000 +0800
-+++ lib/et/src/et_gs_viewer.erl 2010-03-11 16:27:16.000000000 +0800
-@@ -855,8 +855,7 @@ close_all_others(S) ->
- noreply(S).
-
- click_error(Click, S) ->
-- gs:config(S#state.canvas, beep),
-- io:format("~p: ignored: ~p~n", [?MODULE, Click]).
-+ gs:config(S#state.canvas, beep).
-
- %%%----------------------------------------------------------------------
- %%% Clone viewer
diff --git a/lang/erlang-runtime16/files/patch-lib_gs_src_tool__utils.erl b/lang/erlang-runtime16/files/patch-lib_gs_src_tool__utils.erl
deleted file mode 100644
index 94d64aaf2a94..000000000000
--- a/lang/erlang-runtime16/files/patch-lib_gs_src_tool__utils.erl
+++ /dev/null
@@ -1,84 +0,0 @@
---- lib/gs/src/tool_utils.erl.orig
-+++ lib/gs/src/tool_utils.erl
-@@ -27,6 +27,9 @@
- -export([file_dialog/1]).
- -export([notify/2, confirm/2, confirm_yesno/2, request/2]).
-
-+%% Browser executable list (openURL command line protocol required)
-+-define(BROWSERS, ["netscape", "mozilla", "MozillaFirebird", "opera", "firefox", "seamonkey"]).
-+
- %%----------------------------------------------------------------------
- %% open_help(GS, File)
- %% GS = gsobj() (GS root object returned by gs:start/0,1)
-@@ -67,7 +70,7 @@
- {unix,Type} ->
- case Type of
- darwin -> "open " ++ File;
-- _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
-+ _Else -> unix_url_command("file:" ++ File)
- end;
- {win32,_AnyType} ->
- "start " ++ filename:nativename(File);
-@@ -82,7 +85,7 @@
- {unix,Type} ->
- case Type of
- darwin -> "open " ++ File;
-- _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
-+ _Else -> unix_url_command("file:" ++ File)
- end;
- {win32,_AnyType} ->
- "netscape.exe -h " ++ regexp:gsub(File,"\\\\","/");
-@@ -342,3 +345,53 @@
- [Last];
- insert_newlines(Other) ->
- Other.
-+
-+%% find_browser(BrowserList) => string() | false
-+%% BrowserList - [string()]
-+%% Given a list of basenames, find the first available executable.
-+
-+find_browser([]) ->
-+ false;
-+
-+find_browser([H | T]) ->
-+ case os:find_executable(H) of
-+ false ->
-+ find_browser(T);
-+ Browser ->
-+ Browser
-+ end.
-+
-+%% unix_url_command(URL) => string()
-+%% URL - string()
-+%% Open an URL, using a browser which supports the openURL command
-+%% line protocol. If no browser is found, the empty string will be
-+%% returned.
-+
-+unix_url_command(URL) ->
-+ Template = "BROWSER -remote \"openURL(" ++ URL ++ ")\" || BROWSER " ++ URL ++ "&",
-+
-+ case os:getenv("BROWSER") of
-+ false ->
-+ %% look for a compatible browser
-+ case find_browser(?BROWSERS) of
-+ false ->
-+ "";
-+ Browser ->
-+ case regexp:gsub(Template, "BROWSER", Browser) of
-+ {ok, Command, 0} ->
-+ %% Template does not contain "BROWSER" placeholder
-+ "";
-+ {ok, Command, _} ->
-+ Command
-+ end
-+ end;
-+
-+ Value ->
-+ case regexp:gsub(Template, "BROWSER", Value) of
-+ {ok, Command2, 0} ->
-+ %% no placeholder
-+ "";
-+ {ok, Command2, _} ->
-+ Command2
-+ end
-+ end.
diff --git a/lang/erlang-runtime16/files/patch-lib_stdlib_src_calendar.erl b/lang/erlang-runtime16/files/patch-lib_stdlib_src_calendar.erl
deleted file mode 100644
index 0af0683acb27..000000000000
--- a/lang/erlang-runtime16/files/patch-lib_stdlib_src_calendar.erl
+++ /dev/null
@@ -1,26 +0,0 @@
---- lib/stdlib/src/calendar.erl.orig
-+++ lib/stdlib/src/calendar.erl
-@@ -215,11 +215,19 @@
-
- -spec local_time_to_universal_time_dst(t_datetime1970()) -> [t_datetime1970()].
- local_time_to_universal_time_dst(DateTime) ->
-- UtDst = erlang:localtime_to_universaltime(DateTime, true),
-- Ut = erlang:localtime_to_universaltime(DateTime, false),
- %% Reverse check the universal times
-- LtDst = erlang:universaltime_to_localtime(UtDst),
-- Lt = erlang:universaltime_to_localtime(Ut),
-+ {UtDst, LtDst} =
-+ try
-+ UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
-+ {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
-+ catch error:badarg -> {error, error}
-+ end,
-+ {Ut, Lt} =
-+ try
-+ Ut0 = erlang:localtime_to_universaltime(DateTime, false),
-+ {Ut0, erlang:universaltime_to_localtime(Ut0)}
-+ catch error:badarg -> {error, error}
-+ end,
- %% Return the valid universal times
- case {LtDst,Lt} of
- {DateTime,DateTime} when UtDst =/= Ut ->
diff --git a/lang/erlang-runtime16/files/patch-lib_wx_c__src_wxe__impl.cpp b/lang/erlang-runtime16/files/patch-lib_wx_c__src_wxe__impl.cpp
deleted file mode 100644
index 5b1e66586f2f..000000000000
--- a/lang/erlang-runtime16/files/patch-lib_wx_c__src_wxe__impl.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- lib/wx/c_src/wxe_impl.cpp.orig 2017-01-30 23:13:25 UTC
-+++ lib/wx/c_src/wxe_impl.cpp
-@@ -666,7 +666,7 @@ void * WxeApp::getPtr(char * bp, wxeMemE
- throw wxe_badarg(index);
- }
- void * temp = memenv->ref2ptr[index];
-- if((index < memenv->next) && ((index == 0) || (temp > NULL)))
-+ if((index < memenv->next) && ((index == 0) || (temp != NULL)))
- return temp;
- else {
- throw wxe_badarg(index);
-@@ -678,7 +678,7 @@ void WxeApp::registerPid(char * bp, ErlD
- if(!memenv)
- throw wxe_badarg(index);
- void * temp = memenv->ref2ptr[index];
-- if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
-+ if((index < memenv->next) && ((index == 0) || (temp != NULL))) {
- ptrMap::iterator it;
- it = ptr2ref.find(temp);
- if(it != ptr2ref.end()) {
diff --git a/lang/erlang-runtime16/files/pkg-message.in b/lang/erlang-runtime16/files/pkg-message.in
deleted file mode 100644
index 3564b8665b2a..000000000000
--- a/lang/erlang-runtime16/files/pkg-message.in
+++ /dev/null
@@ -1,8 +0,0 @@
-[
-{ type: install
- message: <<EOM
-To use this runtime port for development or testing, just prepend
-its binary path ("%%LOCALBASE%%/lib/%%ERLANG_LIB%%/bin") to your PATH variable.
-EOM
-}
-]
diff --git a/lang/erlang-runtime16/pkg-descr b/lang/erlang-runtime16/pkg-descr
deleted file mode 100644
index 71dd36264f12..000000000000
--- a/lang/erlang-runtime16/pkg-descr
+++ /dev/null
@@ -1,10 +0,0 @@
-Erlang is a programming language used to build massively scalable soft
-real-time systems with requirements on high availability. Some of its
-uses are in telecoms, banking, e-commerce, computer telephony and
-instant messaging. Erlang's runtime system has built-in support for
-concurrency, distribution and fault tolerance.
-
-This port contains a standalone runtime environment of Erlang R16
-to be used during the development of OTP applications.
-
-WWW: https://www.erlang.org/
diff --git a/lang/erlang-runtime17/Makefile b/lang/erlang-runtime17/Makefile
deleted file mode 100644
index 164ec905f397..000000000000
--- a/lang/erlang-runtime17/Makefile
+++ /dev/null
@@ -1,144 +0,0 @@
-# Created by: ruslan@shevchenko.kiev.ua
-# $FreeBSD$
-
-PORTNAME= erlang
-DISTVERSIONPREFIX= OTP-
-DISTVERSION= 17.5.6.10
-PORTREVISION= 1
-CATEGORIES= lang parallel java
-PKGNAMESUFFIX= -runtime17
-DIST_SUBDIR= erlang
-
-MAINTAINER= erlang@FreeBSD.org
-COMMENT= Functional programming language from Ericsson
-
-DEPRECATED= No longer supported upstream, use lang/erlang >=21
-EXPIRATION_DATE= 2020-01-01
-
-USES= autoreconf:build gmake ncurses perl5
-USE_GITHUB= yes
-GH_PROJECT= otp
-USE_PERL5= build
-
-GNU_CONFIGURE= yes
-MAKE_JOBS_UNSAFE=yes
-
-SUB_FILES= pkg-message
-SUB_LIST= ERLANG_LIB=${ERLANG_LIB}
-
-ERLANG_LIB= ${PORTNAME}${PORTVERSION:C/\..*//}
-
-OPTIONS_DEFINE= DIRTY DTRACE GS HIPE JAVA KQUEUE NATIVE ODBC OPENSSL SCTP SMP THREADS WX
-OPTIONS_DEFAULT=DTRACE HIPE KQUEUE OPENSSL SCTP SMP THREADS
-
-DIRTY_DESC= Enable Dirty schedulers (experimental)
-GS_DESC= Enable GS application (deprecated)
-HIPE_DESC= Build native HiPE compiler
-KQUEUE_DESC= Enable Kernel Poll (kqueue) support
-NATIVE_DESC= Enable native libraries
-SCTP_DESC= Enable SCTP support
-SMP_DESC= Enable SMP support
-WX_DESC= Enable WX application
-
-NATIVE_IMPLIES= HIPE
-
-.if !exists(/usr/sbin/dtrace)
-OPTIONS_EXCLUDE+= DTRACE
-.endif
-
-OPTIONS_EXCLUDE_DragonFly= HIPE NATIVE SCTP
-# ld(1) fails to link probes: missing __dtrace_erlang___* symbols
-OPTIONS_EXCLUDE_aarch64= DTRACE
-OPTIONS_EXCLUDE_armv6= DTRACE
-OPTIONS_EXCLUDE_armv7= DTRACE
-OPTIONS_EXCLUDE_i386= DTRACE
-
-OPENSSL_VARS= BROKEN_SSL=openssl111
-
-# If you run Erlang and get a message resembling "WARNING: number of
-# probes fixed does not match the number of defined probes (54 != 132,
-# respectively)" you probably misconfigured DTrace in some way.
-
-DIRTY_CONFIGURE_ENABLE= dirty-schedulers
-DTRACE_CFLAGS= -fno-omit-frame-pointer
-DTRACE_CONFIGURE_WITH= dynamic-trace=dtrace
-DTRACE_VARS= STRIP=""
-GS_USES= tk:run
-HIPE_CONFIGURE_ENABLE= hipe
-JAVA_CONFIGURE_ENV= ac_cv_prog_JAVAC="${JAVAC}"
-JAVA_CONFIGURE_WITH= javac
-JAVA_VARS= USE_JAVA=yes
-KQUEUE_CONFIGURE_ENABLE=kernel-poll
-NATIVE_CONFIGURE_ENABLE=native-libs
-ODBC_CONFIGURE_WITH= odbc
-ODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
-OPENSSL_CONFIGURE_WITH= ssl=${OPENSSLBASE}
-OPENSSL_USES= ssl
-SCTP_CONFIGURE_ENABLE= sctp
-SMP_CONFIGURE_ENABLE= smp-support
-THREADS_CONFIGURE_ENABLE= threads
-WX_CONFIGURE_WITH= wx-config=${WX_CONFIG}
-WX_USES= gl
-WX_VARS= USE_WX=2.8+ WX_COMPS="wx contrib" USE_GL="gl glu"
-
-.include <bsd.port.pre.mk>
-
-.if ${OPSYS} == FreeBSD
-. if ${OSVERSION} >= 1200085 && ${SSL_DEFAULT} == base
-BROKEN= Does not support OpenSSL 1.1, use Erlang 19+
-. endif
-.endif
-
-.if ${OPSYS} == FreeBSD
-CFLAGS+= -DMAP_NORESERVE=0
-.endif
-
-.if ${ARCH} == i386
-MAKE_ARGS+= ARCH=x86
-.endif
-
-.if ${ARCH} == armv6 || ${ARCH} == armv7
-MAKE_ARGS+= ARCH=arm
-.endif
-
-pre-configure:
- @cd ${WRKSRC} && ./otp_build autoconf
-
-pre-configure-WX-off:
- echo "disabled by port options" > ${WRKSRC}/lib/debugger/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/et/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/observer/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/wx/SKIP
-
-post-configure-ODBC-on:
- ${RM} ${WRKSRC}/lib/odbc/SKIP
-
-pre-build-NATIVE-on:
- @cd ${WRKSRC} && ${MAKE_CMD} clean
-
-post-install-GS-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/gs-*
-
-post-install-JAVA-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/jinterface-*
-
-post-install-ODBC-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/odbc-*
-
-post-install-OPENSSL-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/crypto-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssh-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssl-*
-
-post-install-WX-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/debugger-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/et-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/observer-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/wx-*
-
-post-stage:
- ${FIND} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/* -type d -empty -delete
- @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
- | ${SORT} >> ${TMPPLIST}
-
-.include <bsd.port.post.mk>
diff --git a/lang/erlang-runtime17/distinfo b/lang/erlang-runtime17/distinfo
deleted file mode 100644
index 6b894aae994d..000000000000
--- a/lang/erlang-runtime17/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-TIMESTAMP = 1552762113
-SHA256 (erlang/erlang-otp-OTP-17.5.6.10_GH0.tar.gz) = ceea65d9326a3a0324b4963a982c610692c087ab23eaf637a626370dfb81fe50
-SIZE (erlang/erlang-otp-OTP-17.5.6.10_GH0.tar.gz) = 33136407
diff --git a/lang/erlang-runtime17/files/patch-Makefile.in b/lang/erlang-runtime17/files/patch-Makefile.in
deleted file mode 100644
index b47a0e774e0a..000000000000
--- a/lang/erlang-runtime17/files/patch-Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
---- Makefile.in.orig
-+++ Makefile.in
-@@ -59,7 +59,7 @@
- libdir = @libdir@
-
- # Where Erlang/OTP is located
--libdir_suffix = /erlang
-+libdir_suffix = /erlang17
- erlang_libdir = $(libdir)$(libdir_suffix)
- erlang_bindir = $(erlang_libdir)/bin
-
-@@ -1007,7 +1007,7 @@
- #
- # Order is important here, don't change it!
- #
--INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version install.bin
-+INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version
-
- install: $(INST_DEP)
-
diff --git a/lang/erlang-runtime17/files/patch-erts_emulator_drivers_common_efile__drv.c b/lang/erlang-runtime17/files/patch-erts_emulator_drivers_common_efile__drv.c
deleted file mode 100644
index a6447f81c7d2..000000000000
--- a/lang/erlang-runtime17/files/patch-erts_emulator_drivers_common_efile__drv.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- erts/emulator/drivers/common/efile_drv.c.orig 2015-03-31 12:32:52 UTC
-+++ erts/emulator/drivers/common/efile_drv.c
-@@ -1938,6 +1938,8 @@ static void invoke_sendfile(void *data)
- d->result_ok = 1;
- if (d->c.sendfile.nbytes != 0)
- d->c.sendfile.nbytes -= nbytes;
-+ } else if (nbytes == 0 && d->c.sendfile.nbytes == 0) {
-+ d->result_ok = 1;
- } else
- d->result_ok = 0;
- } else {
diff --git a/lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c b/lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c
deleted file mode 100644
index b76c5127d2a8..000000000000
--- a/lang/erlang-runtime17/files/patch-erts_etc_unix_run__erl.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- erts/etc/unix/run_erl.c.orig 2015-03-31 12:32:52 UTC
-+++ erts/etc/unix/run_erl.c
-@@ -73,9 +73,6 @@
- #ifdef HAVE_UTMP_H
- # include <utmp.h>
- #endif
--#ifdef HAVE_UTIL_H
--# include <util.h>
--#endif
- #ifdef HAVE_SYS_IOCTL_H
- # include <sys/ioctl.h>
- #endif
diff --git a/lang/erlang-runtime17/files/patch-lib_crypto_c__src_Makefile.in b/lang/erlang-runtime17/files/patch-lib_crypto_c__src_Makefile.in
deleted file mode 100644
index 65e1b759ad66..000000000000
--- a/lang/erlang-runtime17/files/patch-lib_crypto_c__src_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/crypto/c_src/Makefile.in.orig 2016-03-14 20:11:15 UTC
-+++ lib/crypto/c_src/Makefile.in
-@@ -90,7 +90,7 @@ endif
- DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
-
- ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
--SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
-+SSL_DED_LD_RUNTIME_LIBRARY_PATH =
- CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME)
- EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
- else
diff --git a/lang/erlang-runtime17/files/patch-lib_crypto_priv_Makefile b/lang/erlang-runtime17/files/patch-lib_crypto_priv_Makefile
deleted file mode 100644
index 26f2c38e360d..000000000000
--- a/lang/erlang-runtime17/files/patch-lib_crypto_priv_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/crypto/priv/Makefile.orig 2016-03-14 20:11:15 UTC
-+++ lib/crypto/priv/Makefile
-@@ -61,7 +61,7 @@ OBJS = $(OBJDIR)/crypto.o
- # ----------------------------------------------------
-
- $(SO_NIFLIB): $(OBJS)
-- $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
-+ $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
- -o $@ $^ -lcrypto
-
- $(DLL_NIFLIB): $(OBJS)
diff --git a/lang/erlang-runtime17/files/patch-lib_erl__interface_src_connect_ei__resolve.c b/lang/erlang-runtime17/files/patch-lib_erl__interface_src_connect_ei__resolve.c
deleted file mode 100644
index 16046e8e4934..000000000000
--- a/lang/erlang-runtime17/files/patch-lib_erl__interface_src_connect_ei__resolve.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/erl_interface/src/connect/ei_resolve.c.orig 2015-03-31 12:32:52 UTC
-+++ lib/erl_interface/src/connect/ei_resolve.c
-@@ -649,7 +649,8 @@ struct hostent *ei_gethostbyname_r(const
-
- return result;
- #else
-- return gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
-+ struct hostent *dummy;
-+ return gethostbyname_r(name,hostp,buffer,buflen,&dummy,h_errnop);
- #endif
- #endif
- #endif
diff --git a/lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__connection.erl b/lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__connection.erl
deleted file mode 100644
index 8a8d93487cf5..000000000000
--- a/lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__connection.erl
+++ /dev/null
@@ -1,30 +0,0 @@
---- lib/ssl/src/ssl_connection.erl.orig 2015-03-31 12:32:52.000000000 +0000
-+++ lib/ssl/src/ssl_connection.erl 2017-12-14 13:13:46.570861000 +0000
-@@ -1135,8 +1135,25 @@
- request_client_cert(State2, Connection).
-
- certify_client_key_exchange(#encrypted_premaster_secret{premaster_secret= EncPMS},
-- #state{private_key = Key} = State, Connection) ->
-- PremasterSecret = ssl_handshake:premaster_secret(EncPMS, Key),
-+ #state{private_key = Key, client_hello_version = {Major, Minor} = Version } = State, Connection) ->
-+
-+ %% Countermeasure for Bleichenbacher attack always provide some kind of premaster secret
-+ %% and fail handshake later.RFC 5246 section 7.4.7.1.
-+ PremasterSecret =
-+ try ssl_handshake:premaster_secret(EncPMS, Key) of
-+ Secret when erlang:byte_size(Secret) == ?NUM_OF_PREMASTERSECRET_BYTES ->
-+ case Secret of
-+ <<?BYTE(Major), ?BYTE(Minor), _/binary>> -> %% Correct
-+ Secret;
-+ <<?BYTE(_), ?BYTE(_), Rest/binary>> -> %% Version mismatch
-+ <<?BYTE(Major), ?BYTE(Minor), Rest/binary>>
-+ end;
-+ _ -> %% erlang:byte_size(Secret) =/= ?NUM_OF_PREMASTERSECRET_BYTES
-+ make_premaster_secret(Version, rsa)
-+ catch
-+ #alert{description = ?DECRYPT_ERROR} ->
-+ make_premaster_secret(Version, rsa)
-+ end,
- calculate_master_secret(PremasterSecret, State, Connection, certify, cipher);
-
- certify_client_key_exchange(#client_diffie_hellman_public{dh_public = ClientPublicDhKey},
diff --git a/lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__connection.hrl b/lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__connection.hrl
deleted file mode 100644
index cb4b91907b7c..000000000000
--- a/lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__connection.hrl
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/ssl/src/ssl_connection.hrl.orig 2015-03-31 12:32:52.000000000 +0000
-+++ lib/ssl/src/ssl_connection.hrl 2017-12-14 13:18:02.736638000 +0000
-@@ -53,7 +53,8 @@
- session :: #session{} | secret_printout(),
- session_cache :: db_handle(),
- session_cache_cb :: atom(),
-- negotiated_version :: ssl_record:ssl_version(),
-+ negotiated_version :: ssl_record:ssl_version() | 'undefined',
-+ client_hello_version :: ssl_record:ssl_version() | 'undefined',
- client_certificate_requested = false :: boolean(),
- key_algorithm :: ssl_cipher:key_algo(),
- hashsign_algorithm = {undefined, undefined},
diff --git a/lang/erlang-runtime17/files/patch-lib_ssl_src_tls__connection.erl b/lang/erlang-runtime17/files/patch-lib_ssl_src_tls__connection.erl
deleted file mode 100644
index fd4eac923732..000000000000
--- a/lang/erlang-runtime17/files/patch-lib_ssl_src_tls__connection.erl
+++ /dev/null
@@ -1,10 +0,0 @@
---- lib/ssl/src/tls_connection.erl.orig 2015-03-31 12:32:52.000000000 +0000
-+++ lib/ssl/src/tls_connection.erl 2017-12-14 13:22:41.792681000 +0000
-@@ -197,6 +197,7 @@
- ssl_connection:hello({common_client_hello, Type, ServerHelloExt, HashSign},
- State#state{connection_states = ConnectionStates,
- negotiated_version = Version,
-+ client_hello_version = ClientVersion,
- session = Session,
- client_ecc = {EllipticCurves, EcPointFormats}}, ?MODULE);
- #alert{} = Alert ->
diff --git a/lang/erlang-runtime17/files/patch-lib_stdlib_src_calendar.erl b/lang/erlang-runtime17/files/patch-lib_stdlib_src_calendar.erl
deleted file mode 100644
index 34b753d85b27..000000000000
--- a/lang/erlang-runtime17/files/patch-lib_stdlib_src_calendar.erl
+++ /dev/null
@@ -1,26 +0,0 @@
---- lib/stdlib/src/calendar.erl.orig 2015-03-31 12:32:52 UTC
-+++ lib/stdlib/src/calendar.erl
-@@ -279,11 +279,19 @@ local_time_to_universal_time(DateTime, I
- DateTime1 :: datetime1970(),
- DateTime :: datetime1970().
- local_time_to_universal_time_dst(DateTime) ->
-- UtDst = erlang:localtime_to_universaltime(DateTime, true),
-- Ut = erlang:localtime_to_universaltime(DateTime, false),
- %% Reverse check the universal times
-- LtDst = erlang:universaltime_to_localtime(UtDst),
-- Lt = erlang:universaltime_to_localtime(Ut),
-+ {UtDst, LtDst} =
-+ try
-+ UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
-+ {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
-+ catch error:badarg -> {error, error}
-+ end,
-+ {Ut, Lt} =
-+ try
-+ Ut0 = erlang:localtime_to_universaltime(DateTime, false),
-+ {Ut0, erlang:universaltime_to_localtime(Ut0)}
-+ catch error:badarg -> {error, error}
-+ end,
- %% Return the valid universal times
- case {LtDst,Lt} of
- {DateTime,DateTime} when UtDst =/= Ut ->
diff --git a/lang/erlang-runtime17/files/patch-lib_wx_c__src_wxe__impl.cpp b/lang/erlang-runtime17/files/patch-lib_wx_c__src_wxe__impl.cpp
deleted file mode 100644
index 5b1e66586f2f..000000000000
--- a/lang/erlang-runtime17/files/patch-lib_wx_c__src_wxe__impl.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- lib/wx/c_src/wxe_impl.cpp.orig 2017-01-30 23:13:25 UTC
-+++ lib/wx/c_src/wxe_impl.cpp
-@@ -666,7 +666,7 @@ void * WxeApp::getPtr(char * bp, wxeMemE
- throw wxe_badarg(index);
- }
- void * temp = memenv->ref2ptr[index];
-- if((index < memenv->next) && ((index == 0) || (temp > NULL)))
-+ if((index < memenv->next) && ((index == 0) || (temp != NULL)))
- return temp;
- else {
- throw wxe_badarg(index);
-@@ -678,7 +678,7 @@ void WxeApp::registerPid(char * bp, ErlD
- if(!memenv)
- throw wxe_badarg(index);
- void * temp = memenv->ref2ptr[index];
-- if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
-+ if((index < memenv->next) && ((index == 0) || (temp != NULL))) {
- ptrMap::iterator it;
- it = ptr2ref.find(temp);
- if(it != ptr2ref.end()) {
diff --git a/lang/erlang-runtime17/files/pkg-message.in b/lang/erlang-runtime17/files/pkg-message.in
deleted file mode 100644
index 3564b8665b2a..000000000000
--- a/lang/erlang-runtime17/files/pkg-message.in
+++ /dev/null
@@ -1,8 +0,0 @@
-[
-{ type: install
- message: <<EOM
-To use this runtime port for development or testing, just prepend
-its binary path ("%%LOCALBASE%%/lib/%%ERLANG_LIB%%/bin") to your PATH variable.
-EOM
-}
-]
diff --git a/lang/erlang-runtime17/pkg-descr b/lang/erlang-runtime17/pkg-descr
deleted file mode 100644
index 11aa7d46445e..000000000000
--- a/lang/erlang-runtime17/pkg-descr
+++ /dev/null
@@ -1,10 +0,0 @@
-Erlang is a programming language used to build massively scalable soft
-real-time systems with requirements on high availability. Some of its
-uses are in telecoms, banking, e-commerce, computer telephony and
-instant messaging. Erlang's runtime system has built-in support for
-concurrency, distribution and fault tolerance.
-
-This port contains a standalone runtime environment of Erlang 17
-to be used during the development of OTP applications.
-
-WWW: https://www.erlang.org/
diff --git a/lang/erlang-runtime18/Makefile b/lang/erlang-runtime18/Makefile
deleted file mode 100644
index a3a5cd487d21..000000000000
--- a/lang/erlang-runtime18/Makefile
+++ /dev/null
@@ -1,146 +0,0 @@
-# Created by: ruslan@shevchenko.kiev.ua
-# $FreeBSD$
-
-PORTNAME= erlang
-DISTVERSIONPREFIX= OTP-
-DISTVERSION= 18.3.4.11
-PORTREVISION= 1
-CATEGORIES= lang parallel java
-PKGNAMESUFFIX= -runtime18
-DIST_SUBDIR= erlang
-
-MAINTAINER= erlang@FreeBSD.org
-COMMENT= Functional programming language from Ericsson
-
-LICENSE= APACHE20
-
-DEPRECATED= No longer supported upstream, use lang/erlang >=21
-EXPIRATION_DATE= 2020-01-01
-
-USES= autoreconf:build gmake ncurses perl5
-USE_GITHUB= yes
-GH_PROJECT= otp
-USE_PERL5= build
-
-GNU_CONFIGURE= yes
-MAKE_JOBS_UNSAFE=yes
-
-SUB_FILES= pkg-message
-SUB_LIST= ERLANG_LIB=${ERLANG_LIB}
-
-ERLANG_LIB= ${PORTNAME}${PORTVERSION:C/\..*//}
-
-OPTIONS_DEFINE= DIRTY DTRACE GS HIPE JAVA KQUEUE NATIVE ODBC OPENSSL SCTP SMP THREADS WX
-OPTIONS_DEFAULT=DTRACE HIPE KQUEUE OPENSSL SCTP SMP THREADS
-
-DIRTY_DESC= Enable Dirty schedulers (experimental)
-GS_DESC= Enable GS application (deprecated)
-HIPE_DESC= Build native HiPE compiler
-KQUEUE_DESC= Enable Kernel Poll (kqueue) support
-NATIVE_DESC= Enable native libraries
-SCTP_DESC= Enable SCTP support
-SMP_DESC= Enable SMP support
-WX_DESC= Enable WX application
-
-NATIVE_IMPLIES= HIPE
-
-.if !exists(/usr/sbin/dtrace)
-OPTIONS_EXCLUDE+= DTRACE
-.endif
-
-OPTIONS_EXCLUDE_DragonFly= HIPE NATIVE SCTP
-# ld(1) fails to link probes: missing __dtrace_erlang___* symbols
-OPTIONS_EXCLUDE_aarch64= DTRACE
-OPTIONS_EXCLUDE_armv6= DTRACE
-OPTIONS_EXCLUDE_armv7= DTRACE
-OPTIONS_EXCLUDE_i386= DTRACE
-
-OPENSSL_VARS= BROKEN_SSL=openssl111
-
-# If you run Erlang and get a message resembling "WARNING: number of
-# probes fixed does not match the number of defined probes (54 != 132,
-# respectively)" you probably misconfigured DTrace in some way.
-
-DIRTY_CONFIGURE_ENABLE= dirty-schedulers
-DTRACE_CFLAGS= -fno-omit-frame-pointer
-DTRACE_CONFIGURE_WITH= dynamic-trace=dtrace
-DTRACE_VARS= STRIP=""
-GS_USES= tk:run
-HIPE_CONFIGURE_ENABLE= hipe
-JAVA_CONFIGURE_ENV= ac_cv_prog_JAVAC="${JAVAC}"
-JAVA_CONFIGURE_WITH= javac
-JAVA_VARS= USE_JAVA=yes
-KQUEUE_CONFIGURE_ENABLE=kernel-poll
-NATIVE_CONFIGURE_ENABLE=native-libs
-ODBC_CONFIGURE_WITH= odbc
-ODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
-OPENSSL_CONFIGURE_WITH= ssl=${OPENSSLBASE}
-OPENSSL_USES= ssl
-SCTP_CONFIGURE_ENABLE= sctp
-SMP_CONFIGURE_ENABLE= smp-support
-THREADS_CONFIGURE_ENABLE= threads
-WX_CONFIGURE_WITH= wx-config=${WX_CONFIG}
-WX_USES= gl
-WX_VARS= USE_WX=2.8+ WX_COMPS="wx contrib" USE_GL="gl glu"
-
-.include <bsd.port.pre.mk>
-
-.if ${OPSYS} == FreeBSD
-. if ${OSVERSION} >= 1200085 && ${SSL_DEFAULT} == base
-BROKEN= Does not support OpenSSL 1.1, use Erlang 19+
-. endif
-.endif
-
-.if ${OPSYS} == FreeBSD
-CFLAGS+= -DMAP_NORESERVE=0
-.endif
-
-.if ${ARCH} == i386
-MAKE_ARGS+= ARCH=x86
-.endif
-
-.if ${ARCH} == armv6 || ${ARCH} == armv7
-MAKE_ARGS+= ARCH=arm
-.endif
-
-pre-configure:
- @cd ${WRKSRC} && ./otp_build autoconf
-
-pre-configure-WX-off:
- echo "disabled by port options" > ${WRKSRC}/lib/debugger/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/et/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/observer/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/wx/SKIP
-
-post-configure-ODBC-on:
- ${RM} ${WRKSRC}/lib/odbc/SKIP
-
-pre-build-NATIVE-on:
- @cd ${WRKSRC} && ${MAKE_CMD} clean
-
-post-install-GS-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/gs-*
-
-post-install-JAVA-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/jinterface-*
-
-post-install-ODBC-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/odbc-*
-
-post-install-OPENSSL-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/crypto-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssh-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssl-*
-
-post-install-WX-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/debugger-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/et-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/observer-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/wx-*
-
-post-stage:
- ${FIND} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/* -type d -empty -delete
- @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
- | ${SORT} >> ${TMPPLIST}
-
-.include <bsd.port.post.mk>
diff --git a/lang/erlang-runtime18/distinfo b/lang/erlang-runtime18/distinfo
deleted file mode 100644
index 3ec44d5b6f7e..000000000000
--- a/lang/erlang-runtime18/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-TIMESTAMP = 1552761002
-SHA256 (erlang/erlang-otp-OTP-18.3.4.11_GH0.tar.gz) = 94f84e8ca0db0dcadd3411fa7a05dd937142b6ae830255dc341c30b45261b01a
-SIZE (erlang/erlang-otp-OTP-18.3.4.11_GH0.tar.gz) = 33679922
diff --git a/lang/erlang-runtime18/files/patch-Makefile.in b/lang/erlang-runtime18/files/patch-Makefile.in
deleted file mode 100644
index e5cd983b6a7e..000000000000
--- a/lang/erlang-runtime18/files/patch-Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
---- Makefile.in.orig 2015-06-23 18:56:21 UTC
-+++ Makefile.in
-@@ -60,7 +60,7 @@ bindir = @bindir@
- libdir = @libdir@
-
- # Where Erlang/OTP is located
--libdir_suffix = /erlang
-+libdir_suffix = /erlang18
- erlang_libdir = $(libdir)$(libdir_suffix)
- erlang_bindir = $(erlang_libdir)/bin
-
-@@ -1013,7 +1013,7 @@ $(TEST_DIRS):
- #
- # Order is important here, don't change it!
- #
--INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version install.bin
-+INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version
-
- install: $(INST_DEP)
-
diff --git a/lang/erlang-runtime18/files/patch-erts_etc_unix_run__erl.c b/lang/erlang-runtime18/files/patch-erts_etc_unix_run__erl.c
deleted file mode 100644
index b76c5127d2a8..000000000000
--- a/lang/erlang-runtime18/files/patch-erts_etc_unix_run__erl.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- erts/etc/unix/run_erl.c.orig 2015-03-31 12:32:52 UTC
-+++ erts/etc/unix/run_erl.c
-@@ -73,9 +73,6 @@
- #ifdef HAVE_UTMP_H
- # include <utmp.h>
- #endif
--#ifdef HAVE_UTIL_H
--# include <util.h>
--#endif
- #ifdef HAVE_SYS_IOCTL_H
- # include <sys/ioctl.h>
- #endif
diff --git a/lang/erlang-runtime18/files/patch-lib_crypto_c__src_Makefile.in b/lang/erlang-runtime18/files/patch-lib_crypto_c__src_Makefile.in
deleted file mode 100644
index 65e1b759ad66..000000000000
--- a/lang/erlang-runtime18/files/patch-lib_crypto_c__src_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/crypto/c_src/Makefile.in.orig 2016-03-14 20:11:15 UTC
-+++ lib/crypto/c_src/Makefile.in
-@@ -90,7 +90,7 @@ endif
- DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
-
- ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
--SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
-+SSL_DED_LD_RUNTIME_LIBRARY_PATH =
- CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME)
- EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
- else
diff --git a/lang/erlang-runtime18/files/patch-lib_crypto_priv_Makefile b/lang/erlang-runtime18/files/patch-lib_crypto_priv_Makefile
deleted file mode 100644
index 26f2c38e360d..000000000000
--- a/lang/erlang-runtime18/files/patch-lib_crypto_priv_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/crypto/priv/Makefile.orig 2016-03-14 20:11:15 UTC
-+++ lib/crypto/priv/Makefile
-@@ -61,7 +61,7 @@ OBJS = $(OBJDIR)/crypto.o
- # ----------------------------------------------------
-
- $(SO_NIFLIB): $(OBJS)
-- $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
-+ $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
- -o $@ $^ -lcrypto
-
- $(DLL_NIFLIB): $(OBJS)
diff --git a/lang/erlang-runtime18/files/patch-lib_erl__interface_src_connect_ei__resolve.c b/lang/erlang-runtime18/files/patch-lib_erl__interface_src_connect_ei__resolve.c
deleted file mode 100644
index 16046e8e4934..000000000000
--- a/lang/erlang-runtime18/files/patch-lib_erl__interface_src_connect_ei__resolve.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/erl_interface/src/connect/ei_resolve.c.orig 2015-03-31 12:32:52 UTC
-+++ lib/erl_interface/src/connect/ei_resolve.c
-@@ -649,7 +649,8 @@ struct hostent *ei_gethostbyname_r(const
-
- return result;
- #else
-- return gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
-+ struct hostent *dummy;
-+ return gethostbyname_r(name,hostp,buffer,buflen,&dummy,h_errnop);
- #endif
- #endif
- #endif
diff --git a/lang/erlang-runtime18/files/patch-lib_stdlib_src_calendar.erl b/lang/erlang-runtime18/files/patch-lib_stdlib_src_calendar.erl
deleted file mode 100644
index 34b753d85b27..000000000000
--- a/lang/erlang-runtime18/files/patch-lib_stdlib_src_calendar.erl
+++ /dev/null
@@ -1,26 +0,0 @@
---- lib/stdlib/src/calendar.erl.orig 2015-03-31 12:32:52 UTC
-+++ lib/stdlib/src/calendar.erl
-@@ -279,11 +279,19 @@ local_time_to_universal_time(DateTime, I
- DateTime1 :: datetime1970(),
- DateTime :: datetime1970().
- local_time_to_universal_time_dst(DateTime) ->
-- UtDst = erlang:localtime_to_universaltime(DateTime, true),
-- Ut = erlang:localtime_to_universaltime(DateTime, false),
- %% Reverse check the universal times
-- LtDst = erlang:universaltime_to_localtime(UtDst),
-- Lt = erlang:universaltime_to_localtime(Ut),
-+ {UtDst, LtDst} =
-+ try
-+ UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
-+ {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
-+ catch error:badarg -> {error, error}
-+ end,
-+ {Ut, Lt} =
-+ try
-+ Ut0 = erlang:localtime_to_universaltime(DateTime, false),
-+ {Ut0, erlang:universaltime_to_localtime(Ut0)}
-+ catch error:badarg -> {error, error}
-+ end,
- %% Return the valid universal times
- case {LtDst,Lt} of
- {DateTime,DateTime} when UtDst =/= Ut ->
diff --git a/lang/erlang-runtime18/files/patch-lib_wx_c__src_wxe__impl.cpp b/lang/erlang-runtime18/files/patch-lib_wx_c__src_wxe__impl.cpp
deleted file mode 100644
index 5b1e66586f2f..000000000000
--- a/lang/erlang-runtime18/files/patch-lib_wx_c__src_wxe__impl.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- lib/wx/c_src/wxe_impl.cpp.orig 2017-01-30 23:13:25 UTC
-+++ lib/wx/c_src/wxe_impl.cpp
-@@ -666,7 +666,7 @@ void * WxeApp::getPtr(char * bp, wxeMemE
- throw wxe_badarg(index);
- }
- void * temp = memenv->ref2ptr[index];
-- if((index < memenv->next) && ((index == 0) || (temp > NULL)))
-+ if((index < memenv->next) && ((index == 0) || (temp != NULL)))
- return temp;
- else {
- throw wxe_badarg(index);
-@@ -678,7 +678,7 @@ void WxeApp::registerPid(char * bp, ErlD
- if(!memenv)
- throw wxe_badarg(index);
- void * temp = memenv->ref2ptr[index];
-- if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
-+ if((index < memenv->next) && ((index == 0) || (temp != NULL))) {
- ptrMap::iterator it;
- it = ptr2ref.find(temp);
- if(it != ptr2ref.end()) {
diff --git a/lang/erlang-runtime18/files/pkg-message.in b/lang/erlang-runtime18/files/pkg-message.in
deleted file mode 100644
index 3564b8665b2a..000000000000
--- a/lang/erlang-runtime18/files/pkg-message.in
+++ /dev/null
@@ -1,8 +0,0 @@
-[
-{ type: install
- message: <<EOM
-To use this runtime port for development or testing, just prepend
-its binary path ("%%LOCALBASE%%/lib/%%ERLANG_LIB%%/bin") to your PATH variable.
-EOM
-}
-]
diff --git a/lang/erlang-runtime18/pkg-descr b/lang/erlang-runtime18/pkg-descr
deleted file mode 100644
index bfffdfd5206b..000000000000
--- a/lang/erlang-runtime18/pkg-descr
+++ /dev/null
@@ -1,10 +0,0 @@
-Erlang is a programming language used to build massively scalable soft
-real-time systems with requirements on high availability. Some of its
-uses are in telecoms, banking, e-commerce, computer telephony and
-instant messaging. Erlang's runtime system has built-in support for
-concurrency, distribution and fault tolerance.
-
-This port contains a standalone runtime environment of Erlang 18
-to be used during the development of OTP applications.
-
-WWW: https://www.erlang.org/
diff --git a/lang/erlang-runtime19/Makefile b/lang/erlang-runtime19/Makefile
deleted file mode 100644
index 3c275d08583a..000000000000
--- a/lang/erlang-runtime19/Makefile
+++ /dev/null
@@ -1,143 +0,0 @@
-# Created by: ruslan@shevchenko.kiev.ua
-# $FreeBSD$
-
-PORTNAME= erlang
-DISTVERSIONPREFIX= OTP-
-DISTVERSION= 19.3.6.13
-PORTREVISION= 1
-CATEGORIES= lang parallel java
-PKGNAMESUFFIX= -runtime19
-DIST_SUBDIR= erlang
-
-MAINTAINER= erlang@FreeBSD.org
-COMMENT= Functional programming language from Ericsson
-
-LICENSE= APACHE20
-
-DEPRECATED= No longer supported upstream, use lang/erlang >=21
-EXPIRATION_DATE= 2020-01-01
-BROKEN_sparc64= Fails to build: error: fp_except undeclared
-
-USES= autoreconf:build gmake ncurses perl5
-USE_GITHUB= yes
-GH_PROJECT= otp
-USE_PERL5= build
-
-GNU_CONFIGURE= yes
-MAKE_JOBS_UNSAFE=yes
-
-SUB_FILES= pkg-message
-SUB_LIST= ERLANG_LIB=${ERLANG_LIB}
-
-ERLANG_LIB= ${PORTNAME}${PORTVERSION:C/\..*//}
-
-OPTIONS_DEFINE= DIRTY DTRACE GS HIPE JAVA KQUEUE NATIVE ODBC OPENSSL SCTP SMP THREADS WX
-OPTIONS_DEFAULT=DTRACE HIPE KQUEUE OPENSSL SCTP SMP THREADS
-
-DIRTY_DESC= Enable Dirty schedulers (experimental)
-GS_DESC= Enable GS application (deprecated)
-HIPE_DESC= Build native HiPE compiler
-KQUEUE_DESC= Enable Kernel Poll (kqueue) support
-NATIVE_DESC= Enable native libraries
-SCTP_DESC= Enable SCTP support
-SMP_DESC= Enable SMP support
-WX_DESC= Enable WX application
-
-NATIVE_IMPLIES= HIPE
-
-.if !exists(/usr/sbin/dtrace)
-OPTIONS_EXCLUDE+= DTRACE
-.endif
-
-OPTIONS_EXCLUDE_DragonFly= HIPE NATIVE SCTP
-# ld(1) fails to link probes: missing __dtrace_erlang___* symbols
-OPTIONS_EXCLUDE_aarch64= DTRACE
-OPTIONS_EXCLUDE_armv6= DTRACE
-OPTIONS_EXCLUDE_armv7= DTRACE
-OPTIONS_EXCLUDE_i386= DTRACE
-OPTIONS_EXCLUDE_powerpc64= ${OPTIONS_EXCLUDE_${ARCH}_${OSREL:R}}
-OPTIONS_EXCLUDE_powerpc64_13= DTRACE
-
-OPENSSL_VARS= BROKEN_SSL=openssl111
-
-# If you run Erlang and get a message resembling "WARNING: number of
-# probes fixed does not match the number of defined probes (54 != 132,
-# respectively)" you probably misconfigured DTrace in some way.
-
-DIRTY_CONFIGURE_ENABLE= dirty-schedulers
-DTRACE_CFLAGS= -fno-omit-frame-pointer
-DTRACE_CONFIGURE_WITH= dynamic-trace=dtrace
-DTRACE_VARS= STRIP=""
-GS_USES= tk:run
-HIPE_CONFIGURE_ENABLE= hipe
-JAVA_CONFIGURE_ENV= ac_cv_prog_JAVAC="${JAVAC}"
-JAVA_CONFIGURE_WITH= javac
-JAVA_VARS= USE_JAVA=yes
-KQUEUE_CONFIGURE_ENABLE=kernel-poll
-NATIVE_CONFIGURE_ENABLE=native-libs
-ODBC_CONFIGURE_WITH= odbc
-ODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
-OPENSSL_CONFIGURE_WITH= ssl=${OPENSSLBASE}
-OPENSSL_USES= ssl
-SCTP_CONFIGURE_ENABLE= sctp
-SMP_CONFIGURE_ENABLE= smp-support
-THREADS_CONFIGURE_ENABLE= threads
-WX_CONFIGURE_WITH= wx-config=${WX_CONFIG}
-WX_USES= gl
-WX_VARS= USE_WX=2.8+ WX_COMPS="wx contrib" USE_GL="gl glu"
-
-.include <bsd.port.pre.mk>
-
-.if ${OPSYS} == FreeBSD
-CFLAGS+= -DMAP_NORESERVE=0
-.endif
-
-.if ${ARCH} == i386
-MAKE_ARGS+= ARCH=x86
-.endif
-
-.if ${ARCH} == armv6 || ${ARCH} == armv7
-MAKE_ARGS+= ARCH=arm
-.endif
-
-pre-configure:
- @cd ${WRKSRC} && ./otp_build autoconf
-
-pre-configure-WX-off:
- echo "disabled by port options" > ${WRKSRC}/lib/debugger/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/et/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/observer/SKIP
- echo "disabled by port options" > ${WRKSRC}/lib/wx/SKIP
-
-post-configure-ODBC-on:
- ${RM} ${WRKSRC}/lib/odbc/SKIP
-
-pre-build-NATIVE-on:
- @cd ${WRKSRC} && ${MAKE_CMD} clean
-
-post-install-GS-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/gs-*
-
-post-install-JAVA-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/jinterface-*
-
-post-install-ODBC-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/odbc-*
-
-post-install-OPENSSL-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/crypto-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssh-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/ssl-*
-
-post-install-WX-off:
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/debugger-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/et-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/observer-*
- ${RM} -r ${STAGEDIR}${PREFIX}/lib/erlang/lib/wx-*
-
-post-stage:
- ${FIND} ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/* -type d -empty -delete
- @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \
- | ${SORT} >> ${TMPPLIST}
-
-.include <bsd.port.post.mk>
diff --git a/lang/erlang-runtime19/distinfo b/lang/erlang-runtime19/distinfo
deleted file mode 100644
index b94ac23dcc5e..000000000000
--- a/lang/erlang-runtime19/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-TIMESTAMP = 1552760892
-SHA256 (erlang/erlang-otp-OTP-19.3.6.13_GH0.tar.gz) = 11a914176a33068226644f4e999ecc6e965ab1c60a324d90020f164641631fae
-SIZE (erlang/erlang-otp-OTP-19.3.6.13_GH0.tar.gz) = 34006014
diff --git a/lang/erlang-runtime19/files/patch-Makefile.in b/lang/erlang-runtime19/files/patch-Makefile.in
deleted file mode 100644
index 4b0bbf6fbd07..000000000000
--- a/lang/erlang-runtime19/files/patch-Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
---- Makefile.in.orig 2015-06-23 18:56:21 UTC
-+++ Makefile.in
-@@ -60,7 +60,7 @@ bindir = @bindir@
- libdir = @libdir@
-
- # Where Erlang/OTP is located
--libdir_suffix = /erlang
-+libdir_suffix = /erlang19
- erlang_libdir = $(libdir)$(libdir_suffix)
- erlang_bindir = $(erlang_libdir)/bin
-
-@@ -1013,7 +1013,7 @@ $(TEST_DIRS):
- #
- # Order is important here, don't change it!
- #
--INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version install.bin
-+INST_DEP += install.dirs install.emulator install.libs install.Install install.otp_version
-
- install: $(INST_DEP)
-
diff --git a/lang/erlang-runtime19/files/patch-OpenSSL-1.1-a b/lang/erlang-runtime19/files/patch-OpenSSL-1.1-a
deleted file mode 100644
index 9a21938eaf42..000000000000
--- a/lang/erlang-runtime19/files/patch-OpenSSL-1.1-a
+++ /dev/null
@@ -1,1083 +0,0 @@
-From 458c012e18eda87803ef356221d68955f4b8012d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
-Date: Thu, 24 Nov 2016 11:57:55 +0100
-Subject: [PATCH] Support OpenSSL 1.1.0
-
----
- lib/crypto/c_src/crypto.c | 486 +++++++++++++++++++++++++------------
- lib/crypto/c_src/crypto_callback.c | 6 +-
- lib/crypto/c_src/crypto_callback.h | 13 +-
- 3 files changed, 345 insertions(+), 160 deletions(-)
-
-diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
-index 554aaf7587d..0031f9b9620 100644
---- lib/crypto/c_src/crypto.c.orig 2018-02-14 17:16:13.270476000 +0100
-+++ lib/crypto/c_src/crypto.c 2018-02-14 18:17:49.422680000 +0100
-@@ -64,56 +64,55 @@
- /* Helper macro to construct a OPENSSL_VERSION_NUMBER.
- * See openssl/opensslv.h
- */
--#define OpenSSL_version(MAJ, MIN, FIX, P) \
-+#define PACKED_OPENSSL_VERSION(MAJ, MIN, FIX, P) \
- ((((((((MAJ << 8) | MIN) << 8 ) | FIX) << 8) | (P-'a'+1)) << 4) | 0xf)
-
--#define OpenSSL_version_plain(MAJ, MIN, FIX) \
-- OpenSSL_version(MAJ,MIN,FIX,('a'-1))
--
-+#define PACKED_OPENSSL_VERSION_PLAIN(MAJ, MIN, FIX) \
-+ PACKED_OPENSSL_VERSION(MAJ,MIN,FIX,('a'-1))
-
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
- #include <openssl/modes.h>
- #endif
-
- #include "crypto_callback.h"
-
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(0,9,8) \
- && !defined(OPENSSL_NO_SHA224) && defined(NID_sha224) \
- && !defined(OPENSSL_NO_SHA256) /* disabled like this in my sha.h (?) */
- # define HAVE_SHA224
- #endif
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(0,9,8) \
- && !defined(OPENSSL_NO_SHA256) && defined(NID_sha256)
- # define HAVE_SHA256
- #endif
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(0,9,8) \
- && !defined(OPENSSL_NO_SHA384) && defined(NID_sha384)\
- && !defined(OPENSSL_NO_SHA512) /* disabled like this in my sha.h (?) */
- # define HAVE_SHA384
- #endif
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(0,9,8) \
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(0,9,8) \
- && !defined(OPENSSL_NO_SHA512) && defined(NID_sha512)
- # define HAVE_SHA512
- #endif
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version(0,9,7,'e')
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,7,'e')
- # define HAVE_DES_ede3_cfb_encrypt
- #endif
-
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version(0,9,8,'o') \
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'o') \
- && !defined(OPENSSL_NO_EC) \
- && !defined(OPENSSL_NO_ECDH) \
- && !defined(OPENSSL_NO_ECDSA)
- # define HAVE_EC
- #endif
-
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version(0,9,8,'c')
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'c')
- # define HAVE_AES_IGE
- #endif
-
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,1)
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,1)
- # define HAVE_EVP_AES_CTR
- # define HAVE_GCM
--# if OPENSSL_VERSION_NUMBER < OpenSSL_version(1,0,1,'d')
-+# if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION(1,0,1,'d')
- # define HAVE_GCM_EVP_DECRYPT_BUG
- # endif
- #endif
-@@ -122,7 +121,7 @@
- # define HAVE_CHACHA20_POLY1305
- #endif
-
--#if OPENSSL_VERSION_NUMBER <= OpenSSL_version(0,9,8,'l')
-+#if OPENSSL_VERSION_NUMBER <= PACKED_OPENSSL_VERSION(0,9,8,'l')
- # define HAVE_ECB_IVEC_BUG
- #endif
-
-@@ -145,6 +144,7 @@
-
- #endif
-
-+
- #ifdef VALGRIND
- # include <valgrind/memcheck.h>
-
-@@ -213,6 +213,122 @@ do { \
- } \
- } while (0)
-
-+#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
-+
-+/*
-+ * In OpenSSL 1.1.0, most structs are opaque. That means that
-+ * the structs cannot be allocated as automatic variables on the
-+ * C stack (because the size is unknown) and that it is necessary
-+ * to use access functions.
-+ *
-+ * For backward compatibility to previous versions of OpenSSL, define
-+ * on our versions of the new functions defined in 1.1.0 here, so that
-+ * we don't have to sprinkle ifdefs throughout the code.
-+ */
-+
-+static HMAC_CTX *HMAC_CTX_new(void);
-+static void HMAC_CTX_free(HMAC_CTX *ctx);
-+
-+static HMAC_CTX *HMAC_CTX_new()
-+{
-+ HMAC_CTX *ctx = CRYPTO_malloc(sizeof(HMAC_CTX), __FILE__, __LINE__);
-+ HMAC_CTX_init(ctx);
-+ return ctx;
-+}
-+
-+static void HMAC_CTX_free(HMAC_CTX *ctx)
-+{
-+ HMAC_CTX_cleanup(ctx);
-+ return CRYPTO_free(ctx);
-+}
-+
-+#define EVP_MD_CTX_new() EVP_MD_CTX_create()
-+#define EVP_MD_CTX_free(ctx) EVP_MD_CTX_destroy(ctx)
-+
-+static INLINE int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
-+static INLINE int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
-+static INLINE int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
-+
-+static INLINE int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
-+{
-+ r->n = n;
-+ r->e = e;
-+ r->d = d;
-+ return 1;
-+}
-+
-+static INLINE int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
-+{
-+ r->p = p;
-+ r->q = q;
-+ return 1;
-+}
-+
-+static INLINE int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
-+{
-+ r->dmp1 = dmp1;
-+ r->dmq1 = dmq1;
-+ r->iqmp = iqmp;
-+ return 1;
-+}
-+
-+static INLINE int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key);
-+static INLINE int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
-+
-+static INLINE int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
-+{
-+ d->pub_key = pub_key;
-+ d->priv_key = priv_key;
-+ return 1;
-+}
-+
-+static INLINE int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g)
-+{
-+ d->p = p;
-+ d->q = q;
-+ d->g = g;
-+ return 1;
-+}
-+
-+static INLINE int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
-+static INLINE int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
-+static INLINE void DH_get0_pqg(const DH *dh,
-+ const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
-+static INLINE void DH_get0_key(const DH *dh,
-+ const BIGNUM **pub_key, const BIGNUM **priv_key);
-+
-+static INLINE int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
-+{
-+ dh->pub_key = pub_key;
-+ dh->priv_key = priv_key;
-+ return 1;
-+}
-+
-+static INLINE int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
-+{
-+ dh->p = p;
-+ dh->q = q;
-+ dh->g = g;
-+ return 1;
-+}
-+
-+static INLINE void
-+DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
-+{
-+ *p = dh->p;
-+ *q = dh->q;
-+ *g = dh->g;
-+}
-+
-+static INLINE void
-+DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
-+{
-+ *pub_key = dh->pub_key;
-+ *priv_key = dh->priv_key;
-+}
-+
-+#endif /* End of compatibility definitions. */
-+
- /* NIF interface declarations */
- static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info);
- static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info);
-@@ -399,7 +515,7 @@ struct hmac_context
- {
- ErlNifMutex* mtx;
- int alive;
-- HMAC_CTX ctx;
-+ HMAC_CTX* ctx;
- };
- static void hmac_context_dtor(ErlNifEnv* env, struct hmac_context*);
-
-@@ -526,18 +642,24 @@ static struct cipher_type_t* get_cipher_
- #define PRINTF_ERR1(FMT,A1)
- #define PRINTF_ERR2(FMT,A1,A2)
-
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
- /* Define resource types for OpenSSL context structures. */
- static ErlNifResourceType* evp_md_ctx_rtype;
--static void evp_md_ctx_dtor(ErlNifEnv* env, EVP_MD_CTX* ctx) {
-- EVP_MD_CTX_cleanup(ctx);
-+struct evp_md_ctx {
-+ EVP_MD_CTX* ctx;
-+};
-+static void evp_md_ctx_dtor(ErlNifEnv* env, struct evp_md_ctx *ctx) {
-+ EVP_MD_CTX_free(ctx->ctx);
- }
- #endif
-
- #ifdef HAVE_EVP_AES_CTR
- static ErlNifResourceType* evp_cipher_ctx_rtype;
--static void evp_cipher_ctx_dtor(ErlNifEnv* env, EVP_CIPHER_CTX* ctx) {
-- EVP_CIPHER_CTX_cleanup(ctx);
-+struct evp_cipher_ctx {
-+ EVP_CIPHER_CTX* ctx;
-+};
-+static void evp_cipher_ctx_dtor(ErlNifEnv* env, struct evp_cipher_ctx* ctx) {
-+ EVP_CIPHER_CTX_free(ctx->ctx);
- }
- #endif
-
-@@ -625,7 +747,7 @@ static int initialize(ErlNifEnv* env, ER
- PRINTF_ERR0("CRYPTO: Could not open resource type 'hmac_context'");
- return __LINE__;
- }
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
- evp_md_ctx_rtype = enif_open_resource_type(env, NULL, "EVP_MD_CTX",
- (ErlNifResourceDtor*) evp_md_ctx_dtor,
- ERL_NIF_RT_CREATE|ERL_NIF_RT_TAKEOVER,
-@@ -937,12 +1059,12 @@ static ERL_NIF_TERM hash_nif(ErlNifEnv*
- return ret;
- }
-
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
-
- static ERL_NIF_TERM hash_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
- {/* (Type) */
- struct digest_type_t *digp = NULL;
-- EVP_MD_CTX *ctx;
-+ struct evp_md_ctx *ctx;
- ERL_NIF_TERM ret;
-
- digp = get_digest_type(argv[0]);
-@@ -953,8 +1075,9 @@ static ERL_NIF_TERM hash_init_nif(ErlNif
- return atom_notsup;
- }
-
-- ctx = enif_alloc_resource(evp_md_ctx_rtype, sizeof(EVP_MD_CTX));
-- if (!EVP_DigestInit(ctx, digp->md.p)) {
-+ ctx = enif_alloc_resource(evp_md_ctx_rtype, sizeof(struct evp_md_ctx));
-+ ctx->ctx = EVP_MD_CTX_new();
-+ if (!EVP_DigestInit(ctx->ctx, digp->md.p)) {
- enif_release_resource(ctx);
- return atom_notsup;
- }
-@@ -964,7 +1087,7 @@ static ERL_NIF_TERM hash_init_nif(ErlNif
- }
- static ERL_NIF_TERM hash_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
- {/* (Context, Data) */
-- EVP_MD_CTX *ctx, *new_ctx;
-+ struct evp_md_ctx *ctx, *new_ctx;
- ErlNifBinary data;
- ERL_NIF_TERM ret;
-
-@@ -973,9 +1096,10 @@ static ERL_NIF_TERM hash_update_nif(ErlN
- return enif_make_badarg(env);
- }
-
-- new_ctx = enif_alloc_resource(evp_md_ctx_rtype, sizeof(EVP_MD_CTX));
-- if (!EVP_MD_CTX_copy(new_ctx, ctx) ||
-- !EVP_DigestUpdate(new_ctx, data.data, data.size)) {
-+ new_ctx = enif_alloc_resource(evp_md_ctx_rtype, sizeof(struct evp_md_ctx));
-+ new_ctx->ctx = EVP_MD_CTX_new();
-+ if (!EVP_MD_CTX_copy(new_ctx->ctx, ctx->ctx) ||
-+ !EVP_DigestUpdate(new_ctx->ctx, data.data, data.size)) {
- enif_release_resource(new_ctx);
- return atom_notsup;
- }
-@@ -987,7 +1111,8 @@ static ERL_NIF_TERM hash_update_nif(ErlN
- }
- static ERL_NIF_TERM hash_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
- {/* (Context) */
-- EVP_MD_CTX *ctx, new_ctx;
-+ struct evp_md_ctx *ctx;
-+ EVP_MD_CTX *new_ctx;
- ERL_NIF_TERM ret;
- unsigned ret_size;
-
-@@ -995,16 +1120,19 @@ static ERL_NIF_TERM hash_final_nif(ErlNi
- return enif_make_badarg(env);
- }
-
-- ret_size = (unsigned)EVP_MD_CTX_size(ctx);
-+ ret_size = (unsigned)EVP_MD_CTX_size(ctx->ctx);
- ASSERT(0 < ret_size && ret_size <= EVP_MAX_MD_SIZE);
-
-- if (!EVP_MD_CTX_copy(&new_ctx, ctx) ||
-- !EVP_DigestFinal(&new_ctx,
-+ new_ctx = EVP_MD_CTX_new();
-+ if (!EVP_MD_CTX_copy(new_ctx, ctx->ctx) ||
-+ !EVP_DigestFinal(new_ctx,
- enif_make_new_binary(env, ret_size, &ret),
- &ret_size)) {
-+ EVP_MD_CTX_free(new_ctx);
- return atom_notsup;
- }
-- ASSERT(ret_size == (unsigned)EVP_MD_CTX_size(ctx));
-+ EVP_MD_CTX_free(new_ctx);
-+ ASSERT(ret_size == (unsigned)EVP_MD_CTX_size(ctx->ctx));
-
- return ret;
- }
-@@ -1288,7 +1416,7 @@ static ERL_NIF_TERM hmac_nif(ErlNifEnv*
- static void hmac_context_dtor(ErlNifEnv* env, struct hmac_context *obj)
- {
- if (obj->alive) {
-- HMAC_CTX_cleanup(&obj->ctx);
-+ HMAC_CTX_free(obj->ctx);
- obj->alive = 0;
- }
- enif_mutex_destroy(obj->mtx);
-@@ -1313,15 +1441,16 @@ static ERL_NIF_TERM hmac_init_nif(ErlNif
- obj = enif_alloc_resource(hmac_context_rtype, sizeof(struct hmac_context));
- obj->mtx = enif_mutex_create("crypto.hmac");
- obj->alive = 1;
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
-+ obj->ctx = HMAC_CTX_new();
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
- // Check the return value of HMAC_Init: it may fail in FIPS mode
- // for disabled algorithms
-- if (!HMAC_Init(&obj->ctx, key.data, key.size, digp->md.p)) {
-+ if (!HMAC_Init_ex(obj->ctx, key.data, key.size, digp->md.p, NULL)) {
- enif_release_resource(obj);
- return atom_notsup;
- }
- #else
-- HMAC_Init(&obj->ctx, key.data, key.size, digp->md.p);
-+ HMAC_Init_ex(obj->ctx, key.data, key.size, digp->md.p, NULL);
- #endif
-
- ret = enif_make_resource(env, obj);
-@@ -1343,7 +1472,7 @@ static ERL_NIF_TERM hmac_update_nif(ErlN
- enif_mutex_unlock(obj->mtx);
- return enif_make_badarg(env);
- }
-- HMAC_Update(&obj->ctx, data.data, data.size);
-+ HMAC_Update(obj->ctx, data.data, data.size);
- enif_mutex_unlock(obj->mtx);
-
- CONSUME_REDS(env,data);
-@@ -1370,8 +1499,8 @@ static ERL_NIF_TERM hmac_final_nif(ErlNi
- return enif_make_badarg(env);
- }
-
-- HMAC_Final(&obj->ctx, mac_buf, &mac_len);
-- HMAC_CTX_cleanup(&obj->ctx);
-+ HMAC_Final(obj->ctx, mac_buf, &mac_len);
-+ HMAC_CTX_free(obj->ctx);
- obj->alive = 0;
- enif_mutex_unlock(obj->mtx);
-
-@@ -1390,7 +1519,7 @@ static ERL_NIF_TERM block_crypt_nif(ErlN
- struct cipher_type_t *cipherp = NULL;
- const EVP_CIPHER *cipher;
- ErlNifBinary key, ivec, text;
-- EVP_CIPHER_CTX ctx;
-+ EVP_CIPHER_CTX* ctx;
- ERL_NIF_TERM ret;
- unsigned char *out;
- int ivec_size, out_size = 0;
-@@ -1438,30 +1567,30 @@ static ERL_NIF_TERM block_crypt_nif(ErlN
-
- out = enif_make_new_binary(env, text.size, &ret);
-
-- EVP_CIPHER_CTX_init(&ctx);
-- if (!EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, NULL,
-+ ctx = EVP_CIPHER_CTX_new();
-+ if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL,
- (argv[argc - 1] == atom_true)) ||
-- !EVP_CIPHER_CTX_set_key_length(&ctx, key.size) ||
-+ !EVP_CIPHER_CTX_set_key_length(ctx, key.size) ||
- !(EVP_CIPHER_type(cipher) != NID_rc2_cbc ||
-- EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_SET_RC2_KEY_BITS, key.size * 8, NULL)) ||
-- !EVP_CipherInit_ex(&ctx, NULL, NULL,
-+ EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_SET_RC2_KEY_BITS, key.size * 8, NULL)) ||
-+ !EVP_CipherInit_ex(ctx, NULL, NULL,
- key.data, ivec_size ? ivec.data : NULL, -1) ||
-- !EVP_CIPHER_CTX_set_padding(&ctx, 0)) {
-+ !EVP_CIPHER_CTX_set_padding(ctx, 0)) {
-
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+ EVP_CIPHER_CTX_free(ctx);
- return enif_raise_exception(env, atom_notsup);
- }
-
- if (text.size > 0 && /* OpenSSL 0.9.8h asserts text.size > 0 */
-- (!EVP_CipherUpdate(&ctx, out, &out_size, text.data, text.size)
-+ (!EVP_CipherUpdate(ctx, out, &out_size, text.data, text.size)
- || (ASSERT(out_size == text.size), 0)
-- || !EVP_CipherFinal_ex(&ctx, out + out_size, &out_size))) {
-+ || !EVP_CipherFinal_ex(ctx, out + out_size, &out_size))) {
-
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+ EVP_CIPHER_CTX_free(ctx);
- return enif_raise_exception(env, atom_notsup);
- }
- ASSERT(out_size == 0);
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+ EVP_CIPHER_CTX_free(ctx);
- CONSUME_REDS(env, text);
-
- return ret;
-@@ -1563,7 +1692,7 @@ static ERL_NIF_TERM aes_ctr_encrypt(ErlN
- ErlNifBinary key, ivec, text;
- #ifdef HAVE_EVP_AES_CTR
- const EVP_CIPHER *cipher;
-- EVP_CIPHER_CTX ctx;
-+ struct evp_cipher_ctx ctx;
- unsigned char *out;
- int outl = 0;
- #else
-@@ -1621,7 +1750,7 @@ static ERL_NIF_TERM aes_ctr_encrypt(ErlN
- static ERL_NIF_TERM aes_ctr_stream_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
- {/* (Key, IVec) */
- ErlNifBinary key_bin, ivec_bin;
-- EVP_CIPHER_CTX *ctx;
-+ struct evp_cipher_ctx *ctx;
- const EVP_CIPHER *cipher;
- ERL_NIF_TERM ret;
-
-@@ -1639,18 +1768,18 @@ static ERL_NIF_TERM aes_ctr_stream_init(
- default: return enif_make_badarg(env);
- }
-
-- ctx = enif_alloc_resource(evp_cipher_ctx_rtype, sizeof(EVP_CIPHER_CTX));
-- EVP_CIPHER_CTX_init(ctx);
-- EVP_CipherInit_ex(ctx, cipher, NULL,
-+ ctx = enif_alloc_resource(evp_cipher_ctx_rtype, sizeof(struct evp_cipher_ctx));
-+ ctx->ctx = EVP_CIPHER_CTX_new();
-+ EVP_CipherInit_ex(ctx->ctx, cipher, NULL,
- key_bin.data, ivec_bin.data, 1);
-- EVP_CIPHER_CTX_set_padding(ctx, 0);
-+ EVP_CIPHER_CTX_set_padding(ctx->ctx, 0);
- ret = enif_make_resource(env, ctx);
- enif_release_resource(ctx);
- return ret;
- }
- static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
- {/* (Context, Data) */
-- EVP_CIPHER_CTX *ctx, *new_ctx;
-+ struct evp_cipher_ctx *ctx, *new_ctx;
- ErlNifBinary data_bin;
- ERL_NIF_TERM ret, cipher_term;
- unsigned char *out;
-@@ -1660,11 +1789,11 @@ static ERL_NIF_TERM aes_ctr_stream_encry
- || !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
- return enif_make_badarg(env);
- }
-- new_ctx = enif_alloc_resource(evp_cipher_ctx_rtype, sizeof(EVP_CIPHER_CTX));
-- EVP_CIPHER_CTX_init(new_ctx);
-- EVP_CIPHER_CTX_copy(new_ctx, ctx);
-+ new_ctx = enif_alloc_resource(evp_cipher_ctx_rtype, sizeof(struct evp_cipher_ctx));
-+ new_ctx->ctx = EVP_CIPHER_CTX_new();
-+ EVP_CIPHER_CTX_copy(new_ctx->ctx, ctx->ctx);
- out = enif_make_new_binary(env, data_bin.size, &cipher_term);
-- EVP_CipherUpdate(new_ctx, out, &outl, data_bin.data, data_bin.size);
-+ EVP_CipherUpdate(new_ctx->ctx, out, &outl, data_bin.data, data_bin.size);
- ASSERT(outl == data_bin.size);
-
- ret = enif_make_tuple2(env, enif_make_resource(env, new_ctx), cipher_term);
-@@ -1735,7 +1864,7 @@ static ERL_NIF_TERM aes_ctr_stream_encry
- static ERL_NIF_TERM aes_gcm_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
- {/* (Key,Iv,AAD,In) */
- #if defined(HAVE_GCM)
-- EVP_CIPHER_CTX ctx;
-+ EVP_CIPHER_CTX *ctx;
- const EVP_CIPHER *cipher = NULL;
- ErlNifBinary key, iv, aad, in;
- unsigned int tag_len;
-@@ -1759,40 +1888,40 @@ static ERL_NIF_TERM aes_gcm_encrypt(ErlN
- else if (key.size == 32)
- cipher = EVP_aes_256_gcm();
-
-- EVP_CIPHER_CTX_init(&ctx);
-+ ctx = EVP_CIPHER_CTX_new();
-
-- if (EVP_EncryptInit_ex(&ctx, cipher, NULL, NULL, NULL) != 1)
-+ if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1)
- goto out_err;
-
-- EVP_CIPHER_CTX_set_padding(&ctx, 0);
-+ EVP_CIPHER_CTX_set_padding(ctx, 0);
-
-- if (EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_SET_IVLEN, iv.size, NULL) != 1)
-+ if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv.size, NULL) != 1)
- goto out_err;
-- if (EVP_EncryptInit_ex(&ctx, NULL, NULL, key.data, iv.data) != 1)
-+ if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1)
- goto out_err;
-- if (EVP_EncryptUpdate(&ctx, NULL, &len, aad.data, aad.size) != 1)
-+ if (EVP_EncryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1)
- goto out_err;
-
- outp = enif_make_new_binary(env, in.size, &out);
-
-- if (EVP_EncryptUpdate(&ctx, outp, &len, in.data, in.size) != 1)
-+ if (EVP_EncryptUpdate(ctx, outp, &len, in.data, in.size) != 1)
- goto out_err;
-- if (EVP_EncryptFinal_ex(&ctx, outp+len, &len) != 1)
-+ if (EVP_EncryptFinal_ex(ctx, outp+len, &len) != 1)
- goto out_err;
-
- tagp = enif_make_new_binary(env, tag_len, &out_tag);
-
-- if (EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_GET_TAG, tag_len, tagp) != 1)
-+ if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, tag_len, tagp) != 1)
- goto out_err;
-
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+ EVP_CIPHER_CTX_free(ctx);
-
- CONSUME_REDS(env, in);
-
- return enif_make_tuple2(env, out, out_tag);
-
- out_err:
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+ EVP_CIPHER_CTX_free(ctx);
- return atom_error;
-
- #else
-@@ -1805,7 +1934,7 @@ static ERL_NIF_TERM aes_gcm_decrypt(ErlN
- #if defined(HAVE_GCM_EVP_DECRYPT_BUG)
- return aes_gcm_decrypt_NO_EVP(env, argc, argv);
- #elif defined(HAVE_GCM)
-- EVP_CIPHER_CTX ctx;
-+ EVP_CIPHER_CTX *ctx;
- const EVP_CIPHER *cipher = NULL;
- ErlNifBinary key, iv, aad, in, tag;
- unsigned char *outp;
-@@ -1828,34 +1957,34 @@ static ERL_NIF_TERM aes_gcm_decrypt(ErlN
- else if (key.size == 32)
- cipher = EVP_aes_256_gcm();
-
-- EVP_CIPHER_CTX_init(&ctx);
-+ ctx = EVP_CIPHER_CTX_new();
-
-- if (EVP_DecryptInit_ex(&ctx, cipher, NULL, NULL, NULL) != 1)
-+ if (EVP_DecryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1)
- goto out_err;
-- if (EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_SET_IVLEN, iv.size, NULL) != 1)
-+ if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, iv.size, NULL) != 1)
- goto out_err;
-- if (EVP_DecryptInit_ex(&ctx, NULL, NULL, key.data, iv.data) != 1)
-+ if (EVP_DecryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1)
- goto out_err;
-- if (EVP_DecryptUpdate(&ctx, NULL, &len, aad.data, aad.size) != 1)
-+ if (EVP_DecryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1)
- goto out_err;
-
- outp = enif_make_new_binary(env, in.size, &out);
-
-- if (EVP_DecryptUpdate(&ctx, outp, &len, in.data, in.size) != 1)
-+ if (EVP_DecryptUpdate(ctx, outp, &len, in.data, in.size) != 1)
- goto out_err;
-- if (EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_GCM_SET_TAG, tag.size, tag.data) != 1)
-+ if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, tag.size, tag.data) != 1)
- goto out_err;
-- if (EVP_DecryptFinal_ex(&ctx, outp+len, &len) != 1)
-+ if (EVP_DecryptFinal_ex(ctx, outp+len, &len) != 1)
- goto out_err;
-
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+ EVP_CIPHER_CTX_free(ctx);
-
- CONSUME_REDS(env, in);
-
- return out;
-
- out_err:
-- EVP_CIPHER_CTX_cleanup(&ctx);
-+ EVP_CIPHER_CTX_free(ctx);
- return atom_error;
- #else
- return enif_raise_exception(env, atom_notsup);
-@@ -2234,13 +2363,10 @@ static ERL_NIF_TERM dss_verify_nif(ErlNi
- }
-
- dsa = DSA_new();
-- dsa->p = dsa_p;
-- dsa->q = dsa_q;
-- dsa->g = dsa_g;
-- dsa->priv_key = NULL;
-- dsa->pub_key = dsa_y;
-- i = DSA_verify(0, digest_bin.data, SHA_DIGEST_LENGTH,
-- sign_bin.data, sign_bin.size, dsa);
-+ DSA_set0_pqg(dsa, dsa_p, dsa_q, dsa_g);
-+ DSA_set0_key(dsa, dsa_y, NULL);
-+ i = DSA_verify(0, digest_bin.data, SHA_DIGEST_LENGTH,
-+ sign_bin.data, sign_bin.size, dsa);
- DSA_free(dsa);
- return(i > 0) ? atom_true : atom_false;
- }
-@@ -2297,13 +2423,15 @@ static ERL_NIF_TERM rsa_verify_nif(ErlNi
- ERL_NIF_TERM head, tail, ret;
- int i;
- RSA *rsa;
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
- EVP_PKEY *pkey;
- EVP_PKEY_CTX *ctx;
- #endif
- const EVP_MD *md;
- const ERL_NIF_TERM type = argv[0];
- struct digest_type_t *digp = NULL;
-+ BIGNUM *rsa_e;
-+ BIGNUM *rsa_n;
-
- digp = get_digest_type(type);
- if (!digp) {
-@@ -2320,16 +2448,18 @@ static ERL_NIF_TERM rsa_verify_nif(ErlNi
- || digest_bin.size != EVP_MD_size(md)
- || !enif_inspect_binary(env, argv[2], &sign_bin)
- || !enif_get_list_cell(env, argv[3], &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->e)
-+ || !get_bn_from_bin(env, head, &rsa_e)
- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->n)
-+ || !get_bn_from_bin(env, head, &rsa_n)
- || !enif_is_empty_list(env, tail)) {
-
- ret = enif_make_badarg(env);
- goto done;
- }
-
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
-+ (void) RSA_set0_key(rsa, rsa_n, rsa_e, NULL);
-+
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
- pkey = EVP_PKEY_new();
- EVP_PKEY_set1_RSA(pkey, rsa);
-
-@@ -2440,34 +2570,44 @@ static int get_rsa_private_key(ErlNifEnv
- {
- /* key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C] */
- ERL_NIF_TERM head, tail;
-+ BIGNUM *e, *n, *d;
-+ BIGNUM *p, *q;
-+ BIGNUM *dmp1, *dmq1, *iqmp;
-
- if (!enif_get_list_cell(env, key, &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->e)
-+ || !get_bn_from_bin(env, head, &e)
- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->n)
-+ || !get_bn_from_bin(env, head, &n)
- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->d)
-- || (!enif_is_empty_list(env, tail) &&
-- (!enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->p)
-- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->q)
-- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->dmp1)
-- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->dmq1)
-- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->iqmp)
-- || !enif_is_empty_list(env, tail)))) {
-+ || !get_bn_from_bin(env, head, &d)) {
- return 0;
- }
-+ (void) RSA_set0_key(rsa, n, e, d);
-+ if (enif_is_empty_list(env, tail)) {
-+ return 1;
-+ }
-+ if (!enif_get_list_cell(env, tail, &head, &tail)
-+ || !get_bn_from_bin(env, head, &p)
-+ || !enif_get_list_cell(env, tail, &head, &tail)
-+ || !get_bn_from_bin(env, head, &q)
-+ || !enif_get_list_cell(env, tail, &head, &tail)
-+ || !get_bn_from_bin(env, head, &dmp1)
-+ || !enif_get_list_cell(env, tail, &head, &tail)
-+ || !get_bn_from_bin(env, head, &dmq1)
-+ || !enif_get_list_cell(env, tail, &head, &tail)
-+ || !get_bn_from_bin(env, head, &iqmp)
-+ || !enif_is_empty_list(env, tail)) {
-+ return 0;
-+ }
-+ (void) RSA_set0_factors(rsa, p, q);
-+ (void) RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp);
- return 1;
- }
-
- static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
- {/* (Type, Digest, Key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C]) */
- ErlNifBinary digest_bin, ret_bin;
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
- EVP_PKEY *pkey;
- EVP_PKEY_CTX *ctx;
- size_t rsa_s_len;
-@@ -2500,7 +2640,7 @@ static ERL_NIF_TERM rsa_sign_nif(ErlNifE
- }
-
-
--#if OPENSSL_VERSION_NUMBER >= OpenSSL_version_plain(1,0,0)
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
- pkey = EVP_PKEY_new();
- EVP_PKEY_set1_RSA(pkey, rsa);
- rsa_s_len=(size_t)EVP_PKEY_size(pkey);
-@@ -2547,6 +2687,8 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifE
- ERL_NIF_TERM head, tail;
- unsigned int dsa_s_len;
- DSA* dsa;
-+ BIGNUM *dsa_p = NULL, *dsa_q = NULL, *dsa_g = NULL;
-+ BIGNUM *dummy_pub_key, *priv_key = NULL;
- int i;
-
- if (argv[0] != atom_sha
-@@ -2555,26 +2697,37 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifE
- return enif_make_badarg(env);
- }
-
-- dsa = DSA_new();
--
-- dsa->pub_key = NULL;
- if (!enif_get_list_cell(env, argv[2], &head, &tail)
-- || !get_bn_from_bin(env, head, &dsa->p)
-+ || !get_bn_from_bin(env, head, &dsa_p)
- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &dsa->q)
-+ || !get_bn_from_bin(env, head, &dsa_q)
- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &dsa->g)
-+ || !get_bn_from_bin(env, head, &dsa_g)
- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &dsa->priv_key)
-+ || !get_bn_from_bin(env, head, &priv_key)
- || !enif_is_empty_list(env,tail)) {
-- DSA_free(dsa);
-+ if (dsa_p) BN_free(dsa_p);
-+ if (dsa_q) BN_free(dsa_q);
-+ if (dsa_g) BN_free(dsa_g);
-+ if (priv_key) BN_free(priv_key);
- return enif_make_badarg(env);
- }
-
-+ /* Note: DSA_set0_key() does not allow setting only the
-+ * private key, although DSA_sign() does not use the
-+ * public key. Work around this limitation by setting
-+ * the public key to a copy of the private key.
-+ */
-+ dummy_pub_key = BN_dup(priv_key);
-+
-+ dsa = DSA_new();
-+ DSA_set0_pqg(dsa, dsa_p, dsa_q, dsa_g);
-+ DSA_set0_key(dsa, dummy_pub_key, priv_key);
- enif_alloc_binary(DSA_size(dsa), &ret_bin);
- i = DSA_sign(NID_sha1, digest_bin.data, SHA_DIGEST_LENGTH,
- ret_bin.data, &dsa_s_len, dsa);
- DSA_free(dsa);
-+
- if (i) {
- if (dsa_s_len != ret_bin.size) {
- enif_realloc_binary(&ret_bin, dsa_s_len);
-@@ -2611,20 +2764,22 @@ static ERL_NIF_TERM rsa_public_crypt(Erl
- ERL_NIF_TERM head, tail;
- int padding, i;
- RSA* rsa;
-+ BIGNUM *e, *n;
-
- rsa = RSA_new();
-
- if (!enif_inspect_binary(env, argv[0], &data_bin)
- || !enif_get_list_cell(env, argv[1], &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->e)
-+ || !get_bn_from_bin(env, head, &e)
- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &rsa->n)
-+ || !get_bn_from_bin(env, head, &n)
- || !enif_is_empty_list(env,tail)
- || !rsa_pad(argv[2], &padding)) {
-
- RSA_free(rsa);
- return enif_make_badarg(env);
- }
-+ (void) RSA_set0_key(rsa, n, e, NULL);
-
- enif_alloc_binary(RSA_size(rsa), &ret_bin);
-
-@@ -2705,6 +2860,7 @@ static ERL_NIF_TERM dh_generate_paramete
- int p_len, g_len;
- unsigned char *p_ptr, *g_ptr;
- ERL_NIF_TERM ret_p, ret_g;
-+ const BIGNUM *dh_p, *dh_q, *dh_g;
-
- if (!enif_get_int(env, argv[0], &prime_len)
- || !enif_get_int(env, argv[1], &generator)) {
-@@ -2715,15 +2871,16 @@ static ERL_NIF_TERM dh_generate_paramete
- if (dh_params == NULL) {
- return atom_error;
- }
-- p_len = BN_num_bytes(dh_params->p);
-- g_len = BN_num_bytes(dh_params->g);
-+ DH_get0_pqg(dh_params, &dh_p, &dh_q, &dh_g);
-+ DH_free(dh_params);
-+ p_len = BN_num_bytes(dh_p);
-+ g_len = BN_num_bytes(dh_g);
- p_ptr = enif_make_new_binary(env, p_len, &ret_p);
- g_ptr = enif_make_new_binary(env, g_len, &ret_g);
-- BN_bn2bin(dh_params->p, p_ptr);
-- BN_bn2bin(dh_params->g, g_ptr);
-+ BN_bn2bin(dh_p, p_ptr);
-+ BN_bn2bin(dh_g, g_ptr);
- ERL_VALGRIND_MAKE_MEM_DEFINED(p_ptr, p_len);
- ERL_VALGRIND_MAKE_MEM_DEFINED(g_ptr, g_len);
-- DH_free(dh_params);
- return enif_make_list2(env, ret_p, ret_g);
- }
-
-@@ -2732,18 +2889,19 @@ static ERL_NIF_TERM dh_check(ErlNifEnv*
- DH* dh_params;
- int i;
- ERL_NIF_TERM ret, head, tail;
--
-- dh_params = DH_new();
-+ BIGNUM *dh_p, *dh_g;
-
- if (!enif_get_list_cell(env, argv[0], &head, &tail)
-- || !get_bn_from_bin(env, head, &dh_params->p)
-+ || !get_bn_from_bin(env, head, &dh_p)
- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &dh_params->g)
-+ || !get_bn_from_bin(env, head, &dh_g)
- || !enif_is_empty_list(env,tail)) {
-
-- DH_free(dh_params);
- return enif_make_badarg(env);
- }
-+
-+ dh_params = DH_new();
-+ DH_set0_pqg(dh_params, dh_p, NULL, dh_g);
- if (DH_check(dh_params, &i)) {
- if (i == 0) ret = atom_ok;
- else if (i & DH_CHECK_P_NOT_PRIME) ret = atom_not_prime;
-@@ -2767,42 +2925,41 @@ static ERL_NIF_TERM dh_generate_key_nif(
- ERL_NIF_TERM ret, ret_pub, ret_prv, head, tail;
- int mpint; /* 0 or 4 */
- unsigned long len = 0;
-+ BIGNUM *priv_key = NULL;
-+ BIGNUM *dh_p = NULL, *dh_g = NULL;
-
-- dh_params = DH_new();
--
-- if (!(get_bn_from_bin(env, argv[0], &dh_params->priv_key)
-+ if (!(get_bn_from_bin(env, argv[0], &priv_key)
- || argv[0] == atom_undefined)
- || !enif_get_list_cell(env, argv[1], &head, &tail)
-- || !get_bn_from_bin(env, head, &dh_params->p)
-+ || !get_bn_from_bin(env, head, &dh_p)
- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &dh_params->g)
-+ || !get_bn_from_bin(env, head, &dh_g)
- || !enif_is_empty_list(env, tail)
- || !enif_get_int(env, argv[2], &mpint) || (mpint & ~4)
- || !enif_get_ulong(env, argv[3], &len) ) {
-- DH_free(dh_params);
-+ if (priv_key) BN_free(priv_key);
-+ if (dh_p) BN_free(dh_p);
-+ if (dh_g) BN_free(dh_g);
- return enif_make_badarg(env);
- }
-
-- if (len) {
-- if (len < BN_num_bits(dh_params->p))
-- dh_params->length = len;
-- else {
-- DH_free(dh_params);
-- return enif_make_badarg(env);
-- }
-- }
-+ dh_params = DH_new();
-+ DH_set0_key(dh_params, NULL, priv_key);
-+ DH_set0_pqg(dh_params, dh_p, NULL, dh_g);
-
- if (DH_generate_key(dh_params)) {
-- pub_len = BN_num_bytes(dh_params->pub_key);
-- prv_len = BN_num_bytes(dh_params->priv_key);
-+ const BIGNUM *pub_key, *priv_key;
-+ DH_get0_key(dh_params, &pub_key, &priv_key);
-+ pub_len = BN_num_bytes(pub_key);
-+ prv_len = BN_num_bytes(priv_key);
- pub_ptr = enif_make_new_binary(env, pub_len+mpint, &ret_pub);
- prv_ptr = enif_make_new_binary(env, prv_len+mpint, &ret_prv);
- if (mpint) {
- put_int32(pub_ptr, pub_len); pub_ptr += 4;
- put_int32(prv_ptr, prv_len); prv_ptr += 4;
- }
-- BN_bn2bin(dh_params->pub_key, pub_ptr);
-- BN_bn2bin(dh_params->priv_key, prv_ptr);
-+ BN_bn2bin(pub_key, pub_ptr);
-+ BN_bn2bin(priv_key, prv_ptr);
- ERL_VALGRIND_MAKE_MEM_DEFINED(pub_ptr, pub_len);
- ERL_VALGRIND_MAKE_MEM_DEFINED(prv_ptr, prv_len);
- ret = enif_make_tuple2(env, ret_pub, ret_prv);
-@@ -2817,26 +2974,37 @@ static ERL_NIF_TERM dh_generate_key_nif(
- static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
- {/* (OthersPublicKey, MyPrivateKey, DHParams=[P,G]) */
- DH* dh_params;
-- BIGNUM* pubkey = NULL;
-+ BIGNUM *dummy_pub_key = NULL, *priv_key = NULL;
-+ BIGNUM *other_pub_key;
-+ BIGNUM *dh_p = NULL, *dh_g = NULL;
- int i;
- ErlNifBinary ret_bin;
- ERL_NIF_TERM ret, head, tail;
-
- dh_params = DH_new();
-
-- if (!get_bn_from_bin(env, argv[0], &pubkey)
-- || !get_bn_from_bin(env, argv[1], &dh_params->priv_key)
-+ if (!get_bn_from_bin(env, argv[0], &other_pub_key)
-+ || !get_bn_from_bin(env, argv[1], &priv_key)
- || !enif_get_list_cell(env, argv[2], &head, &tail)
-- || !get_bn_from_bin(env, head, &dh_params->p)
-+ || !get_bn_from_bin(env, head, &dh_p)
- || !enif_get_list_cell(env, tail, &head, &tail)
-- || !get_bn_from_bin(env, head, &dh_params->g)
-+ || !get_bn_from_bin(env, head, &dh_g)
- || !enif_is_empty_list(env, tail)) {
--
-+ if (dh_p) BN_free(dh_p);
-+ if (dh_g) BN_free(dh_g);
- ret = enif_make_badarg(env);
- }
- else {
-+ /* Note: DH_set0_key() does not allow setting only the
-+ * private key, although DH_compute_key() does not use the
-+ * public key. Work around this limitation by setting
-+ * the public key to a copy of the private key.
-+ */
-+ dummy_pub_key = BN_dup(priv_key);
-+ DH_set0_key(dh_params, dummy_pub_key, priv_key);
-+ DH_set0_pqg(dh_params, dh_p, NULL, dh_g);
- enif_alloc_binary(DH_size(dh_params), &ret_bin);
-- i = DH_compute_key(ret_bin.data, pubkey, dh_params);
-+ i = DH_compute_key(ret_bin.data, other_pub_key, dh_params);
- if (i > 0) {
- if (i != ret_bin.size) {
- enif_realloc_binary(&ret_bin, i);
-@@ -2848,7 +3016,7 @@ static ERL_NIF_TERM dh_compute_key_nif(E
- ret = atom_error;
- }
- }
-- if (pubkey) BN_free(pubkey);
-+ if (other_pub_key) BN_free(other_pub_key);
- DH_free(dh_params);
- return ret;
- }
-@@ -3420,7 +3588,7 @@ static ERL_NIF_TERM ecdsa_sign_nif(ErlNi
-
- enif_alloc_binary(ECDSA_size(key), &ret_bin);
-
-- i = ECDSA_sign(md->type, digest_bin.data, len,
-+ i = ECDSA_sign(EVP_MD_type(md), digest_bin.data, len,
- ret_bin.data, &dsa_s_len, key);
-
- EC_KEY_free(key);
-@@ -3470,7 +3638,7 @@ static ERL_NIF_TERM ecdsa_verify_nif(Erl
- || !get_ec_key(env, argv[3], atom_undefined, argv[4], &key))
- goto badarg;
-
-- i = ECDSA_verify(md->type, digest_bin.data, len,
-+ i = ECDSA_verify(EVP_MD_type(md), digest_bin.data, len,
- sign_bin.data, sign_bin.size, key);
-
- EC_KEY_free(key);
-diff --git a/lib/crypto/c_src/crypto_callback.c b/lib/crypto/c_src/crypto_callback.c
-index 4c23379f7f6..23d2bed0576 100644
---- lib/crypto/c_src/crypto_callback.c.orig
-+++ lib/crypto/c_src/crypto_callback.c
-@@ -62,7 +62,7 @@ static void nomem(size_t size, const char* op)
- abort();
- }
-
--static void* crypto_alloc(size_t size)
-+static void* crypto_alloc(size_t size CCB_FILE_LINE_ARGS)
- {
- void *ret = enif_alloc(size);
-
-@@ -70,7 +70,7 @@ static void* crypto_alloc(size_t size)
- nomem(size, "allocate");
- return ret;
- }
--static void* crypto_realloc(void* ptr, size_t size)
-+static void* crypto_realloc(void* ptr, size_t size CCB_FILE_LINE_ARGS)
- {
- void* ret = enif_realloc(ptr, size);
-
-@@ -78,7 +78,7 @@ static void* crypto_realloc(void* ptr, size_t size)
- nomem(size, "reallocate");
- return ret;
- }
--static void crypto_free(void* ptr)
-+static void crypto_free(void* ptr CCB_FILE_LINE_ARGS)
- {
- enif_free(ptr);
- }
-diff --git a/lib/crypto/c_src/crypto_callback.h b/lib/crypto/c_src/crypto_callback.h
-index 894d86cfd95..2641cc0c8b9 100644
---- lib/crypto/c_src/crypto_callback.h.orig
-+++ lib/crypto/c_src/crypto_callback.h
-@@ -18,13 +18,20 @@
- * %CopyrightEnd%
- */
-
-+#include <openssl/crypto.h>
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+# define CCB_FILE_LINE_ARGS
-+#else
-+# define CCB_FILE_LINE_ARGS , const char *file, int line
-+#endif
-+
- struct crypto_callbacks
- {
- size_t sizeof_me;
-
-- void* (*crypto_alloc)(size_t size);
-- void* (*crypto_realloc)(void* ptr, size_t size);
-- void (*crypto_free)(void* ptr);
-+ void* (*crypto_alloc)(size_t size CCB_FILE_LINE_ARGS);
-+ void* (*crypto_realloc)(void* ptr, size_t size CCB_FILE_LINE_ARGS);
-+ void (*crypto_free)(void* ptr CCB_FILE_LINE_ARGS);
-
- /* openssl callbacks */
- #ifdef OPENSSL_THREADS
diff --git a/lang/erlang-runtime19/files/patch-OpenSSL-1.1-b b/lang/erlang-runtime19/files/patch-OpenSSL-1.1-b
deleted file mode 100644
index 781d5c687d9d..000000000000
--- a/lang/erlang-runtime19/files/patch-OpenSSL-1.1-b
+++ /dev/null
@@ -1,293 +0,0 @@
-From 4dddb3c0b286e13f2cbccb0cdaa4bffcfee60033 Mon Sep 17 00:00:00 2001
-From: Yuki Ito <yuki@gnnk.net>
-Date: Tue, 20 Dec 2016 17:45:51 +0900
-Subject: [PATCH] crypto: Support chacha20_poly1305
-
-This commit reactivates chacha20_poly1305 and fixes the imprementation
-for the released OpenSSL 1.1.0 or later.
----
- lib/crypto/c_src/crypto.c | 152 ++++++++++++-------------------
- lib/crypto/test/crypto_SUITE.erl | 49 ++++++++--
- 2 files changed, 101 insertions(+), 100 deletions(-)
-
-diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
-index 0031f9b9620..68784cd24c9 100644
---- lib/crypto/c_src/crypto.c
-+++ lib/crypto/c_src/crypto.c
-@@ -117,7 +117,7 @@
- # endif
- #endif
-
--#if defined(NID_chacha20) && !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
-+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
- # define HAVE_CHACHA20_POLY1305
- #endif
-
-@@ -131,20 +131,6 @@
- #include <openssl/ecdsa.h>
- #endif
-
--#if defined(HAVE_CHACHA20_POLY1305)
--#include <openssl/chacha.h>
--#include <openssl/poly1305.h>
--
--#if !defined(CHACHA20_NONCE_LEN)
--# define CHACHA20_NONCE_LEN 8
--#endif
--#if !defined(POLY1305_TAG_LEN)
--# define POLY1305_TAG_LEN 16
--#endif
--
--#endif
--
--
- #ifdef VALGRIND
- # include <valgrind/memcheck.h>
-
-@@ -2038,71 +2024,61 @@
- }
- #endif /* HAVE_GCM_EVP_DECRYPT_BUG */
-
--#if defined(HAVE_CHACHA20_POLY1305)
--static void
--poly1305_update_with_length(poly1305_state *poly1305,
-- const unsigned char *data, size_t data_len)
--{
-- size_t j = data_len;
-- unsigned char length_bytes[8];
-- unsigned i;
-
-- for (i = 0; i < sizeof(length_bytes); i++) {
-- length_bytes[i] = j;
-- j >>= 8;
-- }
--
-- CRYPTO_poly1305_update(poly1305, data, data_len);
-- CRYPTO_poly1305_update(poly1305, length_bytes, sizeof(length_bytes));
--}
--#endif
--
- static ERL_NIF_TERM chacha20_poly1305_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
- {/* (Key,Iv,AAD,In) */
- #if defined(HAVE_CHACHA20_POLY1305)
-+ EVP_CIPHER_CTX *ctx;
-+ const EVP_CIPHER *cipher = NULL;
- ErlNifBinary key, iv, aad, in;
-- unsigned char *outp;
-+ unsigned char *outp, *tagp;
- ERL_NIF_TERM out, out_tag;
-- ErlNifUInt64 in_len_64;
-- unsigned char poly1305_key[32];
-- poly1305_state poly1305;
-+ int len;
-
- if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 32
-- || !enif_inspect_binary(env, argv[1], &iv) || iv.size != CHACHA20_NONCE_LEN
-+ || !enif_inspect_binary(env, argv[1], &iv) || iv.size == 0 || iv.size > 16
- || !enif_inspect_iolist_as_binary(env, argv[2], &aad)
- || !enif_inspect_iolist_as_binary(env, argv[3], &in)) {
- return enif_make_badarg(env);
- }
-
-- /* Take from OpenSSL patch set/LibreSSL:
-- *
-- * The underlying ChaCha implementation may not overflow the block
-- * counter into the second counter word. Therefore we disallow
-- * individual operations that work on more than 2TB at a time.
-- * in_len_64 is needed because, on 32-bit platforms, size_t is only
-- * 32-bits and this produces a warning because it's always false.
-- * Casting to uint64_t inside the conditional is not sufficient to stop
-- * the warning. */
-- in_len_64 = in.size;
-- if (in_len_64 >= (1ULL << 32) * 64 - 64)
-- return enif_make_badarg(env);
-+ cipher = EVP_chacha20_poly1305();
-
-- memset(poly1305_key, 0, sizeof(poly1305_key));
-- CRYPTO_chacha_20(poly1305_key, poly1305_key, sizeof(poly1305_key), key.data, iv.data, 0);
-+ ctx = EVP_CIPHER_CTX_new();
-
-+ if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1)
-+ goto out_err;
-+
-+ EVP_CIPHER_CTX_set_padding(ctx, 0);
-+
-+ if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv.size, NULL) != 1)
-+ goto out_err;
-+ if (EVP_EncryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1)
-+ goto out_err;
-+ if (EVP_EncryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1)
-+ goto out_err;
-+
- outp = enif_make_new_binary(env, in.size, &out);
-
-- CRYPTO_poly1305_init(&poly1305, poly1305_key);
-- poly1305_update_with_length(&poly1305, aad.data, aad.size);
-- CRYPTO_chacha_20(outp, in.data, in.size, key.data, iv.data, 1);
-- poly1305_update_with_length(&poly1305, outp, in.size);
-+ if (EVP_EncryptUpdate(ctx, outp, &len, in.data, in.size) != 1)
-+ goto out_err;
-+ if (EVP_EncryptFinal_ex(ctx, outp+len, &len) != 1)
-+ goto out_err;
-
-- CRYPTO_poly1305_finish(&poly1305, enif_make_new_binary(env, POLY1305_TAG_LEN, &out_tag));
-+ tagp = enif_make_new_binary(env, 16, &out_tag);
-
-+ if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, 16, tagp) != 1)
-+ goto out_err;
-+
-+ EVP_CIPHER_CTX_free(ctx);
-+
- CONSUME_REDS(env, in);
-
- return enif_make_tuple2(env, out, out_tag);
-
-+out_err:
-+ EVP_CIPHER_CTX_free(ctx);
-+ return atom_error;
- #else
- return enif_raise_exception(env, atom_notsup);
- #endif
-@@ -2111,53 +2087,52 @@
- static ERL_NIF_TERM chacha20_poly1305_decrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
- {/* (Key,Iv,AAD,In,Tag) */
- #if defined(HAVE_CHACHA20_POLY1305)
-+ EVP_CIPHER_CTX *ctx;
-+ const EVP_CIPHER *cipher = NULL;
- ErlNifBinary key, iv, aad, in, tag;
- unsigned char *outp;
- ERL_NIF_TERM out;
-- ErlNifUInt64 in_len_64;
-- unsigned char poly1305_key[32];
-- unsigned char mac[POLY1305_TAG_LEN];
-- poly1305_state poly1305;
-+ int len;
-
- if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 32
-- || !enif_inspect_binary(env, argv[1], &iv) || iv.size != CHACHA20_NONCE_LEN
-+ || !enif_inspect_binary(env, argv[1], &iv) || iv.size == 0 || iv.size > 16
- || !enif_inspect_iolist_as_binary(env, argv[2], &aad)
- || !enif_inspect_iolist_as_binary(env, argv[3], &in)
-- || !enif_inspect_iolist_as_binary(env, argv[4], &tag) || tag.size != POLY1305_TAG_LEN) {
-+ || !enif_inspect_iolist_as_binary(env, argv[4], &tag) || tag.size != 16) {
- return enif_make_badarg(env);
- }
-
-- /* Take from OpenSSL patch set/LibreSSL:
-- *
-- * The underlying ChaCha implementation may not overflow the block
-- * counter into the second counter word. Therefore we disallow
-- * individual operations that work on more than 2TB at a time.
-- * in_len_64 is needed because, on 32-bit platforms, size_t is only
-- * 32-bits and this produces a warning because it's always false.
-- * Casting to uint64_t inside the conditional is not sufficient to stop
-- * the warning. */
-- in_len_64 = in.size;
-- if (in_len_64 >= (1ULL << 32) * 64 - 64)
-- return enif_make_badarg(env);
-+ cipher = EVP_chacha20_poly1305();
-
-- memset(poly1305_key, 0, sizeof(poly1305_key));
-- CRYPTO_chacha_20(poly1305_key, poly1305_key, sizeof(poly1305_key), key.data, iv.data, 0);
-+ ctx = EVP_CIPHER_CTX_new();
-
-- CRYPTO_poly1305_init(&poly1305, poly1305_key);
-- poly1305_update_with_length(&poly1305, aad.data, aad.size);
-- poly1305_update_with_length(&poly1305, in.data, in.size);
-- CRYPTO_poly1305_finish(&poly1305, mac);
-+ if (EVP_DecryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1)
-+ goto out_err;
-+ if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv.size, NULL) != 1)
-+ goto out_err;
-+ if (EVP_DecryptInit_ex(ctx, NULL, NULL, key.data, iv.data) != 1)
-+ goto out_err;
-+ if (EVP_DecryptUpdate(ctx, NULL, &len, aad.data, aad.size) != 1)
-+ goto out_err;
-
-- if (memcmp(mac, tag.data, POLY1305_TAG_LEN) != 0)
-- return atom_error;
--
- outp = enif_make_new_binary(env, in.size, &out);
-
-- CRYPTO_chacha_20(outp, in.data, in.size, key.data, iv.data, 1);
-+ if (EVP_DecryptUpdate(ctx, outp, &len, in.data, in.size) != 1)
-+ goto out_err;
-+ if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag.size, tag.data) != 1)
-+ goto out_err;
-+ if (EVP_DecryptFinal_ex(ctx, outp+len, &len) != 1)
-+ goto out_err;
-
-+ EVP_CIPHER_CTX_free(ctx);
-+
- CONSUME_REDS(env, in);
-
- return out;
-+
-+out_err:
-+ EVP_CIPHER_CTX_free(ctx);
-+ return atom_error;
- #else
- return enif_raise_exception(env, atom_notsup);
- #endif
-diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
-index 0c3b7a0445d..31f4e89ffe1 100644
---- lib/crypto/test/crypto_SUITE.erl
-+++ lib/crypto/test/crypto_SUITE.erl
-@@ -2249,16 +2249,49 @@ aes_gcm() ->
- 1} %% TagLength
- ].
-
--%% http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04
-+%% https://tools.ietf.org/html/rfc7539#appendix-A.5
- chacha20_poly1305() ->
- [
-- {chacha20_poly1305, hexstr2bin("4290bcb154173531f314af57f3be3b500" %% Key
-- "6da371ece272afa1b5dbdd1100a1007"),
-- hexstr2bin("86d09974840bded2a5ca"), %% PlainText
-- hexstr2bin("cd7cf67be39c794a"), %% Nonce
-- hexstr2bin("87e229d4500845a079c0"), %% AAD
-- hexstr2bin("e3e446f7ede9a19b62a4"), %% CipherText
-- hexstr2bin("677dabf4e3d24b876bb284753896e1d6")} %% CipherTag
-+ {chacha20_poly1305,
-+ hexstr2bin("1c9240a5eb55d38af333888604f6b5f0" %% Key
-+ "473917c1402b80099dca5cbc207075c0"),
-+ hexstr2bin("496e7465726e65742d44726166747320" %% PlainText
-+ "61726520647261667420646f63756d65"
-+ "6e74732076616c696420666f72206120"
-+ "6d6178696d756d206f6620736978206d"
-+ "6f6e74687320616e64206d6179206265"
-+ "20757064617465642c207265706c6163"
-+ "65642c206f72206f62736f6c65746564"
-+ "206279206f7468657220646f63756d65"
-+ "6e747320617420616e792074696d652e"
-+ "20497420697320696e617070726f7072"
-+ "6961746520746f2075736520496e7465"
-+ "726e65742d4472616674732061732072"
-+ "65666572656e6365206d617465726961"
-+ "6c206f7220746f206369746520746865"
-+ "6d206f74686572207468616e20617320"
-+ "2fe2809c776f726b20696e2070726f67"
-+ "726573732e2fe2809d"),
-+ hexstr2bin("000000000102030405060708"), %% Nonce
-+ hexstr2bin("f33388860000000000004e91"), %% AAD
-+ hexstr2bin("64a0861575861af460f062c79be643bd" %% CipherText
-+ "5e805cfd345cf389f108670ac76c8cb2"
-+ "4c6cfc18755d43eea09ee94e382d26b0"
-+ "bdb7b73c321b0100d4f03b7f355894cf"
-+ "332f830e710b97ce98c8a84abd0b9481"
-+ "14ad176e008d33bd60f982b1ff37c855"
-+ "9797a06ef4f0ef61c186324e2b350638"
-+ "3606907b6a7c02b0f9f6157b53c867e4"
-+ "b9166c767b804d46a59b5216cde7a4e9"
-+ "9040c5a40433225ee282a1b0a06c523e"
-+ "af4534d7f83fa1155b0047718cbc546a"
-+ "0d072b04b3564eea1b422273f548271a"
-+ "0bb2316053fa76991955ebd63159434e"
-+ "cebb4e466dae5a1073a6727627097a10"
-+ "49e617d91d361094fa68f0ff77987130"
-+ "305beaba2eda04df997b714d6c6f2c29"
-+ "a6ad5cb4022b02709b"),
-+ hexstr2bin("eead9d67890cbb22392336fea1851f38")} %% CipherTag
- ].
-
- rsa_plain() ->
diff --git a/lang/erlang-runtime19/files/patch-erts_etc_unix_run__erl.c b/lang/erlang-runtime19/files/patch-erts_etc_unix_run__erl.c
deleted file mode 100644
index b76c5127d2a8..000000000000
--- a/lang/erlang-runtime19/files/patch-erts_etc_unix_run__erl.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- erts/etc/unix/run_erl.c.orig 2015-03-31 12:32:52 UTC
-+++ erts/etc/unix/run_erl.c
-@@ -73,9 +73,6 @@
- #ifdef HAVE_UTMP_H
- # include <utmp.h>
- #endif
--#ifdef HAVE_UTIL_H
--# include <util.h>
--#endif
- #ifdef HAVE_SYS_IOCTL_H
- # include <sys/ioctl.h>
- #endif
diff --git a/lang/erlang-runtime19/files/patch-lib_crypto_c__src_Makefile.in b/lang/erlang-runtime19/files/patch-lib_crypto_c__src_Makefile.in
deleted file mode 100644
index 65e1b759ad66..000000000000
--- a/lang/erlang-runtime19/files/patch-lib_crypto_c__src_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/crypto/c_src/Makefile.in.orig 2016-03-14 20:11:15 UTC
-+++ lib/crypto/c_src/Makefile.in
-@@ -90,7 +90,7 @@ endif
- DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
-
- ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
--SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
-+SSL_DED_LD_RUNTIME_LIBRARY_PATH =
- CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME)
- EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
- else
diff --git a/lang/erlang-runtime19/files/patch-lib_crypto_priv_Makefile b/lang/erlang-runtime19/files/patch-lib_crypto_priv_Makefile
deleted file mode 100644
index 26f2c38e360d..000000000000
--- a/lang/erlang-runtime19/files/patch-lib_crypto_priv_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/crypto/priv/Makefile.orig 2016-03-14 20:11:15 UTC
-+++ lib/crypto/priv/Makefile
-@@ -61,7 +61,7 @@ OBJS = $(OBJDIR)/crypto.o
- # ----------------------------------------------------
-
- $(SO_NIFLIB): $(OBJS)
-- $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
-+ $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
- -o $@ $^ -lcrypto
-
- $(DLL_NIFLIB): $(OBJS)
diff --git a/lang/erlang-runtime19/files/patch-lib_erl__interface_src_connect_ei__resolve.c b/lang/erlang-runtime19/files/patch-lib_erl__interface_src_connect_ei__resolve.c
deleted file mode 100644
index 16046e8e4934..000000000000
--- a/lang/erlang-runtime19/files/patch-lib_erl__interface_src_connect_ei__resolve.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- lib/erl_interface/src/connect/ei_resolve.c.orig 2015-03-31 12:32:52 UTC
-+++ lib/erl_interface/src/connect/ei_resolve.c
-@@ -649,7 +649,8 @@ struct hostent *ei_gethostbyname_r(const
-
- return result;
- #else
-- return gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
-+ struct hostent *dummy;
-+ return gethostbyname_r(name,hostp,buffer,buflen,&dummy,h_errnop);
- #endif
- #endif
- #endif
diff --git a/lang/erlang-runtime19/files/patch-lib_hipe_llvm_hipe__llvm__main.erl b/lang/erlang-runtime19/files/patch-lib_hipe_llvm_hipe__llvm__main.erl
deleted file mode 100644
index 633d84504d99..000000000000
--- a/lang/erlang-runtime19/files/patch-lib_hipe_llvm_hipe__llvm__main.erl
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/hipe/llvm/hipe_llvm_main.erl.orig 2015-06-27 20:52:09 UTC
-+++ lib/hipe/llvm/hipe_llvm_main.erl
-@@ -474,7 +474,7 @@ unique_folder(FunName, Arity, Options) -
- true -> %% Store folder in current directory
- DirName;
- false -> %% Temporarily store folder in tempfs (/dev/shm/)
-- "/dev/shm/" ++ DirName
-+ "/tmp/" ++ DirName
- end,
- %% Make sure it does not exist
- case dir_exists(Dir) of
diff --git a/lang/erlang-runtime19/files/patch-lib_stdlib_src_calendar.erl b/lang/erlang-runtime19/files/patch-lib_stdlib_src_calendar.erl
deleted file mode 100644
index 34b753d85b27..000000000000
--- a/lang/erlang-runtime19/files/patch-lib_stdlib_src_calendar.erl
+++ /dev/null
@@ -1,26 +0,0 @@
---- lib/stdlib/src/calendar.erl.orig 2015-03-31 12:32:52 UTC
-+++ lib/stdlib/src/calendar.erl
-@@ -279,11 +279,19 @@ local_time_to_universal_time(DateTime, I
- DateTime1 :: datetime1970(),
- DateTime :: datetime1970().
- local_time_to_universal_time_dst(DateTime) ->
-- UtDst = erlang:localtime_to_universaltime(DateTime, true),
-- Ut = erlang:localtime_to_universaltime(DateTime, false),
- %% Reverse check the universal times
-- LtDst = erlang:universaltime_to_localtime(UtDst),
-- Lt = erlang:universaltime_to_localtime(Ut),
-+ {UtDst, LtDst} =
-+ try
-+ UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
-+ {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
-+ catch error:badarg -> {error, error}
-+ end,
-+ {Ut, Lt} =
-+ try
-+ Ut0 = erlang:localtime_to_universaltime(DateTime, false),
-+ {Ut0, erlang:universaltime_to_localtime(Ut0)}
-+ catch error:badarg -> {error, error}
-+ end,
- %% Return the valid universal times
- case {LtDst,Lt} of
- {DateTime,DateTime} when UtDst =/= Ut ->
diff --git a/lang/erlang-runtime19/files/patch-lib_wx_c__src_wxe__impl.cpp b/lang/erlang-runtime19/files/patch-lib_wx_c__src_wxe__impl.cpp
deleted file mode 100644
index 5b1e66586f2f..000000000000
--- a/lang/erlang-runtime19/files/patch-lib_wx_c__src_wxe__impl.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- lib/wx/c_src/wxe_impl.cpp.orig 2017-01-30 23:13:25 UTC
-+++ lib/wx/c_src/wxe_impl.cpp
-@@ -666,7 +666,7 @@ void * WxeApp::getPtr(char * bp, wxeMemE
- throw wxe_badarg(index);
- }
- void * temp = memenv->ref2ptr[index];
-- if((index < memenv->next) && ((index == 0) || (temp > NULL)))
-+ if((index < memenv->next) && ((index == 0) || (temp != NULL)))
- return temp;
- else {
- throw wxe_badarg(index);
-@@ -678,7 +678,7 @@ void WxeApp::registerPid(char * bp, ErlD
- if(!memenv)
- throw wxe_badarg(index);
- void * temp = memenv->ref2ptr[index];
-- if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
-+ if((index < memenv->next) && ((index == 0) || (temp != NULL))) {
- ptrMap::iterator it;
- it = ptr2ref.find(temp);
- if(it != ptr2ref.end()) {
diff --git a/lang/erlang-runtime19/files/pkg-message.in b/lang/erlang-runtime19/files/pkg-message.in
deleted file mode 100644
index 3564b8665b2a..000000000000
--- a/lang/erlang-runtime19/files/pkg-message.in
+++ /dev/null
@@ -1,8 +0,0 @@
-[
-{ type: install
- message: <<EOM
-To use this runtime port for development or testing, just prepend
-its binary path ("%%LOCALBASE%%/lib/%%ERLANG_LIB%%/bin") to your PATH variable.
-EOM
-}
-]
diff --git a/lang/erlang-runtime19/pkg-descr b/lang/erlang-runtime19/pkg-descr
deleted file mode 100644
index a366561cda08..000000000000
--- a/lang/erlang-runtime19/pkg-descr
+++ /dev/null
@@ -1,10 +0,0 @@
-Erlang is a programming language used to build massively scalable soft
-real-time systems with requirements on high availability. Some of its
-uses are in telecoms, banking, e-commerce, computer telephony and
-instant messaging. Erlang's runtime system has built-in support for
-concurrency, distribution and fault tolerance.
-
-This port contains a standalone runtime environment of Erlang 19
-to be used during the development of OTP applications.
-
-WWW: https://www.erlang.org/