diff -r -u ports.orig/audio/oss/Makefile ports/audio/oss/Makefile --- ports.orig/audio/oss/Makefile +++ ports/audio/oss/Makefile @@ -57,12 +57,12 @@ OPTIONS= VORBIS "OGG/Vorbis audio support" on +.include + .if !exists(${SRC_BASE}/sys/Makefile) IGNORE= requires kernel source to be installed .endif -.include - CONFIGURE_ENV+= HOSTCC="${CC}" .if !defined(WITHOUT_VORBIS) diff -r -u ports.orig/comms/uarduno/Makefile ports/comms/uarduno/Makefile --- ports.orig/comms/uarduno/Makefile +++ ports/comms/uarduno/Makefile @@ -19,6 +19,8 @@ MAKE_ENV+= KMODDIR=${KMODDIR} LOCALBASE= ${KMODDIR} +.include + SRCPREFIX?= ${SRC_BASE} # disable mtree or you'll get a /boot/kernel/... directory hierarchy put there @@ -41,8 +43,6 @@ # CFLAGS+= -DKERNELVER=${OSVERSION} -.include - .if ${OSVERSION} < 800000 # Simple check for 7.x kernel source (find usb.c) .if ! exists(${SRCPREFIX}/sys/dev/usb/usb.c) diff -r -u ports.orig/emulators/virtio-kmod/Makefile ports/emulators/virtio-kmod/Makefile --- ports.orig/emulators/virtio-kmod/Makefile +++ ports/emulators/virtio-kmod/Makefile @@ -22,12 +22,12 @@ KMODDIR?= /boot/modules PLIST_SUB= KMODDIR=${KMODDIR:C,^/,,} +.include + .if !exists(${SRC_BASE}/sys/Makefile) IGNORE= requires kernel source to be installed .endif -.include - .if ${OSREL} != "8.2" && ${OSREL} != "9.0" IGNORE= not supported $${OSREL} (${OSREL}) .endif diff -r -u ports.orig/emulators/virtualbox-ose/Makefile ports/emulators/virtualbox-ose/Makefile --- ports.orig/emulators/virtualbox-ose/Makefile +++ ports/emulators/virtualbox-ose/Makefile @@ -81,10 +81,6 @@ SUB_LIST+= VBOXUSER=${VBOXUSER} USE_RC_SUBR+= vboxheadless -KMK_BUILDTYPE= release -KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys -KMK_FLAGS= - .if defined(WITHOUT_QT4) && !defined(WITHOUT_NLS) BROKEN= NLS support requires QT4 frontend. Run 'make config' again! .endif @@ -126,6 +122,12 @@ PLIST_SUB+= GUESTADDITIONS="@comment " .endif +.include + +KMK_BUILDTYPE= release +KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys +KMK_FLAGS= + .if defined(WITH_DEBUG) KMK_FLAGS+= BUILD_TYPE=debug KMK_BUILDTYPE= debug @@ -176,8 +178,6 @@ PLIST_SUB+= I386="@comment " .endif -.include - .if ${OSVERSION} < 800000 BROKEN= Does not compile on FreeBSD 7.x .endif diff -r -u ports.orig/emulators/virtualbox-ose-legacy/Makefile ports/emulators/virtualbox-ose-legacy/Makefile --- ports.orig/emulators/virtualbox-ose-legacy/Makefile +++ ports/emulators/virtualbox-ose-legacy/Makefile @@ -80,10 +80,6 @@ SUB_LIST+= VBOXUSER=${VBOXUSER} USE_RC_SUBR+= vboxheadless -KMK_BUILDTYPE= release -KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys -KMK_FLAGS= - .if defined(WITHOUT_QT4) && !defined(WITHOUT_NLS) BROKEN= NLS support requires QT4 frontend. Run 'make config' again! .endif @@ -125,6 +121,12 @@ PLIST_SUB+= GUESTADDITIONS="@comment " .endif +.include + +KMK_BUILDTYPE= release +KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys +KMK_FLAGS= + .if defined(WITH_DEBUG) KMK_FLAGS+= BUILD_TYPE=debug KMK_BUILDTYPE= debug @@ -175,8 +177,6 @@ PLIST_SUB+= I386="@comment " .endif -.include - .if ${OSVERSION} > 900012 EXTRA_PATCHES+= ${FILESDIR}/extrapatch-include-iprt-string.h .endif diff -r -u ports.orig/graphics/kix-kmod/Makefile ports/graphics/kix-kmod/Makefile --- ports.orig/graphics/kix-kmod/Makefile +++ ports/graphics/kix-kmod/Makefile @@ -16,6 +16,8 @@ MAINTAINER= jon@witchspace.com COMMENT= A graphical screensaver kernel module +.include + SYSDIR?= ${SRC_BASE}/sys .if !exists(${SYSDIR}/dev/syscons/syscons.h) IGNORE= requires kernel source (in ${SYSDIR}) to build @@ -30,4 +32,4 @@ post-install: @${CAT} ${PKGMESSAGE} -.include +.include diff -r -u ports.orig/graphics/plasma-kmod/Makefile ports/graphics/plasma-kmod/Makefile --- ports.orig/graphics/plasma-kmod/Makefile +++ ports/graphics/plasma-kmod/Makefile @@ -15,6 +15,8 @@ MAINTAINER= ports@FreeBSD.org COMMENT= A plasma-effect screensaver kernel module +.include + .if !exists(${SRC_BASE}/sys/dev/syscons/syscons.h) IGNORE= requires kernel source (in ${SRC_BASE}) to build .endif @@ -27,8 +29,6 @@ post-install: @${CAT} ${PKGMESSAGE} -.include - .if ${ARCH} == "amd64" BROKEN= Does not configure .endif diff -r -u ports.orig/multimedia/ptx-kmod/Makefile ports/multimedia/ptx-kmod/Makefile --- ports.orig/multimedia/ptx-kmod/Makefile +++ ports/multimedia/ptx-kmod/Makefile @@ -26,10 +26,11 @@ USE_RC_SUBR= ptx.sh PORTDOCS= README +.include + KMODDIR= libexec/${PORTNAME} SYSDIR?= ${SRC_BASE}/sys -.include KERNCONF?= GENERIC # Use the first component of ${KERNCONF}. diff -r -u ports.orig/net/iet/Makefile ports/net/iet/Makefile --- ports.orig/net/iet/Makefile +++ ports/net/iet/Makefile @@ -31,6 +31,8 @@ USE_RC_SUBR= ietd +.include + KMODDIR= ${PREFIX}/modules PLIST_SUB+= KMODDIR=${KMODDIR} MAKE_ENV+= KMODDIR=${KMODDIR} DATADIR=${DATADIR} SYSDIR="${SRC_BASE}/sys" @@ -41,8 +43,6 @@ IGNORE= requires kernel sources to build .endif -.include - .if ${OSVERSION} < 800107 BROKEN= requires 8.0-RELEASE or higher .endif diff -r -u ports.orig/net/ng_car/Makefile ports/net/ng_car/Makefile --- ports.orig/net/ng_car/Makefile +++ ports/net/ng_car/Makefile @@ -22,12 +22,12 @@ MAN4= ng_car.4 MANCOMPRESSED= yes +.include + .if !exists(${SRC_BASE}/sys/Makefile) IGNORE= this port requires kernel sources .endif -.include - .if ${OSVERSION} >= 700041 IGNORE= already exists in base system .endif diff -r -u ports.orig/net/ng_mikrotik_eoip/Makefile ports/net/ng_mikrotik_eoip/Makefile --- ports.orig/net/ng_mikrotik_eoip/Makefile +++ ports/net/ng_mikrotik_eoip/Makefile @@ -25,6 +25,8 @@ PLIST_SUB+= KMODDIR=${KMODDIR} \ PORTNAME=${PORTNAME} +.include + .if !exists(${SRC_BASE}/sys/sys/module.h) IGNORE= requires kernel source files .endif @@ -38,4 +40,4 @@ do-install: @${INSTALL_KLD} ${WRKSRC}/${PORTNAME}.ko ${KMODDIR} -.include +.include diff -r -u ports.orig/net/skyfish/Makefile ports/net/skyfish/Makefile --- ports.orig/net/skyfish/Makefile +++ ports/net/skyfish/Makefile @@ -13,6 +13,8 @@ MAINTAINER= nsand@sura.ru COMMENT= Grabbing TCP streams from network interface (SAT internet) +.include + SYSDIR?= ${SRC_BASE}/sys KMODDIR= /boot/modules PLIST_SUB+= KMODDIR=${KMODDIR} @@ -28,4 +30,4 @@ exit 1 .endif -.include +.include diff -r -u ports.orig/net/skystar2/Makefile ports/net/skystar2/Makefile --- ports.orig/net/skystar2/Makefile +++ ports/net/skystar2/Makefile @@ -17,6 +17,7 @@ COMMENT= Kernel module and program for SkyStar2/SkyStar2.8A, ver. ${PORTVERSION} USE_BZIP2= yes +.include SYSDIR?= ${SRC_BASE}/sys KMODDIR= /boot/modules PLIST_SUB+= KMODDIR=${KMODDIR} @@ -49,8 +50,6 @@ .endfor .endif -.include - .if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" BROKEN= Does not compile on ia64, powerprc, or sparc64 .elif ${OSVERSION} >= 900000 diff -r -u ports.orig/net/ttbudget/Makefile ports/net/ttbudget/Makefile --- ports.orig/net/ttbudget/Makefile +++ ports/net/ttbudget/Makefile @@ -17,6 +17,8 @@ COMMENT= Driver for 'TechnoTrend budget DVB S-1401' (SkyStar3) USE_BZIP2= yes + +.include SYSDIR?= ${SRC_BASE}/sys KMODDIR= /boot/modules PLIST_SUB+= KMODDIR=${KMODDIR} @@ -32,8 +34,6 @@ post-install: @${CAT} ${PKGMESSAGE} -.include - .if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" BROKEN= Does not compile on ia64, powerprc, or sparc64 .elif ${OSVERSION} >= 900000 diff -r -u ports.orig/print/acroreadwrapper/Makefile ports/print/acroreadwrapper/Makefile --- ports.orig/print/acroreadwrapper/Makefile +++ ports/print/acroreadwrapper/Makefile @@ -30,6 +30,9 @@ PLUGINDIR=${PLUGINDIR} \ KMODDIR=${KMODDIR} USE_RC_SUBR= linux_adobe.sh + +.include + MAKE_ENV= KMODDIR=${KMODDIR} SYSDIR=${SRC_BASE}/sys DESTDIR=${PREFIX}/ ADOBEBASE= Adobe @@ -38,7 +41,6 @@ PLUGINDIR= lib/npapi/linux-acroread KMODDIR= libexec/linux_adobe -.include KERNCONF?= GENERIC # Use the first component of ${KERNCONF}. diff -r -u ports.orig/sysutils/acpi_call/Makefile ports/sysutils/acpi_call/Makefile --- ports.orig/sysutils/acpi_call/Makefile +++ ports/sysutils/acpi_call/Makefile @@ -20,6 +20,8 @@ PLIST_SUB+= KMODDIR=${KMODDIR} \ PORTNAME=${PORTNAME} +.include + .if !exists(${SRC_BASE}/sys/sys/module.h) IGNORE= requires kernel source files .endif @@ -34,4 +36,4 @@ @${INSTALL_KLD} ${WRKSRC}/${PORTNAME}.ko ${KMODDIR} @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/sbin -.include +.include diff -r -u ports.orig/sysutils/cciss_vol_status/Makefile ports/sysutils/cciss_vol_status/Makefile --- ports.orig/sysutils/cciss_vol_status/Makefile +++ ports/sysutils/cciss_vol_status/Makefile @@ -21,8 +21,10 @@ MAN8= cciss_vol_status.8 PLIST_FILES= bin/cciss_vol_status +.include + .if !exists(${SRC_BASE}/sys/dev/ciss/cissio.h) IGNORE= cciss_vol_status requires kernel sources of the ciss driver .endif -.include +.include diff -r -u ports.orig/sysutils/fusefs-kmod/Makefile ports/sysutils/fusefs-kmod/Makefile --- ports.orig/sysutils/fusefs-kmod/Makefile +++ ports/sysutils/fusefs-kmod/Makefile @@ -26,13 +26,13 @@ USE_RC_SUBR= fusefs KMODDIR?= ${PREFIX}/modules PLIST_SUB= KMODDIR=${KMODDIR} +SRC_BASE?= /usr/src MAKE_ENV= BINDIR="${PREFIX}/sbin" MANDIR="${MANPREFIX}/man/man" \ KMODDIR="${KMODDIR}" SYSDIR="${SRC_BASE}/sys" \ MOUNT="${SRC_BASE}/sbin/mount" WRKSRC= ${WRKDIR}/fuse4bsd-${HG_SHORTREV} DISABLE_SIZE= yes -SRC_BASE?= /usr/src SETUP= setup.sh HG_SHORTREV= 498acaef33b0 diff -r -u ports.orig/sysutils/lsof/Makefile ports/sysutils/lsof/Makefile --- ports.orig/sysutils/lsof/Makefile +++ ports/sysutils/lsof/Makefile @@ -40,6 +40,8 @@ .endif USE_BZIP2= yes + +.include HAS_CONFIGURE= yes CONFIGURE_SCRIPT= Configure CONFIGURE_ARGS= -n freebsd @@ -81,4 +83,4 @@ ${FIND} -d share/lsof -type d \ | ${SED} -e 's/^/@dirrm /g' >>${TMPPLIST} -.include +.include diff -r -u ports.orig/sysutils/pefs-kmod/Makefile ports/sysutils/pefs-kmod/Makefile --- ports.orig/sysutils/pefs-kmod/Makefile +++ ports/sysutils/pefs-kmod/Makefile @@ -18,6 +18,8 @@ FETCH_ARGS= -Fpr # work around 302 redirect at guthub +.include + KMODDIR?= /boot/modules PLIST_SUB= KMODDIR=${KMODDIR} MAKE_ENV= BINDIR="${PREFIX}/sbin" MANDIR="${MANPREFIX}/man/man" \ @@ -28,8 +30,6 @@ ONLY_FOR_ARCHS= i386 amd64 # not tested on other archs -.include - .if ${OSVERSION} < 800000 BROKEN= requires fairly recent FreeBSD-STABLE, or FreeBSD-CURRENT .endif diff -r -u ports.orig/sysutils/scprotect/Makefile ports/sysutils/scprotect/Makefile --- ports.orig/sysutils/scprotect/Makefile +++ ports/sysutils/scprotect/Makefile @@ -26,6 +26,8 @@ #MAN4= scprotect.4 #MANCOMPRESSED= yes +.include + .if !exists(${SRC_BASE}/sys/Makefile) IGNORE= requires kernel sources .endif @@ -33,4 +35,4 @@ post-install: @${CAT} ${PKGMESSAGE} -.include +.include