Пытаюсь запилить собственный ебилд, т.к. sleuthkit в портажах староват.
В общем такой вот ebuild:
EAPI=5
inherit autotools-utils java-pkg-opt-2 java-ant-2
DESCRIPTION="A collection of file system and media management forensic analysis tools"
HOMEPAGE="http://www.sleuthkit.org/sleuthkit/"
SRC_URI="https://github.com/sleuthkit/sleuthkit/archive/release-4.4.2.zip"
LICENSE="GPL-2 IBM"
SLOT="0/10" # subslot = major soname version
KEYWORDS="~amd64 ~hppa ~ppc ~x86"
IUSE="aff ewf static-libs java"
COMMON_DEPEND="dev-db/sqlite:3
ewf? ( app-forensics/libewf )
aff? ( app-forensics/afflib )"
DEPEND="${COMMON_DEPEND}
java? ( virtual/jdk )"
RDEPEND="${COMMON_DEPEND}
dev-perl/Date-Manip"
DOCS=( NEWS.txt README.txt )
PATCHES=(
"${FILESDIR}"/${PN}-4.4.2-tools-shared-libs.patch
)
src_unpack() {
unpack ${A}
mv "${WORKDIR}/sleuthkit-release-4.4.2" "${S}"
}
src_prepare() {
AUTOTOOLS_AUTORECONF=1
AUTOTOOLS_IN_SOURCE_BUILD=1
autotools-utils_src_prepare
}
src_configure() {
local myeconfargs=(
$(use_with aff afflib)
$(use_with ewf libewf)
$(use_enable java)
)
autotools-utils_src_configure
}
src_compile() {
einfo "src_compile()"
autotools-utils_src_compile
EANT_BUILD_XML="bindings/java/build.xml"
use java && eant -f "${EANT_BUILD_XML}" dist
}
Если пытаюсь собрать с «USE=java», то получаю следующий отлуп:
$ USE=java ebuild sleuthkit-4.4.2.ebuild compile
* release-4.4.2.zip SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
!!! ERROR: Couldnt find a VM dep
* Unable to determine VM for building from dependencies:
NV_DEPEND: dev-db/sqlite:3
ewf? ( app-forensics/libewf )
aff? ( app-forensics/afflib )
java? ( virtual/jdk ) >=app-portage/elt-patches-20170317 java? ( >=dev-java/java-config-2.2.0-r3 ) java? ( >=dev-java/ant-core-1.8.2:0
>=dev-java/javatoolkit-0.3.0-r2 )
* ERROR: app-forensics/sleuthkit-4.4.2::my-overlay failed (setup phase):
* Failed to determine VM for building.
*
* Call stack:
* ebuild.sh, line 115: Called pkg_setup
* ebuild.sh, line 348: Called java-pkg-opt-2_pkg_setup
* java-pkg-opt-2.eclass, line 37: Called java-pkg_init
* java-utils-2.eclass, line 2194: Called java-pkg_switch-vm
* java-utils-2.eclass, line 2656: Called die
* The specific snippet of code:
* die "Failed to determine VM for building."
*
* If you need support, post the output of `emerge --info '=app-forensics/sleuthkit-4.4.2::my-overlay'`,
* the complete build log and the output of `emerge -pqv '=app-forensics/sleuthkit-4.4.2::my-overlay'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM= CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info =sleuthkit-4.4.2
Т.е. на этапе pkg_setup() почему-то не может найти JVM, хотя она есть.
$ eselect java-vm show
Current system-vm
oracle-jdk-bin-1.8
Current user-vm
(unset)
$ javac -version
javac 1.8.0_131
У меня такое ощущение, что autotools-utils и java-pkg-opt-2 не дружат между собой. Кто-нибудь с подобным сталкивался?
UPD:
Вылечилось прописыванием зависимости '( >=virtual/jdk-1.8.0 )'
Проблема как оказалось в 'depend-java-query', а autotools-utils с java-pkg-opt-2 тут не причём.
$ depend-java-query -v 'virtual/jdk'
!!! ERROR: Couldnt find a VM dep
$ depend-java-query -v '>=virtual/jdk-1.8.0'
oracle-jdk-bin-1.8