tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: hacks.mk?
On Wed, Oct 26, 2022 at 10:31:39AM +0100, Jonathan Perkin wrote:
> > I use hacks.mk... sometimes, but I often wonder whether anyone reads
> > and reviews the hacks to make sure they're still valid.
> >
> > Should we move to putting such hacks in the main Makefile so people
> > can review them, for example, while updating packages to determine
> > if they're still relevant?
>
> Personally I absolutely hate them, and would love to see them go away.
>
> Things like this:
>
> https://github.com/NetBSD/pkgsrc/blob/trunk/x11/pixman/hacks.mk#L7-L16
>
> end up hidden for many years.
>
> Just put them in Makefile, where the chances that someone will spot that
> the above disables optimisations for e.g. clang because it doesn't limit
> the checks to PKGSRC_COMPILER:Mgcc, are vastly improved.
I kinda disagree, on the grounds that putting them in their own file
is supposed to _increase_ the visibility.
Maybe it would be better to stop making hacks.mk automatic so it has
to be listed in the Makefile, and maybe also have pkglint expect a
comment attached to that include?
Also maybe there should be more guidance about what constitutes a
hack. I don't see any reason for the stuff currently in pixman's
hacks.mk to be there. On the other hand, most of what's in the
audacious-plugins hacks.mk seems like it belongs.
I think it should be restricted to things that are hacks at the pkgsrc
level, as opposed to e.g. blunt workarounds for build problems that
are the package's fault.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index