Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Update build glue for xz-5.2.4. Hook up tools version.



details:   https://anonhg.NetBSD.org/src/rev/b02cc426680b
branches:  trunk
changeset: 836075:b02cc426680b
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Sep 25 05:42:08 2018 +0000

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

diffstat:

 external/public-domain/xz/Makefile         |  14 +++++++-
 external/public-domain/xz/Makefile.inc     |  10 ++++-
 external/public-domain/xz/bin/xz/Makefile  |  21 +++++++---
 external/public-domain/xz/include/config.h |  53 ++++++++++++++++++-----------
 external/public-domain/xz/lib/Makefile     |  22 ++++++++++--
 tools/Makefile                             |   8 ++--
 tools/xz-bin/Makefile                      |   8 ++++
 tools/xz-include/Makefile                  |  21 +++++++++++
 tools/xz-lib/Makefile                      |   7 +++
 9 files changed, 125 insertions(+), 39 deletions(-)

diffs (truncated from 402 to 300 lines):

diff -r ce86c6f717c3 -r b02cc426680b external/public-domain/xz/Makefile
--- a/external/public-domain/xz/Makefile        Tue Sep 25 05:41:20 2018 +0000
+++ b/external/public-domain/xz/Makefile        Tue Sep 25 05:42:08 2018 +0000
@@ -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>
diff -r ce86c6f717c3 -r b02cc426680b external/public-domain/xz/Makefile.inc
--- a/external/public-domain/xz/Makefile.inc    Tue Sep 25 05:41:20 2018 +0000
+++ b/external/public-domain/xz/Makefile.inc    Tue Sep 25 05:42:08 2018 +0000
@@ -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
diff -r ce86c6f717c3 -r b02cc426680b external/public-domain/xz/bin/xz/Makefile
--- a/external/public-domain/xz/bin/xz/Makefile Tue Sep 25 05:41:20 2018 +0000
+++ b/external/public-domain/xz/bin/xz/Makefile Tue Sep 25 05:42:08 2018 +0000
@@ -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 @@
 .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 @@
 .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
diff -r ce86c6f717c3 -r b02cc426680b external/public-domain/xz/include/config.h
--- a/external/public-domain/xz/include/config.h        Tue Sep 25 05:41:20 2018 +0000
+++ b/external/public-domain/xz/include/config.h        Tue Sep 25 05:42:08 2018 +0000
@@ -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
diff -r ce86c6f717c3 -r b02cc426680b external/public-domain/xz/lib/Makefile
--- a/external/public-domain/xz/lib/Makefile    Tue Sep 25 05:41:20 2018 +0000
+++ b/external/public-domain/xz/lib/Makefile    Tue Sep 25 05:42:08 2018 +0000
@@ -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 @@
 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+= 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 @@
        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 @@
        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
+



Home | Main Index | Thread Index | Old Index