!8 Fix out-of-tree build

From: @chang111111 
Reviewed-by: @mailofzxf 
Signed-off-by: @mailofzxf
This commit is contained in:
openeuler-ci-bot 2025-04-18 01:20:13 +00:00 committed by Gitee
commit c1004e448e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 72 additions and 1 deletions

View File

@ -0,0 +1,65 @@
From 3ab54ca1b93c7e8c304850683c0da1bcce0f5fa1 Mon Sep 17 00:00:00 2001
From: changhan <changhan@xfusion.com>
Date: Thu, 17 Apr 2025 19:39:31 +0800
Subject: [PATCH] Fix-out-of-tree-build
---
src/Makefile.am | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index d32f52f..ac01ca4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -83,39 +83,39 @@ libmd.sym: libmd.map
$(AM_V_GEN) $(SED) -ne 's/^[[:space:]]\{1,\}\([A-Za-z0-9_]\{1,\}\);/\1/p' libmd.map > $@
md2hl.c: helper.c
- $(AM_V_GEN) $(SED) -e 's/hashinc/md2.h/g' -e 's/HASH/MD2/g' helper.c > $@
+ $(AM_V_GEN) $(SED) -e 's/hashinc/md2.h/g' -e 's/HASH/MD2/g' "$(srcdir)/helper.c" > $@
md4hl.c: helper.c
- $(AM_V_GEN) $(SED) -e 's/hashinc/md4.h/g' -e 's/HASH/MD4/g' helper.c > $@
+ $(AM_V_GEN) $(SED) -e 's/hashinc/md4.h/g' -e 's/HASH/MD4/g' "$(srcdir)/helper.c" > $@
md5hl.c: helper.c
- $(AM_V_GEN) $(SED) -e 's/hashinc/md5.h/g' -e 's/HASH/MD5/g' helper.c > $@
+ $(AM_V_GEN) $(SED) -e 's/hashinc/md5.h/g' -e 's/HASH/MD5/g' "$(srcdir)/helper.c" > $@
rmd160hl.c: helper.c
- $(AM_V_GEN) $(SED) -e 's/hashinc/rmd160.h/g' -e 's/HASH/RMD160/g' helper.c > $@
+ $(AM_V_GEN) $(SED) -e 's/hashinc/rmd160.h/g' -e 's/HASH/RMD160/g' "$(srcdir)/helper.c" > $@
sha1hl.c: helper.c
- $(AM_V_GEN) $(SED) -e 's/hashinc/sha1.h/g' -e 's/HASH/SHA1/g' helper.c > $@
+ $(AM_V_GEN) $(SED) -e 's/hashinc/sha1.h/g' -e 's/HASH/SHA1/g' "$(srcdir)/helper.c" > $@
sha224hl.c: helper.c
$(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA224/g' \
- -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@
+ -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' "$(srcdir)/helper.c" > $@
sha256hl.c: helper.c
$(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA256/g' \
- -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@
+ -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' "$(srcdir)/helper.c" > $@
sha384hl.c: helper.c
$(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA384/g' \
- -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@
+ -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' "$(srcdir)/helper.c" > $@
sha512hl.c: helper.c
$(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA512/g' \
- -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' helper.c > $@
+ -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' "$(srcdir)/helper.c" > $@
sha512_256hl.c: helper.c
$(AM_V_GEN) $(SED) -e 's/hashinc/sha2.h/g' -e 's/HASH/SHA512_256/g' \
- -e 's/SHA512_256_CTX/SHA2_CTX/g' helper.c > $@
+ -e 's/SHA512_256_CTX/SHA2_CTX/g' "$(srcdir)/helper.c" > $@
runtimelibdir = $(libdir)
--
2.33.0

View File

@ -1,7 +1,7 @@
Summary: Library that provides message digest functions from BSD systems
Name: libmd
Version: 1.1.0
Release: 2
Release: 3
# Breakdown in COPYING file of libmd release tarball
License: BSD-2-Clause AND BSD-3-Clause AND ISC AND Beerware
URL: https://www.hadrons.org/software/libmd/
@ -12,6 +12,8 @@ BuildRequires: gnupg2
BuildRequires: gcc
BuildRequires: make
Patch1: backport-fix-out-of-tree-build.patch
%description
The libmd library provides a few message digest ("hash") functions, as
found on various BSD systems, either on their libc or on a library with
@ -34,6 +36,7 @@ gpg2 --homedir="${workdir}" --yes --output="${workring}" --dearmor '%{SOURCE2}'
gpgv2 --homedir="${workdir}" --keyring="${workring}" '%{SOURCE1}' '%{SOURCE0}'
rm --recursive --force ${workdir}
%setup -q
%autosetup -n %{name}-%{version} -p1
%build
%configure --disable-static
@ -85,6 +88,9 @@ make check
%{_mandir}/man3/sha2.3*
%changelog
* Thu Apr 17 2025 changhan <changhan@xfusion.com> - 1.1.0-3
- Fix out-of-tree build
* Thu Dec 12 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.1.0-2
- Fix license desc remove public domain