diff options
author | hololeap <hololeap@users.noreply.github.com> | 2023-02-07 18:11:09 -0700 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-21 05:13:27 +0000 |
commit | 2c82a2b2c99a1c872ae3905c8a867fa576159523 (patch) | |
tree | 8211b0536efa6c1087742f5a5663a8a91a66b7eb /dev-lang/ghc | |
parent | dev-lang/ghc: Force C.utf8 locale on all versions (diff) | |
download | gentoo-2c82a2b2c99a1c872ae3905c8a867fa576159523.tar.gz gentoo-2c82a2b2c99a1c872ae3905c8a867fa576159523.tar.bz2 gentoo-2c82a2b2c99a1c872ae3905c8a867fa576159523.zip |
dev-lang/ghc: Differentiate glibc vs musl binaries
GHC binaries built for glibc do not seem to play nice on musl systems.
This separates the two so musl binaries can later be built/uploaded.
Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/1368
Signed-off-by: hololeap <hololeap@users.noreply.github.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r-- | dev-lang/ghc/ghc-8.10.6-r2.ebuild | 84 | ||||
-rw-r--r-- | dev-lang/ghc/ghc-9.0.2-r3.ebuild | 85 |
2 files changed, 122 insertions, 47 deletions
diff --git a/dev-lang/ghc/ghc-8.10.6-r2.ebuild b/dev-lang/ghc/ghc-8.10.6-r2.ebuild index a6c5e39b7c68..d3def7c1d0a9 100644 --- a/dev-lang/ghc/ghc-8.10.6-r2.ebuild +++ b/dev-lang/ghc/ghc-8.10.6-r2.ebuild @@ -25,36 +25,72 @@ HOMEPAGE="https://www.haskell.org/ghc/" arch_binaries="" BIN_PV=${PV} -# sorted! -#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )" -#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )" -#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )" -arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )" -#arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )" -#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )" -#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )" -#arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )" -#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )" -arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )" + +# Differentiate glibc/musl + +#glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )" +glibc_binaries="$glibc_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )" +#glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )" +#glibc_binaries="$glibc_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )" +#glibc_binaries="$glibc_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )" +#glibc_binaries="$glibc_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )" +#glibc_binaries="$glibc_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )" +#glibc_binaries="$glibc_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tbz2 ) )" +#glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )" +glibc_binaries="$glibc_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )" + +#musl_binaries="$musl_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )" +#musl_binaries="$musl_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-musl.tbz2 )" +#musl_binaries="$musl_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-musl.tbz2 )" +#musl_binaries="$musl_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-musl.tbz2 )" +#musl_binaries="$musl_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )" +#musl_binaries="$musl_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )" +#musl_binaries="$musl_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )" +#musl_binaries="$musl_binaries ppc64? ( !big-endian? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-powerpc64le-unknown-linux-musl.tbz2 ) )" +#musl_binaries="$musl_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )" +#musl_binaries="$musl_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-musl.tbz2 )" + +[[ -n $glibc_binaries ]] && arch_binaries="$arch_binaries elibc_glibc? ( $glibc_binaries )" +[[ -n $musl_binaries ]] && arch_binaries="$arch_binaries elibc_musl? ( $musl_binaries )" # various ports: #arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )" # 0 - yet yet_binary() { - case "${ARCH}" in - #alpha) return 0 ;; - #arm64) return 0 ;; - #arm) return 0 ;; - amd64) return 0 ;; - #ia64) return 0 ;; - #ppc) return 0 ;; - #ppc64) - # use big-endian && return 0 - # return 0 - # ;; - #sparc) return 0 ;; - x86) return 0 ;; + case "${ELIBC}" in + glibc) + case "${ARCH}" in + #alpha) return 0 ;; + #arm64) return 0 ;; + #arm) return 0 ;; + amd64) return 0 ;; + #ia64) return 0 ;; + #ppc) return 0 ;; + #ppc64) + # use big-endian || return 0 + # ;; + #sparc) return 0 ;; + x86) return 0 ;; + *) return 1 ;; + esac + ;; + musl) + case "${ARCH}" in + #alpha) return 0 ;; + #arm64) return 0 ;; + #arm) return 0 ;; + #amd64) return 0 ;; + #ia64) return 0 ;; + #ppc) return 0 ;; + #ppc64) + # use big-endian || return 0 + # ;; + #sparc) return 0 ;; + #x86) return 0 ;; + *) return 1 ;; + esac + ;; *) return 1 ;; esac } diff --git a/dev-lang/ghc/ghc-9.0.2-r3.ebuild b/dev-lang/ghc/ghc-9.0.2-r3.ebuild index cf9330be391d..fc779d53836d 100644 --- a/dev-lang/ghc/ghc-9.0.2-r3.ebuild +++ b/dev-lang/ghc/ghc-9.0.2-r3.ebuild @@ -25,38 +25,77 @@ HOMEPAGE="https://www.haskell.org/ghc/" arch_binaries="" BIN_PV=${PV} -# sorted! -#arch_binaries="$arch_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )" -#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )" -arch_binaries="$arch_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )" -arch_binaries="$arch_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu-r1.tbz2 )" -#arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )" -#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )" -arch_binaries="$arch_binaries ppc64? ( + +# Differentiate glibc/musl + +#glibc_binaries="$glibc_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )" +glibc_binaries="$glibc_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu-r1.tbz2 )" +#glibc_binaries="$glibc_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )" +glibc_binaries="$glibc_binaries arm64? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tar.gz )" +#glibc_binaries="$glibc_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )" +#glibc_binaries="$glibc_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )" +#glibc_binaries="$glibc_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )" +glibc_binaries="$glibc_binaries ppc64? ( big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu.tar.gz ) !big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz ) )" -arch_binaries="$arch_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )" -#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )" -arch_binaries="$arch_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )" +glibc_binaries="$glibc_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-gnu.tar.gz )" +#glibc_binaries="$glibc_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )" +glibc_binaries="$glibc_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )" + +#musl_binaries="$musl_binaries alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )" +#musl_binaries="$musl_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-musl.tbz2 )" +#musl_binaries="$musl_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-musl.tbz2 )" +#musl_binaries="$musl_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-musl.tbz2 )" +#musl_binaries="$musl_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )" +#musl_binaries="$musl_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )" +#musl_binaries="$musl_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )" +#musl_binaries="$musl_binaries ppc64? ( !big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-musl.tar.gz ) )" +#musl_binaries="$musl_binaries riscv? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-riscv64-unknown-linux-musl.tar.gz )" +#musl_binaries="$musl_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )" +#musl_binaries="$musl_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-musl.tbz2 )" + +[[ -n $glibc_binaries ]] && arch_binaries="$arch_binaries elibc_glibc? ( $glibc_binaries )" +[[ -n $musl_binaries ]] && arch_binaries="$arch_binaries elibc_musl? ( $musl_binaries )" # various ports: #arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86-fbsd.tbz2 )" # 0 - yet yet_binary() { - case "${ARCH}" in - #alpha) return 0 ;; - arm64) return 0 ;; - #arm) return 0 ;; - amd64) return 0 ;; - #ia64) return 0 ;; - #ppc) return 0 ;; - ppc64) return 0 ;; - riscv) return 0 ;; - #sparc) return 0 ;; - x86) return 0 ;; - *) return 1 ;; + case "${ELIBC}" in + glibc) + case "${ARCH}" in + #alpha) return 0 ;; + arm64) return 0 ;; + #arm) return 0 ;; + amd64) return 0 ;; + #ia64) return 0 ;; + #ppc) return 0 ;; + ppc64) return 0 ;; + riscv) return 0 ;; + #sparc) return 0 ;; + x86) return 0 ;; + *) return 1 ;; + esac + ;; + musl) + case "${ARCH}" in + #alpha) return 0 ;; + #arm64) return 0 ;; + #arm) return 0 ;; + #amd64) return 0 ;; + #ia64) return 0 ;; + #ppc) return 0 ;; + #ppc64) + # use big-endian || return 0 + # ;; + #riscv) return 0 ;; + #sparc) return 0 ;; + #x86) return 0 ;; + *) return 1 ;; + esac + ;; esac } |