Bug 179952 - [patch] make emulators/kqemu-kmod-devel respect ${CC}
Summary: [patch] make emulators/kqemu-kmod-devel respect ${CC}
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Juergen Lock
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-25 10:40 UTC by r4721@tormail.org
Modified: 2013-06-25 21:41 UTC (History)
0 users

See Also:


Attachments
file.diff (2.68 KB, patch)
2013-06-25 10:40 UTC, r4721@tormail.org
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description r4721@tormail.org 2013-06-25 10:40:00 UTC
some work towards getting this port to build in a WITHOUT_GCC world.

* switch to new header style
* add LICENSE
* remove 7.x bug workarounds, freebsd 7 is no more supported
* respect ${CC} instead of using 'gcc'
* switch to optionsng

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2013-06-25 10:40:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->nox

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2013-06-25 21:33:05 UTC
Author: nox
Date: Tue Jun 25 20:32:57 2013
New Revision: 321765
URL: http://svnweb.freebsd.org/changeset/ports/321765

Log:
  - Switch to new header style. [1]
  - Add LICENSE. [1]
  - Remove 7.x bug workarounds, FreeBSD 7 is no more supported. [1]
  - Respect ${CC} instead of using 'gcc'. [1]
  - Switch to optionsng. [1]
  - Fix build with gcc46 (it doesn't like -fformat-extensions in CWARNFLAGS.)
  - Sync kqemu-kmod with these -devel updates.
  
  PR:		ports/179952 [1]
  Submitted by:	r4721@tormail.org

Deleted:
  head/emulators/kqemu-kmod-devel/files/patch-tssworkaround
  head/emulators/kqemu-kmod/files/patch-tssworkaround
Modified:
  head/emulators/kqemu-kmod-devel/Makefile
  head/emulators/kqemu-kmod/Makefile

Modified: head/emulators/kqemu-kmod-devel/Makefile
==============================================================================
--- head/emulators/kqemu-kmod-devel/Makefile	Tue Jun 25 20:09:38 2013	(r321764)
+++ head/emulators/kqemu-kmod-devel/Makefile	Tue Jun 25 20:32:57 2013	(r321765)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	kqemu-kmod
-# Date created:				2005/10/25
-# Whom:					nork@FreeBSD.org
-#
+# Created by: nork@FreeBSD.org
 # $FreeBSD$
-#
 
 PORTNAME=	kqemu
 PORTVERSION=	1.4.0.p1
@@ -20,6 +16,9 @@ DIST_SUBDIR=	kqemu
 MAINTAINER=	nox@FreeBSD.org
 COMMENT=	Kernel Accelerator for QEMU CPU Emulator (development version)
 
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
+
 ONLY_FOR_ARCHS=	i386 amd64
 HAS_CONFIGURE=	yes
 USE_GMAKE=	yes
@@ -37,6 +36,7 @@ PLIST_FILES+=	"@dirrm include/kqemu"
 PLIST_FILES+=	"@cwd /"
 PLIST_FILES+=	${KMODDIR:C,^/,,}/kqemu.ko
 PLIST_FILES+=	"@unexec kldxref ${KMODDIR}"
+PLIST_FILES+=	"@cwd"
 
 MAKEFILE=	Makefile.freebsd
 
@@ -56,28 +56,9 @@ MAKE_ENV+=	SYSDIR="${SYSDIR}"
 IGNORE=		requires kernel source to be installed
 .endif
 
-.if ${OSVERSION} >= 700024 && ${OSVERSION} < 700053 && !defined(NOKSE)
-# XXX this is wrong if you have `nooption KSE' in your kernel config,
-# please define NOKSE in that case (no longer a problem after attilio's
-# Sun Jul 22 21:35:44 2007 UTC commit removing the KSE ABI incompatiblity)
-CFLAGS+=	-DKSE
-.endif
-
-CFLAGS+=       ${DEBUG_FLAGS}
+CFLAGS+=	${DEBUG_FLAGS}
 
-post-extract:
-.if ${OSVERSION} >= 700024 && ${OSVERSION} < 700053 && !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
-
-# 7.1 and head have seperate gdts also on amd64 now so the tss fixup code
-# is no longer needed there
 post-patch:
-.if ${OSVERSION} >= 701100 && (${OSVERSION} < 800000 || ${OSVERSION} >= 800046)
-	@cd ${WRKSRC} && ${PATCH} -R --quiet < ${FILESDIR}/patch-tssworkaround
-.endif
 # Apply extra patches from the qemu-devel list; in the unlikely case that
 # these cause regressions please define WITHOUT_EXTRA_PATCHES and post
 # details about your host _and_ guest on freebsd-emulation@freebsd.org
@@ -87,17 +68,18 @@ post-patch:
 		${PATCH} -d ${WRKSRC} --quiet <$$i;\
 	done
 .endif
+	@${REINPLACE_CMD} -e '/CC=/s,gcc,${CC},' ${WRKSRC}/common/Makefile
 
 do-build:
 	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} beforedepend && ${LN} -sfh @/sys sys)
 	@(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})
+	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} CWARNFLAGS=-Wall ${ALL_TARGET})
 
 do-install:
 	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
 	${MKDIR} ${PREFIX}/include/kqemu
 	${INSTALL_DATA} ${WRKSRC}/kqemu.h ${PREFIX}/include/kqemu
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	${MKDIR} ${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/kqemu-doc.html ${WRKSRC}/kqemu-tech.html \
 		${DOCSDIR}

Modified: head/emulators/kqemu-kmod/Makefile
==============================================================================
--- head/emulators/kqemu-kmod/Makefile	Tue Jun 25 20:09:38 2013	(r321764)
+++ head/emulators/kqemu-kmod/Makefile	Tue Jun 25 20:32:57 2013	(r321765)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	kqemu-kmod
-# Date created:				2005/10/25
-# Whom:					nork@FreeBSD.org
-#
+# Created by: nork@FreeBSD.org
 # $FreeBSD$
-#
 
 PORTNAME=	kqemu
 PORTVERSION=	1.3.0.p11
@@ -20,6 +16,9 @@ DIST_SUBDIR=	kqemu
 MAINTAINER=	nox@FreeBSD.org
 COMMENT=	Kernel Accelerator for QEMU CPU Emulator
 
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
+
 ONLY_FOR_ARCHS=	i386 amd64
 HAS_CONFIGURE=	yes
 USE_GMAKE=	yes
@@ -37,6 +36,7 @@ PLIST_FILES+=	"@dirrm include/kqemu"
 PLIST_FILES+=	"@cwd /"
 PLIST_FILES+=	${KMODDIR:C,^/,,}/kqemu.ko
 PLIST_FILES+=	"@unexec kldxref ${KMODDIR}"
+PLIST_FILES+=	"@cwd"
 
 MAKEFILE=	Makefile.freebsd
 
@@ -49,43 +49,28 @@ KMODDIR=	/boot/modules
 
 MAKE_ENV+=	KMODDIR="${KMODDIR}"
 
-.if !exists(${SRC_BASE}/sys/Makefile)
-IGNORE=		requires kernel source to be installed
-.endif
+SYSDIR?=	${SRC_BASE}/sys
+MAKE_ENV+=	SYSDIR="${SYSDIR}"
 
-.if ${OSVERSION} >= 700024 && ${OSVERSION} < 700053 && !defined(NOKSE)
-# XXX this is wrong if you have `nooption KSE' in your kernel config,
-# please define NOKSE in that case (no longer a problem after attilio's
-# Sun Jul 22 21:35:44 2007 UTC commit removing the KSE ABI incompatiblity)
-CFLAGS+=	-DKSE
+.if !exists(${SYSDIR}/Makefile)
+IGNORE=		requires kernel source to be installed
 .endif
 
-CFLAGS+=       ${DEBUG_FLAGS}
+CFLAGS+=	${DEBUG_FLAGS}
 
-post-extract:
-.if ${OSVERSION} >= 700024 && ${OSVERSION} < 700053 && !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
-
-# 7.1 and head have seperate gdts also on amd64 now so the tss fixup code
-# is no longer needed there
 post-patch:
-.if ${OSVERSION} >= 701100 && (${OSVERSION} < 800000 || ${OSVERSION} >= 800046)
-	@cd ${WRKSRC} && ${PATCH} -R --quiet < ${FILESDIR}/patch-tssworkaround
-.endif
+	@${REINPLACE_CMD} -e '/CC=/s,gcc,${CC},' ${WRKSRC}/common/Makefile
 
 do-build:
 	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} beforedepend && ${LN} -sfh @/sys sys)
 	@(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})
+	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} CWARNFLAGS=-Wall ${ALL_TARGET})
 
 do-install:
 	@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
 	${MKDIR} ${PREFIX}/include/kqemu
 	${INSTALL_DATA} ${WRKSRC}/kqemu.h ${PREFIX}/include/kqemu
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	${MKDIR} ${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/kqemu-doc.html ${WRKSRC}/kqemu-tech.html \
 		${DOCSDIR}
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Juergen Lock freebsd_committer 2013-06-25 21:34:02 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!