consolidated update of dev-libs/libfwnt

This commit is contained in:
Volker Wegert 2022-11-17 20:23:14 +01:00
parent 05ea8220e0
commit 870e677888
No known key found for this signature in database
GPG key ID: 1BCEC13D2F171EC4
9 changed files with 3259 additions and 146 deletions

View file

@ -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

View file

@ -0,0 +1,39 @@
#!/usr/bin/env python
#
# Python-bindings access_control_entry type test script
#
# Copyright (C) 2009-2022, Joachim Metz <joachim.metz@gmail.com>
#
# Refer to AUTHORS for acknowledgements.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import unittest
import pyfwnt
class AccessControlEntryTypeTests(unittest.TestCase):
"""Tests the access_control_entry type."""
def test_init(self):
"""Tests the init function."""
with self.assertRaises(NotImplementedError):
pyfwnt.access_control_entry()
if __name__ == "__main__":
unittest.main(verbosity=2)

View file

@ -0,0 +1,39 @@
#!/usr/bin/env python
#
# Python-bindings access_control_list type test script
#
# Copyright (C) 2009-2022, Joachim Metz <joachim.metz@gmail.com>
#
# Refer to AUTHORS for acknowledgements.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import unittest
import pyfwnt
class AccessControlListTypeTests(unittest.TestCase):
"""Tests the access_control_list type."""
def test_init(self):
"""Tests the init function."""
with self.assertRaises(NotImplementedError):
pyfwnt.access_control_list()
if __name__ == "__main__":
unittest.main(verbosity=2)

File diff suppressed because it is too large Load diff

View file

@ -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[@]}
}

View file

@ -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[@]}
}

View file

@ -0,0 +1,68 @@
# 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
dev-libs/libcerror
dev-libs/libcnotify
dev-libs/libcthreads
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
}

View file

@ -1,56 +1,68 @@
# 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
dev-libs/libcerror
dev-libs/libcnotify
dev-libs/libcthreads
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
}

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>unknown@pentoo.ch</email>
<name>Author Unknown</name>
</maintainer>
</pkgmetadata>