PR/39596: Jwens Rehsack: Update to file-4.26 (4.21 is gone) and add built-in version detection.diff -r1.16 -r1.17 pkgsrc/sysutils/file/Makefile
(christos)
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | # $NetBSD: Makefile,v 1.16 2008/06/12 02:14:46 joerg Exp $ | 1 | # $NetBSD: Makefile,v 1.17 2008/10/29 20:50:16 christos Exp $ | |
2 | 2 | |||
3 | DISTNAME= file-4.21 | 3 | DISTNAME= file-4.26 | |
4 | CATEGORIES= sysutils | 4 | CATEGORIES= sysutils | |
5 | MASTER_SITES= ftp://ftp.gw.com/mirrors/pub/unix/file/ | 5 | MASTER_SITES= ftp://ftp.gw.com/mirrors/pub/unix/file/ | |
6 | MASTER_SITES+= ftp://ftp.astron.com/pub/file/ | 6 | MASTER_SITES+= ftp://ftp.astron.com/pub/file/ | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | #HOMEPAGE= | 9 | #HOMEPAGE= | |
10 | COMMENT= Tool for determining file type | 10 | COMMENT= Tool for determining file type | |
11 | 11 | |||
12 | PKG_DESTDIR_SUPPORT= user-destdir | 12 | PKG_DESTDIR_SUPPORT= user-destdir | |
13 | 13 | |||
14 | GNU_CONFIGURE= YES | 14 | GNU_CONFIGURE= YES | |
15 | CONFIGURE_ARGS+= --enable-fsect-man5 | 15 | CONFIGURE_ARGS+= --enable-fsect-man5 | |
16 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} | 16 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} |
@@ -1,12 +1,9 @@ | @@ -1,12 +1,9 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.2 2004/09/22 08:09:53 jlam Exp $ | 1 | @comment $NetBSD: PLIST,v 1.3 2008/10/29 20:50:16 christos Exp $ | |
2 | bin/file | 2 | bin/file | |
3 | include/magic.h | 3 | include/magic.h | |
4 | lib/libmagic.la | 4 | lib/libmagic.la | |
5 | man/man1/file.1 | 5 | man/man1/file.1 | |
6 | man/man3/libmagic.3 | 6 | man/man3/libmagic.3 | |
7 | man/man5/magic.5 | 7 | man/man5/magic.5 | |
8 | share/file/magic | |||
9 | share/file/magic.mgc | 8 | share/file/magic.mgc | |
10 | share/file/magic.mime | |||
11 | share/file/magic.mime.mgc | |||
12 | @dirrm share/file | 9 | @dirrm share/file |
@@ -1,21 +1,26 @@ | @@ -1,21 +1,26 @@ | |||
1 | # $NetBSD: buildlink3.mk,v 1.6 2006/07/08 23:11:08 jlam Exp $ | 1 | # $NetBSD: buildlink3.mk,v 1.7 2008/10/29 20:50:16 christos Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ | 4 | BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ | |
5 | FILE_BUILDLINK3_MK:= ${FILE_BUILDLINK3_MK}+ | 5 | FILE_BUILDLINK3_MK:= ${FILE_BUILDLINK3_MK}+ | |
6 | 6 | |||
7 | .if !empty(BUILDLINK_DEPTH:M+) | 7 | .if !empty(BUILDLINK_DEPTH:M+) | |
8 | BUILDLINK_DEPENDS+= file | 8 | BUILDLINK_DEPENDS+= file | |
9 | .endif | 9 | .endif | |
10 | 10 | |||
11 | BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nfile} | 11 | BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nfile} | |
12 | BUILDLINK_PACKAGES+= file | 12 | BUILDLINK_PACKAGES+= file | |
13 | BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}file | 13 | BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}file | |
14 | 14 | |||
15 | .if !empty(FILE_BUILDLINK3_MK:M+) | 15 | .if !empty(FILE_BUILDLINK3_MK:M+) | |
16 | BUILDLINK_API_DEPENDS.file+= file>=4.09 | 16 | ||
17 | BUILDLINK_ABI_DEPENDS.file+= file>=4.09nb1 | 17 | . include "../../mk/bsd.fast.prefs.mk" | |
18 | ||||
19 | BUILDLINK_API_DEPENDS.file+= file>=4.17 | |||
20 | BUILDLINK_ABI_DEPENDS.file+= file>=4.17 | |||
18 | BUILDLINK_PKGSRCDIR.file?= ../../sysutils/file | 21 | BUILDLINK_PKGSRCDIR.file?= ../../sysutils/file | |
19 | .endif # FILE_BUILDLINK3_MK | 22 | .endif # FILE_BUILDLINK3_MK | |
23 | pkgbase := file | |||
24 | .include "../../mk/pkg-build-options.mk" | |||
20 | 25 | |||
21 | BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} | 26 | BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} |
@@ -1,35 +1,40 @@ | @@ -1,35 +1,40 @@ | |||
1 | # $NetBSD: builtin.mk,v 1.4 2006/04/06 06:22:45 reed Exp $ | 1 | # $NetBSD: builtin.mk,v 1.5 2008/10/29 20:50:16 christos Exp $ | |
2 | 2 | |||
3 | BUILTIN_PKG:= file | 3 | BUILTIN_PKG:= file | |
4 | 4 | |||
5 | BUILTIN_FIND_FILES_VAR:= H_FILE | 5 | BUILTIN_FIND_FILES_VAR:= H_FILE | |
6 | BUILTIN_FIND_FILES.H_FILE= /usr/include/magic.h | 6 | BUILTIN_FIND_FILES.H_FILE= /usr/include/magic.h | |
7 | BUILTIN_FIND_GREP.H_FILE= magic_file | 7 | BUILTIN_FIND_GREP.H_FILE= magic_file | |
8 | 8 | |||
9 | .include "../../mk/buildlink3/bsd.builtin.mk" | 9 | .include "../../mk/buildlink3/bsd.builtin.mk" | |
10 | 10 | |||
11 | ### | 11 | ### | |
12 | ### Determine if there is a built-in implementation of the package and | 12 | ### Determine if there is a built-in implementation of the package and | |
13 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). | 13 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). | |
14 | ### | 14 | ### | |
15 | .if !defined(IS_BUILTIN.file) | 15 | .if !defined(IS_BUILTIN.file) | |
16 | IS_BUILTIN.file= no | 16 | IS_BUILTIN.file= no | |
17 | . if empty(H_FILE:M__nonexistent__) && empty(H_FILE:M${LOCALBASE}/*) | 17 | . if empty(H_FILE:M__nonexistent__) && empty(H_FILE:M${LOCALBASE}/*) | |
18 | IS_BUILTIN.file= yes | 18 | IS_BUILTIN.file= yes | |
19 | . endif | 19 | . endif | |
20 | .endif | 20 | .endif | |
21 | MAKEVARS+= IS_BUILTIN.file | 21 | MAKEVARS+= IS_BUILTIN.file | |
22 | 22 | |||
23 | .if !defined(BUILTIN_PKG.file) && !empty(IS_BUILTIN.file:M[yY][eE][sS]) | |||
24 | BUILTIN_VERSION.file!= file --version 2>&1 | ${GREP} 'file-' | ${SED} 's/file-//' | |||
25 | BUILTIN_PKG.file= file-${BUILTIN_VERSION.file} | |||
26 | .endif | |||
27 | ||||
23 | ### | 28 | ### | |
24 | ### Determine whether we should use the built-in implementation if it | 29 | ### Determine whether we should use the built-in implementation if it | |
25 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). | 30 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). | |
26 | ### | 31 | ### | |
27 | .if !defined(USE_BUILTIN.file) | 32 | .if !defined(USE_BUILTIN.file) | |
28 | . if ${PREFER.file} == "pkgsrc" | 33 | . if ${PREFER.file} == "pkgsrc" | |
29 | USE_BUILTIN.file= no | 34 | USE_BUILTIN.file= no | |
30 | . else | 35 | . else | |
31 | USE_BUILTIN.file= ${IS_BUILTIN.file} | 36 | USE_BUILTIN.file= ${IS_BUILTIN.file} | |
32 | . if defined(BUILTIN_PKG.file) && \ | 37 | . if defined(BUILTIN_PKG.file) && \ | |
33 | !empty(IS_BUILTIN.file:M[yY][eE][sS]) | 38 | !empty(IS_BUILTIN.file:M[yY][eE][sS]) | |
34 | USE_BUILTIN.file= yes | 39 | USE_BUILTIN.file= yes | |
35 | . for _dep_ in ${BUILDLINK_API_DEPENDS.file} | 40 | . for _dep_ in ${BUILDLINK_API_DEPENDS.file} |
@@ -1,6 +1,6 @@ | @@ -1,6 +1,6 @@ | |||
1 | $NetBSD: distinfo,v 1.8 2007/06/14 16:29:42 adrianp Exp $ | 1 | $NetBSD: distinfo,v 1.9 2008/10/29 20:50:16 christos Exp $ | |
2 | 2 | |||
3 | SHA1 (file-4.21.tar.gz) = 4a919572fed1896212c2d7f41f841845efc1287a | 3 | SHA1 (file-4.26.tar.gz) = 412cdac5cd778d867e2d91a01b09858be1998ec3 | |
4 | RMD160 (file-4.21.tar.gz) = c8cfee27ba7a033bae355e458921eac39913b1e0 | 4 | RMD160 (file-4.26.tar.gz) = e8b84e01d1f43faedfe676afc92c2cba4a01ecdf | |
5 | Size (file-4.21.tar.gz) = 549938 bytes | 5 | Size (file-4.26.tar.gz) = 584803 bytes | |
6 | SHA1 (patch-aa) = 96376c128a1d131c73f7d1bc790030c250f0f1ee | 6 | SHA1 (patch-aa) = 1d3d41162ee3b02c62f610b9e043d0e535419304 |
@@ -1,18 +1,17 @@ | @@ -1,18 +1,17 @@ | |||
1 | $NetBSD: patch-aa,v 1.3 2006/10/07 19:46:06 reed Exp $ | 1 | $NetBSD: patch-aa,v 1.4 2008/10/29 20:50:16 christos Exp $ | |
2 | 2 | |||
3 | --- src/Makefile.in.orig 2006-10-08 03:41:58.000000000 -0700 | 3 | --- src/Makefile.in.orig 2008-09-03 16:03:38.601850000 +0200 | |
4 | +++ src/Makefile.in 2006-10-08 03:42:49.000000000 -0700 | 4 | +++ src/Makefile.in 2008-09-03 16:04:07.409017000 +0200 | |
5 | @@ -192,11 +192,11 @@ | 5 | @@ -195,10 +195,10 @@ | |
6 | sharedstatedir = @sharedstatedir@ | |||
7 | sysconfdir = @sysconfdir@ | |||
8 | target_alias = @target_alias@ | 6 | target_alias = @target_alias@ | |
7 | top_builddir = @top_builddir@ | |||
8 | top_srcdir = @top_srcdir@ | |||
9 | -MAGIC = $(pkgdatadir)/magic | 9 | -MAGIC = $(pkgdatadir)/magic | |
10 | +MAGIC = @sysconfdir@/magic | 10 | +MAGIC = @sysconfdir@/magic | |
11 | lib_LTLIBRARIES = libmagic.la | 11 | lib_LTLIBRARIES = libmagic.la | |
12 | include_HEADERS = magic.h | 12 | include_HEADERS = magic.h | |
13 | EXTRA_DIST = test.c | |||
14 | -AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"' | 13 | -AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"' | |
15 | +AM_CPPFLAGS = -DMAGIC='"$(MAGIC):$(pkgdatadir)/magic"' | 14 | +AM_CPPFLAGS = -DMAGIC='"$(MAGIC):$(pkgdatadir)/magic"' | |
15 | AM_CFLAGS = @WARNINGS@ | |||
16 | libmagic_la_SOURCES = magic.c apprentice.c softmagic.c ascmagic.c \ | 16 | libmagic_la_SOURCES = magic.c apprentice.c softmagic.c ascmagic.c \ | |
17 | compress.c is_tar.c readelf.c print.c fsmagic.c \ | 17 | compress.c is_tar.c readelf.c print.c fsmagic.c \ | |
18 | funcs.c file.h names.h patchlevel.h readelf.h tar.h apptype.c |