New version
Fixed compilation with gcc-8.0.1 Resolves: rhbz#1556544 De-fuzzified compile-fix patch
This commit is contained in:
parent
764dd143d3
commit
9a1c675ab0
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (wsjtx-1.8.0.tgz) = 793e88604661b03e2e6d5a910ea4045f800b9c59174af3286fd8afdaf65d8a3ca7d1aeae557c6afc66d9bbe398be8c7030950dda03d6bc6279061c3a3107beaa
|
||||
SHA512 (wsjtx-1.9.0-rc2.tgz) = eaa0ca6f06ef523630515eda723c1404a6cb01dfb6f7ac69f974eef1134c32589e82987433b7eb27b7a697b7d5ce51d16cdb732e9e9eb8edd431d6992dd3e455
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/wsjtx/CMakeLists.txt b/wsjtx/CMakeLists.txt
|
||||
index d5e64f8..807797e 100644
|
||||
index e81dc64..e0ccd51 100644
|
||||
--- a/wsjtx/CMakeLists.txt
|
||||
+++ b/wsjtx/CMakeLists.txt
|
||||
@@ -826,11 +826,11 @@ find_program(ETAGS etags)
|
||||
@@ -838,11 +838,11 @@ find_program(ETAGS etags)
|
||||
#
|
||||
# Boost
|
||||
#
|
||||
@ -16,7 +16,7 @@ index d5e64f8..807797e 100644
|
||||
if (Boost_FOUND)
|
||||
include_directories (${Boost_INCLUDE_DIRS})
|
||||
endif ()
|
||||
@@ -848,7 +848,7 @@ find_package (FFTW3 COMPONENTS double single threads REQUIRED)
|
||||
@@ -860,7 +860,7 @@ find_package (FFTW3 COMPONENTS double single threads REQUIRED)
|
||||
#
|
||||
# libhamlib setup
|
||||
#
|
||||
@ -25,7 +25,7 @@ index d5e64f8..807797e 100644
|
||||
find_package (hamlib 3 REQUIRED)
|
||||
find_program (RIGCTL_EXE rigctl)
|
||||
find_program (RIGCTLD_EXE rigctld)
|
||||
@@ -1415,20 +1415,6 @@ install (TARGETS jt9 jt65code qra64code qra64sim jt9code jt4code
|
||||
@@ -1430,20 +1430,6 @@ install (TARGETS jt9 ft8code jt65code qra64code qra64sim jt9code jt4code
|
||||
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
)
|
||||
|
290
wsjtx-1.9.0.rc2-gcc-8.0.1-compile-fix.patch
Normal file
290
wsjtx-1.9.0.rc2-gcc-8.0.1-compile-fix.patch
Normal file
@ -0,0 +1,290 @@
|
||||
From a156e03a9d08c83d2a8b61fff7a984f670c61e31 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
|
||||
Date: Fri, 16 Mar 2018 15:00:04 +0100
|
||||
Subject: [PATCH] Fixed compilation with gcc/gfortran-8.0.1
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
|
||||
---
|
||||
wsjtx/CMakeLists.txt | 1 +
|
||||
wsjtx/commons.h | 10 +++++-----
|
||||
wsjtx/lib/Makefile.linux | 2 +-
|
||||
wsjtx/lib/decoder.f90 | 37 ++++++++++++++++++++++++-------------
|
||||
wsjtx/lib/jt9.f90 | 15 ++++++++-------
|
||||
wsjtx/lib/jt9com.f90 | 10 +++++-----
|
||||
wsjtx/lib/strconvert_module.f90 | 37 +++++++++++++++++++++++++++++++++++++
|
||||
wsjtx/wsjtx_config.h.in | 1 +
|
||||
8 files changed, 82 insertions(+), 31 deletions(-)
|
||||
create mode 100644 wsjtx/lib/strconvert_module.f90
|
||||
|
||||
diff --git a/wsjtx/CMakeLists.txt b/wsjtx/CMakeLists.txt
|
||||
index e0ccd51..b37453d 100644
|
||||
--- a/wsjtx/CMakeLists.txt
|
||||
+++ b/wsjtx/CMakeLists.txt
|
||||
@@ -351,6 +351,7 @@ set (wsjt_FSRCS
|
||||
lib/timer_impl.f90
|
||||
lib/timer_module.f90
|
||||
lib/wavhdr.f90
|
||||
+ lib/strconvert_module.f90
|
||||
|
||||
# remaining non-module sources
|
||||
lib/addit.f90
|
||||
diff --git a/wsjtx/commons.h b/wsjtx/commons.h
|
||||
index 7c202d2..e5bdd2d 100644
|
||||
--- a/wsjtx/commons.h
|
||||
+++ b/wsjtx/commons.h
|
||||
@@ -59,11 +59,11 @@ extern struct dec_data {
|
||||
int naggressive;
|
||||
bool nrobust;
|
||||
int nexp_decode;
|
||||
- char datetime[20];
|
||||
- char mycall[12];
|
||||
- char mygrid[6];
|
||||
- char hiscall[12];
|
||||
- char hisgrid[6];
|
||||
+ char datetime[21];
|
||||
+ char mycall[13];
|
||||
+ char mygrid[7];
|
||||
+ char hiscall[13];
|
||||
+ char hisgrid[7];
|
||||
} params;
|
||||
} dec_data;
|
||||
|
||||
diff --git a/wsjtx/lib/Makefile.linux b/wsjtx/lib/Makefile.linux
|
||||
index 14bc077..ea56b42 100644
|
||||
--- a/wsjtx/lib/Makefile.linux
|
||||
+++ b/wsjtx/lib/Makefile.linux
|
||||
@@ -39,7 +39,7 @@ OBJS1 = astrosub.o astro0.o astro.o tm2.o sun.o moondop.o coord.o tmoonsub.o \
|
||||
symspec.o analytic.o db.o genjt9.o jt9fano.o \
|
||||
packbits.o unpackbits.o encode232.o interleave9.o \
|
||||
entail.o fano232.o gran.o sync9.o decjt9.o \
|
||||
- fil3.o decoder.o grid2n.o n2grid.o timer.o \
|
||||
+ fil3.o strconvert_module.o decoder.o grid2n.o n2grid.o timer.o \
|
||||
softsym.o peakdt9.o getlags.o afc9.o fchisq.o \
|
||||
twkfreq.o downsam9.o symspec2.o ipcomm.o sleep_msec.o \
|
||||
stdmsg.o sec_midn.o usleep.o azdist.o geodist.o morse.o \
|
||||
diff --git a/wsjtx/lib/decoder.f90 b/wsjtx/lib/decoder.f90
|
||||
index 2035703..54ef31b 100644
|
||||
--- a/wsjtx/lib/decoder.f90
|
||||
+++ b/wsjtx/lib/decoder.f90
|
||||
@@ -3,6 +3,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
!$ use omp_lib
|
||||
use prog_args
|
||||
use timer_module, only: timer
|
||||
+ use strconvert_module
|
||||
use jt4_decode
|
||||
use jt65_decode
|
||||
use jt9_decode
|
||||
@@ -11,6 +12,11 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
include 'jt9com.f90'
|
||||
include 'timer_common.inc'
|
||||
|
||||
+ character*12 :: mycall
|
||||
+ character*6 :: mygrid
|
||||
+ character*12 :: hiscall
|
||||
+ character*6 :: hisgrid
|
||||
+
|
||||
type, extends(jt4_decoder) :: counting_jt4_decoder
|
||||
integer :: decoded
|
||||
end type counting_jt4_decoder
|
||||
@@ -38,6 +44,11 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
type(counting_jt9_decoder) :: my_jt9
|
||||
type(counting_ft8_decoder) :: my_ft8
|
||||
|
||||
+ call str_c2f(params%mycall, mycall)
|
||||
+ call str_c2f(params%mygrid, mygrid)
|
||||
+ call str_c2f(params%hiscall, hiscall)
|
||||
+ call str_c2f(params%hisgrid, hisgrid)
|
||||
+
|
||||
! initialize decode counts
|
||||
my_jt4%decoded = 0
|
||||
my_jt65%decoded = 0
|
||||
@@ -49,7 +60,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
if(mod(params%nranera,2).eq.0) ntrials=10**(params%nranera/2)
|
||||
if(mod(params%nranera,2).eq.1) ntrials=3*10**(params%nranera/2)
|
||||
if(params%nranera.eq.0) ntrials=0
|
||||
-
|
||||
+
|
||||
nfail=0
|
||||
10 if (params%nagain) then
|
||||
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown', &
|
||||
@@ -77,7 +88,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
|
||||
params%nexp_decode,params%ndepth,logical(params%nagain), &
|
||||
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
|
||||
- params%mycall,params%mygrid,params%hiscall,params%hisgrid)
|
||||
+ mycall,mygrid,hiscall,hisgrid)
|
||||
call timer('decft8 ',1)
|
||||
if(nfox.gt.0) then
|
||||
n30min=minval(n30fox(1:nfox))
|
||||
@@ -99,7 +110,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
nfreqfox(j)=nfreqfox(i)
|
||||
n30fox(j)=n
|
||||
m=n30max-n
|
||||
- call azdist(params%mygrid,g2fox(j),0.d0,nAz,nEl,nDmiles,nDkm, &
|
||||
+ call azdist(mygrid,g2fox(j),0.d0,nAz,nEl,nDmiles,nDkm, &
|
||||
nHotAz,nHotABetter)
|
||||
write(19,1004) c2fox(j),g2fox(j),nsnrfox(j),nfreqfox(j),nDkm,m
|
||||
1004 format(a12,1x,a4,i5,i6,i7,i3)
|
||||
@@ -151,8 +162,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
call my_jt4%decode(jt4_decoded,dd,jz,params%nutc,params%nfqso, &
|
||||
params%ntol,params%emedelay,params%dttol,logical(params%nagain), &
|
||||
params%ndepth,logical(params%nclearave),params%minsync, &
|
||||
- params%minw,params%nsubmode,params%mycall,params%hiscall, &
|
||||
- params%hisgrid,params%nlist,params%listutc,jt4_average)
|
||||
+ params%minw,params%nsubmode,mycall,hiscall, &
|
||||
+ hisgrid,params%nlist,params%listutc,jt4_average)
|
||||
go to 800
|
||||
endif
|
||||
|
||||
@@ -184,8 +195,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
nf1,nf2,params%nfqso,ntol65,params%nsubmode,params%minsync, &
|
||||
logical(params%nagain),params%n2pass,logical(params%nrobust), &
|
||||
ntrials,params%naggressive,params%ndepth,params%emedelay, &
|
||||
- logical(params%nclearave),params%mycall,params%hiscall, &
|
||||
- params%hisgrid,params%nexp_decode,params%nQSOProgress, &
|
||||
+ logical(params%nclearave),mycall,hiscall, &
|
||||
+ hisgrid,params%nexp_decode,params%nQSOProgress, &
|
||||
logical(params%ljt65apon))
|
||||
call timer('jt65a ',1)
|
||||
|
||||
@@ -210,8 +221,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
nf1,nf2,params%nfqso,ntol65,params%nsubmode,params%minsync, &
|
||||
logical(params%nagain),params%n2pass,logical(params%nrobust), &
|
||||
ntrials,params%naggressive,params%ndepth,params%emedelay, &
|
||||
- logical(params%nclearave),params%mycall,params%hiscall, &
|
||||
- params%hisgrid,params%nexp_decode,params%nQSOProgress, &
|
||||
+ logical(params%nclearave),mycall,hiscall, &
|
||||
+ hisgrid,params%nexp_decode,params%nQSOProgress, &
|
||||
logical(params%ljt65apon))
|
||||
call timer('jt65a ',1)
|
||||
else
|
||||
@@ -489,10 +500,10 @@ contains
|
||||
c1=decoded0(1:i1-1)//' '
|
||||
c2=decoded0(i1+1:i2-1)
|
||||
g2=decoded0(i2+1:i3-1)
|
||||
- b0=c1.eq.params%mycall
|
||||
- if(len(trim(c1)).ne.len(trim(params%mycall))) then
|
||||
- i4=index(trim(c1),trim(params%mycall))
|
||||
- i5=index(trim(params%mycall),trim(c1))
|
||||
+ b0=c1.eq.mycall
|
||||
+ if(len(trim(c1)).ne.len(trim(mycall))) then
|
||||
+ i4=index(trim(c1),trim(mycall))
|
||||
+ i5=index(trim(mycall),trim(c1))
|
||||
if(i4.ge.1 .or. i5.ge.1) b0=.true.
|
||||
endif
|
||||
b1=i3-i2.eq.5 .and. isgrid4(g2)
|
||||
diff --git a/wsjtx/lib/jt9.f90 b/wsjtx/lib/jt9.f90
|
||||
index 7849726..4c0225c 100644
|
||||
--- a/wsjtx/lib/jt9.f90
|
||||
+++ b/wsjtx/lib/jt9.f90
|
||||
@@ -8,6 +8,7 @@ program jt9
|
||||
use, intrinsic :: iso_c_binding
|
||||
use FFTW3
|
||||
use timer_module, only: timer
|
||||
+ use strconvert_module
|
||||
use timer_impl, only: init_timer, fini_timer
|
||||
use readwav
|
||||
|
||||
@@ -278,13 +279,13 @@ program jt9
|
||||
shared_data%params%nranera=6 !### ntrials=3000
|
||||
shared_data%params%nrobust=.false.
|
||||
shared_data%params%nexp_decode=nexp_decode
|
||||
- shared_data%params%mycall=mycall
|
||||
- shared_data%params%mygrid=mygrid
|
||||
- shared_data%params%hiscall=hiscall
|
||||
- shared_data%params%hisgrid=hisgrid
|
||||
- if (shared_data%params%mycall == '') shared_data%params%mycall='K1ABC'
|
||||
- if (shared_data%params%hiscall == '') shared_data%params%hiscall='W9XYZ'
|
||||
- if (shared_data%params%hisgrid == '') shared_data%params%hiscall='EN37'
|
||||
+ if (mycall == '') mycall='K1ABC'
|
||||
+ if (hiscall == '') hiscall='W9XYZ'
|
||||
+ if (hisgrid == '') hisgrid='EN37'
|
||||
+ call str_f2c(mycall, shared_data%params%mycall)
|
||||
+ call str_f2c(mygrid, shared_data%params%mygrid)
|
||||
+ call str_f2c(hiscall, shared_data%params%hiscall)
|
||||
+ call str_f2c(hisgrid, shared_data%params%hisgrid)
|
||||
if (tx9) then
|
||||
shared_data%params%ntxmode=9
|
||||
else
|
||||
diff --git a/wsjtx/lib/jt9com.f90 b/wsjtx/lib/jt9com.f90
|
||||
index be44f3b..c595582 100644
|
||||
--- a/wsjtx/lib/jt9com.f90
|
||||
+++ b/wsjtx/lib/jt9com.f90
|
||||
@@ -41,11 +41,11 @@
|
||||
integer(c_int) :: naggressive
|
||||
logical(c_bool) :: nrobust
|
||||
integer(c_int) :: nexp_decode
|
||||
- character(kind=c_char, len=20) :: datetime
|
||||
- character(kind=c_char, len=12) :: mycall
|
||||
- character(kind=c_char, len=6) :: mygrid
|
||||
- character(kind=c_char, len=12) :: hiscall
|
||||
- character(kind=c_char, len=6) :: hisgrid
|
||||
+ character(kind=c_char) :: datetime(20)
|
||||
+ character(kind=c_char) :: mycall(12)
|
||||
+ character(kind=c_char) :: mygrid(6)
|
||||
+ character(kind=c_char) :: hiscall(12)
|
||||
+ character(kind=c_char) :: hisgrid(6)
|
||||
end type params_block
|
||||
|
||||
type, bind(C) :: dec_data
|
||||
diff --git a/wsjtx/lib/strconvert_module.f90 b/wsjtx/lib/strconvert_module.f90
|
||||
new file mode 100644
|
||||
index 0000000..50b21b5
|
||||
--- /dev/null
|
||||
+++ b/wsjtx/lib/strconvert_module.f90
|
||||
@@ -0,0 +1,37 @@
|
||||
+module strconvert_module
|
||||
+ implicit none
|
||||
+
|
||||
+ public :: str_f2c, str_c2f
|
||||
+
|
||||
+contains
|
||||
+ subroutine str_f2c(str_f, str_c)
|
||||
+ use, intrinsic :: iso_c_binding, only: c_char, c_null_char
|
||||
+ implicit none
|
||||
+ character(len=*), intent(in) :: str_f
|
||||
+ character(kind=c_char), bind(C), intent(out) :: str_c(*)
|
||||
+ integer :: i
|
||||
+
|
||||
+ do i = 1, len_trim(str_f)
|
||||
+ str_c(i) = str_f(i:i + 1)
|
||||
+ end do
|
||||
+ str_c(i) = c_null_char
|
||||
+ end subroutine str_f2c
|
||||
+
|
||||
+ subroutine str_c2f(str_c, str_f)
|
||||
+ use, intrinsic :: iso_c_binding, only: c_char, c_null_char
|
||||
+ implicit none
|
||||
+ character(kind=c_char), bind(C), intent(in) :: str_c(*)
|
||||
+ character(len=*), intent(out) :: str_f
|
||||
+ integer :: i
|
||||
+
|
||||
+ str_f = ""
|
||||
+ i = 1
|
||||
+ do
|
||||
+ if (str_c(i) == c_null_char) then
|
||||
+ return
|
||||
+ endif
|
||||
+ str_f = trim(str_f) // trim(str_c(i))
|
||||
+ i = i + 1
|
||||
+ end do
|
||||
+ end subroutine str_c2f
|
||||
+end module strconvert_module
|
||||
diff --git a/wsjtx/wsjtx_config.h.in b/wsjtx/wsjtx_config.h.in
|
||||
index 80ac160..599038a 100644
|
||||
--- a/wsjtx/wsjtx_config.h.in
|
||||
+++ b/wsjtx/wsjtx_config.h.in
|
||||
@@ -44,6 +44,7 @@ extern "C" {
|
||||
|
||||
/* typedef for consistent gfortran ABI for charlen type hidden arguments */
|
||||
#if __GNUC__ > 7
|
||||
+#include <stddef.h>
|
||||
typedef size_t fortran_charlen_t;
|
||||
#else
|
||||
typedef int fortran_charlen_t;
|
||||
--
|
||||
2.13.6
|
||||
|
21
wsjtx.spec
21
wsjtx.spec
@ -1,13 +1,15 @@
|
||||
#%%global rctag rc2
|
||||
%global rctag rc2
|
||||
|
||||
Name: wsjtx
|
||||
Version: 1.8.0
|
||||
Release: 3%{?rctag:.%{rctag}}%{?dist}.1
|
||||
Version: 1.9.0
|
||||
Release: 0.1%{?rctag:.%{rctag}}%{?dist}
|
||||
Summary: Weak Signal communication by K1JT
|
||||
License: GPLv3+
|
||||
URL: http://physics.princeton.edu/pulsar/k1jt/wsjtx.html
|
||||
Source0: http://physics.princeton.edu/pulsar/k1jt/%{name}-%{version}%{?rctag:-%{rctag}}.tgz
|
||||
Patch0: wsjtx-1.8.0-compile-fix.patch
|
||||
Patch0: wsjtx-1.9.0.rc2-compile-fix.patch
|
||||
# Patch sent upstream
|
||||
Patch1: wsjtx-1.9.0.rc2-gcc-8.0.1-compile-fix.patch
|
||||
BuildRequires: dos2unix, tar, cmake, gcc-c++, gcc-gfortran, qt5-devel
|
||||
BuildRequires: desktop-file-utils, hamlib-devel, fftw-devel, libusbx-devel
|
||||
BuildRequires: boost-devel, portaudio-devel, asciidoc, rubygem-asciidoctor
|
||||
@ -27,7 +29,11 @@ from the Moon.
|
||||
rm -f src/hamlib.tgz*
|
||||
tar -xzf src/%{name}.tgz
|
||||
|
||||
# remove archive
|
||||
rm -f src/wsjtx.tgz*
|
||||
|
||||
%patch0 -p1 -b .compile-fix
|
||||
%patch1 -p1 -b .gcc-8.0.1-compile-fix.patch
|
||||
|
||||
cd %{name}
|
||||
|
||||
@ -74,6 +80,7 @@ install -p -m 0644 -t %{buildroot}%{_datadir}/doc/%{name} GUIcontrols.txt jt9.tx
|
||||
%{_bindir}/jt65code
|
||||
%{_bindir}/jt9
|
||||
%{_bindir}/jt9code
|
||||
%{_bindir}/ft8code
|
||||
%{_bindir}/message_aggregator
|
||||
%{_bindir}/msk144code
|
||||
%{_bindir}/qra64code
|
||||
@ -89,6 +96,12 @@ install -p -m 0644 -t %{buildroot}%{_datadir}/doc/%{name} GUIcontrols.txt jt9.tx
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Fri Mar 16 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 1.9.0-0.1.rc2
|
||||
- New version
|
||||
- Fixed compilation with gcc-8.0.1
|
||||
Resolves: rhbz#1556544
|
||||
- De-fuzzified compile-fix patch
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-3.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user