aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2014-08-04 01:33:22 +0800
committerdinoex <dinoex@FreeBSD.org>2014-08-04 01:33:22 +0800
commitccc8f2414e6fa8f051a17c09ab78d878704c9a7e (patch)
treeef125f3a6d2087276a27cf1c0d046d7f96f5582b /emulators
parent9211e45604005e64da01e3d162863e0e41e43459 (diff)
downloadfreebsd-ports-gnome-ccc8f2414e6fa8f051a17c09ab78d878704c9a7e.tar.gz
freebsd-ports-gnome-ccc8f2414e6fa8f051a17c09ab78d878704c9a7e.tar.zst
freebsd-ports-gnome-ccc8f2414e6fa8f051a17c09ab78d878704c9a7e.zip
- fix iconv on FreeBSD-10
- fix build when CFLAGS is set in /etc/make.conf - support build on amd64 when lib32 is present
Diffstat (limited to 'emulators')
-rw-r--r--emulators/vmw/Makefile26
-rw-r--r--emulators/vmw/files/patch-Makefile.FreeBSD23
2 files changed, 41 insertions, 8 deletions
diff --git a/emulators/vmw/Makefile b/emulators/vmw/Makefile
index ef50a73152c5..37f6e738cf05 100644
--- a/emulators/vmw/Makefile
+++ b/emulators/vmw/Makefile
@@ -8,10 +8,12 @@ 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
+ONLY_FOR_ARCHS= i386 amd64
WRKSRC= ${WRKDIR}/${PORTNAME}/src
USES= iconv
+MAKE_ENV+= __MAKE_CONF=/dev/null ASFLAGS="${ASFLAGS}"
+MAKE_ENV+= LD="${CC}"
SBINS= vmw vmshrink vmftp
@@ -25,6 +27,26 @@ PORTDOCS+= ${i}-eucj.txt ${i}-sjis.txt ${i}.txt
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 ${OSVERSION} < 1000000
+IGNORE= needs 32bit libiconv
+.endif
+CFLAGS+= -m32
+ASFLAGS+= --32
+LDFLAGS+= -m32 -B/usr/lib32 -L/usr/lib32
+LD= ${CC}
+.endif
+
+.if ${OSVERSION} > 1000000
+FTPLIB=
+MAKE_ENV+= FTPLIB="${FTPLIB}"
+.endif
+
do-install:
.for i in ${SBINS}
${INSTALL_PROGRAM} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/sbin/
@@ -32,4 +54,4 @@ do-install:
${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC}/.. && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/)
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/emulators/vmw/files/patch-Makefile.FreeBSD b/emulators/vmw/files/patch-Makefile.FreeBSD
index 50e610cbfa6a..bd980cc53fae 100644
--- a/emulators/vmw/files/patch-Makefile.FreeBSD
+++ b/emulators/vmw/files/patch-Makefile.FreeBSD
@@ -1,12 +1,13 @@
---- Makefile.FreeBSD.orig 2014-07-29 21:08:54.000000000 -0400
-+++ Makefile.FreeBSD 2014-07-29 21:11:09.000000000 -0400
-@@ -2,13 +2,13 @@
+--- Makefile.FreeBSD.orig 2006-03-17 21:17:36.000000000 +0100
++++ Makefile.FreeBSD 2014-08-03 18:48:01.000000000 +0200
+@@ -2,14 +2,14 @@
#
# Copyright (c) 2006 Ken Kato
-AS = as
+-ASFLAGS =
+AS ?= as
- ASFLAGS =
++ASFLAGS ?=
-CC = gcc
-CFLAGS = -O2
@@ -14,7 +15,17 @@
+CFLAGS ?= -O2
-LD = gcc
-+LD = ${CC}
- LDFLAGS =
+-LDFLAGS =
++LD ?= ${CC}
++LDFLAGS ?=
# replace the following line if you prefer inline version
+ # of vmcall functions (vmcall.c) -- works only with gcc
+@@ -20,6 +20,6 @@
+
+ VMWLIB =
+ SHRLIB =
+-FTPLIB = -L/usr/local/lib -liconv
++FTPLIB ?= -L/usr/local/lib -liconv
+
+ include Makefile.inc