diff options
author | Jun Kuriyama <kuriyama@FreeBSD.org> | 2012-08-23 01:16:12 +0000 |
---|---|---|
committer | Jun Kuriyama <kuriyama@FreeBSD.org> | 2012-08-23 01:16:12 +0000 |
commit | 1c77657820eb1162d7211025a1bf437e62d891dd (patch) | |
tree | afd97d6d4715aa2c1178d5281f5f423d4e6f0894 /emulators/virtio-kmod | |
parent | 6e18e991c9e383a07ad9d8075d1bfe2ed39013d2 (diff) | |
download | ports-1c77657820eb1162d7211025a1bf437e62d891dd.tar.gz ports-1c77657820eb1162d7211025a1bf437e62d891dd.zip |
Notes
Diffstat (limited to 'emulators/virtio-kmod')
-rw-r--r-- | emulators/virtio-kmod/Makefile | 42 | ||||
-rw-r--r-- | emulators/virtio-kmod/distinfo | 10 | ||||
-rw-r--r-- | emulators/virtio-kmod/files/extra-patch-virtio.h | 13 |
3 files changed, 43 insertions, 22 deletions
diff --git a/emulators/virtio-kmod/Makefile b/emulators/virtio-kmod/Makefile index 0ae05c4ac27f..b5f6d12fae83 100644 --- a/emulators/virtio-kmod/Makefile +++ b/emulators/virtio-kmod/Makefile @@ -7,11 +7,11 @@ PORTNAME= virtio PORTVERSION= 0.${SVN_REV} -PORTREVISION= 1 CATEGORIES= emulators kld MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= kuriyama -PKGNAMESUFFIX= -kmod +PKGNAMESUFFIX= -kmod-${OSBRANCH} +DISTFILES= ${FILE_8} ${FILE_9} MAINTAINER= kuriyama@FreeBSD.org COMMENT= virtio kernel modules port for 8.[23]/9.0 @@ -19,7 +19,6 @@ COMMENT= virtio kernel modules port for 8.[23]/9.0 ONLY_FOR_ARCHS= amd64 i386 WRKSRC= ${WRKDIR} -SVN_REV= 234349 KMODDIR?= /boot/modules PLIST_SUB= KMODDIR=${KMODDIR:C,^/,,} NEEDSUBDIRS= amd64 conf contrib dev/pci geom i386 kern net netinet netinet6 \ @@ -31,21 +30,28 @@ NEEDSUBDIRS= amd64 conf contrib dev/pci geom i386 kern net netinet netinet6 \ IGNORE= requires kernel source to be installed .endif -.if ${OSREL} != "8.2" && ${OSREL} != "8.3" && ${OSREL} != "9.0" +SVN_REV= 239473 +FILE_8= ${PORTNAME}-8-0.${SVN_REV}${EXTRACT_SUFX} +FILE_9= ${PORTNAME}-9-0.${SVN_REV}${EXTRACT_SUFX} +.if ${OSREL} == "8.2" || ${OSREL} == "8.3" +OSBRANCH= 8 +EXTRACT_ONLY= ${FILE_8} +.elif ${OSREL} == "9.0" || ${OSREL} == "9.1" +OSBRANCH= 9 +EXTRACT_ONLY= ${FILE_9} +.else IGNORE= not supported $${OSREL} (${OSREL}) .endif -.if ${OSREL} == "8.2" -SVN_REV= 228301 -#SVN_REV= 232470 -#SVN_REV= 228301 -.endif post-extract: cd ${WRKSRC} && ${MKDIR} sys/dev tmp && ${MV} dev modules tmp/ .for d in ${NEEDSUBDIRS} - ${CP} -Rp ${SRC_BASE}/sys/${d} ${WRKSRC}/sys/${d} + [ ! -d ${SRC_BASE}/sys/${d} ] || ${CP} -Rp ${SRC_BASE}/sys/${d} ${WRKSRC}/sys/${d} .endfor ${CP} -Rp ${WRKSRC}/tmp/* ${WRKSRC}/sys/ +.if ${OSREL} == "8.1" || ${OSREL} == "8.2" +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-virtio.h +.endif do-build: cd ${WRKSRC}/sys/modules/virtio; ${MAKE} DEBUG_FLAGS=-g @@ -65,13 +71,17 @@ SVN_MIRROR?= http://svn.freebsd.org/base EXPDIR= ${WRKSRC}/src/sys maintainer-tar: ${MKDIR} ${EXPDIR} - cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/head/sys/dev/virtio dev/virtio - cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/head/sys/modules/virtio modules/virtio - cd ${EXPDIR} && ${TAR} cfvz ${DISTDIR}/${DISTFILES} dev modules + cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/stable/9/sys/dev/virtio dev/virtio + cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/stable/9/sys/modules/virtio modules/virtio + cd ${EXPDIR} && ${TAR} cfvz ${DISTDIR}/${FILE_9} dev modules + cd ${EXPDIR} && ${RM} -rf dev modules + cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/stable/8/sys/dev/virtio dev/virtio + cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/stable/8/sys/modules/virtio modules/virtio + cd ${EXPDIR} && ${TAR} cfvz ${DISTDIR}/${FILE_8} dev modules maintainer-check: - @new=`svn log -ql 1 ${SVN_MIRROR}@HEAD head/sys/dev/virtio | ${GREP} -v ^- | ${SED} -e 's| .*||'`;\ - old="r${SVN_REV}";\ - if [ "$${new}" != "$${old}" ]; then ${ECHO_MSG} "New virtio rev: $${new}"; fi + @new=`svn log -ql 1 ${SVN_MIRROR}@HEAD head/sys/dev/virtio | ${GREP} -v ^- | ${SED} -e 's| .*||; s|r||'`;\ + old="${SVN_REV}";\ + if [ "$${new}" -gt "$${old}" ]; then ${ECHO_MSG} "New virtio rev: r$${new}"; fi .include <bsd.port.post.mk> diff --git a/emulators/virtio-kmod/distinfo b/emulators/virtio-kmod/distinfo index 8647af983e83..eb7a32184924 100644 --- a/emulators/virtio-kmod/distinfo +++ b/emulators/virtio-kmod/distinfo @@ -1,6 +1,4 @@ -SHA256 (virtio-0.234349.tar.gz) = a776b690c3936f859b4bec3e4157ee6f64789ded18388ec948b5828ba8c9483d -SIZE (virtio-0.234349.tar.gz) = 47044 -SHA256 (virtio-0.232470.tar.gz) = d9f933271977b4d63cfcc591291534b1b313b0a16e6e878bfa47f369b88681e2 -SIZE (virtio-0.232470.tar.gz) = 47396 -SHA256 (virtio-0.228301.tar.gz) = 022b05ce98a88096aacc331fb7ba122d935432a87100fcba6a3b3d7e9e9aa0d6 -SIZE (virtio-0.228301.tar.gz) = 47262 +SHA256 (virtio-8-0.239473.tar.gz) = b0325b7ee4e523ec921b16462cfe572e578e81e482f09f15711c18a6069338be +SIZE (virtio-8-0.239473.tar.gz) = 48662 +SHA256 (virtio-9-0.239473.tar.gz) = ba94122148360015c0b3866203a293bd8b90e1a8fa827e5026c7506e8e459564 +SIZE (virtio-9-0.239473.tar.gz) = 48249 diff --git a/emulators/virtio-kmod/files/extra-patch-virtio.h b/emulators/virtio-kmod/files/extra-patch-virtio.h new file mode 100644 index 000000000000..bd98750758a4 --- /dev/null +++ b/emulators/virtio-kmod/files/extra-patch-virtio.h @@ -0,0 +1,13 @@ +$FreeBSD$ + +--- sys/dev/virtio/virtio.h.orig 2012-08-22 09:25:24.732287379 +0900 ++++ sys/dev/virtio/virtio.h 2012-08-22 09:27:32.411327803 +0900 +@@ -150,4 +150,8 @@ + VIRTIO_RDWR_DEVICE_CONFIG(2, uint16_t); + VIRTIO_RDWR_DEVICE_CONFIG(4, uint32_t); + ++#ifndef DEVMETHOD_END ++#define DEVMETHOD_END { NULL, NULL } ++#endif ++ + #endif /* _VIRTIO_H_ */ |