[Midnightbsd-cvs] src [11000] trunk/lib/libmagic: update to 5.32
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Jun 15 18:06:16 EDT 2018
Revision: 11000
http://svnweb.midnightbsd.org/src/?rev=11000
Author: laffer1
Date: 2018-06-15 18:06:15 -0400 (Fri, 15 Jun 2018)
Log Message:
-----------
update to 5.32
Modified Paths:
--------------
trunk/lib/libmagic/Makefile
trunk/lib/libmagic/config.h
Modified: trunk/lib/libmagic/Makefile
===================================================================
--- trunk/lib/libmagic/Makefile 2018-06-15 22:05:07 UTC (rev 10999)
+++ trunk/lib/libmagic/Makefile 2018-06-15 22:06:15 UTC (rev 11000)
@@ -1,48 +1,49 @@
# $MidnightBSD$
-# $FreeBSD: src/lib/libmagic/Makefile,v 1.10 2007/05/21 02:49:05 deischen Exp $
-# Copyright (c) David E. O'Brien, 2000-2004
+# $FreeBSD: stable/10/lib/libmagic/Makefile 313618 2017-02-11 06:54:42Z ngie $
+# Copyright (c) David E. O'Brien, 2000-2004, 2006, 2009
-CONTRDIR= ${.CURDIR}/../../contrib/file
-.PATH: ${CONTRDIR}
+CONTRDIR= ${SRCTOP}/contrib/file
+.PATH: ${CONTRDIR}/src
+.PATH: ${CONTRDIR}/doc
LIB= magic
-SHLIB_MAJOR= 3
+SHLIB_MAJOR= 4
DPADD= ${LIBZ}
LDADD= -lz
MAN= libmagic.3 magic.5
-SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c encoding.c \
- fsmagic.c funcs.c is_tar.c magic.c print.c readcdf.c readelf.c softmagic.c
+SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \
+ der.c encoding.c fsmagic.c funcs.c \
+ is_tar.c magic.c print.c readcdf.c readelf.c softmagic.c
INCS= magic.h
MAGICPATH?= /usr/share/misc
CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H
-CFLAGS+= -I${.CURDIR} -I${CONTRDIR}
+CFLAGS+= -I${.CURDIR} -I${.OBJDIR} -I${CONTRDIR}/src
-CLEANFILES+= magic magic.mgc magic.mime.mgc
+WARNS?= 3
-FILES= magic magic.mgc ${CONTRDIR}/magic.mime magic.mime.mgc
+CLEANFILES+= magic magic.mgc
+
+FILES= magic magic.mgc
FILESDIR= ${MAGICPATH}
-MAGFILES= ${CONTRDIR}/Header\
- ${CONTRDIR}/Localstuff\
- ${CONTRDIR}/Magdir/[a-z]*
+MAGFILES= ${CONTRDIR}/magic/Header \
+ ${CONTRDIR}/magic/Localstuff \
+ ${CONTRDIR}/magic/Magdir/[a-z]*
magic: ${MAGFILES}
- cat ${.ALLSRC} > ${.TARGET}
+ cat ${.ALLSRC:O} > ${.TARGET}
magic.mgc: mkmagic magic
./mkmagic magic
-magic.mime.mgc: mkmagic magic.mime
- ./mkmagic ${CONTRDIR}/magic.mime
-
CLEANFILES+= mkmagic
build-tools: mkmagic
-mkmagic: apprentice.c funcs.c magic.c print.c encoding.c cdf_time.c
- ${CC} -DHAVE_CONFIG_H -DCOMPILE_ONLY \
- -I${.CURDIR} -I${CONTRDIR} -o ${.TARGET} ${.ALLSRC}
+mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS}
+ ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:N*.h} \
+ ${LDADD}
FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \
${.CURDIR}/config.h
@@ -54,4 +55,10 @@
-e 's,__MAGIC__,${MAGICPATH}/magic,g' ${.ALLSRC} > ${.TARGET}
.endfor
+CLEANFILES+= ${INCS}
+.for inc in ${INCS}
+${inc}: ${inc}.in
+ sed -e 's,X.YY,${FILEVER:S,",,g:S,.,,g},g' ${.ALLSRC} > ${.TARGET}
+.endfor
+
.include <bsd.lib.mk>
Modified: trunk/lib/libmagic/config.h
===================================================================
--- trunk/lib/libmagic/config.h 2018-06-15 22:05:07 UTC (rev 10999)
+++ trunk/lib/libmagic/config.h 2018-06-15 22:06:15 UTC (rev 11000)
@@ -1,3 +1,12 @@
+/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/lib/libmagic/config.h 328875 2018-02-05 08:50:34Z eadler $ */
+
+/* Get __FreeBSD_version. */
+#include <osreldate.h>
+
+/* Only specific versions of FreeBSD support xlocale */
+#define FREEBSD_XLOCALE_SUPPORT 1
+
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
@@ -33,6 +42,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
+/* Define to 1 if you have the `dprintf' function. */
+#define HAVE_DPRINTF 1
+
/* Define to 1 if you have the <err.h> header file. */
#define HAVE_ERR_H 1
@@ -45,13 +57,16 @@
/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1
+/* Define to 1 if you have the `freelocale' function. */
+#ifdef FREEBSD_XLOCALE_SUPPORT
+#define HAVE_FREELOCALE 1
+#endif
+
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#define HAVE_FSEEKO 1
/* Define to 1 if you have the `getline' function. */
-#ifndef HOSTPROG
#define HAVE_GETLINE 1
-#endif
/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
@@ -62,6 +77,9 @@
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
+/* Define to 1 if you have the `gmtime_r' function. */
+#define HAVE_GMTIME_R 1
+
/* Define to 1 if the system has the type `intptr_t'. */
#define HAVE_INTPTR_T 1
@@ -80,6 +98,9 @@
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
+/* Define to 1 if you have the `localtime_r' function. */
+#define HAVE_LOCALTIME_R 1
+
/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
#define HAVE_MBRTOWC 1
@@ -90,7 +111,7 @@
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkostemp' function. */
-/* #undef HAVE_MKOSTEMP */
+#define HAVE_MKOSTEMP 1
/* Define to 1 if you have the `mkstemp' function. */
#define HAVE_MKSTEMP 1
@@ -98,9 +119,23 @@
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
+/* Define to 1 if you have the `newlocale' function. */
+#ifdef FREEBSD_XLOCALE_SUPPORT
+#define HAVE_NEWLOCALE 1
+#endif
+
/* Define to 1 if you have the `pread' function. */
#define HAVE_PREAD 1
+/* Define to 1 if you have the `setlocale' function. */
+#define HAVE_SETLOCALE 1
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Have sig_t type */
+#define HAVE_SIG_T 1
+
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
@@ -185,6 +220,11 @@
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
+/* Define to 1 if you have the `uselocale' function. */
+#ifdef FREEBSD_XLOCALE_SUPPORT
+#define HAVE_USELOCALE 1
+#endif
+
/* Define to 1 if you have the `utime' function. */
#define HAVE_UTIME 1
@@ -222,6 +262,11 @@
/* Define to 1 if `vfork' works. */
#define HAVE_WORKING_VFORK 1
+/* Define to 1 if you have the <xlocale.h> header file. */
+#ifdef FREEBSD_XLOCALE_SUPPORT
+#define HAVE_XLOCALE_H 1
+#endif
+
/* Define to 1 if you have the <zlib.h> header file. */
#define HAVE_ZLIB_H 1
@@ -247,7 +292,7 @@
#define PACKAGE_NAME "file"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "file 5.19"
+#define PACKAGE_STRING "file 5.32"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "file"
@@ -256,7 +301,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "5.19"
+#define PACKAGE_VERSION "5.32"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
@@ -287,7 +332,7 @@
/* Version number of package */
-#define VERSION "5.19"
+#define VERSION "5.32"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
@@ -301,6 +346,9 @@
# endif
#endif
+/* Enable zlib compression support */
+#define ZLIBSUPPORT 1
+
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
More information about the Midnightbsd-cvs
mailing list