Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238475 - sys-apps/grep-2.5.3 fails at src_install on Gentoo/FreeBSD.
Summary: sys-apps/grep-2.5.3 fails at src_install on Gentoo/FreeBSD.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://savannah.gnu.org/bugs/index.p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-23 13:53 UTC by Javier Villavicencio (RETIRED)
Modified: 2008-12-31 16:48 UTC (History)
1 user (show)

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


Attachments
grep-2.5.3-ebuild.patch (grep-2.5.3-ebuild.patch,702 bytes, patch)
2008-09-23 13:56 UTC, Javier Villavicencio (RETIRED)
Details | Diff
top_builddir fix (grep-2.5.3-po_builddir-fix.patch,252 bytes, patch)
2008-10-26 22:42 UTC, Javier Villavicencio (RETIRED)
Details | Diff
remove --without-included-regex if FreeBSD libc. (patch-ebuild.patch,662 bytes, patch)
2008-10-26 22:45 UTC, Javier Villavicencio (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Villavicencio (RETIRED) gentoo-dev 2008-09-23 13:53:42 UTC
Problem:
${S}/po/Makefile.in (and since there is no eautoreconf, Makefile too) lacks a 
top_builddir = @top_builddir@
which sets 'mkdir_p' to "././install-sh -c -d"

Why:
On Linux, autoconf/libtool/whatever, looks for a compatible 'mkdir' implementation by executing "mkdir --version", if that returns either `coreutils` or `fileutils`, then mkdir_p is set to "/bin/mkdir -p".
But on FreeBSD, "mkdir --version" is invalid, so mkdir_p is set to "$(top_builddir)/./install-sh -c -d".
By not having top_builddir 'replaced' properly at ./configure time in po/Makefile, $(top_builddir) it's then inherited from the main Makefile where it's set to "./" (while on each other ${S}/subdir @top_builddir@ is replaced by "..")
Comment 1 Javier Villavicencio (RETIRED) gentoo-dev 2008-09-23 13:56:58 UTC
Created attachment 166182 [details, diff]
grep-2.5.3-ebuild.patch

Patch to the ebuild, and in the comment above it should read ${S}/po/Makefile.in.in.
Comment 2 Javier Villavicencio (RETIRED) gentoo-dev 2008-09-23 21:45:06 UTC
https://savannah.gnu.org/bugs/index.php?24360
Comment 3 SpanKY gentoo-dev 2008-10-26 05:53:35 UTC
Comment on attachment 166182 [details, diff]
grep-2.5.3-ebuild.patch

erm, no ... you can do this so that it does not require autotools being run.  also, post a patch to the relevant files rather than a sed script.
Comment 4 Javier Villavicencio (RETIRED) gentoo-dev 2008-10-26 22:42:22 UTC
Created attachment 169965 [details, diff]
top_builddir fix

fix for po/Makefile.in.in it doesn't need eautoreconf, my bad.
Comment 5 Javier Villavicencio (RETIRED) gentoo-dev 2008-10-26 22:45:21 UTC
Created attachment 169967 [details, diff]
remove --without-included-regex if FreeBSD libc.

-r1 added --without-included-regex which breaks on FreeBSD as well, this diff to the ebuild includes the patching for the po/Makefile issue plus a check for FreeBSD's libc.

Glad to have you back, Mike.
Comment 6 SpanKY gentoo-dev 2008-10-27 01:15:02 UTC
why do you need included regex ?  if you really really need that, perhaps you want the code as is in the sed ebuild ...
Comment 7 Javier Villavicencio (RETIRED) gentoo-dev 2008-10-27 21:25:23 UTC
(In reply to comment #6)
> why do you need included regex ?  if you really really need that, perhaps you
> want the code as is in the sed ebuild ...
> 

AFAICS sed's configure.ac check for regex functions ignores --without-included-regex if it's not found on the libc.
But grep's m4/regex.m4 honors/enforces the commandline. I guess sed defaults to included regex while grep by default uses the libc's?
Comment 8 Javier Villavicencio (RETIRED) gentoo-dev 2008-12-31 01:49:03 UTC
It's ok if I commit this one? Regarding the code on sed's ebuild, regex.h exists, but the regex functions grep uses aren't on FreeBSD's libc.
Comment 9 SpanKY gentoo-dev 2008-12-31 12:39:01 UTC
yeah, it's fine to commit
Comment 10 Javier Villavicencio (RETIRED) gentoo-dev 2008-12-31 16:48:17 UTC
Comitted, thanks!.