summaryrefslogtreecommitdiff
path: root/emulators/vmw/Makefile
blob: 6c5e4eb50e09bb69e7cadac111006e764d56f73b (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

PORTNAME=	vmw
PORTVERSION=	060510
PORTREVISION=	2
CATEGORIES=	emulators
MASTER_SITES=	http://sites.google.com/site/chitchatvmback/storage/

MAINTAINER=	dinoex@FreeBSD.org
COMMENT=	VM Back Command Line Tools for VMware

ONLY_FOR_ARCHS=	i386 amd64

BUILD_DEPENDS=	as:devel/binutils

WRKSRC=		${WRKDIR}/${PORTNAME}/src
USES=		iconv
MAKE_ENV+=	__MAKE_CONF=/dev/null ASFLAGS="${ASFLAGS}"
MAKE_ENV+=	LD="${CC}"

SBINS=		vmw vmshrink vmftp

OPTIONS_DEFINE=	DOCS

PORTDOCS=	README-eucj.TXT README-sjis.TXT README.TXT
.for i in ${SBINS}
PORTDOCS+=	${i}-eucj.txt ${i}-sjis.txt ${i}.txt
.endfor
.for i in ${SBINS}
PLIST_FILES+=	sbin/${i}
.endfor

.include <bsd.port.pre.mk>

.if ${ARCH} == amd64
.if !exists(/usr/lib32/libc.so)
IGNORE=		please install lib32
.endif
.if !empty(ICONV_LIB)
IGNORE=		needs 32bit libiconv
.endif
CFLAGS+=	-m32
ASFLAGS+=	--32
LDFLAGS+=	-m32 -B/usr/lib32 -L/usr/lib32
LD=	${CC}
.endif

.if empty(ICONV_LIB)
FTPLIB=
MAKE_ENV+=	FTPLIB="${FTPLIB}"
.else
CFLAGS+=	-I${LOCALBASE}/include
.endif

do-install:
.for i in ${SBINS}
	${INSTALL_PROGRAM} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/sbin/
.endfor
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	(cd ${WRKSRC}/.. && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/)

.include <bsd.port.post.mk>