Import the udis86 ebuild from upstream.

Change-Id: Ife25360218e35bf1de31d95befaaae3adee4bb60
Reviewed-on: http://gerrit.chromium.org/gerrit/2198
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Anush Elangovan <anush@chromium.org>
This commit is contained in:
Stéphane Marchesin 2011-06-06 18:59:01 -07:00
parent 6b13d64c7d
commit 7fead6142a
2 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,35 @@
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,9 @@
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
+AC_PATH_PROG([YASM], yasm,)
+AC_SUBST(YASM)
+
# If this is a gnu compiler, pass -Wall
if test "$ac_cv_c_compiler_gnu" = "yes"; then
CFLAGS="$CFLAGS -Wall"
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -10,7 +10,7 @@
ovrrun_LDADD = ../libudis86/libudis86.la
ovrrun_CFLAGS = -I$(top_srcdir)/libudis86 -I$(top_srcdir)
-YASM = yasm
+YASM = @YASM@
dist_check_DATA = test16.asm test32.asm test64.asm testjmp.asm testobscure.asm \
testjmp.ref testobscure.ref randtest.raw randtest16.ref \
@@ -18,7 +18,10 @@
check-local: tests
-tests: test16 test32 test64 testjmp bufovrrun randraw
+yasm_tests: test16 test32 test64 testjmp
+no_yasm_tests: bufovrrun randraw
+
+tests: $(if $(YASM), yasm_tests) no_yasm_tests
test16: gen
$(YASM) -f bin -o test16.bin $(top_srcdir)/tests/test16.asm

View File

@ -0,0 +1,36 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/udis86/udis86-1.7.ebuild,v 1.12 2010/11/11 17:30:39 hwoarang Exp $
EAPI=3
inherit autotools
DESCRIPTION="Disassembler library for the x86/-64 architecture sets."
HOMEPAGE="http://udis86.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~hppa ppc ~ppc64 x86 ~x86-fbsd"
IUSE="pic test"
DEPEND="test? (
amd64? ( dev-lang/yasm )
x86? ( dev-lang/yasm )
x86-fbsd? ( dev-lang/yasm )
)"
RDEPEND=""
src_prepare() {
# Don't fail tests if dev-lang/yasm is not installed, bug #318805
epatch "${FILESDIR}"/${P}-yasm.patch
eautoreconf
}
src_configure() {
econf "$(use_with pic)"
}
src_install() {
emake docdir="/usr/share/doc/${PF}/" DESTDIR="${D}" install || die "emake install failed"
}