--- media-libs/speex/speex-1.2_rc1.ebuild +++ media-libs/speex/speex-1.2_rc1.ebuild @@ -24,6 +24,7 @@ src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${P}-configure.patch + epatch "${FILESDIR}"/${P}-irix.patch sed -i -e 's:noinst_PROGRAMS:check_PROGRAMS:' \ "${S}"/libspeex/Makefile.am \ @@ -34,6 +35,18 @@ src_unpack() { src_compile() { append-flags -D_FILE_OFFSET_BITS=64 + # The getopt_long() replacement only gets built + # if getopt.h is entirely missing... + if [[ ${CHOST} == *-irix* ]]; then + if has_version dev-libs/libgnugetopt; then + einfo "Instructing build to use libgnugetopt ..." + append-libs -lgnugetopt + else + ewarn "Lying to configure about (non-GNU) getopt.h ..." + export ac_cv_header_getopt_h=no + fi + fi + econf $(use_enable sse) $(use_enable ogg) emake || die "emake failed." }