blob: 2496f498d134da47172571e8b8485390231c4419 (
plain) (
blame)
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
82
83
84
85
86
87
88
89
90
|
# New ports collection makefile for: di
# Date created: 31 August 2002
# Whom: Brad Lanam <bll@gentoo.com>
#
# $FreeBSD$
#
PORTNAME= di
PORTVERSION= 4.13
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.gentoo.com/di/ \
http://fresh.t-systems-sfr.com/unix/src/privat2/
MAINTAINER= cyberbotx@cyberbotx.com
COMMENT= Disk Information Utility
MAN1= di.1
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
PLIST_SUB= NLS=""
DI_BUILD_NO_NLS= 0
.else
DI_BUILD_NO_NLS= 1
PLIST_SUB= NLS="@comment "
.endif
USE_PERL5_BUILD= yes
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e "s|zoneid_t|zoneId_t|g" ${WRKSRC}/di.c
pre-configure:
@${CHMOD} +x ${WRKSRC}/Build
@${CHMOD} +x ${WRKSRC}/features/turnoffnls.sh
do-configure:
(cd ${WRKSRC}; \
${SETENV} ${MAKE_ENV} DI_BUILD_MKCONFIG_PL=1 \
CC="${CC}" LDFLAGS="${LDFLAGS}" \
prefix="${PREFIX}" LOCALEDIR="${PREFIX}/share/locale" \
DI_BUILD_NO_NLS=${DI_BUILD_NO_NLS} \
./Build config.h)
post-configure:
@${REINPLACE_CMD} -e "s|#define _lib_zone_list 1|#undef _lib_zone_list|" ${WRKSRC}/config.h
@${REINPLACE_CMD} -e "s|#define _lib_fs_stat_dev 1|#undef _lib_fs_stat_dev|" ${WRKSRC}/config.h
@${REINPLACE_CMD} -e "s|#define _lib_getvfsstat 1|#undef _lib_getvfsstat|" ${WRKSRC}/config.h
@${REINPLACE_CMD} -e "s|#define _lib_getmnt 1|#undef _lib_getmnt|" ${WRKSRC}/config.h
@${REINPLACE_CMD} -e "s|#define _lib_mntctl 1|#undef _lib_mntctl|" ${WRKSRC}/config.h
@${REINPLACE_CMD} -e "s|#define _lib_GetDiskFreeSpace 1|#undef _lib_GetDiskFreeSpace|" ${WRKSRC}/config.h
@${REINPLACE_CMD} -e "s|#define _lib_GetDriveType 1|#undef _lib_GetDriveType|" ${WRKSRC}/config.h
@${REINPLACE_CMD} -e "s|#define _lib_GetLogicalDriveStrings 1|#undef _lib_GetLogicalDriveStrings|" ${WRKSRC}/config.h
@${REINPLACE_CMD} -e "s|#define _lib_GetVolumeInformation 1|#undef _lib_GetVolumeInformation|" ${WRKSRC}/config.h
do-build:
(cd ${WRKSRC}; \
${SETENV} ${MAKE_ENV} \
CC="${CC}" LDFLAGS="${LDFLAGS}" \
prefix="${PREFIX}" LOCALEDIR="${PREFIX}/share/locale" \
DI_BUILD_NO_NLS=${DI_BUILD_NO_NLS} \
./Build)
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/di ${PREFIX}/bin
${LN} -sf ${PREFIX}/bin/di ${PREFIX}/bin/mi
${INSTALL_MAN} ${WRKSRC}/di.1 ${PREFIX}/man/man1
.if !defined(WITHOUT_NLS)
(cd ${WRKSRC}; \
${SETENV} ${MAKE_ENV} \
CC="${CC}" LDFLAGS="${LDFLAGS}" \
prefix="${PREFIX}" \
LOCALEDIR="${PREFIX}/share/locale" \
./Build build-po)
-(cd ${WRKSRC}/po;for i in *.po; do \
j=`echo $$i | ${SED} 's,\\.po$$,,'`; \
test -d ${PREFIX}/share/locale/$$j || \
${MKDIR} ${PREFIX}/share/locale/$$j; \
test -d ${PREFIX}/share/locale/$$j/LC_MESSAGES || \
${MKDIR} ${PREFIX}/share/locale/$$j/LC_MESSAGES; \
${INSTALL_DATA} $$j.mo \
${PREFIX}/share/locale/$$j/LC_MESSAGES/di.mo; \
${RM} -f $$j.mo; \
done)
.endif
.include <bsd.port.post.mk>
|