From bug 427952 comment 4: sys-freebsd/freebsd-ubin provides /usr/bin/indent. dev-util/indent is a GNU fork of the original indent, which is used in *BSD. The original indent supports all of the flags used by mesa 8.1, with the exception of -bls: http://cgit.freedesktop.org/mesa/mesa/commit/configure.ac?id=2224fb6047dd96cbc11d7f2093319e5eb49c0b6b In the original indent, -bl/-br determine brace placement for both statements and declarations. GNU ident redefined -bl/-br to only apply to statements. GNU indent then implemented -bls/-brs and -blf/-brf to apply to struct declarations and function declarations respectively. The ~x86-fbsd keyword never should have been in dev-util/indent. It has been dropped from the ebuild. Instead of keywording dev-util/indent, we could modify autotools to distinguish between GNU ident and the original indent, using appropriate options for each. A quicker way of doing this would be to just patch -brs out of the current autotools check when userland_BSD is set, but that is a hack.
i probably don't understand the problem but dev-util/indent adds a lot of dependencies. why this dependency is needed? "check for it in configure.ac and fall back to 'cat' if it's not available" why not use 'cat' default?
This bug is dealing with mesa trying to use BSD indent if available, and failing because passing unsupported options to it. This is independent of the question whether indent should be a hard dependency or automagic.
(In reply to comment #2) > This bug is dealing with mesa trying to use BSD indent if available, and > failing because passing unsupported options to it. > > This is independent of the question whether indent should be a hard > dependency or automagic. Maybe a USE flag would be appropriate. Anyway, the flag being used was introduced by the GNU project after redefining one of the existing flags to only cover a subset of its previous functionality. Omitting it on BSD platforms should produce the same output that is produced with the GNU indent.
(In reply to comment #3) > Maybe a USE flag would be appropriate. No. That's an awful idea. > Anyway, the flag being used was > introduced by the GNU project after redefining one of the existing flags to > only cover a subset of its previous functionality. Omitting it on BSD > platforms should produce the same output that is produced with the GNU > indent. Test it and find out?
(In reply to comment #4) > (In reply to comment #3) > > Maybe a USE flag would be appropriate. > > No. That's an awful idea. all user should emerge new 30 perl for just updating mesa-8.1? only for generated code's readability? please stop hard deps... # emerge --oneshot --deep --newuse --update --with-bdeps=y media-libs/mesa -ptv These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild U ] media-libs/mesa-8.1_rc1_pre20120724 [8.0.4] USE="classic egl gallium gbm gles1 gles2 nptl openvg shared-glapi xa -bindist (-d3d) -debug -g3dvl (-llvm) (-osmesa) -pax_kernel -pic -r600-llvm-compiler% (-selinux) (-vdpau) (-wayland) -xorg% (-xvmc) (-shared-dricore%*)" VIDEO_CARDS="r200 radeon (-i915) (-i965) (-intel) -nouveau -r100 -r300 -r600 -radeonsi% (-vmware)" 4,758 kB [ebuild N ] dev-util/indent-2.2.11-r1 USE="nls" LINGUAS="ja -ca -da -de -eo -et -fi -fr -gl -hu -it -ko -nl -pl -pt_BR -ru -sk -sv -tr -zh_TW" 761 kB [ebuild N ] app-text/texi2html-5.0-r1 USE="unicode" 15,037 kB [ebuild N ] dev-perl/Unicode-EastAsianWidth-1.320.0 29 kB [nomerge ] perl-core/CPAN-Meta-2.120.921 [nomerge ] virtual/perl-ExtUtils-MakeMaker-6.620.0 [nomerge ] perl-core/ExtUtils-MakeMaker-6.620.0-r1 [ebuild N ] virtual/perl-CPAN-Meta-2.120.921 0 kB [ebuild N ] perl-core/CPAN-Meta-2.120.921 75 kB [ebuild N ] virtual/perl-ExtUtils-MakeMaker-6.620.0 0 kB [ebuild N ] perl-core/ExtUtils-MakeMaker-6.620.0-r1 406 kB [nomerge ] x11-base/xorg-server-1.12.3 USE="nptl udev xorg -dmx -doc -ipv6 -kdrive -minimal (-selinux) -static-libs -tslib -xnest -xvfb" [nomerge ] x11-base/xorg-drivers-1.12 INPUT_DEVICES="evdev keyboard mouse -acecad -aiptek -elographics -fpit -hyperpen -joystick -mutouch -penmount -synaptics -tslib (-vmmouse) -void -wacom" VIDEO_CARDS="fbdev radeon (-apm) (-ark) (-ast) -cirrus -dummy -epson (-fglrx) (-geode) -glint (-i128) (-i740) (-intel) -mach64 -mga -modesetting (-neomagic) (-newport) -nouveau -nv (-nvidia) (-omapfb) (-qxl) -r128 -s3 -s3virge -savage (-siliconmotion) (-sis) (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx (-tga) -trident -v4l (-vesa) (-via) (-virtualbox) (-vmware) (-voodoo)" [nomerge ] x11-drivers/xf86-video-ati-6.14.4-r1 [ebuild U ] x11-libs/libdrm-2.4.37 [2.4.33] USE="libkms -static-libs" VIDEO_CARDS="radeon (-exynos) (-intel) -nouveau (-omap) (-vmware)" 493 kB [nomerge ] perl-core/ExtUtils-MakeMaker-6.620.0-r1 [ebuild N ] virtual/perl-ExtUtils-Command-1.170.0-r3 0 kB [ebuild N ] virtual/perl-ExtUtils-Install-1.54 0 kB [ebuild N ] perl-core/ExtUtils-Install-1.54 66 kB [ebuild N ] virtual/perl-ExtUtils-Manifest-1.600.0 0 kB [ebuild N ] perl-core/ExtUtils-Manifest-1.600.0 28 kB [nomerge ] perl-core/CPAN-Meta-2.120.921 [ebuild N ] virtual/perl-File-Temp-0.220.0-r2 0 kB [ebuild N ] virtual/perl-IO-1.25 0 kB [ebuild N ] perl-core/IO-1.25 52 kB [ebuild N ] virtual/perl-Test-Simple-0.980.0-r2 0 kB [ebuild N ] virtual/perl-CPAN-Meta-Requirements-2.122.0 0 kB [ebuild N ] perl-core/CPAN-Meta-Requirements-2.122.0 21 kB [ebuild N ] virtual/perl-Scalar-List-Utils-1.250.0 0 kB [ebuild N ] perl-core/Scalar-List-Utils-1.250.0 66 kB [ebuild N ] virtual/perl-Parse-CPAN-Meta-1.440.400 0 kB [ebuild N ] perl-core/Parse-CPAN-Meta-1.440.400 8 kB [ebuild N ] virtual/perl-CPAN-Meta-YAML-0.8.0 0 kB [ebuild N ] perl-core/CPAN-Meta-YAML-0.8.0 31 kB [ebuild N ] virtual/perl-File-Spec-3.330.0-r1 0 kB [ebuild N ] perl-core/File-Spec-3.330.0 132 kB [nomerge ] app-text/texi2html-5.0-r1 USE="unicode" [ebuild N ] dev-perl/libintl-perl-1.200.0 489 kB [ebuild N ] dev-perl/Text-Unidecode-0.40.0 101 kB [nomerge ] perl-core/CPAN-Meta-2.120.921 [ebuild N ] virtual/perl-version-0.990.0-r1 0 kB [ebuild N ] virtual/perl-JSON-PP-2.272.0-r1 0 kB Total: 32 packages (2 upgrades, 30 new), Size of downloads: 22,545 kB
(In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > > > Maybe a USE flag would be appropriate. > > > > No. That's an awful idea. > > all user should emerge new 30 perl for just updating mesa-8.1? > only for generated code's readability? > please stop hard deps... I didn't claim a hard dep was the right thing to do. Re-read what I said.
indent dependency removed, since it only indents compiled code and not installed headers. Still have the problem of bsd indent not handling -bls.
(In reply to comment #7) > indent dependency removed, since it only indents compiled code and not > installed headers. > > Still have the problem of bsd indent not handling -bls. The version of indent in FreeBSD is a standard utility that is available across a wide range of UNIX platforms. In the original indent, -bs implies the GNU -bls. GNU ident requires -bls when -bs is specified to make it behave like the original. The FreeBSD developers think that packages using -bls should be patched to only pass it when GNU indent is used.
(In reply to comment #8) > (In reply to comment #7) > > indent dependency removed, since it only indents compiled code and not > > installed headers. > > > > Still have the problem of bsd indent not handling -bls. > > The version of indent in FreeBSD is a standard utility that is available > across a wide range of UNIX platforms. In the original indent, -bs implies > the GNU -bls. GNU ident requires -bls when -bs is specified to make it > behave like the original. The FreeBSD developers think that packages using > -bls should be patched to only pass it when GNU indent is used. Okay, let me explain. The code is generated by some python scripts and run through indent so that it may be readable when packaged into the release tarballs. It's not important for the build. It's not important to make it work on *BSD since no one doing the packaging will care about packing *on* BSD. All you need to do is put 'INDENT=cat' before the configure invocation to avoid using BSD indent.
*** Bug 435498 has been marked as a duplicate of this bug. ***
(In reply to comment #9) > All you need to do is put 'INDENT=cat' before the configure invocation to > avoid using BSD indent. Agreed. Or at a greater cost: --- configure.ac.org 2012-08-14 19:54:39.000000000 +0200 +++ configure.ac 2012-09-25 05:45:06.507808646 +0200 @@ -64,7 +64,7 @@ AC_PATH_PROG([PERL], [perl]) -AC_CHECK_PROG(INDENT, indent, indent, cat) +AC_CHECK_PROG(INDENT, cat, cat, cat) if test "x$INDENT" != "xcat"; then AC_SUBST(INDENT_FLAGS, '-i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool') fi :)
I'm considering to add this patch to the ebuilds for a workaround...: diff --git a/media-libs/mesa/mesa-9.0_pre20120918.ebuild b/media-libs/mesa/mesa-9.0_pre20120918.ebuild index 3034e41..9464eff 100644 --- a/media-libs/mesa/mesa-9.0_pre20120918.ebuild +++ b/media-libs/mesa/mesa-9.0_pre20120918.ebuild @@ -250,6 +250,8 @@ src_configure() { " fi + use userland_GNU || export INDENT=cat + econf \ --enable-dri \ --enable-glx \
(In reply to comment #12) > I'm considering to add this patch to the ebuilds for a workaround...: > > diff --git a/media-libs/mesa/mesa-9.0_pre20120918.ebuild > b/media-libs/mesa/mesa-9.0_pre20120918.ebuild > index 3034e41..9464eff 100644 > --- a/media-libs/mesa/mesa-9.0_pre20120918.ebuild > +++ b/media-libs/mesa/mesa-9.0_pre20120918.ebuild > @@ -250,6 +250,8 @@ src_configure() { > " > fi > > + use userland_GNU || export INDENT=cat > + > econf \ > --enable-dri \ > --enable-glx \ That seems perfectly fine. Feel free to commit this (and make sure to commit to the x11 overlay or have someone commit it for you)
(In reply to comment #13) > That seems perfectly fine. Feel free to commit this (and make sure to commit > to the x11 overlay or have someone commit it for you) Thanks. I've modified the ebuild to use cat for INDENT in the main tree. Since I don't have permission to change x11 overlay, could you commit to the x11 tree please?
Fix pushed to x11 overlay.