From 5a167b3879c0d509e66d746b4baca3eceaab69bb Mon Sep 17 00:00:00 2001 From: Juergen Lock Date: Sat, 14 Jul 2007 17:43:52 +0000 Subject: [PATCH] - Try and pass appropriate -DKSE and/or -DSMP to the compilation (missing -DKSE is what caused the panics on -current) - bump PORTREVISION - Update WWW (qemu.org still seems to be down) --- emulators/kqemu-kmod-devel/Makefile | 29 ++++++++++++++++++++++++++-- emulators/kqemu-kmod-devel/pkg-descr | 2 +- emulators/kqemu-kmod/Makefile | 29 ++++++++++++++++++++++++++-- emulators/kqemu-kmod/pkg-descr | 2 +- 4 files changed, 56 insertions(+), 6 deletions(-) diff --git a/emulators/kqemu-kmod-devel/Makefile b/emulators/kqemu-kmod-devel/Makefile index 7c2bf74358b9..281e501b2335 100644 --- a/emulators/kqemu-kmod-devel/Makefile +++ b/emulators/kqemu-kmod-devel/Makefile @@ -7,9 +7,10 @@ PORTNAME= kqemu PORTVERSION= 1.3.0.p11 +PORTREVISION= 1 CATEGORIES= emulators kld -MASTER_SITES= http://qemu.org/ \ - http://fabrice.bellard.free.fr/qemu/ \ +MASTER_SITES= http://fabrice.bellard.free.fr/qemu/ \ + http://qemu.org/ \ ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= nox PKGNAMESUFFIX= -kmod @@ -54,6 +55,30 @@ MAKE_ENV+= KMODDIR="${KMODDIR}" IGNORE= kqemu requires kernel source to be installed .endif +.if ${OSVERSION} >= 700024 && !defined(NOKSE) +# XXX this is wrong if you have `nooption KSE' in your kernel config, +# please define NOKSE in that case +CFLAGS+= -DKSE +.endif + +# XXX the following is wrong if you run a custom SMP kernel on a +# singleprocessor machine (but it probably doesn't really matter) +KERNCONF!= ${UNAME} -v | ${SED} 's-.*/--' +NCPU!= ${SYSCTL} -n hw.ncpu 2>/dev/null +# we know 7.x GENERIC has SMP +.if ${KERNCONF} == "GENERIC" && ${OSVERSION} >= 700000 +CFLAGS+= -DSMP +.elif ${NCPU} > 1 +CFLAGS+= -DSMP +.endif + +post-extract: +.if ${OSVERSION} >= 700024 && !defined(NOKSE) + @${ECHO_MSG} "Compiling with -DKSE." + @${ECHO_MSG} "If this is wrong (i.e. you have \`nooption KSE' in your kernel config)," + @${ECHO_MSG} "then please define NOKSE." +.endif + do-build: @(cd ${BUILD_WRKSRC}/common; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} Makefile ${MAKE_ARGS} ${ALL_TARGET}) @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET}) diff --git a/emulators/kqemu-kmod-devel/pkg-descr b/emulators/kqemu-kmod-devel/pkg-descr index 4d41548f8f4b..2ca45618fce4 100644 --- a/emulators/kqemu-kmod-devel/pkg-descr +++ b/emulators/kqemu-kmod-devel/pkg-descr @@ -1,3 +1,3 @@ KQEMU is a qemu accelerator kernel module on x86/amd64. -WWW: http://qemu.org/qemu-accel.html +WWW: http://fabrice.bellard.free.fr/qemu/ diff --git a/emulators/kqemu-kmod/Makefile b/emulators/kqemu-kmod/Makefile index 7c2bf74358b9..281e501b2335 100644 --- a/emulators/kqemu-kmod/Makefile +++ b/emulators/kqemu-kmod/Makefile @@ -7,9 +7,10 @@ PORTNAME= kqemu PORTVERSION= 1.3.0.p11 +PORTREVISION= 1 CATEGORIES= emulators kld -MASTER_SITES= http://qemu.org/ \ - http://fabrice.bellard.free.fr/qemu/ \ +MASTER_SITES= http://fabrice.bellard.free.fr/qemu/ \ + http://qemu.org/ \ ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= nox PKGNAMESUFFIX= -kmod @@ -54,6 +55,30 @@ MAKE_ENV+= KMODDIR="${KMODDIR}" IGNORE= kqemu requires kernel source to be installed .endif +.if ${OSVERSION} >= 700024 && !defined(NOKSE) +# XXX this is wrong if you have `nooption KSE' in your kernel config, +# please define NOKSE in that case +CFLAGS+= -DKSE +.endif + +# XXX the following is wrong if you run a custom SMP kernel on a +# singleprocessor machine (but it probably doesn't really matter) +KERNCONF!= ${UNAME} -v | ${SED} 's-.*/--' +NCPU!= ${SYSCTL} -n hw.ncpu 2>/dev/null +# we know 7.x GENERIC has SMP +.if ${KERNCONF} == "GENERIC" && ${OSVERSION} >= 700000 +CFLAGS+= -DSMP +.elif ${NCPU} > 1 +CFLAGS+= -DSMP +.endif + +post-extract: +.if ${OSVERSION} >= 700024 && !defined(NOKSE) + @${ECHO_MSG} "Compiling with -DKSE." + @${ECHO_MSG} "If this is wrong (i.e. you have \`nooption KSE' in your kernel config)," + @${ECHO_MSG} "then please define NOKSE." +.endif + do-build: @(cd ${BUILD_WRKSRC}/common; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} Makefile ${MAKE_ARGS} ${ALL_TARGET}) @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET}) diff --git a/emulators/kqemu-kmod/pkg-descr b/emulators/kqemu-kmod/pkg-descr index 4d41548f8f4b..2ca45618fce4 100644 --- a/emulators/kqemu-kmod/pkg-descr +++ b/emulators/kqemu-kmod/pkg-descr @@ -1,3 +1,3 @@ KQEMU is a qemu accelerator kernel module on x86/amd64. -WWW: http://qemu.org/qemu-accel.html +WWW: http://fabrice.bellard.free.fr/qemu/