summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina <zerochaos@gentoo.org>2023-08-20 22:29:32 -0400
committerRick Farina <zerochaos@gentoo.org>2023-08-20 22:30:01 -0400
commit75894d1abcd0831ce64c829adf39d4788877d044 (patch)
tree9f7de43c59d6859fbc2ff2abfc375acd0c2b31aa /net-libs
parentapp-admin/eclean-kernel: Bump to 2.99.6 (diff)
downloadgentoo-75894d1abcd0831ce64c829adf39d4788877d044.tar.gz
gentoo-75894d1abcd0831ce64c829adf39d4788877d044.tar.bz2
gentoo-75894d1abcd0831ce64c829adf39d4788877d044.zip
net-libs/libad9361-iio: add 0.3
add doc use flag Minor QA Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libad9361-iio/Manifest1
-rw-r--r--net-libs/libad9361-iio/files/libad9361-iio-0.3-cmake-gnuinstalldirs.patch57
-rw-r--r--net-libs/libad9361-iio/libad9361-iio-0.3.ebuild45
-rw-r--r--net-libs/libad9361-iio/libad9361-iio-9999.ebuild22
4 files changed, 122 insertions, 3 deletions
diff --git a/net-libs/libad9361-iio/Manifest b/net-libs/libad9361-iio/Manifest
index 79e531fd068d..2d201a923391 100644
--- a/net-libs/libad9361-iio/Manifest
+++ b/net-libs/libad9361-iio/Manifest
@@ -1 +1,2 @@
DIST libad9361-iio-0.2.tar.gz 167678 BLAKE2B 9880114bc53f3d4975dbe0773f8d112e40b0df47e34985bdc68c5b6740aee2c140ced39353929a793c2b327b5811461436ceb2934c2a71fc7b92b218092d468d SHA512 f95fa955531198ab33c16d41685d23140e875b2eafa1da10cdf60a7bf1ae760e86e2d3d28c9ab36a3a7b7a90e36bb53456dec1d6e537a1574a5505b7595e764c
+DIST libad9361-iio-0.3.tar.gz 188475 BLAKE2B bdd3733ece66f1b34075821316ce054537059297964cc4bd92bc4c768d1253a2b6d1822bf6cce20082395b0f7d72ccc63a5002608f8042494a6a543a3e0369a4 SHA512 904f81fead71a9c93ccdcdb8822247fc8c496920abb9b13ea4b2b0465d50f5c0115ffc8d226496e76f7bb23b466031556129b18a1f35c65c30dcb3b0c1aeeff9
diff --git a/net-libs/libad9361-iio/files/libad9361-iio-0.3-cmake-gnuinstalldirs.patch b/net-libs/libad9361-iio/files/libad9361-iio-0.3-cmake-gnuinstalldirs.patch
new file mode 100644
index 000000000000..9df6ed6dede2
--- /dev/null
+++ b/net-libs/libad9361-iio/files/libad9361-iio-0.3-cmake-gnuinstalldirs.patch
@@ -0,0 +1,57 @@
+From ef3d58506132072834637f887bc47eb4d0c52a73 Mon Sep 17 00:00:00 2001
+From: Julien Malik <julien.malik@unseenlabs.fr>
+Date: Mon, 29 Nov 2021 17:52:13 +0100
+Subject: [PATCH] cmake: Honor GNUInstallDirs for installation
+
+Library installation dir can be lib, lib64 or lib/<multiarch-tuple>.
+Use the installation paths given by GNUInstallDirs by default, as done in libiio
+
+Signed-off-by: Julien Malik <julien.malik@unseenlabs.fr>
+---
+ CMakeLists.txt | 20 +++++++++-----------
+ 1 file changed, 9 insertions(+), 11 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 04d5c45..475a448 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,10 +70,6 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|DragonFly|OpenBSD|NetBSD")
+ endif()
+ add_definitions(-D_POSIX_C_SOURCE=200809L -D__XSI_VISIBLE=500 -DLIBAD9361_EXPORTS=1)
+
+-set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib"
+- CACHE PATH "Installation directory for libraries")
+-mark_as_advanced(INSTALL_LIB_DIR)
+-
+ find_library(LIBIIO_LIBRARIES iio)
+ find_path(LIBIIO_INCLUDEDIR iio.h)
+
+@@ -109,19 +105,21 @@ configure_file(libad9361-iio.iss.cmakein ${CMAKE_CURRENT_BINARY_DIR}/libad9361-i
+
+ set(LIBAD9361_PC ${CMAKE_CURRENT_BINARY_DIR}/libad9361.pc)
+ configure_file(libad9361.pc.cmakein ${LIBAD9361_PC} @ONLY)
+-install(FILES ${LIBAD9361_PC} DESTINATION ${INSTALL_LIB_DIR}/pkgconfig)
+
++include(GNUInstallDirs)
+ if(NOT SKIP_INSTALL_ALL)
+ install(TARGETS ad9361
+- ARCHIVE DESTINATION lib
+- LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
+- RUNTIME DESTINATION bin
+- FRAMEWORK DESTINATION lib
+- PUBLIC_HEADER DESTINATION include)
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++ FRAMEWORK DESTINATION ${OSX_INSTALL_FRAMEWORKSDIR}
++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
++
++ install(FILES ${LIBAD9361_PC} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif()
+
+ set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/${PROJECT_NAME}${LIBAD9361_VERSION_MAJOR}-doc)")
+-include(GNUInstallDirs)
++
+ set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}${LIBAD9361_VERSION_MAJOR}-doc")
+
+ find_package(Doxygen)
diff --git a/net-libs/libad9361-iio/libad9361-iio-0.3.ebuild b/net-libs/libad9361-iio/libad9361-iio-0.3.ebuild
new file mode 100644
index 000000000000..4150b0e0fb58
--- /dev/null
+++ b/net-libs/libad9361-iio/libad9361-iio-0.3.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="IIO AD9361 library for filter design and handling, multi-chip sync, etc"
+HOMEPAGE="https://github.com/analogdevicesinc/libad9361-iio"
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/analogdevicesinc/libad9361-iio"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/analogdevicesinc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~riscv ~x86"
+fi
+IUSE="doc"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+
+RDEPEND="net-libs/libiio:="
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.2-fix-lld-tests.patch
+ "${FILESDIR}"/${PN}-0.2-libdir-pkgconfig.patch
+ "${FILESDIR}"/${PN}-0.3-cmake-gnuinstalldirs.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_DOC="$(usex doc)"
+ -DCMAKE_INSTALL_DOCDIR="/usr/share/doc/${P}"
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ if use doc; then
+ mv "${ED}/usr/share/doc/ad93610-doc" "${ED}/usr/share/doc/${P}" || die
+ fi
+}
diff --git a/net-libs/libad9361-iio/libad9361-iio-9999.ebuild b/net-libs/libad9361-iio/libad9361-iio-9999.ebuild
index 596e74764626..f26413486b48 100644
--- a/net-libs/libad9361-iio/libad9361-iio-9999.ebuild
+++ b/net-libs/libad9361-iio/libad9361-iio-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -12,17 +12,33 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://github.com/analogdevicesinc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~riscv ~x86"
+ KEYWORDS="~amd64 ~arm ~riscv ~x86"
fi
+IUSE="doc"
LICENSE="LGPL-2.1"
SLOT="0/${PV}"
RDEPEND="net-libs/libiio:="
DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
PATCHES=(
"${FILESDIR}"/${PN}-0.2-fix-lld-tests.patch
"${FILESDIR}"/${PN}-0.2-libdir-pkgconfig.patch
- "${FILESDIR}"/${PN}-0.2-cmake-gnuinstalldirs.patch
)
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_DOC="$(usex doc)"
+ -DCMAKE_INSTALL_DOCDIR="/usr/share/doc/${P}"
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ if use doc; then
+ mv "${ED}/usr/share/doc/ad93610-doc" "${ED}/usr/share/doc/${P}" || die
+ fi
+}