The attached patch applied over current gawk ebuild (if possible having a revision bump can help g/fbsd but that's not required) makes it possible to use the same ebuild with Linux and bsd-userland systems without having the original awk overwritten by gawk. It also avoid installing filefuncts on bsd-userlarnd systems (not sure about this, it was avoided on g/fbsd at least). It needs the -checkrm patch which adds a check in configure.ac for rm command as makefiles refers to it as $(RM) which wasn't correctly resolved on g/fbsd for some reason. Thanks in advance, Diego
Created attachment 57570 [details, diff] gawk-3.1.4.patch
Created attachment 57571 [details, diff] gawk-3.1.4-checkrm.patch
filefuncs.so is used by baselayout so you dont want to make that dependent upon USERLAND also, doesnt OS X use the current ebuild w/out changes ?
Uhm filefuncts here isn't used, maybe it should be separed into an ebuild of its own? About osx, i see no ppc-macos keyword in the ebuild, so i don't really know.
OSX and gawk is completely horked up. Last I knew they couldn't use the ebuild because of something weird with apple's gawk or something. As for filefuncs and baselayout, we have the filefuncs module in the baselayout ebuild for some reason, so we don't want it in gawk. Plus it doesn't build.
so what's the goal here ? to not install /bin/awk and /usr/bin/awk ? you only want to install /bin/gawk and /usr/bin/gawk on BSD ?
Yes mainly that's the problem. awk on non-gnu systems is system's awk and shouldn't be overwritten... just like gmake/make.
$(RM) is a GNU make builtin ... can you possibly get that added to bsd make ? i imagine it's a common thing to just use $(RM) without defining it in configure ...
But we use gnu make to compile gawk...
ok, so what does this show: $ echo 'testit:'$'\n\t''@echo $(RM)' > maketest $ make -f maketest testit on my box it shows: rm -f
Hmm with gmake it works... now the problem is: why on the earth also if make is aliased to gmake it doesn't work with emake? maybe we should make emake use gmake as now gmake is present anyway on gentoo/linux.
check out 3.1.4-r4, it should be all set now
Still problems with makes... first problem: the $(RM) thing. Seems like gawk calls $(MAKE) but unalias it first, so that the call is actually done for bsd make instead of gmake. putting MAKE="gmake" on emake commandline fixes it. Also filefuncts's emake calls bsdish make (usually emake doesn't call make, but gmake so I really don't know what on earth is going on here), and the $^ var isn't expanded (gnu-ish?). The solution for filefuncts is to replace $^ with $< as there's just one prerequisite.
gawk doesnt seem to set the MAKE variable (grep the source and you should only see the makefiles using it, not setting it) the fact that filefuncs fails too indicates something unrelated eh ? research it and get back to us :P
Marking as fixed, emake problem will be reported as another bug.