1 # $NetBSD: Makefile,v 1.35 2010/01/17 12:02:03 wiz Exp $
5 CATEGORIES= archivers sysutils
6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dar/}
8 MAINTAINER= pkgsrc-users@NetBSD.org
9 HOMEPAGE= http://dar.linux.free.fr/
10 COMMENT= Disk archiver
12 PKG_INSTALLATION_TYPES= overwrite pkgviews
13 PKG_DESTDIR_SUPPORT= user-destdir
18 USE_TOOLS+= gmake pkg-config
21 CONFIGURE_ARGS+= --disable-dar-static
22 CONFIGURE_ARGS+= --enable-static=no
23 CONFIGURE_ARGS+= --disable-nodump-flag
24 CONFIGURE_ARGS+= --disable-upx
25 CONFIGURE_ARGS+= --enable-examples
26 CONFIGURE_ARGS+= doxygen=no
28 PKGCONFIG_OVERRIDE= src/libdar/libdar.pc.tmpl.in
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.
33 CHECK_INTERPRETER_SKIP+= share/dar/samples/*
34 REPLACE_PERL+= doc/samples/dar_backup
35 REPLACE_BASH+= doc/samples/*.bash doc/samples/clust*.sh
37 .if defined(TOOLS_PLATFORM.bash) && exists(${${TOOLS_PLATFORM.bash}:L})
38 BASH?= ${TOOLS_PLATFORM.bash}
40 BASH?= ${TOOLS_PREFIX.bash}/bin/bash
41 TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bash=bash
44 ## Our threading check here is the same as the one used in devel/perl5.
46 CHECK_BUILTIN.pthread:=yes
47 . include "../../mk/pthread.builtin.mk"
48 CHECK_BUILTIN.pthread:=no
50 ## XXX I'm following the USE_FEATURES semantics used in security/openssl.
52 .if !empty(USE_BUILTIN.pthread:tl:Myes)
53 USE_FEATURES.dar= threads
55 USE_FEATURES.dar= # empty
58 PKG_OPTIONS_VAR= PKG_OPTIONS.dar
59 PKG_OPTIONS_OPTIONAL_GROUPS+= int
60 PKG_OPTIONS_GROUP.int= dar-int32 dar-int64
61 PKG_SUGGESTED_OPTIONS= dar-int64 ${USE_FEATURES.dar}
62 PKG_SUPPORTED_OPTIONS= threads
64 .include "../../mk/bsd.options.mk"
66 ## Dar is built by default with an arbitrary-size-integer library for
67 ## managing all file length/timestamp details. If 32-bit or 64-bit
68 ## integers (with overflow protection) are sufficient for requirements,
69 ## the following options can significantly reduce the run-time memory
70 ## and CPU overheads of Dar.
72 DARBITS= ${PKG_OPTIONS:C/[^[:digit:]]*//:M[36][24]}
73 PLIST_SUBST+= DARBITS=${DARBITS}
76 CONFIGURE_ARGS+= --enable-mode=${DARBITS:Q}
79 ## We want the threading library to be specified by pkgsrc, and only
80 ## when desired, viz. in the case below. Using PTHREAD_AUTO_VARS
81 ## with the accompanying BUILDLINK_TRANSFORM directive is easier
82 ## then patching configure.
84 .if !empty(PKG_OPTIONS:Mthreads)
85 USE_FEATURES.openssl+= threads
86 PTHREAD_AUTO_VARS= yes
87 BUILDLINK_TRANSFORM+= rm:-lpthread
89 CONFIGURE_ARGS+= --disable-thread-safe
92 UNLIMIT_RESOURCES= datasize
94 ## XXX Needed for getopt() with SunPro (USE_FEATURES?)
96 CPPFLAGS.SunOS+= -D__EXTENSIONS__
98 .include "../../archivers/bzip2/buildlink3.mk"
99 .include "../../devel/gettext-lib/buildlink3.mk"
100 .include "../../devel/zlib/buildlink3.mk"
101 .include "../../mk/pthread.buildlink3.mk"
102 .include "../../security/openssl/buildlink3.mk"
104 .include "../../mk/bsd.pkg.mk"