diff options
Diffstat (limited to 'net-libs/libhackrf')
-rw-r--r-- | net-libs/libhackrf/Manifest | 7 | ||||
-rw-r--r-- | net-libs/libhackrf/files/hackrf-disable-static-2022.09.1.patch | 30 | ||||
-rw-r--r-- | net-libs/libhackrf/libhackrf-2021.03.1.ebuild | 9 | ||||
-rw-r--r-- | net-libs/libhackrf/libhackrf-2022.09.1.ebuild | 54 | ||||
-rw-r--r-- | net-libs/libhackrf/libhackrf-9999.ebuild | 18 |
5 files changed, 111 insertions, 7 deletions
diff --git a/net-libs/libhackrf/Manifest b/net-libs/libhackrf/Manifest index 3a5dc21e53bf..2c5cb0ef3440 100644 --- a/net-libs/libhackrf/Manifest +++ b/net-libs/libhackrf/Manifest @@ -1,4 +1,7 @@ +AUX hackrf-disable-static-2022.09.1.patch 1165 BLAKE2B 4e0fb00e223a1904b8006091b7ee33e26d46d6c60a58cbfdff7e930f5cba7bbf80b20c61cdb4ddf7bb596573218a9dbe23905fd7f58207a25d931e4b7532d7a5 SHA512 5b705eb513e95b62a47fc57a0c824794d1222ac735475a8aa33d49f250fa96d39b63884076c9743066baafb86a995c26b37f294592d77c62972c26206d1d75d2 DIST hackrf-2021.03.1.tar.xz 13661964 BLAKE2B 0a00b2d24cc6ac7ca36f66e8f5b3029cfd446a6c5b5427f7d25db6dd191693c1e1c010abd85907813d55c6bd367780c70860b4f7e7f83fb9970d425311893780 SHA512 4a88b877a9f6fee0c8d9496eb265655af4baa678e862ca6147596cd3a1d85dd50315da6531efa54d050847ce5068c4726393b4897d40576888d10a898ad57139 -EBUILD libhackrf-2021.03.1.ebuild 1018 BLAKE2B 895ea4a82ce172400fe9b2a63a2ec61996457bab987a009e6c6ed6b9dbdb04b71b86fbe2d6559e50cea180de9f12474d05b5563f129b33702799142d31559f33 SHA512 31cb30bf2504f71903d922a449acc07014c3c8937b2762285f1f95c8613e3c193f98e4244b3290ac103b253e6ff278c74f95938178cdd3754e2005568daa1183 -EBUILD libhackrf-9999.ebuild 1013 BLAKE2B b7433f192fce521a7c98cc8dbcd0da0360ebfbc2d9444d162f8fff0f83cb1fdbcd9b1884b13c1533bdfa462aa35c6509048f8ba9739636256451dfefcd4c8804 SHA512 e2a103ab822aa2ef4f4c5b3bf6a49610b5c9632096d7927195fa0fbec11322015c9858fa87fc967533a9bb4794c4285afc0bf4ebc76841643ad36357de4d13d6 +DIST hackrf-2022.09.1.tar.xz 21534956 BLAKE2B fd1b3469372fdb0558465c84f3645859791af9bd1302f63c63185ce7c47d24779ed0baf47eccbfc8ddb771e9737edb2a37a073fb749377d87f4e67c11eb6ef76 SHA512 c3b8b6f18cb80e3506c09dc71f2c01c127ad6d88ed028be3b659953cf7bb1e36b9dba83b4bb04c916bd7c2b66faeae1e602c53368e1e56454d6fe831961e01ee +EBUILD libhackrf-2021.03.1.ebuild 1075 BLAKE2B 813cef07128229427b618c922e2c3320163904122c3c86fc3840dd6a558ffcf7681322678f3dd5e14f445908975884cfd9d7cac16ade2f2a8965559ab8365ea8 SHA512 314310c58da085bfd38e197ea997ddacde62d5f08576b509353b7e3e5f339a6efffd533bb9a8271a9bba990e98309120e9910567b544ed0e7b85a89f6dde6a2c +EBUILD libhackrf-2022.09.1.ebuild 1196 BLAKE2B bd9699ff8cee5df5caf26560c2ae3210f66aadcad335a202213e0c363bb7da23ce3080758f8cb9a77e9e1a17a5d072da2de6943e50de0f06789594780c6f86a3 SHA512 df911d491fcc3e80bd94835c9cdf35de17030de9381cc30eaaa5b13856ba7c12a421079392a66e9136aeb0dbedb2614fde3f1deba4a2cdfba4202dd774853dc2 +EBUILD libhackrf-9999.ebuild 1196 BLAKE2B bd9699ff8cee5df5caf26560c2ae3210f66aadcad335a202213e0c363bb7da23ce3080758f8cb9a77e9e1a17a5d072da2de6943e50de0f06789594780c6f86a3 SHA512 df911d491fcc3e80bd94835c9cdf35de17030de9381cc30eaaa5b13856ba7c12a421079392a66e9136aeb0dbedb2614fde3f1deba4a2cdfba4202dd774853dc2 MISC metadata.xml 478 BLAKE2B b9dc4d583a6d8d6f4f495b4c9cf911f127133087f00ebf696be9f603ce3be1e93f5f112dd57fa557602daf67709176ab082cf07f7945cc6abc396fb445da5bc0 SHA512 11196ffe3e3b7a746be9191dc28188b56fa5e1238c26bfb878ee891e3564f7360e7169c469797e199bc77a1b1c1d8ab951891e4830f266ff4d19d71c33b919b2 diff --git a/net-libs/libhackrf/files/hackrf-disable-static-2022.09.1.patch b/net-libs/libhackrf/files/hackrf-disable-static-2022.09.1.patch new file mode 100644 index 000000000000..f7e9fa39cc5e --- /dev/null +++ b/net-libs/libhackrf/files/hackrf-disable-static-2022.09.1.patch @@ -0,0 +1,30 @@ +diff -Naur libhackrf-orig/src/CMakeLists.txt libhackrf/src/CMakeLists.txt +--- libhackrf-orig/src/CMakeLists.txt 2022-09-29 09:47:10.899630179 -0400 ++++ libhackrf/src/CMakeLists.txt 2022-09-29 09:47:30.835629516 -0400 +@@ -31,15 +31,11 @@ + set_target_properties(hackrf PROPERTIES VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.0 SOVERSION 0) + + # Static library +-add_library(hackrf-static STATIC ${c_sources}) + if(MSVC) + set_target_properties(hackrf-static PROPERTIES OUTPUT_NAME "hackrf_static") +-else() +- set_target_properties(hackrf-static PROPERTIES OUTPUT_NAME "hackrf") + endif() + + set_target_properties(hackrf PROPERTIES CLEAN_DIRECT_OUTPUT 1) +-set_target_properties(hackrf-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + + # Dependencies + target_link_libraries(hackrf ${LIBUSB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) +@@ -55,10 +51,6 @@ + LIBRARY DESTINATION lib${LIB_SUFFIX} + COMPONENT sharedlibs + ) +- install(TARGETS hackrf-static +- ARCHIVE DESTINATION lib${LIB_SUFFIX} +- COMPONENT staticlibs +- ) + install(FILES ${c_headers} + DESTINATION include/${PROJECT_NAME} + COMPONENT headers diff --git a/net-libs/libhackrf/libhackrf-2021.03.1.ebuild b/net-libs/libhackrf/libhackrf-2021.03.1.ebuild index 8021c6bcf616..764d01a827d6 100644 --- a/net-libs/libhackrf/libhackrf-2021.03.1.ebuild +++ b/net-libs/libhackrf/libhackrf-2021.03.1.ebuild @@ -40,5 +40,12 @@ src_configure() { } pkg_postinst() { - use udev && einfo "Users in the usb group can use hackrf." + if use udev; then + einfo "Users in the usb group can use hackrf." + udev_reload + fi +} + +pkg_postrm() { + udev_reload } diff --git a/net-libs/libhackrf/libhackrf-2022.09.1.ebuild b/net-libs/libhackrf/libhackrf-2022.09.1.ebuild new file mode 100644 index 000000000000..586e9f4bd1ec --- /dev/null +++ b/net-libs/libhackrf/libhackrf-2022.09.1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake udev + +DESCRIPTION="library for communicating with HackRF SDR platform" +HOMEPAGE="http://greatscottgadgets.com/hackrf/" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/greatscottgadgets/hackrf.git" + inherit git-r3 + EGIT_CHECKOUT_DIR="${WORKDIR}/hackrf" + S="${WORKDIR}/hackrf/host/libhackrf" +else + S="${WORKDIR}/hackrf-${PV}/host/libhackrf" + SRC_URI="https://github.com/greatscottgadgets/hackrf/releases/download/v${PV}/hackrf-${PV}.tar.xz" + KEYWORDS="~amd64 ~arm ~ppc ~riscv ~x86" +fi + +LICENSE="BSD" +SLOT="0/${PV}" +IUSE="+udev" + +DEPEND="virtual/libusb:1" +RDEPEND="${DEPEND}" + +# https://github.com/greatscottgadgets/hackrf/issues/1193 +PATCHES=( "${FILESDIR}/hackrf-disable-static-${PV}.patch" ) + +src_configure() { + local mycmakeargs=( + -DINSTALL_UDEV_RULES="$(usex udev)" + ) + if use udev; then + mycmakeargs+=( + -DUDEV_RULES_GROUP=usb + -DUDEV_RULES_PATH="$(get_udevdir)/rules.d" + ) + fi + cmake_src_configure +} + +pkg_postinst() { + if use udev; then + einfo "Users in the usb group can use hackrf." + udev_reload + fi +} + +pkg_postrm() { + udev_reload +} diff --git a/net-libs/libhackrf/libhackrf-9999.ebuild b/net-libs/libhackrf/libhackrf-9999.ebuild index aacd79049ae5..586e9f4bd1ec 100644 --- a/net-libs/libhackrf/libhackrf-9999.ebuild +++ b/net-libs/libhackrf/libhackrf-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit cmake udev @@ -16,7 +16,7 @@ if [[ ${PV} == "9999" ]] ; then else S="${WORKDIR}/hackrf-${PV}/host/libhackrf" SRC_URI="https://github.com/greatscottgadgets/hackrf/releases/download/v${PV}/hackrf-${PV}.tar.xz" - KEYWORDS="~amd64 ~arm ~ppc ~x86" + KEYWORDS="~amd64 ~arm ~ppc ~riscv ~x86" fi LICENSE="BSD" @@ -26,6 +26,9 @@ IUSE="+udev" DEPEND="virtual/libusb:1" RDEPEND="${DEPEND}" +# https://github.com/greatscottgadgets/hackrf/issues/1193 +PATCHES=( "${FILESDIR}/hackrf-disable-static-${PV}.patch" ) + src_configure() { local mycmakeargs=( -DINSTALL_UDEV_RULES="$(usex udev)" @@ -40,5 +43,12 @@ src_configure() { } pkg_postinst() { - use udev && einfo "Users in the usb group can use hackrf." + if use udev; then + einfo "Users in the usb group can use hackrf." + udev_reload + fi +} + +pkg_postrm() { + udev_reload } |