lief: move to different category and -bin, add new lief to compile from src (still fails)

This commit is contained in:
blshkv 2019-01-04 08:27:21 +08:00
parent 529fa154e5
commit 52b951956c
No known key found for this signature in database
GPG key ID: 273E3E90D1A6294F
12 changed files with 83 additions and 8 deletions

View file

@ -6,11 +6,14 @@ EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6} )
inherit distutils-r1
MY_PN=${PN/-bin/}
MY_P=${MY_PN}-${PV}
DESCRIPTION="Library to instrument executable formats"
HOMEPAGE="https://lief.quarkslab.com/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip
https://github.com/lief-project/LIEF/releases/download/${PV}/${P}-py2.7-linux.egg
https://github.com/lief-project/LIEF/releases/download/${PV}/${P}-py3.6-linux.egg"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip
https://github.com/lief-project/LIEF/releases/download/${PV}/${MY_P}-py2.7-linux.egg
https://github.com/lief-project/LIEF/releases/download/${PV}/${MY_P}-py3.6-linux.egg"
LICENSE="Apache-2.0"
SLOT="0"
@ -22,10 +25,12 @@ RDEPEND=""
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"
S=${WORKDIR}/${MY_P}
src_prepare() {
#copy symlinks to homedir for offline installation
cp -s "${DISTDIR}"/${P}-py2.7-linux.egg "${HOME}"
cp -s "${DISTDIR}"/${P}-py3.6-linux.egg "${HOME}"
cp -s "${DISTDIR}"/${MY_P}-py2.7-linux.egg "${HOME}"
cp -s "${DISTDIR}"/${MY_P}-py3.6-linux.egg "${HOME}"
default
}

1
dev-util/lief/Manifest Normal file
View file

@ -0,0 +1 @@
DIST lief-0.9.0_p20181231.tar.gz 12757493 BLAKE2B 30070aafa92f1e62998d301b885f0a36f3e710e32cb5617a6d88eda185b52097888c47da9c0a67e9f295b1bd4cb166e8b962ece03730715f59bcbc767a9409e3 SHA512 9f64739068e6e68648c3496516fe96a780a0ec71cbbfb395a86fb97368197ee6951c40e68368c7e311d5249eebc303e4e4cb9e8869b312fbd514c284996df65d

View file

@ -0,0 +1,12 @@
#!/usr/bin/env python
import lief
import sys
if len(sys.argv) < 3:
print("Run: lief_inject <nativelib>.so <libfrida-gadget>.so ")
sys.exit(1)
libnative = lief.parse(sys.argv[1])
libnative.add_library(sys.argv[2]) # Injection!
libnative.write(sys.argv[2])

View file

@ -0,0 +1,42 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
#PYTHON_COMPAT=( python2_7 python3_{5,6} )
#inherit distutils-r1
inherit cmake-utils
HASH_COMMIT="8d7ec26a93800b0729c2c05be8c55c8318ba3b20"
DESCRIPTION="Library to instrument executable formats"
HOMEPAGE="https://lief.quarkslab.com/"
SRC_URI="https://github.com/lief-project/LIEF/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="python"
#RDEPEND=""
#DEPEND="${RDEPEND}
# dev-python/setuptools[${PYTHON_USEDEP}]"
S=${WORKDIR}/LIEF-${HASH_COMMIT}
src_configure(){
#cmake/LIEFOptions.cmake
local FORCE32=NO
use x86 && FORCE32=YES
# -DLIEF_INSTALL_PYTHON:BOOL=1 \
local mycmakeargs=(
-DLIEF_INSTALL_PYTHON="$(usex python)"
-DLIEF_FORCE32="$FORCE32"
)
einfo "TEST =========================="
cmake-utils_src_configure
}

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blshkv@pentoo.org</email>
</maintainer>
<upstream>
<remote-id type="github">lief-project/LIEF</remote-id>
</upstream>
</pkgmetadata>

View file

@ -19,7 +19,7 @@ PDEPEND="dev-util/frida-tools
pentoo-full? (
dev-util/objection
dev-util/appmon
amd64? ( dev-python/lief )
amd64? ( dev-util/lief-bin )
)
android? ( !arm? ( dev-util/apktool
dev-util/dex2jar

View file

@ -303,8 +303,6 @@ dev-python/htmlentities
# required by net-analyzer/xsstrike
~dev-python/fuzzywuzzy-0.12.0
~dev-python/lief-0.9.0
~dev-python/splinter-0.10.0
~dev-python/terminaltables-3.1.0
~dev-python/pylnk-0.2

View file

@ -48,3 +48,9 @@ dev-util/gn amd64
dev-util/appmon
~dev-util/electron-packager-13.0.1
#1.81 fails to compile
~dev-util/cppcheck-1.85
=dev-util/lief-0.9*
=dev-util/lief-bin-0.9*

1
profiles/updates/1Q-2019 Normal file
View file

@ -0,0 +1 @@
move dev-python/lief dev-util/lief-bin