From 548731d734d92d75eb99b0510377f29f5890a7af Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Fri, 19 May 2023 15:14:20 +0800 Subject: [PATCH] fix build error for loongarch64 --- 0001-fix-build-error-for-loongarch64.patch | 19 +++++++++++++++++++ erlang-erlsyslog.spec | 9 ++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 0001-fix-build-error-for-loongarch64.patch diff --git a/0001-fix-build-error-for-loongarch64.patch b/0001-fix-build-error-for-loongarch64.patch new file mode 100644 index 0000000..d2627b6 --- /dev/null +++ b/0001-fix-build-error-for-loongarch64.patch @@ -0,0 +1,19 @@ +From a082da6b4a09a6ba18c9016ff65da888a7e100ec Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Fri, 19 May 2023 07:07:56 +0000 +Subject: [PATCH] fix build error for loongarch64 + +--- + rebar.config | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rebar.config b/rebar.config +index 47c1534..cf97e5b 100644 +--- a/rebar.config ++++ b/rebar.config +@@ -1 +1,2 @@ + {post_hooks, [{compile, "sed -i -e \"s,%VSN%,${VSN},g\" ebin/erlsyslog.app"}]}. ++{port_env, [{"DRV_LDFLAGS", "-shared -L/usr/lib64/erlang/lib/erl_interface-4.0.3.1/lib -lei"}]}. +-- +2.33.0 + diff --git a/erlang-erlsyslog.spec b/erlang-erlsyslog.spec index 2cd5aac..bde70e0 100644 --- a/erlang-erlsyslog.spec +++ b/erlang-erlsyslog.spec @@ -2,17 +2,21 @@ %global upstream lemenkov Name: erlang-%{realname} Version: 0.8.0 -Release: 1 +Release: 2 Summary: Syslog facility for Erlang License: MIT URL: https://github.com/%{upstream}/%{realname} Source0: https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz BuildRequires: erlang-rebar gcc +Patch0: 0001-fix-build-error-for-loongarch64.patch %description Syslog facility for Erlang. %prep %setup -q -n %{realname}-%{version} +%ifarch loongarch64 +%patch0 -p1 +%endif %build %{erlang_compile} @@ -28,5 +32,8 @@ Syslog facility for Erlang. %{erlang_appdir}/ %changelog +* Mon May 8 2023 Wenlong Zhang - 0.8.0-2 +- fix build error for loongarch64 + * Sat Sep 19 2020 huanghaitao - 0.8.0-1 - package init