aboutsummaryrefslogtreecommitdiffstats
path: root/main/erlang
diff options
context:
space:
mode:
authorMarlus Saraiva <marlus.saraiva@gmail.com>2015-07-27 18:40:52 +0200
committerFrancesco Colista <fcolista@alpinelinux.org>2015-07-28 08:42:13 +0000
commitdb593b70af9c24b02ca924678c8fd64dd0f8bc08 (patch)
tree564b13c71139fc0b5c3b25f1bc1f302690563805 /main/erlang
parentb8124bc07d2da8f957b43a5a2f1d72a8a96bdea9 (diff)
downloadaports-db593b70af9c24b02ca924678c8fd64dd0f8bc08.tar.bz2
aports-db593b70af9c24b02ca924678c8fd64dd0f8bc08.tar.xz
main/erlang: move from testing
Diffstat (limited to 'main/erlang')
-rw-r--r--main/erlang/0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch37
-rw-r--r--main/erlang/0002-Remove-rpath.patch28
-rw-r--r--main/erlang/0003-Do-not-install-C-sources.patch143
-rw-r--r--main/erlang/0004-Do-not-install-Java-sources.patch28
-rw-r--r--main/erlang/0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch57
-rw-r--r--main/erlang/0006-Do-not-install-erlang-sources.patch858
-rw-r--r--main/erlang/0007-Split-off-webtool-dependency-from-tools.patch38
-rw-r--r--main/erlang/0010-fix-nteventlog-remove.patch11
-rw-r--r--main/erlang/0020-remove-private-unit32.patch11
-rw-r--r--main/erlang/0030-replace_glibc_check.patch20
-rw-r--r--main/erlang/0040-otp-update-version-18.0.1.patch86
-rw-r--r--main/erlang/0050-otp-update-version-18.0.2.patch839
-rw-r--r--main/erlang/0060-set-disksup_posix_only-to-true.patch22
-rw-r--r--main/erlang/APKBUILD255
14 files changed, 2433 insertions, 0 deletions
diff --git a/main/erlang/0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch b/main/erlang/0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
new file mode 100644
index 0000000000..fef4a7ff98
--- /dev/null
+++ b/main/erlang/0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
@@ -0,0 +1,37 @@
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Thu, 25 Feb 2010 16:45:28 +0300
+Subject: [PATCH] Do not format man-pages and do not install miscellaneous
+ utilities for dealing with man-pages.
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+--- otp_src_18.0-orig/erts/etc/common/Makefile.in
++++ otp_src_18.0-fixed/erts/etc/common/Makefile.in
+@@ -551,10 +551,6 @@
+ ifneq ($(INSTALL_TOP_BIN),)
+ $(INSTALL_PROGRAM) $(INSTALL_TOP_BIN) "$(RELEASE_PATH)"
+ endif
+-ifneq ($(INSTALL_MISC),)
+- $(INSTALL_DIR) "$(RELEASE_PATH)/misc"
+- $(INSTALL_SCRIPT) $(INSTALL_MISC) "$(RELEASE_PATH)/misc"
+-endif
+ ifneq ($(INSTALL_SRC),)
+ $(INSTALL_DIR) "$(RELEASE_PATH)/erts-$(VSN)/src"
+ $(INSTALL_DATA) $(INSTALL_SRC) "$(RELEASE_PATH)/erts-$(VSN)/src"
+--- otp_src_18.0-orig/erts/etc/unix/Install.src
++++ otp_src_18.0-fixed/erts/etc/unix/Install.src
+@@ -141,14 +141,5 @@
+ cp -p ../releases/%I_SYSTEM_VSN%/no_dot_erlang.boot .
+ cp -p $Name.boot start.boot
+ cp -p ../releases/%I_SYSTEM_VSN%/$Name.script start.script
+-#
+-# Fixing the man pages
+-#
+-
+-if [ -d "$ERL_ROOT/man" ]
+-then
+- cd "$ERL_ROOT"
+- ./misc/format_man_pages "$ERL_ROOT"
+-fi
+
+ exit 0
diff --git a/main/erlang/0002-Remove-rpath.patch b/main/erlang/0002-Remove-rpath.patch
new file mode 100644
index 0000000000..71658fe396
--- /dev/null
+++ b/main/erlang/0002-Remove-rpath.patch
@@ -0,0 +1,28 @@
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Thu, 25 Feb 2010 16:57:43 +0300
+Subject: [PATCH] Remove rpath
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+--- otp_src_18.0-orig/lib/crypto/c_src/Makefile.in
++++ otp_src_18.0-fixed/lib/crypto/c_src/Makefile.in
+@@ -90,7 +90,7 @@
+ 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
+--- otp_src_18.0-orig/lib/crypto/priv/Makefile
++++ otp_src_18.0-fixed/lib/crypto/priv/Makefile
+@@ -61,7 +61,7 @@
+ # ----------------------------------------------------
+
+ $(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/main/erlang/0003-Do-not-install-C-sources.patch b/main/erlang/0003-Do-not-install-C-sources.patch
new file mode 100644
index 0000000000..364c4ad790
--- /dev/null
+++ b/main/erlang/0003-Do-not-install-C-sources.patch
@@ -0,0 +1,143 @@
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Fri, 18 Jun 2010 23:41:33 +0400
+Subject: [PATCH] Do not install C sources
+
+Don't install *.c and *.o files.
+
+Excepts ones from the internal erl_interface. These
+API headers are necessary. See rhbz #818419 for the
+explanation why they're necessary for the low-level
+interaction with the Erlang nodes:
+
+https://bugzilla.redhat.com/818419
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+--- otp_src_18.0-orig/lib/asn1/c_src/Makefile
++++ otp_src_18.0-fixed/lib/asn1/c_src/Makefile
+@@ -143,8 +143,6 @@
+ ifneq ($(findstring ose,$(TARGET)),ose)
+ $(INSTALL_PROGRAM) $(NIF_SHARED_OBJ_FILE) "$(RELSYSDIR)/priv/lib"
+ endif
+- $(INSTALL_DIR) "$(RELSYSDIR)/c_src"
+- $(INSTALL_DATA) *.c "$(RELSYSDIR)/c_src"
+
+ release_docs_spec:
+
+--- otp_src_18.0-orig/lib/crypto/c_src/Makefile.in
++++ otp_src_18.0-fixed/lib/crypto/c_src/Makefile.in
+@@ -200,14 +200,10 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
+ $(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
+- $(INSTALL_DATA) $(NIF_MAKEFILE) "$(RELSYSDIR)/priv/obj"
+ ifneq ($(findstring ose,$(TARGET)),ose)
+- $(INSTALL_PROGRAM) $(CRYPTO_OBJS) "$(RELSYSDIR)/priv/obj"
+ $(INSTALL_PROGRAM) $(NIF_LIB) "$(RELSYSDIR)/priv/lib"
+ ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
+- $(INSTALL_PROGRAM) $(CALLBACK_OBJS) "$(RELSYSDIR)/priv/obj"
+ $(INSTALL_PROGRAM) $(CALLBACK_LIB) "$(RELSYSDIR)/priv/lib"
+ endif
+ endif
+--- otp_src_18.0-orig/lib/erl_interface/src/Makefile.in
++++ otp_src_18.0-fixed/lib/erl_interface/src/Makefile.in
+@@ -905,14 +905,14 @@
+ $(INSTALL_PROGRAM) $(EXE_TARGETS) "$(RELSYSDIR)/bin"
+ endif
+ $(INSTALL_DATA) $(EXTRA) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) connect/*.[ch] "$(RELSYSDIR)/src/connect"
+- $(INSTALL_DATA) decode/*.[ch] "$(RELSYSDIR)/src/decode"
+- $(INSTALL_DATA) encode/*.[ch] "$(RELSYSDIR)/src/encode"
+- $(INSTALL_DATA) epmd/*.[ch] "$(RELSYSDIR)/src/epmd"
+- $(INSTALL_DATA) misc/*.[ch] "$(RELSYSDIR)/src/misc"
+- $(INSTALL_DATA) registry/*.[ch] "$(RELSYSDIR)/src/registry"
+- $(INSTALL_DATA) legacy/*.[ch] "$(RELSYSDIR)/src/legacy"
+- $(INSTALL_DATA) prog/*.[ch] "$(RELSYSDIR)/src/prog"
++ $(INSTALL_DATA) connect/*.h "$(RELSYSDIR)/src/connect"
++ $(INSTALL_DATA) decode/*.h "$(RELSYSDIR)/src/decode"
++ $(INSTALL_DATA) encode/*.h "$(RELSYSDIR)/src/encode"
++ $(INSTALL_DATA) epmd/*.h "$(RELSYSDIR)/src/epmd"
++ $(INSTALL_DATA) misc/*.h "$(RELSYSDIR)/src/misc"
++ $(INSTALL_DATA) registry/*.h "$(RELSYSDIR)/src/registry"
++ $(INSTALL_DATA) legacy/*.h "$(RELSYSDIR)/src/legacy"
++ $(INSTALL_DATA) prog/*.h "$(RELSYSDIR)/src/prog"
+
+ release_docs:
+
+--- otp_src_18.0-orig/lib/ic/c_src/Makefile.in
++++ otp_src_18.0-fixed/lib/ic/c_src/Makefile.in
+@@ -145,12 +145,10 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/c_src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
+ $(INSTALL_DIR) "$(RELEASE_PATH)/usr/include"
+ $(INSTALL_DIR) "$(RELEASE_PATH)/usr/lib"
+- $(INSTALL_DATA) ic.c ic_tmo.c "$(RELSYSDIR)/c_src"
+ $(INSTALL_DATA) $(IDL_FILES) $(H_FILES) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(LIBRARY) "$(RELSYSDIR)/priv/lib"
+ $(INSTALL_DATA) $(IDL_FILES) $(H_FILES) "$(RELEASE_PATH)/usr/include"
+--- otp_src_18.0-orig/lib/megaco/src/flex/Makefile.in
++++ otp_src_18.0-fixed/lib/megaco/src/flex/Makefile.in
+@@ -271,7 +271,7 @@
+ $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/flex"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ ifeq ($(ENABLE_MEGACO_FLEX_SCANNER),true)
+- $(INSTALL_DATA) $(FLEX_FILES) $(C_TARGETS) "$(RELSYSDIR)/src/flex"
++ $(INSTALL_DATA) $(FLEX_FILES) "$(RELSYSDIR)/src/flex"
+ $(INSTALL_PROGRAM) $(SOLIBS) "$(RELSYSDIR)/priv/lib"
+ endif
+
+--- otp_src_18.0-orig/lib/odbc/c_src/Makefile.in
++++ otp_src_18.0-fixed/lib/odbc/c_src/Makefile.in
+@@ -129,11 +129,8 @@
+
+ release_spec: opt
+ ifdef EXE_TARGET
+- $(INSTALL_DIR) "$(RELSYSDIR)/c_src"
+- $(INSTALL_DATA) $(C_FILES) $(H_FILES) "$(RELSYSDIR)/c_src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/priv"
+ $(INSTALL_DIR) "$(RELSYSDIR)/priv/bin"
+- $(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
+ $(INSTALL_PROGRAM) $(EXE_TARGET) "$(RELSYSDIR)/priv/bin"
+ endif
+
+--- otp_src_18.0-orig/lib/os_mon/c_src/Makefile.in
++++ otp_src_18.0-fixed/lib/os_mon/c_src/Makefile.in
+@@ -126,8 +126,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(C_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/priv/bin"
+ $(INSTALL_PROGRAM) $(TARGET_FILES) "$(RELSYSDIR)/priv/bin"
+
+--- otp_src_18.0-orig/lib/runtime_tools/c_src/Makefile.in
++++ otp_src_18.0-fixed/lib/runtime_tools/c_src/Makefile.in
+@@ -157,10 +157,8 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
+ $(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
+ ifneq ($(findstring ose,$(TARGET)),ose)
+- $(INSTALL_PROGRAM) $(DYNTRACE_OBJS) "$(RELSYSDIR)/priv/obj"
+ $(INSTALL_PROGRAM) $(NIF_LIB) $(SOLIBS) "$(RELSYSDIR)/priv/lib"
+ endif
+
+--- otp_src_18.0-orig/lib/tools/c_src/Makefile.in
++++ otp_src_18.0-fixed/lib/tools/c_src/Makefile.in
+@@ -198,8 +198,6 @@
+ RELSYSDIR = $(RELEASE_PATH)/lib/tools-$(TOOLS_VSN)
+
+ release_spec: all
+- $(INSTALL_DIR) "$(RELSYSDIR)/c_src"
+- $(INSTALL_DATA) $(EMEM_SRCS) $(EMEM_HEADERS) "$(RELSYSDIR)/c_src"
+ ifneq ($(PROGS),)
+ $(INSTALL_DIR) "$(RELSYSDIR)/bin"
+ $(INSTALL_PROGRAM) $(PROGS) "$(RELSYSDIR)/bin"
diff --git a/main/erlang/0004-Do-not-install-Java-sources.patch b/main/erlang/0004-Do-not-install-Java-sources.patch
new file mode 100644
index 0000000000..799476c8c6
--- /dev/null
+++ b/main/erlang/0004-Do-not-install-Java-sources.patch
@@ -0,0 +1,28 @@
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Sat, 19 Jun 2010 09:25:18 +0400
+Subject: [PATCH] Do not install Java sources
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+--- otp_src_18.0-orig/lib/ic/java_src/com/ericsson/otp/ic/Makefile
++++ otp_src_18.0-fixed/lib/ic/java_src/com/ericsson/otp/ic/Makefile
+@@ -113,8 +113,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/java_src/com/ericsson/otp/ic"
+- $(INSTALL_DATA) $(JAVA_FILES) "$(RELSYSDIR)/java_src/com/ericsson/otp/ic"
+ $(INSTALL_DIR) "$(RELSYSDIR)/priv"
+ $(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) "$(RELSYSDIR)/priv"
+
+--- otp_src_18.0-orig/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
++++ otp_src_18.0-fixed/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
+@@ -120,8 +120,6 @@
+ $(V_at)$(MAKE) $(MFLAGS) RELEASE_PATH="$(RELEASE_PATH)" $(TARGET_MAKEFILE) $@_spec
+
+ release_spec: opt
+- $(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/java_src/com/ericsson/otp/erlang"
+- $(V_at)$(INSTALL_DATA) $(JAVA_SRC) "$(RELSYSDIR)/java_src/com/ericsson/otp/erlang"
+ $(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/priv"
+ $(V_at)$(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) "$(RELSYSDIR)/priv"
+ $(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/main/erlang/0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch b/main/erlang/0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
new file mode 100644
index 0000000000..dcfa6bcfad
--- /dev/null
+++ b/main/erlang/0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
@@ -0,0 +1,57 @@
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Sat, 19 Jun 2010 09:59:39 +0400
+Subject: [PATCH] Do not install nteventlog and related doc-files on non-win32
+ systems
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+--- otp_src_18.0-orig/lib/os_mon/doc/src/Makefile
++++ otp_src_18.0-fixed/lib/os_mon/doc/src/Makefile
+@@ -36,12 +36,17 @@
+ # Target Specs
+ # ----------------------------------------------------
+ XML_APPLICATION_FILES = ref_man.xml
++ifeq ($(findstring win32,$(TARGET)),win32)
++NTEVENTLOG_DOCFILE=nteventlog.xml
++else
++NTEVENTLOG_DOCFILE=
++endif
+ XML_REF3_FILES = cpu_sup.xml \
+ disksup.xml \
+ memsup.xml \
+ os_mon_mib.xml \
+ os_sup.xml \
+- nteventlog.xml
++ $(NTEVENTLOG_DOCFILE)
+
+ XML_REF6_FILES = os_mon_app.xml
+
+--- otp_src_18.0-orig/lib/os_mon/src/Makefile
++++ otp_src_18.0-fixed/lib/os_mon/src/Makefile
+@@ -34,8 +34,13 @@
+ # ----------------------------------------------------
+ # Target Specs
+ # ----------------------------------------------------
++ifeq ($(findstring win32,$(TARGET)),win32)
++NTEVENTLOG=nteventlog
++else
++NTEVENTLOG=
++endif
+ MODULES= disksup memsup cpu_sup os_mon os_mon_mib os_sup os_mon_sysinfo \
+- nteventlog
++ $(NTEVENTLOG)
+
+ INCLUDE=../include
+ CSRC=../c_src
+@@ -79,7 +84,11 @@
+ # ----------------------------------------------------
+
+ $(APP_TARGET): $(APP_SRC) ../vsn.mk
++ifeq ($(findstring win32,$(TARGET)),win32)
+ $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
++else
++ $(vsn_verbose)sed -e 's;%VSN%;$(VSN);;s;,\s*nteventlog;;' $< > $@
++endif
+
+ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+ $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
diff --git a/main/erlang/0006-Do-not-install-erlang-sources.patch b/main/erlang/0006-Do-not-install-erlang-sources.patch
new file mode 100644
index 0000000000..8d14da5dca
--- /dev/null
+++ b/main/erlang/0006-Do-not-install-erlang-sources.patch
@@ -0,0 +1,858 @@
+From: Hans Ulrich Niedermann <hun@n-dimensional.de>
+Date: Mon, 21 Mar 2011 15:41:49 +0100
+Subject: [PATCH] Do not install erlang sources
+
+Don't install *.erl, *.xrl, *.yrl, and *.asn1 files at all.
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+Signed-off-by: Hans Ulrich Niedermann <hun@n-dimensional.de>
+
+--- otp_src_18.0-orig/erts/preloaded/src/Makefile
++++ otp_src_18.0-fixed/erts/preloaded/src/Makefile
+@@ -86,8 +86,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: $(APP_TARGET)
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(BEAM_FILES) $(STUBS_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(STATIC_TARGET_FILES) $(APP_TARGET) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/asn1/src/Makefile
++++ otp_src_18.0-fixed/lib/asn1/src/Makefile
+@@ -155,7 +155,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(APP_SRC) $(APPUP_SRC) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/examples"
+ $(INSTALL_DATA) $(EXAMPLES) "$(RELSYSDIR)/examples"
+
+--- otp_src_18.0-orig/lib/common_test/src/Makefile
++++ otp_src_18.0-fixed/lib/common_test/src/Makefile
+@@ -144,7 +144,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+--- otp_src_18.0-orig/lib/compiler/src/Makefile
++++ otp_src_18.0-fixed/lib/compiler/src/Makefile
+@@ -172,8 +172,8 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(EXTRA_FILES) \
+- $(YRL_FILE) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) $(EXTRA_FILES) \
++ "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/cosEvent/src/Makefile
++++ otp_src_18.0-fixed/lib/cosEvent/src/Makefile
+@@ -203,7 +203,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
+
+--- otp_src_18.0-orig/lib/cosEventDomain/src/Makefile
++++ otp_src_18.0-fixed/lib/cosEventDomain/src/Makefile
+@@ -172,7 +172,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(EXTERNAL_GEN_HRL_FILES) "$(RELSYSDIR)/include"
+
+--- otp_src_18.0-orig/lib/cosFileTransfer/src/Makefile
++++ otp_src_18.0-fixed/lib/cosFileTransfer/src/Makefile
+@@ -180,9 +180,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(GEN_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) $(GEN_HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+- $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
+
+ release_docs_spec:
+--- otp_src_18.0-orig/lib/cosNotification/src/Makefile
++++ otp_src_18.0-fixed/lib/cosNotification/src/Makefile
+@@ -371,8 +371,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(GEN_FILES) $(IDL_FILES) $(YECC_FILES) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(IDL_FILES) $(YECC_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(GEN_HRL_FILES) $(HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
+
+--- otp_src_18.0-orig/lib/cosProperty/src/Makefile
++++ otp_src_18.0-fixed/lib/cosProperty/src/Makefile
+@@ -180,8 +180,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(GEN_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(GEN_HRL_FILES) $(HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
+
+--- otp_src_18.0-orig/lib/cosTime/src/Makefile
++++ otp_src_18.0-fixed/lib/cosTime/src/Makefile
+@@ -199,8 +199,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(GEN_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(GEN_HRL_FILES) $(HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
+
+--- otp_src_18.0-orig/lib/cosTransactions/src/Makefile
++++ otp_src_18.0-fixed/lib/cosTransactions/src/Makefile
+@@ -174,7 +174,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILE) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) $(IDL_FILE) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(EXTERNAL_GEN_HRL_FILES) "$(RELSYSDIR)/include"
+
+--- otp_src_18.0-orig/lib/crypto/src/Makefile
++++ otp_src_18.0-fixed/lib/crypto/src/Makefile
+@@ -82,8 +82,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) \
+ $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/debugger/src/Makefile
++++ otp_src_18.0-fixed/lib/debugger/src/Makefile
+@@ -117,7 +117,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) $(TOOLBOX_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(TOOLBOX_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(TARGET_TOOLBOX_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/dialyzer/src/Makefile
++++ otp_src_18.0-fixed/lib/dialyzer/src/Makefile
+@@ -152,7 +152,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(EXTRA_FILES) \
++ $(INSTALL_DATA) $(HRL_FILES) $(EXTRA_FILES) \
+ "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/diameter/src/Makefile
++++ otp_src_18.0-fixed/lib/diameter/src/Makefile
+@@ -251,11 +251,8 @@
+ $(MAKE) $(EXAMPLE_DIRS:%/=release_examples_%)
+
+ $(TARGET_DIRS:%/=release_src_%): release_src_%:
+- $(INSTALL_DIR) "$(RELSYSDIR)/src/$*"
+- $(INSTALL_DATA) $(filter $*/%, $(TARGET_MODULES:%=%.erl) \
+- $(INTERNAL_HRLS)) \
+- $(filter $*/%, compiler/$(DICT_YRL).yrl) \
+- "$(RELSYSDIR)/src/$*"
++ $(INSTALL_DATA) $(filter $*/%, $(INTERNAL_HRLS)) \
++ "$(RELSYSDIR)/src/$*" || true
+
+ $(EXAMPLE_DIRS:%/=release_examples_%): release_examples_%:
+ $(INSTALL_DIR) "$(RELSYSDIR)/examples/$*"
+--- otp_src_18.0-orig/lib/edoc/src/Makefile
++++ otp_src_18.0-fixed/lib/edoc/src/Makefile
+@@ -88,7 +88,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(OBJECTS) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(SOURCES) $(HRL_FILES) $(YRL_FILE) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src"
+
+ release_docs_spec:
+
+--- otp_src_18.0-orig/lib/eldap/src/Makefile
++++ otp_src_18.0-fixed/lib/eldap/src/Makefile
+@@ -99,10 +99,6 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+- $(INSTALL_DIR) "$(RELSYSDIR)/asn1"
+- $(INSTALL_DATA) ../asn1/$(ASN1_FILES) "$(RELSYSDIR)/asn1"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(EXTERNAL_HRL_FILES) "$(RELSYSDIR)/include"
+
+--- otp_src_18.0-orig/lib/erl_docgen/src/Makefile
++++ otp_src_18.0-fixed/lib/erl_docgen/src/Makefile
+@@ -90,8 +90,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/et/src/Makefile
++++ otp_src_18.0-fixed/lib/et/src/Makefile
+@@ -109,7 +109,6 @@
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+--- otp_src_18.0-orig/lib/eunit/src/Makefile
++++ otp_src_18.0-fixed/lib/eunit/src/Makefile
+@@ -120,7 +120,6 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(PARSE_TRANSFORM_BIN) $(OBJECTS) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(PARSE_TRANSFORM) $(SOURCES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include"
+--- otp_src_18.0-orig/lib/gs/src/Makefile
++++ otp_src_18.0-fixed/lib/gs/src/Makefile
+@@ -109,8 +109,8 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(APP_SRC) $(ERL_FILES) $(HRL_FILES) $(GEN_HRL_FILES) \
+- $(GSTK_GENERIC) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) $(GEN_HRL_FILES) \
++ "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/priv/bitmap"
+--- otp_src_18.0-orig/lib/hipe/cerl/Makefile
++++ otp_src_18.0-fixed/lib/hipe/cerl/Makefile
+@@ -102,7 +102,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/cerl"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/cerl"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/cerl"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/hipe/flow/Makefile
++++ otp_src_18.0-fixed/lib/hipe/flow/Makefile
+@@ -102,7 +102,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/flow"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(INC_FILES) "$(RELSYSDIR)/flow"
++ $(INSTALL_DATA) $(HRL_FILES) $(INC_FILES) "$(RELSYSDIR)/flow"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/hipe/icode/Makefile
++++ otp_src_18.0-fixed/lib/hipe/icode/Makefile
+@@ -120,7 +120,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/icode"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/icode"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/icode"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/hipe/llvm/Makefile
++++ otp_src_18.0-fixed/lib/hipe/llvm/Makefile
+@@ -103,7 +103,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/llvm
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)/llvm
++ $(INSTALL_DATA) $(HRL_FILES) $(RELSYSDIR)/llvm
+ $(INSTALL_DIR) $(RELSYSDIR)/ebin
+ $(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
+
+--- otp_src_18.0-orig/lib/hipe/main/Makefile
++++ otp_src_18.0-fixed/lib/hipe/main/Makefile
+@@ -118,7 +118,7 @@
+ release_spec: opt
+ $(INSTALL_DATA) ../vsn.mk "$(RELSYSDIR)"
+ $(INSTALL_DIR) "$(RELSYSDIR)/main"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/main"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/main"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/hipe/misc/Makefile
++++ otp_src_18.0-fixed/lib/hipe/misc/Makefile
+@@ -102,7 +102,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/misc"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/misc"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/misc"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/hipe/rtl/Makefile
++++ otp_src_18.0-fixed/lib/hipe/rtl/Makefile
+@@ -105,7 +105,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/rtl"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/rtl"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/rtl"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/hipe/util/Makefile
++++ otp_src_18.0-fixed/lib/hipe/util/Makefile
+@@ -50,7 +50,6 @@
+ endif
+ MODULES = hipe_timing hipe_dot hipe_digraph $(HIPE_MODULES)
+
+-HRL_FILES=
+ ERL_FILES= $(MODULES:%=%.erl)
+ TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
+@@ -104,8 +103,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/util"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/util"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/ic/src/Makefile
++++ otp_src_18.0-fixed/lib/ic/src/Makefile
+@@ -200,7 +200,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(YRL_FILE) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/examples"
+ $(INSTALL_DIR) "$(RELSYSDIR)/examples/c-client"
+ $(INSTALL_DATA) $(CCL_EX_FILES) "$(RELSYSDIR)/examples/c-client"
+--- otp_src_18.0-orig/lib/inets/src/ftp/Makefile
++++ otp_src_18.0-fixed/lib/inets/src/ftp/Makefile
+@@ -91,7 +91,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/ftp"
+- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/ftp"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/ftp"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/inets/src/http_client/Makefile
++++ otp_src_18.0-fixed/lib/inets/src/http_client/Makefile
+@@ -92,7 +92,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/http_client"
+- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/http_client"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/http_client"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/inets/src/http_lib/Makefile
++++ otp_src_18.0-fixed/lib/inets/src/http_lib/Makefile
+@@ -90,7 +90,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/http_lib"
+- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/http_lib"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/http_lib"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/inets/src/http_server/Makefile
++++ otp_src_18.0-fixed/lib/inets/src/http_server/Makefile
+@@ -127,7 +127,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/http_server"
+- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/http_server"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/http_server"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/inets/src/inets_app/Makefile
++++ otp_src_18.0-fixed/lib/inets/src/inets_app/Makefile
+@@ -116,7 +116,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/inets_app"
+- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/inets_app"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/inets_app"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(EXTERNAL_HRL_FILES) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/inets/src/tftp/Makefile
++++ otp_src_18.0-fixed/lib/inets/src/tftp/Makefile
+@@ -96,7 +96,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/tftp"
+- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/tftp"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/tftp"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(BEHAVIOUR_TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/kernel/src/Makefile
++++ otp_src_18.0-fixed/lib/kernel/src/Makefile
+@@ -200,7 +200,6 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+--- otp_src_18.0-orig/lib/megaco/src/app/Makefile
++++ otp_src_18.0-fixed/lib/megaco/src/app/Makefile
+@@ -114,7 +114,7 @@
+ $(INSTALL_DATA) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/app"
+- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/app"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/app"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(EXTERNAL_HRL_FILES) "$(RELSYSDIR)/include"
+
+--- otp_src_18.0-orig/lib/megaco/src/binary/Makefile
++++ otp_src_18.0-fixed/lib/megaco/src/binary/Makefile
+@@ -176,7 +176,7 @@
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/binary"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(ASN1_FILES) "$(RELSYSDIR)/src/binary"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/binary"
+
+
+ release_docs_spec:
+--- otp_src_18.0-orig/lib/megaco/src/engine/Makefile
++++ otp_src_18.0-fixed/lib/megaco/src/engine/Makefile
+@@ -102,7 +102,7 @@
+ $(INSTALL_DATA) $(BEHAVIOUR_TARGET_FILES) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/engine"
+- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/engine"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/engine"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+
+
+--- otp_src_18.0-orig/lib/megaco/src/flex/Makefile.in
++++ otp_src_18.0-fixed/lib/megaco/src/flex/Makefile.in
+@@ -268,8 +268,6 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/flex"
+ $(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/flex"
+- $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ ifeq ($(ENABLE_MEGACO_FLEX_SCANNER),true)
+ $(INSTALL_DATA) $(FLEX_FILES) "$(RELSYSDIR)/src/flex"
+ $(INSTALL_PROGRAM) $(SOLIBS) "$(RELSYSDIR)/priv/lib"
+--- otp_src_18.0-orig/lib/megaco/src/tcp/Makefile
++++ otp_src_18.0-fixed/lib/megaco/src/tcp/Makefile
+@@ -94,7 +94,7 @@
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/tcp"
+- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/tcp"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/tcp"
+
+
+ release_docs_spec:
+--- otp_src_18.0-orig/lib/megaco/src/text/Makefile
++++ otp_src_18.0-fixed/lib/megaco/src/text/Makefile
+@@ -135,7 +135,7 @@
+ $(INSTALL_DATA) $(BEAM_TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/text"
+- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_YRL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/text"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/text"
+
+
+ release_docs_spec:
+--- otp_src_18.0-orig/lib/megaco/src/udp/Makefile
++++ otp_src_18.0-fixed/lib/megaco/src/udp/Makefile
+@@ -94,7 +94,7 @@
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/udp"
+- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/udp"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/udp"
+
+
+ release_docs_spec:
+--- otp_src_18.0-orig/lib/mnesia/src/Makefile
++++ otp_src_18.0-fixed/lib/mnesia/src/Makefile
+@@ -133,7 +133,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/observer/src/Makefile
++++ otp_src_18.0-fixed/lib/observer/src/Makefile
+@@ -152,7 +152,6 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/examples"
+ $(INSTALL_DATA) $(EXAMPLE_FILES) "$(RELSYSDIR)/examples"
+--- otp_src_18.0-orig/lib/odbc/src/Makefile
++++ otp_src_18.0-fixed/lib/odbc/src/Makefile
+@@ -110,7 +110,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(EXT_HRL_FILES) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/orber/COSS/CosNaming/Makefile
++++ otp_src_18.0-fixed/lib/orber/COSS/CosNaming/Makefile
+@@ -145,8 +145,8 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/COSS/CosNaming"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(IDL_FILE) "$(RELSYSDIR)/COSS/CosNaming"
+- $(INSTALL_DATA) $(GEN_FILES) "$(RELSYSDIR)/COSS/CosNaming"
++ $(INSTALL_DATA) $(HRL_FILES) $(IDL_FILE) "$(RELSYSDIR)/COSS/CosNaming"
++ $(INSTALL_DATA) $(GEN_HRL_FILES) $(GEN_EXT_HRL_FILES) "$(RELSYSDIR)/COSS/CosNaming"
+
+
+ release_docs_spec:
+--- otp_src_18.0-orig/lib/orber/src/Makefile
++++ otp_src_18.0-fixed/lib/orber/src/Makefile
+@@ -253,7 +253,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(YRL_FILE) $(GEN_HRL_FILES_LOC) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(GEN_HRL_FILES_LOC) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(EXTERNAL_HRL_FILES) $(GEN_HRL_FILES_EXT) "$(RELSYSDIR)/include"
+
+--- otp_src_18.0-orig/lib/os_mon/src/Makefile
++++ otp_src_18.0-fixed/lib/os_mon/src/Makefile
+@@ -105,7 +105,6 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/ose/src/Makefile
++++ otp_src_18.0-fixed/lib/ose/src/Makefile
+@@ -94,9 +94,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+- $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/otp_mibs/src/Makefile
++++ otp_src_18.0-fixed/lib/otp_mibs/src/Makefile
+@@ -96,8 +96,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGETS) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/parsetools/src/Makefile
++++ otp_src_18.0-fixed/lib/parsetools/src/Makefile
+@@ -91,8 +91,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+--- otp_src_18.0-orig/lib/percept/src/Makefile
++++ otp_src_18.0-fixed/lib/percept/src/Makefile
+@@ -97,7 +97,6 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ # $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ # $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+--- otp_src_18.0-orig/lib/public_key/asn1/Makefile
++++ otp_src_18.0-fixed/lib/public_key/asn1/Makefile
+@@ -96,8 +96,8 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/asn1"
+- $(INSTALL_DATA) $(ASN_ASNS) $(ASN_ERLS) $(ASN_HRLS) $(ASN_CONFIGS) \
+- $(GEN_ERLS) "$(RELSYSDIR)/asn1"
++ $(INSTALL_DATA) $(ASN_ASNS) $(ASN_HRLS) $(ASN_CONFIGS) \
++ "$(RELSYSDIR)/asn1"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/public_key/src/Makefile
++++ otp_src_18.0-fixed/lib/public_key/src/Makefile
+@@ -50,8 +50,6 @@
+
+ HRL_FILES = $(INCLUDE)/public_key.hrl
+
+-INTERNAL_HRL_FILES =
+-
+ ERL_FILES = $(MODULES:%=%.erl)
+
+ TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+@@ -104,8 +102,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/reltool/src/Makefile
++++ otp_src_18.0-fixed/lib/reltool/src/Makefile
+@@ -100,7 +100,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/runtime_tools/src/Makefile
++++ otp_src_18.0-fixed/lib/runtime_tools/src/Makefile
+@@ -97,8 +97,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/examples"
+--- otp_src_18.0-orig/lib/sasl/src/Makefile
++++ otp_src_18.0-fixed/lib/sasl/src/Makefile
+@@ -93,7 +93,6 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/snmp/src/agent/Makefile
++++ otp_src_18.0-fixed/lib/snmp/src/agent/Makefile
+@@ -131,7 +131,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/agent"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src/agent"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/agent"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
+ "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/snmp/src/app/Makefile
++++ otp_src_18.0-fixed/lib/snmp/src/app/Makefile
+@@ -132,7 +132,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/app"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src/app"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/app"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
+ "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/snmp/src/compile/Makefile
++++ otp_src_18.0-fixed/lib/snmp/src/compile/Makefile
+@@ -123,7 +123,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/compiler"
+- $(INSTALL_DATA) $(ESCRIPT_SRC) $(PARSER_SRC) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/compiler"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/compiler"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(EBIN_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/bin"
+--- otp_src_18.0-orig/lib/snmp/src/manager/Makefile
++++ otp_src_18.0-fixed/lib/snmp/src/manager/Makefile
+@@ -114,7 +114,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/manager"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src/manager"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/manager"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ # $(INSTALL_DIR) "$(RELSYSDIR)/include"
+--- otp_src_18.0-orig/lib/snmp/src/misc/Makefile
++++ otp_src_18.0-fixed/lib/snmp/src/misc/Makefile
+@@ -112,7 +112,7 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/misc"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src/misc"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/misc"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ # $(INSTALL_DIR) "$(RELSYSDIR)/include"
+--- otp_src_18.0-orig/lib/ssh/src/Makefile
++++ otp_src_18.0-fixed/lib/ssh/src/Makefile
+@@ -136,7 +136,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(BEHAVIOUR_TARGET_FILES) $(TARGET_FILES) $(APP_TARGET) \
+ $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/ssl/src/Makefile
++++ otp_src_18.0-fixed/lib/ssl/src/Makefile
+@@ -141,7 +141,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(BEHAVIOUR_TARGET_FILES) $(TARGET_FILES) $(APP_TARGET) \
+ $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/stdlib/src/Makefile
++++ otp_src_18.0-fixed/lib/stdlib/src/Makefile
+@@ -207,7 +207,6 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) erl_parse.yrl "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+--- otp_src_18.0-orig/lib/syntax_tools/src/Makefile
++++ otp_src_18.0-fixed/lib/syntax_tools/src/Makefile
+@@ -100,8 +100,6 @@
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(OBJECTS) "$(RELSYSDIR)/ebin"
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(SOURCES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include"
+
+--- otp_src_18.0-orig/lib/test_server/src/Makefile
++++ otp_src_18.0-fixed/lib/test_server/src/Makefile
+@@ -124,7 +124,6 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(TS_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+--- otp_src_18.0-orig/lib/tools/src/Makefile
++++ otp_src_18.0-fixed/lib/tools/src/Makefile
+@@ -107,7 +107,7 @@
+
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(YRL_FILE) $(HRL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
+ "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/typer/src/Makefile
++++ otp_src_18.0-fixed/lib/typer/src/Makefile
+@@ -102,9 +102,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(YRL_FILES) \
+- "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
+
+--- otp_src_18.0-orig/lib/webtool/src/Makefile
++++ otp_src_18.0-fixed/lib/webtool/src/Makefile
+@@ -88,8 +88,6 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
+ "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/wx/src/Makefile
++++ otp_src_18.0-fixed/lib/wx/src/Makefile
+@@ -122,9 +122,9 @@
+ include $(ERL_TOP)/make/otp_release_targets.mk
+ release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/gen"
+- $(INSTALL_DATA) $(GEN_HRL) $(GEN_FILES) "$(RELSYSDIR)/src/gen"
++ $(INSTALL_DATA) $(GEN_HRL) "$(RELSYSDIR)/src/gen"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(EXT_HRL) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+--- otp_src_18.0-orig/lib/xmerl/src/Makefile
++++ otp_src_18.0-fixed/lib/xmerl/src/Makefile
+@@ -218,9 +218,7 @@
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) $(APP_SRC) $(APPUP_SRC) "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) xmerl_xpath_parse.yrl "$(RELSYSDIR)/src"
+- $(INSTALL_DATA) xmerl_b64Bin.yrl "$(RELSYSDIR)/src"
++ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+
diff --git a/main/erlang/0007-Split-off-webtool-dependency-from-tools.patch b/main/erlang/0007-Split-off-webtool-dependency-from-tools.patch
new file mode 100644
index 0000000000..6a58f5cea0
--- /dev/null
+++ b/main/erlang/0007-Split-off-webtool-dependency-from-tools.patch
@@ -0,0 +1,38 @@
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Sat, 8 Nov 2014 22:54:57 +0300
+Subject: [PATCH] Split off webtool dependency from tools
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+--- otp_src_18.0-orig/lib/tools/src/cover_web.erl
++++ otp_src_18.0-fixed/lib/tools/src/cover_web.erl
+@@ -51,14 +51,25 @@
+ %%%----------------------------------------------------------------------
+ %% Start webtool and webcover from erlang shell
+ start() ->
+- webtool:start(),
+- webtool:start_tools([],"app=webcover"),
++ try
++ % Disable automatic dependency picking up
++ erlang:apply(webtool, start, []),
++ erlang:apply(webtool, start_tools, [[],"app=webcover"])
++ catch
++ error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n")
++ end,
+ ok.
+
+ %% Stop webtool and webcover from erlang shell
+ stop() ->
+- webtool:stop_tools([],"app=webcover"),
+- webtool:stop().
++ try
++ % Disable automatic dependency picking up
++ erlang:apply(webtool, stop_tools, [[],"app=webcover"]),
++ erlang:apply(webtool, stop, [])
++ catch
++ error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n")
++ end,
++ ok.
+
+
+
diff --git a/main/erlang/0010-fix-nteventlog-remove.patch b/main/erlang/0010-fix-nteventlog-remove.patch
new file mode 100644
index 0000000000..c3d066bdfb
--- /dev/null
+++ b/main/erlang/0010-fix-nteventlog-remove.patch
@@ -0,0 +1,11 @@
+--- otp_src_18.0/lib/os_mon/src/os_mon.app.src
++++ otp_src_18.0-fixed/lib/os_mon/src/os_mon.app.src
+@@ -22,7 +22,7 @@
+ [{description, "CPO CXC 138 46"},
+ {vsn, "%VSN%"},
+ {modules, [os_mon, os_mon_mib, os_sup,
+- disksup, memsup, cpu_sup, os_mon_sysinfo, nteventlog]},
++ disksup, memsup, cpu_sup, os_mon_sysinfo]},
+ {registered, [os_mon_sup, os_mon_sysinfo, disksup, memsup, cpu_sup,
+ os_sup_server]},
+ {applications, [kernel, stdlib, sasl]},
diff --git a/main/erlang/0020-remove-private-unit32.patch b/main/erlang/0020-remove-private-unit32.patch
new file mode 100644
index 0000000000..ec01499571
--- /dev/null
+++ b/main/erlang/0020-remove-private-unit32.patch
@@ -0,0 +1,11 @@
+--- otp_src_18.0-orig/erts/emulator/sys/common/erl_poll.h
++++ otp_src_18.0-fixed/erts/emulator/sys/common/erl_poll.h
+@@ -140,7 +140,7 @@
+ #endif
+
+ #define ERTS_POLL_EV_E2N(EV) \
+- ((__uint32_t) (EV))
++ ((uint32_t) (EV))
+ #define ERTS_POLL_EV_N2E(EV) \
+ ((ErtsPollEvents) (EV))
+
diff --git a/main/erlang/0030-replace_glibc_check.patch b/main/erlang/0030-replace_glibc_check.patch
new file mode 100644
index 0000000000..5ae980492a
--- /dev/null
+++ b/main/erlang/0030-replace_glibc_check.patch
@@ -0,0 +1,20 @@
+--- otp_src_18.0-orig/lib/erl_interface/src/connect/ei_resolve.c
++++ otp_src_18.0-fixed/lib/erl_interface/src/connect/ei_resolve.c
+@@ -616,7 +616,7 @@
+ #ifndef HAVE_GETHOSTBYNAME_R
+ return my_gethostbyaddr_r(addr,length,type,hostp,buffer,buflen,h_errnop);
+ #else
+-#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__))
++#if (defined(_BSD_SOURCE) || (__FreeBSD_version >= 602000) || defined(__DragonFly__))
+ struct hostent *result;
+
+ gethostbyaddr_r(addr, length, type, hostp, buffer, buflen, &result,
+@@ -643,7 +643,7 @@
+ #ifndef HAVE_GETHOSTBYNAME_R
+ return my_gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
+ #else
+-#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
++#if (defined(_BSD_SOURCE) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
+ struct hostent *result;
+
+ gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop);
diff --git a/main/erlang/0040-otp-update-version-18.0.1.patch b/main/erlang/0040-otp-update-version-18.0.1.patch
new file mode 100644
index 0000000000..b35daab4fa
--- /dev/null
+++ b/main/erlang/0040-otp-update-version-18.0.1.patch
@@ -0,0 +1,86 @@
+--- a/OTP_VERSION
++++ b/OTP_VERSION
+@@ -1 +1 @@
+-18.0
++18.0.1
+--- a/erts/doc/src/notes.xml
++++ b/erts/doc/src/notes.xml
+@@ -31,6 +31,22 @@
+ </header>
+ <p>This document describes the changes made to the ERTS application.</p>
+
++<section><title>Erts 7.0.1</title>
++
++ <section><title>Fixed Bugs and Malfunctions</title>
++ <list>
++ <item>
++ <p>
++ Fix a rare hanging of the VM seen to happen just after
++ emulator start. Bug exists since R14.</p>
++ <p>
++ Own Id: OTP-12859 Aux Id: seq12882 </p>
++ </item>
++ </list>
++ </section>
++
++</section>
++
+ <section><title>Erts 7.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+--- a/erts/emulator/sys/common/erl_poll.c
++++ b/erts/emulator/sys/common/erl_poll.c
+@@ -431,7 +431,7 @@ static ERTS_INLINE int
+ is_interrupted_reset(ErtsPollSet ps)
+ {
+ #if defined(USE_THREADS) || ERTS_POLL_ASYNC_INTERRUPT_SUPPORT
+- return (erts_atomic32_xchg_nob(&ps->wakeup_state, ERTS_POLL_NOT_WOKEN)
++ return (erts_atomic32_xchg_acqb(&ps->wakeup_state, ERTS_POLL_NOT_WOKEN)
+ == ERTS_POLL_WOKEN_INTR);
+ #else
+ return 0;
+@@ -442,7 +442,7 @@ static ERTS_INLINE void
+ woke_up(ErtsPollSet ps)
+ {
+ #if defined(USE_THREADS) || ERTS_POLL_ASYNC_INTERRUPT_SUPPORT
+- erts_aint32_t wakeup_state = erts_atomic32_read_nob(&ps->wakeup_state);
++ erts_aint32_t wakeup_state = erts_atomic32_read_acqb(&ps->wakeup_state);
+ if (wakeup_state == ERTS_POLL_NOT_WOKEN)
+ (void) erts_atomic32_cmpxchg_nob(&ps->wakeup_state,
+ ERTS_POLL_WOKEN,
+@@ -469,14 +469,9 @@ wake_poller(ErtsPollSet ps, int interrupted, int async_signal_safe)
+ wakeup_state = erts_atomic32_cmpxchg_relb(&ps->wakeup_state,
+ ERTS_POLL_WOKEN,
+ ERTS_POLL_NOT_WOKEN);
+- else {
+- /*
+- * We might unnecessarily write to the pipe, however,
+- * that isn't problematic.
+- */
+- wakeup_state = erts_atomic32_read_nob(&ps->wakeup_state);
+- erts_atomic32_set_relb(&ps->wakeup_state, ERTS_POLL_WOKEN_INTR);
+- }
++ else
++ wakeup_state = erts_atomic32_xchg_relb(&ps->wakeup_state,
++ ERTS_POLL_WOKEN_INTR);
+ wake = wakeup_state == ERTS_POLL_NOT_WOKEN;
+ }
+ /*
+--- a/erts/vsn.mk
++++ b/erts/vsn.mk
+@@ -18,7 +18,7 @@
+ # %CopyrightEnd%
+ #
+
+-VSN = 7.0
++VSN = 7.0.1
+
+ # Port number 4365 in 4.2
+ # Port number 4366 in 4.3
+--- a/otp_versions.table
++++ b/otp_versions.table
+@@ -1,3 +1,4 @@
++OTP-18.0.1 : erts-7.0.1 # asn1-4.0 common_test-1.11 compiler-6.0 cosEvent-2.2 cosEventDomain-1.2 cosFileTransfer-1.2 cosNotification-1.2 cosProperty-1.2 cosTime-1.2 cosTransactions-1.3 crypto-3.6 debugger-4.1 dialyzer-2.8 diameter-1.10 edoc-0.7.17 eldap-1.2 erl_docgen-0.4 erl_interface-3.8 et-1.5.1 eunit-2.2.10 gs-1.6 hipe-3.12 ic-4.4 inets-6.0 jinterface-1.6 kernel-4.0 megaco-3.18 mnesia-4.13 observer-2.1 odbc-2.11 orber-3.8 os_mon-2.4 ose-1.1 otp_mibs-1.1 parsetools-2.1 percept-0.8.11 public_key-1.0 reltool-0.7 runtime_tools-1.9 sasl-2.5 snmp-5.2 ssh-4.0 ssl-7.0 stdlib-2.5 syntax_tools-1.7 test_server-3.9 tools-2.8 typer-0.9.9 webtool-0.9 wx-1.4 xmerl-1.3.8 :
+ OTP-18.0 : asn1-4.0 common_test-1.11 compiler-6.0 cosEvent-2.2 cosEventDomain-1.2 cosFileTransfer-1.2 cosNotification-1.2 cosProperty-1.2 cosTime-1.2 cosTransactions-1.3 crypto-3.6 debugger-4.1 dialyzer-2.8 diameter-1.10 edoc-0.7.17 eldap-1.2 erl_docgen-0.4 erl_interface-3.8 erts-7.0 et-1.5.1 eunit-2.2.10 gs-1.6 hipe-3.12 ic-4.4 inets-6.0 jinterface-1.6 kernel-4.0 megaco-3.18 mnesia-4.13 observer-2.1 odbc-2.11 orber-3.8 os_mon-2.4 ose-1.1 otp_mibs-1.1 parsetools-2.1 percept-0.8.11 public_key-1.0 reltool-0.7 runtime_tools-1.9 sasl-2.5 snmp-5.2 ssh-4.0 ssl-7.0 stdlib-2.5 syntax_tools-1.7 test_server-3.9 tools-2.8 typer-0.9.9 webtool-0.9 wx-1.4 xmerl-1.3.8 # :
+ OTP-17.5.6 : inets-5.10.9 ssh-3.2.4 ssl-6.0.1 # asn1-3.0.4 common_test-1.10.1 compiler-5.0.4 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.5 debugger-4.0.3 dialyzer-2.7.4 diameter-1.9.2 edoc-0.7.16 eldap-1.1.1 erl_docgen-0.3.7 erl_interface-3.7.20 erts-6.4.1 et-1.5 eunit-2.2.9 gs-1.5.16 hipe-3.11.3 ic-4.3.6 jinterface-1.5.12 kernel-3.2 megaco-3.17.3 mnesia-4.12.5 observer-2.0.4 odbc-2.10.22 orber-3.7.1 os_mon-2.3.1 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 public_key-0.23 reltool-0.6.6 runtime_tools-1.8.16 sasl-2.4.1 snmp-5.1.2 stdlib-2.4 syntax_tools-1.6.18 test_server-3.8.1 tools-2.7.2 typer-0.9.8 webtool-0.8.10 wx-1.3.3 xmerl-1.3.7 :
+ OTP-17.5.5 : diameter-1.9.2 # asn1-3.0.4 common_test-1.10.1 compiler-5.0.4 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.5 debugger-4.0.3 dialyzer-2.7.4 edoc-0.7.16 eldap-1.1.1 erl_docgen-0.3.7 erl_interface-3.7.20 erts-6.4.1 et-1.5 eunit-2.2.9 gs-1.5.16 hipe-3.11.3 ic-4.3.6 inets-5.10.8 jinterface-1.5.12 kernel-3.2 megaco-3.17.3 mnesia-4.12.5 observer-2.0.4 odbc-2.10.22 orber-3.7.1 os_mon-2.3.1 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 public_key-0.23 reltool-0.6.6 runtime_tools-1.8.16 sasl-2.4.1 snmp-5.1.2 ssh-3.2.3 ssl-6.0 stdlib-2.4 syntax_tools-1.6.18 test_server-3.8.1 tools-2.7.2 typer-0.9.8 webtool-0.8.10 wx-1.3.3 xmerl-1.3.7 :
diff --git a/main/erlang/0050-otp-update-version-18.0.2.patch b/main/erlang/0050-otp-update-version-18.0.2.patch
new file mode 100644
index 0000000000..ccae0a6f9e
--- /dev/null
+++ b/main/erlang/0050-otp-update-version-18.0.2.patch
@@ -0,0 +1,839 @@
+--- a/HOWTO/INSTALL.md
++++ b/HOWTO/INSTALL.md
+@@ -400,6 +400,12 @@ Some of the available `configure` options are:
+ no automatic dependency handling between applications. If you disable
+ an application that another application depends on, you also have to disable the
+ dependant application.
++* `--enable-gettimeofday-as-os-system-time` - Force usage of `gettimeofday()` for
++ OS system time.
++* `--enable-prefer-elapsed-monotonic-time-during-suspend` - Prefer an OS monotonic
++ time source with elapsed time during suspend.
++* `--disable-prefer-elapsed-monotonic-time-during-suspend` - Do not prefer an OS
++ monotonic time source with elapsed time during suspend.
+ * `--enable-dirty-schedulers` - Enable the **experimental** dirty schedulers
+ functionality. Note that the dirty schedulers functionality is experimental,
+ and **not supported**. This functionality **will** be subject to backward
+--- a/OTP_VERSION
++++ b/OTP_VERSION
+@@ -1 +1 @@
+-18.0.1
++18.0.2
+--- a/erts/aclocal.m4
++++ b/erts/aclocal.m4
+@@ -726,9 +726,15 @@ esac
+
+ AC_DEFUN(ERL_MONOTONIC_CLOCK,
+ [
+- default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC"
+- low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST"
+- high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE"
++ if test "$3" = "yes"; then
++ default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC"
++ low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST"
++ high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE"
++ else
++ default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC"
++ low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST"
++ high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE"
++ fi
+
+ case "$1" in
+ high_resolution)
+@@ -1466,7 +1472,7 @@ AC_ARG_WITH(with_sparc_memory_order,
+ LM_CHECK_THR_LIB
+ ERL_INTERNAL_LIBS
+
+-ERL_MONOTONIC_CLOCK(high_resolution)
++ERL_MONOTONIC_CLOCK(high_resolution, undefined, no)
+
+ case $erl_monotonic_clock_func in
+ clock_gettime)
+@@ -2202,7 +2208,7 @@ AC_DEFUN(ERL_TIME_CORRECTION,
+
+ AC_ARG_WITH(clock-resolution,
+ AS_HELP_STRING([--with-clock-resolution=high|low|default],
+- [specify wanted clock resolution)]))
++ [specify wanted clock resolution]))
+
+ AC_ARG_WITH(clock-gettime-realtime-id,
+ AS_HELP_STRING([--with-clock-gettime-realtime-id=CLOCKID],
+@@ -2212,6 +2218,24 @@ AC_ARG_WITH(clock-gettime-monotonic-id,
+ AS_HELP_STRING([--with-clock-gettime-monotonic-id=CLOCKID],
+ [specify clock id to use with clock_gettime() for monotonic time)]))
+
++AC_ARG_ENABLE(prefer-elapsed-monotonic-time-during-suspend,
++ AS_HELP_STRING([--enable-prefer-elapsed-monotonic-time-during-suspend],
++ [Prefer an OS monotonic time source with elapsed time during suspend])
++ AS_HELP_STRING([--disable-prefer-elapsed-monotonic-time-during-suspend],
++ [Do not prefer an OS monotonic time source with elapsed time during suspend]),
++[ case "$enableval" in
++ yes) prefer_elapsed_monotonic_time_during_suspend=yes ;;
++ *) prefer_elapsed_monotonic_time_during_suspend=no ;;
++ esac ], prefer_elapsed_monotonic_time_during_suspend=no)
++
++AC_ARG_ENABLE(gettimeofday-as-os-system-time,
++ AS_HELP_STRING([--enable-gettimeofday-as-os-system-time],
++ [Force usage of gettimeofday() for OS system time]),
++[ case "$enableval" in
++ yes) force_gettimeofday_os_system_time=yes ;;
++ *) force_gettimeofday_os_system_time=no ;;
++ esac ], force_gettimeofday_os_system_time=no)
++
+ case "$with_clock_resolution" in
+ ""|no|yes)
+ with_clock_resolution=default;;
+@@ -2222,6 +2246,17 @@ case "$with_clock_resolution" in
+ ;;
+ esac
+
++if test "$force_gettimeofday_os_system_time" = "yes"; then
++
++ AC_CHECK_FUNCS([gettimeofday])
++ if test "$ac_cv_func_gettimeofday" = "yes"; then
++ AC_DEFINE(OS_SYSTEM_TIME_GETTIMEOFDAY, [1], [Define if you want to implement erts_os_system_time() using gettimeofday()])
++ else
++ AC_MSG_ERROR([No gettimeofday() available])
++ fi
++
++else # $force_gettimeofday_os_system_time != yes
++
+ case "$with_clock_gettime_realtime_id" in
+ ""|no)
+ with_clock_gettime_realtime_id=no
+@@ -2239,23 +2274,6 @@ case "$with_clock_gettime_realtime_id" in
+ ;;
+ esac
+
+-case "$with_clock_gettime_monotonic_id" in
+- ""|no)
+- with_clock_gettime_monotonic_id=no
+- ;;
+- CLOCK_*CPUTIME*)
+- AC_MSG_ERROR([Invalid clock_gettime() monotonic clock id: Refusing to use the cputime clock id $with_clock_gettime_monotonic_id as monotonic clock id])
+- ;;
+- CLOCK_REALTIME*|CLOCK_TAI*)
+- AC_MSG_ERROR([Invalid clock_gettime() monotonic clock id: Refusing to use the realtime clock id $with_clock_gettime_monotonic_id as monotonic clock id])
+- ;;
+- CLOCK_*)
+- ;;
+- *)
+- AC_MSG_ERROR([Invalid clock_gettime() clock id: $with_clock_gettime_monotonic_id])
+- ;;
+-esac
+-
+ case "$with_clock_resolution-$with_clock_gettime_realtime_id" in
+ high-no)
+ ERL_WALL_CLOCK(high_resolution);;
+@@ -2296,15 +2314,34 @@ if test "x$erl_wall_clock_id" != "x"; then
+ AC_DEFINE_UNQUOTED(WALL_CLOCK_ID, [$erl_wall_clock_id], [Define to wall clock id to use])
+ fi
+
++fi # $force_gettimeofday_os_system_time != yes
++
++case "$with_clock_gettime_monotonic_id" in
++ ""|no)
++ with_clock_gettime_monotonic_id=no
++ ;;
++ CLOCK_*CPUTIME*)
++ AC_MSG_ERROR([Invalid clock_gettime() monotonic clock id: Refusing to use the cputime clock id $with_clock_gettime_monotonic_id as monotonic clock id])
++ ;;
++ CLOCK_REALTIME*|CLOCK_TAI*)
++ AC_MSG_ERROR([Invalid clock_gettime() monotonic clock id: Refusing to use the realtime clock id $with_clock_gettime_monotonic_id as monotonic clock id])
++ ;;
++ CLOCK_*)
++ ;;
++ *)
++ AC_MSG_ERROR([Invalid clock_gettime() clock id: $with_clock_gettime_monotonic_id])
++ ;;
++esac
++
+ case "$with_clock_resolution-$with_clock_gettime_monotonic_id" in
+ high-no)
+- ERL_MONOTONIC_CLOCK(high_resolution);;
++ ERL_MONOTONIC_CLOCK(high_resolution, undefined, $prefer_elapsed_monotonic_time_during_suspend);;
+ low-no)
+- ERL_MONOTONIC_CLOCK(low_resolution);;
++ ERL_MONOTONIC_CLOCK(low_resolution, undefined, $prefer_elapsed_monotonic_time_during_suspend);;
+ default-no)
+- ERL_MONOTONIC_CLOCK(default_resolution);;
++ ERL_MONOTONIC_CLOCK(default_resolution, undefined, $prefer_elapsed_monotonic_time_during_suspend);;
+ *)
+- ERL_MONOTONIC_CLOCK(custom_resolution, $with_clock_gettime_monotonic_id);;
++ ERL_MONOTONIC_CLOCK(custom_resolution, $with_clock_gettime_monotonic_id, $prefer_elapsed_monotonic_time_during_suspend);;
+ esac
+
+ case "$erl_monotonic_clock_func-$erl_monotonic_clock_id-$with_clock_gettime_monotonic_id" in
+@@ -2352,7 +2389,7 @@ if test $erl_cv_clock_gettime_monotonic_raw = yes; then
+ AC_DEFINE(HAVE_CLOCK_GETTIME_MONOTONIC_RAW, [1], [Define if you have clock_gettime(CLOCK_MONOTONIC_RAW, _)])
+ fi
+
+-ERL_MONOTONIC_CLOCK(high_resolution)
++ERL_MONOTONIC_CLOCK(high_resolution, undefined, no)
+
+ case $$erl_monotonic_clock_low_resolution-$erl_monotonic_clock_func in
+ no-mach_clock_get_time)
+--- a/erts/doc/src/notes.xml
++++ b/erts/doc/src/notes.xml
+@@ -31,6 +31,82 @@
+ </header>
+ <p>This document describes the changes made to the ERTS application.</p>
+
++<section><title>Erts 7.0.2</title>
++
++ <section><title>Fixed Bugs and Malfunctions</title>
++ <list>
++ <item>
++ <p>
++ A process could end up in an inconsistent half exited
++ state in the runtime system without SMP support. This
++ could occur if the processes was traced by a port that it
++ also was linked to, and the port terminated abnormally
++ while handling a trace message for the process.</p>
++ <p>
++ This bug has always existed in the runtime system without
++ SMP support, but never in the runtime system with SMP
++ support.</p>
++ <p>
++ Own Id: OTP-12889 Aux Id: seq12885 </p>
++ </item>
++ <item>
++ <p>
++ Removed unnecessary copying of data when retrieving
++ corrected Erlang monotonic time.</p>
++ <p>
++ Own Id: OTP-12894</p>
++ </item>
++ <item>
++ <p>
++ Changed default OS monotonic clock source chosen at build
++ time. This in order to improve performance. The behavior
++ will now on most systems be that (both OS and Erlang)
++ monotonic time stops when the system is suspended.</p>
++ <p>
++ If you prefer that monotonic time elapse during suspend
++ of the machine, you can pass the command line argument
++ <c>--enable-prefer-elapsed-monotonic-time-during-suspend</c>
++ to <c>configure</c> when building Erlang/OTP. The
++ configuration stage will try to find such a clock source,
++ but might not be able to find it. Note that there might
++ be a performance penalty associated with such a clock
++ source.</p>
++ <p>
++ *** POTENTIAL INCOMPATIBILITY ***</p>
++ <p>
++ Own Id: OTP-12895</p>
++ </item>
++ <item>
++ <p>
++ <c>erlang:system_info(end_time)</c> returned a faulty
++ value on 32-bit architectures.</p>
++ <p>
++ Own Id: OTP-12896</p>
++ </item>
++ </list>
++ </section>
++
++
++ <section><title>Improvements and New Features</title>
++ <list>
++ <item>
++ <p>
++ The <c>configure</c> command line argument
++ <c>--enable-gettimeofday-as-os-system-time</c> has been
++ added which force usage of <c>gettimeofday()</c> for OS
++ system time. This will improve performance of
++ <c>os:system_time()</c> and <c>os:timestamp()</c> on
++ MacOS X, at the expense of worse accuracy, resolution and
++ precision of Erlang monotonic time, Erlang system time,
++ and OS system time.</p>
++ <p>
++ Own Id: OTP-12892</p>
++ </item>
++ </list>
++ </section>
++
++</section>
++
+ <section><title>Erts 7.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+--- a/erts/emulator/beam/beam_emu.c
++++ b/erts/emulator/beam/beam_emu.c
+@@ -2163,6 +2163,22 @@ void process_main(void)
+ OpCase(wait_f):
+
+ wait2: {
++#ifndef ERTS_SMP
++ if (ERTS_PROC_IS_EXITING(c_p)) {
++ /*
++ * I non smp case:
++ *
++ * Currently executing process might be sent an exit
++ * signal if it is traced by a port that it also is
++ * linked to, and the port terminates during the
++ * trace. In this case we do *not* want to clear
++ * the active flag, which will make the process hang
++ * in limbo forever.
++ */
++ SWAPOUT;
++ goto do_schedule;
++ }
++#endif
+ c_p->i = (BeamInstr *) Arg(0); /* L1 */
+ SWAPOUT;
+ c_p->arity = 0;
+@@ -6219,6 +6235,23 @@ erts_hibernate(Process* c_p, Eterm module, Eterm function, Eterm args, Eterm* re
+ int arity;
+ Eterm tmp;
+
++#ifndef ERTS_SMP
++ if (ERTS_PROC_IS_EXITING(c_p)) {
++ /*
++ * I non smp case:
++ *
++ * Currently executing process might be sent an exit
++ * signal if it is traced by a port that it also is
++ * linked to, and the port terminates during the
++ * trace. In this case we do *not* want to clear
++ * the active flag, which will make the process hang
++ * in limbo forever. Get out of here and terminate
++ * the process...
++ */
++ return -1;
++ }
++#endif
++
+ if (is_not_atom(module) || is_not_atom(function)) {
+ /*
+ * No need to test args here -- done below.
+@@ -6295,7 +6328,16 @@ erts_hibernate(Process* c_p, Eterm module, Eterm function, Eterm args, Eterm* re
+ ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
+ PROCESS_MAIN_CHK_LOCKS(c_p);
+ erts_smp_proc_lock(c_p, ERTS_PROC_LOCK_MSGQ|ERTS_PROC_LOCK_STATUS);
+-#ifdef ERTS_SMP
++#ifndef ERTS_SMP
++ if (ERTS_PROC_IS_EXITING(c_p)) {
++ /*
++ * See comment in the begining of the function...
++ *
++ * This second test is needed since gc might be traced.
++ */
++ return -1;
++ }
++#else /* ERTS_SMP */
+ ERTS_SMP_MSGQ_MV_INQ2PRIVQ(c_p);
+ if (!c_p->msg.len)
+ #endif
+--- a/erts/emulator/beam/erl_process.c
++++ b/erts/emulator/beam/erl_process.c
+@@ -11409,6 +11409,22 @@ set_proc_exiting(Process *p,
+ KILL_CATCHES(p);
+ p->i = (BeamInstr *) beam_exit;
+
++#ifndef ERTS_SMP
++ if (state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS)) {
++ /*
++ * I non smp case:
++ *
++ * Currently executing process might be sent an exit
++ * signal if it is traced by a port that it also is
++ * linked to, and the port terminates during the
++ * trace. In this case we want schedule out the
++ * process as quickly as possible in order to detect
++ * the event as fast as possible.
++ */
++ ERTS_VBUMP_ALL_REDS(p);
++ }
++#endif
++
+ if (enqueue)
+ add2runq(enqueue > 0 ? p : make_proxy_proc(NULL, p, enq_prio),
+ state,
+--- a/erts/emulator/beam/erl_time.h
++++ b/erts/emulator/beam/erl_time.h
+@@ -345,8 +345,10 @@ erts_time_unit_conversion(Uint64 value,
+ #endif /* !ERTS_COMPILE_TIME_MONOTONIC_TIME_UNIT */
+
+ #define ERTS_MONOTONIC_TIME_END_EXTERNAL \
+- (ERTS_MONOTONIC_TIME_START_EXTERNAL \
+- + (ERTS_MONOTONIC_END - ERTS_MONOTONIC_BEGIN))
++ (ERTS_MONOTONIC_TIME_START_EXTERNAL < 0 \
++ ? (ERTS_MONOTONIC_TIME_START_EXTERNAL \
++ + (ERTS_MONOTONIC_END - ERTS_MONOTONIC_BEGIN)) \
++ : (ERTS_MONOTONIC_END - ERTS_MONOTONIC_TIME_START_EXTERNAL))
+
+ #define ERTS_MSEC_TO_CLKTCKS__(MON) \
+ ((MON) * (ERTS_CLKTCK_RESOLUTION/1000))
+--- a/erts/emulator/beam/erl_time_sup.c
++++ b/erts/emulator/beam/erl_time_sup.c
+@@ -124,7 +124,11 @@ typedef struct {
+
+ typedef struct {
+ ErtsMonotonicCorrectionInstance prev;
+- ErtsMonotonicCorrectionInstance curr;
++ ErtsMonotonicCorrectionInstance curr;
++} ErtsMonotonicCorrectionInstances;
++
++typedef struct {
++ ErtsMonotonicCorrectionInstances insts;
+ ErtsMonotonicDriftData drift;
+ ErtsMonotonicTime last_check;
+ int short_check_interval;
+@@ -272,27 +276,24 @@ static ERTS_INLINE ErtsMonotonicTime
+ read_corrected_time(int os_drift_corrected)
+ {
+ ErtsMonotonicTime os_mtime;
+- ErtsMonotonicCorrectionData cdata;
+- ErtsMonotonicCorrectionInstance *cip;
++ ErtsMonotonicCorrectionInstance ci;
+
+ erts_smp_rwmtx_rlock(&time_sup.inf.c.parmon.rwmtx);
+
+ os_mtime = erts_os_monotonic_time();
+
+- cdata = time_sup.inf.c.parmon.cdata;
+-
+- erts_smp_rwmtx_runlock(&time_sup.inf.c.parmon.rwmtx);
+-
+- if (os_mtime >= cdata.curr.os_mtime)
+- cip = &cdata.curr;
++ if (os_mtime >= time_sup.inf.c.parmon.cdata.insts.curr.os_mtime)
++ ci = time_sup.inf.c.parmon.cdata.insts.curr;
+ else {
+- if (os_mtime < cdata.prev.os_mtime)
++ if (os_mtime < time_sup.inf.c.parmon.cdata.insts.prev.os_mtime)
+ erl_exit(ERTS_ABORT_EXIT,
+ "OS monotonic time stepped backwards\n");
+- cip = &cdata.prev;
++ ci = time_sup.inf.c.parmon.cdata.insts.prev;
+ }
+
+- return calc_corrected_erl_mtime(os_mtime, cip, NULL,
++ erts_smp_rwmtx_runlock(&time_sup.inf.c.parmon.rwmtx);
++
++ return calc_corrected_erl_mtime(os_mtime, &ci, NULL,
+ os_drift_corrected);
+ }
+
+@@ -360,9 +361,8 @@ check_time_correction(void *vesdp)
+ {
+ int init_drift_adj = !vesdp;
+ ErtsSchedulerData *esdp = (ErtsSchedulerData *) vesdp;
+- ErtsMonotonicCorrectionData cdata;
+ ErtsMonotonicCorrection new_correction;
+- ErtsMonotonicCorrectionInstance *cip;
++ ErtsMonotonicCorrectionInstance ci;
+ ErtsMonotonicTime mdiff, sdiff, os_mtime, erl_mtime, os_stime,
+ erl_stime, time_offset, timeout_pos;
+ Uint timeout;
+@@ -373,16 +373,15 @@ check_time_correction(void *vesdp)
+
+ erts_os_times(&os_mtime, &os_stime);
+
+- cdata = time_sup.inf.c.parmon.cdata;
++ ci = time_sup.inf.c.parmon.cdata.insts.curr;
+
+ erts_smp_rwmtx_runlock(&time_sup.inf.c.parmon.rwmtx);
+
+- if (os_mtime < cdata.curr.os_mtime)
++ if (os_mtime < ci.os_mtime)
+ erl_exit(ERTS_ABORT_EXIT,
+ "OS monotonic time stepped backwards\n");
+- cip = &cdata.curr;
+
+- erl_mtime = calc_corrected_erl_mtime(os_mtime, cip, &mdiff,
++ erl_mtime = calc_corrected_erl_mtime(os_mtime, &ci, &mdiff,
+ os_drift_corrected);
+ time_offset = get_time_offset();
+ erl_stime = erl_mtime + time_offset;
+@@ -397,7 +396,7 @@ check_time_correction(void *vesdp)
+ time_sup.inf.c.shadow_offset = 0;
+ }
+
+- new_correction = cip->correction;
++ new_correction = ci.correction;
+
+ if (time_sup.r.o.warp_mode == ERTS_MULTI_TIME_WARP_MODE
+ && (sdiff < -2*time_sup.r.o.adj.small_diff
+@@ -408,7 +407,7 @@ check_time_correction(void *vesdp)
+ set_time_offset(time_offset);
+ schedule_send_time_offset_changed_notifications(time_offset);
+ begin_short_intervals = 1;
+- if (cdata.curr.correction.error != 0) {
++ if (ci.correction.error != 0) {
+ set_new_correction = 1;
+ new_correction.error = 0;
+ }
+@@ -425,12 +424,12 @@ check_time_correction(void *vesdp)
+ time_sup.inf.c.shadow_offset -= sdiff;
+ sdiff = 0;
+ begin_short_intervals = 1;
+- if (cdata.curr.correction.error != 0) {
++ if (ci.correction.error != 0) {
+ set_new_correction = 1;
+ new_correction.error = 0;
+ }
+ }
+- else if (cdata.curr.correction.error == 0) {
++ else if (ci.correction.error == 0) {
+ if (sdiff < -time_sup.r.o.adj.small_diff) {
+ set_new_correction = 1;
+ if (sdiff < -time_sup.r.o.adj.large_diff)
+@@ -446,9 +445,9 @@ check_time_correction(void *vesdp)
+ new_correction.error = -ERTS_TCORR_ERR_SMALL_ADJ;
+ }
+ }
+- else if (cdata.curr.correction.error > 0) {
++ else if (ci.correction.error > 0) {
+ if (sdiff < 0) {
+- if (cdata.curr.correction.error != ERTS_TCORR_ERR_LARGE_ADJ
++ if (ci.correction.error != ERTS_TCORR_ERR_LARGE_ADJ
+ && sdiff < -time_sup.r.o.adj.large_diff) {
+ new_correction.error = ERTS_TCORR_ERR_LARGE_ADJ;
+ set_new_correction = 1;
+@@ -466,9 +465,9 @@ check_time_correction(void *vesdp)
+ new_correction.error = 0;
+ }
+ }
+- else /* if (cdata.curr.correction.error < 0) */ {
++ else /* if (ci.correction.error < 0) */ {
+ if (0 < sdiff) {
+- if (cdata.curr.correction.error != -ERTS_TCORR_ERR_LARGE_ADJ
++ if (ci.correction.error != -ERTS_TCORR_ERR_LARGE_ADJ
+ && time_sup.r.o.adj.large_diff < sdiff) {
+ new_correction.error = -ERTS_TCORR_ERR_LARGE_ADJ;
+ set_new_correction = 1;
+@@ -631,8 +630,8 @@ check_time_correction(void *vesdp)
+ #ifdef ERTS_TIME_CORRECTION_PRINT
+ print_correction(set_new_correction,
+ sdiff,
+- cip->correction.error,
+- cip->correction.drift,
++ ci.correction.error,
++ ci.correction.drift,
+ new_correction.error,
+ new_correction.drift,
+ timeout);
+@@ -644,7 +643,7 @@ check_time_correction(void *vesdp)
+ os_mtime = erts_os_monotonic_time();
+
+ /* Save previous correction instance */
+- time_sup.inf.c.parmon.cdata.prev = *cip;
++ time_sup.inf.c.parmon.cdata.insts.prev = ci;
+
+ /*
+ * Current correction instance begin when
+@@ -657,15 +656,15 @@ check_time_correction(void *vesdp)
+ * next OS monotonic time using previous
+ * correction.
+ */
+- erl_mtime = calc_corrected_erl_mtime(os_mtime, cip, NULL,
++ erl_mtime = calc_corrected_erl_mtime(os_mtime, &ci, NULL,
+ os_drift_corrected);
+
+ /*
+ * Save new current correction instance.
+ */
+- time_sup.inf.c.parmon.cdata.curr.erl_mtime = erl_mtime;
+- time_sup.inf.c.parmon.cdata.curr.os_mtime = os_mtime;
+- time_sup.inf.c.parmon.cdata.curr.correction = new_correction;
++ time_sup.inf.c.parmon.cdata.insts.curr.erl_mtime = erl_mtime;
++ time_sup.inf.c.parmon.cdata.insts.curr.os_mtime = os_mtime;
++ time_sup.inf.c.parmon.cdata.insts.curr.correction = new_correction;
+
+ erts_smp_rwmtx_rwunlock(&time_sup.inf.c.parmon.rwmtx);
+ }
+@@ -784,24 +783,22 @@ static ErtsMonotonicTime
+ finalize_corrected_time_offset(ErtsSystemTime *stimep)
+ {
+ ErtsMonotonicTime os_mtime;
+- ErtsMonotonicCorrectionData cdata;
+- ErtsMonotonicCorrectionInstance *cip;
++ ErtsMonotonicCorrectionInstance ci;
+ int os_drift_corrected = time_sup.r.o.os_corrected_monotonic_time;
+
+ erts_smp_rwmtx_rlock(&time_sup.inf.c.parmon.rwmtx);
+
+ erts_os_times(&os_mtime, stimep);
+
+- cdata = time_sup.inf.c.parmon.cdata;
++ ci = time_sup.inf.c.parmon.cdata.insts.curr;
+
+ erts_smp_rwmtx_runlock(&time_sup.inf.c.parmon.rwmtx);
+
+- if (os_mtime < cdata.curr.os_mtime)
++ if (os_mtime < ci.os_mtime)
+ erl_exit(ERTS_ABORT_EXIT,
+ "OS monotonic time stepped backwards\n");
+- cip = &cdata.curr;
+
+- return calc_corrected_erl_mtime(os_mtime, cip, NULL,
++ return calc_corrected_erl_mtime(os_mtime, &ci, NULL,
+ os_drift_corrected);
+ }
+
+@@ -1128,13 +1125,13 @@ erts_init_time_sup(int time_correction, ErtsTimeWarpMode time_warp_mode)
+
+ cdatap->drift.intervals[0].time.sys = time_sup.inf.c.sinit;
+ cdatap->drift.intervals[0].time.mon = time_sup.inf.c.minit;
+- cdatap->curr.correction.drift = 0;
+- cdatap->curr.correction.error = 0;
+- cdatap->curr.erl_mtime = ERTS_MONOTONIC_BEGIN;
+- cdatap->curr.os_mtime = time_sup.inf.c.minit;
++ cdatap->insts.curr.correction.drift = 0;
++ cdatap->insts.curr.correction.error = 0;
++ cdatap->insts.curr.erl_mtime = ERTS_MONOTONIC_BEGIN;
++ cdatap->insts.curr.os_mtime = time_sup.inf.c.minit;
+ cdatap->last_check = time_sup.inf.c.minit;
+ cdatap->short_check_interval = ERTS_INIT_SHORT_INTERVAL_COUNTER;
+- cdatap->prev = cdatap->curr;
++ cdatap->insts.prev = cdatap->insts.curr;
+
+ if (!time_sup.r.o.os_corrected_monotonic_time)
+ time_sup.r.o.get_time = get_corrected_time;
+--- a/erts/emulator/test/trace_port_SUITE.erl
++++ b/erts/emulator/test/trace_port_SUITE.erl
+@@ -35,7 +35,8 @@
+ fake_schedule_after_getting_linked/1,
+ fake_schedule_after_getting_unlinked/1,
+ gc/1,
+- default_tracer/1]).
++ default_tracer/1,
++ tracer_port_crash/1]).
+
+ -include_lib("test_server/include/test_server.hrl").
+
+@@ -45,7 +46,7 @@ test_cases() ->
+ fake_schedule_after_register,
+ fake_schedule_after_getting_linked,
+ fake_schedule_after_getting_unlinked, gc,
+- default_tracer].
++ default_tracer, tracer_port_crash].
+
+ suite() -> [{ct_hooks,[ts_install_cth]}].
+
+@@ -473,6 +474,42 @@ default_tracer(Config) when is_list(Config) ->
+ ?line M = N,
+ ok.
+
++tracer_port_crash(Config) when is_list(Config) ->
++ case test_server:is_native(?MODULE) orelse
++ test_server:is_native(lists) of
++ true ->
++ {skip,"Native code"};
++ false ->
++ Tr = start_tracer(Config),
++ Port = get(tracer_port),
++ Tracee = spawn(fun () ->
++ register(trace_port_linker, self()),
++ link(Port),
++ receive go -> ok end,
++ lists:reverse([1,b,c]),
++ receive die -> ok end
++ end),
++ Tr ! {unlink_tracer_port, self()},
++ receive {unlinked_tracer_port, Tr} -> ok end,
++ port_control(Port, $c, []), %% Make port commands crash tracer port...
++ trace_func({lists,reverse,1}, []),
++ trace_pid(Tracee, true, [call]),
++ trace_info(Tracee, flags),
++ trace_info(self(), tracer),
++ Tracee ! go,
++ receive after 1000 -> ok end,
++ case whereis(trace_port_linker) of
++ undefined ->
++ ok;
++ Id ->
++% erts_debug:set_internal_state(available_internal_state, true),
++% erts_debug:set_internal_state(abort, {trace_port_linker, Id})
++ ?t:fail({trace_port_linker, Id})
++ end,
++ undefined = process_info(Tracee),
++ ok
++ end.
++
+ %%% Help functions.
+
+ huge_data() -> huge_data(16384).
+@@ -631,6 +668,10 @@ tracer_loop(RelayTo, Port) ->
+ {Port,{data,Msg}} ->
+ RelayTo ! binary_to_term(Msg),
+ tracer_loop(RelayTo, Port);
++ {unlink_tracer_port, From} ->
++ unlink(Port),
++ From ! {unlinked_tracer_port, self()},
++ tracer_loop(RelayTo, Port);
+ Other ->
+ exit({bad_message,Other})
+ end.
+--- a/erts/emulator/test/trace_port_SUITE_data/echo_drv.c
++++ b/erts/emulator/test/trace_port_SUITE_data/echo_drv.c
+@@ -1,5 +1,6 @@
+ #include <stdio.h>
+ #include "erl_driver.h"
++#include <errno.h>
+
+
+
+@@ -14,6 +15,7 @@ enum e_heavy {
+ typedef struct _erl_drv_data {
+ ErlDrvPort erlang_port;
+ enum e_heavy heavy;
++ int crash;
+ } EchoDrvData;
+
+ static EchoDrvData echo_drv_data, *echo_drv_data_p;
+@@ -78,6 +80,7 @@ static EchoDrvData *echo_drv_start(ErlDrvPort port, char *command)
+ echo_drv_data_p = &echo_drv_data;
+ echo_drv_data_p->erlang_port = port;
+ echo_drv_data_p->heavy = heavy_off;
++ echo_drv_data_p->crash = 0;
+ return echo_drv_data_p;
+ }
+
+@@ -87,6 +90,12 @@ static void echo_drv_stop(EchoDrvData *data_p) {
+
+ static void echo_drv_output(ErlDrvData drv_data, char *buf, ErlDrvSizeT len) {
+ EchoDrvData* data_p = (EchoDrvData *) drv_data;
++
++ if (data_p->crash) {
++ driver_failure_posix(data_p->erlang_port, EINTR);
++ return;
++ }
++
+ driver_output(data_p->erlang_port, buf, len);
+ switch (data_p->heavy) {
+ case heavy_off:
+@@ -100,6 +109,7 @@ static void echo_drv_output(ErlDrvData drv_data, char *buf, ErlDrvSizeT len) {
+ data_p->heavy = heavy_off;
+ break;
+ }
++
+ }
+
+ static void echo_drv_finish() {
+@@ -115,6 +125,8 @@ static ErlDrvSSizeT echo_drv_control(ErlDrvData drv_data,
+ case 'h':
+ data_p->heavy = heavy_set;
+ break;
++ case 'c':
++ data_p->crash = 1;
+ }
+ return 0;
+ }
+--- a/erts/vsn.mk
++++ b/erts/vsn.mk
+@@ -18,7 +18,7 @@
+ # %CopyrightEnd%
+ #
+
+-VSN = 7.0.1
++VSN = 7.0.2
+
+ # Port number 4365 in 4.2
+ # Port number 4366 in 4.3
+--- a/lib/runtime_tools/c_src/trace_file_drv.c
++++ b/lib/runtime_tools/c_src/trace_file_drv.c
+@@ -327,9 +327,11 @@ static ErlDrvData trace_file_start(ErlDrvPort port, char *buff)
+ | O_BINARY
+ #endif
+ , 0777)) < 0) {
++ int saved_errno = errno;
+ if (wrap)
+ driver_free(wrap);
+ driver_free(data);
++ errno = saved_errno;
+ return ERL_DRV_ERROR_ERRNO;
+ }
+
+@@ -525,14 +527,19 @@ static void *my_alloc(size_t size)
+ ** A write wrapper that regards it as an error if not all data was written.
+ */
+ static int do_write(FILETYPE fd, unsigned char *buff, int siz) {
+- int w = write(fd, buff, siz);
+- if (w != siz) {
+- if (w >= 0) {
+- errno = ENOSPC;
++ int w;
++ while (1) {
++ w = write(fd, buff, siz);
++ if (w < 0 && errno == EINTR)
++ continue;
++ else if (w != siz) {
++ if (w >= 0) {
++ errno = ENOSPC;
++ }
++ return -1;
+ }
+- return -1;
++ return siz;
+ }
+- return siz;
+ }
+
+ /*
+@@ -627,8 +634,10 @@ static void close_unlink_port(TraceFileData *data)
+ */
+ static int wrap_file(TraceFileData *data) {
+ if (my_flush(data) < 0) {
++ int saved_errno = errno;
+ close(data->fd);
+ data->fd = -1;
++ errno = saved_errno;
+ return -1;
+ }
+ close(data->fd);
+@@ -644,12 +653,15 @@ static int wrap_file(TraceFileData *data) {
+ next_name(&data->wrap->del);
+ }
+ next_name(&data->wrap->cur);
++try_open:
+ data->fd = open(data->wrap->cur.name, O_WRONLY | O_TRUNC | O_CREAT
+ #ifdef O_BINARY
+ | O_BINARY
+ #endif
+ , 0777);
+ if (data->fd < 0) {
++ if (errno == EINTR)
++ goto try_open;
+ data->fd = -1;
+ return -1;
+ }
+--- a/lib/runtime_tools/doc/src/notes.xml
++++ b/lib/runtime_tools/doc/src/notes.xml
+@@ -32,6 +32,23 @@
+ <p>This document describes the changes made to the Runtime_Tools
+ application.</p>
+
++<section><title>Runtime_Tools 1.9.1</title>
++
++ <section><title>Fixed Bugs and Malfunctions</title>
++ <list>
++ <item>
++ <p>
++ The <c>trace_file_drv</c> did not handle <c>EINTR</c>
++ correct which caused it to fail when the runtime system
++ received a signal.</p>
++ <p>
++ Own Id: OTP-12890 Aux Id: seq12885 </p>
++ </item>
++ </list>
++ </section>
++
++</section>
++
+ <section><title>Runtime_Tools 1.9</title>
+
+ <section><title>Improvements and New Features</title>
+--- a/lib/runtime_tools/vsn.mk
++++ b/lib/runtime_tools/vsn.mk
+@@ -1 +1 @@
+-RUNTIME_TOOLS_VSN = 1.9
++RUNTIME_TOOLS_VSN = 1.9.1
+--- a/otp_versions.table
++++ b/otp_versions.table
+@@ -1,3 +1,4 @@
++OTP-18.0.2 : erts-7.0.2 runtime_tools-1.9.1 # asn1-4.0 common_test-1.11 compiler-6.0 cosEvent-2.2 cosEventDomain-1.2 cosFileTransfer-1.2 cosNotification-1.2 cosProperty-1.2 cosTime-1.2 cosTransactions-1.3 crypto-3.6 debugger-4.1 dialyzer-2.8 diameter-1.10 edoc-0.7.17 eldap-1.2 erl_docgen-0.4 erl_interface-3.8 et-1.5.1 eunit-2.2.10 gs-1.6 hipe-3.12 ic-4.4 inets-6.0 jinterface-1.6 kernel-4.0 megaco-3.18 mnesia-4.13 observer-2.1 odbc-2.11 orber-3.8 os_mon-2.4 ose-1.1 otp_mibs-1.1 parsetools-2.1 percept-0.8.11 public_key-1.0 reltool-0.7 sasl-2.5 snmp-5.2 ssh-4.0 ssl-7.0 stdlib-2.5 syntax_tools-1.7 test_server-3.9 tools-2.8 typer-0.9.9 webtool-0.9 wx-1.4 xmerl-1.3.8 :
+ OTP-18.0.1 : erts-7.0.1 # asn1-4.0 common_test-1.11 compiler-6.0 cosEvent-2.2 cosEventDomain-1.2 cosFileTransfer-1.2 cosNotification-1.2 cosProperty-1.2 cosTime-1.2 cosTransactions-1.3 crypto-3.6 debugger-4.1 dialyzer-2.8 diameter-1.10 edoc-0.7.17 eldap-1.2 erl_docgen-0.4 erl_interface-3.8 et-1.5.1 eunit-2.2.10 gs-1.6 hipe-3.12 ic-4.4 inets-6.0 jinterface-1.6 kernel-4.0 megaco-3.18 mnesia-4.13 observer-2.1 odbc-2.11 orber-3.8 os_mon-2.4 ose-1.1 otp_mibs-1.1 parsetools-2.1 percept-0.8.11 public_key-1.0 reltool-0.7 runtime_tools-1.9 sasl-2.5 snmp-5.2 ssh-4.0 ssl-7.0 stdlib-2.5 syntax_tools-1.7 test_server-3.9 tools-2.8 typer-0.9.9 webtool-0.9 wx-1.4 xmerl-1.3.8 :
+ OTP-18.0 : asn1-4.0 common_test-1.11 compiler-6.0 cosEvent-2.2 cosEventDomain-1.2 cosFileTransfer-1.2 cosNotification-1.2 cosProperty-1.2 cosTime-1.2 cosTransactions-1.3 crypto-3.6 debugger-4.1 dialyzer-2.8 diameter-1.10 edoc-0.7.17 eldap-1.2 erl_docgen-0.4 erl_interface-3.8 erts-7.0 et-1.5.1 eunit-2.2.10 gs-1.6 hipe-3.12 ic-4.4 inets-6.0 jinterface-1.6 kernel-4.0 megaco-3.18 mnesia-4.13 observer-2.1 odbc-2.11 orber-3.8 os_mon-2.4 ose-1.1 otp_mibs-1.1 parsetools-2.1 percept-0.8.11 public_key-1.0 reltool-0.7 runtime_tools-1.9 sasl-2.5 snmp-5.2 ssh-4.0 ssl-7.0 stdlib-2.5 syntax_tools-1.7 test_server-3.9 tools-2.8 typer-0.9.9 webtool-0.9 wx-1.4 xmerl-1.3.8 # :
+ OTP-17.5.6 : inets-5.10.9 ssh-3.2.4 ssl-6.0.1 # asn1-3.0.4 common_test-1.10.1 compiler-5.0.4 cosEvent-2.1.15 cosEventDomain-1.1.14 cosFileTransfer-1.1.16 cosNotification-1.1.21 cosProperty-1.1.17 cosTime-1.1.14 cosTransactions-1.2.14 crypto-3.5 debugger-4.0.3 dialyzer-2.7.4 diameter-1.9.2 edoc-0.7.16 eldap-1.1.1 erl_docgen-0.3.7 erl_interface-3.7.20 erts-6.4.1 et-1.5 eunit-2.2.9 gs-1.5.16 hipe-3.11.3 ic-4.3.6 jinterface-1.5.12 kernel-3.2 megaco-3.17.3 mnesia-4.12.5 observer-2.0.4 odbc-2.10.22 orber-3.7.1 os_mon-2.3.1 ose-1.0.2 otp_mibs-1.0.10 parsetools-2.0.12 percept-0.8.10 public_key-0.23 reltool-0.6.6 runtime_tools-1.8.16 sasl-2.4.1 snmp-5.1.2 stdlib-2.4 syntax_tools-1.6.18 test_server-3.8.1 tools-2.7.2 typer-0.9.8 webtool-0.8.10 wx-1.3.3 xmerl-1.3.7 :
diff --git a/main/erlang/0060-set-disksup_posix_only-to-true.patch b/main/erlang/0060-set-disksup_posix_only-to-true.patch
new file mode 100644
index 0000000000..a32c60c200
--- /dev/null
+++ b/main/erlang/0060-set-disksup_posix_only-to-true.patch
@@ -0,0 +1,22 @@
+--- otp_src_18.0/lib/os_mon/src/disksup.erl
++++ otp_src_18.0-fixed/lib/os_mon/src/disksup.erl
+@@ -87,7 +87,7 @@
+
+ param_default(disk_space_check_interval) -> 30;
+ param_default(disk_almost_full_threshold) -> 0.80;
+-param_default(disksup_posix_only) -> false.
++param_default(disksup_posix_only) -> true.
+
+ %%----------------------------------------------------------------------
+ %% gen_server callbacks
+--- otp_src_18.0/lib/os_mon/test/disksup_SUITE.erl
++++ otp_src_18.0-fixed/lib/os_mon/test/disksup_SUITE.erl
+@@ -337,7 +337,7 @@
+ [];
+ restart(Config) when is_list(Config) ->
+ ok = application:set_env(os_mon, start_disksup, true),
+- ok = application:set_env(os_mon, disksup_posix_only, false),
++ ok = application:set_env(os_mon, disksup_posix_only, true),
+ {ok, _Pid} = supervisor:restart_child(os_mon_sup, disksup),
+ ok.
+
diff --git a/main/erlang/APKBUILD b/main/erlang/APKBUILD
new file mode 100644
index 0000000000..c4e04a235e
--- /dev/null
+++ b/main/erlang/APKBUILD
@@ -0,0 +1,255 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Marlus Saraiva <marlus.saraiva@gmail.com>
+
+pkgname=erlang
+pkgver=18.0.2
+_srcver=18.0
+pkgrel=1
+pkgdesc="General-purpose programming language and runtime environment"
+url="http://www.erlang.org/"
+license="ASL 2.0"
+arch="all"
+depends="$pkgname-kernel $pkgname-stdlib $pkgname-compiler"
+makedepends="perl-dev zlib-dev ncurses-dev openssl-dev openjdk7 unixodbc-dev"
+install=""
+subpackages="$pkgname-dev
+ $pkgname-asn1:asn
+ $pkgname-common-test:common_test
+ $pkgname-compiler:compiler
+ $pkgname-cosevent:cos_event
+ $pkgname-coseventdomain:cos_event_domain
+ $pkgname-cosfiletransfer:cos_file_transfer
+ $pkgname-cosnotification:cos_notification
+ $pkgname-cosproperty:cos_property
+ $pkgname-costime:cos_time
+ $pkgname-costransaction:cos_transactions
+ $pkgname-crypto:crypto
+ $pkgname-debugger:debugger
+ $pkgname-dialyzer:dialyzer
+ $pkgname-diameter:diameter
+ $pkgname-edoc:edoc
+ $pkgname-eldap:eldap
+ $pkgname-erl-docgen:erl_docgen
+ $pkgname-erl-interface:erl_interface
+ $pkgname-erts:erts
+ $pkgname-et:et
+ $pkgname-eunit:eunit
+ $pkgname-gs:gs
+ $pkgname-hipe:hipe
+ $pkgname-ic:ic
+ $pkgname-inets:inets
+ $pkgname-jinterface:jinterface
+ $pkgname-kernel:kernel
+ $pkgname-megaco:megaco
+ $pkgname-mnesia:mnesia
+ $pkgname-observer:observer
+ $pkgname-odbc:odbc
+ $pkgname-orber:orber
+ $pkgname-os-mon:os_mon
+ $pkgname-ose:ose
+ $pkgname-otp-mibs:otp_mibs
+ $pkgname-parsetools:parsetools
+ $pkgname-percept:percept
+ $pkgname-public-key:public_key
+ $pkgname-reltool:reltool
+ $pkgname-runtime-tools:runtime_tools
+ $pkgname-sasl:sasl
+ $pkgname-snmp:snmp
+ $pkgname-ssh:ssh
+ $pkgname-ssl:ssl
+ $pkgname-stdlib:stdlib
+ $pkgname-syntax-tools:syntax_tools
+ $pkgname-test-server:test_server
+ $pkgname-tools:tools
+ $pkgname-typer:typer
+ $pkgname-webtool:webtool
+ $pkgname-xmerl:xmerl"
+# Patches 0001-0007 found: http://pkgs.fedoraproject.org/gitweb/?p=erlang.git;a=tree
+source="http://www.erlang.org/download/otp_src_$_srcver.tar.gz
+ 0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
+ 0002-Remove-rpath.patch
+ 0003-Do-not-install-C-sources.patch
+ 0004-Do-not-install-Java-sources.patch
+ 0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
+ 0006-Do-not-install-erlang-sources.patch
+ 0007-Split-off-webtool-dependency-from-tools.patch
+ 0010-fix-nteventlog-remove.patch
+ 0020-remove-private-unit32.patch
+ 0030-replace_glibc_check.patch
+ 0040-otp-update-version-18.0.1.patch
+ 0050-otp-update-version-18.0.2.patch
+ 0060-set-disksup_posix_only-to-true.patch"
+
+_builddir="$srcdir"/otp_src_$_srcver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ rm lib/os_mon/ebin/*
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ export CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
+ export PATH="/usr/lib/jvm/java-1.7-openjdk/bin:$PATH"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --host="$CHOST" \
+ --build="$CBUILD" \
+ --enable-threads \
+ --enable-shared-zlib \
+ --enable-ssl=dynamic-ssl-lib \
+ || return 1
+ make -j1 || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ rm -rf "$pkgdir"/usr/lib/erlang/lib/wx-*
+}
+
+_mv_erlang_lib() {
+ local lib=$1
+ depends="$pkgname"
+
+ mkdir -p "$subpkgdir"/usr/lib/erlang/lib
+ mv "$pkgdir"/usr/lib/erlang/lib/$lib-* "$subpkgdir"/usr/lib/erlang/lib/
+}
+
+asn() { _mv_erlang_lib asn1; }
+common_test() { _mv_erlang_lib common_test; }
+compiler() { _mv_erlang_lib compiler; }
+cos_event() { _mv_erlang_lib cosEvent; }
+cos_event_domain() { _mv_erlang_lib cosEventDomain; }
+cos_file_transfer() { _mv_erlang_lib cosFileTransfer; }
+cos_notification() { _mv_erlang_lib cosNotification; }
+cos_property() { _mv_erlang_lib cosProperty; }
+cos_time() { _mv_erlang_lib cosTime; }
+cos_transactions() { _mv_erlang_lib cosTransactions; }
+crypto() { _mv_erlang_lib crypto; }
+debugger() { _mv_erlang_lib debugger; }
+dialyzer() { _mv_erlang_lib dialyzer; }
+diameter() { _mv_erlang_lib diameter; }
+edoc() { _mv_erlang_lib edoc; }
+eldap() { _mv_erlang_lib eldap; }
+erl_docgen() { _mv_erlang_lib erl_docgen; }
+erl_interface() { _mv_erlang_lib erl_interface; }
+erts() { _mv_erlang_lib erts; }
+et() { _mv_erlang_lib et; }
+eunit() { _mv_erlang_lib eunit; }
+gs() { _mv_erlang_lib gs; }
+hipe() { _mv_erlang_lib hipe; }
+ic() { _mv_erlang_lib ic; }
+inets() { _mv_erlang_lib inets; }
+jinterface() { _mv_erlang_lib jinterface; }
+kernel() { _mv_erlang_lib kernel; }
+megaco() { _mv_erlang_lib megaco; }
+mnesia() { _mv_erlang_lib mnesia; }
+observer() { _mv_erlang_lib observer; }
+odbc() { _mv_erlang_lib odbc; }
+orber() { _mv_erlang_lib orber; }
+os_mon() { _mv_erlang_lib os_mon; }
+ose() { _mv_erlang_lib ose; }
+otp_mibs() { _mv_erlang_lib otp_mibs; }
+parsetools() { _mv_erlang_lib parsetools; }
+percept() { _mv_erlang_lib percept; }
+public_key() { _mv_erlang_lib public_key; }
+reltool() { _mv_erlang_lib reltool; }
+runtime_tools() { _mv_erlang_lib runtime_tools; }
+sasl() { _mv_erlang_lib sasl; }
+snmp() { _mv_erlang_lib snmp; }
+ssh() { _mv_erlang_lib ssh; }
+ssl() { _mv_erlang_lib ssl; }
+stdlib() { _mv_erlang_lib stdlib; }
+syntax_tools() { _mv_erlang_lib syntax_tools; }
+test_server() { _mv_erlang_lib test_server; }
+tools() { _mv_erlang_lib tools; }
+typer() { _mv_erlang_lib typer; }
+webtool() { _mv_erlang_lib webtool; }
+xmerl() { _mv_erlang_lib xmerl; }
+
+dev() {
+ local i= j=
+ depends="$pkgname=$pkgver-r$pkgrel $depends_dev"
+ pkgdesc="$pkgdesc (development files)"
+
+ cd "$pkgdir" || return 0
+ local libdirs=usr/
+ [ -d lib/ ] && libdirs="lib/ $libdirs"
+ for i in usr/include usr/lib/pkgconfig usr/share/aclocal\
+ usr/share/gettext usr/bin/*-config \
+ usr/share/vala/vapi usr/share/gir-[0-9]*\
+ usr/share/qt*/mkspecs \
+ usr/lib/qt*/mkspecs \
+ usr/lib/cmake \
+ $(find . -name include -type d) \
+ $(find $libdirs -name '*.[acho]' \
+ -o -name '*.prl' 2>/dev/null); do
+ if [ -e "$pkgdir/$i" ] || [ -L "$pkgdir/$i" ]; then
+ d="$subpkgdir/${i%/*}" # dirname $i
+ mkdir -p "$d"
+ mv "$pkgdir/$i" "$d"
+ rmdir "$pkgdir/${i%/*}" 2>/dev/null
+ fi
+ done
+ # move *.so links needed when linking the apps to -dev packages
+ for i in lib/*.so usr/lib/*.so; do
+ if [ -L "$i" ]; then
+ mkdir -p "$subpkgdir"/"${i%/*}"
+ mv "$i" "$subpkgdir/$i" || return 1
+ fi
+ done
+ return 0
+}
+
+
+md5sums="232acb0c278ee05c8d787cbaf6399be5 otp_src_18.0.tar.gz
+11d2bfea3dd3138409337d62f2348ff2 0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
+ef4b726309a749010553259080960753 0002-Remove-rpath.patch
+458118f96fb0c973a30630c070bd94aa 0003-Do-not-install-C-sources.patch
+1c3b158ac8408fced9a0f3630f4498f1 0004-Do-not-install-Java-sources.patch
+f4aa0cc27dc57ea4dcd57191b1948a4d 0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
+37861f7e1e02993018d6751d0d7bb83c 0006-Do-not-install-erlang-sources.patch
+b438c37818b5c82443682c3693dd7e53 0007-Split-off-webtool-dependency-from-tools.patch
+0dd300003ff68fc46dc3c839c2541d53 0010-fix-nteventlog-remove.patch
+062605d7f01f4685f1897ba2decc23a8 0020-remove-private-unit32.patch
+7a5c956b7bf79e34a0f980d1e2a65bee 0030-replace_glibc_check.patch
+e621bd76d8e19af2d60e4d1a11ddbca3 0040-otp-update-version-18.0.1.patch
+4ade398725d713b5cf577c4c072c2d95 0050-otp-update-version-18.0.2.patch
+d17fbaafa9f7820ade09b239c00aede6 0060-set-disksup_posix_only-to-true.patch"
+sha256sums="a0b69da34b4f218eb7d63d9e96fc120aa7257bb6c37a0f40fb388e188b4111aa otp_src_18.0.tar.gz
+536e78192f915733cbbb264883af6d9b11c9e70c2c4d3d825b58c4dbec36db86 0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
+b2e5844215d7f5f5026a77342dd698d16103cc726d23f8265bcc8399d1a82bb9 0002-Remove-rpath.patch
+81062f0eb9a72cbfac600fab56823161f92e1e5107b359f27f9f0ec511b8aec5 0003-Do-not-install-C-sources.patch
+2ed61274decb534ab4142bd0a2116a75e3fe82d33a8ff145524173ce5773b0e2 0004-Do-not-install-Java-sources.patch
+71c8a55fe036d5a04ba2c008b51d8950c3f18d83edaffb9bef2a9d19dd2f79f3 0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
+b810ef25504fbce3f9a0d4ae1e02fc4225b01fd68daa88566f6f8de37e26b351 0006-Do-not-install-erlang-sources.patch
+9704a53bc4bd6f5624f9ce3f201128204011f4579f19b547df74d92ae22777cf 0007-Split-off-webtool-dependency-from-tools.patch
+019c62ea3fee60068caa8c3152d7f96e76591fc5dc096abfcea48ec1593eb758 0010-fix-nteventlog-remove.patch
+0b63ff5ce4e642d4225d5cc4d52d88dd5daf83ce5a2549ba0e5a14ce05e17ac2 0020-remove-private-unit32.patch
+e3158dbb4bcb4677ceda39a374326c069de78a52e598ef8169a288b86a040a62 0030-replace_glibc_check.patch
+a014ad5c5da2512672af7a98ca072d6aa2615af2d1cc8e67a6cc611096cc922a 0040-otp-update-version-18.0.1.patch
+c51691da93e54e6b42c234706070dae74079cea00e6b720c9513663b2d7ed0a8 0050-otp-update-version-18.0.2.patch
+3ffda0b3acbde755b496c1a974c20e1ca580432c403944c1c16836f48e248429 0060-set-disksup_posix_only-to-true.patch"
+sha512sums="84ec2a3834270c1babe153572d6187faa36c12128e604037d55be01719788c0dd79d46769ea7090d530b746206a25fe02346b02849abee10ee41ed4ac7567c02 otp_src_18.0.tar.gz
+172f9b0f61748bf2f04737df0451bcc9c0812db0f365f0ef7c7c244fceb991987f79a5274eea578a89cc7d077f84645d1395d9dbcbf14010268b896a080c2ccf 0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
+97c40c185b71b23ffcb924639af390b9a0be897070e396a9413e193e6d43048dfe3b86bcd0c5598b81a66ce1349de9e09f5228a452b51b6612cd947bbafb6377 0002-Remove-rpath.patch
+1cae89d1e8f9d375ae08c7de2b8f7a5143bcded90eef878e97c408542a50e9a880166311820013301e46364be0ae090d3fc515b6f915ead14e787b98290beec1 0003-Do-not-install-C-sources.patch
+b174e3c9103aa26e3b4993ae77b849a55f733e6f8e5dd7bb641a8548aea7fcc91b99d772c91ff8864fff5c30b388438f8cb41d7ac941a86fc7bb1891f9838068 0004-Do-not-install-Java-sources.patch
+923addcb1f6472829ba13ccc91ad3cef161f269478404f0a19bc4997118e06edd7459011a60769eb393eac930f30d4bd6c5526301382a5f9815862237f4664d3 0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
+20a7200fe811b5256ef89bcbf19dd6ebb29c7c9109311f6d3adca2ade42c13ca63a28ff8f3e49308feaeda1e30a4e3a7e1083edf57b42219d0794dddc0f4a464 0006-Do-not-install-erlang-sources.patch
+d65fcfc3a9441941c6292c33d354964a82da11cc7a411dd0440719e490075ed588c1e70690e80650561749010d737394567f12ff73bd460f0d00c792c77cfae3 0007-Split-off-webtool-dependency-from-tools.patch
+b7387f92f8c27a0565c7885bba4b357183c62d422616e073bc5ffad338a0e22cb5165dcb3b95bf0b920ba00831599f2216027883f4be255aa6f6150b68b7a37c 0010-fix-nteventlog-remove.patch
+18f70c3a99ac8c44bc9d90dc3f0c072ad4df4ffe57a8d0677087c9e940ba138d7a7698d5cdbbe14875a6012d353a679fdb33d40fca3a3211f712af8c4b0cb0b4 0020-remove-private-unit32.patch
+b554882bee1a70322cc8c5b973986047deaf4528fe1371df39cf72b27b2497a859463bdf8847ea6ea96cb0caaa6bd143c96a5dee28839164a547a66a30fcffd0 0030-replace_glibc_check.patch
+5f6f5856fc60f7bc333fb2736bcf0d8dd475658621bb8ded8a9f664bb045ba5b0768ec990a05e5c35c5dfaa284f10567ff61b7a3c521a907553561c50c068ad1 0040-otp-update-version-18.0.1.patch
+cae82f07a8eb811f47a2a7553626d536e16a368fe8292dcee6c991f4f069e7821e0a2310cc86f65313b87ac6691a406ca92fc36b7ab32079b060813602c9f16a 0050-otp-update-version-18.0.2.patch
+f3c50f8610e08173c365a575737079b0259db6fc0dfa5b1be63c281b52358bbce9e2595132a8f6a06772785d7d38d108f8da8515e2f7706cd03b6585aab4d071 0060-set-disksup_posix_only-to-true.patch"