forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-pda/libplist: Version bump to 2.1.0, EAPI 7
emake -j1 is no longer required since the project switched back to Autotools from CMake. The subslot doesn't need to be 3.1.0 or similar as the SONAME is only libplist.so.3. Perhaps this was different under CMake. Python 3.8 was added to 2.0.0 but didn't build. It just works without additional fixes in this version. src_test has been added. Package-Manager: Portage-2.3.94, Repoman-2.3.20 Signed-off-by: James Le Cuirot <[email protected]>
- Loading branch information
Showing
2 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST libplist-2.0.0.tar.bz2 421405 BLAKE2B 2f6e22c871ad3b5ace2a2c6aab09706e8a8c1759f1656c5c07164e5b89a1b5eae24d2d7472e0dcca7eddd96b641715acfe5a0a791b0b994ec5fbcdf70627acf9 SHA512 81508bf6773483528816725c3b5b868563b84fd7810999404072e5ea9efa7fc9f11ef997f32208e4421aa26b15edd0c65f87c67c1472e8c4e356f1e9fe7740ee | ||
DIST libplist-2.1.0.tar.bz2 120602 BLAKE2B 8abfe3c295c4ebd242f2c4d49c80d1f214097df84f1d2fcf2696519bbbca4e8a5ce13c04690ac64fd981f84d585df25fc65c268a4e4f4092319053583e67736c SHA512 23156e882835bb0b894a05b57018b5e76f9f8f8f4b1d3fdad7b1970d2ef695033c98de74a1fa81bdf0829742a058fd65075cebc1512313d2be42e2f5367274be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Copyright 1999-2020 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
PYTHON_COMPAT=( python3_{6,7,8} ) | ||
inherit autotools python-r1 | ||
|
||
DESCRIPTION="Support library to deal with Apple Property Lists (Binary & XML)" | ||
HOMEPAGE="https://www.libimobiledevice.org/" | ||
SRC_URI="https://cgit.libimobiledevice.org/${PN}.git/snapshot/${P}.tar.bz2" | ||
|
||
LICENSE="GPL-2 LGPL-2.1" | ||
SLOT="0/3" | ||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" | ||
IUSE="python static-libs" | ||
|
||
RDEPEND="python? ( ${PYTHON_DEPS} )" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND=" | ||
virtual/pkgconfig | ||
python? ( >=dev-python/cython-0.17[${PYTHON_USEDEP}] ) | ||
" | ||
|
||
REQUIRED_USE="${PYTHON_REQUIRED_USE}" | ||
|
||
DOCS=( AUTHORS NEWS README.md ) | ||
|
||
BUILD_DIR="${S}_build" | ||
|
||
src_prepare() { | ||
default | ||
eautoreconf | ||
} | ||
|
||
src_configure() { | ||
local ECONF_SOURCE=${S} | ||
local myeconfargs=( $(use_enable static-libs static) ) | ||
|
||
do_configure() { | ||
mkdir -p "${BUILD_DIR}" || die | ||
pushd "${BUILD_DIR}" >/dev/null || die | ||
econf "${myeconfargs[@]}" "${@}" | ||
popd >/dev/null || die | ||
} | ||
|
||
do_configure_python() { | ||
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 -j1 \ | ||
VPATH="${S}/cython:${native_builddir}/cython" \ | ||
plist_la_LIBADD="${native_builddir}/src/libplist.la" | ||
} | ||
|
||
local native_builddir=${BUILD_DIR} | ||
pushd "${BUILD_DIR}" >/dev/null || die | ||
emake | ||
use python && python_foreach_impl python_compile | ||
popd >/dev/null || die | ||
} | ||
|
||
src_test() { | ||
emake -C "${BUILD_DIR}" check | ||
} | ||
|
||
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 DESTDIR="${D}" install | ||
use python && python_foreach_impl python_install | ||
popd >/dev/null || die | ||
|
||
einstalldocs | ||
|
||
if use python ; then | ||
insinto /usr/include/plist/cython | ||
doins cython/plist.pxd | ||
fi | ||
|
||
find "${D}" -name '*.la' -delete || die | ||
} |