summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-06-29 12:29:20 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-06-29 12:29:20 +0000
commit12837d1c9f6990a5deaf6039df3cf33e7ad68b49 (patch)
tree9cd68df507bbbc110012bfb9fd1061a4acc44a8d /dev-libs/distorm64
parentSparc stable, bug #255229. (diff)
downloadhistorical-12837d1c9f6990a5deaf6039df3cf33e7ad68b49.tar.gz
historical-12837d1c9f6990a5deaf6039df3cf33e7ad68b49.tar.bz2
historical-12837d1c9f6990a5deaf6039df3cf33e7ad68b49.zip
Fix building with Python 2.6 (bug #272612). Respect CC, CFLAGS and LDFLAGS.
Package-Manager: portage-13733-svn/cvs/Linux x86_64
Diffstat (limited to 'dev-libs/distorm64')
-rw-r--r--dev-libs/distorm64/ChangeLog8
-rw-r--r--dev-libs/distorm64/Manifest6
-rw-r--r--dev-libs/distorm64/distorm64-1.7.30-r1.ebuild39
-rw-r--r--dev-libs/distorm64/files/distorm64-1.7.30-python.patch11
-rw-r--r--dev-libs/distorm64/files/distorm64-1.7.30-respect_flags.patch42
5 files changed, 83 insertions, 23 deletions
diff --git a/dev-libs/distorm64/ChangeLog b/dev-libs/distorm64/ChangeLog
index 9cd334840736..284a04ed8432 100644
--- a/dev-libs/distorm64/ChangeLog
+++ b/dev-libs/distorm64/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/distorm64
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/distorm64/ChangeLog,v 1.2 2009/02/04 15:23:37 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/distorm64/ChangeLog,v 1.3 2009/06/29 12:29:20 arfrever Exp $
+
+ 29 Jun 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ distorm64-1.7.30-r1.ebuild, +files/distorm64-1.7.30-python.patch,
+ +files/distorm64-1.7.30-respect_flags.patch:
+ Fix building with Python 2.6 (bug #272612). Respect CC, CFLAGS and
+ LDFLAGS.
*distorm64-1.7.30-r1 (04 Feb 2009)
diff --git a/dev-libs/distorm64/Manifest b/dev-libs/distorm64/Manifest
index ad8321833d6f..836b9e7531c7 100644
--- a/dev-libs/distorm64/Manifest
+++ b/dev-libs/distorm64/Manifest
@@ -1,5 +1,7 @@
+AUX distorm64-1.7.30-python.patch 207 RMD160 d5bbb28657d7919d59834461530561e5da12f0db SHA1 1e5044807334c08048f1d85219d98c662e0a33c1 SHA256 2d3e01ec623b601f4a2e8de7fc32f50ffafb3bed76f52ebc4872a7e1e233d75e
+AUX distorm64-1.7.30-respect_flags.patch 1388 RMD160 c68140ed01cdf626eba3b5b016002a4dd26c6c8d SHA1 20fea4710e8e30f40f22ee409dc1f46335c5949c SHA256 b42bd4566e4fd757c73f5a534ae13c6569919c17cea2e3527cd93646e3a722c5
DIST distorm64-pkg1.7.30.tar.bz2 91976 RMD160 34150563401044d98f986f2fea82faeeceb24ab9 SHA1 6948457695b11a4c2190012435da750898bb2c85 SHA256 bc2fc90e2111dfbba7fa397725ed6ae8b70477a3f7c60995e73d44a778a751be
-EBUILD distorm64-1.7.30-r1.ebuild 1443 RMD160 a114d6b9ce05a9cf2dcbc8b5ceaab8a4718f94ee SHA1 dfb09cf67dbc8c326cfe3d8985de452c68f7ec4a SHA256 a061f339e4a586e6890dab5da6780506a341b122546d2e72c5e98880ca5afae2
+EBUILD distorm64-1.7.30-r1.ebuild 1455 RMD160 3bc515c07a6f3b13a2fa6b4ae03f771706e49759 SHA1 1b9deee1e6d1f88a574f7b3f8fb22bfbd3146888 SHA256 03da1a259ad5842edda393606cc1c534a7075158d2d38e9205097d1d005adc85
EBUILD distorm64-1.7.30.ebuild 1338 RMD160 7001c533105f4a355719a047a55e1b7bbccf44d0 SHA1 865f0f5c26aa69c6c59e7e578528accc1f8d227b SHA256 361b098487ee20a4ba5e9a1255403beb417e279526193950e410cf056dc08678
-MISC ChangeLog 557 RMD160 383deb61a31cba66d0d0b4c52362dc6a6a23939c SHA1 785e4d78a16eb4183ac9e7003cc7a302f5778d77 SHA256 4aacc8d183a9f845376689b784102a5c6216831dd6ca25186b96794f9337932c
+MISC ChangeLog 827 RMD160 3292a4be7cbb13e12975eea26824d38d6b50a398 SHA1 1417447792e142d9874179e388c737b85222acc4 SHA256 66b37d3b20b75c1df5bd814e21a06b1e4fc2e1716df1f506caac889f42f968db
MISC metadata.xml 296 RMD160 b8972abc6a10b49a6afb29c2fcb1e0dc3b4753b2 SHA1 f8e6300e113aa10f75cf7bf334c24070e2eb5ccf SHA256 711cad846b67b387cac3e2dd0b719054f44f422274c36ddb4eb49603a1b488fc
diff --git a/dev-libs/distorm64/distorm64-1.7.30-r1.ebuild b/dev-libs/distorm64/distorm64-1.7.30-r1.ebuild
index bb34cda3c350..f98fad38e73f 100644
--- a/dev-libs/distorm64/distorm64-1.7.30-r1.ebuild
+++ b/dev-libs/distorm64/distorm64-1.7.30-r1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/distorm64/distorm64-1.7.30-r1.ebuild,v 1.1 2009/02/04 15:23:37 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/distorm64/distorm64-1.7.30-r1.ebuild,v 1.2 2009/06/29 12:29:20 arfrever Exp $
-EAPI="1"
+EAPI="2"
-inherit eutils
+inherit eutils flag-o-matic python toolchain-funcs
DESCRIPTION="The ultimate disassembler library (X86-32, X86-64)"
HOMEPAGE="http://www.ragestorm.net/distorm/"
@@ -12,26 +12,31 @@ SRC_URI="http://ragestorm.net/distorm/${PN}-pkg${PV}.tar.bz2"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~x86 ~amd64"
+KEYWORDS="~amd64 ~x86"
IUSE="+python"
DEPEND="python? ( >=dev-lang/python-2.4 )"
-RDEPEND="$DEPEND"
+RDEPEND="${DEPEND}"
-src_unpack() {
- unpack ${A}
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-python.patch"
+ epatch "${FILESDIR}/${P}-respect_flags.patch"
}
src_compile() {
cd "${WORKDIR}/${PN}/build/linux"
- emake clib || die "make clib failed!"
+ emake clib CC="$(tc-getCC)" || die "make clib failed!"
if use python; then
- emake py || die "make py failed!"
+ python_version
+ append-flags "-I/usr/include/python${PYVER}"
+ emake py CC="$(tc-getCC)" || die "make py failed!"
fi
cd "${WORKDIR}/${PN}/linuxproj"
- emake disasm || die "make disasm failed!"
+ emake disasm CC="$(tc-getCC)" || die "make disasm failed!"
}
@@ -41,21 +46,15 @@ src_install() {
dolib.so libdistorm64.so
if use python; then
- if has_version ">=dev-lang/python-2.5"; then
- mkdir -p "${D}usr/lib/python2.5/site-packages/"
- install libdistorm64.so "${D}usr/lib/python2.5/site-packages/distorm.so"
- else
- mkdir -p "${D}usr/lib/python2.4/site-packages/"
- install libdistorm64.so "${D}usr/lib/python2.4/site-packages/distorm.o"
- fi
+ dodir "$(python_get_sitedir)"
+ install libdistorm64.so "${D}$(python_get_sitedir)/distorm.so"
fi
cd "${WORKDIR}/${PN}/"
- mv distorm64.a libdistorm64.a
- dolib.a libdistorm64.a
+ newlib.a distorm64.a libdistorm64.a
dobin linuxproj/disasm
- mkdir -p "${D}usr/include"
+ dodir "/usr/include"
install distorm.h "${D}usr/include/" || die "Unable to install distorm.h"
}
diff --git a/dev-libs/distorm64/files/distorm64-1.7.30-python.patch b/dev-libs/distorm64/files/distorm64-1.7.30-python.patch
new file mode 100644
index 000000000000..15d82f2215d7
--- /dev/null
+++ b/dev-libs/distorm64/files/distorm64-1.7.30-python.patch
@@ -0,0 +1,11 @@
+--- src/pydistorm.h
++++ src/pydistorm.h
+@@ -22,7 +22,7 @@
+ #include "decoder.h"
+
+ #ifdef __GNUC__
+- #include <python2.5/Python.h>
++ #include <Python.h>
+ #elif _MSC_VER
+ #include <python.h>
+ #endif
diff --git a/dev-libs/distorm64/files/distorm64-1.7.30-respect_flags.patch b/dev-libs/distorm64/files/distorm64-1.7.30-respect_flags.patch
new file mode 100644
index 000000000000..0af2da2f7a9b
--- /dev/null
+++ b/dev-libs/distorm64/files/distorm64-1.7.30-respect_flags.patch
@@ -0,0 +1,42 @@
+--- build/linux/Makefile
++++ build/linux/Makefile
+@@ -6,7 +6,7 @@
+ COBJS = ../../src/x86defs.o ../../src/wstring.o ../../src/textdefs.o ../../src/prefix.o ../../src/operands.o ../../src/insts.o ../../src/instructions.o ../../src/distorm.o ../../src/decoder.o
+ PYOBJS = ../../src/x86defs.o ../../src/wstring.o ../../src/textdefs.o ../../src/pydistorm.o ../../src/prefix.o ../../src/operands.o ../../src/insts.o ../../src/instructions.o ../../src/decoder.o
+ CC = gcc
+-CFLAGS = -O2 -Wall -fPIC -DSUPPORT_64BIT_OFFSET -D_DLL
++CFLAGS += -Wall -fPIC -DSUPPORT_64BIT_OFFSET -D_DLL
+
+ all: clib py
+
+@@ -14,11 +14,11 @@
+ /bin/rm -rf ../../src/*.o ${TARGET} ../../distorm64.a
+
+ clib: ${COBJS}
+- ${CC} ${CFLAGS} ${VERSION} ${COBJS} -fPIC -shared -o ${TARGET}
++ ${CC} ${LDFLAGS} ${VERSION} ${COBJS} -fPIC -shared -o ${TARGET}
+ ar rs ../../distorm64.a ${COBJS}
+
+ py: ${PYOBJS}
+- ${CC} ${CFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o ${TARGET}
++ ${CC} ${LDFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o ${TARGET}
+
+ install: libdistorm64.so
+ install -s ${TARGET} /usr/local/lib
+--- linuxproj/Makefile
++++ linuxproj/Makefile
+@@ -4,12 +4,12 @@
+
+ TARGET = disasm
+ CC = gcc
+-CFLAGS = -Wall -O2 -I. -o
++CFLAGS += -Wall -I.
+
+ all: disasm
+
+ disasm:
+- ${CC} ${CFLAGS} ${TARGET} main.c ../distorm64.a
++ ${CC} ${CFLAGS} ${LDFLAGS} -o ${TARGET} main.c ../distorm64.a
+
+ clean:
+ /bin/rm -rf *.o ${TARGET}