1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00

Support STAGE

Fix build on HEAD and when gcc is unavailable

Approved by:	crees (mentor)
This commit is contained in:
Mark Felder 2013-10-31 11:02:05 +00:00
parent 5b54fe53d3
commit 97e207f1ce
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=332220
3 changed files with 36 additions and 15 deletions

View File

@ -13,7 +13,7 @@ COMMENT= Xen tools within FreeBSD domU
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${PORTVERSION}/ MASTER_SITES= http://bits.xensource.com/oss-xen/release/${PORTVERSION}/
DISTFILES= xen-${PORTVERSION}.tar.gz DISTFILES= xen-${PORTVERSION}.tar.gz
USE_GMAKE= yes USES= gmake
USE_PYTHON= yes USE_PYTHON= yes
ONLY_FOR_ARCHS= amd64 i386 ia64 ONLY_FOR_ARCHS= amd64 i386 ia64
@ -31,25 +31,22 @@ PLIST_FILES= lib/libxenstore.so.3.0 \
bin/xenstore-rm \ bin/xenstore-rm \
bin/xenstore-write bin/xenstore-write
NO_STAGE= yes
do-build: do-build:
cd ${WRKSRC}/tools && ${GMAKE} -C include cd ${WRKSRC}/tools && ${GMAKE} -C include
cd ${WRKSRC}/tools/misc && ${GMAKE} xen-detect cd ${WRKSRC}/tools/misc && ${GMAKE} xen-detect
cd ${WRKSRC}/tools/xenstore && ${GMAKE} clients cd ${WRKSRC}/tools/xenstore && ${GMAKE} clients
do-install: do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tools/misc/xen-detect ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/tools/misc/xen-detect ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/tools/xenstore/xenstore ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/tools/xenstore/xenstore ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/tools/xenstore/xenstore-control ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/tools/xenstore/xenstore-control ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/tools/xenstore/libxenstore.so.3.0 ${PREFIX}/lib ${INSTALL_PROGRAM} ${WRKSRC}/tools/xenstore/libxenstore.so.3.0 ${STAGEDIR}${PREFIX}/lib
${LN} -sf ${PREFIX}/bin/xenstore ${STAGEDIR}${PREFIX}/bin/xenstore-chmod
post-install: ${LN} -sf ${PREFIX}/bin/xenstore ${STAGEDIR}${PREFIX}/bin/xenstore-exists
${LN} -sf ${PREFIX}/bin/xenstore ${PREFIX}/bin/xenstore-chmod ${LN} -sf ${PREFIX}/bin/xenstore ${STAGEDIR}${PREFIX}/bin/xenstore-list
${LN} -sf ${PREFIX}/bin/xenstore ${PREFIX}/bin/xenstore-exists ${LN} -sf ${PREFIX}/bin/xenstore ${STAGEDIR}${PREFIX}/bin/xenstore-ls
${LN} -sf ${PREFIX}/bin/xenstore ${PREFIX}/bin/xenstore-list ${LN} -sf ${PREFIX}/bin/xenstore ${STAGEDIR}${PREFIX}/bin/xenstore-read
${LN} -sf ${PREFIX}/bin/xenstore ${PREFIX}/bin/xenstore-ls ${LN} -sf ${PREFIX}/bin/xenstore ${STAGEDIR}${PREFIX}/bin/xenstore-rm
${LN} -sf ${PREFIX}/bin/xenstore ${PREFIX}/bin/xenstore-read ${LN} -sf ${PREFIX}/bin/xenstore ${STAGEDIR}${PREFIX}/bin/xenstore-write
${LN} -sf ${PREFIX}/bin/xenstore ${PREFIX}/bin/xenstore-rm
${LN} -sf ${PREFIX}/bin/xenstore ${PREFIX}/bin/xenstore-write
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -0,0 +1,14 @@
--- Config.mk.orig 2013-10-30 14:55:12.664590030 -0500
+++ Config.mk 2013-10-30 14:55:29.462580127 -0500
@@ -13,9 +13,8 @@
SHELL ?= /bin/sh
# Tools to run on system hosting the build
-HOSTCC = gcc
-HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-HOSTCFLAGS += -fno-strict-aliasing
+HOSTCC = ${CC}
+HOSTCFLAGS = ${CFLAGS}
DISTDIR ?= $(XEN_ROOT)/dist
DESTDIR ?= /

View File

@ -0,0 +1,10 @@
--- config/StdGNU.mk.orig 2013-10-30 14:56:35.070570838 -0500
+++ config/StdGNU.mk 2013-10-30 14:56:42.021581306 -0500
@@ -1,6 +1,6 @@
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
-CC = $(CROSS_COMPILE)gcc
+CC ?= $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
RANLIB = $(CROSS_COMPILE)ranlib