From 51b20f401e9de95dd303d039cf69b778ec2af343 Mon Sep 17 00:00:00 2001 From: Kip Cole Date: Fri, 9 Apr 2021 19:30:03 +1000 Subject: [PATCH] Support OTP 23 and later --- CHANGELOG.md | 8 ++++++++ c_src/Makefile | 11 ++++++++++- mix.exs | 6 +++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ddfed2..583b751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# Changelog for Ex_Cldr_Collation v0.4.0 + +This is the changelog for Cldr_collation v0.4.0 released on April 9th, 2021. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr_units/tags) + +### Bug Fixes + +* Fix compilation issues on OTP 23 and later. On these releases, `liberl_interface.a` doesn't exist and isn't required. Thanks to @zookzook for the report. + # Changelog for Ex_Cldr_Collation v0.3.0 This is the changelog for Cldr_collation v0.3.0 released on March 3rd, 2020. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr_units/tags) diff --git a/c_src/Makefile b/c_src/Makefile index 5e39f32..57e3c3c 100644 --- a/c_src/Makefile +++ b/c_src/Makefile @@ -25,7 +25,16 @@ else ifeq ($(UNAME_SYS), Linux) endif CFLAGS += -fPIC -I$(ERTS_INCLUDE_DIR) -I$(ERL_INTERFACE_INCLUDE_DIR) -LDLIBS += -L$(ERL_INTERFACE_LIB_DIR) -lerl_interface -lei + +# On OTP 23 and later, liberl_interface.a doesn't exist and +# isn't requried + +ifneq ("$(wildcard $(ERL_INTERFACE_LIB_DIR)/liberl_interface.a)","") + LDLIBS += -L$(ERL_INTERFACE_LIB_DIR) -lerl_interface -lei +else + LDLIBS += -L$(ERL_INTERFACE_LIB_DIR) -lei +endif + LDFLAGS += -shared ifeq ($(UNAME_SYS), Darwin) diff --git a/mix.exs b/mix.exs index 6d92737..534397a 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule CldrCollation.MixProject do use Mix.Project - @version "0.3.0" + @version "0.4.0" def project do [ @@ -38,7 +38,7 @@ defmodule CldrCollation.MixProject do defp deps do [ {:elixir_make, "~> 0.4", runtime: false}, - {:ex_doc, "~> 0.19", only: [:dev, :release], runtime: false, optional: true}, + {:ex_doc, "~> 0.19", runtime: false, optional: true}, {:ex_cldr, "~> 2.0"}, {:jason, "~> 1.0"} ] @@ -80,7 +80,7 @@ defmodule CldrCollation.MixProject do "LICENSE.md", "CHANGELOG.md" ], - skip_undefined_reference_warnings_on: ["changelog"] + skip_undefined_reference_warnings_on: ["changelog", "CHANGELOG.md"] ] end