Re: [Warzone-dev] build issues in FreeBSD system
On Tue, 24 Oct 2006, Dennis Schridde wrote: DS> Am Dienstag, 24. Oktober 2006 09:35 schrieb Yaroslav Kolomiyets: DS> > Dear Warzone2100 Developers, DS> > DS> > Sometimes it is necessary (and easy) to have multiple deployments of DS> > SDL. FreeBSD ports maintainters organize things so there may be many DS> > instances of one thing: autoconf253 and autoconf259, automake14 and DS> > automake19. DS> > DS> > To build Warzone2100 on such system it is requered to make several DS> > changes in code: DS> > DS> > I. AutoTools part: DS> > DS> > a) make the autogen.sh accept alternative autoconf/automake binary DS> >names. After patch-A-autgen.sh applied it is possible to run it as: DS> > DS> > $ env AUTOCONF_VERSION=259 AUTOMAKE_VERSION=19 ./autogen.sh DS> You mean provide an autotools wrapper in our autogen.sh? DS> This is really the task of the OS and not our, IMHO. DS> You should provide a wrapper script around autoconf/automake which you can DS> instruct to use a specific version of autotools, eg with WANT_AUTOCONF=2.60 DS> or WANT_AUTOMAKE=1.10 DS> Other OS/Distros handle this completely different and I don't think we could DS> provide a specific hack for all of them. Gentoo eg. has autoconf-2.60 and not DS> autoconf260... Provided patch is suitable for Gentoo too: $ env AUTOCONF_VERSION="-2.60" AUTOMAKE_VERSION="-1.9" ./autogen.sh DS> DS> > b) Slightly modify m4/sdl.m4 so it accepts alternative name of DS> >sdl-config script via SDL_CONFIG environment variable. DS> >This modification is in patch-B-m4__sdl.m4 DS> Seems like a bug in the sdl.m4... Did they forgot the : or did they intendedly DS> leave it out? (Doesn't make so much sense as they could then also have left DS> out the +set entirely...) DS> DS> - AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) DS> + AC_PATH_PROGS(SDL_CONFIG, [$SDL_CONFIG sdl-config], no, [$PATH]) DS> Is this needed? Can we just change sdl-config to $SDL_CONFIG? DS> SDL_CONFIG get's defined to a default value if it is missing on the lines DS> before... I think it is needed because previous lines set SDL_CONFIG only if either --with-sdl-prefix or --with-sdl-exec-prefix is provided on 'configure' command line. DS> [ . . . skipped . . . ] DS> > DS> > c) replace all DS> > #include DS> >with DS> > #include <``header''> DS> I guess this was also intended by the SDL guys? (Otherwise they wouldn't have DS> set the SDL includepath... Still seems a bit ugly to me, but ok, if they like DS> it that way... Looks OK to me: almost every SDL header has ``SDL_'' prefix. So neigther name conflicts should occur nor developers be confused. DS> DS> >This can be done by applying the patch-D-lib+src DS> === DS> --- src/projectile.h(revision 435) DS> +++ src/projectile.h(working copy) DS> @@ -11,7 +11,7 @@ DS> DS> /***/ DS> DS> -#include "lib/framework/types.h" DS> +#include "lib/framework/frame.h" DS> #include "base.h" DS> #include "statsdef.h" DS> #include "movedef.h" DS> DS> Is that a mistake or intended? DS> It is not mistake, I've just missed to comment this. I'm not sure whether it is related to build problems but according to directive in "lib/framework/types.h" line 12, "Framework header files MUST be included from Frame.h ONLY". So this change just make the "projectile.h" follow this convention. Thank you. -- Yaroslav ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] build issues in FreeBSD system
On 10/24/06, Dennis Schridde <[EMAIL PROTECTED]> wrote: Am Dienstag, 24. Oktober 2006 09:35 schrieb Yaroslav Kolomiyets: > I. AutoTools part: > > a) make the autogen.sh accept alternative autoconf/automake binary >names. After patch-A-autgen.sh applied it is possible to run it as: > > $ env AUTOCONF_VERSION=259 AUTOMAKE_VERSION=19 ./autogen.sh You mean provide an autotools wrapper in our autogen.sh? This is really the task of the OS and not our, IMHO. You should provide a wrapper script around autoconf/automake which you can instruct to use a specific version of autotools, eg with WANT_AUTOCONF=2.60 or WANT_AUTOMAKE=1.10 I agree the FreeBSD approach is weird, but we cannot very well tell them how to organize their OS distribution, and I do not think the patch is unreasonable, IMHO. - Per ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] build issues in FreeBSD system
Am Dienstag, 24. Oktober 2006 09:35 schrieb Yaroslav Kolomiyets: > Dear Warzone2100 Developers, > > Sometimes it is necessary (and easy) to have multiple deployments of > SDL. FreeBSD ports maintainters organize things so there may be many > instances of one thing: autoconf253 and autoconf259, automake14 and > automake19. > > To build Warzone2100 on such system it is requered to make several > changes in code: > > I. AutoTools part: > > a) make the autogen.sh accept alternative autoconf/automake binary >names. After patch-A-autgen.sh applied it is possible to run it as: > > $ env AUTOCONF_VERSION=259 AUTOMAKE_VERSION=19 ./autogen.sh You mean provide an autotools wrapper in our autogen.sh? This is really the task of the OS and not our, IMHO. You should provide a wrapper script around autoconf/automake which you can instruct to use a specific version of autotools, eg with WANT_AUTOCONF=2.60 or WANT_AUTOMAKE=1.10 Other OS/Distros handle this completely different and I don't think we could provide a specific hack for all of them. Gentoo eg. has autoconf-2.60 and not autoconf260... > b) Slightly modify m4/sdl.m4 so it accepts alternative name of >sdl-config script via SDL_CONFIG environment variable. >This modification is in patch-B-m4__sdl.m4 Seems like a bug in the sdl.m4... Did they forgot the : or did they intendedly leave it out? (Doesn't make so much sense as they could then also have left out the +set entirely...) - AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) + AC_PATH_PROGS(SDL_CONFIG, [$SDL_CONFIG sdl-config], no, [$PATH]) Is this needed? Can we just change sdl-config to $SDL_CONFIG? SDL_CONFIG get's defined to a default value if it is missing on the lines before... > c) Modify m4/sdl_net.m4 so it includes not "SDL/SDL_net.h" but > "SDL_net.h" Necessarity of this modification is explained below. >This change is in patch-C-m4__sdl_net.m4 > > II. Source code part. > > All sources include SDL headers as SDL/``header''. But what to do if > SDL headers is in SDL11/ or SDL12/ ? To build in such environment, > it is necessary to: > > a) include -I``sdl_prefix''/include/SDL``suffix'' into CFLAGS. > > In autotoolized build this is done automaticaly by >`sdl-config --cflags`. > >In static makefiles build this may be achieved by putting >CFLAGS+=-I$(DEVDIR)/include/SDL in model config.mk. > > b) replace -lSDL with call to `${SDL_CONFIG:-sdl-config} --libs` > > This is done properly in autotoolized build with provided >patches applied. > >In static makefiles this may be done by stripping out '-lSDL' >from LDFLAGS and putting LDFLAGS+=-lSDL in model config.mk. > > c) replace all > #include >with > #include <``header''> I guess this was also intended by the SDL guys? (Otherwise they wouldn't have set the SDL includepath... Still seems a bit ugly to me, but ok, if they like it that way... >This can be done by applying the patch-D-lib+src === --- src/projectile.h(revision 435) +++ src/projectile.h(working copy) @@ -11,7 +11,7 @@ /***/ -#include "lib/framework/types.h" +#include "lib/framework/frame.h" #include "base.h" #include "statsdef.h" #include "movedef.h" Is that a mistake or intended? > After all proposed changes will be done, build can be done in > different environments with different autotools and sdls installed > without source code patching -- only setting around some environment > variables or fixing config.mk. > > My freebsd configuration script is: > : ${LOCALBASE:=/usr/local} > : ${X11BASE:=/usr/X11R6} > : ${SDL_CONFIG:=sdl11-config} > > SDL_CFLAGS=`${SDL_CONFIG} --cflags` > SDL_LIBS=`${SDL_CONFIG} --libs` > CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include $SDL_CFLAGS" > LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib $SDL_LIBS" > > SDLNETINC="$SDL_CFLAGS" > SDLNETLIB="$SDL_LIBS" > > export CPPFLAGS LDFLAGS SDL_CFLAGS SDL_LIBS SDLNETINC SDLNETLIB > export SDL_CONFIG > > ./configure > > That's all. > > Thank you. I'm looking forward to your positive replies. You're welcome... --Dennis pgphC87WNSgMs.pgp Description: PGP signature ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev