SHA256
1
0
forked from pool/gnuradio
gnuradio/gnuradio-not-install-freedesktop-files.patch
Martin Pluskal 4c8009cec1 Accepting request 1077397 from home:wkazubski:test:science
- Update to version 3.10.6.0
  * Runtime
    + Add Python loggers to top_block and hier_block2
    + Change the default log level (in the config file) to INFO
      instead of DEBUG
    + Logging improvements in the scheduler
    + Correctly determine native page size for Windows
  * GRC
    + Fixed: opening the source of a hierachical block using the
      toolbar button produced an error
    + Use the logger, instead of print statements, in generated
      top blocks
    + Remove libX11 load from generated Python code - this was
      unncessary and produced warnings
    + Choose Editor dialog stays above parent
  * gr-analog
    + Signal Source: option to hide the message port
  * gr-blocks
    + Throttle: supports max time or number of samples per work
      iteration, useful for reducing latency at low sample rates
    + Delay block: option to hide the message port
    + File Meta Sink: fix missing Python import in template code
  * gr-channels
    + Default taps should be 1.0, not 1.0 + j1.0
  * gr-digital
    + Async Decoder: several changes to improve performance
      robustness (see the commit log for more details)
  * gr-fec
    + Tagged Decoder: correctly calculate the frame size for
      terminated CC decoder
  * gr-filter
    + Fixed reverse parameters in fir_filter_with_buffer and
      pfb_arb_resampler, which could cause crashes
    + Fixed PFB Arbitrary Resampler was ignoring attenuation
      parameter
  * gr-iio
    + Set gain mode as specified (was always manual)
    + Use the specified gain parameter for second channel (was
      same as first channel)
  * gr-qtgui
    + Histogram Sink: calculate range of bins correctly to
      avoid strange distributions
    + Save (to image) dialogs add file extensions and have a Save
      button (i.e., they work now)
  * gr-soapy
    + Sources: add tags when the frequency changes
  * gr-uhd
    + Support for more RFNoC blocks
      - Fosphor, which produces data to drive an on-screen OpenGL-
        based renderer which is expected to be in the next release
      - Moving Average
      - Switchboard
      - Split Stream
    + FFT: add properties for direction, magnitude and scaling
    + RX Stream: flush after timeout
    + Fully support multi-channel TX/RX (params were available
      for one one channel)
  * gr-vocoder
    + Add a number of new codec modes for Codec2 and FreeDV
  * gr-zmq
    + Selectable bind/connect to support more flexible ZMQ patterns
      and NAT'd networks
    + Stream sources produce when available, instead of waiting for
      a buffer to fill, helping with latency
  * Modtool
    + Use interp and decim keywords correctly when generating blocks
- Added a patch gnuradio-not-install-freedesktop-files.patch to
  revert commit 7c87800f1d7e85589678f01281b45451085c7482

OBS-URL: https://build.opensuse.org/request/show/1077397
OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/gnuradio?expand=0&rev=128
2023-04-05 07:03:58 +00:00

137 lines
6.1 KiB
Diff

From 7c87800f1d7e85589678f01281b45451085c7482 Mon Sep 17 00:00:00 2001
From: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
Date: Thu, 9 Mar 2023 12:37:46 +0100
Subject: [PATCH] The uninstall script did not remove the previously installed
freedesktop icons and desktop files. Now grc_setup_freedesktop uninstall is
called in cmake_uninstall.cmake
As far as I can see the icon and menu files are only needed in the freedesktop environment.
It's not necessary to put them into gnuradio install path.
So I removed these copies and installed these files directly from the source directory
using xdg-icon-resource and other xdg-utils.
Giving grc_setup_freedesktop execute permissions in the build directory avoids copying it
to the libexec directory. So even if ENABLE_POSTINSTALL=ON no libexec directory will be created.
Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
---
cmake/cmake_uninstall.cmake.in | 8 ++++
grc/scripts/freedesktop/CMakeLists.txt | 41 +------------------
.../freedesktop/grc_setup_freedesktop.in | 8 ++--
3 files changed, 15 insertions(+), 42 deletions(-)
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in
index 410b4a8b9d0..186c5c18448 100644
--- a/cmake/cmake_uninstall.cmake.in
+++ b/cmake/cmake_uninstall.cmake.in
@@ -7,6 +7,14 @@ if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
)
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/grc/scripts/freedesktop/grc_setup_freedesktop")
+ message(STATUS "Cannot find freedesktop install script")
+else("@CMAKE_CURRENT_BINARY_DIR@/grc/scripts/freedesktop/grc_setup_freedesktop")
+ exec_program(
+ "@CMAKE_CURRENT_BINARY_DIR@/grc/scripts/freedesktop/grc_setup_freedesktop"
+ ARGS "uninstall"
+ )
+endif("@CMAKE_CURRENT_BINARY_DIR@/grc/scripts/freedesktop/grc_setup_freedesktop")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
diff --git a/grc/scripts/freedesktop/CMakeLists.txt b/grc/scripts/freedesktop/CMakeLists.txt
index ef42c3e410b..356f07a182f 100644
--- a/grc/scripts/freedesktop/CMakeLists.txt
+++ b/grc/scripts/freedesktop/CMakeLists.txt
@@ -6,54 +6,17 @@
#
########################################################################
-set(grc_freedesktop_path ${GR_PKG_DATA_DIR}/grc/freedesktop)
-
-install(FILES
- grc-icon-256.png
- grc-icon-128.png
- grc-icon-64.png
- grc-icon-48.png
- grc-icon-32.png
- grc-icon-24.png
- grc-icon-16.png
- gnuradio-grc.xml
- gnuradio-grc.desktop
- DESTINATION ${grc_freedesktop_path}
-)
-
-# Install desktop
-install(FILES gnuradio-grc.desktop DESTINATION share/applications)
-
-# Install mime
-install(FILES gnuradio-grc.xml DESTINATION share/mime/packages)
-
-# Install appstream / metainfo file
-install(FILES org.gnuradio.grc.metainfo.xml DESTINATION share/metainfo)
-
-# Install icons
-install(FILES grc-icon-256.png DESTINATION share/icons/hicolor/256x256/apps RENAME gnuradio-grc.png)
-install(FILES grc-icon-128.png DESTINATION share/icons/hicolor/128x128/apps RENAME gnuradio-grc.png)
-install(FILES grc-icon-64.png DESTINATION share/icons/hicolor/64x64/apps RENAME gnuradio-grc.png)
-install(FILES grc-icon-48.png DESTINATION share/icons/hicolor/48x48/apps RENAME gnuradio-grc.png)
-install(FILES grc-icon-32.png DESTINATION share/icons/hicolor/32x32/apps RENAME gnuradio-grc.png)
-install(FILES grc-icon-24.png DESTINATION share/icons/hicolor/24x24/apps RENAME gnuradio-grc.png)
-install(FILES grc-icon-16.png DESTINATION share/icons/hicolor/16x16/apps RENAME gnuradio-grc.png)
find_program(HAVE_XDG_UTILS xdg-desktop-menu)
if(UNIX AND HAVE_XDG_UTILS AND ENABLE_POSTINSTALL)
- set(SRCDIR ${CMAKE_INSTALL_PREFIX}/${grc_freedesktop_path})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/grc_setup_freedesktop.in
${CMAKE_CURRENT_BINARY_DIR}/grc_setup_freedesktop
+ FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
@ONLY)
- install(
- PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/grc_setup_freedesktop
- DESTINATION ${GR_PKG_LIBEXEC_DIR}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
- )
install (
- CODE "execute_process(COMMAND ${CMAKE_INSTALL_PREFIX}/${GR_PKG_LIBEXEC_DIR}/grc_setup_freedesktop install)"
+ CODE "execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/grc_setup_freedesktop install)"
)
endif(UNIX AND HAVE_XDG_UTILS AND ENABLE_POSTINSTALL)
diff --git a/grc/scripts/freedesktop/grc_setup_freedesktop.in b/grc/scripts/freedesktop/grc_setup_freedesktop.in
index 50e02ee16ac..5aacf5e7c54 100644
--- a/grc/scripts/freedesktop/grc_setup_freedesktop.in
+++ b/grc/scripts/freedesktop/grc_setup_freedesktop.in
@@ -19,7 +19,7 @@ ICON_SIZES="16 24 32 48 64 128 256"
if [ -n "$2" ]; then
SRCDIR="$2"
else
- SRCDIR="@SRCDIR@"
+ SRCDIR="@CMAKE_CURRENT_SOURCE_DIR@"
fi
case "$1" in
@@ -32,7 +32,8 @@ case "$1" in
xdg-icon-resource install --noupdate --context apps --theme gnome --size ${size} ${SRCDIR}/grc-icon-${size}.png gnuradio-grc; \
xdg-icon-resource install --noupdate --context apps --size ${size} ${SRCDIR}/grc-icon-${size}.png gnuradio-grc; \
done
- xdg-icon-resource forceupdate
+ xdg-icon-resource forceupdate #update for system (hicolor) theme
+ xdg-icon-resource forceupdate --theme gnome #update for gnome theme
echo "Install mime type"
xdg-mime install ${SRCDIR}/gnuradio-grc.xml
echo "Install menu items"
@@ -49,7 +50,8 @@ case "$1" in
xdg-icon-resource uninstall --noupdate --context apps --theme gnome --size ${size} gnuradio-grc; \
xdg-icon-resource uninstall --noupdate --context apps --size ${size} gnuradio-grc; \
done
- xdg-icon-resource forceupdate
+ xdg-icon-resource forceupdate #update for system (hicolor) theme
+ xdg-icon-resource forceupdate --theme gnome #update for gnome theme
echo "Uninstall mime type"
xdg-mime uninstall ${SRCDIR}/gnuradio-grc.xml
echo "Uninstall menu items"