bulk_extractor-2.0.0_beta3.ebuild

This commit is contained in:
Anton Bolshakov 2022-01-26 12:45:22 +08:00
parent 369726c895
commit d238e1ba18
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
5 changed files with 239 additions and 121 deletions

View file

@ -1 +0,0 @@
DIST bulk_extractor-1.5.5.tar.gz 4473107 BLAKE2B c341722c3cee2b640ab456a907a7644ccd09fe3ae3764a1fe316acedf26256a866513de5ea1575d536a1c962d86606717815c4d08cc3e7d9db2f3fbcf4bba5f0 SHA512 9f1384f9d3b499beecc858f78e0abd4c904dad0c64ea04bf98c1a0195b62b17be19ed2bb7b104a3c65545988c6ec729d83f75673e27690585f18b5eb468a083a

View file

@ -1,117 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools eutils flag-o-matic gnome2-utils xdg-utils
DESCRIPTION="Scans a disk image for regular expressions and other content"
HOMEPAGE="https://github.com/simsong/bulk_extractor"
SRC_URI="http://digitalcorpora.org/downloads/bulk_extractor/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
LICENSE="GPL-2"
SLOT="0"
IUSE="aff doc +beviewer +exiv2 hashdb rar"
RDEPEND="
aff? ( app-forensics/afflib )
beviewer? ( virtual/jdk:* )
dev-libs/boost[threads]
dev-libs/expat
dev-libs/openssl:0=
dev-db/sqlite:3
dev-libs/libxml2
exiv2? ( >=media-gfx/exiv2-0.27.0 )
sys-libs/zlib
hashdb? ( >=dev-libs/hashdb-3.1.0 )"
DEPEND="${RDEPEND}
doc? ( app-doc/doxygen )
virtual/man"
BDEPEND="
sys-devel/flex
virtual/pkgconfig"
src_prepare() {
# Add support hashdb-3.1.0 for old bulk_extractor versions
# https://github.com/NPS-DEEP/hashdb/wiki/hashdb-3.1.0-and-bulk_extractor
use hashdb && \
eapply "${FILESDIR}/${P}_hashdb-3.1.0_and_old_bulk_extractor.patch"
# Using -I rather than -isystem for BOOST_CPPFLAGS
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
# Add exiv-0.27.0 support and other minor fixes...
eapply "${FILESDIR}/add_exiv2-0.27_api_support.patch"
eapply "${FILESDIR}/${P}_fix_call_of_overloaded_errors.patch"
eapply "${FILESDIR}/${P}_other_minor_fixes.patch"
eautoreconf
default
}
src_configure() {
append-cxxflags -std=c++11
# null — is true for ./configure options
econf \
--without-o3 \
--disable-libewf \
$(use aff || echo "--disable-afflib") \
$(use beviewer || echo "--disable-BEViewer") \
$(use exiv2 && echo "--enable-exiv2") \
$(use hashdb || echo "--disable-hashdb") \
$(use rar || echo "--disable-rar" )
}
src_install() {
dobin src/${PN} plugins/plugin_test
doman man/*.1
dodoc AUTHORS ChangeLog NEWS README
if use doc ; then
pushd doc/doxygen >/dev/null || die
doxygen || die "doxygen failed"
popd >/dev/null || die
dodoc -r \
doc/doxygen/html \
doc/*.{pdf,txt,md}
fi
if use beviewer; then
local bev_dir="/opt/beviewer-${PV}"
insinto "${bev_dir}"
doins java_gui/BEViewer.jar
insinto /usr/share/pixmaps
newins java_gui/icons/24/run-build-install.png ${PN}.png
make_wrapper "beviewer" \
"/usr/bin/java -Xmx1g -jar \"${bev_dir}/BEViewer.jar\""
make_desktop_entry \
"beviewer" \
"BEViewer (bulk_extractor)" \
"${PN}" "Utility"
fi
}
pkg_preinst() {
use beviewer && gnome2_icon_savelist
}
pkg_postinst() {
if use beviewer; then
xdg_icon_cache_update
xdg_desktop_database_update
fi
}
pkg_postrm() {
if use beviewer; then
xdg_icon_cache_update
xdg_desktop_database_update
fi
}

View file

@ -1 +0,0 @@
bulk_extractor-9999.ebuild

View file

@ -0,0 +1,116 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools desktop eutils git-r3 xdg-utils
DESCRIPTION="Scans a disk image for regular expressions and other content"
HOMEPAGE="https://github.com/simsong/bulk_extractor"
# Please check a ".gitmodules" file on upstream before bump it
EGIT_REPO_URI="https://github.com/simsong/bulk_extractor"
if [[ ${PV} != *9999 ]]; then
EGIT_COMMIT="a52b133a3c56a483caa59eb8c68634ee1648c4ec" # 20191111 release
KEYWORDS="~amd64 ~x86"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="aff doc +beviewer +ewf +exiv2 hashdb rar"
RDEPEND="
aff? ( app-forensics/afflib )
dev-libs/boost
dev-libs/expat
dev-libs/openssl:0=
dev-db/sqlite:3
dev-libs/libxml2
ewf? ( app-forensics/libewf )
exiv2? ( media-gfx/exiv2 )
sys-libs/zlib
hashdb? ( dev-libs/hashdb )
beviewer? (
|| ( virtual/jre:* virtual/jdk:* )
)"
DEPEND="${RDEPEND}
doc? ( app-doc/doxygen )
virtual/man"
BDEPEND="
sys-devel/flex
virtual/pkgconfig"
src_prepare() {
eapply "${FILESDIR}/add_exiv2-0.27_api_support.patch"
if [[ ${PV} != *9999 ]]; then
sed -e "s/AC_INIT(BULK_EXTRACTOR, \(.*\),/AC_INIT(BULK_EXTRACTOR, ${PV},/" \
-i configure.ac || die
fi
eautoreconf
default
}
src_configure() {
econf \
--without-o3 \
$(use aff || echo "--disable-afflib") \
$(use beviewer || echo "--disable-BEViewer") \
$(use ewf || echo "--disable-libewf") \
$(use exiv2 && echo "--enable-exiv2") \
$(use hashdb || echo "--disable-hashdb") \
$(use rar || echo "--disable-rar" )
}
src_install() {
dobin src/${PN} plugins/plugin_test
doman man/*.1
dodoc AUTHORS ChangeLog NEWS README.md
if use doc ; then
pushd doc/doxygen >/dev/null || die
doxygen || die "doxygen failed"
popd >/dev/null || die
dodoc -r \
doc/doxygen/html \
doc/Diagnostics_Notes \
doc/announce \
doc/*.{pdf,txt,md} \
doc/programmer_manual/*.pdf
fi
if use beviewer; then
local bev_dir="/opt/beviewer-${PV}"
insinto "${bev_dir}"
doins java_gui/BEViewer.jar
insinto /usr/share/pixmaps
newins java_gui/icons/24/run-build-install.png ${PN}.png
make_wrapper "beviewer" \
"/usr/bin/java -Xmx1g -jar \"${bev_dir}/BEViewer.jar\""
make_desktop_entry \
"beviewer" \
"BEViewer (bulk_extractor)" \
"${PN}" "Utility"
fi
}
pkg_postinst() {
if use beviewer; then
xdg_icon_cache_update
xdg_desktop_database_update
fi
}
pkg_postrm() {
if use beviewer; then
xdg_icon_cache_update
xdg_desktop_database_update
fi
}

View file

@ -0,0 +1,121 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools desktop eutils git-r3 xdg-utils
DESCRIPTION="Scans a disk image for regular expressions and other content"
HOMEPAGE="https://github.com/simsong/bulk_extractor"
# Must use git due to recursive links
# Please check a ".gitmodules" file on upstream before bump it
EGIT_REPO_URI="https://github.com/simsong/bulk_extractor"
if [[ ${PV} != *9999 ]]; then
EGIT_COMMIT="e40e45a7bdde3d60372f0b55d696a54305acec40"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="GPL-2"
SLOT="0"
#fails to compile with exiv2
#fails to compile without rar
IUSE="aff doc beviewer +ewf exiv2 hashdb +rar"
RDEPEND="
aff? ( app-forensics/afflib )
dev-libs/boost
dev-libs/expat
dev-libs/openssl:0=
dev-db/sqlite:3
dev-libs/libxml2
ewf? ( app-forensics/libewf )
exiv2? ( media-gfx/exiv2 )
sys-libs/zlib
hashdb? ( dev-libs/hashdb )
beviewer? (
|| ( virtual/jre:* virtual/jdk:* )
)"
DEPEND="${RDEPEND}
doc? ( app-doc/doxygen )
virtual/man"
BDEPEND="
sys-devel/flex
virtual/pkgconfig"
src_prepare() {
# eapply "${FILESDIR}/add_exiv2-0.27_api_support.patch"
if [[ ${PV} != *9999 ]]; then
sed -e "s/AC_INIT(BULK_EXTRACTOR, \(.*\),/AC_INIT(BULK_EXTRACTOR, ${PV},/" \
-i configure.ac || die
fi
eautoreconf
default
}
src_configure() {
econf \
--disable-o3 \
$(use ewf || echo "--disable-libewf")
# $(use beviewer || echo "--disable-BEViewer") \
# $(use exiv2 && echo "--enable-exiv2") \
# $(use aff || echo "--disable-afflib") \
# $(use hashdb || echo "--disable-hashdb") \
# $(use rar || echo "--disable-rar" )
}
src_install() {
dobin src/${PN}
doman man/*.1
dodoc AUTHORS ChangeLog NEWS README.md
if use doc ; then
pushd doc/doxygen >/dev/null || die
doxygen || die "doxygen failed"
popd >/dev/null || die
dodoc -r \
doc/doxygen/html \
doc/Diagnostics_Notes \
doc/announce \
doc/*.{pdf,txt,md} \
doc/programmer_manual/*.pdf
fi
# if use beviewer; then
# local bev_dir="/opt/beviewer-${PV}"
# insinto "${bev_dir}"
# doins java_gui/BEViewer.jar
# insinto /usr/share/pixmaps
# newins java_gui/icons/24/run-build-install.png ${PN}.png
# make_wrapper "beviewer" \
# "/usr/bin/java -Xmx1g -jar \"${bev_dir}/BEViewer.jar\""
# make_desktop_entry \
# "beviewer" \
# "BEViewer (bulk_extractor)" \
# "${PN}" "Utility"
# fi
}
#pkg_postinst() {
# if use beviewer; then
# xdg_icon_cache_update
# xdg_desktop_database_update
# fi
#}
#pkg_postrm() {
# if use beviewer; then
# xdg_icon_cache_update
# xdg_desktop_database_update
# fi
#}

View file

@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -21,7 +21,7 @@ IUSE="aff doc +beviewer +ewf +exiv2 hashdb rar"
RDEPEND="
aff? ( app-forensics/afflib )
dev-libs/boost[threads]
dev-libs/boost
dev-libs/expat
dev-libs/openssl:0=
dev-db/sqlite:3