2014-10-21 16:38 GMT+04:00 Antoine Jacoutot <ajacou...@bsdfrog.org>:
> On Tue, Oct 21, 2014 at 04:32:27PM +0400, Vadim Zhukov wrote:
>> 2014-10-21 14:50 GMT+04:00 David Coppa <dco...@openbsd.org>:
>> >
>> >> From: Stuart Henderson <st...@openbsd.org>
>> >> Date: Mon, Oct 20, 2014 at 7:54 PM
>> >> Subject: Re: CMAKE_BUILD_TYPE=Release by default (Was CVS:
>> >> cvs.openbsd.org: ports)
>> >> To: David Coppa <dco...@gmail.com>
>> >> Cc: OpenBSD Ports <ports@openbsd.org>, Vadim Zhukov
>> >> <z...@openbsd.org>, Antoine Jacoutot <ajacou...@openbsd.org>
>> >>
>> >>
>> >> On 2014/10/20 19:42, David Coppa wrote:
>> >> > On Mon, Oct 20, 2014 at 5:57 PM, Antoine Jacoutot
>> >> > <ajacou...@cvs.openbsd.org> wrote:
>> >> > > CVSROOT:        /cvs
>> >> > > Module name:    ports
>> >> > > Changes by:     ajacou...@cvs.openbsd.org       2014/10/20 09:57:12
>> >> > >
>> >> > > Modified files:
>> >> > >         x11/polkit-qt4 : Makefile
>> >> > >         x11/polkit-qt4/pkg: PLIST
>> >> > >         productivity/libqzeitgeist: Makefile
>> >> > >         productivity/libqzeitgeist/pkg: PLIST
>> >> > >
>> >> > > Log message:
>> >> > > Pass -DCMAKE_BUILD_TYPE=Release to have a proper release.cmake file 
>> >> > > instead
>> >> > > of the noconfig one.
>> >> > >
>> >> > > I wonder if at one point this should go into the cmake MODULE as a 
>> >> > > default...
>> >> >
>> >> > Some days ago, I was going to mail ports@ suggesting exactly this.
>> >> >
>> >> > Would you give your ok?
>> >>
>> >> Would it make sense to only set this if no other -DCMAKE_BUILD_TYPE is 
>> >> set?
>> >> (Otherwise it would be more awkward to do a -DCMAKE_BUILD_TYPE=Debug 
>> >> build for
>> >> a single port).
>> >
>> > This is what FreeBSD did:
>> >
>> > ---8<---
>> >
>> > Index: cmake.port.mk
>> > ===================================================================
>> > RCS file: /cvs/ports/devel/cmake/cmake.port.mk,v
>> > retrieving revision 1.32
>> > diff -u -p -u -p -r1.32 cmake.port.mk
>> > --- cmake.port.mk       7 Oct 2014 11:12:23 -0000       1.32
>> > +++ cmake.port.mk       21 Oct 2014 10:41:15 -0000
>> > @@ -75,6 +75,12 @@ MODCMAKE_configure=  cd ${WRKBUILD} && ${
>> >                 -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY:Bool=True \
>> >                 -G ${_MODCMAKE_GEN} ${CONFIGURE_ARGS} ${WRKSRC}
>> >
>> > +.if defined(DEBUG)
>> > +CONFIGURE_ARGS += -DCMAKE_BUILD_TYPE:String=Debug
>> > +.else
>> > +CONFIGURE_ARGS += -DCMAKE_BUILD_TYPE:String=Release
>> > +.endif
>> > +
>> >  SEPARATE_BUILD ?=      Yes
>> >
>> >  TEST_TARGET ?= test
>>
>> This will break packaging of ports installing CMake package files (see
>> the FooTargets.cmake and FooTargets-Release.cmake in PLIST files?)
>> when DEBUG is specified.
>
> True, but by using DEBUG you are already drifting from regular packages; so 
> you can probably manually fix that one when you need it.

If there is one such package, yes, not a problem. When you have a few
hundreds items of KDE stuff... Yes, I build debug packages regularily
- still trying to catch misterious libkdcraw bug, and other problems
do arise often, unfortunately.

But if major porters will say "DEBUG is the way it should be", I won't
stay in the way. :)

>> Also, why not to check CONFIGURE_ARGS explicitly, and add
>> -DCMAKE_BUILD_TYPE only if it's not specified? Something like:
>>
>> .if !${CONFIGURE_ARGS:M-DCMAKE_BUILD_TYPE}
>> CONFIGURE_ARGS += -DCMAKE_BUILD_TYPE=Release
>> .endif
>
> We can add a check sure; for things that don't use Debug nor Release -- but 
> it'd be nice to remove -DCMAKE_BUILD_TYPE in all ports that already set it to 
> Release.

With sqlports the latter is not a problem. I can manage it if you
wish, here is a list:

audio/libmusicbrainz5
audio/taglib
devel/bullet
devel/llvm
games/sumwars
geo/qlandkartegt
graphics/darktable
graphics/hugin
graphics/openscenegraph
graphics/rawtherapee
mail/trojita
net/libproxy
net/ocsync
textproc/clucene
x11/ogre

Reply via email to