From f503ea07a435f6ad335b0a525b1e5152ac341841 Mon Sep 17 00:00:00 2001 From: Anton Bolshakov Date: Fri, 27 Jan 2023 14:23:49 +0800 Subject: [PATCH] libfwnt: fix https://github.com/pentoo/pentoo-overlay/pull/1297 --- dev-libs/libfwnt/Manifest | 3 +- dev-libs/libfwnt/libfwnt-20200723.ebuild | 56 ---------------- dev-libs/libfwnt/libfwnt-20210421.ebuild | 56 ---------------- dev-libs/libfwnt/libfwnt-20210906.ebuild | 74 +++++++++++++++++++++ dev-libs/libfwnt/libfwnt-20220922.ebuild | 82 +++++++++++++++--------- 5 files changed, 125 insertions(+), 146 deletions(-) delete mode 100644 dev-libs/libfwnt/libfwnt-20200723.ebuild delete mode 100644 dev-libs/libfwnt/libfwnt-20210421.ebuild create mode 100644 dev-libs/libfwnt/libfwnt-20210906.ebuild diff --git a/dev-libs/libfwnt/Manifest b/dev-libs/libfwnt/Manifest index a006196b3..0b5ebb4fd 100644 --- a/dev-libs/libfwnt/Manifest +++ b/dev-libs/libfwnt/Manifest @@ -1,3 +1,2 @@ -DIST libfwnt-alpha-20200723.tar.gz 1085871 BLAKE2B 88ebeb9e2b9a0d3e562c7c364f76517b402df21b5cd941c3e5130f18c8d48cbe41dbc501cbf68b44f0ea15a6dccee2b38a4c2e4556213ef871b8aeefbb3a2250 SHA512 db2454a4da3d0613b3931da1db8808974bcafec32d4f7c4b72b8ef58b8a28283ce27544f6da7a8c5d0f4851d929d836717e852bcac39979b90aa98014c8d89ca -DIST libfwnt-alpha-20210421.tar.gz 1086509 BLAKE2B 5fa82d30e168d98c0ba920b2b30063064a674c9d6f96879f969d3ac884c9116c0d6a7e455663e4014e83251209012cf3a02639e82dd3e942f7603e3ddcce63fd SHA512 5f7dd9653d4a266ad0e126ee60d98a80930bfe5f81a4707499231e0da8cc1947e7467ec64bc26d7622496582414e001dcaea8be455a48dba99ca21116ae3f550 +DIST libfwnt-alpha-20210906.tar.gz 1088239 BLAKE2B 86689fd114d9f619fea023979c4dedfee9dc002723e841ed8ed389cd9571c0a638a915bba6c7ee11418658509f3b618f841c6bcd7f841bdba2db3001503be5f0 SHA512 2d9a15fbfd3dc092496fc83357c8515865997f2114dd4bdbeb1caead7ac258706b530aebb953001679c1ff8700e449d047d6b97d17305a0c4f2180e32c758ac8 DIST libfwnt-alpha-20220922.tar.gz 1153326 BLAKE2B 5ff6016e0e372f37966f5c322dd17e3ff5a932311269eec5e3d8e13a20f9ce48afcbcb1214fbd2e414399a71e2b77b1b2f67f5cf19684a412592169fa8192b42 SHA512 93ef460c771b6c5c04219f8d6765cdddc6a047e1ce45696ed7a863e36f10cc392cb1cd1338f0d4f3220f1c6d9ee25fb679f6001f090fd69d7ee269adcac064bf diff --git a/dev-libs/libfwnt/libfwnt-20200723.ebuild b/dev-libs/libfwnt/libfwnt-20200723.ebuild deleted file mode 100644 index d1517376a..000000000 --- a/dev-libs/libfwnt/libfwnt-20200723.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{10..11} ) - -inherit python-r1 - -DESCRIPTION="Library for Windows NT data types" -HOMEPAGE="https://github.com/libyal/${PN}" -SRC_URI="https://github.com/libyal/${PN}/releases/download/${PV}/${PN}-alpha-${PV}.tar.gz" - -LICENSE="LGPL-3" -SLOT="0" -KEYWORDS="amd64 ~arm64 x86" -IUSE="debug nls python +threads winapi" - -DEPEND="dev-libs/libcdata - dev-libs/libcerror - dev-libs/libcnotify - dev-libs/libcthreads" -RDEPEND="${DEPEND}" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CMAKE_IN_SOURCE_BUILD=1 - -src_configure() { - - local myconf=( - $(use_enable python) \ - $(use_enable nls) \ - $(use_with nls libiconv-prefix) \ - $(use_with nls libintl-prefix) \ - $(use_enable debug debug-output) \ - $(use_enable debug verbose-output) \ - $(use_enable winapi) \ - $(use_enable threads multi-threading-support) -# --with-libcdata --with-libcerror \ -# --with-libcnotify --with-libcthreads - ) - - 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 - - econf ${myconf[@]} -} diff --git a/dev-libs/libfwnt/libfwnt-20210421.ebuild b/dev-libs/libfwnt/libfwnt-20210421.ebuild deleted file mode 100644 index d1517376a..000000000 --- a/dev-libs/libfwnt/libfwnt-20210421.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{10..11} ) - -inherit python-r1 - -DESCRIPTION="Library for Windows NT data types" -HOMEPAGE="https://github.com/libyal/${PN}" -SRC_URI="https://github.com/libyal/${PN}/releases/download/${PV}/${PN}-alpha-${PV}.tar.gz" - -LICENSE="LGPL-3" -SLOT="0" -KEYWORDS="amd64 ~arm64 x86" -IUSE="debug nls python +threads winapi" - -DEPEND="dev-libs/libcdata - dev-libs/libcerror - dev-libs/libcnotify - dev-libs/libcthreads" -RDEPEND="${DEPEND}" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -CMAKE_IN_SOURCE_BUILD=1 - -src_configure() { - - local myconf=( - $(use_enable python) \ - $(use_enable nls) \ - $(use_with nls libiconv-prefix) \ - $(use_with nls libintl-prefix) \ - $(use_enable debug debug-output) \ - $(use_enable debug verbose-output) \ - $(use_enable winapi) \ - $(use_enable threads multi-threading-support) -# --with-libcdata --with-libcerror \ -# --with-libcnotify --with-libcthreads - ) - - 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 - - econf ${myconf[@]} -} diff --git a/dev-libs/libfwnt/libfwnt-20210906.ebuild b/dev-libs/libfwnt/libfwnt-20210906.ebuild new file mode 100644 index 000000000..6c87d99ab --- /dev/null +++ b/dev-libs/libfwnt/libfwnt-20210906.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) + +inherit python-single-r1 autotools + +DESCRIPTION="Library for Windows NT data types" +HOMEPAGE="https://github.com/libyal/libfwnt" +SRC_URI="https://github.com/libyal/libfwnt/releases/download/${PV}/${PN}-alpha-${PV}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" +IUSE="debug nls python +threads" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND=" + dev-libs/libcdata[nls=] + dev-libs/libcerror[nls=] + dev-libs/libcnotify[nls=] + dev-libs/libcthreads[nls=] + nls? ( + virtual/libiconv + virtual/libintl + ) + python? ( dev-lang/python:* ) +" +RDEPEND=" + ${DEPEND} + python? ( ${PYTHON_DEPS} ) +" + +CMAKE_IN_SOURCE_BUILD=1 + +src_prepare() { + # workaround for missing files in distribution package, see https://github.com/libyal/libfwnt/issues/12 + # should not be required any more in releases after 20220922 + cp "${FILESDIR}/2022-11-pyfwnt_test_access_control_entry.py" "${WORKDIR}/${P}/tests/pyfwnt_test_access_control_entry.py" + cp "${FILESDIR}/2022-11-pyfwnt_test_access_control_list.py" "${WORKDIR}/${P}/tests/pyfwnt_test_access_control_list.py" + cp "${FILESDIR}/2022-11-pyfwnt_test_lzx.py" "${WORKDIR}/${P}/tests/pyfwnt_test_lzx.py" + + #makefile was created with 1.16, let's regenerate it + eautoreconf + eapply_user +} + +src_configure() { + econf \ + $(use_enable nls) \ + $(use_with nls libiconv-prefix) \ + $(use_with nls libintl-prefix) \ + $(use_enable debug verbose-output) \ + $(use_enable debug debug-output) \ + $(use_enable threads multi-threading-support) \ + $(use_enable python) \ + $(use_enable python python3) + +# --disable-shared-libs disable shared library support +# not supported in the ebuild at the moment - kind of defeats the entire process + +# --enable-winapi enable WINAPI support for cross-compilation +# [default=auto-detect] +# not supported in the ebuild at the moment - requires windows.h, does not make much sense for us +} + +src_install() { + default + # see https://projects.gentoo.org/qa/policy-guide/installed-files.html#pg0303 + find "${ED}" -name '*.la' -delete || die +} diff --git a/dev-libs/libfwnt/libfwnt-20220922.ebuild b/dev-libs/libfwnt/libfwnt-20220922.ebuild index d1517376a..6c87d99ab 100644 --- a/dev-libs/libfwnt/libfwnt-20220922.ebuild +++ b/dev-libs/libfwnt/libfwnt-20220922.ebuild @@ -1,56 +1,74 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_COMPAT=( python3_{9..11} ) -inherit python-r1 +inherit python-single-r1 autotools DESCRIPTION="Library for Windows NT data types" -HOMEPAGE="https://github.com/libyal/${PN}" -SRC_URI="https://github.com/libyal/${PN}/releases/download/${PV}/${PN}-alpha-${PV}.tar.gz" +HOMEPAGE="https://github.com/libyal/libfwnt" +SRC_URI="https://github.com/libyal/libfwnt/releases/download/${PV}/${PN}-alpha-${PV}.tar.gz" LICENSE="LGPL-3" SLOT="0" KEYWORDS="amd64 ~arm64 x86" -IUSE="debug nls python +threads winapi" - -DEPEND="dev-libs/libcdata - dev-libs/libcerror - dev-libs/libcnotify - dev-libs/libcthreads" -RDEPEND="${DEPEND}" +IUSE="debug nls python +threads" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +DEPEND=" + dev-libs/libcdata[nls=] + dev-libs/libcerror[nls=] + dev-libs/libcnotify[nls=] + dev-libs/libcthreads[nls=] + nls? ( + virtual/libiconv + virtual/libintl + ) + python? ( dev-lang/python:* ) +" +RDEPEND=" + ${DEPEND} + python? ( ${PYTHON_DEPS} ) +" + CMAKE_IN_SOURCE_BUILD=1 -src_configure() { +src_prepare() { + # workaround for missing files in distribution package, see https://github.com/libyal/libfwnt/issues/12 + # should not be required any more in releases after 20220922 + cp "${FILESDIR}/2022-11-pyfwnt_test_access_control_entry.py" "${WORKDIR}/${P}/tests/pyfwnt_test_access_control_entry.py" + cp "${FILESDIR}/2022-11-pyfwnt_test_access_control_list.py" "${WORKDIR}/${P}/tests/pyfwnt_test_access_control_list.py" + cp "${FILESDIR}/2022-11-pyfwnt_test_lzx.py" "${WORKDIR}/${P}/tests/pyfwnt_test_lzx.py" - local myconf=( - $(use_enable python) \ + #makefile was created with 1.16, let's regenerate it + eautoreconf + eapply_user +} + +src_configure() { + econf \ $(use_enable nls) \ $(use_with nls libiconv-prefix) \ $(use_with nls libintl-prefix) \ - $(use_enable debug debug-output) \ $(use_enable debug verbose-output) \ - $(use_enable winapi) \ - $(use_enable threads multi-threading-support) -# --with-libcdata --with-libcerror \ -# --with-libcnotify --with-libcthreads - ) + $(use_enable debug debug-output) \ + $(use_enable threads multi-threading-support) \ + $(use_enable python) \ + $(use_enable python python3) - 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 +# --disable-shared-libs disable shared library support +# not supported in the ebuild at the moment - kind of defeats the entire process - econf ${myconf[@]} +# --enable-winapi enable WINAPI support for cross-compilation +# [default=auto-detect] +# not supported in the ebuild at the moment - requires windows.h, does not make much sense for us +} + +src_install() { + default + # see https://projects.gentoo.org/qa/policy-guide/installed-files.html#pg0303 + find "${ED}" -name '*.la' -delete || die }