1 # $NetBSD: Makefile,v 1.34 2008/06/22 22:33:37 dsainty Exp $
4 CATEGORIES= archivers sysutils
5 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dar/}
7 MAINTAINER= pkgsrc-users@NetBSD.org
8 HOMEPAGE= http://dar.linux.free.fr/
11 PKG_INSTALLATION_TYPES= overwrite pkgviews
12 PKG_DESTDIR_SUPPORT= user-destdir
17 USE_TOOLS+= gmake pkg-config
20 CONFIGURE_ARGS+= --disable-dar-static
21 CONFIGURE_ARGS+= --enable-static=no
22 CONFIGURE_ARGS+= --disable-nodump-flag
23 CONFIGURE_ARGS+= --disable-upx
24 CONFIGURE_ARGS+= --enable-examples
25 CONFIGURE_ARGS+= doxygen=no
27 PKGCONFIG_OVERRIDE= src/libdar/libdar.pc.tmpl.in
29 ## We use the logic below to find a path for a non-existent ${BASH}.
30 ## Yeah, I suppose it's a hack, but it does work.
32 CHECK_INTERPRETER_SKIP+= share/dar/samples/*
33 REPLACE_PERL+= doc/samples/dar_backup
34 REPLACE_BASH+= doc/samples/*.bash doc/samples/clust*.sh
36 .if defined(TOOLS_PLATFORM.bash) && exists(${${TOOLS_PLATFORM.bash}:L})
37 BASH?= ${TOOLS_PLATFORM.bash}
39 BASH?= ${TOOLS_PREFIX.bash}/bin/bash
40 TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bash=bash
43 ## Our threading check here is the same as the one used in devel/perl5.
45 CHECK_BUILTIN.pthread:=yes
46 . include "../../mk/pthread.builtin.mk"
47 CHECK_BUILTIN.pthread:=no
49 ## XXX I'm following the USE_FEATURES semantics used in security/openssl.
51 .if !empty(USE_BUILTIN.pthread:tl:Myes)
52 USE_FEATURES.dar= threads
54 USE_FEATURES.dar= # empty
57 PKG_OPTIONS_VAR= PKG_OPTIONS.dar
58 PKG_OPTIONS_OPTIONAL_GROUPS+= int
59 PKG_OPTIONS_GROUP.int= dar-int32 dar-int64
60 PKG_SUGGESTED_OPTIONS= dar-int64 ${USE_FEATURES.dar}
61 PKG_SUPPORTED_OPTIONS= threads
63 .include "../../mk/bsd.options.mk"
65 ## Dar is built by default with an arbitrary-size-integer library for
66 ## managing all file length/timestamp details. If 32-bit or 64-bit
67 ## integers (with overflow protection) are sufficient for requirements,
68 ## the following options can significantly reduce the run-time memory
69 ## and CPU overheads of Dar.
71 DARBITS= ${PKG_OPTIONS:C/[^[:digit:]]*//:M[36][24]}
72 PLIST_SUBST+= DARBITS=${DARBITS}
75 CONFIGURE_ARGS+= --enable-mode=${DARBITS:Q}
78 ## We want the threading library to be specified by pkgsrc, and only
79 ## when desired, viz. in the case below. Using PTHREAD_AUTO_VARS
80 ## with the accompanying BUILDLINK_TRANSFORM directive is easier
81 ## then patching configure.
83 .if !empty(PKG_OPTIONS:Mthreads)
84 USE_FEATURES.openssl+= threads
85 PTHREAD_AUTO_VARS= yes
86 BUILDLINK_TRANSFORM+= rm:-lpthread
88 CONFIGURE_ARGS+= --disable-thread-safe
91 UNLIMIT_RESOURCES= datasize
93 ## XXX Needed for getopt() with SunPro (USE_FEATURES?)
95 CPPFLAGS.SunOS+= -D__EXTENSIONS__
97 .include "../../archivers/bzip2/buildlink3.mk"
98 .include "../../devel/gettext-lib/buildlink3.mk"
99 .include "../../devel/zlib/buildlink3.mk"
100 .include "../../mk/pthread.buildlink3.mk"
101 .include "../../security/openssl/buildlink3.mk"
103 .include "../../mk/bsd.pkg.mk"