Skip to content

Commit

Permalink
app-pda/libimobiledevice: version bump, fix multi-python builds
Browse files Browse the repository at this point in the history
Reworked the ebuild so that it will properly build for multiple python
implementations.  Committed 1.1.6-r1 for immediate stablereq, and bumped to latest
upstream 1.2.0

Package-Manager: portage-2.2.24
  • Loading branch information
axs-gentoo committed Dec 21, 2015
1 parent 4826b78 commit f96eceb
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-pda/libimobiledevice/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST libimobiledevice-1.1.6.tar.bz2 619429 SHA256 1fcd56489a27181617507b1d8aaf122f66d9860c0fe5af4c78f9e0ed129e33e0 SHA512 ffc741eba65e73890ff50c906520b02189169ca92e95bcd3c8805caa1b1b44e4b1eaddad438c10fdbc112a867cdcfbe6a3dd667be1c639ad5a72ce621ee41a4f WHIRLPOOL 412c6f7523cd17178f639f7c3a8baa89857eff9c85d5e009bcb991591ca1304b6e4f80c2644289105831ee74d8848bee24708b598853a9444f4188a6731b9aa7
DIST libimobiledevice-1.2.0.tar.bz2 631495 SHA256 786b0de0875053bf61b5531a86ae8119e320edab724fc62fe2150cc931f11037 SHA512 0de5f768aeb5d62445892855d84ceaff776f6667733c351ed6c34bf9d500802762d1a06e5efdf57f33cafc9ee788041cd9b6748fb9bad6c2e4ae2f9b9aa93589 WHIRLPOOL ca0d709fcc844811fa19b1b149afd81c15f75c213384789b1bc1a4ec838f12ffa33c6f78753befd4eae81156cb1c002d24e7ddc50a59f374164c33ddfd37ddb6
91 changes: 91 additions & 0 deletions app-pda/libimobiledevice/libimobiledevice-1.1.6-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
inherit eutils python-r1

DESCRIPTION="Support library to communicate with Apple iPhone/iPod Touch devices"
HOMEPAGE="http://www.libimobiledevice.org/"
SRC_URI="http://www.libimobiledevice.org/downloads/${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/4" # based on SONAME of libimobiledevice.so
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
IUSE="gnutls python static-libs"

RDEPEND=">=app-pda/libplist-1.11:=
>=app-pda/libusbmuxd-1.0.9:=
gnutls? (
dev-libs/libgcrypt:0
>=dev-libs/libtasn1-1.1
>=net-libs/gnutls-2.2.0
)
!gnutls? ( dev-libs/openssl:0 )
python? (
${PYTHON_DEPS}
app-pda/libplist[python(-),${PYTHON_USEDEP}]
)"
DEPEND="${RDEPEND}
virtual/pkgconfig
python? ( >=dev-python/cython-0.17[${PYTHON_USEDEP}] )"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

DOCS=( AUTHORS NEWS README )

BUILD_DIR="${S}_build"

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 --without-cython
use python && python_foreach_impl do_configure
}

src_compile() {
python_compile() {
emake -C "${BUILD_DIR}"/cython -j1 \
VPATH="${S}/cython:${native_builddir}/cython" \
imobiledevice_la_LIBADD="${native_builddir}/src/libimobiledevice.la"
}

local native_builddir=${BUILD_DIR}
pushd "${BUILD_DIR}" >/dev/null || die
emake -j1
use python && python_foreach_impl python_compile
popd >/dev/null || die
}

src_install() {
python_install() {
emake -C "${BUILD_DIR}/cython" -j1 \
VPATH="${S}/cython:${native_builddir}/cython" \
DESTDIR="${D}" install
}

local native_builddir=${BUILD_DIR}
pushd "${BUILD_DIR}" >/dev/null || die
emake -j1 DESTDIR="${D}" install
use python && python_foreach_impl python_install
popd >/dev/null || die

dodoc docs/html/*
if use python; then
insinto /usr/include/${PN}/cython
doins cython/imobiledevice.pxd
fi
prune_libtool_files --all
}
91 changes: 91 additions & 0 deletions app-pda/libimobiledevice/libimobiledevice-1.2.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
inherit eutils python-r1

DESCRIPTION="Support library to communicate with Apple iPhone/iPod Touch devices"
HOMEPAGE="http://www.libimobiledevice.org/"
SRC_URI="http://www.libimobiledevice.org/downloads/${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/6" # based on SONAME of libimobiledevice.so
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
IUSE="gnutls python static-libs"

RDEPEND=">=app-pda/libplist-1.11:=
>=app-pda/libusbmuxd-1.0.9:=
gnutls? (
dev-libs/libgcrypt:0
>=dev-libs/libtasn1-1.1
>=net-libs/gnutls-2.2.0
)
!gnutls? ( dev-libs/openssl:0 )
python? (
${PYTHON_DEPS}
app-pda/libplist[python(-),${PYTHON_USEDEP}]
)"
DEPEND="${RDEPEND}
virtual/pkgconfig
python? ( >=dev-python/cython-0.17[${PYTHON_USEDEP}] )"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

DOCS=( AUTHORS NEWS README )

BUILD_DIR="${S}_build"

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 --without-cython
use python && python_foreach_impl do_configure
}

src_compile() {
python_compile() {
emake -C "${BUILD_DIR}"/cython -j1 \
VPATH="${S}/cython:${native_builddir}/cython" \
imobiledevice_la_LIBADD="${native_builddir}/src/libimobiledevice.la"
}

local native_builddir=${BUILD_DIR}
pushd "${BUILD_DIR}" >/dev/null || die
emake -j1
use python && python_foreach_impl python_compile
popd >/dev/null || die
}

src_install() {
python_install() {
emake -C "${BUILD_DIR}/cython" -j1 \
VPATH="${S}/cython:${native_builddir}/cython" \
DESTDIR="${D}" install
}

local native_builddir=${BUILD_DIR}
pushd "${BUILD_DIR}" >/dev/null || die
emake -j1 DESTDIR="${D}" install
use python && python_foreach_impl python_install
popd >/dev/null || die

dodoc docs/html/*
if use python; then
insinto /usr/include/${PN}/cython
doins cython/imobiledevice.pxd
fi
prune_libtool_files --all
}

0 comments on commit f96eceb

Please sign in to comment.