Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

fix emerge error ghc-7.4.1-r1.ebuild USE=binary in 64bit Prefix Linux #135

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

No description provided.

Owner

trofi commented Jun 25, 2012

Yeah, I think fix like that would be useful even for our amd64 nomultilib profile.
I think of something along the lines:

  •           binpkg_libdir=${binpkg_libdir#${WORKDIR}/usr/}
    
  •           if [[ ${binpkg_libdir} != $(get_libdir) ]]; then
    

But it requires a bit more relocations across the places to look exactly the same way it would be installed from sources.

@trofi
$(get_libdir) returns "lib" in amd64 profile. "lib64" appears amd64 and ppc64 binary.

・binpkg_libdir=${binpkg_libdir#${WORKDIR}/usr/}
・if [[ ${binpkg_libdir} != $(get_libdir) ]]; then

using as follws?:

cp "${WORKDIR}/usr/bin/ghc-pkg-${PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
     # Relocate from /usr to ${EPREFIX}/usr
binpkg_libdir=${binpkg_libdir#${WORKDIR}/usr/}
if [[ ${binpkg_libdir} != $(get_libdir) ]];
then
    relocate_path "/usr" "${to}/usr" \
    "${WORKDIR}/usr/bin/ghc-${PV}" \
    "${WORKDIR}/usr/bin/ghci-${PV}" \
    "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
    "${WORKDIR}/usr/bin/hsc2hs" \
    "${WORKDIR}/usr/$(get_libdir)/${P}/package.conf.d/"*
else
    relocate_path "/usr" "${to}/usr" \
    "${WORKDIR}/usr/bin/ghc-${PV}" \
    "${WORKDIR}/usr/bin/ghci-${PV}" \
    "${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
    "${WORKDIR}/usr/bin/hsc2hs" \
    "${WORKDIR}/usr/$(get_libdir)64/${P}/package.conf.d/"*
fi        

it causes emerge error as follows:
...
environment, line 3724: Called die

  • The specific snippet of code:
  •       sed -i -e "s|$from|$to|g" "$file" || die "path relocation failed for '$file'";
    
    ...

@cosmo0920 cosmo0920 closed this Dec 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment