Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90847 - sys-apps/gawk not overwriting awk on non-gnu userlands
Summary: sys-apps/gawk not overwriting awk on non-gnu userlands
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-29 05:33 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2006-04-12 10:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
gawk-3.1.4.patch (gawk-3.1.4.patch,2.55 KB, patch)
2005-04-29 05:33 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff
gawk-3.1.4-checkrm.patch (gawk-3.1.4-checkrm.patch,1.32 KB, patch)
2005-04-29 05:33 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-29 05:33:12 UTC
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
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-29 05:33:34 UTC
Created attachment 57570 [details, diff]
gawk-3.1.4.patch
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-29 05:33:57 UTC
Created attachment 57571 [details, diff]
gawk-3.1.4-checkrm.patch
Comment 3 SpanKY gentoo-dev 2005-04-29 06:02:02 UTC
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 ?
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-29 06:10:42 UTC
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.
Comment 5 Stephen Bennett (RETIRED) gentoo-dev 2005-04-29 06:33:01 UTC
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.
Comment 6 SpanKY gentoo-dev 2005-05-02 20:49:09 UTC
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 ?
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-03 03:28:51 UTC
Yes mainly that's the problem. awk on non-gnu systems is system's awk and shouldn't be overwritten... just like gmake/make.
Comment 8 SpanKY gentoo-dev 2005-05-03 21:31:53 UTC
$(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 ...
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-04 04:13:27 UTC
But we use gnu make to compile gawk...
Comment 10 SpanKY gentoo-dev 2005-05-04 05:28:16 UTC
ok, so what does this show:
$ echo 'testit:'$'\n\t''@echo $(RM)' > maketest
$ make -f maketest testit

on my box it shows:
rm -f
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-04 05:36:55 UTC
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.
Comment 12 SpanKY gentoo-dev 2005-05-05 18:35:58 UTC
check out 3.1.4-r4, it should be all set now
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-06 04:46:01 UTC
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.
Comment 14 SpanKY gentoo-dev 2005-05-06 05:25:04 UTC
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
Comment 15 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-05-14 06:04:45 UTC
Marking as fixed, emake problem will be reported as another bug.