Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407059 - dev-lang/tcl-8.5.11: Install fails on Mac OS X
Summary: dev-lang/tcl-8.5.11: Install fails on Mac OS X
Status: VERIFIED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-06 06:10 UTC by Charles Davis
Modified: 2012-03-07 19:33 UTC (History)
1 user (show)

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


Attachments
Patch to fix bug (darwin-fix-tcl.patch,911 bytes, text/plain)
2012-03-06 06:10 UTC, Charles Davis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Davis 2012-03-06 06:10:58 UTC
Created attachment 304355 [details]
Patch to fix bug

When merging tcl 8.5.11, the merge dies during the install phase. I traced it back to this command in the ebuild:

    [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] && sed -i \
        -e "s,^TCL_CC_SEARCH_FLAGS='\(.*\)',TCL_CC_SEARCH_FLAGS='\1:${EPREFIX}/usr/${mylibdir}'," \
        -e "s,^TCL_LD_SEARCH_FLAGS='\(.*\)',TCL_LD_SEARCH_FLAGS='\1:${EPREFIX}/usr/${mylibdir}'," \
        "${ED}"/usr/${mylibdir}/tclConfig.sh || die

I think you wanted it to evaluate as:

    [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] && { sed -i \
        -e "s,^TCL_CC_SEARCH_FLAGS='\(.*\)',TCL_CC_SEARCH_FLAGS='\1:${EPREFIX}/usr/${mylibdir}'," \
        -e "s,^TCL_LD_SEARCH_FLAGS='\(.*\)',TCL_LD_SEARCH_FLAGS='\1:${EPREFIX}/usr/${mylibdir}'," \
        "${ED}"/usr/${mylibdir}/tclConfig.sh || die
    }

but bash is really evaluating it as:

    {[[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] && sed -i \
        -e "s,^TCL_CC_SEARCH_FLAGS='\(.*\)',TCL_CC_SEARCH_FLAGS='\1:${EPREFIX}/usr/${mylibdir}'," \
        -e "s,^TCL_LD_SEARCH_FLAGS='\(.*\)',TCL_LD_SEARCH_FLAGS='\1:${EPREFIX}/usr/${mylibdir}'," \
        "${ED}"/usr/${mylibdir}/tclConfig.sh
    } || die

(Note the braces.) Since the check for not-Darwin (and not-Linux Mint) failed, the whole command inside the braces failed, so bash ran the 'die' command. Here's a patch that should fix this.
Comment 1 Fabian Groffen gentoo-dev 2012-03-06 07:53:06 UTC
revision 1.4
date: 2012-03-02 18:16:21 +0100;  author: jlec;  state: Exp;  lines: +23 -20;  commitid: 63e54f5100654567;
Add missing dies, remove unnessecary dies, handle static-libs

(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)


% cvs diff -r1.{3,4} tcl-8.5.10.ebuild
Index: tcl-8.5.10.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-lang/tcl/tcl-8.5.10.ebuild,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- tcl-8.5.10.ebuild   4 Jan 2012 20:44:37 -0000       1.3
+++ tcl-8.5.10.ebuild   2 Mar 2012 17:16:21 -0000       1.4
[snip many hunks]
@@ -69,7 +68,7 @@
        v1=${PV%.*}
 
        cd "${S}"/unix
-       S= emake DESTDIR="${D}" install || die
+       S= emake DESTDIR="${D}" install
 
        # fix the tclConfig.sh to eliminate refs to the build directory
        local mylibdir=$(get_libdir) ; mylibdir=${mylibdir//\/}
@@ -83,34 +82,38 @@
        [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] && sed -i \
                -e "s,^TCL_CC_SEARCH_FLAGS='\(.*\)',TCL_CC_SEARCH_FLAGS='\1:${EPREFIX}/usr/${mylibdir}'," \
                -e "s,^TCL_LD_SEARCH_FLAGS='\(.*\)',TCL_LD_SEARCH_FLAGS='\1:${EPREFIX}/usr/${mylibdir}'," \
-               "${ED}"/usr/${mylibdir}/tclConfig.sh
+               "${ED}"/usr/${mylibdir}/tclConfig.sh || die
 
[snip some of the diff] 

IOW, jlec, just a heads up for you :)

Turned into a proper if then fi sequence now.
Comment 2 Charles Davis 2012-03-07 19:33:11 UTC
Thanks.