Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / sysutils / heirloom-doc / Makefile.common
blob2743c0a9d09252f1f4c00b8d582c5dc24818d05d
1 # $NetBSD: Makefile.common,v 1.3 2011/10/09 10:02:45 cheusov Exp $
2 # used by archivers/heirloom-tar/Makefile
3 # used by devel/heirloom-common/Makefile
4 # used by devel/heirloom-getopt/Makefile
5 # used by devel/heirloom-libcommon/Makefile
6 # used by devel/heirloom-what/Makefile
7 # used by devel/libuxre/Makefile
8 # used by lang/heirloom-awk/Makefile
9 # used by math/heirloom-factor/Makefile
10 # used by math/heirloom-units/Makefile
11 # used by misc/heirloom-banner/Makefile
12 # used by misc/heirloom-cal/Makefile
13 # used by misc/heirloom-calendar/Makefile
14 # used by misc/heirloom-hd/Makefile
15 # used by misc/heirloom-more/Makefile
16 # used by misc/heirloom-od/Makefile
17 # used by misc/heirloom-printenv/Makefile
18 # used by misc/heirloom-printf/Makefile
19 # used by misc/heirloom-random/Makefile
20 # used by misc/heirloom-sleep/Makefile
21 # used by misc/heirloom-sum/Makefile
22 # used by misc/heirloom-tcopy/Makefile
23 # used by misc/heirloom-time/Makefile
24 # used by news/heirloom-news/Makefile
25 # used by security/heirloom-su/Makefile
26 # used by sysutils/heirloom-basename/Makefile
27 # used by sysutils/heirloom-cat/Makefile
28 # used by sysutils/heirloom-chmod/Makefile
29 # used by sysutils/heirloom-chown/Makefile
30 # used by sysutils/heirloom-cksum/Makefile
31 # used by sysutils/heirloom-cmp/Makefile
32 # used by sysutils/heirloom-copy/Makefile
33 # used by sysutils/heirloom-cp/Makefile
34 # used by sysutils/heirloom-csplit/Makefile
35 # used by sysutils/heirloom-dd/Makefile
36 # used by sysutils/heirloom-dirname/Makefile
37 # used by sysutils/heirloom-doc/Makefile
38 # used by sysutils/heirloom-du/Makefile
39 # used by sysutils/heirloom-env/Makefile
40 # used by sysutils/heirloom-file/Makefile
41 # used by sysutils/heirloom-find/Makefile
42 # used by sysutils/heirloom-getconf/Makefile
43 # used by sysutils/heirloom-groups/Makefile
44 # used by sysutils/heirloom-hostname/Makefile
45 # used by sysutils/heirloom-id/Makefile
46 # used by sysutils/heirloom-listusers/Makefile
47 # used by sysutils/heirloom-ln/Makefile
48 # used by sysutils/heirloom-logins/Makefile
49 # used by sysutils/heirloom-logname/Makefile
50 # used by sysutils/heirloom-ls/Makefile
51 # used by sysutils/heirloom-mesg/Makefile
52 # used by sysutils/heirloom-mkdir/Makefile
53 # used by sysutils/heirloom-mkfifo/Makefile
54 # used by sysutils/heirloom-mknod/Makefile
55 # used by sysutils/heirloom-nice/Makefile
56 # used by sysutils/heirloom-nohup/Makefile
57 # used by sysutils/heirloom-pathchk/Makefile
58 # used by sysutils/heirloom-pgrep/Makefile
59 # used by sysutils/heirloom-priocntl/Makefile
60 # used by sysutils/heirloom-ps/Makefile
61 # used by sysutils/heirloom-psrinfo/Makefile
62 # used by sysutils/heirloom-pwd/Makefile
63 # used by sysutils/heirloom-renice/Makefile
64 # used by sysutils/heirloom-rm/Makefile
65 # used by sysutils/heirloom-rmdir/Makefile
66 # used by sysutils/heirloom-setpgrp/Makefile
67 # used by sysutils/heirloom-shl/Makefile
68 # used by sysutils/heirloom-sleep/Makefile
69 # used by sysutils/heirloom-sort/Makefile
70 # used by sysutils/heirloom-split/Makefile
71 # used by sysutils/heirloom-stty/Makefile
72 # used by sysutils/heirloom-sync/Makefile
73 # used by sysutils/heirloom-tapecntl/Makefile
74 # used by sysutils/heirloom-tee/Makefile
75 # used by sysutils/heirloom-touch/Makefile
76 # used by sysutils/heirloom-tsort/Makefile
77 # used by sysutils/heirloom-tty/Makefile
78 # used by sysutils/heirloom-uname/Makefile
79 # used by sysutils/heirloom-uniq/Makefile
80 # used by sysutils/heirloom-users/Makefile
81 # used by sysutils/heirloom-wc/Makefile
82 # used by sysutils/heirloom-who/Makefile
83 # used by sysutils/heirloom-whoami/Makefile
84 # used by sysutils/heirloom-whodo/Makefile
85 # used by sysutils/heirloom-xargs/Makefile
86 # used by sysutils/heirloom-yes/Makefile
87 # used by textproc/heirloom-bdiff/Makefile
88 # used by textproc/heirloom-bfs/Makefile
89 # used by textproc/heirloom-col/Makefile
90 # used by textproc/heirloom-comm/Makefile
91 # used by textproc/heirloom-cut/Makefile
92 # used by textproc/heirloom-diff3/Makefile
93 # used by textproc/heirloom-ed/Makefile
94 # used by textproc/heirloom-fmt/Makefile
95 # used by textproc/heirloom-fold/Makefile
96 # used by textproc/heirloom-grep/Makefile
97 # used by textproc/heirloom-head/Makefile
98 # used by textproc/heirloom-join/Makefile
99 # used by textproc/heirloom-line/Makefile
100 # used by textproc/heirloom-nl/Makefile
101 # used by textproc/heirloom-paste/Makefile
102 # used by textproc/heirloom-pg/Makefile
103 # used by textproc/heirloom-pr/Makefile
104 # used by textproc/heirloom-sdiff/Makefile
105 # used by textproc/heirloom-sed/Makefile
106 # used by textproc/heirloom-tail/Makefile
107 # used by textproc/heirloom-tr/Makefile
108 # used by textproc/heirloom-ul/Makefile
109 # used by textproc/heirloom-uniq/Makefile
110 # used by textproc/heirloom-wc/Makefile
111 # used by time/heirloom-date/Makefile
113 DISTNAME=       heirloom-${HEIRLOOM_VER}
114 MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE:=heirloom/}
115 EXTRACT_SUFX=   .tar.bz2
116 HOMEPAGE=       http://heirloom.sourceforge.net/
117 MAINTAINER=     cheusov@NetBSD.org
118 COMMENT?=       Collection of standard Unix utilities (${PKGBASE:S/heirloom-//})
120 HEIRLOOM_VER=           070715
122 PATCHDIR=       ${.CURDIR}/../../sysutils/heirloom-doc/patches
123 DISTINFO_FILE=  ${.CURDIR}/../../sysutils/heirloom-doc/distinfo
125 CONFLICTS+=     heirloom-toolchest-[0-9]*
127 DESCR_SRC=      ${.CURDIR}/../../sysutils/heirloom-doc/DESCR.common
129 MAKE_FILE=      makefile.hl
130 HLROOT=         heirloom
131 PLIST_SUBST+=   HLROOT=${HLROOT}
133 .include "../../mk/bsd.prefs.mk"
135 CFLAGS.Linux+=          -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64L
136 CFLAGS.Interix+=        -Dstrtoll=strtol -Dstrtoull=strtoul
137 CFLAGS.Interix+=        -Dintptr_t=int -Datoll=atol -Dinitgroups="(0)"
139 .if ${NEED_LIBKVM:U0}
140 LDFLAGS.NetBSD+=        -lkvm
141 LDFLAGS.FreeBSD+=       -lkvm
142 LDFLAGS.OpenBSD+=       -lkvm
143 LDFLAGS.DragonFly+=     -lkvm
144 .endif
146 .if ${NEED_LIBSOCKET:U0}
147 LDFLAGS.SunOS+=         -lsocket
148 .endif
150 .if ${NEED_LIBCRYPT:U0}
151 LCRYPT= -lcrypt
152 .  if ${OPSYS} == "OpenBSD"
153 LCRYPT=
154 .  endif
155 .endif
157 .if ${NEED_LIBCURSES:U0}
158 LCURS=-lcurses
160 .  if ${OPSYS} == "NetBSD"
161 CFLAGS+=        -DUSE_TERMCAP
162 LCURS=          -ltermcap
163 .  endif
164 .endif
166 .if ${NEED_ZLIB:U0}
167 LDFLAGS+=       -lz
168 .endif
170 .if ${NEED_BZLIB:U0}
171 LDFLAGS+=       -lbz2
172 .endif
174 HLPREFIX=       ${PREFIX:Q}/${HLROOT}
176 MAKE_FLAGS+=    UCBINST=${INSTALL:Q}
177 MAKE_FLAGS+=    ROOT=${DESTDIR}
178 MAKE_FLAGS+=    DEFBIN=${HLPREFIX:Q}/bin
179 MAKE_FLAGS+=    SV3BIN=${HLPREFIX:Q}/bin
180 MAKE_FLAGS+=    S42BIN=${HLPREFIX:Q}/bin/s42
181 MAKE_FLAGS+=    SUSBIN=${HLPREFIX:Q}/bin/posix
182 MAKE_FLAGS+=    SU3BIN=${HLPREFIX:Q}/bin/posix2001
183 MAKE_FLAGS+=    UCBBIN=${HLPREFIX:Q}/ucb
184 MAKE_FLAGS+=    CCSBIN=${HLPREFIX:Q}/bin/ccs
185 MAKE_FLAGS+=    DEFLIB=${HLPREFIX:Q}/lib
186 MAKE_FLAGS+=    DEFSBIN=${HLPREFIX:Q}/sbin
187 MAKE_FLAGS+=    MANDIR=${HLPREFIX:Q}/man
188 MAKE_FLAGS+=    DFLDIR=${HLPREFIX:Q}/etc/default
189 MAKE_FLAGS+=    SPELLHIST=${HLPREFIX:Q}/var/adm/spellhist
190 MAKE_FLAGS+=    SULOG=${HLPREFIX:Q}/var/log/sulog
191 MAKE_FLAGS+=    MANINST=${INSTALL_MAN:Q}
192 MAKE_FLAGS+=    LCURS=${LCURS}
193 MAKE_FLAGS+=    LIBZ=-lz
194 MAKE_FLAGS+=    USE_ZLIB=${USE_ZLIB}
195 MAKE_FLAGS+=    LIBBZ2=-lbz2
196 MAKE_FLAGS+=    USE_BZLIB=${USE_BZLIB}
197 MAKE_FLAGS+=    LD=${CC:Q}
198 MAKE_FLAGS+=    LDFLAGS=${LDFLAGS:Q}
199 MAKE_FLAGS+=    CPPFLAGS=${CPPFLAGS:Q}
200 MAKE_FLAGS+=    CFLAGS=${CFLAGS:Q}
201 MAKE_FLAGS+=    CFLAGSS=${CFLAGS:Q}
202 MAKE_FLAGS+=    CFLAGS2=${CFLAGS:Q}
203 MAKE_FLAGS+=    CFLAGS=${CFLAGS:Q}
204 MAKE_FLAGS+=    STRIP=true
205 MAKE_FLAGS+=    LCRYPT=${LCRYPT}
206 MAKE_FLAGS+=    UCBINST=${INSTALL:Q}
207 MAKE_FLAGS+=    ICOMMON=
208 MAKE_FLAGS+=    LCOMMON=
209 MAKE_FLAGS+=    IUXRE=
211 .if ${NEED_LIBUXRE:U0}
212 MAKE_FLAGS+=    LUXRE=-luxre
213 .endif
215 .if empty(PKGNAME:Mheirloom-doc-*)
216 MAKE_FLAGS+=    NO_INSTALL_INTRO=1
217 .endif
219 .if empty(PKGNAME:Mheirloom-doc-*) && empty(PKGNAME:Mheirloom-libcommon-*)
220 LDFLAGS+=       -lheirloomcommon
221 .endif
223 .if empty(PKGNAME:Mheirloom-doc-*)
224 DEPENDS+=       heirloom-doc-${HEIRLOOM_VER}:../../sysutils/heirloom-doc
225 .endif
227 # makefile.hl is for case insensitive HFS+ (Darwin)
228 .if ${NEED_PRE_BUILD:U1}
229 pre-build:
230         set -e; cd ${WRKSRC}; \
231         ${TEST} -f makefile.hl || mv makefile makefile.hl; \
232         ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} -f makefile.hl makefiles
233 .endif