mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-30 10:41:01 +02:00
radare2-bindings: better USE flag support, python is broken
This commit is contained in:
parent
78ace822b8
commit
097e594d47
5 changed files with 191 additions and 33 deletions
|
|
@ -1,2 +1,5 @@
|
|||
AUX 01_use_python_2.7.patch 669 SHA256 575f38b7a2e4bc5784251c4cce04b3dcd4f3169363daacb23292ac0f85883108 SHA512 32eab06074bec7411a402e6339c2d313ff2fda3448ae9171ebca2376085e7d11520cee6f73357892de008df94e297f2dc088bc3b93a908ca376f3928be229f72 WHIRLPOOL c7f75c0fef4f66cef08e1b97252d2d74c7fe0213acb1e46b4242698f7d02692afcae08118cf1586be8020bb281f646b177f376acd18adbec5c6b117be6dd1e8d
|
||||
DIST radare2-bindings-0.9.7.tar.gz 89565 SHA256 d3bc0e973064d1c2cd3e5796ebe25395fbea833d81ef45a47e704a90b5831e7c SHA512 e1c06851dc365f3e436cc21412dc6ee24fee411032de1d41efb65eb1053b84ae9c363d6a70246b8787deaaf92d56e18c3c634b0baa13c31c826fcabe8201bcf4 WHIRLPOOL 0fbd3a10e565cf50b7f2ea98122216bf5900c073a161c09765f629296e11841900720e896ed6ecaa21681b934ee7087704fad3a2041a98ada0bc1e9249a0f9e3
|
||||
EBUILD radare2-bindings-0.9.7.ebuild 1696 SHA256 593ef1dd7e58f438977082a2a8f2aa23980e6d5c30a0126a847068ba7df6af3a SHA512 ee180c0d73c4b1dcc8e01c4505c05725339bfbb6bfa496a2fb66f55b409d1b7fc2646a3c279422480525b920e05161cda752f1f9c4493a22a4832258c37a281c WHIRLPOOL 0948abbd251fa6b32715740e93fb39948809033783f8ee5792cfdc4bcecb8e83fc6299188a0fb6e795eee5272fbb55375e0b80ecd18cec868b4b11e1d00c07ec
|
||||
EBUILD radare2-bindings-0.9.7-r1.ebuild 1369 SHA256 6055c97c2ff773bea59222ad097330e4c01e5f89f5fc3e2bc49e7cda3224ffbd SHA512 60444c06d402fa59465e0139c828605c9d4691dc541ded98b9dbe46273b491ef35c71f79a2633b25683cb35663e2c0a3308bfce45e9f1c59865a5dba621fd319 WHIRLPOOL 09db581bbcb74e0d8f546b300900f73d8f23ec21fd74d78227625db2f29d23fa2ea442f9e7960dfc7ee5fdbf0b7d6158a0c3af7c1389fe91262e283dd5abef53
|
||||
EBUILD radare2-bindings-0.9.7.ebuild 2202 SHA256 d353fe1f7e5bec8e2282203b4bb3152b321e58be88cd496eeca085088d45361f SHA512 454ed366a59742330225b15f9893a2320aa66e7174ad3d62b83d132a1f10eb064b069e7236797f64bc6342df0c617aaae2aa60c9a2908a3e77334008a69346b4 WHIRLPOOL c4d13e37b0ae6790023f443700d253bc6831fb0a4262cec8a602f66050af348819f9878b62e087648d942bea59c9c89a65346f9715fbccf16463ff59f668e837
|
||||
EBUILD radare2-bindings-0.9.7_p20140722.ebuild 1382 SHA256 bb3da268aaf63e94d47b148724891e3ca10cf5d6a238876b9e8d48126a6a501a SHA512 0ec0e495042023569c7597bca06851f91258afaadfa8d38f6cd67229d83cc412e287bc5558c6a07d8be893ff128cfbbab7f0630f368ffc59c74069ece35625b5 WHIRLPOOL dea5cf6b967894ca9738081e8c485a8ec6dec92664a6419726230ca2a6e5c3e58af541ed3c610b167aeda73826c50f51e4f032287fd3d66523908c9dbd2b949c
|
||||
|
|
|
|||
16
dev-libs/radare2-bindings/files/01_use_python_2.7.patch
Normal file
16
dev-libs/radare2-bindings/files/01_use_python_2.7.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Description: Use python 2.7 and CFLAGS.
|
||||
Use python2.7 headers and CFLAGS to allow hardened builds.
|
||||
Author: Sebastian Reichel <sre@debian.org>
|
||||
Last-Update: 2013-12-20
|
||||
|
||||
--- a/python/Makefile
|
||||
+++ b/python/Makefile
|
||||
@@ -8,7 +8,7 @@
|
||||
tri:
|
||||
valabind --swig -N Radare -o r_debug.i -m r_debug --vapidir ../../libr/vapi/ r_debug
|
||||
swig -python -I/usr/include/libr r_debug.i
|
||||
- $(CC) r_debug_wrap.c -shared -fPIC -I /usr/include/libr -I /usr/include/python2.6/ -o _r_debug.so -lr_debug -lr_bp -lr_reg -lr_util
|
||||
+ $(CC) ${CFLAGS} r_debug_wrap.c -shared -fPIC -I /usr/include/libr -I /usr/include/python2.7/ -o _r_debug.so -lr_debug -lr_bp -lr_reg -lr_util
|
||||
|
||||
mytest:
|
||||
mkdir -p r2
|
||||
58
dev-libs/radare2-bindings/radare2-bindings-0.9.7-r1.ebuild
Normal file
58
dev-libs/radare2-bindings/radare2-bindings-0.9.7-r1.ebuild
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
inherit eutils python-single-r1
|
||||
|
||||
DESCRIPTION="Language bindings for radare2"
|
||||
HOMEPAGE="http://www.radare.org"
|
||||
HOMEPAGE="https://github.com/radare/radare2-bindings"
|
||||
SRC_URI="https://github.com/radare/radare2-bindings/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
#"ctypes cxx guile java lua node-ffi perl php5 python ruby"
|
||||
IUSE="+ctypes +cxx guile lua perl php5 python ruby"
|
||||
|
||||
RDEPEND="
|
||||
cxx? ( sys-devel/gcc[cxx] )
|
||||
perl? ( dev-lang/perl )
|
||||
guile? ( dev-scheme/guile )
|
||||
lua? ( >=dev-lang/lua-5.1.4 )
|
||||
php5? ( >=dev-lang/php-5.3.8 )
|
||||
ruby? ( >=dev-lang/ruby-1.8.7 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/radare2
|
||||
virtual/pkgconfig
|
||||
dev-util/valabind
|
||||
dev-lang/swig
|
||||
>=dev-lang/vala-0.14"
|
||||
|
||||
src_prepare(){
|
||||
epatch "${FILESDIR}/01_use_python_2.7.patch"
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
#"ctypes cxx guile java lua node-ffi perl php5 python ruby"
|
||||
local myconf
|
||||
local mylang
|
||||
|
||||
use php5 && myconf="php"
|
||||
|
||||
# FIXME: add python support
|
||||
# https://github.com/radare/radare2-bindings/issues/33
|
||||
for mylang in ctypes cxx guile lua perl ruby ; do
|
||||
if use $mylang; then
|
||||
[ -z "$myconf" ] || myconf+=","
|
||||
myconf+="$mylang"
|
||||
fi
|
||||
done
|
||||
|
||||
#not included languages are disabled
|
||||
econf --enable="$myconf"
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="4"
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
inherit eutils python-single-r1
|
||||
|
|
@ -15,14 +15,15 @@ SRC_URI="https://github.com/radare/radare2-bindings/archive/${PV}.tar.gz -> ${P}
|
|||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
IUSE="cxx python perl php lua nodejs guile ruby"
|
||||
#IUSE="cxx python perl php lua nodejs guile ruby"
|
||||
IUSE="perl lua ruby"
|
||||
|
||||
RDEPEND="perl? ( dev-lang/perl )
|
||||
php? ( >=dev-lang/php-5.3.8 )
|
||||
lua? ( >=dev-lang/lua-5.1.4 )
|
||||
nodejs? ( dev-lang/nodejs )
|
||||
guile? ( dev-scheme/guile )
|
||||
ruby? ( >=dev-lang/ruby-1.8.7 )"
|
||||
# php? ( >=dev-lang/php-5.3.8 )
|
||||
# nodejs? ( dev-lang/nodejs )
|
||||
# guile? ( dev-scheme/guile )
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/radare2
|
||||
|
|
@ -31,40 +32,61 @@ DEPEND="${RDEPEND}
|
|||
dev-lang/swig
|
||||
>=dev-lang/vala-0.14"
|
||||
|
||||
src_compile() {
|
||||
src_configure(){
|
||||
local myconf
|
||||
export PYTHON_CONFIG=python2.7-config
|
||||
|
||||
#"ctypes cxx guile java lua node-ffi perl php5 python ruby"
|
||||
use perl && myconf+="perl"
|
||||
use ruby && myconf+="ruby"
|
||||
use lua && myconf+="lua"
|
||||
econf --disable="$myconf,ctypes,cxx,guile,java,node-ffi,python"
|
||||
}
|
||||
|
||||
#src_compile() {
|
||||
# TODO: add another languages
|
||||
local lang_var
|
||||
# local lang_var
|
||||
|
||||
# for lang_var in cxx python perl php lua nodejs guile ruby ; do
|
||||
for lang_var in python perl lua ruby ; do
|
||||
if use ${lang_var} ; then
|
||||
einfo "language: ${lang_var}"
|
||||
if [[ ${lang_var} == php ]] ; then
|
||||
cd "${S}/${lang_var}5"
|
||||
else
|
||||
cd "${S}/${lang_var}"
|
||||
fi
|
||||
# for lang_var in python perl lua ruby ; do
|
||||
# if use ${lang_var} ; then
|
||||
# if [[ ${lang_var} == php ]] ; then
|
||||
# cd "${S}/${lang_var}5"
|
||||
# else
|
||||
# cd "${S}/${lang_var}"
|
||||
# fi
|
||||
|
||||
[[ ${lang_var} == python ]] && export PYTHON_CONFIG=python2.7-config
|
||||
emake || die "compile failed"
|
||||
fi
|
||||
done
|
||||
}
|
||||
# [[ ${lang_var} == python ]] && export PYTHON_CONFIG=python2.7-config
|
||||
# emake || die "compile failed"
|
||||
# fi
|
||||
# done
|
||||
|
||||
# cd "${S}/python"
|
||||
# emake
|
||||
#}
|
||||
|
||||
src_install() {
|
||||
# TODO: add another languages
|
||||
local lang_var
|
||||
# local lang_var
|
||||
|
||||
for lang_var in cxx python perl php lua nodejs guile ruby ; do
|
||||
if use ${lang_var} ; then
|
||||
if [[ ${lang_var} == php ]] ; then
|
||||
cd "${S}/${lang_var}5"
|
||||
else
|
||||
cd "${S}/${lang_var}"
|
||||
fi
|
||||
# for lang_var in cxx python perl php lua nodejs guile ruby ; do
|
||||
# for lang_var in python perl lua ruby ; do
|
||||
# if use ${lang_var} ; then
|
||||
# if [[ ${lang_var} == php ]] ; then
|
||||
# cd "${S}/${lang_var}5"
|
||||
# else
|
||||
# cd "${S}/${lang_var}"
|
||||
# fi
|
||||
|
||||
[[ ${lang_var} == python ]] && export PYTHON_CONFIG=python2.7-config
|
||||
emake DESTDIR="${ED}" install || die "compile failed"
|
||||
fi
|
||||
done
|
||||
# [[ ${lang_var} == python ]] && export PYTHON_CONFIG=python2.7-config
|
||||
# emake DESTDIR="${ED}" install || die "compile failed"
|
||||
# fi
|
||||
# done
|
||||
|
||||
# export PYTHON_CONFIG=python2.7-config
|
||||
# cd "${S}/python"
|
||||
|
||||
emake DESTDIR="${D}" PYTHON_CONFIG=python2.7-config install
|
||||
|
||||
# emake DESTDIR="${ED}" install
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
inherit eutils python-single-r1 git-2
|
||||
|
||||
DESCRIPTION="Language bindings for radare2"
|
||||
HOMEPAGE="http://www.radare.org"
|
||||
HOMEPAGE="https://github.com/radare/radare2-bindings"
|
||||
#SRC_URI="https://github.com/radare/radare2-bindings/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
EGIT_REPO_URI="https://github.com/radare/radare2-bindings.git"
|
||||
EGIT_COMMIT="cf1061eeabb797b5ee2886cd250d0aa9df7c058c"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
#full set: "ctypes cxx guile java lua node-ffi perl php5 python ruby"
|
||||
IUSE="ctypes cxx guile lua perl php5 python ruby"
|
||||
|
||||
RDEPEND="
|
||||
cxx? ( sys-devel/gcc[cxx] )
|
||||
perl? ( dev-lang/perl )
|
||||
guile? ( dev-scheme/guile )
|
||||
lua? ( >=dev-lang/lua-5.1.4 )
|
||||
php5? ( >=dev-lang/php-5.3.8 )
|
||||
ruby? ( >=dev-lang/ruby-1.8.7 )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/radare2
|
||||
virtual/pkgconfig
|
||||
dev-util/valabind
|
||||
dev-lang/swig
|
||||
>=dev-lang/vala-0.14"
|
||||
|
||||
src_prepare(){
|
||||
epatch "${FILESDIR}/01_use_python_2.7.patch"
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
local myconf
|
||||
local mylang
|
||||
|
||||
use php5 && myconf="php"
|
||||
|
||||
# FIXME: add python support
|
||||
for mylang in ctypes cxx guile lua perl python ruby ; do
|
||||
if use $mylang; then
|
||||
[ -z "$myconf" ] || myconf+=","
|
||||
myconf+="$mylang"
|
||||
fi
|
||||
done
|
||||
|
||||
#not included languages are disabled
|
||||
econf --enable="$myconf"
|
||||
}
|
||||
Loading…
Reference in a new issue