aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Burch <eli.burch@burchbytes.com>2024-06-16 17:42:13 -0700
committerEli Burch <eli.burch@burchbytes.com>2024-06-16 17:44:21 -0700
commitcb7f344f4826efe6c411abee955ea6b6a4695037 (patch)
tree19dbed73c67533350e3016989f6e7c8a2660e0c7 /net-wireless
parentdev-util/pmbootstrap: add 2.3.1, drop 1.51.0 (diff)
downloadguru-cb7f344f4826efe6c411abee955ea6b6a4695037.tar.gz
guru-cb7f344f4826efe6c411abee955ea6b6a4695037.tar.bz2
guru-cb7f344f4826efe6c411abee955ea6b6a4695037.zip
net-wireless/airspyhf: Add static-libs use flag
Closes: https://bugs.gentoo.org/934412 Signed-off-by: Eli Burch <eli.burch@burchbytes.com>
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/airspyhf/airspyhf-1.6.8.ebuild4
-rw-r--r--net-wireless/airspyhf/files/static.patch43
2 files changed, 46 insertions, 1 deletions
diff --git a/net-wireless/airspyhf/airspyhf-1.6.8.ebuild b/net-wireless/airspyhf/airspyhf-1.6.8.ebuild
index 1ccb88f4b..df9f0b082 100644
--- a/net-wireless/airspyhf/airspyhf-1.6.8.ebuild
+++ b/net-wireless/airspyhf/airspyhf-1.6.8.ebuild
@@ -13,7 +13,7 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
-IUSE="udev"
+IUSE="udev static-libs"
DEPEND="dev-libs/libusb"
@@ -26,6 +26,8 @@ BDEPEND="virtual/pkgconfig"
src_prepare(){
sed -i "s@DESTINATION \"/etc/udev/rules.d\"@DESTINATION \"$(get_udevdir)/rules.d\"@" "tools/CMakeLists.txt" || die
+ use static-libs || eapply "${FILESDIR}/static.patch" || die
+
cmake_src_prepare
}
diff --git a/net-wireless/airspyhf/files/static.patch b/net-wireless/airspyhf/files/static.patch
new file mode 100644
index 000000000..393e529fc
--- /dev/null
+++ b/net-wireless/airspyhf/files/static.patch
@@ -0,0 +1,43 @@
+diff --git a/libairspyhf/src/CMakeLists.txt b/libairspyhf/src/CMakeLists.txt
+index 9d8d483..38d1b24 100644
+--- a/libairspyhf/src/CMakeLists.txt
++++ b/libairspyhf/src/CMakeLists.txt
+@@ -46,16 +46,7 @@ add_library(airspyhf SHARED ${c_sources} ${AIRSPYHF_DLL_SRCS})
+ set_target_properties(airspyhf PROPERTIES VERSION ${AIRSPYHF_VER_MAJOR}.${AIRSPYHF_VER_MINOR}.${AIRSPYHF_VER_REVISION})
+ set_target_properties(airspyhf PROPERTIES SOVERSION 0)
+
+-# Static library
+-add_library(airspyhf-static STATIC ${c_sources})
+-if(MSVC)
+- set_target_properties(airspyhf-static PROPERTIES OUTPUT_NAME "airspyhf_static")
+-else()
+- set_target_properties(airspyhf-static PROPERTIES OUTPUT_NAME "airspyhf")
+-endif()
+-
+ set_target_properties(airspyhf PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+-set_target_properties(airspyhf-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+
+ # Dependencies
+ target_link_libraries(airspyhf ${LIBUSB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+@@ -71,10 +62,6 @@ if( ${UNIX} )
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ COMPONENT sharedlibs
+ )
+- install(TARGETS airspyhf-static
+- ARCHIVE DESTINATION lib${LIB_SUFFIX}
+- COMPONENT staticlibs
+- )
+ install(FILES ${c_headers}
+ DESTINATION include/${PROJECT_NAME}
+ COMPONENT headers
+@@ -86,10 +73,6 @@ if( ${WIN32} )
+ DESTINATION bin
+ COMPONENT sharedlibs
+ )
+- install(TARGETS airspyhf-static
+- DESTINATION bin
+- COMPONENT staticlibs
+- )
+ install(FILES ${c_headers}
+ DESTINATION include/${PROJECT_NAME}
+ COMPONENT headers