sys-boot/rpi-imager: add drivelist filter useflag
This commit is contained in:
parent
c30f012701
commit
3f06de4d40
@ -0,0 +1,37 @@
|
||||
# Expose drivelist filtering as cmake variable
|
||||
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -134,6 +134,17 @@ else()
|
||||
add_definitions(-DTELEMETRY_ENABLED_DEFAULT=false)
|
||||
endif()
|
||||
|
||||
+if(DEFINED DRIVELIST_FILTER_SYSTEM_DRIVES)
|
||||
+ if(DRIVELIST_FILTER_SYSTEM_DRIVES)
|
||||
+ # Hide system drives from list
|
||||
+ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=true)
|
||||
+ else()
|
||||
+ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=false)
|
||||
+ endif()
|
||||
+else()
|
||||
+ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=true)
|
||||
+endif()
|
||||
+
|
||||
if(ENABLE_CHECK_VERSION)
|
||||
add_definitions(-DCHECK_VERSION_DEFAULT=true)
|
||||
else()
|
||||
--- a/src/config.h
|
||||
+++ b/src/config.h
|
||||
@@ -19,9 +19,6 @@
|
||||
/* Hash algorithm for verifying (uncompressed image) checksum */
|
||||
#define OSLIST_HASH_ALGORITHM QCryptographicHash::Sha256
|
||||
|
||||
-/* Hide system drives from list */
|
||||
-#define DRIVELIST_FILTER_SYSTEM_DRIVES true
|
||||
-
|
||||
/* Update progressbar every 0.1 second */
|
||||
#define PROGRESS_UPDATE_INTERVAL 100
|
||||
|
||||
--
|
||||
2.38.2
|
||||
|
@ -8,4 +8,8 @@
|
||||
<upstream>
|
||||
<remote-id type="github">raspberrypi/rpi-imager</remote-id>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="filter-drivelist">Filters list of drives to just display USB-Drives, SD-Cards and NVME (root excluded)</flag>
|
||||
</use>
|
||||
|
||||
</pkgmetadata>
|
||||
|
@ -42,10 +42,17 @@ DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
|
||||
IUSE="+filter-drivelist"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PV}-move-DRIVELIST_FILTER_SYSTEM_DRIVES-to-cmake-arg.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DENABLE_CHECK_VERSION=OFF
|
||||
-DENABLE_TELEMETRY=OFF
|
||||
-DDRIVELIST_FILTER_SYSTEM_DRIVES=$(usex filter-drivelist)
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
|
Loading…
Reference in New Issue
Block a user