On Mon, Nov 07, 2011 at 03:46:03AM +0300, Vadim Zhukov wrote:
> Hello all.
> 
> I want to clarify one thing, that is not mentioned in Porting FAQ but
> make me (and looks like not only me) curious: post-patch vs.
> pre-configure.
> 
> As far as I can understand, "patch" targets are intended to operate on
> WRKSRC and "configure" - on WRKBUILD, unless source package is broken
> and does not work well when SEPARATE_BUILD!=No. In the later case
> pre-confiugre is effectively almost the same as post-patch, until you
> start playing with build cookies.
> 
> But I see patch-like adjustments in ports, including fresh ones, being
> run in pre-configure. What's the point there? Some examples:
> 
> devel/sdl/Makefile:
> pre-configure:
>    mkdir -p ${WRKSRC}/src/audio/libsndio
>    cp ${FILESDIR}/SDL_libsndioaudio.{c,h} ${WRKSRC}/src/audio/libsndio
> 
> net/samba/Makefile:
> pre-configure:
>    @${SUBST_CMD} ${SAMBA_MANPAGES}/swat.8
> 
> Those actions are not FLAVOR-specific, and they should be done once -
> while you can try to build software many times (with different
> FLAVORs, for example, or just wiping out build directory with "make
> clean=build").
> 
> Even more, if you're building one FLAVOR of devel/sdl and start
> building a new one, you can hit in a race because cp(1) does not
> operate atomically, aren't you?
> 
> Am I missing something? I'm using post-patch for such cases, but maybe
> its wrong for some reasons?

The only case where it really matters is when you have something module-specific
happening in post-patch or pre-configure.

Most important is autoconf stuff running at the end of post-patch

Reply via email to