Subject: CVS commit: pkgsrc/mk
To: None <pkgsrc-changes@NetBSD.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: pkgsrc-changes
Date: 11/14/2004 07:23:07
Module Name:	pkgsrc
Committed By:	jlam
Date:		Sun Nov 14 07:23:07 UTC 2004

Modified Files:
	pkgsrc/mk: bsd.pkg.mk
Added Files:
	pkgsrc/mk: bsd.hacks.mk

Log Message:
Add a mini-framework to centralise the handling of "hacks" for getting
particular packages to compile correctly.  bsd.hacks.mk auto-includes
the hacks.mk file in the current directory.  An example hacks file:

-------------8<-------------8<-------------8<-------------8<-------------
.if !defined(FOO_HACKS_MK)
FOO_HACKS_MK=	defined

### [Sun Nov 14 02:08:31 EST 2004 : jlam]
### arm GCC 2.95.x optimisation bug tickled when compiling
### lib/funkyfile.c.  Require a more recent version of GCC as a
### workaround and patch lib/funkyfile.c (patch-ae).
###
.if !empty(MACHINE_ARCH:Marm*)
PKG_HACKS+=	optimisation
GCC_REQD+=	3.0
.endif

.endif  # FOO_HACKS_MK
-------------8<-------------8<-------------8<-------------8<-------------

The comment which heads each individual hack should timestamp when the
hack was added and describe the bug that requires the hack.  By
separating out hacks to a separate file, we should be able to simplify
package Makefiles so that they are more readable.


To generate a diff of this commit:
cvs rdiff -r0 -r1.1 pkgsrc/mk/bsd.hacks.mk
cvs rdiff -r1.1536 -r1.1537 pkgsrc/mk/bsd.pkg.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.