pkgsrc-Users archive

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

Re: scons error for a new wip package



On Mon, Sep 23, 2024 at 11:03:27PM +0530, Mayuresh wrote:
> On Mon, Sep 23, 2024 at 07:30:20PM +0200, Thomas Klausner wrote:
> > Setting
> > SCONS_BUILD_ARGS+=	prefix=${PREFIX}
> > should be enough? (possibly SCONS_INSTALL_ARGS instead)
> 
> No. That doesn't stop PREFIX from being passed by scons4/build.mk anyway.

Following in the package Makefile fixes the problem (drop PREFIX= from the
builtin variable _SCONS_BUILD_ARGS and add prefix= to SCONS_INSTALL_ARGS)


    SCONS_BUILD_ARGS+=     prefix=${PREFIX}
    
    # pkgsrc assumes PREFIX to be a standard argument and adds it implicitly
    # This package uses prefix instead. So have to do the following
    .include "../../devel/scons4/build.mk"
    _SCONS_BUILD_ARGS:=    ${_SCONS_BUILD_ARGS:NPREFIX=${PREFIX}}

Touching _SCONS_BUILD_ARGS in package Makefile isn't nice. But I can't
think of any other solution.

Since PREFIX is not a standardized scons argument and packages complain if
it is found, its use in scons.mk should give some discretion to the
package Makefile. For example it may allow to override the prefix argument
name if it is not PREFIX.

Comments?

-- 
Mayuresh


Home | Main Index | Thread Index | Old Index