diff --git a/sysutils/bhyve+/Makefile b/sysutils/bhyve+/Makefile index d418e71834f0..920d250e3171 100644 --- a/sysutils/bhyve+/Makefile +++ b/sysutils/bhyve+/Makefile @@ -1,91 +1,94 @@ PORTNAME= bhyve+ PORTVERSION= 0.1.0 CATEGORIES= sysutils MAINTAINER= pali.gabor@gmail.com COMMENT= BHyVe with unofficial extensions LICENSE= BSD2CLAUSE ONLY_FOR_ARCHS= amd64 USES= kmod uidfix .include SRCS= ${SRC_BASE}/sys/modules/vmm \ ${SRC_BASE}/sys/amd64/vmm \ ${SRC_BASE}/lib/libvmmapi \ ${SRC_BASE}/usr.sbin/bhyve \ ${SRC_BASE}/usr.sbin/bhyvectl \ ${SRC_BASE}/usr.sbin/bhyveload \ - ${SRC_BASE}/share/mk + ${SRC_BASE}/share/mk \ + ${SRC_BASE}/contrib/bmake/mk .for _src in ${SRCS} . if !exists(${_src}) && empty(IGNORE) IGNORE+= requires bhyve and vmm source files in ${_src} . endif .endfor USE_GITHUB= yes GH_ACCOUNT= conclusiveeng GH_PROJECT= lib9p GH_TAGNAME= 7ef466772108856ee3e093735033232a6f1a3f04 USE_LDCONFIG= yes .if 1200000 <= ${OSVERSION} && ${OSVERSION} < 1300000 EXTRA_PATCHES= ${PATCHDIR}/freebsd-12 ${PATCHDIR}/freebsd-12/3 -.elif 1300000 <= ${OSVERSION} && ${OSVERSION} < 1400000 -EXTRA_PATCHES= ${PATCHDIR}/freebsd-13 +.elif 1300000 <= ${OSVERSION} && ${OSVERSION} < 1301000 +EXTRA_PATCHES= ${PATCHDIR}/freebsd-13/0 +.elif 1301000 <= ${OSVERSION} && ${OSVERSION} < 1400000 +EXTRA_PATCHES= ${PATCHDIR}/freebsd-13/1 .elif 1400000 <= ${OSVERSION} && ${OSVERSION} < 1500000 EXTRA_PATCHES= ${PATCHDIR}/freebsd-14 .else . if empty(IGNORE) IGNORE+= cannot build: unsupported system . endif .endif WRKSRC= ${WRKDIR} _LINKS= sys/cam/ctl \ sys/dev/e1000 \ sys/dev/mii \ sys/dev/usb/controller \ sys/dev/virtio \ sys/amd64/include \ sys/x86/include \ stand/userboot post-extract: @${MKDIR} ${WRKSRC}/contrib @cd ${WRKSRC} && ${LN} -s ../${GH_PROJECT}-${GH_TAGNAME} contrib/lib9p .for _link in ${_LINKS} @${MKDIR} $$(dirname ${WRKSRC}/${_link}) @cd ${WRKSRC} && ${LN} -s ${SRC_BASE}/${_link} ${_link} .endfor .for _src in ${SRCS} @cd ${_src} && ${COPYTREE_SHARE} . ${WRKDIR}/${_src:S/${SRC_BASE}//1} .endfor @cd ${FILESDIR} && ${COPYTREE_SHARE} kernconf ${WRKSRC} do-build: @cd ${WRKSRC}/contrib/lib9p && \ ${MAKE} SRCTOP=${WRKSRC} SYSDIR=${SRC_BASE}/sys LIB9PDIR= .for _src in ${SRCS} . if exists(${_src}/Makefile) @cd ${WRKSRC}/${_src:S/${SRC_BASE}//1} && \ ${MAKE} SRCTOP=${WRKSRC} SYSDIR=${SRC_BASE}/sys DEBUG_FLAGS=-g \ MK_CTF=yes KERNBUILDDIR=${WRKSRC}/kernconf . endif .endfor do-install: ${INSTALL_LIB} ${WRKSRC}/contrib/lib9p/lib9p.so.1.1 ${STAGEDIR}${PREFIX}/lib ${INSTALL_LIB} ${WRKSRC}/lib/libvmmapi/libvmmapi.so.5.1 ${STAGEDIR}${PREFIX}/lib .for _bin in bhyve bhyveload bhyvectl ${INSTALL_PROGRAM} ${WRKSRC}/usr.sbin/${_bin}/${_bin} ${STAGEDIR}${PREFIX}/sbin ${INSTALL_MAN} ${WRKSRC}/usr.sbin/${_bin}/${_bin}.8.gz ${STAGEDIR}${PREFIX}/man/man8 .endfor ${INSTALL_KLD} ${WRKSRC}/sys/modules/vmm/vmm.ko ${STAGEDIR}${KMODDIR} .include diff --git a/sysutils/bhyve+/files/freebsd-13/patch-custom-libs b/sysutils/bhyve+/files/freebsd-13/0/patch-custom-libs similarity index 100% copy from sysutils/bhyve+/files/freebsd-13/patch-custom-libs copy to sysutils/bhyve+/files/freebsd-13/0/patch-custom-libs diff --git a/sysutils/bhyve+/files/freebsd-13/patch-lib9p b/sysutils/bhyve+/files/freebsd-13/0/patch-lib9p similarity index 100% rename from sysutils/bhyve+/files/freebsd-13/patch-lib9p rename to sysutils/bhyve+/files/freebsd-13/0/patch-lib9p diff --git a/sysutils/bhyve+/files/freebsd-13/patch-libvmmapi b/sysutils/bhyve+/files/freebsd-13/0/patch-libvmmapi similarity index 100% rename from sysutils/bhyve+/files/freebsd-13/patch-libvmmapi rename to sysutils/bhyve+/files/freebsd-13/0/patch-libvmmapi diff --git a/sysutils/bhyve+/files/freebsd-13/patch-msi-x-mappings b/sysutils/bhyve+/files/freebsd-13/0/patch-msi-x-mappings similarity index 100% rename from sysutils/bhyve+/files/freebsd-13/patch-msi-x-mappings rename to sysutils/bhyve+/files/freebsd-13/0/patch-msi-x-mappings diff --git a/sysutils/bhyve+/files/freebsd-13/patch-custom-libs b/sysutils/bhyve+/files/freebsd-13/1/patch-custom-libs similarity index 50% rename from sysutils/bhyve+/files/freebsd-13/patch-custom-libs rename to sysutils/bhyve+/files/freebsd-13/1/patch-custom-libs index aa5772dc0511..cee70aee6367 100644 --- a/sysutils/bhyve+/files/freebsd-13/patch-custom-libs +++ b/sysutils/bhyve+/files/freebsd-13/1/patch-custom-libs @@ -1,21 +1,21 @@ ---- usr.sbin/bhyve/Makefile.orig 2021-09-04 02:15:16.364660000 +0200 -+++ usr.sbin/bhyve/Makefile 2021-09-04 02:21:26.014446000 +0200 +--- usr.sbin/bhyve/Makefile.orig 2022-04-26 00:11:28.231312000 +0000 ++++ usr.sbin/bhyve/Makefile 2022-04-26 00:12:31.807022000 +0000 @@ -3,7 +3,7 @@ # .include -CFLAGS+=-I${.CURDIR}/../../contrib/lib9p +CFLAGS+=-I${SRCTOP}/contrib/lib9p CFLAGS+=-I${SRCTOP}/sys .PATH: ${SRCTOP}/sys/cam/ctl -@@ -83,7 +83,8 @@ +@@ -84,7 +84,8 @@ .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm SRCS+= vmm_instruction_emul.c --LIBADD= vmmapi md pthread z util sbuf cam 9p -+LIBADD= md pthread z util sbuf cam -+LDADD= ../../contrib/lib9p/lib9p.so.1.1 ../../lib/libvmmapi/libvmmapi.so.5.1 +-LIBADD= vmmapi md nv pthread z util sbuf cam 9p ++LIBADD= md nv pthread z util sbuf cam ++LDADD= ../../contrib/lib9p/lib9p.so.1.1 ../../lib/libvmmapi/libvmmapi.so.5.1 .if ${MK_CASPER} != "no" LIBADD+= casper diff --git a/sysutils/bhyve+/files/freebsd-13/1/patch-lib9p b/sysutils/bhyve+/files/freebsd-13/1/patch-lib9p new file mode 100644 index 000000000000..b60692f4f5a5 --- /dev/null +++ b/sysutils/bhyve+/files/freebsd-13/1/patch-lib9p @@ -0,0 +1,12 @@ +--- share/mk/src.libnames.mk.orig 2022-04-26 00:33:13.464870000 +0000 ++++ share/mk/src.libnames.mk 2022-04-26 00:34:36.615330000 +0000 +@@ -265,6 +265,9 @@ + # 2nd+ order consumers. Auto-generating this would be better. + _DP_80211= sbuf bsdxml + _DP_9p= sbuf ++.if ${MK_CASPER} != "no" ++_DP_9p+= casper cap_pwd cap_grp ++.endif + # XXX: Not bootstrapped so uses host version on non-FreeBSD, so don't use a + # FreeBSD-specific dependency list + .if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) diff --git a/sysutils/bhyve+/files/freebsd-13/1/patch-libvmmapi b/sysutils/bhyve+/files/freebsd-13/1/patch-libvmmapi new file mode 100644 index 000000000000..5bb87bd36d46 --- /dev/null +++ b/sysutils/bhyve+/files/freebsd-13/1/patch-libvmmapi @@ -0,0 +1,34 @@ +--- usr.sbin/bhyvectl/Makefile.orig 2022-04-26 00:35:36.192928000 +0000 ++++ usr.sbin/bhyvectl/Makefile 2022-04-26 00:36:35.181368000 +0000 +@@ -10,7 +10,8 @@ + + MAN= bhyvectl.8 + +-LIBADD= vmmapi util ++LIBADD= util ++LDADD= ../../lib/libvmmapi/libvmmapi.so.5.1 + + WARNS?= 3 + +--- usr.sbin/bhyveload/Makefile.orig 2022-04-26 00:36:44.251099000 +0000 ++++ usr.sbin/bhyveload/Makefile 2022-04-26 00:37:15.919627000 +0000 +@@ -5,7 +5,7 @@ + MAN= bhyveload.8 + PACKAGE= bhyve + +-LIBADD= vmmapi ++LDADD= ../../lib/libvmmapi/libvmmapi.so.5.1 + + WARNS?= 3 + +--- lib/libvmmapi/Makefile.orig 2022-04-26 00:37:35.557718000 +0000 ++++ lib/libvmmapi/Makefile 2022-04-26 00:38:23.135897000 +0000 +@@ -5,6 +5,8 @@ + SRCS= vmmapi.c vmmapi_freebsd.c + INCS= vmmapi.h + ++SHLIB_MAJOR?= 5.1 ++ + LIBADD= util + + CFLAGS+= -I${.CURDIR}