commit 15647626c2c0c44e488c3b0c9c8dfb97ce894bf7
Author: Jaroslav Škarvada <jskarvad(a)redhat.com>
Date: Thu Feb 17 20:45:13 2022 +0100
Fixed FTBFS
Resolves: rfbz#5697
Signed-off-by: Jaroslav Škarvada <jskarvad(a)redhat.com>
.gitignore | 1 +
dead.package | 1 -
dream-2.2-gpsd-3.20-fix.patch | 39 +++++++++++++
dream-2.2-gpsd-3.23-fix.patch | 67 ++++++++++++++++++++++
dream-2.2-hamlib-4-fix.patch | 33 +++++++++++
dream-2.2-use-system-libs.patch | 23 ++++++++
dream.desktop | 7 +++
dream.spec | 121 ++++++++++++++++++++++++++++++++++++++++
sources | 1 +
9 files changed, 292 insertions(+), 1 deletion(-)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e56375e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/dream_*.tar.gz
diff --git a/dream-2.2-gpsd-3.20-fix.patch b/dream-2.2-gpsd-3.20-fix.patch
new file mode 100644
index 0000000..1fa23aa
--- /dev/null
+++ b/dream-2.2-gpsd-3.20-fix.patch
@@ -0,0 +1,39 @@
+diff --git a/src/GUI-QT/EvaluationDlg.cpp b/src/GUI-QT/EvaluationDlg.cpp
+index 627ecaa..4252c5e 100644
+--- a/src/GUI-QT/EvaluationDlg.cpp
++++ b/src/GUI-QT/EvaluationDlg.cpp
+@@ -789,7 +789,7 @@ void systemevalDlg::UpdateGPS(CParameter& Parameters)
+ if (gps.set&TIME_SET)
+ {
+ struct tm * p_ts;
+- time_t tt = time_t(gps.fix.time);
++ time_t tt = time_t(gps.fix.time.tv_sec);
+ p_ts = gmtime(&tt);
+ QChar fill('0');
+ qStrTime = QString("UTC: %1/%2/%3 %4:%5:%6 ")
+diff --git a/src/MDI/MDITagItems.cpp b/src/MDI/MDITagItems.cpp
+index 15e0c33..cb0de4e 100644
+--- a/src/MDI/MDITagItems.cpp
++++ b/src/MDI/MDITagItems.cpp
+@@ -1104,7 +1104,7 @@ CTagItemGeneratorGPS::GenTag(bool bIsValid, gps_data_t&
gps_data) // Long/Lat in
+
+ if (gps_data.set&TIME_SET)
+ {
+- time_t time = (time_t)gps_data.fix.time;
++ time_t time = (time_t)gps_data.fix.time.tv_sec;
+ struct tm * ptm;
+ ptm = gmtime ( &time );
+ Enqueue((uint32_t) ptm->tm_hour, SIZEOF__BYTE);
+diff --git a/src/MDI/RSCITagItemDecoders.cpp b/src/MDI/RSCITagItemDecoders.cpp
+index 78b38aa..ec9cc8b 100644
+--- a/src/MDI/RSCITagItemDecoders.cpp
++++ b/src/MDI/RSCITagItemDecoders.cpp
+@@ -255,7 +255,7 @@ void CTagItemDecoderRgps::DecodeTag(CVector<_BINARY>&
vecbiTag, const int iLen)
+ else
+ unsetenv("TZ");
+ #endif
+- gps_data.fix.time = t;
++ gps_data.fix.time.tv_sec = t;
+ gps_data.set |= TIME_SET;
+ }
+
diff --git a/dream-2.2-gpsd-3.23-fix.patch b/dream-2.2-gpsd-3.23-fix.patch
new file mode 100644
index 0000000..06c7342
--- /dev/null
+++ b/dream-2.2-gpsd-3.23-fix.patch
@@ -0,0 +1,67 @@
+diff --git a/src/GUI-QT/EvaluationDlg.cpp b/src/GUI-QT/EvaluationDlg.cpp
+index 4252c5e..0ba23d9 100644
+--- a/src/GUI-QT/EvaluationDlg.cpp
++++ b/src/GUI-QT/EvaluationDlg.cpp
+@@ -756,7 +756,7 @@ void systemevalDlg::UpdateGPS(CParameter& Parameters)
+ LEDGPS->SetLight(CMultColorLED::RL_RED);
+ } else {
+
+- if(gps.status==0)
++ if(gps.fix.status==0)
+ LEDGPS->SetLight(CMultColorLED::RL_YELLOW);
+ else
+ LEDGPS->SetLight(CMultColorLED::RL_GREEN);
+diff --git a/src/MDI/MDITagItems.cpp b/src/MDI/MDITagItems.cpp
+index cb0de4e..fcd4b7b 100644
+--- a/src/MDI/MDITagItems.cpp
++++ b/src/MDI/MDITagItems.cpp
+@@ -1010,7 +1010,7 @@ CTagItemGeneratorGPS::GenTag(bool bIsValid, gps_data_t&
gps_data) // Long/Lat in
+ uint32_t source = 0xff; // GPS_SOURCE_NOT_AVAILABLE
+ PrepareTag(26 * SIZEOF__BYTE);
+ if(gps_data.set&STATUS_SET) {
+- switch(gps_data.status) {
++ switch(gps_data.fix.status) {
+ case 0: source = 3; break; // manual
+ case 1: source = 1; break; // gps
+ case 2: source = 2; break; // differential
+diff --git a/src/MDI/RSCITagItemDecoders.cpp b/src/MDI/RSCITagItemDecoders.cpp
+index ec9cc8b..fd00124 100644
+--- a/src/MDI/RSCITagItemDecoders.cpp
++++ b/src/MDI/RSCITagItemDecoders.cpp
+@@ -172,19 +172,19 @@ void CTagItemDecoderRgps::DecodeTag(CVector<_BINARY>&
vecbiTag, const int iLen)
+ break;
+ case 1:
+ gps_data.set=STATUS_SET;
+- gps_data.status=1;
++ gps_data.fix.status=1;
+ break;
+ case 2:
+ gps_data.set=STATUS_SET;
+- gps_data.status=2;
++ gps_data.fix.status=2;
+ break;
+ case 3:
+ gps_data.set=STATUS_SET;
+- gps_data.status=0;
++ gps_data.fix.status=0;
+ break;
+ case 0xff:
+ gps_data.set=0;
+- gps_data.status=0;
++ gps_data.fix.status=0;
+ break;
+ default:
+ cerr << "error decoding rgps" << endl;
+diff --git a/src/Parameter.cpp b/src/Parameter.cpp
+index 59eff77..5483e8c 100644
+--- a/src/Parameter.cpp
++++ b/src/Parameter.cpp
+@@ -143,7 +143,7 @@ CParameter::CParameter():
+ GenerateRandomSerialNumber();
+ CellMappingTable.MakeTable(eRobustnessMode, eSpectOccup, iSigSampleRate);
+ gps_data.set=0;
+- gps_data.status=0;
++ gps_data.fix.status=0;
+ #ifdef HAVE_LIBGPS
+ gps_data.gps_fd = -1;
+ #endif
diff --git a/dream-2.2-hamlib-4-fix.patch b/dream-2.2-hamlib-4-fix.patch
new file mode 100644
index 0000000..cb2a769
--- /dev/null
+++ b/dream-2.2-hamlib-4-fix.patch
@@ -0,0 +1,33 @@
+diff --git a/src/GUI-QT/DialogUtil.h b/src/GUI-QT/DialogUtil.h
+--- a/src/GUI-QT/DialogUtil.h
++++ b/src/GUI-QT/DialogUtil.h
+@@ -48,7 +48,6 @@
+ #include <qwt_thermo.h> /* S-Meter */
+
+ class CRig;
+-typedef int rig_model_t;
+
+ /* Definitions ****************************************************************/
+
+diff --git a/src/util/Hamlib.cpp b/src/util/Hamlib.cpp
+index 0fd823e..d544e77 100644
+--- a/src/util/Hamlib.cpp
++++ b/src/util/Hamlib.cpp
+@@ -424,7 +424,7 @@ CHamlib::LoadSettings(CSettings & s)
+ SetHamlibModelID(model);
+ }
+
+- s.Put("Hamlib", "hamlib-model", model);
++ s.Put("Hamlib", "hamlib-model", (int) model);
+ s.Put("Hamlib", "hamlib-config", strHamlibConf);
+ s.Put("Hamlib", "settings", strSettings);
+ s.Put("Hamlib", "freqoffset", iFreqOffset);
+@@ -434,7 +434,7 @@ void
+ CHamlib::SaveSettings(CSettings & s)
+ {
+ /* Hamlib Model ID */
+- s.Put("Hamlib", "hamlib-model", iHamlibModelID);
++ s.Put("Hamlib", "hamlib-model", (int) iHamlibModelID);
+
+ /* Hamlib configuration string */
+ stringstream ss;
diff --git a/dream-2.2-use-system-libs.patch b/dream-2.2-use-system-libs.patch
new file mode 100644
index 0000000..e4779dd
--- /dev/null
+++ b/dream-2.2-use-system-libs.patch
@@ -0,0 +1,23 @@
+diff --git a/dream.pro b/dream.pro
+--- a/dream.pro
++++ b/dream.pro
+@@ -3,8 +3,6 @@
+ TARGET = dream
+ OBJECTS_DIR = obj
+ DEFINES += EXECUTABLE_NAME=$$TARGET
+-LIBS += -L$$PWD/lib
+-INCLUDEPATH += $$PWD/include
+ contains(QT_VERSION, ^4\\..*) {
+ VERSION_MESSAGE = Qt 4
+ }
+@@ -402,8 +400,8 @@
+ LIBS += -lqwt-qt5
+ }
+ !crosscompile {
+- exists(/usr/include/qwt/qwt.h) {
+- INCLUDEPATH += /usr/include/qwt
++ exists(/usr/include/qt5/qwt/qwt.h) {
++ INCLUDEPATH += /usr/include/qt5/qwt
+ }
+ exists(/usr/local/include/qwt/qwt.h) {
+ INCLUDEPATH += /usr/local/include/qwt
diff --git a/dream.desktop b/dream.desktop
new file mode 100644
index 0000000..b7d889e
--- /dev/null
+++ b/dream.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=Dream
+Comment=Digital Radio Mondiale (DRM) receiver
+Exec=/usr/bin/dream
+Icon=dream
+Terminal=false
diff --git a/dream.spec b/dream.spec
new file mode 100644
index 0000000..ff1043a
--- /dev/null
+++ b/dream.spec
@@ -0,0 +1,121 @@
+Name: dream
+Version: 2.2
+Release: 10%{?dist}
+Summary: A software radio for AM and Digital Radio Mondiale (DRM)
+License: GPLv2+
+URL:
https://sourceforge.net/projects/drm/
+Source0:
https://sourceforge.net/projects/drm/files/dream/%{version}/dream_%{versi...
+Source1: dream.desktop
+Patch0: dream-2.2-use-system-libs.patch
+
+#
https://sourceforge.net/p/drm/tickets/233/
+Patch1: dream-2.2-hamlib-4-fix.patch
+#
https://sourceforge.net/p/drm/tickets/234/
+Patch2: dream-2.2-gpsd-3.20-fix.patch
+#
https://sourceforge.net/p/drm/tickets/235/
+Patch3: dream-2.2-gpsd-3.23-fix.patch
+BuildRequires: gcc-c++
+BuildRequires: hamlib-devel
+BuildRequires: pulseaudio-libs-devel
+BuildRequires: libpcap-devel
+BuildRequires: gpsd-devel
+BuildRequires: libsndfile-devel
+BuildRequires: speexdsp-devel
+BuildRequires: fftw-devel
+BuildRequires: opus-devel
+BuildRequires: faad2-devel
+BuildRequires: qwt-qt5-devel
+BuildRequires: qt5-qtwebkit-devel
+BuildRequires: desktop-file-utils
+BuildRequires: libpcap-devel
+BuildRequires: faac-devel > 1.29.9.2-3
+Requires: hicolor-icon-theme
+
+%description
+Dream is a software implementation of a Digital Radio Mondiale (DRM) receiver.
+With Dream, DRM broadcasts can be received with a modified analog
+receiver (SW, MW, LW) and a PC with a sound card.
+
+%prep
+%autosetup -p1 -n dream-%{version}
+
+%build
+OUT_PWD="%{_prefix}" %{qmake_qt5} ./dream.pro
+%make_build
+
+%install
+%make_install INSTALL_ROOT="%{buildroot}"
+
+# icon
+install -Dpm 0644 src/GUI-QT/res/MainIcon.svg
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/dream.svg
+
+# desktop file
+mkdir -p %{buildroot}%{_datadir}/applications
+desktop-file-install --add-category="Utility" \
+ --dir=%{buildroot}%{_datadir}/applications \
+ %{S:1}
+
+%files
+%license COPYING
+%doc AUTHORS README NEWS TODO ChangeLog
+%{_bindir}/dream
+%{_datadir}/icons/hicolor/scalable/apps/dream.svg
+%{_datadir}/applications/dream.desktop
+%{_mandir}/man1/*
+
+%changelog
+* Thu Feb 17 2022 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.2-10
+- Fixed FTBFS
+ Resolves: rfbz#5697
+
+* Thu Feb 10 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> - 2.2-9
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
+* Wed Aug 04 2021 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> - 2.2-8
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+
+* Thu Feb 04 2021 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> - 2.2-7
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
+* Mon Aug 24 2020 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.2-6
+- Fixed FTBFS
+ Resolves: rfbz#5697
+
+* Wed Aug 19 2020 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> - 2.2-5
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
+* Sat Jul 11 2020 Leigh Scott <leigh123linux(a)gmail.com> - 2.2-4
+- Rebuilt
+
+* Tue Apr 14 2020 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.2-3
+- Dropped unneeded qt5-devel build requires
+- Fixed build with hamlib-4
+- Rebuilt with hamlib-4
+
+* Wed Feb 05 2020 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> - 2.2-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
+* Sun Aug 11 2019 Antonio Trande <sagitter(a)fedoraproject.org> - 2.2-1
+- Release 2.2
+
+* Sat Aug 10 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
2.1.1-7
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Tue Mar 05 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
2.1.1-6
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Fri Oct 26 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.1.1-5
+- Built with qwt-qt5
+
+* Wed Oct 24 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.1.1-4
+- Added minimal version to build require for faac (DRM enabled version)
+
+* Wed Oct 24 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.1.1-3
+- Built with libpcap
+
+* Tue Oct 23 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.1.1-2
+- Enabled faac DRM
+- Built with Qt5
+
+* Sat Oct 6 2018 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.1.1-1
+- Initial version
diff --git a/sources b/sources
new file mode 100644
index 0000000..529876e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+df3d272ce491aafd7de843c8d9ff5e63 dream_2.2.orig.tar.gz