[hamradio-commits] [freedv] 01/02: Packaging for freedv 1.1.0.3026-1
Maitland Bottoms
bottoms at moszumanska.debian.org
Sun Sep 3 23:26:32 UTC 2017
This is an automated email from the git hooks/post-receive script.
bottoms pushed a commit to branch experimental
in repository freedv.
commit 681c9297c93c153647346f905b15375a0ac1bdcb
Author: A. Maitland Bottoms <bottoms at debian.org>
Date: Sun Feb 12 19:12:46 2017 -0500
Packaging for freedv 1.1.0.3026-1
---
debian/changelog | 7 ++
debian/control | 1 -
debian/copyright | 7 +-
debian/freedv.1 | 6 +-
debian/patches/HID-PTT | 19 ++--
debian/patches/HID-PTT.2 | 167 ++++++++++++++++++++++++++++++++++
debian/patches/debian-uses-system-sox | 38 ++++++++
debian/patches/debian-version | 41 +++++++++
debian/patches/link-with-libXxf86vm | 2 +-
debian/patches/series | 3 +
debian/patches/use-private-codec2 | 86 +++++++++++++++++
debian/rules | 9 +-
12 files changed, 367 insertions(+), 19 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index f9c17c9..a0a484d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+freedv (1.1.0.3026-1) experimental; urgency=low
+
+ * New upstream experimental trials - svn 3026
+ * Highlights: FreeDV 1.2 / Codec2 0.6 test release
+
+ -- A. Maitland Bottoms <bottoms at debian.org> Sun, 29 Jan 2017 16:07:00 -0500
+
freedv (1.1-1) unstable; urgency=medium
* New upstream release, new Voice Keyer feature
diff --git a/debian/control b/debian/control
index 426a357..027ebf3 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,6 @@ Priority: optional
Maintainer: A. Maitland Bottoms <bottoms at debian.org>
Build-Depends: cmake,
debhelper (>= 9~),
- libcodec2-dev (>= 0.5),
libhamlib-dev,
libsamplerate-dev,
libsndfile-dev,
diff --git a/debian/copyright b/debian/copyright
index e59477a..0e6239c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -14,12 +14,13 @@ Comment:
Dave Witten <wittend at wwrinc.com>
Richard Shaw
.
+ Project began licensed GPL-3, but SVN commit 643 changed to
+ LGPL-2.1 as work continues to provide a FreeDV API using LGPL-2.1
+ for use in adding FreeDV communications to other applications.
+ .
See the credits.txt file for a more complete list of contributors.
Copyright: 2001-2012 Free Software Foundation, Inc.
License: LGPL-2.1
-Comment: project began licensed GPL-3, but SVN commit 643 changed to
- LGPL-2.1 as work continues to provide a FreeDV API using LGPL-2.1
- for use in adding FreeDV communications to other applications.
Files: */CMakeLists.txt
Copyright: 2013-2014 Richard Shaw
diff --git a/debian/freedv.1 b/debian/freedv.1
index fea700b..d0d42ab 100644
--- a/debian/freedv.1
+++ b/debian/freedv.1
@@ -12,9 +12,9 @@ decoded by FreeDV.
.PP
FreeDV was built by an international team of Radio Amateurs working
together on coding, design, user interface and testing. FreeDV is open
-source software, released under the GNU Public License version
-2.1. The FDMDV modem and Codec 2 Speech codec used in FreeDV are also
-open source.
+source software, released under the GNU Lesser General Public License
+version 2.1. The FDMDV modem and Codec 2 Speech codec used in FreeDV
+are also open source.
.PP
.SH New Upgrade as of March 2013
The new version 0.96 provides a 1600 bit\-per\-second mode that
diff --git a/debian/patches/HID-PTT b/debian/patches/HID-PTT
index 5bfd950..a674707 100644
--- a/debian/patches/HID-PTT
+++ b/debian/patches/HID-PTT
@@ -16,7 +16,7 @@
#include <samplerate.h>
#include <hamlib.h>
-@@ -186,6 +195,9 @@
+@@ -188,6 +197,9 @@
bool m_boolUseSerialPTT;
wxString m_strRigCtrlPort;
@@ -26,7 +26,7 @@
bool m_boolUseRTS;
bool m_boolRTSPos;
bool m_boolUseDTR;
-@@ -406,6 +418,11 @@
+@@ -424,6 +436,11 @@
txRxThread* m_txRxThread;
bool OpenHamlibRig();
@@ -201,7 +201,7 @@
void ComPortsDlg::PTTUseSerialClicked(wxCommandEvent& event)
--- a/src/fdmdv2_main.cpp
+++ b/src/fdmdv2_main.cpp
-@@ -359,6 +359,10 @@
+@@ -432,6 +432,10 @@
wxGetApp().m_intHamlibRig = pConfig->ReadLong("/Hamlib/RigName", 0);
wxGetApp().m_strHamlibSerialPort = pConfig->Read("/Hamlib/SerialPort", "");
@@ -212,7 +212,7 @@
wxGetApp().m_boolUseSerialPTT = pConfig->ReadBool(wxT("/Rig/UseSerialPTT"), false);
wxGetApp().m_strRigCtrlPort = pConfig->Read(wxT("/Rig/Port"), wxT(""));
wxGetApp().m_boolUseRTS = pConfig->ReadBool(wxT("/Rig/UseRTS"), true);
-@@ -1473,6 +1477,14 @@
+@@ -1576,6 +1580,14 @@
}
@@ -227,7 +227,7 @@
// reset level gauge
m_maxLevel = 0;
-@@ -2144,6 +2156,9 @@
+@@ -2254,6 +2266,9 @@
OpenHamlibRig();
wxGetApp().m_hamlib->close();
}
@@ -237,7 +237,7 @@
if (wxGetApp().m_boolUseSerialPTT) {
SetupSerialPort();
CloseSerialPort();
-@@ -2410,6 +2425,9 @@
+@@ -2518,6 +2533,9 @@
}
}
@@ -247,11 +247,10 @@
if (wxGetApp().m_boolUseSerialPTT)
CloseSerialPort();
-@@ -3898,3 +3916,84 @@
- foff_phase_rect->real /= mag;
- foff_phase_rect->imag /= mag;
+@@ -4117,3 +4135,83 @@
+ return 0;
}
-+
+
+//----------------------------------------------------------------
+// HIDPTT(int pushed)
+//----------------------------------------------------------------
diff --git a/debian/patches/HID-PTT.2 b/debian/patches/HID-PTT.2
new file mode 100644
index 0000000..db92526
--- /dev/null
+++ b/debian/patches/HID-PTT.2
@@ -0,0 +1,167 @@
+@@ -4074,3 +4077,84 @@
+
+ return 0;
+ }
++
++//----------------------------------------------------------------
++// HIDPTT(int pushed)
++//----------------------------------------------------------------
++void MainFrame::HIDPTT(int pushed)
++{
++#ifdef HAVE_LINUX_HIDRAW_H
++ if (m_hidPort>0) {
++ // Build two packets for CM108 HID. One turns a GPIO bit on. The other turns it off.
++ // Packet is 4 bytes, preceded by a 'report number' byte
++ // 0x00 report number
++ // Write data packet (from CM108 documentation)
++ // byte 0: 00xx xxxx Write GPIO
++ // byte 1: xxxx dcba GPIO3-0 output values (1=high)
++ // byte 2: xxxx dcba GPIO3-0 data-direction register (1=output)
++ // byte 3: xxxx xxxx SPDIF
++
++ char out_rep[] = {
++ 0x00, // report number
++ // HID output report
++ 0x00,
++ (char)(pushed ? (1 << m_hidGPIO) : 0), // set GPIO
++ (char)(1 << m_hidGPIO), // Data direction register (1=output)
++ 0x00
++ };
++
++ // printf("HIDPTT: using gpio=%d\n", m_hidGPIO);
++ // printf("HIDPTT: ptt state=%d\n", pushed ? (1 << m_hidGPIO) : 0);
++ if (write(m_hidPort, out_rep, sizeof(out_rep)) < 0) {
++ printf("HIDPTT: CM108 write error\n");
++ }
++ }
++#endif
++}
++
++//----------------------------------------------------------------
++// SetupHIDPort()
++//----------------------------------------------------------------
++void MainFrame::SetupHIDPort(void)
++{
++#ifdef HAVE_LINUX_HIDRAW_H
++ struct hidraw_devinfo hiddevinfo;
++
++ if(!wxGetApp().m_strRigHidPort.IsEmpty())
++ {
++ m_hidGPIO = 0x0f & wxAtoi(wxGetApp().m_strRigHidBit);
++ m_hidPort = open(wxGetApp().m_strRigHidPort.c_str(),O_RDWR,0);
++ // 0x0d8c is the vendor id of CMedia USB sound devices that may have HID GPIO features
++ if ((m_hidPort >=0)&&(!ioctl(m_hidPort, HIDIOCGRAWINFO, &hiddevinfo) && hiddevinfo.vendor == 0x0d8c))
++ {
++ // always start with PTT cleared
++ HIDPTT(0);
++ //m_btnTogPTT->Enable(true);
++ m_btnTogPTT->SetValue(false);
++ }
++ else
++ {
++#endif
++ m_hidPort = -1;
++ m_hidGPIO = -1;
++ //m_btnTogPTT->Disable();
++#ifdef HAVE_LINUX_HIDRAW_H
++ }
++ }
++#endif
++}
++
++//----------------------------------------------------------------
++// CloseHIDPort()
++//----------------------------------------------------------------
++void MainFrame::CloseHIDPort(void)
++{
++ if(m_hidPort != 0)
++ {
++ close(m_hidPort);
++ m_hidPort = 0;
++ m_hidGPIO = -1;
++ //m_btnTogPTT->SetLabel(wxT("PTT"));
++ //m_btnTogPTT->Enable(false);
++ }
++}
+
+
+//----------------------------------------------------------------
+// HIDPTT(int pushed)
+//----------------------------------------------------------------
+void MainFrame::HIDPTT(int pushed)
+{
+#ifdef HAVE_LINUX_HIDRAW_H
+ if (m_hidPort>0) {
+ // Build two packets for CM108 HID. One turns a GPIO bit on. The other turns it off.
+ // Packet is 4 bytes, preceded by a 'report number' byte
+ // 0x00 report number
+ // Write data packet (from CM108 documentation)
+ // byte 0: 00xx xxxx Write GPIO
+ // byte 1: xxxx dcba GPIO3-0 output values (1=high)
+ // byte 2: xxxx dcba GPIO3-0 data-direction register (1=output)
+ // byte 3: xxxx xxxx SPDIF
+
+ char out_rep[] = {
+ 0x00, // report number
+ // HID output report
+ 0x00,
+ (char)(pushed ? (1 << m_hidGPIO) : 0), // set GPIO
+ (char)(1 << m_hidGPIO), // Data direction register (1=output)
+ 0x00
+ };
+
+ // printf("HIDPTT: using gpio=%d\n", m_hidGPIO);
+ // printf("HIDPTT: ptt state=%d\n", pushed ? (1 << m_hidGPIO) : 0);
+ if (write(m_hidPort, out_rep, sizeof(out_rep)) < 0) {
+ printf("HIDPTT: CM108 write error\n");
+ }
+ }
+#endif
+}
+
+//----------------------------------------------------------------
+// SetupHIDPort()
+//----------------------------------------------------------------
+void MainFrame::SetupHIDPort(void)
+{
+#ifdef HAVE_LINUX_HIDRAW_H
+ struct hidraw_devinfo hiddevinfo;
+
+ if(!wxGetApp().m_strRigHidPort.IsEmpty())
+ {
+ m_hidGPIO = 0x0f & wxAtoi(wxGetApp().m_strRigHidBit);
+ m_hidPort = open(wxGetApp().m_strRigHidPort.c_str(),O_RDWR,0);
+ // 0x0d8c is the vendor id of CMedia USB sound devices that may have HID GPIO features
+ if ((m_hidPort >=0)&&(!ioctl(m_hidPort, HIDIOCGRAWINFO, &hiddevinfo) && hiddevinfo.vendor == 0x0d8c))
+ {
+ // always start with PTT cleared
+ HIDPTT(0);
+ //m_btnTogPTT->Enable(true);
+ m_btnTogPTT->SetValue(false);
+ }
+ else
+ {
+#endif
+ m_hidPort = -1;
+ m_hidGPIO = -1;
+ //m_btnTogPTT->Disable();
+#ifdef HAVE_LINUX_HIDRAW_H
+ }
+ }
+#endif
+}
+
+//----------------------------------------------------------------
+// CloseHIDPort()
+//----------------------------------------------------------------
+void MainFrame::CloseHIDPort(void)
+{
+ if(m_hidPort != 0)
+ {
+ close(m_hidPort);
+ m_hidPort = 0;
+ m_hidGPIO = -1;
+ //m_btnTogPTT->SetLabel(wxT("PTT"));
+ //m_btnTogPTT->Enable(false);
+ }
+}
diff --git a/debian/patches/debian-uses-system-sox b/debian/patches/debian-uses-system-sox
new file mode 100644
index 0000000..ed9a2c0
--- /dev/null
+++ b/debian/patches/debian-uses-system-sox
@@ -0,0 +1,38 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -28,22 +28,6 @@
+ fdmdv2_plot_spectrum.h
+ fdmdv2_plot_waterfall.h
+ hamlib.h
+- sox_biquad.h
+- sox/band.h
+- sox/biquad.c
+- sox/biquads.c
+- sox/biquad.h
+- sox/effects.c
+- sox/effects.h
+- sox/effects_i.c
+- sox/formats_i.c
+- sox/libsox.c
+- sox/sox.h
+- sox/sox_i.h
+- sox/soxomp.h
+- sox/util.h
+- sox/xmalloc.h
+- sox/xmalloc.c
+ topFrame.h
+ version.h
+ )
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -180,8 +180,8 @@
+ add_definitions(-DHAVE_CONFIG_H)
+
+ # Config file for bundled sox sources
+-configure_file("${PROJECT_SOURCE_DIR}/cmake/soxconfig.h.in"
+- "${PROJECT_BINARY_DIR}/soxconfig.h")
++#configure_file("${PROJECT_SOURCE_DIR}/cmake/soxconfig.h.in"
++# "${PROJECT_BINARY_DIR}/soxconfig.h")
+
+ # Pthread Library
+ find_package(Threads REQUIRED)
diff --git a/debian/patches/debian-version b/debian/patches/debian-version
new file mode 100644
index 0000000..7ada703
--- /dev/null
+++ b/debian/patches/debian-version
@@ -0,0 +1,41 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,7 +49,7 @@
+ message(STATUS "Build type not specified, defaulting to ${CMAKE_BUILD_TYPE}")
+ endif(NOT CMAKE_BUILD_TYPE)
+
+-
++set(DEB_VERSION "" CACHE STRING "Debian packages build with this setting")
+ # Work around for not using a svn working copy.
+ add_definitions(-D_NO_AUTOTOOLS_)
+ find_program(SVNVERSION_PATH svnversion)
+@@ -63,13 +63,17 @@
+ else()
+ set(SVN_REVISION_RESULT 1)
+ endif()
++if (NOT (${DEB_VERSION} STREQUAL ""))
++ add_definitions(-DSVN_REVISION="${DEB_VERSION}")
++ message(STATUS "Debian FreeDV version: ${DEB_VERSION}")
++else()
+ if(SVN_REVISION_RESULT EQUAL 0)
+ string(STRIP ${SVN_CURRENT_REVISION} SVN_REVISION)
+ add_definitions(-DSVN_REVISION="${SVN_REVISION}")
+ else()
+ add_definitions(-DSVN_REVISION="Unversioned directory")
+ endif()
+-
++endif()
+
+ # Set default build flags.
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+--- a/src/fdmdv2_main.cpp
++++ b/src/fdmdv2_main.cpp
+@@ -2333,7 +2333,7 @@
+
+ wxT("GNU Public License V2.1\n\n")
+ wxT("Copyright (c) David Witten KD0EAG and David Rowe VK5DGR\n\n")
+- wxT("svn revision: %s\n"), FREEDV_VERSION, SVN_REVISION);
++ wxT("Debian package version: %s\n"), FREEDV_VERSION, SVN_REVISION);
+
+ wxMessageBox(msg, wxT("About"), wxOK | wxICON_INFORMATION, this);
+ }
diff --git a/debian/patches/link-with-libXxf86vm b/debian/patches/link-with-libXxf86vm
index b3d714e..8b94e97 100644
--- a/debian/patches/link-with-libXxf86vm
+++ b/debian/patches/link-with-libXxf86vm
@@ -1,6 +1,6 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -416,6 +416,12 @@
+@@ -360,6 +360,12 @@
if(wxWidgets_FOUND)
include("${wxWidgets_USE_FILE}")
list(APPEND FREEDV_LINK_LIBS ${wxWidgets_LIBRARIES})
diff --git a/debian/patches/series b/debian/patches/series
index 062f20d..cb209c0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,5 @@
HID-PTT
link-with-libXxf86vm
+use-private-codec2
+debian-uses-system-sox
+debian-version
diff --git a/debian/patches/use-private-codec2 b/debian/patches/use-private-codec2
new file mode 100644
index 0000000..d1f9e64
--- /dev/null
+++ b/debian/patches/use-private-codec2
@@ -0,0 +1,86 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -190,38 +190,19 @@
+ #
+ # Find codec2
+ #
+-if(NOT USE_STATIC_CODEC2)
+- message(STATUS "Looking for codec2...")
+- # 'CONFIG' removed due to incompatibility with cmake version
+- # in Ubuntu 12.04 (Precise) -- Stuart Longland
+- find_package(codec2 QUIET)
+- if(codec2_FOUND)
+- get_target_property(CODEC2_LIBRARY codec2 LOCATION)
+- message(STATUS " codec2 library: ${CODEC2_LIBRARY}")
+- message(STATUS " codec2 headers: ${codec2_INCLUDE_DIRS}")
+- else()
+- # Try to find manually
+- find_path(CODEC2_INCLUDE_DIRS codec2.h
+- PATH_SUFFIXES codec2)
+- find_library(CODEC2_LIBRARY NAMES codec2)
+- if(CODEC2_LIBRARY AND CODEC2_INCLUDE_DIRS)
+- message(STATUS " codec2 library: ${CODEC2_LIBRARY}")
+- message(STATUS " codec2 headers: ${CODEC2_INCLUDE_DIRS}")
+- list(APPEND FREEDV_LINK_LIBS ${CODEC2_LIBRARY})
+- include_directories(${CODEC2_INCLUDE_DIRS})
+- else()
+- message(FATAL_ERROR "codec2 library not found.
+-Linux:
+-Codec2 may not be in your distribution so build yourself or use the cmake option to build statically into FreeDV.
+-Windws:
+-It's easiest to use the cmake option: USE_STATIC_CODEC2"
+- )
+- endif()
+- endif()
+-else(NOT USE_STATIC_CODEC2)
+- message(STATUS "Will attempt static build of codec2.")
+- include(cmake/BuildCodec2.cmake)
+-endif(NOT USE_STATIC_CODEC2)
++find_path(CODEC2_INCLUDE_DIRS codec2.h
++ HINTS Build/usr/include/
++ PATH_SUFFIXES codec2)
++find_library(CODEC2_LIBRARY NAMES codec2 libcodec2.a
++ HINTS Build/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/)
++if(CODEC2_LIBRARY AND CODEC2_INCLUDE_DIRS)
++ message(STATUS " codec2 library: ${CODEC2_LIBRARY}")
++ message(STATUS " codec2 headers: ${CODEC2_INCLUDE_DIRS}")
++ list(APPEND FREEDV_LINK_LIBS ${CODEC2_LIBRARY})
++ include_directories(${CODEC2_INCLUDE_DIRS})
++else()
++ message(FATAL_ERROR "codec2 library not found.")
++endif()
+
+ #
+ # Find or build portaudio Library
+@@ -296,6 +277,31 @@
+ include(cmake/BuildSamplerate.cmake)
+ endif(NOT USE_STATIC_SAMPLERATE)
+
++#
++# Find sox library
++#
++if(NOT USE_STATIC_SOX)
++ message(STATUS "Looking for sox...")
++ find_library(LIBSOX_LIBRARY sox)
++ find_path(LIBSOX_INCLUDE_DIR NAMES sox/sox.h sox.h)
++ message(STATUS " sox library: ${LIBSOX_LIBRARY}")
++ message(STATUS " sox headers: ${LIBSOX_INCLUDE_DIR}")
++ if(LIBSOX_LIBRARY AND LIBSOX_INCLUDE_DIR)
++ list(APPEND FREEDV_LINK_LIBS ${LIBSOX_LIBRARY})
++ include_directories(${LIBSOX_INCLUDE_DIR})
++ else(LIBSOX_LIBRARY AND LIBSOX_INCLUDE_DIR)
++ message(FATAL_ERROR "sox library not found.
++On Linux systems try installing:
++ sox-devel (RPM based systems)
++ libsox-dev (DEB based systems)
++On Windows it's easiest to use the cmake option: USE_STATIC_SOX"
++ )
++ endif(LIBSOX_LIBRARY AND LIBSOX_INCLUDE_DIR)
++else(NOT USE_STATIC_SOX)
++ message(STATUS "Will attempt static build of sox.")
++ include(cmake/BuildSox.cmake)
++endif(NOT USE_STATIC_SOX)
++
+ #
+ # sndfile Library
+ #
diff --git a/debian/rules b/debian/rules
index 1265281..873cc8f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,10 +1,17 @@
#!/usr/bin/make -f
+VER=$(shell dpkg-parsechangelog -ldebian/changelog | sed -rne 's,^Version: (.*),\1,p')
+export VER
%:
dh $@ --builddir=Build --build-system=cmake
override_dh_auto_configure:
- dh_auto_configure --builddirectory=Build --buildsystem=cmake -- -DUSE_STATIC_CODEC2=False -DUSE_STATIC_SPEEXDSP=False
+ mkdir Build
+ mkdir Build/codec2
+ dh_auto_configure --sourcedirectory=codec2 --builddirectory=Build/codec2 --buildsystem=cmake -- -DBUILD_SHARED_LIBS=OFF -DUNITTEST=OFF
+ cd Build/codec2 && make
+ cd Build/codec2 && make install DESTDIR=$(CURDIR)/Build
+ dh_auto_configure --builddirectory=Build --buildsystem=cmake -- -DDEB_VERSION=$(VER) -DCMAKE_BUILD_TYPE=Debug -DUSE_STATIC_SPEEXDSP=False
false_override_dh_auto_install:
dh_auto_install
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/freedv.git
More information about the pkg-hamradio-commits
mailing list