Skip to content

Commit

Permalink
media-libs/openh264: fix cross compiling
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/730520
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Stephan Hartmann <[email protected]>
Closes: gentoo#16571
Signed-off-by: Thomas Deutschmann <[email protected]>
  • Loading branch information
stha09 authored and Whissi committed Jul 3, 2020
1 parent c7b427a commit 2c614ff
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions media-libs/openh264/openh264-2.1.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
LICENSE="BSD"
SLOT="0/6" # subslot = openh264 soname version
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="cpu_flags_x86_avx2 +plugin utils"
IUSE="cpu_flags_arm_neon cpu_flags_x86_avx2 +plugin utils"

RESTRICT="bindist test"

Expand All @@ -36,24 +36,29 @@ multilib_src_configure() {
}

emakecmd() {
CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
emake V=Yes CFLAGS_M32="" CFLAGS_M64="" CFLAGS_OPT="" \
PREFIX="${EPREFIX}/usr" \
LIBDIR_NAME="$(get_libdir)" \
SHAREDLIB_DIR="${EPREFIX}/usr/$(get_libdir)" \
INCLUDES_DIR="${EPREFIX}/usr/include/${PN}" \
HAVE_AVX2=$(usex cpu_flags_x86_avx2 Yes No) \
ARCH="$(tc-arch)" \
$@
}

multilib_src_compile() {
local mybits="ENABLE64BIT=No"
local myopts="ENABLE64BIT=No"
case "${ABI}" in
s390x|alpha|*64) mybits="ENABLE64BIT=Yes";;
s390x|alpha|*64) myopts="ENABLE64BIT=Yes";;
esac

emakecmd ${mybits}
use plugin && emakecmd ${mybits} plugin
if use arm; then
myopts+=" USE_ASM=$(usex cpu_flags_arm_neon Yes No)"
fi

emakecmd ${myopts}
use plugin && emakecmd ${myopts} plugin
}

multilib_src_install() {
Expand Down

0 comments on commit 2c614ff

Please sign in to comment.