pkgsrc - initial commit
[pkgsrc.git] / archivers / dar / Makefile
1 # $NetBSD: Makefile,v 1.34 2008/06/22 22:33:37 dsainty Exp $
2
3 DISTNAME=       dar-2.3.8
4 CATEGORIES=     archivers sysutils
5 MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE:=dar/}
6
7 MAINTAINER=     pkgsrc-users@NetBSD.org
8 HOMEPAGE=       http://dar.linux.free.fr/
9 COMMENT=        Disk archiver
10
11 PKG_INSTALLATION_TYPES= overwrite pkgviews
12 PKG_DESTDIR_SUPPORT=    user-destdir
13
14 USE_LANGUAGES=          c c++
15 USE_LIBTOOL=            yes
16 USE_PKGLOCALEDIR=       yes
17 USE_TOOLS+=             gmake pkg-config
18
19 GNU_CONFIGURE=          yes
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
26
27 PKGCONFIG_OVERRIDE=     src/libdar/libdar.pc.tmpl.in
28
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.
31 #
32 CHECK_INTERPRETER_SKIP+=        share/dar/samples/*
33 REPLACE_PERL+=                  doc/samples/dar_backup
34 REPLACE_BASH+=                  doc/samples/*.bash doc/samples/clust*.sh
35
36 .if defined(TOOLS_PLATFORM.bash) && exists(${${TOOLS_PLATFORM.bash}:L})
37 BASH?=                  ${TOOLS_PLATFORM.bash}
38 .else
39 BASH?=                  ${TOOLS_PREFIX.bash}/bin/bash
40 TOOLS_FIND_PREFIX+=     TOOLS_PREFIX.bash=bash
41 .endif
42
43 ## Our threading check here is the same as the one used in devel/perl5.
44 #
45 CHECK_BUILTIN.pthread:=yes
46 .  include "../../mk/pthread.builtin.mk"
47 CHECK_BUILTIN.pthread:=no
48
49 ## XXX I'm following the USE_FEATURES semantics used in security/openssl.
50 #
51 .if !empty(USE_BUILTIN.pthread:tl:Myes)
52 USE_FEATURES.dar=       threads
53 .else
54 USE_FEATURES.dar=       # empty
55 .endif
56
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
62
63 .include "../../mk/bsd.options.mk"
64
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.
70 #
71 DARBITS=                ${PKG_OPTIONS:C/[^[:digit:]]*//:M[36][24]}
72 PLIST_SUBST+=           DARBITS=${DARBITS}
73
74 .if !empty(DARBITS)
75 CONFIGURE_ARGS+=        --enable-mode=${DARBITS:Q}
76 .endif
77
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.
82 #
83 .if !empty(PKG_OPTIONS:Mthreads)
84 USE_FEATURES.openssl+=  threads
85 PTHREAD_AUTO_VARS=      yes
86 BUILDLINK_TRANSFORM+=   rm:-lpthread
87 .else
88 CONFIGURE_ARGS+=        --disable-thread-safe
89 .endif
90
91 UNLIMIT_RESOURCES=      datasize
92
93 ## XXX Needed for getopt() with SunPro (USE_FEATURES?)
94 #
95 CPPFLAGS.SunOS+=        -D__EXTENSIONS__
96
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"
102
103 .include "../../mk/bsd.pkg.mk"