This new ebuild checks for the presence of the 'ipv6' USE flag. If not set, passes '--disable-ipv6' to configure before compiling the program. The avoids the condition where dnstracer tries to query an IPv6 server but gives a address family not supported error because your system does not have IPv6 support. The error looks like this: reaper@darkstar reaper $ dnstracer www.janet.ac.uk Tracing to www.janet.ac.uk via 127.0.0.1, timeout 15 seconds 127.0.0.1 (127.0.0.1) |\___ ns.uu.net [ac.uk] (137.39.1.3) | |\___ ns3.ja.net [janet.ac.uk] (193.63.106.103) Got authoritative answer | |\___ ns3.ja.net [janet.ac.uk] (2001:0630:0000:0048:0000:0000:0000:0067) create_socket/socket: Address family not supported by protocol If this is an IPv6 problem, run configure with --disable-ipv6 This is my first attempt at an ebuild, it would be great if someone could look at it to make sure i did it properly. I tested on x86 (P-III 700) with IPv4 only and it worked fine.
Created attachment 33418 [details] dnstracer-1.7-r1.ebuild (update) Simple if then added to check for ipv6 USE flag.
A few comments: 1. S=${WORKDIR}/${P} is redundant 2. you specified a src_compile without a make. the ebuild will do a make (because of the make install in src_install), but it is not proper. 3. if you need to disable or enable a configure switch according to a useflag use the following format: econf `use_enable ipv6` Here is a revised src_compile: src_compile () { econf `use_enable ipv6` || die emake || die }
Oh, and also don't forget to ~mask all the archs: x86 -> ~x86, etc.
Created attachment 33754 [details] dnstracer-1.7-r1.ebuild
Thanks for the improvements, Eldad. Like i said, this is my first attempt, and i wasn't sure of the proper way to make an ebuild. Your looks much nicer. Can this improved ebuild be accepted then?
Yep. Also, you might want to check out these docs: http://www.gentoo.org/doc/en/gentoo-howto.xml http://www.gentoo.org/doc/en/ebuild-mistakes.xml and maybe http://www.gentoo.org/doc/en/ebuild-submit.xml too. and then there's "man 5 ebuild" to consult...
in portage, thanks!