| @@ -1,117 +1,118 @@ | | | @@ -1,117 +1,118 @@ |
1 | # $NetBSD: Makefile,v 1.45 2014/02/12 23:17:32 tron Exp $ | | 1 | # $NetBSD: Makefile,v 1.46 2014/04/15 20:36:06 asau Exp $ |
2 | | | 2 | |
3 | DISTNAME= dar-2.4.10 | | 3 | DISTNAME= dar-2.4.10 |
4 | PKGREVISION= 2 | | 4 | PKGREVISION= 3 |
5 | CATEGORIES= archivers sysutils | | 5 | CATEGORIES= archivers sysutils |
6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dar/} | | 6 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dar/} |
7 | | | 7 | |
8 | MAINTAINER= pkgsrc-users@NetBSD.org | | 8 | MAINTAINER= pkgsrc-users@NetBSD.org |
9 | HOMEPAGE= http://dar.linux.free.fr/ | | 9 | HOMEPAGE= http://dar.linux.free.fr/ |
10 | COMMENT= Disk archiver | | 10 | COMMENT= Disk archiver |
11 | LICENSE= gnu-gpl-v2 | | 11 | LICENSE= gnu-gpl-v2 |
12 | | | 12 | |
13 | PKG_INSTALLATION_TYPES= overwrite pkgviews | | 13 | PKG_INSTALLATION_TYPES= overwrite pkgviews |
14 | | | 14 | |
15 | USE_LANGUAGES= c c++ | | 15 | USE_LANGUAGES= c c++ |
16 | USE_LIBTOOL= yes | | 16 | USE_LIBTOOL= yes |
17 | USE_PKGLOCALEDIR= yes | | 17 | USE_PKGLOCALEDIR= yes |
18 | USE_TOOLS+= gmake pkg-config bash:run | | 18 | USE_TOOLS+= gmake pkg-config bash:run |
19 | | | 19 | |
20 | GNU_CONFIGURE= yes | | 20 | GNU_CONFIGURE= yes |
21 | CONFIGURE_ARGS+= --disable-dar-static | | 21 | CONFIGURE_ARGS+= --disable-dar-static |
22 | CONFIGURE_ARGS+= --enable-static=no | | 22 | CONFIGURE_ARGS+= --enable-static=no |
23 | CONFIGURE_ARGS+= --disable-nodump-flag | | 23 | CONFIGURE_ARGS+= --disable-nodump-flag |
24 | CONFIGURE_ARGS+= --disable-upx | | 24 | CONFIGURE_ARGS+= --disable-upx |
25 | CONFIGURE_ARGS+= --enable-examples | | 25 | CONFIGURE_ARGS+= --enable-examples |
26 | CONFIGURE_ARGS+= doxygen=no | | 26 | CONFIGURE_ARGS+= doxygen=no |
27 | | | 27 | |
28 | PKGCONFIG_OVERRIDE= src/libdar/libdar.pc.tmpl.in | | 28 | PKGCONFIG_OVERRIDE= src/libdar/libdar.pc.tmpl.in |
29 | | | 29 | |
30 | ## We use the logic below to find a path for a non-existent ${BASH}. | | 30 | ## We use the logic below to find a path for a non-existent ${BASH}. |
31 | ## Yeah, I suppose it's a hack, but it does work. | | 31 | ## Yeah, I suppose it's a hack, but it does work. |
32 | # | | 32 | # |
33 | CHECK_INTERPRETER_SKIP+= share/dar/samples/* | | 33 | CHECK_INTERPRETER_SKIP+= share/dar/samples/* |
34 | REPLACE_PERL+= doc/samples/dar_backup | | 34 | REPLACE_PERL+= doc/samples/dar_backup |
35 | REPLACE_BASH+= doc/samples/*.bash doc/samples/*.sh doc/samples/*.duc | | 35 | REPLACE_BASH+= doc/samples/*.bash doc/samples/*.sh doc/samples/*.duc |
36 | | | 36 | |
37 | ## Our threading check here is the same as the one used in devel/perl5. | | 37 | ## Our threading check here is the same as the one used in devel/perl5. |
38 | # | | 38 | # |
39 | CHECK_BUILTIN.pthread:=yes | | 39 | CHECK_BUILTIN.pthread:=yes |
40 | . include "../../mk/pthread.builtin.mk" | | 40 | . include "../../mk/pthread.builtin.mk" |
41 | CHECK_BUILTIN.pthread:=no | | 41 | CHECK_BUILTIN.pthread:=no |
42 | | | 42 | |
43 | ## XXX I'm following the USE_FEATURES semantics used in security/openssl. | | 43 | ## XXX I'm following the USE_FEATURES semantics used in security/openssl. |
44 | # | | 44 | # |
45 | .if !empty(USE_BUILTIN.pthread:tl:Myes) | | 45 | .if !empty(USE_BUILTIN.pthread:tl:Myes) |
46 | USE_FEATURES.dar= threads | | 46 | USE_FEATURES.dar= threads |
47 | .else | | 47 | .else |
48 | USE_FEATURES.dar= # empty | | 48 | USE_FEATURES.dar= # empty |
49 | .endif | | 49 | .endif |
50 | | | 50 | |
51 | PKG_OPTIONS_VAR= PKG_OPTIONS.dar | | 51 | PKG_OPTIONS_VAR= PKG_OPTIONS.dar |
52 | PKG_OPTIONS_OPTIONAL_GROUPS= int | | 52 | PKG_OPTIONS_OPTIONAL_GROUPS= int |
53 | PKG_OPTIONS_GROUP.int= dar-int32 dar-int64 | | 53 | PKG_OPTIONS_GROUP.int= dar-int32 dar-int64 |
54 | PKG_SUGGESTED_OPTIONS= dar-int64 ${USE_FEATURES.dar} | | 54 | PKG_SUGGESTED_OPTIONS= dar-int64 ${USE_FEATURES.dar} |
55 | PKG_SUPPORTED_OPTIONS= threads | | 55 | PKG_SUPPORTED_OPTIONS= threads |
56 | | | 56 | |
57 | .include "../../mk/bsd.options.mk" | | 57 | .include "../../mk/bsd.options.mk" |
58 | | | 58 | |
59 | ## Dar is built by default with an arbitrary-size-integer library for | | 59 | ## Dar is built by default with an arbitrary-size-integer library for |
60 | ## managing all file length/timestamp details. If 32-bit or 64-bit | | 60 | ## managing all file length/timestamp details. If 32-bit or 64-bit |
61 | ## integers (with overflow protection) are sufficient for requirements, | | 61 | ## integers (with overflow protection) are sufficient for requirements, |
62 | ## the following options can significantly reduce the run-time memory | | 62 | ## the following options can significantly reduce the run-time memory |
63 | ## and CPU overheads of Dar. | | 63 | ## and CPU overheads of Dar. |
64 | # | | 64 | # |
65 | DARBITS= ${PKG_OPTIONS:C/[^[:digit:]]*//:M[36][24]} | | 65 | DARBITS= ${PKG_OPTIONS:C/[^[:digit:]]*//:M[36][24]} |
66 | PLIST_SUBST+= DARBITS=${DARBITS} | | 66 | PLIST_SUBST+= DARBITS=${DARBITS} |
67 | | | 67 | |
68 | .if !empty(DARBITS) | | 68 | .if !empty(DARBITS) |
69 | CONFIGURE_ARGS+= --enable-mode=${DARBITS:Q} | | 69 | CONFIGURE_ARGS+= --enable-mode=${DARBITS:Q} |
70 | .endif | | 70 | .endif |
71 | | | 71 | |
72 | EGDIR= ${PREFIX}/share/examples/dar | | 72 | EGDIR= ${PREFIX}/share/examples/dar |
73 | INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR} | | 73 | INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR} |
74 | | | 74 | |
75 | CONF_FILES= ${EGDIR}/darrc ${PKG_SYSCONFDIR}/darrc | | 75 | CONF_FILES= ${EGDIR}/darrc ${PKG_SYSCONFDIR}/darrc |
76 | | | 76 | |
77 | ## We want the threading library to be specified by pkgsrc, and only | | 77 | ## We want the threading library to be specified by pkgsrc, and only |
78 | ## when desired, viz. in the case below. Using PTHREAD_AUTO_VARS | | 78 | ## when desired, viz. in the case below. Using PTHREAD_AUTO_VARS |
79 | ## with the accompanying BUILDLINK_TRANSFORM directive is easier | | 79 | ## with the accompanying BUILDLINK_TRANSFORM directive is easier |
80 | ## then patching configure. | | 80 | ## then patching configure. |
81 | # | | 81 | # |
82 | .if !empty(PKG_OPTIONS:Mthreads) | | 82 | .if !empty(PKG_OPTIONS:Mthreads) |
83 | USE_FEATURES.openssl+= threads | | 83 | USE_FEATURES.openssl+= threads |
84 | PTHREAD_AUTO_VARS= yes | | 84 | PTHREAD_AUTO_VARS= yes |
85 | BUILDLINK_TRANSFORM+= rm:-lpthread | | 85 | BUILDLINK_TRANSFORM+= rm:-lpthread |
86 | .else | | 86 | .else |
87 | CONFIGURE_ARGS+= --disable-thread-safe | | 87 | CONFIGURE_ARGS+= --disable-thread-safe |
88 | .endif | | 88 | .endif |
89 | | | 89 | |
90 | UNLIMIT_RESOURCES= datasize | | 90 | UNLIMIT_RESOURCES= datasize |
91 | | | 91 | |
92 | ## XXX Needed for getopt() with SunPro (USE_FEATURES?) | | 92 | ## XXX Needed for getopt() with SunPro (USE_FEATURES?) |
93 | # | | 93 | # |
94 | CPPFLAGS.SunOS+= -D__EXTENSIONS__ | | 94 | CPPFLAGS.SunOS+= -D__EXTENSIONS__ |
95 | | | 95 | |
96 | .include "../../mk/bsd.fast.prefs.mk" | | 96 | .include "../../mk/bsd.fast.prefs.mk" |
97 | | | 97 | |
98 | ## Build a static binary with threads is currently broken with glibc. | | 98 | ## Build a static binary with threads is currently broken with glibc. |
99 | .if ${OPSYS} == "Linux" && !empty(PKG_OPTIONS:Mthreads) | | 99 | .if ${OPSYS} == "Linux" && !empty(PKG_OPTIONS:Mthreads) |
100 | SUBST_CLASSES+= static | | 100 | SUBST_CLASSES+= static |
101 | SUBST_STAGE.static= post-patch | | 101 | SUBST_STAGE.static= post-patch |
102 | SUBST_MESSAGE.static= Changing -all-static to -static | | 102 | SUBST_MESSAGE.static= Changing -all-static to -static |
103 | SUBST_FILES.static= src/testing/Makefile.in | | 103 | SUBST_FILES.static= src/testing/Makefile.in |
104 | SUBST_SED.static= -e 's,-all-static,-static,g' | | 104 | SUBST_SED.static= -e 's,-all-static,-static,g' |
105 | .endif | | 105 | .endif |
106 | | | 106 | |
107 | .if ${OPSYS} == "NetBSD" | | 107 | .if ${OPSYS} == "NetBSD" |
108 | BUILDLINK_TRANSFORM= l:execinfo:execinfo:elf | | 108 | BUILDLINK_TRANSFORM= l:execinfo:execinfo:elf |
109 | .endif | | 109 | .endif |
110 | | | 110 | |
111 | .include "../../archivers/bzip2/buildlink3.mk" | | 111 | .include "../../archivers/bzip2/buildlink3.mk" |
| | | 112 | .include "../../devel/libexecinfo/buildlink3.mk" |
112 | .include "../../devel/gettext-lib/buildlink3.mk" | | 113 | .include "../../devel/gettext-lib/buildlink3.mk" |
113 | .include "../../devel/zlib/buildlink3.mk" | | 114 | .include "../../devel/zlib/buildlink3.mk" |
114 | .include "../../mk/pthread.buildlink3.mk" | | 115 | .include "../../mk/pthread.buildlink3.mk" |
115 | .include "../../security/openssl/buildlink3.mk" | | 116 | .include "../../security/openssl/buildlink3.mk" |
116 | | | 117 | |
117 | .include "../../mk/bsd.pkg.mk" | | 118 | .include "../../mk/bsd.pkg.mk" |