summaryrefslogtreecommitdiff
path: root/dev-ruby/metasm
diff options
context:
space:
mode:
authorZero_Chaos <zerochaos@gentoo.org>2017-05-08 15:21:41 -0400
committerZero_Chaos <zerochaos@gentoo.org>2017-05-08 15:21:57 -0400
commitcb91bdb35c3fcfcac554c9e2399ab6a1e4fa8e23 (patch)
treead3d8659b412a8f8ca2291d39621d68c3d179239 /dev-ruby/metasm
parenteae6e7a80bc2934ae1557731fc0ad71cd92af99b (diff)
downloadgentoo-cb91bdb35c3fcfcac554c9e2399ab6a1e4fa8e23.tar.gz
gentoo-cb91bdb35c3fcfcac554c9e2399ab6a1e4fa8e23.tar.xz
dev-ruby/metasm: fixup and merge from pentoo overlay
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-ruby/metasm')
-rw-r--r--dev-ruby/metasm/metasm-1.0.2-r4.ebuild (renamed from dev-ruby/metasm/metasm-1.0.2-r3.ebuild)46
-rw-r--r--dev-ruby/metasm/metasm-9999.ebuild62
2 files changed, 87 insertions, 21 deletions
diff --git a/dev-ruby/metasm/metasm-1.0.2-r3.ebuild b/dev-ruby/metasm/metasm-1.0.2-r4.ebuild
index 913ef717e4b..70d29918932 100644
--- a/dev-ruby/metasm/metasm-1.0.2-r3.ebuild
+++ b/dev-ruby/metasm/metasm-1.0.2-r4.ebuild
@@ -1,12 +1,11 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-USE_RUBY="ruby20 ruby21 ruby22 ruby23"
+EAPI=6
+USE_RUBY="ruby21 ruby22 ruby23"
RUBY_FAKEGEM_RECIPE_DOC="none"
RUBY_FAKEGEM_EXTRADOC="BUGS README TODO"
-
RUBY_FAKEGEM_EXTRAINSTALL="metasm metasm.rb misc samples"
inherit ruby-fakegem
@@ -14,13 +13,21 @@ inherit ruby-fakegem
DESCRIPTION="cross-architecture assembler, disassembler, linker, and debugger"
HOMEPAGE="http://metasm.cr0.org/"
-LICENSE="BSD"
-SLOT="${PV}"
-KEYWORDS="~amd64 ~arm ~x86"
-#IUSE="development test"
+LICENSE="LGPL-2.1"
+SLOT="0"
IUSE=""
-RDEPEND="${RDEPEND} !dev-ruby/metasploit-model:0"
+if [ "${PV}" = "9999" ]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/jjyg/metasm.git"
+ KEYWORDS=""
+ SRC_URI=""
+ EGIT_CHECKOUT_DIR="${WORKDIR}/all"
+else
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+QA_PREBUILT="usr/lib*/ruby/gems/*/gems/${P}/${PN}/dynldr-linux-x64-233.so"
ruby_add_bdepend "dev-ruby/bundler"
@@ -28,18 +35,9 @@ all_ruby_prepare() {
if [ -f Gemfile.lock ]; then
rm Gemfile.lock || die
fi
- #For now, we don't support development or testing at all
- #if ! use development; then
- sed -i -e "/^group :development do/,/^end$/d" Gemfile || die
- sed -i -e "/s.add_development_dependency/d" "${PN}".gemspec || die
- sed -i -e "/spec.add_development_dependency/d" "${PN}".gemspec || die
- #fi
- #if ! use test; then
- sed -i -e "/^group :test do/,/^end$/d" Gemfile || die
- #fi
- #if ! use test && ! use development; then
- sed -i -e "/^group :development, :test do/,/^end$/d" Gemfile || die
- #fi
+
+ mkdir bin
+ ln -s ../samples/disassemble.rb ./bin/disassemble
}
each_ruby_prepare() {
@@ -50,6 +48,12 @@ each_ruby_prepare() {
fi
}
+all_ruby_install() {
+ all_fakegem_install
+
+ ruby_fakegem_binwrapper disassemble
+}
+
each_ruby_test() {
${RUBY} -Ilib:. -e "Dir['tests/*.rb'].each{|f| require f}" || die
}
diff --git a/dev-ruby/metasm/metasm-9999.ebuild b/dev-ruby/metasm/metasm-9999.ebuild
new file mode 100644
index 00000000000..c8c346a8631
--- /dev/null
+++ b/dev-ruby/metasm/metasm-9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby21 ruby22 ruby23"
+
+RUBY_FAKEGEM_RECIPE_DOC="none"
+RUBY_FAKEGEM_EXTRADOC="BUGS README TODO"
+RUBY_FAKEGEM_EXTRAINSTALL="metasm metasm.rb misc samples"
+
+inherit ruby-fakegem
+
+DESCRIPTION="cross-architecture assembler, disassembler, linker, and debugger"
+HOMEPAGE="http://metasm.cr0.org/"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="gtk"
+
+if [ "${PV}" = "9999" ]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/jjyg/metasm.git"
+ KEYWORDS=""
+ SRC_URI=""
+ EGIT_CHECKOUT_DIR="${WORKDIR}/all"
+else
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+QA_PREBUILT="usr/lib*/ruby/gems/*/gems/${P}/${PN}/dynldr-linux-x64-233.so"
+
+ruby_add_bdepend "dev-ruby/bundler
+ gtk? ( dev-ruby/ruby-gtk2 )"
+
+all_ruby_prepare() {
+ if [ -f Gemfile.lock ]; then
+ rm Gemfile.lock || die
+ fi
+
+ mkdir bin
+ ln -s ../samples/disassemble.rb ./bin/disassemble
+ ln -s ../samples/disassemble-gui.rb ./bin/disassemble-gui
+}
+
+each_ruby_prepare() {
+ if [ -f Gemfile ]
+ then
+ BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die
+ BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die
+ fi
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ ruby_fakegem_binwrapper disassemble
+ ruby_fakegem_binwrapper disassemble-gui
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib:. -e "Dir['tests/*.rb'].each{|f| require f}" || die
+}