1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

- fix iconv on FreeBSD-10

- fix build when CFLAGS is set in /etc/make.conf
- support build on amd64 when lib32 is present
This commit is contained in:
Dirk Meyer 2014-08-03 17:33:22 +00:00
parent 5ca0dcc8c6
commit 8233c282c0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=363926
2 changed files with 41 additions and 8 deletions

View File

@ -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>

View File

@ -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