aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Retornaz <gentoo@retornaz.com>2021-01-17 18:25:45 +0100
committerQuentin Retornaz <gentoo@retornaz.com>2021-01-26 01:21:40 +0100
commit53aa284796eb7c34a869596d033c2e3a7c6f8e50 (patch)
tree0c0175a9597f1d8b96806b340f9189128d5f1873 /app-pda
parentapp-crypt/trousers: new package (diff)
downloadlibressl-53aa284796eb7c34a869596d033c2e3a7c6f8e50.tar.gz
libressl-53aa284796eb7c34a869596d033c2e3a7c6f8e50.tar.bz2
libressl-53aa284796eb7c34a869596d033c2e3a7c6f8e50.zip
app-pda/libimobiledevice: new package
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Quentin Retornaz <gentoo@retornaz.com>
Diffstat (limited to 'app-pda')
-rw-r--r--app-pda/libimobiledevice/Manifest1
-rw-r--r--app-pda/libimobiledevice/files/libimobiledevice-1.3.0-libressl.patch25
-rw-r--r--app-pda/libimobiledevice/libimobiledevice-1.3.0-r1.ebuild111
-rw-r--r--app-pda/libimobiledevice/metadata.xml5
4 files changed, 142 insertions, 0 deletions
diff --git a/app-pda/libimobiledevice/Manifest b/app-pda/libimobiledevice/Manifest
new file mode 100644
index 0000000..1a1995a
--- /dev/null
+++ b/app-pda/libimobiledevice/Manifest
@@ -0,0 +1 @@
+DIST libimobiledevice-1.3.0.tar.bz2 733949 BLAKE2B 40717280bb3424c7431aa93d06d10de817e6761acf2b19948d80b691cfb4dd4ef0e31b81c8458eed29a43c8c8aa256da7baa3648fb785cfbdb7316daaba119a3 SHA512 7b22040552a6561729c79c0846f571b0e608abb7c297567d2ecfdd1718ce86df08a5e34ba51f209bdee96a1917da15e7ba3aaef1d289a951d1d3470b1f89e6a8
diff --git a/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-libressl.patch b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-libressl.patch
new file mode 100644
index 0000000..0957c91
--- /dev/null
+++ b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-libressl.patch
@@ -0,0 +1,25 @@
+From 170e1c445e8c930f4ee9dddfb9f1bcf24c089962 Mon Sep 17 00:00:00 2001
+From: Nikias Bassen <nikias@gmx.li>
+Date: Thu, 6 Aug 2020 20:43:08 +0200
+Subject: [PATCH] idevice: Fix build with LibreSSL
+
+Upstream-Status: Accepted
+[https://github.com/libimobiledevice/libimobiledevice/commit/170e1c445e8c930f4ee9dddfb9f1bcf24c089962]
+Signed-off-by: Stefan Strogin <steils@gentoo.org>
+---
+ src/idevice.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/idevice.c b/src/idevice.c
+index fea1e03f..47c9ab4d 100644
+--- a/src/idevice.c
++++ b/src/idevice.c
+@@ -1015,7 +1015,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne
+ return ret;
+ }
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ SSL_CTX_set_security_level(ssl_ctx, 0);
+ #endif
+
diff --git a/app-pda/libimobiledevice/libimobiledevice-1.3.0-r1.ebuild b/app-pda/libimobiledevice/libimobiledevice-1.3.0-r1.ebuild
new file mode 100644
index 0000000..9135822
--- /dev/null
+++ b/app-pda/libimobiledevice/libimobiledevice-1.3.0-r1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit autotools python-r1
+
+DESCRIPTION="Support library to communicate with Apple iPhone/iPod Touch devices"
+HOMEPAGE="https://www.libimobiledevice.org/"
+SRC_URI="https://github.com/libimobiledevice/libimobiledevice/releases/download/${PV}/${P}.tar.bz2"
+
+# While COPYING* doesn't mention 'or any later version', all the headers do, hence use +
+LICENSE="GPL-2+ LGPL-2.1+"
+
+SLOT="0/1.0-6" # based on SONAME of libimobiledevice-1.0.so
+
+KEYWORDS="amd64 ~arm ~arm64 ppc ~ppc64 x86"
+IUSE="doc gnutls libressl python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ >=app-pda/libplist-2.2.0:=
+ >=app-pda/libusbmuxd-2.0.2:=
+ gnutls? (
+ dev-libs/libgcrypt:0
+ >=dev-libs/libtasn1-1.1
+ >=net-libs/gnutls-2.2.0 )
+ !gnutls? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= ) )
+ python? (
+ ${PYTHON_DEPS}
+ app-pda/libplist[python(-),${PYTHON_USEDEP}] )
+"
+
+DEPEND="
+ ${RDEPEND}
+"
+
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ python? ( >=dev-python/cython-0.17[${PYTHON_USEDEP}] )
+"
+
+BUILD_DIR="${S}_build"
+
+PATCHES=( "${FILESDIR}"/${P}-libressl.patch )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local ECONF_SOURCE=${S}
+
+ local myeconfargs=( $(use_enable static-libs static) )
+ use gnutls && myeconfargs+=( --disable-openssl )
+
+ do_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" >/dev/null || die
+ econf "${myeconfargs[@]}" "${@}"
+ popd >/dev/null || die
+ }
+
+ do_configure_python() {
+ # Bug 567916
+ local -x PYTHON_LDFLAGS="$(python_get_LIBS)"
+ do_configure "$@"
+ }
+
+ do_configure --without-cython
+ use python && python_foreach_impl do_configure_python
+}
+
+src_compile() {
+ python_compile() {
+ emake -C "${BUILD_DIR}"/cython \
+ VPATH="${S}/cython:$1/cython" \
+ imobiledevice_la_LIBADD="$1/src/libimobiledevice-1.0.la"
+ }
+
+ emake -C "${BUILD_DIR}"
+ use python && python_foreach_impl python_compile "${BUILD_DIR}"
+
+ if use doc; then
+ doxygen "${BUILD_DIR}"/doxygen.cfg || die
+ fi
+}
+
+src_install() {
+ python_install() {
+ emake -C "${BUILD_DIR}/cython" install \
+ DESTDIR="${D}" \
+ VPATH="${S}/cython:$1/cython"
+ }
+
+ emake -C "${BUILD_DIR}" install DESTDIR="${D}"
+ use python && python_foreach_impl python_install "${BUILD_DIR}"
+ use doc && dodoc docs/html/*
+
+ if use python; then
+ insinto /usr/include/${PN}/cython
+ doins cython/imobiledevice.pxd
+ fi
+
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/app-pda/libimobiledevice/metadata.xml b/app-pda/libimobiledevice/metadata.xml
new file mode 100644
index 0000000..6f49eba
--- /dev/null
+++ b/app-pda/libimobiledevice/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>