Merge pull request #117 from flatcar-linux/dongsu/update-pkgs-20201021

Update json-c, libuv, libxml2, c-ares
This commit is contained in:
Dongsu Park 2020-10-23 15:05:55 +02:00 committed by GitHub
commit b766768842
34 changed files with 896 additions and 480 deletions

View File

@ -1,4 +1,2 @@
DIST json-c-0.12.1.tar.gz 535086 BLAKE2B 57e1da29b3326ccad07a60aafbe653a33b1bbbc26d184c916deb4d120b81781ad52d9945ee3cf5f44b112d41b274872ca76b94a05c12ccc003faecbed5fa586f SHA512 038676a0ce815e5174161fbd4339524feadc294d517f732fb408ad6aa7c4906423451c13386107569d9f24746a1a101564ca511e92e8276c5bf5b8c022ca42ed DIST json-c-0.14.tar.gz 321677 BLAKE2B 39325988dd58dad589fc0f036c17b2337c81cf7aab8ecb2232f8d59fef9d38df28e096f8d22320e0003799d477debddc4926eaa7a170954263c6b303c1fa056e SHA512 75537c61d0632a01f94d2394d7a4387ef1eca0b68aa56c495d3d96dd29b38ed20eb0cc3f6e5e24dc6660c8939669f8954005d9c3ba20437f3fcc9f9dd896b00d
DIST json-c-0.12.tar.gz 501419 BLAKE2B 24f035792ff1ba5c39e55bca6ee4ba2509ab71d0374c70b520791f38e1ec4ff2245a282f234fde9f4a02cd9eaaaaa998ce307563a20702c04ee972fdf51f2539 SHA512 c959804362386f6b77e9d04b5fedf6d6aff1fcd0ab50250edb25f759b510b402e7ad4b33d1cbadc3337b63a3145d19f310812a9ee351748348304b384dc2dc35 DIST json-c-0.15.tar.gz 361488 BLAKE2B ae34f6dd45ebee55e6413ecb234e48fa5ae1c17e6fa12462aaaa04e8801457060e176abe90d76d04ad0ee9b903ff467bc3b8ed5816792da175aad8862b9d168e SHA512 dc01298bcc78f0f31a34f5fcfe45c0feebfd88518e97fb4f96f1a652f71ccdd303415a4c7bf5b573bdcbcca80428281f0dfccefc6545ea3a7f18dbb819332f34
DIST json-c-0.13.1.tar.gz 639425 BLAKE2B 1da310309f9ce03306a9fd4a161670e460cf0b2222348df7c006902390f74a4cf100aab1ce6ac8a361a278dd917c114a278de5b3445817f3a40ae287478add46 SHA512 e984db2a42b9c95b52c798b2e8dd1b79951a8dcba27370af30c43b9549fbb00008dbcf052a535c528209aaee38e6d1f760168b706905ae72f3e704ed20f8a1a1
DIST json-c-0.13.tar.gz 634720 BLAKE2B f83876921f94fca1eb0a3473315d4dc75bb52e36499b265dd60e9dfa46d5417a958725aa3a6da3aa50f2a64f2cd5308af2685ca18bb3f5becd464fc570313735 SHA512 7375e1678e40f79298226d070db4ac3dab8a94c9d2438db1bbbcf668284ab30236fc77d841207c25f71cc2cebc596e1b8116d480434d829c8d96007a32ddf636

View File

@ -0,0 +1,56 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba692ff..fc2edff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,6 +65,7 @@ include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
option(BUILD_SHARED_LIBS "Default to building shared libraries" ON)
+option(BUILD_STATIC_LIBS "Default to building static libraries" OFF)
# Generate a release merge and test it to verify the correctness of republishing the package.
ADD_CUSTOM_TARGET(distcheck
@@ -383,7 +384,7 @@ add_library(${PROJECT_NAME}
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION 5.0.0
SOVERSION 5)
-
+list(APPEND CMAKE_TARGETS ${PROJECT_NAME})
# If json-c is used as subroject it set to target correct interface -I flags and allow
# to build external target without extra include_directories(...)
target_include_directories(${PROJECT_NAME}
@@ -392,7 +393,33 @@ target_include_directories(${PROJECT_NAME}
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
)
-install(TARGETS ${PROJECT_NAME}
+# Allow to build static and shared libraries at the same time
+if (BUILD_STATIC_LIBS)
+ set(STATIC_LIB ${PROJECT_NAME}-static)
+ add_library(${STATIC_LIB} STATIC
+ ${JSON_C_SOURCES}
+ ${JSON_C_HEADERS}
+ )
+
+ # rename the static library
+ set_target_properties(${STATIC_LIB} PROPERTIES
+ OUTPUT_NAME ${PROJECT_NAME}
+ )
+ list(APPEND CMAKE_TARGETS ${STATIC_LIB})
+endif ()
+
+# Always create new install dirs with 0755 permissions, regardless of umask
+set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
+ OWNER_READ
+ OWNER_WRITE
+ OWNER_EXECUTE
+ GROUP_READ
+ GROUP_EXECUTE
+ WORLD_READ
+ WORLD_EXECUTE
+ )
+
+install(TARGETS ${CMAKE_TARGETS}
EXPORT ${PROJECT_NAME}-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,155 @@
From 099016b7e8d70a6d5dd814e788bba08d33d48426 Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Mon, 4 May 2020 19:41:16 +0200
Subject: [PATCH 1/3] Protect array_list_del_idx against size_t overflow.
If the assignment of stop overflows due to idx and count being
larger than SIZE_T_MAX in sum, out of boundary access could happen.
It takes invalid usage of this function for this to happen, but
I decided to add this check so array_list_del_idx is as safe against
bad usage as the other arraylist functions.
---
arraylist.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arraylist.c b/arraylist.c
index 12ad8af6d3..e5524aca75 100644
--- a/arraylist.c
+++ b/arraylist.c
@@ -136,6 +136,9 @@ int array_list_del_idx(struct array_list *arr, size_t idx, size_t count)
{
size_t i, stop;
+ /* Avoid overflow in calculation with large indices. */
+ if (idx > SIZE_T_MAX - count)
+ return -1;
stop = idx + count;
if (idx >= arr->length || stop > arr->length)
return -1;
From 77d935b7ae7871a1940cd827e850e6063044ec45 Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Mon, 4 May 2020 19:46:45 +0200
Subject: [PATCH 2/3] Prevent division by zero in linkhash.
If a linkhash with a size of zero is created, then modulo operations
are prone to division by zero operations.
Purely protective measure against bad usage.
---
linkhash.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linkhash.c b/linkhash.c
index 7ea58c0abf..f05cc38030 100644
--- a/linkhash.c
+++ b/linkhash.c
@@ -12,6 +12,7 @@
#include "config.h"
+#include <assert.h>
#include <limits.h>
#include <stdarg.h>
#include <stddef.h>
@@ -499,6 +500,8 @@ struct lh_table *lh_table_new(int size, lh_entry_free_fn *free_fn, lh_hash_fn *h
int i;
struct lh_table *t;
+ /* Allocate space for elements to avoid divisions by zero. */
+ assert(size > 0);
t = (struct lh_table *)calloc(1, sizeof(struct lh_table));
if (!t)
return NULL;
From d07b91014986900a3a75f306d302e13e005e9d67 Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Mon, 4 May 2020 19:47:25 +0200
Subject: [PATCH 3/3] Fix integer overflows.
The data structures linkhash and printbuf are limited to 2 GB in size
due to a signed integer being used to track their current size.
If too much data is added, then size variable can overflow, which is
an undefined behaviour in C programming language.
Assuming that a signed int overflow just leads to a negative value,
like it happens on many sytems (Linux i686/amd64 with gcc), then
printbuf is vulnerable to an out of boundary write on 64 bit systems.
---
linkhash.c | 7 +++++--
printbuf.c | 19 ++++++++++++++++---
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/linkhash.c b/linkhash.c
index f05cc38030..51e90b13a2 100644
--- a/linkhash.c
+++ b/linkhash.c
@@ -580,9 +580,12 @@ int lh_table_insert_w_hash(struct lh_table *t, const void *k, const void *v, con
{
unsigned long n;
- if (t->count >= t->size * LH_LOAD_FACTOR)
- if (lh_table_resize(t, t->size * 2) != 0)
+ if (t->count >= t->size * LH_LOAD_FACTOR) {
+ /* Avoid signed integer overflow with large tables. */
+ int new_size = INT_MAX / 2 < t->size ? t->size * 2 : INT_MAX;
+ if (t->size == INT_MAX || lh_table_resize(t, new_size) != 0)
return -1;
+ }
n = h % t->size;
diff --git a/printbuf.c b/printbuf.c
index 976c12dde5..00822fac4f 100644
--- a/printbuf.c
+++ b/printbuf.c
@@ -15,6 +15,7 @@
#include "config.h"
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -65,10 +66,16 @@ static int printbuf_extend(struct printbuf *p, int min_size)
if (p->size >= min_size)
return 0;
-
- new_size = p->size * 2;
- if (new_size < min_size + 8)
+ /* Prevent signed integer overflows with large buffers. */
+ if (min_size > INT_MAX - 8)
+ return -1;
+ if (p->size > INT_MAX / 2)
new_size = min_size + 8;
+ else {
+ new_size = p->size * 2;
+ if (new_size < min_size + 8)
+ new_size = min_size + 8;
+ }
#ifdef PRINTBUF_DEBUG
MC_DEBUG("printbuf_memappend: realloc "
"bpos=%d min_size=%d old_size=%d new_size=%d\n",
@@ -83,6 +90,9 @@ static int printbuf_extend(struct printbuf *p, int min_size)
int printbuf_memappend(struct printbuf *p, const char *buf, int size)
{
+ /* Prevent signed integer overflows with large buffers. */
+ if (size > INT_MAX - p->bpos - 1)
+ return -1;
if (p->size <= p->bpos + size + 1)
{
if (printbuf_extend(p, p->bpos + size + 1) < 0)
@@ -100,6 +110,9 @@ int printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len)
if (offset == -1)
offset = pb->bpos;
+ /* Prevent signed integer overflows with large buffers. */
+ if (len > INT_MAX - offset)
+ return -1;
size_needed = offset + len;
if (pb->size < size_needed)
{

View File

@ -1,43 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools multilib-minimal ltprune
DESCRIPTION="A JSON implementation in C"
HOMEPAGE="https://github.com/json-c/json-c/wiki"
SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="doc static-libs"
src_prepare() {
default
sed -i -e "s:-Werror::" Makefile.am.inc || die
eautoreconf
# tests break otherwise
multilib_copy_sources
}
multilib_src_configure() {
ECONF_SOURCE=${S} econf $(use_enable static-libs static)
}
multilib_src_test() {
export USE_VALGRIND=0 VERBOSE=1
default
}
multilib_src_install_all() {
use doc && HTML_DOCS=( "${S}"/doc/html/. )
einstalldocs
# add symlink for projects not using pkgconfig
dosym ../json-c /usr/include/json-c/json
prune_libtool_files
}

View File

@ -1,40 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
AUTOTOOLS_AUTORECONF=true
inherit autotools-multilib
DESCRIPTION="A JSON implementation in C"
HOMEPAGE="https://github.com/json-c/json-c/wiki"
SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/2"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="doc static-libs"
RDEPEND=""
# tests break otherwise
AUTOTOOLS_IN_SOURCE_BUILD=1
src_prepare() {
sed -i -e "s:-Werror::" Makefile.am.inc || die
autotools-multilib_src_prepare
}
src_test() {
export USE_VALGRIND=0 VERBOSE=1
autotools-multilib_src_test
}
src_install() {
use doc && HTML_DOCS=( "${S}"/doc/html )
autotools-multilib_src_install
# add symlink for projects not using pkgconfig
dosym ../json-c /usr/include/json-c/json
}

View File

@ -1,43 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools multilib-minimal ltprune
DESCRIPTION="A JSON implementation in C"
HOMEPAGE="https://github.com/json-c/json-c/wiki"
SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/4"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="doc static-libs"
src_prepare() {
default
sed -i -e "s:-Werror::" configure.ac || die
eautoreconf
# tests break otherwise
multilib_copy_sources
}
multilib_src_configure() {
ECONF_SOURCE=${S} econf $(use_enable static-libs static)
}
multilib_src_test() {
export USE_VALGRIND=0 VERBOSE=1
default
}
multilib_src_install_all() {
use doc && HTML_DOCS=( "${S}"/doc/html/. )
einstalldocs
# add symlink for projects not using pkgconfig
dosym ../json-c /usr/include/json-c/json
prune_libtool_files
}

View File

@ -1,43 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools multilib-minimal ltprune
DESCRIPTION="A JSON implementation in C"
HOMEPAGE="https://github.com/json-c/json-c/wiki"
SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/3"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="doc static-libs"
src_prepare() {
default
sed -i -e "s:-Werror::" configure.ac || die
eautoreconf
# tests break otherwise
multilib_copy_sources
}
multilib_src_configure() {
ECONF_SOURCE=${S} econf $(use_enable static-libs static)
}
multilib_src_test() {
export USE_VALGRIND=0 VERBOSE=1
default
}
multilib_src_install_all() {
use doc && HTML_DOCS=( "${S}"/doc/html/. )
einstalldocs
# add symlink for projects not using pkgconfig
dosym ../json-c /usr/include/json-c/json
prune_libtool_files
}

View File

@ -0,0 +1,55 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
CMAKE_ECLASS=cmake
inherit cmake-multilib
DESCRIPTION="A JSON implementation in C"
HOMEPAGE="https://github.com/json-c/json-c/wiki"
SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/5"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="cpu_flags_x86_rdrand doc static-libs threads"
PATCHES=(
"${FILESDIR}/${PN}-0.14-cmake-static-libs.patch"
"${FILESDIR}/${P}-security-fix.patch"
"${FILESDIR}/${PN}-0.14-object-limitation.patch"
)
MULTILIB_WRAPPED_HEADERS=(
/usr/include/json-c/config.h
)
src_prepare() {
cmake_src_prepare
}
multilib_src_configure() {
local mycmakeargs=(
-DBUILD_DOCUMENTATION=$(multilib_native_usex doc)
-DBUILD_STATIC_LIBS=$(usex static-libs)
-DDISABLE_WERROR=ON
-DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand)
-DENABLE_THREADING=$(usex threads)
)
cmake_src_configure
}
multilib_src_compile() {
cmake_src_compile
}
multilib_src_test() {
multilib_is_native_abi && cmake_src_test
}
multilib_src_install_all() {
use doc && HTML_DOCS=( "${S}"/doc/html/. )
einstalldocs
}

View File

@ -0,0 +1,50 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CMAKE_ECLASS=cmake
inherit cmake-multilib
DESCRIPTION="A JSON implementation in C"
HOMEPAGE="https://github.com/json-c/json-c/wiki"
SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/5"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="cpu_flags_x86_rdrand doc static-libs threads"
BDEPEND="doc? ( >=app-doc/doxygen-1.8.13 )"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/json-c/config.h
)
src_prepare() {
cmake_src_prepare
}
multilib_src_configure() {
local mycmakeargs=(
-DBUILD_STATIC_LIBS=$(usex static-libs)
-DDISABLE_WERROR=ON
-DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand)
-DENABLE_THREADING=$(usex threads)
)
cmake_src_configure
}
multilib_src_compile() {
cmake_src_compile
}
multilib_src_test() {
multilib_is_native_abi && cmake_src_test
}
multilib_src_install_all() {
use doc && HTML_DOCS=( "${S}"/doc/html/. )
einstalldocs
}

View File

@ -0,0 +1,50 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
CMAKE_ECLASS=cmake
inherit cmake-multilib git-r3
DESCRIPTION="A JSON implementation in C"
HOMEPAGE="https://github.com/json-c/json-c/wiki"
EGIT_REPO_URI="https://github.com/json-c/json-c.git"
LICENSE="MIT"
SLOT="0/5"
IUSE="cpu_flags_x86_rdrand doc static-libs threads"
BDEPEND="doc? ( >=app-doc/doxygen-1.8.13 )"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/json-c/config.h
)
src_prepare() {
cmake_src_prepare
}
multilib_src_configure() {
local mycmakeargs=(
-DDISABLE_WERROR=ON
-DENABLE_THREADING=$(usex threads)
-DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand)
-DBUILD_STATIC_LIBS=$(usex static-libs)
)
cmake_src_configure
}
multilib_src_compile() {
cmake_src_compile
use doc && doxygen doc/Doxyfile
}
multilib_src_test() {
multilib_is_native_abi && cmake_src_test
}
multilib_src_install_all() {
use doc && HTML_DOCS=( "${BUILD_DIR}-abi_x86_64.amd64"/doc/html/. )
einstalldocs
}

View File

@ -2,17 +2,26 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata> <pkgmetadata>
<maintainer type="person"> <maintainer type="person">
<email>hwoarang@gentoo.org</email> <email>jakov.smolic@sartura.hr</email>
<name>Markos Chandras</name> <name>Jakov Smolic</name>
</maintainer>
<maintainer type="person">
<email>luka.perkov@sartura.hr</email>
<name>Luka Perkov</name>
</maintainer>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer> </maintainer>
<longdescription lang="en"> <longdescription lang="en">
"A JSON implementation in C" is probably the better description, and then JSON-C is a JSON implementation written in C. It implements a
"JSON-C implements a reference counting object model that allows you to reference counting object model that allows you to easily
easily construct JSON objects in C, output them as JSON formatted construct JSON objects in C, output them as JSON formatted strings
strings and parse JSON formatted strings back into the C and parse JSON formatted strings back into the C representation of
representation of JSON objects. JSON objects.
</longdescription> </longdescription>
<upstream> <upstream>
<remote-id type="github">json-c/json-c</remote-id> <remote-id type="github">json-c/json-c</remote-id>
<remote-id type="cpe">cpe:/a:json-c_project:json-c</remote-id>
</upstream> </upstream>
</pkgmetadata> </pkgmetadata>

View File

@ -1,2 +1,2 @@
DIST libuv-1.10.2.tar.gz 1074184 SHA256 2d740a2adea0f1a19058626f55a076ac41a4ac1f95d4e57cae0c8a634a6cd63b SHA512 5d9a7c483c3504e10e17c29297d72dee1572dc657d261229cc68efe63cb3abb59f7e7768885ce3eb06f22691e73323158c06dcce29000c81e35ff9888853f080 WHIRLPOOL 19948da35acc1252de9633dbd30cb951eb07bf51c0f63b65d8716b87d9cbf7184814e1e44363e40bc8e55976256812eaef0583f0ab2f0d3a6ae0068e7349f034 DIST libuv-1.39.0.tar.gz 1272565 BLAKE2B a5ca826f99f2b7fc1736463df3c455caf2b63c8915fba61edd7b418639040910dfab6e170a089da0c18cd928d3b80c586cd10be4c5331a924a37105328960ca5 SHA512 b6aca197cbfc96125321ff071f6b2f3e56e99f85db8db6e20601019eae08056b42330ea7a73aa8c9960d142a1c8209910bc33050527f6fe0afaa8f7ed9f54066
DIST libuv-1.11.0.tar.gz 1083067 SHA256 6ec7eec6ecc24b1a8ffedebedb2fe9313fffb5410de89aaf784dd01080411c7a SHA512 fb0415d62a32cfc658bad6c849263ac236d27e9188fac603467173a5ae34fb3ad3e3bfd333e543ebd98b4fd59e0a58a93275e830c4365c058b62bb0c2c802732 WHIRLPOOL d32f729872be6fd5dcdcb95dfc613a4389789fea1bf79614c72470d35e7bd7e48b7804485eb4fc0e6c577d4b00bcdbd86c243b7a103056b5b73aa25d5cbc3adb DIST libuv-1.40.0.tar.gz 1274587 BLAKE2B 91d0e64a92be5686c0da3c4ad35fa52351012434a2a23db3fd91c26fc8e7b42d20d183a861feb876e2b5ab43e45ab59e720299f622a79c6bbdc6350b4b9e6e3d SHA512 14a6880e636e9d046e1f4c86061d7ca5fe0cdae0efb0c6fec6b6ad03b17c626da479d6cc1ae84da281ec04a75e0d56fa99ef25164432cdb246cf59f0964a7e8b

View File

@ -1,9 +1,8 @@
# Copyright 1999-2017 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
inherit autotools multilib-minimal
inherit autotools eutils multilib-minimal
DESCRIPTION="Cross-platform asychronous I/O" DESCRIPTION="Cross-platform asychronous I/O"
HOMEPAGE="https://github.com/libuv/libuv" HOMEPAGE="https://github.com/libuv/libuv"
@ -11,12 +10,14 @@ SRC_URI="https://github.com/libuv/libuv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD BSD-2 ISC MIT" LICENSE="BSD BSD-2 ISC MIT"
SLOT="0/1" SLOT="0/1"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="static-libs" IUSE="static-libs"
RESTRICT="test" RESTRICT="test"
DEPEND="sys-devel/libtool BDEPEND="
virtual/pkgconfig[${MULTILIB_USEDEP}]" sys-devel/libtool
virtual/pkgconfig
"
src_prepare() { src_prepare() {
default default
@ -24,13 +25,16 @@ src_prepare() {
echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \ echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \
> m4/libuv-extra-automake-flags.m4 || die > m4/libuv-extra-automake-flags.m4 || die
# upstream fails to ship a configure script
eautoreconf eautoreconf
} }
multilib_src_configure() { multilib_src_configure() {
ECONF_SOURCE="${S}" econf \ local myeconfargs=(
cc_cv_cflags__g=no \ cc_cv_cflags__g=no
$(use_enable static-libs static) $(use_enable static-libs static)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
} }
multilib_src_test() { multilib_src_test() {
@ -41,5 +45,5 @@ multilib_src_test() {
multilib_src_install_all() { multilib_src_install_all() {
einstalldocs einstalldocs
prune_libtool_files find "${D}" -name '*.la' -delete || die
} }

View File

@ -1,9 +1,8 @@
# Copyright 1999-2017 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
inherit autotools multilib-minimal
inherit autotools eutils multilib-minimal
DESCRIPTION="Cross-platform asychronous I/O" DESCRIPTION="Cross-platform asychronous I/O"
HOMEPAGE="https://github.com/libuv/libuv" HOMEPAGE="https://github.com/libuv/libuv"
@ -11,12 +10,14 @@ SRC_URI="https://github.com/libuv/libuv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD BSD-2 ISC MIT" LICENSE="BSD BSD-2 ISC MIT"
SLOT="0/1" SLOT="0/1"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="static-libs" IUSE="static-libs"
RESTRICT="test" RESTRICT="test"
DEPEND="sys-devel/libtool BDEPEND="
virtual/pkgconfig[${MULTILIB_USEDEP}]" sys-devel/libtool
virtual/pkgconfig
"
src_prepare() { src_prepare() {
default default
@ -24,13 +25,16 @@ src_prepare() {
echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \ echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \
> m4/libuv-extra-automake-flags.m4 || die > m4/libuv-extra-automake-flags.m4 || die
# upstream fails to ship a configure script
eautoreconf eautoreconf
} }
multilib_src_configure() { multilib_src_configure() {
ECONF_SOURCE="${S}" econf \ local myeconfargs=(
cc_cv_cflags__g=no \ cc_cv_cflags__g=no
$(use_enable static-libs static) $(use_enable static-libs static)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
} }
multilib_src_test() { multilib_src_test() {
@ -41,5 +45,5 @@ multilib_src_test() {
multilib_src_install_all() { multilib_src_install_all() {
einstalldocs einstalldocs
prune_libtool_files find "${D}" -name '*.la' -delete || die
} }

View File

@ -0,0 +1,49 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools git-r3 multilib-minimal
DESCRIPTION="Cross-platform asychronous I/O"
HOMEPAGE="https://github.com/libuv/libuv"
EGIT_REPO_URI="https://github.com/libuv/libuv"
LICENSE="BSD BSD-2 ISC MIT"
SLOT="0/1"
KEYWORDS=""
IUSE="static-libs"
RESTRICT="test"
BDEPEND="
sys-devel/libtool
virtual/pkgconfig
"
src_prepare() {
default
echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \
> m4/libuv-extra-automake-flags.m4 || die
# upstream fails to ship a configure script
eautoreconf
}
multilib_src_configure() {
local myeconfargs=(
cc_cv_cflags__g=no
$(use_enable static-libs static)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_test() {
mkdir "${BUILD_DIR}"/test || die
cp -pPR "${S}"/test/fixtures "${BUILD_DIR}"/test/fixtures || die
default
}
multilib_src_install_all() {
einstalldocs
find "${D}" -name '*.la' -delete || die
}

View File

@ -5,6 +5,9 @@
<email>kde@gentoo.org</email> <email>kde@gentoo.org</email>
<name>Gentoo KDE Project</name> <name>Gentoo KDE Project</name>
</maintainer> </maintainer>
<maintainer type="person">
<email>jer@gentoo.org</email>
</maintainer>
<longdescription lang="en"> <longdescription lang="en">
libuv is a platform layer for node.js. Its purpose is to abstract libuv is a platform layer for node.js. Its purpose is to abstract
IOCP on Windows and epoll/kqueue/event ports/etc. on Unix systems. IOCP on Windows and epoll/kqueue/event ports/etc. on Unix systems.
@ -30,6 +33,7 @@
<upstream> <upstream>
<bugs-to>https://github.com/libuv/libuv/issues</bugs-to> <bugs-to>https://github.com/libuv/libuv/issues</bugs-to>
<remote-id type="github">libuv/libuv</remote-id> <remote-id type="github">libuv/libuv</remote-id>
<remote-id type="cpe">cpe:/a:libuv:libuv</remote-id>
</upstream> </upstream>
<slots> <slots>
<subslots>Reflect ABI compatibility of libuv.so.</subslots> <subslots>Reflect ABI compatibility of libuv.so.</subslots>

View File

@ -1,6 +1,8 @@
DIST libxml2-2.9.6.tar.gz 5469624 BLAKE2B cb8fc74044876b2ddf9742a4a84d685ce6cd1e41a991ee79fd70a9175c54d2a9a3d3a2c3229a4ce177fcd4e30b0cee08c7cf3a36fef68b179db0ce521fbbf3b0 SHA512 5ef80f895374bd5dd3bcd5f00c715795f026bf45d998f8f762c0cdb739b8755e01de40cf853d98a3826eacef95c4adebe4777db11020e8d98d0bda921f55a0ed DIST libxml2-2.9.10-patchset.tar.xz 71584 BLAKE2B 4925a28570ed4f84da0407c3ce5b257d0959661855792160e4c534125fe0bbfa3749e7fc43b6c91a17206ac08a85922f4158bf40164c8a17ec940bf12b7dde1c SHA512 cd5a6aa86b6cf9ff852922ecfa23f34edeecab10a0e6d1bcd4dca56a6e17713b10af9387c7a6276bfec612f1d44fc06c16a7bdcab01ef9080f4dd10fab253b93
DIST libxml2-2.9.7.tar.gz 5467389 BLAKE2B e15082fb87fb41a7aab6f39120b1d1bbd0325af8009bb3b74c69a98bf7347a39f59055762df157dcf223a79ac84f17535cb40af0a9a461ee3d2c1d55f4832e1b SHA512 da06cb7c5032ef4b7c8e902fabb9d2c74634c42c161be07a7c66a00d53a68029f89b0d4de32a6b9d4ff338c2d1d9c4e53aefb9cf50cb1c2d6c6b06b442ef42d5 DIST libxml2-2.9.10-r1-patchset.tar.xz 72088 BLAKE2B 4d5f8aed35d6c0232089e09f22a77cbd25cbd2007c1330538e1c7acc4398ec3ef9023289129677cf5499dbacde4c2f28850ae81acab351d02625d3452aedaede SHA512 a63032d1e85128f637c2b54356aab06a17e31eb1f5facd8fdf88463eb21df6a1d9fd8cc751fa94b8d322fa4f796be4e1d9aa071cbd0826ab31fae46525fde952
DIST libxml2-2.9.8.tar.gz 5469097 BLAKE2B 0b7836db46edebf6e7108c28da4bb7e3fb5ddc695aaa3e456ba51a66c0294a741d7b60eb4c31c7040443bbd54712c019424078bd533856a9650b39a703a926d5 SHA512 28903282c7672206effa1362fd564cbe4cf5be44264b083a7d14e383f73bccd1b81bcafb5f4f2f56f5e7e05914c660e27668c9ce91b1b9f256ef5358d55ba917 DIST libxml2-2.9.10.tar.gz 5624761 BLAKE2B a9958bd7db17fbfb8259b64d66548eb19d28f1aecf40cf66752fcec5720855d31cea9941d52963badd8c18ea1770485f1c11da6213149458336ce0273418f421 SHA512 0adfd12bfde89cbd6296ba6e66b6bed4edb814a74b4265bda34d95c41d9d92c696ee7adb0c737aaf9cc6e10426a31a35079b2a23d26c074e299858da12c072ed
DIST libxml2-2.9.9-patchset.tar.xz 16792 BLAKE2B f761b5cda41d57543dadf2cdd8915b69727a818f31badc1092903a9e4341b807852fed0887e9ec7a06a0c19c4a49f9afc2f3c048947f21a09006bb51ef8399ef SHA512 c8c0ee6d0a2833e5664aa7549999f8ba63b9f0bbfda4651050eeee7d3a958c33ef55daba8cfb1ca73ebffeb44d411b5f4259fe6e11ef0204ad2deebd1708ebfb
DIST libxml2-2.9.9.tar.gz 5476717 BLAKE2B 00a67c38084f2effd5d68d7d3e68f0c96cf4f52eab6d8d9b96dc91f03a84baa132abeaf303a836ff9bbf04f832432a036077316c464398e433c9779d8519074b SHA512 cb7784ba4e72e942614e12e4f83f4ceb275f3d738b30e3b5c1f25edf8e9fa6789e854685974eed95b362049dbf6c8e7357e0327d64c681ed390534ac154e6810
DIST xmlts20080827.tar.gz 638940 BLAKE2B c5aab959c6e0698acd5b9be82b48a8ac26f4d01cc03f9acfff20d344f97f4711fc6d4a524ae70457147e8e30c72e27b6726829e1dd21896286aa974ed60774e7 SHA512 7325d0977c4427fc4944b291ccf896a665f654cc24399e5565c12a849c2bc3aef4fa3ee42a09ac115abcb6570c51a8fbd052c38d64d164279ecdecad5a4e884d DIST xmlts20080827.tar.gz 638940 BLAKE2B c5aab959c6e0698acd5b9be82b48a8ac26f4d01cc03f9acfff20d344f97f4711fc6d4a524ae70457147e8e30c72e27b6726829e1dd21896286aa974ed60774e7 SHA512 7325d0977c4427fc4944b291ccf896a665f654cc24399e5565c12a849c2bc3aef4fa3ee42a09ac115abcb6570c51a8fbd052c38d64d164279ecdecad5a4e884d
DIST xsts-2002-01-16.tar.gz 6894439 BLAKE2B 1e9ec63d2c104655e64249e07440a04d862fcbcd4d4e19745d81b34994319b510a531c9d6df1491fae1e90b5d0764f0f1a827251ca8df5d613178b0eab01ef25 SHA512 43300af6d39c1e2221b0ed7318fe14c7464eeb6eb030ed1e22eb29b4ab17f014e2a4c8887c3a46ae5d243e3072da27f00f4e285498ae6f1288177d38d1108288 DIST xsts-2002-01-16.tar.gz 6894439 BLAKE2B 1e9ec63d2c104655e64249e07440a04d862fcbcd4d4e19745d81b34994319b510a531c9d6df1491fae1e90b5d0764f0f1a827251ca8df5d613178b0eab01ef25 SHA512 43300af6d39c1e2221b0ed7318fe14c7464eeb6eb030ed1e22eb29b4ab17f014e2a4c8887c3a46ae5d243e3072da27f00f4e285498ae6f1288177d38d1108288
DIST xsts-2004-01-14.tar.gz 2761085 BLAKE2B 41545995fb3a65d053257c376c07d45ffd1041a433bfbdb46d4dd87a5afb60c18c8629a3d988323f9e7a1d709775b5a7e5930276a7121c0725a22705c0976e36 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe DIST xsts-2004-01-14.tar.gz 2761085 BLAKE2B 41545995fb3a65d053257c376c07d45ffd1041a433bfbdb46d4dd87a5afb60c18c8629a3d988323f9e7a1d709775b5a7e5930276a7121c0725a22705c0976e36 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe

View File

@ -0,0 +1,34 @@
Index: libxml2-2.9.5/python/libxml.c
===================================================================
--- libxml2-2.9.5.orig/python/libxml.c
+++ libxml2-2.9.5/python/libxml.c
@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
PyObject *message;
PyObject *result;
char str[1000];
+ unsigned char *ptr = (unsigned char *)str;
#ifdef DEBUG_ERROR
printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
str[999] = 0;
va_end(ap);
+#if PY_MAJOR_VERSION >= 3
+ /* Ensure the error string doesn't start at UTF8 continuation. */
+ while (*ptr && (*ptr & 0xc0) == 0x80)
+ ptr++;
+#endif
+
list = PyTuple_New(2);
PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
- message = libxml_charPtrConstWrap(str);
+ message = libxml_charPtrConstWrap(ptr);
PyTuple_SetItem(list, 1, message);
result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
+ /* Forget any errors caused in the error handler. */
+ PyErr_Clear();
Py_XDECREF(list);
Py_XDECREF(result);
}

View File

@ -1,91 +0,0 @@
From 168e20836fe9614dd2dd4b42006c17a783f11c48 Mon Sep 17 00:00:00 2001
From: Markus Duft <mduft@gentoo.org>
Date: Thu, 20 Nov 2008 11:04:33 -0500
Subject: [PATCH] Fix for ~x86-winnt
[Alexandre Rostovtsev <tetromino@gentoo.org>: port to 2.8.0-rc1]
---
dict.c | 2 +-
include/wsockcompat.h | 2 +-
nanohttp.c | 2 +-
xmlIO.c | 4 ++++
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dict.c b/dict.c
index 3579f64..71e7bc6 100644
--- a/dict.c
+++ b/dict.c
@@ -47,7 +47,7 @@
#else
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
-#elif defined(WIN32)
+#elif defined(WIN32) || defined (__PARITY__)
typedef unsigned __int32 uint32_t;
#endif
#endif
diff --git a/include/wsockcompat.h b/include/wsockcompat.h
index c762a64..1ed822b 100644
--- a/include/wsockcompat.h
+++ b/include/wsockcompat.h
@@ -27,7 +27,7 @@
#endif
#endif
-#if defined( __MINGW32__ ) || defined( _MSC_VER )
+#if defined( __MINGW32__ ) || defined( _MSC_VER ) || defined(__PARITY__)
/* Include <errno.h> here to ensure that it doesn't get included later
* (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */
#include <errno.h>
diff --git a/nanohttp.c b/nanohttp.c
index 2437fed..dbe97a7 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -74,7 +74,7 @@
#define XML_SOCKLEN_T unsigned int
#endif
-#if defined(__MINGW32__) || defined(_WIN32_WCE)
+#if defined(__MINGW32__) || defined(_WIN32_WCE) || defined(__PARITY__)
#ifndef _WINSOCKAPI_
#define _WINSOCKAPI_
#endif
diff --git a/xmlIO.c b/xmlIO.c
index 73a995d..99562f6 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -47,6 +47,7 @@
#include <winnls.h> /* for CP_UTF8 */
#endif
+#ifndef __PARITY__
/* Figure a portable way to know if a file is a directory. */
#ifndef HAVE_STAT
# ifdef HAVE__STAT
@@ -82,6 +83,7 @@
# endif
# endif
#endif
+#endif /* __PARITY__ */
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
@@ -657,6 +659,7 @@ xmlWrapStatUtf8(const char *path,struct stat *info)
{
#ifdef HAVE_STAT
int retval = -1;
+#ifndef __PARITY__
wchar_t *wPath;
wPath = __xmlIOWin32UTF8ToWChar(path);
@@ -665,6 +668,7 @@ xmlWrapStatUtf8(const char *path,struct stat *info)
retval = _wstat(wPath,info);
xmlFree(wPath);
}
+#endif
/* maybe path in native encoding */
if(retval < 0)
retval = stat(path,info);
--
1.7.8.6

View File

@ -0,0 +1,40 @@
https://gitlab.gnome.org/GNOME/libxml2/merge_requests/14
From 54878c018af979b20ca1bfbf12599973484cae5b Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Thu, 3 Jan 2019 05:44:03 -0500
Subject: [PATCH] fix reader5.py test when building out of tree
When building out of tree, the relative path this test uses doesn't
work. Resolve the path relative to the test script itself instead.
Url: https://bugs.gentoo.org/565576
---
python/tests/reader5.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/python/tests/reader5.py b/python/tests/reader5.py
index 82d0daea474a..da5355ffc4c6 100755
--- a/python/tests/reader5.py
+++ b/python/tests/reader5.py
@@ -4,6 +4,7 @@
# this extract the Dragon bibliography entries from the XML specification
#
import libxml2
+import os
import sys
# Memory debug specific
@@ -14,7 +15,8 @@ Ravi Sethi, and Jeffrey D. Ullman.
<emph>Compilers: Principles, Techniques, and Tools</emph>.
Reading: Addison-Wesley, 1986, rpt. corr. 1988.</bibl>"""
-f = open('../../test/valid/REC-xml-19980210.xml', 'rb')
+basedir = os.path.dirname(os.path.realpath(__file__))
+f = open(os.path.join(basedir, '../../test/valid/REC-xml-19980210.xml'), 'rb')
input = libxml2.inputBuffer(f)
reader = input.newTextReader("REC")
res=""
--
2.19.1

View File

@ -1,20 +1,22 @@
# Copyright 1999-2018 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="xml" PYTHON_REQ_USE="xml"
inherit libtool flag-o-matic ltprune python-r1 autotools prefix multilib-minimal inherit libtool flag-o-matic python-r1 autotools prefix multilib-minimal
DESCRIPTION="Version 2 of the library to manipulate XML files" DESCRIPTION="XML C parser and toolkit"
HOMEPAGE="http://www.xmlsoft.org/" HOMEPAGE="http://www.xmlsoft.org/"
LICENSE="MIT" LICENSE="MIT"
SLOT="2" SLOT="2"
KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="debug examples icu ipv6 lzma python readline static-libs test" IUSE="debug examples icu ipv6 lzma +python readline static-libs test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite" XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16" XSTS_NAME_1="xmlschema2002-01-16"
@ -24,6 +26,7 @@ XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
XMLCONF_TARBALL="xmlts20080827.tar.gz" XMLCONF_TARBALL="xmlts20080827.tar.gz"
SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patchset.tar.xz
test? ( test? (
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
@ -36,10 +39,10 @@ RDEPEND="
python? ( ${PYTHON_DEPS} ) python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:= ) readline? ( sys-libs/readline:= )
" "
DEPEND="${RDEPEND} DEPEND="${RDEPEND}"
BDEPEND="
dev-util/gtk-doc-am dev-util/gtk-doc-am
virtual/pkgconfig virtual/pkgconfig
hppa? ( >=sys-devel/binutils-2.15.92.0.2 )
" "
S="${WORKDIR}/${PN}-${PV%_rc*}" S="${WORKDIR}/${PN}-${PV%_rc*}"
@ -52,6 +55,7 @@ src_unpack() {
# ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR, # ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
# as they are needed as tarballs in ${S}/xstc instead and not unpacked # as they are needed as tarballs in ${S}/xstc instead and not unpacked
unpack ${P/_rc/-rc}.tar.gz unpack ${P/_rc/-rc}.tar.gz
unpack ${P}-patchset.tar.xz
cd "${S}" || die cd "${S}" || die
if use test; then if use test; then
@ -68,6 +72,9 @@ src_prepare() {
DOCS=( AUTHORS ChangeLog NEWS README* TODO* ) DOCS=( AUTHORS ChangeLog NEWS README* TODO* )
# Selective cherry-picks from master up to 2019-02-28 (commit 8161b463f5)
eapply "${WORKDIR}"/patches
# Patches needed for prefix support # Patches needed for prefix support
eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
@ -81,9 +88,14 @@ src_prepare() {
# https://bugzilla.gnome.org/show_bug.cgi?id=760458 # https://bugzilla.gnome.org/show_bug.cgi?id=760458
eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch
# Avoid final linking arguments for python modules # Fix python tests when building out of tree #565576
eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch
if [[ ${CHOST} == *-darwin* ]] ; then if [[ ${CHOST} == *-darwin* ]] ; then
# Avoid final linking arguments for python modules
sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die
# gcc-apple doesn't grok -Wno-array-bounds
sed -i -e 's/-Wno-array-bounds//' configure.ac || die
fi fi
# Please do not remove, as else we get references to PORTAGE_TMPDIR # Please do not remove, as else we get references to PORTAGE_TMPDIR
@ -123,7 +135,10 @@ multilib_src_configure() {
libxml2_py_configure() { libxml2_py_configure() {
mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
run_in_build_dir libxml2_configure "--with-python=${ROOT%/}${PYTHON}" # odd build system, also see bug #582130 run_in_build_dir libxml2_configure \
"--with-python=${EPYTHON}" \
"--with-python-install-dir=$(python_get_sitedir)"
# odd build system, also see bug #582130
} }
libxml2_configure --without-python # build python bindings separately libxml2_configure --without-python # build python bindings separately
@ -142,6 +157,7 @@ multilib_src_compile() {
} }
multilib_src_test() { multilib_src_test() {
ln -s "${S}"/xmlconf || die
emake check emake check
multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test
} }
@ -178,7 +194,7 @@ multilib_src_install_all() {
rm -rf "${ED}"/usr/share/doc/${PF}/python/examples rm -rf "${ED}"/usr/share/doc/${PF}/python/examples
fi fi
prune_libtool_files --modules find "${D}" -name '*.la' -delete || die
} }
pkg_postinst() { pkg_postinst() {
@ -188,13 +204,13 @@ pkg_postinst() {
elog "Skipping XML catalog creation for stage building (bug #208887)." elog "Skipping XML catalog creation for stage building (bug #208887)."
else else
# need an XML catalog, so no-one writes to a non-existent one # need an XML catalog, so no-one writes to a non-existent one
CATALOG="${EROOT}etc/xml/catalog" CATALOG="${EROOT}/etc/xml/catalog"
# we dont want to clobber an existing catalog though, # we dont want to clobber an existing catalog though,
# only ensure that one is there # only ensure that one is there
# <obz@gentoo.org> # <obz@gentoo.org>
if [[ ! -e ${CATALOG} ]]; then if [[ ! -e ${CATALOG} ]]; then
[[ -d "${EROOT}etc/xml" ]] || mkdir -p "${EROOT}etc/xml" [[ -d "${EROOT}/etc/xml" ]] || mkdir -p "${EROOT}/etc/xml"
"${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}" "${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}"
einfo "Created XML catalog in ${CATALOG}" einfo "Created XML catalog in ${CATALOG}"
fi fi

View File

@ -1,20 +1,22 @@
# Copyright 1999-2018 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="xml" PYTHON_REQ_USE="xml"
inherit libtool flag-o-matic ltprune python-r1 autotools prefix multilib-minimal inherit libtool flag-o-matic python-r1 autotools prefix multilib-minimal
DESCRIPTION="Version 2 of the library to manipulate XML files" DESCRIPTION="XML C parser and toolkit"
HOMEPAGE="http://www.xmlsoft.org/" HOMEPAGE="http://www.xmlsoft.org/"
LICENSE="MIT" LICENSE="MIT"
SLOT="2" SLOT="2"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="debug examples icu ipv6 lzma python readline static-libs test" IUSE="debug examples icu ipv6 lzma +python readline static-libs test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite" XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16" XSTS_NAME_1="xmlschema2002-01-16"
@ -24,6 +26,7 @@ XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
XMLCONF_TARBALL="xmlts20080827.tar.gz" XMLCONF_TARBALL="xmlts20080827.tar.gz"
SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-r1-patchset.tar.xz
test? ( test? (
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
@ -36,10 +39,10 @@ RDEPEND="
python? ( ${PYTHON_DEPS} ) python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:= ) readline? ( sys-libs/readline:= )
" "
DEPEND="${RDEPEND} DEPEND="${RDEPEND}"
BDEPEND="
dev-util/gtk-doc-am dev-util/gtk-doc-am
virtual/pkgconfig virtual/pkgconfig
hppa? ( >=sys-devel/binutils-2.15.92.0.2 )
" "
S="${WORKDIR}/${PN}-${PV%_rc*}" S="${WORKDIR}/${PN}-${PV%_rc*}"
@ -52,6 +55,7 @@ src_unpack() {
# ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR, # ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
# as they are needed as tarballs in ${S}/xstc instead and not unpacked # as they are needed as tarballs in ${S}/xstc instead and not unpacked
unpack ${P/_rc/-rc}.tar.gz unpack ${P/_rc/-rc}.tar.gz
unpack ${P}-r1-patchset.tar.xz
cd "${S}" || die cd "${S}" || die
if use test; then if use test; then
@ -68,6 +72,9 @@ src_prepare() {
DOCS=( AUTHORS ChangeLog NEWS README* TODO* ) DOCS=( AUTHORS ChangeLog NEWS README* TODO* )
# Selective cherry-picks from master up to 2019-02-28 (commit 8161b463f5)
eapply "${WORKDIR}"/patches
# Patches needed for prefix support # Patches needed for prefix support
eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
@ -75,15 +82,20 @@ src_prepare() {
# Fix build for Windows platform # Fix build for Windows platform
# https://bugzilla.gnome.org/show_bug.cgi?id=760456 # https://bugzilla.gnome.org/show_bug.cgi?id=760456
eapply "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch # eapply "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch
# Fix python detection, bug #567066 # Fix python detection, bug #567066
# https://bugzilla.gnome.org/show_bug.cgi?id=760458 # https://bugzilla.gnome.org/show_bug.cgi?id=760458
eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch
# Avoid final linking arguments for python modules # Fix python tests when building out of tree #565576
eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch
if [[ ${CHOST} == *-darwin* ]] ; then if [[ ${CHOST} == *-darwin* ]] ; then
# Avoid final linking arguments for python modules
sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die
# gcc-apple doesn't grok -Wno-array-bounds
sed -i -e 's/-Wno-array-bounds//' configure.ac || die
fi fi
# Please do not remove, as else we get references to PORTAGE_TMPDIR # Please do not remove, as else we get references to PORTAGE_TMPDIR
@ -123,7 +135,10 @@ multilib_src_configure() {
libxml2_py_configure() { libxml2_py_configure() {
mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
run_in_build_dir libxml2_configure "--with-python=${ROOT%/}${PYTHON}" # odd build system, also see bug #582130 run_in_build_dir libxml2_configure \
"--with-python=${EPYTHON}" \
"--with-python-install-dir=$(python_get_sitedir)"
# odd build system, also see bug #582130
} }
libxml2_configure --without-python # build python bindings separately libxml2_configure --without-python # build python bindings separately
@ -142,6 +157,7 @@ multilib_src_compile() {
} }
multilib_src_test() { multilib_src_test() {
ln -s "${S}"/xmlconf || die
emake check emake check
multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test
} }
@ -178,7 +194,7 @@ multilib_src_install_all() {
rm -rf "${ED}"/usr/share/doc/${PF}/python/examples rm -rf "${ED}"/usr/share/doc/${PF}/python/examples
fi fi
prune_libtool_files --modules find "${D}" -name '*.la' -delete || die
} }
pkg_postinst() { pkg_postinst() {
@ -188,13 +204,13 @@ pkg_postinst() {
elog "Skipping XML catalog creation for stage building (bug #208887)." elog "Skipping XML catalog creation for stage building (bug #208887)."
else else
# need an XML catalog, so no-one writes to a non-existent one # need an XML catalog, so no-one writes to a non-existent one
CATALOG="${EROOT}etc/xml/catalog" CATALOG="${EROOT}/etc/xml/catalog"
# we dont want to clobber an existing catalog though, # we dont want to clobber an existing catalog though,
# only ensure that one is there # only ensure that one is there
# <obz@gentoo.org> # <obz@gentoo.org>
if [[ ! -e ${CATALOG} ]]; then if [[ ! -e ${CATALOG} ]]; then
[[ -d "${EROOT}etc/xml" ]] || mkdir -p "${EROOT}etc/xml" [[ -d "${EROOT}/etc/xml" ]] || mkdir -p "${EROOT}/etc/xml"
"${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}" "${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}"
einfo "Created XML catalog in ${CATALOG}" einfo "Created XML catalog in ${CATALOG}"
fi fi

View File

@ -1,20 +1,22 @@
# Copyright 1999-2018 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="xml" PYTHON_REQ_USE="xml"
inherit libtool flag-o-matic ltprune python-r1 autotools prefix multilib-minimal inherit libtool flag-o-matic python-r1 autotools prefix multilib-minimal
DESCRIPTION="XML C parser and toolkit" DESCRIPTION="XML C parser and toolkit"
HOMEPAGE="http://www.xmlsoft.org/" HOMEPAGE="http://www.xmlsoft.org/"
LICENSE="MIT" LICENSE="MIT"
SLOT="2" SLOT="2"
KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="debug examples icu ipv6 lzma python readline static-libs test" IUSE="debug examples icu ipv6 lzma +python readline static-libs test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite" XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16" XSTS_NAME_1="xmlschema2002-01-16"
@ -24,6 +26,7 @@ XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
XMLCONF_TARBALL="xmlts20080827.tar.gz" XMLCONF_TARBALL="xmlts20080827.tar.gz"
SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz
https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz
test? ( test? (
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
@ -52,6 +55,7 @@ src_unpack() {
# ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR, # ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
# as they are needed as tarballs in ${S}/xstc instead and not unpacked # as they are needed as tarballs in ${S}/xstc instead and not unpacked
unpack ${P/_rc/-rc}.tar.gz unpack ${P/_rc/-rc}.tar.gz
unpack ${P}-patchset.tar.xz
cd "${S}" || die cd "${S}" || die
if use test; then if use test; then
@ -68,6 +72,9 @@ src_prepare() {
DOCS=( AUTHORS ChangeLog NEWS README* TODO* ) DOCS=( AUTHORS ChangeLog NEWS README* TODO* )
# Selective cherry-picks from master up to 2019-02-28 (commit 8161b463f5)
eapply "${WORKDIR}"/patches
# Patches needed for prefix support # Patches needed for prefix support
eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
@ -81,9 +88,17 @@ src_prepare() {
# https://bugzilla.gnome.org/show_bug.cgi?id=760458 # https://bugzilla.gnome.org/show_bug.cgi?id=760458
eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch
# Avoid final linking arguments for python modules # Fix python tests when building out of tree #565576
eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch
# Workaround python3 itstool potential problems, bug 701020
eapply "${FILESDIR}"/${PV}-python3-unicode-errors.patch
if [[ ${CHOST} == *-darwin* ]] ; then if [[ ${CHOST} == *-darwin* ]] ; then
# Avoid final linking arguments for python modules
sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die
# gcc-apple doesn't grok -Wno-array-bounds
sed -i -e 's/-Wno-array-bounds//' configure.ac || die
fi fi
# Please do not remove, as else we get references to PORTAGE_TMPDIR # Please do not remove, as else we get references to PORTAGE_TMPDIR
@ -123,7 +138,10 @@ multilib_src_configure() {
libxml2_py_configure() { libxml2_py_configure() {
mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
run_in_build_dir libxml2_configure "--with-python=${ROOT%/}${PYTHON}" # odd build system, also see bug #582130 run_in_build_dir libxml2_configure \
"--with-python=${EPYTHON}" \
"--with-python-install-dir=$(python_get_sitedir)"
# odd build system, also see bug #582130
} }
libxml2_configure --without-python # build python bindings separately libxml2_configure --without-python # build python bindings separately
@ -142,6 +160,7 @@ multilib_src_compile() {
} }
multilib_src_test() { multilib_src_test() {
ln -s "${S}"/xmlconf || die
emake check emake check
multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test
} }
@ -178,7 +197,7 @@ multilib_src_install_all() {
rm -rf "${ED}"/usr/share/doc/${PF}/python/examples rm -rf "${ED}"/usr/share/doc/${PF}/python/examples
fi fi
prune_libtool_files --modules find "${D}" -name '*.la' -delete || die
} }
pkg_postinst() { pkg_postinst() {

View File

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Foundation # Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# @ECLASS: cmake-multilib.eclass # @ECLASS: cmake-multilib.eclass
@ -19,6 +19,12 @@
# in multilib-minimal, yet they ought to call appropriate cmake-utils # in multilib-minimal, yet they ought to call appropriate cmake-utils
# phase rather than 'default'. # phase rather than 'default'.
# @ECLASS-VARIABLE: CMAKE_ECLASS
# @DESCRIPTION:
# Default is "cmake-utils" for compatibility. Specify "cmake" for ebuilds
# that ported from cmake-utils.eclass to cmake.eclass already.
: ${CMAKE_ECLASS:=cmake-utils}
case ${EAPI:-0} in case ${EAPI:-0} in
[67]) ;; [67]) ;;
*) die "EAPI=${EAPI} is not supported" ;; *) die "EAPI=${EAPI} is not supported" ;;
@ -28,7 +34,15 @@ if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then
die "${ECLASS}: multilib support requires out-of-source builds." die "${ECLASS}: multilib support requires out-of-source builds."
fi fi
inherit cmake-utils multilib-minimal case ${CMAKE_ECLASS} in
cmake-utils|cmake) ;;
*)
eerror "Unknown value for \${CMAKE_ECLASS}"
die "Value ${CMAKE_ECLASS} is not supported"
;;
esac
inherit ${CMAKE_ECLASS} multilib-minimal
EXPORT_FUNCTIONS src_configure src_compile src_test src_install EXPORT_FUNCTIONS src_configure src_compile src_test src_install
@ -39,7 +53,7 @@ cmake-multilib_src_configure() {
} }
multilib_src_configure() { multilib_src_configure() {
cmake-utils_src_configure "${_cmake_args[@]}" ${CMAKE_ECLASS}_src_configure "${_cmake_args[@]}"
} }
cmake-multilib_src_compile() { cmake-multilib_src_compile() {
@ -49,7 +63,7 @@ cmake-multilib_src_compile() {
} }
multilib_src_compile() { multilib_src_compile() {
cmake-utils_src_compile "${_cmake_args[@]}" ${CMAKE_ECLASS}_src_compile "${_cmake_args[@]}"
} }
cmake-multilib_src_test() { cmake-multilib_src_test() {
@ -59,7 +73,7 @@ cmake-multilib_src_test() {
} }
multilib_src_test() { multilib_src_test() {
cmake-utils_src_test "${_cmake_args[@]}" ${CMAKE_ECLASS}_src_test "${_cmake_args[@]}"
} }
cmake-multilib_src_install() { cmake-multilib_src_install() {
@ -69,5 +83,5 @@ cmake-multilib_src_install() {
} }
multilib_src_install() { multilib_src_install() {
cmake-utils_src_install "${_cmake_args[@]}" ${CMAKE_ECLASS}_src_install "${_cmake_args[@]}"
} }

View File

@ -1,6 +1 @@
AUX c-ares-1.12.0-remove-tests.patch 422 SHA256 ab4077eb5178836852376a9e252fb8a7ec04cd87d3f33e2c5eed98ec4c53f46f SHA512 53a9c126183c811b1f68c12014e4123d250447925ded472ff1fb6b57d254730206becd4182692ad5958b14ba0b929a2713df6988c0306872b046aa49bd70e743 WHIRLPOOL a57c3593ce256020c1645f4c08540494dc02041d4fd2a44245f8b991dcaa6979a027f23067435bf97ff0dd2790ca85ccdbd5c55c2afb8177a3e75328d837e043 DIST c-ares-1.16.1.tar.gz 1374637 BLAKE2B 0d87538f5d6cac5b6b9c92d6ba5525af0e580e6506bee9270318f0951aaccdc7e135b446381e8150241d367789ccf2f73dbb333d45de4dbb5a87af05483063a8 SHA512 4ac2a5d5c6da74eb1d6155c4eadc7127ab1b53a8d13caec41bd6172db5417a79f3ab022e77ba37d8b13da6893d7ced5fd8baf5cc3950a4154b4de8743ad31471
DIST c-ares-1.12.0.tar.gz 1769879 SHA256 8692f9403cdcdf936130e045c84021665118ee9bfea905d1a76f04d4e6f365fb SHA512 3da0fadb04eccab49b4e6eff3f087a392dd76238d47e74e2ede723883468da688e41f679ee8ca38613fc4f80d3bd7c29e69d3d6c711f988a02fd5d21a3ee1dc6 WHIRLPOOL 69d297213c6ca0988d3b7697d40443dabb3a9b4ceb65c357a3ec99ab2af7c0a7c669f2dc7f75833e0c8a661525ae4003be8109d2d5c1e90887b8349cd63a8d5c
EBUILD c-ares-1.12.0.ebuild 986 SHA256 2725d4ec42c996022c271e754227f25670c32f2a624f70816ebf0acf7e0f6d2a SHA512 fdfe7dd083436b6cf15c2f917b68ad59305b64ff3ddd31e15971464bc7d3765834e737547190d6fa346e338d4ec7c7c074ddf8bc60bc30ad85fceeb7000c85ff WHIRLPOOL e9429a6902224190e4625daae4a8219a131b6c7852d6abb709a96d6eb57d069603cd02ba5f902328403e703f912aa4d589fc7f0d35e0e71b0dcc9d5b509d06be
MISC ChangeLog 3989 SHA256 31e9cad0d76094a8814d9e5f61b309b400e87b5de2a8e0247817693ec34de483 SHA512 2b83637abea52a8430782237c94ea4511d40f86a2504b2566523428cd04af62c8b86a9b27074fea284a43e452ab5930ff3fb545c5802b47d3f2c202c84a00f11 WHIRLPOOL 3f0ba4398e524a18d5caf0b26ae9a47891d371217589b98ee0bf7d3f186fd6ee19789414accffdf26a7c01674819024bc9655d1cfd78cf30e699fb8f57c681b2
MISC ChangeLog-2015 11969 SHA256 77a8f577b7ca209f0d0429a43160dfb7988945f6ceecee890b2a429b8dab4cf5 SHA512 6a85f9ae18a01ed89798c9dce6f9987ddd6454c7db494dc03887b38bff4674f947758db2e8398de66524fc57e22c15ba334eb746dc75f30f2672d3740ab1f68e WHIRLPOOL e0ef12f777960e9ff4e90422d85817e30f2aae96e887efe48ca24fcf216c14bbc018051de8d24490b29b63d5129057f045a4dfc8088c21b1e60a3e685717541f
MISC metadata.xml 339 SHA256 a3a4b7b1a0723a569944e0f764d4edd189a583120b823eb45229eb1e12585de8 SHA512 fb726c9af8f3b9b104f13f5d7f8c1d38659848afdd619fe8c9242e8d2dea24c21a2654baca4bac96a94cadf68a0f649c87346f296e6b5d2aa5d88a4276c41755 WHIRLPOOL 7e4a278b85ab4add27eea80d409cb4f3a66de654bb5a4dbbd0a4e5f9e520ba5aa6261a435086f703b19d25e37bda0849f81e0d2f29baba327cff08be5494aa4d

View File

@ -1,17 +1,16 @@
# Copyright 1999-2017 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6 EAPI=7
inherit autotools eutils multilib-minimal inherit autotools eutils multilib-minimal
DESCRIPTION="C library that resolves names asynchronously" DESCRIPTION="C library that resolves names asynchronously"
HOMEPAGE="http://c-ares.haxx.se/" HOMEPAGE="https://c-ares.haxx.se/"
SRC_URI="http://${PN}.haxx.se/download/${P}.tar.gz" SRC_URI="https://${PN}.haxx.se/download/${P}.tar.gz"
LICENSE="MIT" LICENSE="MIT"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris"
IUSE="static-libs" IUSE="static-libs"
# Subslot = SONAME of libcares.so.2 # Subslot = SONAME of libcares.so.2
@ -24,7 +23,7 @@ MULTILIB_WRAPPED_HEADERS=(
) )
src_prepare() { src_prepare() {
eapply "${FILESDIR}"/${P}-remove-tests.patch eapply "${FILESDIR}"/${PN}-1.12.0-remove-tests.patch
eapply_user eapply_user
eautoreconf eautoreconf
} }
@ -39,5 +38,5 @@ multilib_src_configure() {
multilib_src_install_all() { multilib_src_install_all() {
einstalldocs einstalldocs
prune_libtool_files --all find "${ED}" -name "*.la" -delete || die
} }

View File

@ -1,3 +1,3 @@
DIST cryptsetup-1.7.5.tar.xz 1232696 BLAKE2B 1bd62b186564e0b902480d66f623074f8d2f06ea09f11788566e33d58f7d0dc8c79d5827e5966e1a20a5597c2cbdec76da49c8f54c0538a1ac3f869d8ef55456 SHA512 d473f7b06d705a3868a70f3767fafc664436b5897ba59025ea1268f815cb80a9076841ff9ff96cc130fb83ba18b03c1eee38cfaf1b471fdd883a3e126b771439 DIST cryptsetup-2.3.2.tar.xz 11037076 BLAKE2B b0f8a1a274e6b95b12aa7172dbdd41e512aea2c87a98d62b8b4d4cbb898b2d4b82e250368e385c4d4acc8e77046ea4b4f7be730750587569572c4b9490815bc1 SHA512 c5eb41751ca64ff906187f40805705570c261816b014dfcdbf2777f42e53668e32966197092a2235b8f6a7a4e7f9c3f301d82f17c45cfbcff96b9818631d7e5f
DIST cryptsetup-2.0.2.tar.xz 10122404 BLAKE2B ac2391cdef387c403a8477467fb8fa36850d38ad3759639326f10ecd2b475bbd3df63162aafa1886e389a5a6b4ff1f94c2906e31538501d3be36267fbee12f6a SHA512 1c37b81b1dcb1223293b30ddc7096e074d01e2dd978b543fbda7ae11ecc29c1c461d12e4b22288bb382a188e9e679bf1ad3e281e77428374b7c605c8902c1b17 DIST cryptsetup-2.3.3.tar.xz 11104768 BLAKE2B 54aa6f087c5366e843c1f9b649fd77ec8be8c4e65c783a2a84a036b4ef460c9d070bdd8aff72f87a7a3136f13581e84534940b435f0b49eb1951d1a755cab47a SHA512 d613efb80e003364a21832da3fefe3891d36a891119cc0efa970aad40ba135dfcd42b32a0c19c31ad879d4eddf27864beccbea1d4b31a47a4e075bc0f756365c
DIST cryptsetup-2.0.3.tar.xz 10125548 BLAKE2B 871df4c248151394f5abc907209b6df636049e5a1ff72161af091d36963ef68adee14e5e1867d779c9419e489aa9bea7562608b239a8fe361b769f0cc14daaf0 SHA512 f5ac54aa9614b234f2d1e84758a98914d283b669f4ab5cbe0ed7cdf25ce77f2d1abdf1e5b5010d803971f0e29120954110ee4fcc538137b04fbdc13b7804385e DIST cryptsetup-2.3.4.tar.xz 11114004 BLAKE2B 680e6eeb594737aeb8330b0ac8638e94941bdcc56fc3441b6f1bc4f3d209d768096e23a7f840dc1012f9e63fae0fdbc0e72d735d89e92a621cec88ea59560f19 SHA512 db0bfd795343e575acb7a80ea2b9d32acf08ac970037e5b158a1e4381976552dc292107ce79e55913f49fcf643d4ea7104ed73de7c1e8d424b83d471d20ab60d

View File

@ -1,26 +1,24 @@
# Copyright 1999-2018 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) inherit autotools linux-info libtool
inherit autotools python-single-r1 linux-info libtool ltprune versionator
DESCRIPTION="Tool to setup encrypted devices with dm-crypt" DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md" HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md"
SRC_URI="mirror://kernel/linux/utils/${PN}/v$(get_version_component_range 1-2)/${P/_/-}.tar.xz" SRC_URI="https://www.kernel.org/pub/linux/utils/${PN}/v$(ver_cut 1-2)/${P/_/-}.tar.xz"
LICENSE="GPL-2+" LICENSE="GPL-2+"
SLOT="0/12" # libcryptsetup.so version SLOT="0/12" # libcryptsetup.so version
[[ ${PV} != *_rc* ]] && \ [[ ${PV} != *_rc* ]] && \
KEYWORDS="~amd64 ~arm64 ~mips ~s390 ~sh ~sparc ~x86" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86"
CRYPTO_BACKENDS="+gcrypt kernel nettle openssl" CRYPTO_BACKENDS="gcrypt kernel nettle +openssl"
# we don't support nss since it doesn't allow cryptsetup to be built statically # we don't support nss since it doesn't allow cryptsetup to be built statically
# and it's missing ripemd160 support so it can't provide full backward compatibility # and it's missing ripemd160 support so it can't provide full backward compatibility
IUSE="${CRYPTO_BACKENDS} +argon2 libressl nls pwquality python reencrypt static static-libs udev urandom" IUSE="${CRYPTO_BACKENDS} +argon2 libressl luks1_default nls pwquality reencrypt static static-libs +udev urandom"
REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} ) REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
python? ( ${PYTHON_REQUIRED_USE} ) libressl? ( openssl )
static? ( !gcrypt )" #496612 static? ( !gcrypt )" #496612
LIB_DEPEND=" LIB_DEPEND="
@ -33,23 +31,35 @@ LIB_DEPEND="
nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] ) nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
openssl? ( openssl? (
!libressl? ( dev-libs/openssl:0=[static-libs(+)] ) !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
libressl? ( dev-libs/libressl:=[static-libs(+)] ) libressl? ( dev-libs/libressl:0=[static-libs(+)] )
) )
pwquality? ( dev-libs/libpwquality[static-libs(+)] ) pwquality? ( dev-libs/libpwquality[static-libs(+)] )
sys-fs/lvm2[static-libs(+)] sys-fs/lvm2[static-libs(+)]
udev? ( virtual/libudev[static-libs(+)] )" udev? ( virtual/libudev[static-libs(-)] )"
# We have to always depend on ${LIB_DEPEND} rather than put behind # We have to always depend on ${LIB_DEPEND} rather than put behind
# !static? () because we provide a shared library which links against # !static? () because we provide a shared library which links against
# these other packages. #414665 # these other packages. #414665
RDEPEND="static-libs? ( ${LIB_DEPEND} ) RDEPEND="static-libs? ( ${LIB_DEPEND} )
${LIB_DEPEND//\[static-libs\(+\)\]} ${LIB_DEPEND//\[static-libs\([+-]\)\]}"
python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND} DEPEND="${RDEPEND}
virtual/pkgconfig
static? ( ${LIB_DEPEND} )" static? ( ${LIB_DEPEND} )"
BDEPEND="
virtual/pkgconfig
"
S="${WORKDIR}/${P/_/-}" S="${WORKDIR}/${P/_/-}"
PATCHES=( "${FILESDIR}"/${PN}-2.0.4-fix-static-pwquality-build.patch )
pkg_pretend() {
if ! use luks1_default ; then
ewarn "WARNING! WARNING! WARNING!"
ewarn "You have chosen LUKS2 as your default format."
ewarn "This can break LUKS1 backwards compatibility."
ewarn "Enable \"luks1_default\" USE flag if you need backwards compatibility."
fi
}
pkg_setup() { pkg_setup() {
local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256" local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256"
local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n" local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
@ -72,22 +82,17 @@ src_configure() {
ewarn "userspace crypto libraries." ewarn "userspace crypto libraries."
fi fi
use python && python_setup
# We disable autotool python integration so we can use eclasses
# for proper integration with multiple python versions.
local myeconfargs=( local myeconfargs=(
--disable-internal-argon2 --disable-internal-argon2
--enable-shared --enable-shared
--sbindir=/sbin --sbindir=/sbin
# for later use # for later use
# --with-default-luks-format=LUKS2 --with-default-luks-format=LUKS$(usex luks1_default 1 2)
--with-tmpfilesdir="${EPREFIX%/}/usr/lib/tmpfiles.d" --with-tmpfilesdir="${EPREFIX}/usr/lib/tmpfiles.d"
--with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done) --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done)
$(use_enable argon2 libargon2) $(use_enable argon2 libargon2)
$(use_enable nls) $(use_enable nls)
$(use_enable pwquality) $(use_enable pwquality)
$(use_enable python)
$(use_enable reencrypt cryptsetup-reencrypt) $(use_enable reencrypt cryptsetup-reencrypt)
$(use_enable static static-cryptsetup) $(use_enable static static-cryptsetup)
$(use_enable static-libs static) $(use_enable static-libs static)
@ -115,11 +120,13 @@ src_install() {
default default
if use static ; then if use static ; then
mv "${ED%}"/sbin/cryptsetup{.static,} || die mv "${ED}"/sbin/cryptsetup{.static,} || die
mv "${ED%}"/sbin/veritysetup{.static,} || die mv "${ED}"/sbin/veritysetup{.static,} || die
use reencrypt && { mv "${ED%}"/sbin/cryptsetup-reencrypt{.static,} || die ; } if use reencrypt ; then
mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die
fi
fi fi
prune_libtool_files --modules find "${ED}" -type f -name "*.la" -delete || die
dodoc docs/v*ReleaseNotes dodoc docs/v*ReleaseNotes

View File

@ -1,51 +1,64 @@
# Copyright 1999-2018 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=5 EAPI=7
DISTUTILS_OPTIONAL=1 inherit autotools linux-info libtool
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
inherit autotools distutils-r1 linux-info libtool eutils versionator
DESCRIPTION="Tool to setup encrypted devices with dm-crypt" DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md" HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md"
SRC_URI="mirror://kernel/linux/utils/${PN}/v$(get_version_component_range 1-2)/${P}.tar.xz" SRC_URI="https://www.kernel.org/pub/linux/utils/${PN}/v$(ver_cut 1-2)/${P/_/-}.tar.xz"
LICENSE="GPL-2+" LICENSE="GPL-2+"
SLOT="0" SLOT="0/12" # libcryptsetup.so version
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86" [[ ${PV} != *_rc* ]] && \
CRYPTO_BACKENDS="+gcrypt kernel nettle openssl" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
CRYPTO_BACKENDS="gcrypt kernel nettle +openssl"
# we don't support nss since it doesn't allow cryptsetup to be built statically # we don't support nss since it doesn't allow cryptsetup to be built statically
# and it's missing ripemd160 support so it can't provide full backward compatibility # and it's missing ripemd160 support so it can't provide full backward compatibility
IUSE="${CRYPTO_BACKENDS} libressl nls pwquality python reencrypt static static-libs udev urandom" IUSE="${CRYPTO_BACKENDS} +argon2 libressl luks1_default nls pwquality reencrypt static static-libs +udev urandom"
REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} ) REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
python? ( ${PYTHON_REQUIRED_USE} ) libressl? ( openssl )
static? ( !gcrypt )" #496612 static? ( !gcrypt )" #496612
LIB_DEPEND="dev-libs/libgpg-error[static-libs(+)] LIB_DEPEND="
dev-libs/json-c:=[static-libs(+)]
dev-libs/libgpg-error[static-libs(+)]
dev-libs/popt[static-libs(+)] dev-libs/popt[static-libs(+)]
sys-apps/util-linux[static-libs(+)] >=sys-apps/util-linux-2.31-r1[static-libs(+)]
argon2? ( app-crypt/argon2:=[static-libs(+)] )
gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] ) gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] ) nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
openssl? ( openssl? (
!libressl? ( dev-libs/openssl:0=[static-libs(+)] ) !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
libressl? ( dev-libs/libressl:=[static-libs(+)] ) libressl? ( dev-libs/libressl:0=[static-libs(+)] )
) )
pwquality? ( dev-libs/libpwquality[static-libs(+)] ) pwquality? ( dev-libs/libpwquality[static-libs(+)] )
sys-fs/lvm2[static-libs(+)] sys-fs/lvm2[static-libs(+)]
udev? ( virtual/libudev[static-libs(+)] )" udev? ( virtual/libudev[static-libs(-)] )"
# We have to always depend on ${LIB_DEPEND} rather than put behind # We have to always depend on ${LIB_DEPEND} rather than put behind
# !static? () because we provide a shared library which links against # !static? () because we provide a shared library which links against
# these other packages. #414665 # these other packages. #414665
RDEPEND="static-libs? ( ${LIB_DEPEND} ) RDEPEND="static-libs? ( ${LIB_DEPEND} )
${LIB_DEPEND//\[static-libs\(+\)\]} ${LIB_DEPEND//\[static-libs\([+-]\)\]}"
python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND} DEPEND="${RDEPEND}
virtual/pkgconfig
static? ( ${LIB_DEPEND} )" static? ( ${LIB_DEPEND} )"
BDEPEND="
virtual/pkgconfig
"
#PATCHES=( ) S="${WORKDIR}/${P/_/-}"
PATCHES=( "${FILESDIR}"/${PN}-2.0.4-fix-static-pwquality-build.patch )
pkg_pretend() {
if ! use luks1_default ; then
ewarn "WARNING! WARNING! WARNING!"
ewarn "You have chosen LUKS2 as your default format."
ewarn "This can break LUKS1 backwards compatibility."
ewarn "Enable \"luks1_default\" USE flag if you need backwards compatibility."
fi
}
pkg_setup() { pkg_setup() {
local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256" local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256"
@ -58,14 +71,8 @@ pkg_setup() {
src_prepare() { src_prepare() {
sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die
#epatch "${PATCHES[@]}" default
epatch_user && eautoreconf eautoreconf
if use python ; then
cd python
cp "${FILESDIR}"/setup-1.7.0.py setup.py || die
distutils-r1_src_prepare
fi
} }
src_configure() { src_configure() {
@ -75,27 +82,24 @@ src_configure() {
ewarn "userspace crypto libraries." ewarn "userspace crypto libraries."
fi fi
# We disable autotool python integration so we can use eclasses local myeconfargs=(
# for proper integration with multiple python versions. --disable-internal-argon2
econf \ --enable-shared
--sbindir=/sbin \ --sbindir=/sbin
--enable-shared \ # for later use
--disable-python \ --with-default-luks-format=LUKS$(usex luks1_default 1 2)
$(use_enable static static-cryptsetup) \ --with-tmpfilesdir="${EPREFIX}/usr/lib/tmpfiles.d"
$(use_enable static-libs static) \
$(use_enable nls) \
$(use_enable pwquality) \
$(use_enable reencrypt cryptsetup-reencrypt) \
$(use_enable udev) \
$(use_enable !urandom dev-random) \
--with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done) --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done)
$(use_enable argon2 libargon2)
use python && cd python && distutils-r1_src_configure $(use_enable nls)
} $(use_enable pwquality)
$(use_enable reencrypt cryptsetup-reencrypt)
src_compile() { $(use_enable static static-cryptsetup)
default $(use_enable static-libs static)
use python && cd python && distutils-r1_src_compile $(use_enable udev)
$(use_enable !urandom dev-random)
)
econf "${myeconfargs[@]}"
} }
src_test() { src_test() {
@ -103,24 +107,29 @@ src_test() {
ewarn "No /dev/mapper/control found -- skipping tests" ewarn "No /dev/mapper/control found -- skipping tests"
return 0 return 0
fi fi
local p local p
for p in /dev/mapper /dev/loop* ; do for p in /dev/mapper /dev/loop* ; do
addwrite ${p} addwrite ${p}
done done
default default
} }
src_install() { src_install() {
default default
if use static ; then if use static ; then
mv "${ED}"/sbin/cryptsetup{.static,} || die mv "${ED}"/sbin/cryptsetup{.static,} || die
mv "${ED}"/sbin/veritysetup{.static,} || die mv "${ED}"/sbin/veritysetup{.static,} || die
use reencrypt && { mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die ; } if use reencrypt ; then
mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die
fi
fi fi
prune_libtool_files --modules find "${ED}" -type f -name "*.la" -delete || die
dodoc docs/v*ReleaseNotes
newconfd "${FILESDIR}"/1.6.7-dmcrypt.confd dmcrypt newconfd "${FILESDIR}"/1.6.7-dmcrypt.confd dmcrypt
newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt
use python && cd python && distutils-r1_src_install
} }

View File

@ -1,26 +1,24 @@
# Copyright 1999-2018 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) inherit autotools linux-info libtool
inherit autotools python-single-r1 linux-info libtool ltprune versionator
DESCRIPTION="Tool to setup encrypted devices with dm-crypt" DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md" HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md"
SRC_URI="mirror://kernel/linux/utils/${PN}/v$(get_version_component_range 1-2)/${P/_/-}.tar.xz" SRC_URI="https://www.kernel.org/pub/linux/utils/${PN}/v$(ver_cut 1-2)/${P/_/-}.tar.xz"
LICENSE="GPL-2+" LICENSE="GPL-2+"
SLOT="0/12" # libcryptsetup.so version SLOT="0/12" # libcryptsetup.so version
[[ ${PV} != *_rc* ]] && \ [[ ${PV} != *_rc* ]] && \
KEYWORDS="~amd64 ~arm64 ~mips ~s390 ~sh ~sparc ~x86" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
CRYPTO_BACKENDS="+gcrypt kernel nettle openssl" CRYPTO_BACKENDS="gcrypt kernel nettle +openssl"
# we don't support nss since it doesn't allow cryptsetup to be built statically # we don't support nss since it doesn't allow cryptsetup to be built statically
# and it's missing ripemd160 support so it can't provide full backward compatibility # and it's missing ripemd160 support so it can't provide full backward compatibility
IUSE="${CRYPTO_BACKENDS} +argon2 libressl nls pwquality python reencrypt static static-libs udev urandom" IUSE="${CRYPTO_BACKENDS} +argon2 libressl nls pwquality reencrypt static static-libs +udev urandom"
REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} ) REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
python? ( ${PYTHON_REQUIRED_USE} ) libressl? ( openssl )
static? ( !gcrypt )" #496612 static? ( !gcrypt )" #496612
LIB_DEPEND=" LIB_DEPEND="
@ -33,23 +31,26 @@ LIB_DEPEND="
nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] ) nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
openssl? ( openssl? (
!libressl? ( dev-libs/openssl:0=[static-libs(+)] ) !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
libressl? ( dev-libs/libressl:=[static-libs(+)] ) libressl? ( dev-libs/libressl:0=[static-libs(+)] )
) )
pwquality? ( dev-libs/libpwquality[static-libs(+)] ) pwquality? ( dev-libs/libpwquality[static-libs(+)] )
sys-fs/lvm2[static-libs(+)] sys-fs/lvm2[static-libs(+)]
udev? ( virtual/libudev[static-libs(+)] )" udev? ( virtual/libudev[static-libs(-)] )"
# We have to always depend on ${LIB_DEPEND} rather than put behind # We have to always depend on ${LIB_DEPEND} rather than put behind
# !static? () because we provide a shared library which links against # !static? () because we provide a shared library which links against
# these other packages. #414665 # these other packages. #414665
RDEPEND="static-libs? ( ${LIB_DEPEND} ) RDEPEND="static-libs? ( ${LIB_DEPEND} )
${LIB_DEPEND//\[static-libs\(+\)\]} ${LIB_DEPEND//\[static-libs\([+-]\)\]}"
python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND} DEPEND="${RDEPEND}
virtual/pkgconfig
static? ( ${LIB_DEPEND} )" static? ( ${LIB_DEPEND} )"
BDEPEND="
virtual/pkgconfig
"
S="${WORKDIR}/${P/_/-}" S="${WORKDIR}/${P/_/-}"
PATCHES=( "${FILESDIR}"/${PN}-2.0.4-fix-static-pwquality-build.patch )
pkg_setup() { pkg_setup() {
local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256" local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256"
local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n" local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
@ -72,20 +73,17 @@ src_configure() {
ewarn "userspace crypto libraries." ewarn "userspace crypto libraries."
fi fi
use python && python_setup
# We disable autotool python integration so we can use eclasses
# for proper integration with multiple python versions.
local myeconfargs=( local myeconfargs=(
--disable-internal-argon2 --disable-internal-argon2
--enable-shared --enable-shared
--sbindir=/sbin --sbindir=/sbin
--with-tmpfilesdir="${EPREFIX%/}/usr/lib/tmpfiles.d" # for later use
--with-default-luks-format=LUKS2
--with-tmpfilesdir="${EPREFIX}/usr/lib/tmpfiles.d"
--with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done) --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done)
$(use_enable argon2 libargon2) $(use_enable argon2 libargon2)
$(use_enable nls) $(use_enable nls)
$(use_enable pwquality) $(use_enable pwquality)
$(use_enable python)
$(use_enable reencrypt cryptsetup-reencrypt) $(use_enable reencrypt cryptsetup-reencrypt)
$(use_enable static static-cryptsetup) $(use_enable static static-cryptsetup)
$(use_enable static-libs static) $(use_enable static-libs static)
@ -113,11 +111,13 @@ src_install() {
default default
if use static ; then if use static ; then
mv "${ED%}"/sbin/cryptsetup{.static,} || die mv "${ED}"/sbin/cryptsetup{.static,} || die
mv "${ED%}"/sbin/veritysetup{.static,} || die mv "${ED}"/sbin/veritysetup{.static,} || die
use reencrypt && { mv "${ED%}"/sbin/cryptsetup-reencrypt{.static,} || die ; } if use reencrypt ; then
mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die
fi
fi fi
prune_libtool_files --modules find "${ED}" -type f -name "*.la" -delete || die
dodoc docs/v*ReleaseNotes dodoc docs/v*ReleaseNotes

View File

@ -0,0 +1,18 @@
--- a/src/Makemodule.am 2018-07-31 14:32:46.000000000 +0200
+++ b/src/Makemodule.am 2018-08-12 17:13:26.000000000 +0200
@@ -64,6 +64,7 @@
$(veritysetup_LDADD) \
@CRYPTO_STATIC_LIBS@ \
@DEVMAPPER_STATIC_LIBS@ \
+ @PWQUALITY_STATIC_LIBS@ \
@UUID_LIBS@
endif
endif
@@ -93,6 +94,7 @@
$(integritysetup_LDADD) \
@CRYPTO_STATIC_LIBS@ \
@DEVMAPPER_STATIC_LIBS@ \
+ @PWQUALITY_STATIC_LIBS@ \
@UUID_LIBS@
endif
endif

View File

@ -1,21 +0,0 @@
import os
from distutils.core import setup, Extension
top_srcdir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
def get_ver():
with open(os.path.join(top_srcdir, 'configure')) as f:
for line in f:
if line.startswith('PACKAGE_VERSION='):
return line.split('=')[1].replace("'", '').strip()
module = Extension('pycryptsetup',
include_dirs=[os.path.join(top_srcdir, 'lib')],
extra_compile_args=['-include', os.path.join(top_srcdir, 'config.h')],
library_dirs=[os.path.join(top_srcdir, 'lib', '.libs')],
libraries=['cryptsetup'],
sources=['pycryptsetup.c'])
setup(name='pycryptsetup',
version=get_ver(),
ext_modules=[module])

View File

@ -9,6 +9,7 @@
<flag name="argon2">Enable password hashing algorithm from <pkg>app-crypt/argon2</pkg></flag> <flag name="argon2">Enable password hashing algorithm from <pkg>app-crypt/argon2</pkg></flag>
<flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> crypto backend</flag> <flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> crypto backend</flag>
<flag name="kernel">Use kernel crypto backend (mainly for embedded systems)</flag> <flag name="kernel">Use kernel crypto backend (mainly for embedded systems)</flag>
<flag name="luks1_default">Default to LUKS1 on disk encryption format rather than new LUKS2</flag>
<flag name="nettle">Use <pkg>dev-libs/nettle</pkg> crypto backend</flag> <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> crypto backend</flag>
<flag name="openssl">Use <pkg>dev-libs/openssl</pkg> crypto backend</flag> <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> crypto backend</flag>
<flag name="pwquality">Use <pkg>dev-libs/libpwquality</pkg> for password quality checking</flag> <flag name="pwquality">Use <pkg>dev-libs/libpwquality</pkg> for password quality checking</flag>