svn commit: r362452 - in head: contrib/xz/src/liblzma/check lib/liblzma share/mk
Xin LI
delphij at FreeBSD.org
Sat Jun 20 21:32:08 UTC 2020
Author: delphij
Date: Sat Jun 20 21:32:07 2020
New Revision: 362452
URL: https://svnweb.freebsd.org/changeset/base/362452
Log:
liblzma: Make liblzma use libmd implementation of SHA256.
MFC after: 2 weeks
PR: 200142
Deleted:
head/contrib/xz/src/liblzma/check/sha256.c
Modified:
head/lib/liblzma/Makefile
head/lib/liblzma/Symbol.map
head/lib/liblzma/config.h
head/share/mk/src.libnames.mk
Modified: head/lib/liblzma/Makefile
==============================================================================
--- head/lib/liblzma/Makefile Sat Jun 20 21:06:02 2020 (r362451)
+++ head/lib/liblzma/Makefile Sat Jun 20 21:32:07 2020 (r362452)
@@ -78,8 +78,7 @@ SRCS+= common.c \
.PATH: ${LZMADIR}/check
SRCS+= check.c \
crc32_table.c \
- crc64_table.c \
- sha256.c
+ crc64_table.c
.if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386"
SRCS+= crc32_x86.S \
crc64_x86.S
@@ -125,11 +124,11 @@ SRCS+= simple_coder.c \
.PATH: ${LZMADIR}
-VERSION_MAJOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MAJOR" {print $$3 } ' \
+VERSION_MAJOR!= sed -n '/define.*LZMA_VERSION_MAJOR/{s,[^0-9.],,gp;q;}' \
${LZMADIR}/api/lzma/version.h
-VERSION_MINOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MINOR" {print $$3 } ' \
+VERSION_MINOR!= sed -n '/define.*LZMA_VERSION_MINOR/{s,[^0-9.],,gp;q;}' \
${LZMADIR}/api/lzma/version.h
-VERSION_PATCH!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_PATCH" {print $$3 } ' \
+VERSION_PATCH!= sed -n '/define.*LZMA_VERSION_PATCH/{s,[^0-9.],,gp;q;}' \
${LZMADIR}/api/lzma/version.h
WARNS?= 3
@@ -147,7 +146,7 @@ CFLAGS+= -DHAVE_CONFIG_H \
-I${LZMADIR}/simple \
-I${LZMADIR:H}/common
-LIBADD+= pthread
+LIBADD+= md pthread
VERSION_DEF= ${.CURDIR}/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
@@ -160,10 +159,11 @@ FILESDIR= ${LIBDATADIR}/pkgconfig
liblzma.pc: liblzma.pc.in
sed -e 's, at prefix@,/usr,g ; \
- s, at exec_prefix@,/usr,g ; \
+ s, at exec_prefix@,/usr,g ; \
s, at libdir@,/usr/lib,g ; \
s, at includedir@,/usr/include,g ; \
- s, at PACKAGE_URL@,http://tukaani.org/xz/,g ; \
+ s, at LIBS@,-pthread -lmd,g ; \
+ s, at PACKAGE_URL@,https://tukaani.org/xz/,g ; \
s, at PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \
s, at PTHREAD_CFLAGS@,,g ; \
s, at PTHREAD_LIBS@,,g' ${.ALLSRC} > ${.TARGET}
Modified: head/lib/liblzma/Symbol.map
==============================================================================
--- head/lib/liblzma/Symbol.map Sat Jun 20 21:06:02 2020 (r362451)
+++ head/lib/liblzma/Symbol.map Sat Jun 20 21:32:07 2020 (r362452)
@@ -180,9 +180,6 @@ XZprivate_1.0 {
lzma_raw_coder_memusage;
lzma_raw_decoder_init;
lzma_raw_encoder_init;
- lzma_sha256_finish;
- lzma_sha256_init;
- lzma_sha256_update;
lzma_simple_arm_decoder_init;
lzma_simple_arm_encoder_init;
lzma_simple_armthumb_decoder_init;
Modified: head/lib/liblzma/config.h
==============================================================================
--- head/lib/liblzma/config.h Sat Jun 20 21:06:02 2020 (r362451)
+++ head/lib/liblzma/config.h Sat Jun 20 21:32:07 2020 (r362452)
@@ -211,16 +211,13 @@
/* #undef HAVE_SHA256INIT */
/* Define to 1 if the system has the type `SHA256_CTX'. */
-/* FreeBSD - disabled libmd SHA256 for now */
-/* #undef HAVE_SHA256_CTX */
+#define HAVE_SHA256_CTX 1
/* Define to 1 if you have the <sha256.h> header file. */
-/* FreeBSD - disabled libmd SHA256 for now */
-/* #undef HAVE_SHA256_H */
+#define HAVE_SHA256_H 1
/* Define to 1 if you have the `SHA256_Init' function. */
-/* FreeBSD - disabled libmd SHA256 for now */
-/* #undef HAVE_SHA256_INIT */
+#define HAVE_SHA256_INIT 1
/* Define to 1 if the system has the type `SHA2_CTX'. */
/* #undef HAVE_SHA2_CTX */
Modified: head/share/mk/src.libnames.mk
==============================================================================
--- head/share/mk/src.libnames.mk Sat Jun 20 21:06:02 2020 (r362451)
+++ head/share/mk/src.libnames.mk Sat Jun 20 21:32:07 2020 (r362452)
@@ -350,7 +350,7 @@ _DP_heimipcs= heimbase roken pthread
_DP_kafs5= asn1 krb5 roken
_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc
_DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err
-_DP_lzma= pthread
+_DP_lzma= md pthread
_DP_ucl= m
_DP_vmmapi= util
_DP_opencsd= cxxrt
More information about the svn-src-all
mailing list