Subject: Re: PREFER_NATIVE useless?
To: None <tech-pkg@netbsd.org>
From: Aaron J. Grier <agrier@poofygoof.com>
List: tech-pkg
Date: 12/06/2005 22:32:34
On Wed, Nov 30, 2005 at 11:25:32PM +0800, Rui-Xiang Guo wrote:
> > If you really want these to prefer native usage where available, put:
> > 
> > PREFER_PKGSRC=
> > 
> > in your /etc/mk.conf (that sets it to an empty string).  Note that
> > this may cause the build of some packages to fail, because the
> > native versions of these packages are often too "old" to be useful
> > to newer pkgsrc packages.
> 
> I just try it but it only reduce MesaLib then still includes xcursor
> until I set USE_BUILTIN.xcursor=yes in /etc/mk.conf.

I've been poking at this for months now with some limited success.  I've
put a giant diff up at
http://www.poofygoof.com/~agrier/computers/prefer_native_pkgsrc.diff .

a few of the key points about the diff...

- a few packages claim they require newer versions than they actually
  need to compile.

- USE_BUILTIN vs PREFER_PKGSRC/PREFER_NATIVE
  it seems that setting PREFER_* and letting builtin.mk is better logic
  than unconditionally setting USE_BUILTIN.  it seems to me that
  USE_BUILTIN should never be set in a Makefile.

- firefox/mozilla is a big pain, because the current patches assume a
  newer version of freetype2 than is installed natively.  I would have
  put in the necessary #ifdef checks to support BOTH, but I don't know
  how to handle .idl files.

- bsd.pkg.mk
  I've had this patch in my branch for years now. it avoids doing a
  deinstall unless a package is already installed.  it also allows
  graceful recoveries if make deinstall fails.

- mk/buildlink3/bsd.buildlink3.mk
  missing \.inc$$ for the BUILDLINK_CONTENTS_FILTER, which I found
  necessary for perl, although I can't remember the specifics anymore.

it's messy and could use some more eyeballs.

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | agrier@poofygoof.com
              "silly brewer, saaz are for pils!"  --  virt