tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Detecting binary package build

On 09/22/17 16:09, Tobias Nygren wrote:
On Fri, 22 Sep 2017 15:01:13 -0500
Jason Bacon <> wrote:

Is there a canonical way to detect a binary package build within the
package Makefile, whether the build was invoked by pbulk or just "make

I just added wip/openblas and I want to use different build options for
a binary package and a local source build.

I.e. if building a binary package for distribution on x86, I would
enable DYNAMIC_ARCH, which generates CPU-agnostic code. When doing a
local source build, I would turn this off so the upstream build system
can optimize for the local CPU.
The canonical example is multimedia/mplayer. Add a
"runtime-cpudetection" PKG_OPTION and enable it by default. Then users
can disable it in mk.conf if they so desire.


So there's nothing like the FreeBSD ports PACKAGE_BUILDING variable, which is automatically set during a binary package build (by poudriere, I believe)?

My hope is to automatically enable DYNAMIC_ARCH by default, without user intervention, during a pbulk build, and have it off by default otherwise.  I suppose I could set a custom variable for this in pbulk.conf.  I would also allow the user to override with an option.

I haven't done any benchmarks yet, but I suspect that DYNAMIC_ARCH may reduce performance.  I'll know more in the coming days as I finish and run some tests.

Earth is a beta site.

Home | Main Index | Thread Index | Old Index