summaryrefslogtreecommitdiff
path: root/sysutils/coreutils/Makefile
blob: 7efc2b87a1fc3d50272552e1c0647bc704bab5ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# $NetBSD: Makefile,v 1.44 2008/03/08 01:09:50 tnn Exp $

DISTNAME=	coreutils-6.10
CATEGORIES=	sysutils
MASTER_SITES=	${MASTER_SITE_GNU:=coreutils/}
#EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	tech-pkg@NetBSD.org
HOMEPAGE=	http://www.gnu.org/software/coreutils/
COMMENT=	GNU basic file, shell and text manipulation utilities

PKG_DESTDIR_SUPPORT=	user-destdir
NOT_FOR_PLATFORM=	NetBSD-2.0[D-H]-*

CONFLICTS=	fileutils-[0-9]* linuxls-[0-9]* sh-utils-[0-9]* textutils-[0-9]*

CFLAGS+=		-g
LDFLAGS+=		-g
GNU_CONFIGURE=		YES
USE_TOOLS+=		msgfmt msgmerge perl xgettext
USE_PKGLOCALEDIR=	YES

INFO_FILES=		# PLIST

TEST_TARGET=		check

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "Interix"
CONFIGURE_ENV+=		ac_list_mounted_fs=found
.endif

.if !empty(MACHINE_PLATFORM:MDarwin-[9].*-*)
CONFIGURE_ENV+=		 ac_cv_header_sys_acl_h=no jm_cv_func_svid_putenv=yes
.endif

# Exclude programs from PLIST which aren't built on a platform.
.if ${OPSYS} == "Interix"
PLIST_SUBST+=		COREUTILS_HAVE_HOSTID="@comment "
.else
PLIST_SUBST+=		COREUTILS_HAVE_HOSTID=""
.endif

# XXX - this hack is bound to cause fallout on some platform at some point.
# How can we determine the API version of the builtin gettext?
.if ${OPSYS} != "Linux"
CONFIGURE_ENV+=		gt_cv_func_gnugettext3_libintl=yes
.endif
CONFIGURE_ENV+=		MKDIR_P=${MKDIR:Q}

CONFIGURE_ARGS+=	--program-prefix=${GNU_PROGRAM_PREFIX:Q}
# if GNU_PROGRAM_PREFIX == 'g'
# devel/id-utils installs a 'gid' program, so conflict with it
# databases/geneweb a 'gwc' program, so conflict with it
# graphics/graphviz installs a 'gpr' program, so conflict with it
.if ${GNU_PROGRAM_PREFIX} == "g"
CONFLICTS+=		id-utils-[0-9]* gnome-utils<1.4.1.2nb2
CONFLICTS+=		geneweb-[0-9]*
CONFLICTS+=		graphviz<1.12
.endif
# print/teTeX-bin installed a 'readlink' program, so
# conflict with it if GNU_PROGRAM_PREFIX == '' (no problem in teTeX3-bin)
.if ${GNU_PROGRAM_PREFIX} == ""
CONFLICTS+=		teTeX-bin<3
CONFLICTS+=		mktemp-[0-9]*
.endif

PLIST_SUBST+=		GNU_PROGRAM_PREFIX=${GNU_PROGRAM_PREFIX:Q}
BUILD_DEFS+=		GNU_PROGRAM_PREFIX

#CONFIGURE_ARGS+=	--enable-install-program=su
#.if ${OPSYS} == "NetBSD" ||  ${OPSYS} == "FreeBSD" || \
#  ${OPSYS} == "OpenBSD"
#MAKE_FLAGS+=	setuid_root_mode=a=rx
#MESSAGE_SRC=	${.CURDIR}/MESSAGE.gsu
#MESSAGE_SUBST+=	OPSYS=${OPSYS:Q}
#.endif

.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"