From ae61ac54c17f8442ae87c33abac872b0170b49d6 Mon Sep 17 00:00:00 2001 From: blshkv Date: Wed, 2 Aug 2017 12:12:58 +0800 Subject: [PATCH] libewf: fix python option --- app-forensics/libewf/libewf-20170703.ebuild | 57 ++++++++++----------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/app-forensics/libewf/libewf-20170703.ebuild b/app-forensics/libewf/libewf-20170703.ebuild index 5ee99cc99..cf3af3a06 100644 --- a/app-forensics/libewf/libewf-20170703.ebuild +++ b/app-forensics/libewf/libewf-20170703.ebuild @@ -3,9 +3,9 @@ EAPI=6 -PYTHON_COMPAT=( python2_7 ) +PYTHON_COMPAT=( python{2_7,3_4,3_5} ) -inherit versionator autotools python-single-r1 +inherit versionator autotools python-r1 MY_DATE="$(get_version_component_range 1)" @@ -87,36 +87,33 @@ pkg_setup() { } src_configure() { - econf $(use_enable debug debug-output) \ - $(use_enable debug verbose-output) \ - $(use_enable ewf v1-api) \ - $(use_enable python) \ - $(use_enable nls) \ - $(use_with nls libiconv-prefix) \ - $(use_with nls libintl-prefix) \ - $(use_enable unicode wide-character-type) \ - $(use_with zlib) \ - $(use_with ssl openssl) \ - $(use_with uuid libuuid) \ + local myconf=( + $(use_enable debug debug-output) + $(use_enable debug verbose-output) + $(use_enable ewf v1-api) + $(use_enable python) + $(use_enable nls) + $(use_with nls libiconv-prefix) + $(use_with nls libintl-prefix) + $(use_enable unicode wide-character-type) + $(use_with zlib) + $(use_with ssl openssl) + $(use_with uuid libuuid) $(use_with fuse libfuse) + ) -# autotools-utils_src_configure -# econf $(myeconfargs) - -} - -src_compile() { -# autotools-utils_src_compile - if use python; then - emake -C pyewf + if use python ; then + #todo: make python2 optional + myconf+=( --enable-python2 ) + prepare_python() { + if python_is_python3; then + myconf+=( --enable-python3 ) + fi + } + python_foreach_impl run_in_build_dir prepare_python fi - default + + econf ${myconf[@]} + } -src_install() { -# autotools-utils_src_install - if use python; then - emake -C pyewf DESTDIR="${D}" install - fi - default -}