Files
ports/emulators/vmw/Makefile
Tijl Coosemans d7511b9d00 Mk/bsd.port.mk: Add __MAKE_CONF=${NONEXISTENT} to WRK_ENV
And remove it from individual ports.  Use WRK_ENV in custom build
commands where necessary.

FreeBSD make(1) includes /usr/share/mk/sys.mk and that includes
/etc/make.conf if it exists.  This happens when you run make in a port
directory but it also happens when the upstream build system uses make.
This commit disables make.conf inclusion in the latter case because
users can define variables like CFLAGS in make.conf that override ports
framework variables and this can cause problems that are difficult to
diagnose.

If there are any build customisations made through make.conf that stop
working because of this commit then they should be made available by the
ports tree through some mechanism, e.g. an option in a port.

Some ports were picking up variables from Poudriere make.conf and
required fixes:

- astro/wmspaceweather x11-clocks/wmcalclock: Add OPSYS to MAKE_ENV.
- games/zhlt: Add ARCH to MAKE_ENV.
- graphics/tachyon: Upstream ARCH is not ports tree ARCH.
  Set ALL_TARGET=bsd so upstream ARCH is defined correctly.
  Enable multi-threading support while here.

PR:		277455
Exp-run by:	antoine
2024-03-23 12:19:32 +01:00

62 lines
1.2 KiB
Makefile

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
WWW= https://sites.google.com/site/chitchatvmback/vmtools
ONLY_FOR_ARCHS= i386 amd64
BUILD_DEPENDS= as:devel/binutils
WRKSRC= ${WRKDIR}/${PORTNAME}/src
USES= iconv
MAKE_ENV+= 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>