diff -Nru erlang-p1-iconv-1.0.12/CHANGELOG.md erlang-p1-iconv-1.0.13/CHANGELOG.md --- erlang-p1-iconv-1.0.12/CHANGELOG.md 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/CHANGELOG.md 2021-11-23 16:00:02.000000000 +0000 @@ -1,3 +1,15 @@ +# Version 1.0.13 + +* Remove p1_utils dependency +* Parametrize the rebar binary (processone/fast_tls#51) +* Add Github Action to release in hex.pm when tagging +* Switch from Travis to Github Actions + +# Version 1.0.12 + +* Update p1_utils dependency +* Changing Travis.yml + # Version 1.0.11 * Updating p1_utils to version 1.0.19. diff -Nru erlang-p1-iconv-1.0.12/c_src/iconv.c erlang-p1-iconv-1.0.13/c_src/iconv.c --- erlang-p1-iconv-1.0.12/c_src/iconv.c 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/c_src/iconv.c 2021-11-23 16:00:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2017 ProcessOne, SARL. All Rights Reserved. + * Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff -Nru erlang-p1-iconv-1.0.12/debian/changelog erlang-p1-iconv-1.0.13/debian/changelog --- erlang-p1-iconv-1.0.12/debian/changelog 2021-01-31 17:31:31.000000000 +0000 +++ erlang-p1-iconv-1.0.13/debian/changelog 2021-12-18 11:44:25.000000000 +0000 @@ -1,3 +1,13 @@ +erlang-p1-iconv (1.0.13-1) unstable; urgency=medium + + * New upstream version 1.0.13 + * Updated Standards-Version: 4.6.0 (no changes needed) + * Updated debian/watch + * Updated Erlang dependencies + * Dropped (Build-)Depends on erlang-p1-utils + + -- Philipp Huebner Sat, 18 Dec 2021 12:44:25 +0100 + erlang-p1-iconv (1.0.12-3) unstable; urgency=medium * Corrected Multi-Arch setting to "allowed" diff -Nru erlang-p1-iconv-1.0.12/debian/control erlang-p1-iconv-1.0.13/debian/control --- erlang-p1-iconv-1.0.12/debian/control 2021-01-31 17:31:31.000000000 +0000 +++ erlang-p1-iconv-1.0.13/debian/control 2021-12-18 11:44:25.000000000 +0000 @@ -8,9 +8,8 @@ dh-rebar, erlang-base (>= 1:19.2), erlang-eunit, - erlang-p1-utils (>= 1.0.21), erlang-syntax-tools -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Vcs-Browser: https://salsa.debian.org/ejabberd-packaging-team/erlang-p1-iconv Vcs-Git: https://salsa.debian.org/ejabberd-packaging-team/erlang-p1-iconv.git Homepage: https://github.com/processone/iconv @@ -20,8 +19,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, erlang-base (>= 1:19.2) | ${erlang-abi:Depends}, - ${erlang:Depends}, - erlang-p1-utils (>= 1.0.21) + ${erlang:Depends} Multi-Arch: allowed Description: fast encoding conversion library for Erlang / Elixir This library is a native binding to the libiconv library. diff -Nru erlang-p1-iconv-1.0.12/debian/patches/remove-deps.diff erlang-p1-iconv-1.0.13/debian/patches/remove-deps.diff --- erlang-p1-iconv-1.0.12/debian/patches/remove-deps.diff 2021-01-31 17:31:31.000000000 +0000 +++ erlang-p1-iconv-1.0.13/debian/patches/remove-deps.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Description: remove deps in rebar.config - Without this patch, rebar would download and compile the listed deps - at compile time. -Author: Philipp Huebner - -Index: erlang-p1-iconv/rebar.config -=================================================================== ---- erlang-p1-iconv.orig/rebar.config -+++ erlang-p1-iconv/rebar.config -@@ -28,7 +28,6 @@ - - {port_specs, [{"priv/lib/iconv.so", ["c_src/iconv.c"]}]}. - --{deps, [{p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.21"}}}]}. - - {clean_files, ["c_src/iconv.gcda", "c_src/iconv.gcno"]}. - diff -Nru erlang-p1-iconv-1.0.12/debian/patches/series erlang-p1-iconv-1.0.13/debian/patches/series --- erlang-p1-iconv-1.0.12/debian/patches/series 2021-01-31 17:31:31.000000000 +0000 +++ erlang-p1-iconv-1.0.13/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -remove-deps.diff diff -Nru erlang-p1-iconv-1.0.12/debian/watch erlang-p1-iconv-1.0.13/debian/watch --- erlang-p1-iconv-1.0.12/debian/watch 2021-01-31 17:31:31.000000000 +0000 +++ erlang-p1-iconv-1.0.13/debian/watch 2021-12-18 11:44:25.000000000 +0000 @@ -1,3 +1,3 @@ version=4 opts="filenamemangle=s/.*\/v?(\d\S*)\.tar\.gz/erlang-p1-iconv_$1.tar.gz/" \ - https://github.com/processone/iconv/releases .*/v?(\d\S*)\.tar\.gz + https://github.com/processone/iconv/tags .*/v?(\d\S*)\.tar\.gz diff -Nru erlang-p1-iconv-1.0.12/LICENSE.txt erlang-p1-iconv-1.0.13/LICENSE.txt --- erlang-p1-iconv-1.0.12/LICENSE.txt 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/LICENSE.txt 2021-11-23 16:00:02.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright 2002-2017 ProcessOne SARL +Copyright 2002-2021 ProcessOne SARL Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff -Nru erlang-p1-iconv-1.0.12/Makefile erlang-p1-iconv-1.0.13/Makefile --- erlang-p1-iconv-1.0.12/Makefile 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/Makefile 2021-11-23 16:00:02.000000000 +0000 @@ -1,12 +1,12 @@ +REBAR ?= rebar + all: src src: - rebar get-deps compile + $(REBAR) get-deps + $(REBAR) compile clean: - rebar clean - -test: - rebar skip_deps=true eunit + $(REBAR) clean .PHONY: clean src diff -Nru erlang-p1-iconv-1.0.12/README.md erlang-p1-iconv-1.0.13/README.md --- erlang-p1-iconv-1.0.12/README.md 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/README.md 2021-11-23 16:00:02.000000000 +0000 @@ -1,6 +1,8 @@ # iconv -[![Build Status](https://travis-ci.org/processone/iconv.svg?branch=master)](https://travis-ci.org/processone/iconv) [![Coverage Status](https://coveralls.io/repos/processone/iconv/badge.svg?branch=master&service=github)](https://coveralls.io/github/processone/iconv?branch=master) [![Hex version](https://img.shields.io/hexpm/v/iconv.svg "Hex version")](https://hex.pm/packages/) +[![CI](https://github.com/processone/iconv/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/processone/iconv/actions/workflows/ci.yml) +[![Coverage Status](https://coveralls.io/repos/processone/iconv/badge.svg?branch=master&service=github)](https://coveralls.io/github/processone/iconv?branch=master) +[![Hex version](https://img.shields.io/hexpm/v/iconv.svg "Hex version")](https://hex.pm/packages/iconv) Fast encoding conversion library for Erlang / Elixir diff -Nru erlang-p1-iconv-1.0.12/rebar.config erlang-p1-iconv-1.0.13/rebar.config --- erlang-p1-iconv-1.0.12/rebar.config 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/rebar.config 2021-11-23 16:00:02.000000000 +0000 @@ -4,7 +4,7 @@ %%% Purpose : Rebar build script. Compliant with rebar and rebar3. %%% Created : 8 May 2013 by Evgeniy Khramtsov %%% -%%% Copyright (C) 2002-2017 ProcessOne, SARL. All Rights Reserved. +%%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. %%% %%% Licensed under the Apache License, Version 2.0 (the "License"); %%% you may not use this file except in compliance with the License. @@ -28,18 +28,15 @@ {port_specs, [{"priv/lib/iconv.so", ["c_src/iconv.c"]}]}. -{deps, [{p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.21"}}}]}. - {clean_files, ["c_src/iconv.gcda", "c_src/iconv.gcno"]}. {cover_enabled, true}. {cover_export_enabled, true}. +{coveralls_coverdata , "_build/test/cover/eunit.coverdata"}. +{coveralls_service_name , "github"}. {xref_checks, [undefined_function_calls, undefined_functions, deprecated_function_calls, deprecated_functions]}. -{profiles, [{test, [{erl_opts, [{src_dirs, ["src", "test"]}]}]}]}. -{plugins, []}. - %% Local Variables: %% mode: erlang %% End: diff -Nru erlang-p1-iconv-1.0.12/rebar.config.script erlang-p1-iconv-1.0.13/rebar.config.script --- erlang-p1-iconv-1.0.12/rebar.config.script 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/rebar.config.script 2021-11-23 16:00:02.000000000 +0000 @@ -4,7 +4,7 @@ %%% Purpose : Rebar build script. Compliant with rebar and rebar3. %%% Created : 8 May 2013 by Evgeniy Khramtsov %%% -%%% Copyright (C) 2002-2017 ProcessOne, SARL. All Rights Reserved. +%%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. %%% %%% Licensed under the Apache License, Version 2.0 (the "License"); %%% you may not use this file except in compliance with the License. @@ -39,8 +39,6 @@ lists:keymember(mix, 1, application:loaded_applications()) end, -JobId = case os:getenv("TRAVIS_JOB_ID") of false -> ""; V -> V end, - ModCfg0 = fun(F, Cfg, [Key|Tail], Op, Default) -> {OldVal,PartCfg} = case lists:keytake(Key, 1, Cfg) of {value, {_, V1}, V2} -> {V1, V2}; @@ -103,14 +101,34 @@ end, DepNames) end, +GithubConfig = case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of + {"true", Token} when is_list(Token) -> + CONFIG1 = [{coveralls_repo_token, Token}, + {coveralls_service_job_id, os:getenv("GITHUB_RUN_ID")}, + {coveralls_commit_sha, os:getenv("GITHUB_SHA")}, + {coveralls_service_number, os:getenv("GITHUB_RUN_NUMBER")}], + case os:getenv("GITHUB_EVENT_NAME") =:= "pull_request" + andalso string:tokens(os:getenv("GITHUB_REF"), "/") of + [_, "pull", PRNO, _] -> + [{coveralls_service_pull_request, PRNO} | CONFIG1]; + _ -> + CONFIG1 + end; + _ -> + [] +end, + Rules = [ {[port_env, "CFLAGS"], true, AppendStr(CfgCFlags), "$CFLAGS"}, {[port_env, "LDFLAGS"], true, AppendStr(CfgLDFlags), "$LDFLAGS"}, - {[post_hooks], CfgWithGCov == "true", + {[post_hooks], (not IsRebar3) and (CfgWithGCov == "true"), AppendList([{eunit, "gcov -o c_src iconv"}, {eunit, "mv *.gcov .eunit/"}]), []}, + {[post_hooks], IsRebar3 and (CfgWithGCov == "true"), + AppendList([{eunit, "gcov -o c_src iconv"}, + {eunit, "mv *.gcov _build/test/cover/"}]), []}, {[port_env, "LDFLAGS"], CfgWithGCov == "true", AppendStr("--coverage"), ""}, {[port_env, "CFLAGS"], CfgWithGCov == "true", @@ -118,23 +136,22 @@ {[deps], IsRebar3, Rebar3DepsFilter, []}, {[plugins], IsRebar3, - AppendList([rebar3_hex, pc]), []}, + AppendList([pc]), []}, {[provider_hooks], IsRebar3, AppendList([{pre, [ {compile, {pc, compile}}, {clean, {pc, clean}} ]}]), []}, - {[deps], os:getenv("TRAVIS") == "true", - AppendList([{coveralls, ".*", {git, "https://github.com/markusn/coveralls-erl.git", {tag, "v2.0.1"}}}]), []}, - {[post_hooks], os:getenv("TRAVIS") == "true", - AppendList([{eunit, "echo '\n%%! -pa .eunit/ deps/coveralls/ebin\nmain(_)->{ok,F}=file:open(\"erlang.json\",[write]),io:fwrite(F,\"~s\",[coveralls:convert_file(\".eunit/cover.coverdata\", \""++JobId++"\", \"travis-ci\",\"\")]).' > getcover.erl"}, - {eunit, "escript ./getcover.erl"}]), []}, + {[plugins], os:getenv("COVERALLS") == "true", + AppendList([{coveralls, {git, + "https://github.com/processone/coveralls-erl.git", + {branch, "addjsonfile"}}} ]), []}, {[deps], os:getenv("USE_GLOBAL_DEPS") /= false, GlobalDepsFilter, []} ], -Config = FilterConfig(FilterConfig, CONFIG, Rules), +Config = FilterConfig(FilterConfig, CONFIG, Rules) ++ GithubConfig, %io:format("Rules:~n~p~n~nCONFIG:~n~p~n~nConfig:~n~p~n", [Rules, CONFIG, Config]), diff -Nru erlang-p1-iconv-1.0.12/src/iconv_app.erl erlang-p1-iconv-1.0.13/src/iconv_app.erl --- erlang-p1-iconv-1.0.12/src/iconv_app.erl 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/src/iconv_app.erl 2021-11-23 16:00:02.000000000 +0000 @@ -5,7 +5,7 @@ %%% Created : 4 Apr 2013 by Evgeniy Khramtsov %%% %%% -%%% Copyright (C) 2002-2017 ProcessOne, SARL. All Rights Reserved. +%%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. %%% %%% Licensed under the Apache License, Version 2.0 (the "License"); %%% you may not use this file except in compliance with the License. diff -Nru erlang-p1-iconv-1.0.12/src/iconv.app.src erlang-p1-iconv-1.0.13/src/iconv.app.src --- erlang-p1-iconv-1.0.12/src/iconv.app.src 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/src/iconv.app.src 2021-11-23 16:00:02.000000000 +0000 @@ -5,7 +5,7 @@ %%% Created : 4 Apr 2013 by Evgeniy Khramtsov %%% %%% -%%% Copyright (C) 2002-2017 ProcessOne, SARL. All Rights Reserved. +%%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. %%% %%% Licensed under the Apache License, Version 2.0 (the "License"); %%% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ %%%---------------------------------------------------------------------- {application, iconv, [{description, "Fast encoding conversion library for Erlang / Elixir"}, - {vsn, "1.0.12"}, + {vsn, "1.0.13"}, {modules, []}, {registered, []}, {applications, [kernel, stdlib]}, diff -Nru erlang-p1-iconv-1.0.12/src/iconv.erl erlang-p1-iconv-1.0.13/src/iconv.erl --- erlang-p1-iconv-1.0.12/src/iconv.erl 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/src/iconv.erl 2021-11-23 16:00:02.000000000 +0000 @@ -5,7 +5,7 @@ %%% Created : 16 Feb 2003 by Alexey Shchepin %%% %%% -%%% Copyright (C) 2002-2017 ProcessOne, SARL. All Rights Reserved. +%%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. %%% %%% Licensed under the Apache License, Version 2.0 (the "License"); %%% you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ %%% API functions %%%=================================================================== load_nif() -> - NifFile = p1_nif_utils:get_so_path(?MODULE, [iconv], "iconv"), + NifFile = get_so_path(?MODULE, [iconv], "iconv"), case erlang:load_nif(NifFile, 0) of ok -> ok; @@ -55,6 +55,55 @@ convert(_From, _To, _String) -> erlang:nif_error(nif_not_loaded). +%% Code copied from p1_utils/src/p1_nif_utils.erl +get_so_path(ModuleName, AppNames, SoName) -> + PrivDir = first_match(fun(App) -> + case code:priv_dir(App) of + {error, _} -> none; + V -> V + end + end, AppNames), + case PrivDir of + none -> + Ext = case os:type() of + {win32, _} -> ".dll"; + _ -> ".so" + end, + SoFName = filename:join(["priv", "lib", SoName ++ Ext]), + LPath = first_match(fun(Path) -> + P = case filename:basename(Path) of + "ebin" -> filename:dirname(Path); + _ -> Path + end, + case filelib:is_file(filename:join([P, SoFName])) of + true -> + filename:join([P, "priv", "lib", SoName]); + _ -> + none + end + end, code:get_path()), + case LPath of + none -> + EbinDir = filename:dirname(code:which(ModuleName)), + AppDir = filename:dirname(EbinDir), + filename:join([AppDir, "priv", "lib", SoName]); + Val -> + Val + end; + V -> + filename:join([V, "lib", SoName]) + end. + +first_match(_Fun, []) -> + none; +first_match(Fun, [H|T]) -> + case Fun(H) of + none -> + first_match(Fun, T); + V -> + V + end. + %%%=================================================================== %%% Unit tests %%%=================================================================== diff -Nru erlang-p1-iconv-1.0.12/src/iconv_sup.erl erlang-p1-iconv-1.0.13/src/iconv_sup.erl --- erlang-p1-iconv-1.0.12/src/iconv_sup.erl 2020-12-10 09:40:12.000000000 +0000 +++ erlang-p1-iconv-1.0.13/src/iconv_sup.erl 2021-11-23 16:00:02.000000000 +0000 @@ -5,7 +5,7 @@ %%% Created : 4 Apr 2013 by Evgeniy Khramtsov %%% %%% -%%% Copyright (C) 2002-2017 ProcessOne, SARL. All Rights Reserved. +%%% Copyright (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. %%% %%% Licensed under the Apache License, Version 2.0 (the "License"); %%% you may not use this file except in compliance with the License. diff -Nru erlang-p1-iconv-1.0.12/test/unload_test.erl erlang-p1-iconv-1.0.13/test/unload_test.erl --- erlang-p1-iconv-1.0.12/test/unload_test.erl 1970-01-01 00:00:00.000000000 +0000 +++ erlang-p1-iconv-1.0.13/test/unload_test.erl 2021-11-23 16:00:02.000000000 +0000 @@ -0,0 +1,7 @@ +-module(unload_test). +-export([unload_test/0]). + +unload_test() -> + code:delete(fast_yaml), + code:purge(fast_yaml), + code:load_file(fast_yaml).