Module Name:    src
Committed By:   joerg
Date:           Tue Sep 25 05:42:08 UTC 2018

Modified Files:
        src/external/public-domain/xz: Makefile Makefile.inc
        src/external/public-domain/xz/bin/xz: Makefile
        src/external/public-domain/xz/include: config.h
        src/external/public-domain/xz/lib: Makefile
        src/tools: Makefile
Added Files:
        src/tools/xz-bin: Makefile
        src/tools/xz-include: Makefile
        src/tools/xz-lib: Makefile

Log Message:
Update build glue for xz-5.2.4. Hook up tools version.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/public-domain/xz/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/public-domain/xz/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/external/public-domain/xz/bin/xz/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/public-domain/xz/include/config.h
cvs rdiff -u -r1.9 -r1.10 src/external/public-domain/xz/lib/Makefile
cvs rdiff -u -r1.195 -r1.196 src/tools/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/xz-bin/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/xz-include/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/xz-lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/public-domain/xz/Makefile
diff -u src/external/public-domain/xz/Makefile:1.1 src/external/public-domain/xz/Makefile:1.2
--- src/external/public-domain/xz/Makefile:1.1	Tue Nov  2 16:34:36 2010
+++ src/external/public-domain/xz/Makefile	Tue Sep 25 05:42:08 2018
@@ -1,5 +1,17 @@
-# $NetBSD: Makefile,v 1.1 2010/11/02 16:34:36 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2018/09/25 05:42:08 joerg Exp $
 
 SUBDIR+=	lib .WAIT bin
 
+run-configure:
+	[ ! -d tmp ] || rm -r tmp
+	mkdir -p tmp
+	cd tmp && CONFIG_SITE= ${XZSRCDIR:Q}/configure --enable-external-sha256 \
+	    CC=${CC:Q} CFLAGS=${CFLAGS:N-Werror:Q} \
+	    CPPFLAGS=${CPPFLAGS:N-std=c++11:Q} LDFLAGS=${LDFLAGS:Q} LD=${LD:Q} \
+	    --target=${MACHINE_GNU_PLATFORM} --host=${MACHINE_GNU_PLATFORM}
+	mv tmp/config.h ${XZINCDIR:Q}
+	printf '#include <sys/endian.h>\n#if BYTE_ORDER == BIG_ENDIAN\n#  define WORDS_BIGENDIAN 1\n#endif\n' >> ${XZINCDIR:Q}/config.h
+
+.include "Makefile.inc"
+
 .include <bsd.subdir.mk>

Index: src/external/public-domain/xz/Makefile.inc
diff -u src/external/public-domain/xz/Makefile.inc:1.3 src/external/public-domain/xz/Makefile.inc:1.4
--- src/external/public-domain/xz/Makefile.inc:1.3	Sun Oct 16 17:24:32 2011
+++ src/external/public-domain/xz/Makefile.inc	Tue Sep 25 05:42:08 2018
@@ -1,10 +1,16 @@
-# $NetBSD: Makefile.inc,v 1.3 2011/10/16 17:24:32 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.4 2018/09/25 05:42:08 joerg Exp $
+
+.include <bsd.own.mk>
 
 XZHOMEPAGE=	http://tukaani.org/xz/
-XZVERSION=	5.0.0
+XZVERSION=	5.2.4
 
 XZSRCDIR:=	${.PARSEDIR}/dist
+.if defined(HOSTLIB) || defined(HOSTPROG)
+XZINCDIR!=	cd ${NETBSDSRCDIR}/tools/xz-include && ${PRINTOBJDIR}
+.else
 XZINCDIR:=	${.PARSEDIR}/include
+.endif
 
 CPPFLAGS+=	-I${XZINCDIR}
 CPPFLAGS+=	-I${XZSRCDIR}/src/common

Index: src/external/public-domain/xz/bin/xz/Makefile
diff -u src/external/public-domain/xz/bin/xz/Makefile:1.3 src/external/public-domain/xz/bin/xz/Makefile:1.4
--- src/external/public-domain/xz/bin/xz/Makefile:1.3	Tue Apr 21 10:12:04 2015
+++ src/external/public-domain/xz/bin/xz/Makefile	Tue Sep 25 05:42:08 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/04/21 10:12:04 christos Exp $
+# $NetBSD: Makefile,v 1.4 2018/09/25 05:42:08 joerg Exp $
 
 PROG=	xz
 BINDIR=	/usr/bin
@@ -13,16 +13,17 @@ USETBL=	yes
 .include <bsd.init.mk>
 
 CPPFLAGS+=	-DPACKAGE=\"xz\"
+.if !defined(HOST_PROG)
 CPPFLAGS+=	-DENABLE_NLS -DLOCALEDIR=\"/usr/share/locale\"
+.endif
 
-DPADD+=	${LIBLZMA} ${LIBINTL}
-LDADD+=	-llzma -lintl
-
+.if !defined(HOSTPROG)
 LINKS+=	${BINDIR}/xz ${BINDIR}/lzcat
 LINKS+=	${BINDIR}/xz ${BINDIR}/lzma
 LINKS+=	${BINDIR}/xz ${BINDIR}/unlzma
 LINKS+=	${BINDIR}/xz ${BINDIR}/unxz
 LINKS+=	${BINDIR}/xz ${BINDIR}/xzcat
+.endif
 
 MLINKS+=	xz.1 lzcat.1
 MLINKS+=	xz.1 lzma.1
@@ -40,7 +41,13 @@ FILESNAME_${XZSRCDIR}/po/${lang}.gmo=	xz
 .endfor
 .endif
 
-LDADD+=	-lpthread
-DPADD+=	${LIBPTHREAD}
-
+.if defined(HOSTPROG)
+HOST_CPPFLAGS+=	${CPPFLAGS:N-Wp,-iremap,*}
+XZLIBDIR!=	cd ${NETBSDSRCDIR}/tools/xz-lib && ${PRINTOBJDIR}
+LDADD+=	-L${XZLIBDIR} -llzma
+DPADD+=	${XZLIBDIR}/liblzma.a
+.else
+DPADD+=	${LIBLZMA} ${LIBINTL} ${LIBPTHREAD}
+LDADD+=	-llzma -lintl -lpthread
 .include <bsd.prog.mk>
+.endif

Index: src/external/public-domain/xz/include/config.h
diff -u src/external/public-domain/xz/include/config.h:1.8 src/external/public-domain/xz/include/config.h:1.9
--- src/external/public-domain/xz/include/config.h:1.8	Sat Feb  6 20:23:39 2016
+++ src/external/public-domain/xz/include/config.h	Tue Sep 25 05:42:08 2018
@@ -23,17 +23,20 @@
 /* Define to 1 if you have the <byteswap.h> header file. */
 /* #undef HAVE_BYTESWAP_H */
 
+/* Define to 1 if Capsicum is available. */
+/* #undef HAVE_CAPSICUM */
+
 /* Define to 1 if the system has the type `CC_SHA256_CTX'. */
 /* #undef HAVE_CC_SHA256_CTX */
 
 /* Define to 1 if you have the `CC_SHA256_Init' function. */
 /* #undef HAVE_CC_SHA256_INIT */
 
-/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
    CoreFoundation framework. */
 /* #undef HAVE_CFLOCALECOPYCURRENT */
 
-/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
    the CoreFoundation framework. */
 /* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
 
@@ -64,6 +67,9 @@
    to 0 if you don't. */
 #define HAVE_DECL_PROGRAM_INVOCATION_NAME 0
 
+/* Define to 1 if any of HAVE_DECODER_foo have been defined. */
+#define HAVE_DECODERS 1
+
 /* Define to 1 if arm decoder is enabled. */
 #define HAVE_DECODER_ARM 1
 
@@ -94,6 +100,9 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #define HAVE_DLFCN_H 1
 
+/* Define to 1 if any of HAVE_ENCODER_foo have been defined. */
+#define HAVE_ENCODERS 1
+
 /* Define to 1 if arm encoder is enabled. */
 #define HAVE_ENCODER_ARM 1
 
@@ -178,15 +187,9 @@
 /* Define to 1 to enable hc4 match finder. */
 #define HAVE_MF_HC4 1
 
-/* Define to 1 if you have the <minix/sha2.h> header file. */
-/* #undef HAVE_MINIX_SHA2_H */
-
 /* Define to 1 if getopt.h declares extern int optreset. */
 #define HAVE_OPTRESET 1
 
-/* Define to 1 if you have the `pipe2' function. */
-#define HAVE_PIPE2 1
-
 /* Define to 1 if you have the `posix_fadvise' function. */
 #define HAVE_POSIX_FADVISE 1
 
@@ -194,7 +197,7 @@
 #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
 
 /* Have PTHREAD_PRIO_INHERIT. */
-/* #undef HAVE_PTHREAD_PRIO_INHERIT */
+#define HAVE_PTHREAD_PRIO_INHERIT 1
 
 /* Define to 1 if you have the `SHA256Init' function. */
 /* #undef HAVE_SHA256INIT */
@@ -250,6 +253,9 @@
 /* Define to 1 if you have the <sys/byteorder.h> header file. */
 /* #undef HAVE_SYS_BYTEORDER_H */
 
+/* Define to 1 if you have the <sys/capsicum.h> header file. */
+/* #undef HAVE_SYS_CAPSICUM_H */
+
 /* Define to 1 if you have the <sys/endian.h> header file. */
 #define HAVE_SYS_ENDIAN_H 1
 
@@ -287,6 +293,9 @@
 /* Define to 1 if the system has the type `_Bool'. */
 #define HAVE__BOOL 1
 
+/* Define to 1 if you have the `_futime' function. */
+/* #undef HAVE__FUTIME */
+
 /* Define to 1 if _mm_movemask_epi8 is available. */
 #define HAVE__MM_MOVEMASK_EPI8 1
 
@@ -317,16 +326,16 @@
 #define PACKAGE_NAME "XZ Utils"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "XZ Utils 5.2.1"
+#define PACKAGE_STRING "XZ Utils 5.2.4"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "xz"
 
 /* Define to the home page for this package. */
-#define PACKAGE_URL "http://tukaani.org/xz/";
+#define PACKAGE_URL "https://tukaani.org/xz/";
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "5.2.1"
+#define PACKAGE_VERSION "5.2.4"
 
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
@@ -347,6 +356,10 @@
 /* #undef TUKLIB_CPUCORES_PSTAT_GETDYNAMIC */
 
 /* Define to 1 if the number of available CPU cores can be detected with
+   sched_getaffinity() */
+/* #undef TUKLIB_CPUCORES_SCHED_GETAFFINITY */
+
+/* Define to 1 if the number of available CPU cores can be detected with
    sysconf(_SC_NPROCESSORS_ONLN) or sysconf(_SC_NPROC_ONLN). */
 /* #undef TUKLIB_CPUCORES_SYSCONF */
 
@@ -358,7 +371,7 @@
    32-bit integers. */
 #include <machine/types.h>
 #ifdef __NO_STRICT_ALIGNMENT
-# define TUKLIB_FAST_UNALIGNED_ACCESS 1
+#define TUKLIB_FAST_UNALIGNED_ACCESS 1
 #endif
 
 /* Define to 1 if the amount of physical memory can be detected with
@@ -412,9 +425,8 @@
 
 
 /* Version number of package */
-#define VERSION "5.2.1"
+#define VERSION "5.2.4"
 
-#ifndef __NetBSD__
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */
 #if defined AC_APPLE_UNIVERSAL_BUILD
@@ -426,12 +438,6 @@
 /* #  undef WORDS_BIGENDIAN */
 # endif
 #endif
-#else
-# include <sys/endian.h>
-# if BYTE_ORDER == BIG_ENDIAN
-#  define WORDS_BIGENDIAN 1
-# endif
-#endif
 
 /* Enable large inode numbers on Mac OS X 10.5.  */
 #ifndef _DARWIN_USE_64_BIT_INODE
@@ -500,3 +506,8 @@
 /* Define to the type of an unsigned integer type wide enough to hold a
    pointer, if such a type exists, and if the system does not define it. */
 /* #undef uintptr_t */
+#include <sys/endian.h>
+#undef WORDS_BIGENDIAN
+#if BYTE_ORDER == BIG_ENDIAN
+#  define WORDS_BIGENDIAN 1
+#endif

Index: src/external/public-domain/xz/lib/Makefile
diff -u src/external/public-domain/xz/lib/Makefile:1.9 src/external/public-domain/xz/lib/Makefile:1.10
--- src/external/public-domain/xz/lib/Makefile:1.9	Sat Jun  2 01:40:52 2018
+++ src/external/public-domain/xz/lib/Makefile	Tue Sep 25 05:42:08 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2018/06/02 01:40:52 christos Exp $
+# $NetBSD: Makefile,v 1.10 2018/09/25 05:42:08 joerg Exp $
 
 .include <bsd.init.mk>
 
@@ -19,6 +19,7 @@ INCSDIR=	/usr/include/lzma
 LDFLAGS+=	-Wl,-z,defs
 .endif
 
+CPPFLAGS+=	-I${XZSRCDIR}/src/common
 CPPFLAGS+=	-I${XZSRCDIR}/src/liblzma/check
 CPPFLAGS+=	-I${XZSRCDIR}/src/liblzma/common
 CPPFLAGS+=	-I${XZSRCDIR}/src/liblzma/delta
@@ -36,6 +37,10 @@ SRCS+=	tuklib_physmem.c tuklib_cpucores.
 SRCS+=	check.c crc32_table.c crc64_table.c
 SRCS+=	crc32_fast.c crc64_fast.c
 
+.if defined(HOSTLIB)
+SRCS+=	sha256.c
+.endif
+
 .PATH:	${XZSRCDIR}/src/liblzma/common
 SRCS+=	common.c block_util.c easy_preset.c filter_common.c \
 	hardware_physmem.c hardware_cputhreads.c index.c \
@@ -44,7 +49,7 @@ SRCS+=	common.c block_util.c easy_preset
 	block_header_encoder.c easy_buffer_encoder.c easy_encoder.c \
 	easy_encoder_memusage.c filter_buffer_encoder.c \
 	filter_encoder.c filter_flags_encoder.c index_encoder.c \
-	stream_buffer_encoder.c stream_encoder.c stream_encoder_mt.c \
+	stream_buffer_encoder.c stream_encoder.c \
 	stream_flags_encoder.c vli_encoder.c outqueue.c \
 	alone_decoder.c auto_decoder.c block_buffer_decoder.c \
 	block_decoder.c block_header_decoder.c easy_decoder_memusage.c \
@@ -52,6 +57,10 @@ SRCS+=	common.c block_util.c easy_preset
 	index_decoder.c index_hash.c stream_buffer_decoder.c \
 	stream_decoder.c stream_flags_decoder.c vli_decoder.c
 
+.if !defined(HOSTLIB)
+SRCS+=	 stream_encoder_mt.c
+.endif
+
 .PATH:	${XZSRCDIR}/src/liblzma/delta
 SRCS+=	delta_common.c delta_encoder.c delta_decoder.c
 
@@ -81,7 +90,7 @@ liblzma.pc:	${XZSRCDIR}/src/liblzma/libl
 	    -e 's,@includedir@,/usr/include,' \
 	    -e 's,@PACKAGE_HOMEPAGE@,${XZHOMEPAGE:Q},' \
 	    -e 's,@PACKAGE_VERSION@,${XZVERSION:Q},' \
-	    -e 's,@PTHREAD_CFLAGS@ @PTHREAD_LIBS@,,' \
+	    -e 's,@PTHREAD_CFLAGS@ @PTHREAD_LIBS@,-lpthread,' \
 	    < ${XZSRCDIR}/src/liblzma/liblzma.pc.in \
 	    > ${.TARGET}.tmp && \
 	mv -f ${.TARGET}.tmp ${.TARGET}
@@ -92,6 +101,11 @@ COPTS += ${${ACTIVE_CC} == "gcc":? -Wno-
 
 CLEANFILES+=	liblzma.pc
 
+.if defined(HOSTLIB)
+HOST_CPPFLAGS+=	${CPPFLAGS:N-Wp,-iremap,*}
+.include <bsd.hostlib.mk>
+.else
 LIBDPLIBS+=	pthread ${NETBSDSRCDIR}/lib/libpthread
-
 .include <bsd.lib.mk>
+.endif
+

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.195 src/tools/Makefile:1.196
--- src/tools/Makefile:1.195	Sat Aug 11 19:46:03 2018
+++ src/tools/Makefile	Tue Sep 25 05:42:08 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.195 2018/08/11 19:46:03 christos Exp $
+#	$NetBSD: Makefile,v 1.196 2018/09/25 05:42:08 joerg Exp $
 
 .include <bsd.own.mk>
 .include <bsd.endian.mk>
@@ -100,8 +100,8 @@ SUBDIR+= cap_mkdb crunchgen ctags gencat
 		makewhatis mtree nbperf .WAIT uudecode
 .endif
 
-SUBDIR+= cat rpcgen join lorder m4 mkdep tsort .WAIT yacc .WAIT awk .WAIT lex
-SUBDIR+= grep
+SUBDIR+= cat rpcgen join lorder m4 mkdep tsort xz-include .WAIT yacc .WAIT awk .WAIT lex
+SUBDIR+= grep xz-lib
 
 .if ${TOOLS_BUILDRUMP} == "no"
 SUBDIR += .WAIT texinfo \
@@ -119,7 +119,7 @@ SUBDIR += .WAIT texinfo \
 		.WAIT installboot \
 		pwd_mkdb strfile sunlabel vgrind zic
 .endif
-SUBDIR+= stat .WAIT config
+SUBDIR+= stat .WAIT config xz-bin
 
 .if ${MKLLVM} != "no"
 SUBDIR+= \

Added files:

Index: src/tools/xz-bin/Makefile
diff -u /dev/null src/tools/xz-bin/Makefile:1.1
--- /dev/null	Tue Sep 25 05:42:09 2018
+++ src/tools/xz-bin/Makefile	Tue Sep 25 05:42:08 2018
@@ -0,0 +1,8 @@
+#	$NetBSD: Makefile,v 1.1 2018/09/25 05:42:08 joerg Exp $
+
+HOSTPROG=	xz
+HOST_SRCDIR=	external/public-domain/xz/bin/xz
+
+.include "${.PARSEDIR}/../xz-include/Makefile.inc"
+
+.include "${.CURDIR}/../Makefile.host"

Index: src/tools/xz-include/Makefile
diff -u /dev/null src/tools/xz-include/Makefile:1.1
--- /dev/null	Tue Sep 25 05:42:09 2018
+++ src/tools/xz-include/Makefile	Tue Sep 25 05:42:08 2018
@@ -0,0 +1,21 @@
+#	$NetBSD: Makefile,v 1.1 2018/09/25 05:42:08 joerg Exp $
+
+.include <bsd.hostinit.mk>
+
+#
+# Do *not* set HOSTPROG or HOSTLIB at this point otherwise
+# it will create a loop trying to extract the object directory.
+#
+.include "Makefile.inc"
+
+CONFIGURE_ARGS+=	--enable-threads=no
+
+config.status: ${XZSRCDIR}/configure
+	${HOST_SH} ${XZSRCDIR}/configure ${CONFIGURE_ARGS} \
+	    CC=${HOST_CC:Q}
+
+CLEANFILES+=	config.log config.status config.h libtool stamp-h1
+
+realdepends realall: config.status
+
+.include <bsd.hostprog.mk>

Index: src/tools/xz-lib/Makefile
diff -u /dev/null src/tools/xz-lib/Makefile:1.1
--- /dev/null	Tue Sep 25 05:42:09 2018
+++ src/tools/xz-lib/Makefile	Tue Sep 25 05:42:08 2018
@@ -0,0 +1,7 @@
+#	$NetBSD: Makefile,v 1.1 2018/09/25 05:42:08 joerg Exp $
+
+HOSTLIB=	${LIB}
+
+.include "${.PARSEDIR}/../xz-include/Makefile.inc"
+
+.include "${XZ_TOPLEVEL}/lib/Makefile"

Reply via email to