tech-pkg archive

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

Re: pkgsrc performance



On Wed, Mar 18, 2009 at 04:22:33PM +0100, Thomas Klausner wrote:
> On Thu, Mar 12, 2009 at 02:33:35PM +0100, Quentin Garnier wrote:
> > On Thu, Mar 12, 2009 at 11:40:57AM +0100, Joerg Sonnenberger wrote:
> > > I have a tested conversion script around, just need to sort out the edge
> > > case of x11-links.
> > 
> > Is it still the one where you abuse BUILDLINK_PACKAGES?  Because I still
> > oppose that.  I'm tired of people not even looking at those parts of
> > pkgsrc and making the code harder to understand will not make that
> > better.
> 
> Was this "abuse" talked about on tech-pkg? Was the script posted?

The abuse is adding things to BUILDLINK_PACKAGES, using it to protect
from multiple inclusions, and removing them deep inside buildlink3
logic.

> What is the solution you suggest? Can it be plugged into the script?

Well, the solution I'm promoting is the following one, and the script I
am attaching seems to be successful on all but a 5 bl3.mk files.  I'm
currently doing partial bulk builds to have an increased confidence that
it doesn't make the tree explode and then I intend to commit.

Please don't comment my Perl skills :-)

I'm also attaching a random (well, I chose a complex one) bl3 files,
before and after the transformation.

-- 
Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Attachment: bl3-transform.pl
Description: Perl program

# $NetBSD: buildlink3.mk,v 1.29 2008/05/06 06:36:44 bjs Exp $
# buildlink3.mk file version 20090316

BUILDLINK_DEPTH:=       ${BUILDLINK_DEPTH}+

.if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+=     SDL
.endif

.if make(show-buildlink3)
BUILDLINK_ORDER:=       ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}SDL
.endif

.if !defined(SDL_BUILDLINK3_MK)
SDL_BUILDLINK3_MK=      # defined

BUILDLINK_PACKAGES+=    SDL

BUILDLINK_API_DEPENDS.SDL+=     SDL>=1.2.5nb5
BUILDLINK_ABI_DEPENDS.SDL+=     SDL>=1.2.10
BUILDLINK_PKGSRCDIR.SDL?=       ../../devel/SDL
PTHREAD_OPTS+=  require

.include "../../mk/bsd.fast.prefs.mk"

.if ${OPSYS} != "IRIX" && ${OPSYS} != "Darwin"
.include "../../graphics/MesaLib/buildlink3.mk"
.include "../../graphics/glu/buildlink3.mk"
.endif

.include "../../converters/libiconv/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"

pkgbase := SDL
.include "../../mk/pkg-build-options.mk"

.if !empty(PKG_BUILD_OPTIONS.SDL:Maalib)
.include "../../graphics/aalib/buildlink3.mk"
.endif

.if !empty(PKG_BUILD_OPTIONS.SDL:Mnas)
.include "../../audio/nas/buildlink3.mk"
.endif

.include "../../x11/libXrandr/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"

.endif  # SDL_BUILDLINK3_MK

BUILDLINK_DEPTH:=       ${BUILDLINK_DEPTH:S/+$//}
# $NetBSD: buildlink3.mk,v 1.29 2008/05/06 06:36:44 bjs Exp $

BUILDLINK_DEPTH:=       ${BUILDLINK_DEPTH}+
SDL_BUILDLINK3_MK:=     ${SDL_BUILDLINK3_MK}+

.if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+=     SDL
.endif

BUILDLINK_PACKAGES:=    ${BUILDLINK_PACKAGES:NSDL}
BUILDLINK_PACKAGES+=    SDL
BUILDLINK_ORDER:=       ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}SDL

.if !empty(SDL_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.SDL+=     SDL>=1.2.5nb5
BUILDLINK_ABI_DEPENDS.SDL+=     SDL>=1.2.10
BUILDLINK_PKGSRCDIR.SDL?=       ../../devel/SDL
.endif  # SDL_BUILDLINK3_MK

PTHREAD_OPTS+=  require

.include "../../mk/bsd.fast.prefs.mk"

.if ${OPSYS} != "IRIX" && ${OPSYS} != "Darwin"
.include "../../graphics/MesaLib/buildlink3.mk"
.include "../../graphics/glu/buildlink3.mk"
.endif

.include "../../converters/libiconv/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"

pkgbase := SDL
.include "../../mk/pkg-build-options.mk"

.if !empty(PKG_BUILD_OPTIONS.SDL:Maalib)
.include "../../graphics/aalib/buildlink3.mk"
.endif

.if !empty(PKG_BUILD_OPTIONS.SDL:Mnas)
.include "../../audio/nas/buildlink3.mk"
.endif

.include "../../x11/libXrandr/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"

BUILDLINK_DEPTH:=       ${BUILDLINK_DEPTH:S/+$//}

Attachment: pgp9TpZMfQERH.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index