Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408261 - dev-lang/tcl, dev-lang/tk: please remove slash-stripping assignment of $mylibdir
Summary: dev-lang/tcl, dev-lang/tk: please remove slash-stripping assignment of $mylibdir
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-03-15 02:54 UTC by Kevin Pyle
Modified: 2012-03-19 08:11 UTC (History)
0 users

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


Attachments
Patch to tcl-8.5.11.ebuild to remove slash-stripping mylibdir assignment (tcl-8.5.11.ebuild.patch,522 bytes, patch)
2012-03-15 02:54 UTC, Kevin Pyle
Details | Diff
Patch to tk-8.5.11.ebuild to remove slash-stripping mylibdir assignment (tk-8.5.11.ebuild.patch,694 bytes, patch)
2012-03-15 02:54 UTC, Kevin Pyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Pyle 2012-03-15 02:54:06 UTC
Created attachment 305413 [details, diff]
Patch to tcl-8.5.11.ebuild to remove slash-stripping mylibdir assignment

All presently in tree ebuilds for both dev-lang/tcl and dev-lang/tk feature a line of the form:

    local mylibdir=$(get_libdir) ; mylibdir=${mylibdir//\/}

This caches the value of $LIBDIR for the current ABI, then strips slashes from it.  The following lines use $mylibdir repeatedly, hence why it is cached.  It was added by vapier in Jun 2005 to try to eliminate consecutive slashes in paths.  However, the slash-stripping is problematic.  It serves no purpose for in-tree profiles, where $LIBDIR never contains slashes:

$ cd $PORTDIR && grep -r LIBDIR'.*=' profiles/
profiles/arch/mips/mips64/multilib/make.defaults:LIBDIR_o32="lib"
profiles/arch/mips/mips64/multilib/make.defaults:LIBDIR_n32="lib32"
profiles/arch/mips/mips64/multilib/make.defaults:LIBDIR_n64="lib64"
profiles/arch/mips/mips64/n32/make.defaults:LIBDIR_n32="lib32"
profiles/arch/mips/mips64/n64/make.defaults:LIBDIR_n32="lib64"
profiles/arch/mips/mipsel/mips64el/multilib/make.defaults:LIBDIR_o32="lib"
profiles/arch/mips/mipsel/mips64el/multilib/make.defaults:LIBDIR_n32="lib32"
profiles/arch/mips/mipsel/mips64el/multilib/make.defaults:LIBDIR_n64="lib64"
profiles/arch/mips/mipsel/mips64el/n32/make.defaults:LIBDIR_n32="lib32"
profiles/arch/mips/mipsel/mips64el/n64/make.defaults:LIBDIR_n32="lib64"
profiles/features/64bit-native/make.defaults:LIBDIR_amd64="lib64"
profiles/features/64bit-native/make.defaults:LIBDIR_ppc64="lib64"
profiles/features/multilib/lib32/make.defaults:LIBDIR_ppc="lib32"
profiles/features/multilib/lib32/make.defaults:LIBDIR_x86="lib32"
profiles/features/multilib/lib32/make.defaults:LIBDIR_x86_fbsd="lib32"
profiles/features/multilib/lib32/make.defaults:LIBDIR_sparc32="lib32"
profiles/features/multilib/lib32/make.defaults:LIBDIR_s390="lib32"
profiles/features/multilib/make.defaults:LIBDIR_amd64="lib64"
profiles/features/multilib/make.defaults:LIBDIR_amd64_fbsd="lib64"
profiles/features/multilib/make.defaults:LIBDIR_n64="lib64"	# MIPS n64
profiles/features/multilib/make.defaults:LIBDIR_ppc64="lib64"
profiles/features/multilib/make.defaults:LIBDIR_s390x="lib64"
profiles/features/multilib/make.defaults:LIBDIR_sparc64="lib64"
profiles/features/multilib/make.defaults:LIBDIR_x86="lib"
profiles/features/multilib/make.defaults:LIBDIR_x86_fbsd="lib"
profiles/features/multilib/make.defaults:LIBDIR_o32="lib"	# MIPS o32
profiles/features/multilib/make.defaults:LIBDIR_ppc="lib"
profiles/features/multilib/make.defaults:LIBDIR_s390="lib"
profiles/features/multilib/make.defaults:LIBDIR_sparc32="lib"
profiles/features/multilib/make.defaults:LIBDIR_x32="libx32"	# x86-64 x32
profiles/features/multilib/make.defaults:LIBDIR_n32="lib32"	# MIPS n32
profiles/prefix/linux/amd64/make.defaults:LIBDIR_amd64="lib"
profiles/prefix/linux/ppc64/make.defaults:LIBDIR_ppc64="lib"

I am presently working on an experimental multiarch system where LIBDIR_amd64="lib/x86_64-pc-linux-gnu".  On this system, the expression shown above strips the embedded slash, producing libx86_64-pc-linux-gnu, which is not a valid path.  The build then fails.  After applying the attached patches, the build succeeds.
Comment 1 Kevin Pyle 2012-03-15 02:54:43 UTC
Created attachment 305415 [details, diff]
Patch to tk-8.5.11.ebuild to remove slash-stripping mylibdir assignment
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2012-03-15 19:50:08 UTC
Thanks for the patches. I will put them as soon as I have a gentoo box in hand.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2012-03-19 08:11:41 UTC
+  19 Mar 2012; Justin Lecher <jlec@gentoo.org> tk-8.5.11.ebuild:
+  Drop unnessecary stripping of slashes, #408261, thanks Kevin Pyle for the
+  patch
+


+  19 Mar 2012; Justin Lecher <jlec@gentoo.org> tcl-8.5.11.ebuild:
+  Drop unnessecary stripping of slashes, #408261, thanks Kevin Pyle for the
+  patch
+