* [gentoo-commits] repo/gentoo:master commit in: media-radio/direwolf/files/, media-radio/direwolf/
@ 2017-12-22 13:23 Richard Freeman
0 siblings, 0 replies; 3+ messages in thread
From: Richard Freeman @ 2017-12-22 13:23 UTC (permalink / raw
To: gentoo-commits
commit: a22a196dc8261afc91f6b8b397e2ba48a3f56981
Author: Richard Freeman <rich0 <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 22 13:22:37 2017 +0000
Commit: Richard Freeman <rich0 <AT> gentoo <DOT> org>
CommitDate: Fri Dec 22 13:22:37 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a22a196d
media-radio/direwolf: introduce package from rich0 overlay
Package-Manager: Portage-2.3.14, Repoman-2.3.6
media-radio/direwolf/Manifest | 1 +
media-radio/direwolf/direwolf-1.4.ebuild | 39 +++++++++++
media-radio/direwolf/files/1.4-makefile.patch | 89 ++++++++++++++++++++++++
media-radio/direwolf/files/direwolf-kiss.service | 10 +++
media-radio/direwolf/files/direwolf.service | 10 +++
media-radio/direwolf/metadata.xml | 8 +++
6 files changed, 157 insertions(+)
diff --git a/media-radio/direwolf/Manifest b/media-radio/direwolf/Manifest
new file mode 100644
index 00000000000..53191833547
--- /dev/null
+++ b/media-radio/direwolf/Manifest
@@ -0,0 +1 @@
+DIST direwolf-1.4.tar.gz 17554878 BLAKE2B a8eea6777df93d66d67c993c23eba86f37ff1e23d95df842b17be1a9a0b83c4bb0b7b14b97f43a1756512d060e50136712d1d9d499b2567eabbe1092a2f5edf0 SHA512 597b0652e910642d5a3c538297e4306f9317c29b3629e7fd96cc33b92b2f09d743cea8b8a0cc6451347dc0877fcf1f3933a420ae58e33ad7be7d899f80036eb3
diff --git a/media-radio/direwolf/direwolf-1.4.ebuild b/media-radio/direwolf/direwolf-1.4.ebuild
new file mode 100644
index 00000000000..04a0995bbf2
--- /dev/null
+++ b/media-radio/direwolf/direwolf-1.4.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils systemd
+
+DESCRIPTION="Decoded Information from Radio Emissions for Windows Or Linux Fans"
+HOMEPAGE="https://github.com/wb2osz/direwolf/blob/master/README.md"
+SRC_URI="https://github.com/wb2osz/direwolf/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/alsa-lib:="
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES.md README.md doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf doc/APRS-Telemetry-Toolkit.pdf doc/APRStt-Implementation-Notes.pdf doc/APRStt-interface-for-SARTrack.pdf doc/APRStt-Listening-Example.pdf doc/Going-beyond-9600-baud.pdf doc/Raspberry-Pi-APRS.pdf doc/Raspberry-Pi-APRS-Tracker.pdf doc/Raspberry-Pi-SDR-IGate.pdf doc/README.md doc/Successful-APRS-IGate-Operation.pdf doc/User-Guide.pdf doc/WA8LMF-TNC-Test-CD-Results.pdf direwolf.conf dw-start.sh sdr.conf telemetry-toolkit/telem-m0xer-3.txt telemetry-toolkit/telem-balloon.conf telemetry-toolkit/telem-volts.conf )
+
+INSTALLDIR="${D}"
+
+src_prepare() {
+ eapply_user
+ epatch "${FILESDIR}/${PV}-makefile.patch"
+}
+
+src_install() {
+ dodir /usr
+ dodir /usr/bin
+ dodir /var/log/direwolf
+ emake DESTDIR="${D}" install
+ insinto /etc/direwolf/
+ doins direwolf.conf
+ einstalldocs
+ systemd_dounit "${FILESDIR}"/direwolf.service
+ systemd_dounit "${FILESDIR}"/direwolf-kiss.service
+}
diff --git a/media-radio/direwolf/files/1.4-makefile.patch b/media-radio/direwolf/files/1.4-makefile.patch
new file mode 100644
index 00000000000..6424d8a72cc
--- /dev/null
+++ b/media-radio/direwolf/files/1.4-makefile.patch
@@ -0,0 +1,89 @@
+--- direwolf-1.4-orig/Makefile.linux
++++ direwolf-1.4/Makefile.linux
+@@ -484,11 +484,12 @@ direwolf.conf : generic.conf
+ # This is a step in the right direction but not sufficient to use /usr instead.
+ # Eventually I'd like to have targets here to build the .DEB and .RPM packages.
+
+-INSTALLDIR := /usr/local
++DESTDIR ?= /usr/local
++INSTALLDIR ?= $(DESTDIR)usr/
+
+ # Command to "install" to system directories. Use "ginstall" for Mac.
+
+-INSTALL=install
++INSTALL=install
+
+ # direwolf.desktop was previously handcrafted for the Raspberry Pi.
+ # It was hardcoded with lxterminal, /home/pi, and so on.
+@@ -554,56 +555,37 @@ install : $(APPS) direwolf.conf tocalls.txt symbols-new.txt symbolsX.txt dw-icon
+ #
+ # Misc. data such as "tocall" to system mapping.
+ #
+- $(INSTALL) -D --mode=644 tocalls.txt /usr/share/direwolf/tocalls.txt
+- $(INSTALL) -D --mode=644 symbols-new.txt /usr/share/direwolf/symbols-new.txt
+- $(INSTALL) -D --mode=644 symbolsX.txt /usr/share/direwolf/symbolsX.txt
+- $(INSTALL) -D --mode=644 dw-icon.png /usr/share/direwolf/dw-icon.png
+- $(INSTALL) -D --mode=644 direwolf.desktop /usr/share/applications/direwolf.desktop
++ $(INSTALL) -D --mode=644 tocalls.txt $(INSTALLDIR)/share/direwolf/tocalls.txt
++ $(INSTALL) -D --mode=644 symbols-new.txt $(INSTALLDIR)/share/direwolf/symbols-new.txt
++ $(INSTALL) -D --mode=644 symbolsX.txt $(INSTALLDIR)/share/direwolf/symbolsX.txt
++ $(INSTALL) -D --mode=644 dw-icon.png $(INSTALLDIR)/share/direwolf/dw-icon.png
++ $(INSTALL) -D --mode=644 direwolf.desktop $(INSTALLDIR)/share/applications/direwolf.desktop
+ #
+ # Documentation. Various plain text files and PDF.
+ #
+- $(INSTALL) -D --mode=644 CHANGES.md $(INSTALLDIR)/share/doc/direwolf/CHANGES.md
+- $(INSTALL) -D --mode=644 LICENSE-dire-wolf.txt $(INSTALLDIR)/share/doc/direwolf/LICENSE-dire-wolf.txt
+- $(INSTALL) -D --mode=644 LICENSE-other.txt $(INSTALLDIR)/share/doc/direwolf/LICENSE-other.txt
+ #
+ # ./README.md is an overview for the project main page.
+ # doc/README.md contains an overview of the PDF file contents and is more useful here.
+ #
+- $(INSTALL) -D --mode=644 doc/README.md $(INSTALLDIR)/share/doc/direwolf/README.md
+- $(INSTALL) -D --mode=644 doc/User-Guide.pdf $(INSTALLDIR)/share/doc/direwolf/User-Guide.pdf
+- $(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS.pdf $(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-APRS.pdf
+- $(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS-Tracker.pdf $(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-APRS-Tracker.pdf
+- $(INSTALL) -D --mode=644 doc/Raspberry-Pi-SDR-IGate.pdf $(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-SDR-IGate.pdf
+- $(INSTALL) -D --mode=644 doc/APRStt-Implementation-Notes.pdf $(INSTALLDIR)/share/doc/direwolf/APRStt-Implementation-Notes.pdf
+- $(INSTALL) -D --mode=644 doc/APRStt-interface-for-SARTrack.pdf $(INSTALLDIR)/share/doc/direwolf/APRStt-interface-for-SARTrack.pdf
+- $(INSTALL) -D --mode=644 doc/APRS-Telemetry-Toolkit.pdf $(INSTALLDIR)/share/doc/direwolf/APRS-Telemetry-Toolkit.pdf
+- $(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf $(INSTALLDIR)/share/doc/direwolf/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf
+- $(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf $(INSTALLDIR)/share/doc/direwolf/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf
+ #
+ # Various sample config and other files go into examples under the doc directory.
+ # When building from source, these can be put in home directory with "make install-conf".
+ # When installed from .DEB or .RPM package, the user will need to copy these to
+ # the home directory or other desired location.
+ #
+- $(INSTALL) -D --mode=644 direwolf.conf $(INSTALLDIR)/share/doc/direwolf/examples/direwolf.conf
+- $(INSTALL) -D --mode=755 dw-start.sh $(INSTALLDIR)/share/doc/direwolf/examples/dw-start.sh
+- $(INSTALL) -D --mode=644 sdr.conf $(INSTALLDIR)/share/doc/direwolf/examples/sdr.conf
+- $(INSTALL) -D --mode=644 telemetry-toolkit/telem-m0xer-3.txt $(INSTALLDIR)/share/doc/direwolf/examples/telem-m0xer-3.txt
+- $(INSTALL) -D --mode=644 telemetry-toolkit/telem-balloon.conf $(INSTALLDIR)/share/doc/direwolf/examples/telem-balloon.conf
+- $(INSTALL) -D --mode=644 telemetry-toolkit/telem-volts.conf $(INSTALLDIR)/share/doc/direwolf/examples/telem-volts.conf
+ #
+ # "man" pages
+ #
+- $(INSTALL) -D --mode=644 man1/aclients.1 $(INSTALLDIR)/man/man1/aclients.1
+- $(INSTALL) -D --mode=644 man1/atest.1 $(INSTALLDIR)/man/man1/atest.1
+- $(INSTALL) -D --mode=644 man1/decode_aprs.1 $(INSTALLDIR)/man/man1/decode_aprs.1
+- $(INSTALL) -D --mode=644 man1/direwolf.1 $(INSTALLDIR)/man/man1/direwolf.1
+- $(INSTALL) -D --mode=644 man1/gen_packets.1 $(INSTALLDIR)/man/man1/gen_packets.1
+- $(INSTALL) -D --mode=644 man1/ll2utm.1 $(INSTALLDIR)/man/man1/ll2utm.1
+- $(INSTALL) -D --mode=644 man1/log2gpx.1 $(INSTALLDIR)/man/man1/log2gpx.1
+- $(INSTALL) -D --mode=644 man1/text2tt.1 $(INSTALLDIR)/man/man1/text2tt.1
+- $(INSTALL) -D --mode=644 man1/tt2text.1 $(INSTALLDIR)/man/man1/tt2text.1
+- $(INSTALL) -D --mode=644 man1/utm2ll.1 $(INSTALLDIR)/man/man1/utm2ll.1
++ $(INSTALL) -D --mode=644 man1/aclients.1 $(INSTALLDIR)/share/man/man1/aclients.1
++ $(INSTALL) -D --mode=644 man1/atest.1 $(INSTALLDIR)/share/man/man1/atest.1
++ $(INSTALL) -D --mode=644 man1/decode_aprs.1 $(INSTALLDIR)/share/man/man1/decode_aprs.1
++ $(INSTALL) -D --mode=644 man1/direwolf.1 $(INSTALLDIR)/share/man/man1/direwolf.1
++ $(INSTALL) -D --mode=644 man1/gen_packets.1 $(INSTALLDIR)/share/man/man1/gen_packets.1
++ $(INSTALL) -D --mode=644 man1/ll2utm.1 $(INSTALLDIR)/share/man/man1/ll2utm.1
++ $(INSTALL) -D --mode=644 man1/log2gpx.1 $(INSTALLDIR)/share/man/man1/log2gpx.1
++ $(INSTALL) -D --mode=644 man1/text2tt.1 $(INSTALLDIR)/share/man/man1/text2tt.1
++ $(INSTALL) -D --mode=644 man1/tt2text.1 $(INSTALLDIR)/share/man/man1/tt2text.1
++ $(INSTALL) -D --mode=644 man1/utm2ll.1 $(INSTALLDIR)/share/man/man1/utm2ll.1
+ #
+ @echo " "
+ @echo "If this is your first install, not an upgrade, type this to put a copy"
diff --git a/media-radio/direwolf/files/direwolf-kiss.service b/media-radio/direwolf/files/direwolf-kiss.service
new file mode 100644
index 00000000000..473feb246c3
--- /dev/null
+++ b/media-radio/direwolf/files/direwolf-kiss.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Dire Wolf
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/direwolf -l /var/log/direwolf -p
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-radio/direwolf/files/direwolf.service b/media-radio/direwolf/files/direwolf.service
new file mode 100644
index 00000000000..47eb3e7871b
--- /dev/null
+++ b/media-radio/direwolf/files/direwolf.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Dire Wolf
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/direwolf -l /var/log/direwolf
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-radio/direwolf/metadata.xml b/media-radio/direwolf/metadata.xml
new file mode 100644
index 00000000000..12bc9083384
--- /dev/null
+++ b/media-radio/direwolf/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>rich0@gentoo.org</email>
+ <description>Primary maintainer</description>
+</maintainer>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-radio/direwolf/files/, media-radio/direwolf/
@ 2020-10-23 19:59 Richard Freeman
0 siblings, 0 replies; 3+ messages in thread
From: Richard Freeman @ 2020-10-23 19:59 UTC (permalink / raw
To: gentoo-commits
commit: 851cb3b5ceb043715584d238e84b9fd69f7356c3
Author: Jannis Achstetter <kripton <AT> kripserver <DOT> net>
AuthorDate: Sun Sep 13 14:42:05 2020 +0000
Commit: Richard Freeman <rich0 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 19:52:50 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=851cb3b5
media-radio/direwolf: Bump to v1.5
Closes: https://bugs.gentoo.org/681666
Closes: https://bugs.gentoo.org/705100
Closes: https://bugs.gentoo.org/724720
Closes: https://bugs.gentoo.org/727636
Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Jannis Achstetter <kripton <AT> kripserver.net>
Closes: https://github.com/gentoo/gentoo/pull/17530
Signed-off-by: Richard Freeman <rich0 <AT> gentoo.org>
media-radio/direwolf/Manifest | 1 +
media-radio/direwolf/direwolf-1.5.ebuild | 59 +++++
media-radio/direwolf/files/1.5-makefile.patch | 295 +++++++++++++++++++++
.../direwolf/files/direwolf-gpsd-API-9.patch | 213 +++++++++++++++
media-radio/direwolf/metadata.xml | 12 +-
5 files changed, 577 insertions(+), 3 deletions(-)
diff --git a/media-radio/direwolf/Manifest b/media-radio/direwolf/Manifest
index 53191833547..04bed6f619c 100644
--- a/media-radio/direwolf/Manifest
+++ b/media-radio/direwolf/Manifest
@@ -1 +1,2 @@
DIST direwolf-1.4.tar.gz 17554878 BLAKE2B a8eea6777df93d66d67c993c23eba86f37ff1e23d95df842b17be1a9a0b83c4bb0b7b14b97f43a1756512d060e50136712d1d9d499b2567eabbe1092a2f5edf0 SHA512 597b0652e910642d5a3c538297e4306f9317c29b3629e7fd96cc33b92b2f09d743cea8b8a0cc6451347dc0877fcf1f3933a420ae58e33ad7be7d899f80036eb3
+DIST direwolf-1.5.tar.gz 17996557 BLAKE2B 6860075b764248f1e0ff06e2a533e2e31f65851ea45d74fb0aca11827940c6df0a8bab4b6b78aa98847ee54b2b344d3c5fc8da6947f9113d2fac6d3ea427d68b SHA512 c23e2ccebd47235f76a9583e14cf8e8df299b8f7456a6388534536e7b1114b3d9b9efee43da2c1708e01a0b9534db0ed93314368e20e9002bfcd5b3a2855d8a5
diff --git a/media-radio/direwolf/direwolf-1.5.ebuild b/media-radio/direwolf/direwolf-1.5.ebuild
new file mode 100644
index 00000000000..deaf27c9ab1
--- /dev/null
+++ b/media-radio/direwolf/direwolf-1.5.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils systemd
+
+DESCRIPTION="Decoded Information from Radio Emissions for Windows Or Linux Fans"
+HOMEPAGE="https://github.com/wb2osz/direwolf/blob/master/README.md"
+SRC_URI="https://github.com/wb2osz/direwolf/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gps hamlib udev"
+
+RDEPEND="
+ media-libs/alsa-lib:=
+ gps? ( sci-geosciences/gpsd )
+ hamlib? ( media-libs/hamlib )
+ udev? ( virtual/libudev )
+"
+BDEPEND="hamlib? ( virtual/pkgconfig )"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES.md README.md doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf doc/APRS-Telemetry-Toolkit.pdf doc/APRStt-Implementation-Notes.pdf doc/APRStt-interface-for-SARTrack.pdf doc/APRStt-Listening-Example.pdf doc/Going-beyond-9600-baud.pdf doc/Raspberry-Pi-APRS.pdf doc/Raspberry-Pi-APRS-Tracker.pdf doc/Raspberry-Pi-SDR-IGate.pdf doc/README.md doc/Successful-APRS-IGate-Operation.pdf doc/User-Guide.pdf doc/WA8LMF-TNC-Test-CD-Results.pdf direwolf.conf dw-start.sh sdr.conf telemetry-toolkit/telem-m0xer-3.txt telemetry-toolkit/telem-balloon.conf telemetry-toolkit/telem-volts.conf )
+
+INSTALLDIR="${D}"
+
+src_prepare() {
+ eapply "${FILESDIR}/${PV}-makefile.patch"
+ eapply "${FILESDIR}/direwolf-gpsd-API-9.patch"
+
+ eapply_user
+
+ if use gps ; then
+ sed -i -e 's/#enable_gpsd/enable_gpsd/' Makefile.linux || die "Sed failed!"
+ fi
+
+ if use hamlib; then
+ sed -i -e 's/#enable_hamlib/enable_hamlib/' Makefile.linux || die "Sed failed!"
+ fi
+
+ if use udev ; then
+ sed -i -e 's/#enable_cm108/enable_cm108/' Makefile.linux || die "Sed failed!"
+ fi
+}
+
+src_install() {
+ dodir /usr
+ dodir /usr/bin
+ keepdir /var/log/direwolf
+ emake DESTDIR="${D}" install
+ insinto /etc/direwolf/
+ doins direwolf.conf
+ einstalldocs
+ systemd_dounit "${FILESDIR}"/direwolf.service
+ systemd_dounit "${FILESDIR}"/direwolf-kiss.service
+}
diff --git a/media-radio/direwolf/files/1.5-makefile.patch b/media-radio/direwolf/files/1.5-makefile.patch
new file mode 100644
index 00000000000..860d57811aa
--- /dev/null
+++ b/media-radio/direwolf/files/1.5-makefile.patch
@@ -0,0 +1,295 @@
+--- direwolf-1.5/Makefile.linux.orig 2020-09-13 16:24:04.878630130 +0200
++++ direwolf-1.5/Makefile.linux 2020-09-13 16:30:13.744462027 +0200
+@@ -13,7 +13,7 @@
+ @echo " sudo make install"
+ @echo " "
+
+-CC := gcc
++#CC := gcc
+
+ # Just for fun, let's see how clang compares to gcc. First install like this:
+ # sudo apt-get update
+@@ -32,7 +32,7 @@
+ # we will inherit options already set in build environment.
+ # Explanation - https://github.com/wb2osz/direwolf/pull/38
+
+-CFLAGS += -O3 -pthread -Igeotranz -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE=1 -Wall
++CFLAGS += -pthread -Igeotranz -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE=1
+
+ # That was fine for a recent Ubuntu and Raspbian Jessie.
+ # However, Raspbian wheezy was then missing declaration for strsep and definition of fd_set.
+@@ -97,7 +97,7 @@
+
+ arch := $(shell echo | gcc -E -dM - | grep __i386__)
+ ifneq ($(arch),)
+-CFLAGS += -march=pentium3
++#CFLAGS += -march=pentium3
+ endif
+
+
+@@ -154,7 +154,7 @@
+
+ useffast := $(shell gcc --help -v 2>/dev/null | grep ffast-math)
+ ifneq ($(useffast),)
+-CFLAGS += -ffast-math
++#CFLAGS += -ffast-math
+ endif
+
+
+@@ -217,7 +217,7 @@
+
+ neon := $(shell cat /proc/cpuinfo | grep neon)
+ ifneq ($(neon),)
+-CFLAGS += -mfpu=neon
++#CFLAGS += -mfpu=neon
+ endif
+
+
+@@ -276,7 +276,7 @@
+ # Finding libgps.so* is more difficult because it
+ # is in different places on different operating systems.
+
+-enable_gpsd := $(wildcard /usr/include/gps.h)
++#enable_gpsd := 1
+ ifneq ($(enable_gpsd),)
+ CFLAGS += -DENABLE_GPSD
+ LDFLAGS += -lgps
+@@ -285,10 +285,10 @@
+
+ # Enable hamlib support if header file is present.
+
+-enable_hamlib := $(wildcard /usr/include/hamlib/rig.h /usr/local/include/hamlib/rig.h)
++#enable_hamlib := 1
+ ifneq ($(enable_hamlib),)
+ CFLAGS += -DUSE_HAMLIB
+-LDFLAGS += -lhamlib
++LDFLAGS += $(shell pkg-config --libs hamlib)
+ endif
+
+
+@@ -304,7 +304,7 @@
+
+ # Enable cm108 PTT support if libudev header file is present.
+
+-enable_cm108 := $(wildcard /usr/include/libudev.h)
++#enable_cm108 := 1
+ ifneq ($(enable_cm108),)
+ CFLAGS += -DUSE_CM108
+ LDFLAGS += -ludev
+@@ -536,6 +536,7 @@
+ # If not specified on the make command line, this is our default.
+
+ DESTDIR ?= /usr/local
++INSTALLDIR ?= $(DESTDIR)/usr/
+
+ # However, if you are preparing a "binary" DEB or RPM package, the installation location
+ # would normally be /usr/... instead. In this case, use a command line like this:
+@@ -560,15 +561,15 @@
+ @echo '[Desktop Entry]' > $@
+ @echo 'Type=Application' >> $@
+ ifneq ($(wildcard /usr/bin/lxterminal),)
+- @echo "Exec=lxterminal -t \"Dire Wolf\" -e \"$(DESTDIR)/bin/direwolf\"" >> $@
++ @echo "Exec=lxterminal -t \"Dire Wolf\" -e \"$(INSTALLDIR)/bin/direwolf\"" >> $@
+ else ifneq ($(wildcard /usr/bin/lxterm),)
+- @echo "Exec=lxterm -hold -title \"Dire Wolf\" -bg white -e \"$(DESTDIR)/bin/direwolf\"" >> $@
++ @echo "Exec=lxterm -hold -title \"Dire Wolf\" -bg white -e \"$(INSTALLDIR)/bin/direwolf\"" >> $@
+ else
+- @echo "Exec=xterm -hold -title \"Dire Wolf\" -bg white -e \"$(DESTDIR)/bin/direwolf\"" >> $@
++ @echo "Exec=xterm -hold -title \"Dire Wolf\" -bg white -e \"$(INSTALLDIR)/bin/direwolf\"" >> $@
+ endif
+ @echo 'Name=Dire Wolf' >> $@
+ @echo 'Comment=APRS Soundcard TNC' >> $@
+- @echo 'Icon=$(DESTDIR)/share/direwolf/pixmaps/dw-icon.png' >> $@
++ @echo 'Icon=$(INSTALLDIR)/share/direwolf/pixmaps/dw-icon.png' >> $@
+ @echo "Path=$(HOME)" >> $@
+ @echo '#Terminal=true' >> $@
+ @echo 'Categories=HamRadio' >> $@
+@@ -585,102 +586,104 @@
+ # Applications, not installed with package manager, normally go in /usr/local/bin.
+ # /usr/bin is used instead when installing from .DEB or .RPM package.
+ #
+- $(INSTALL) -D --mode=755 direwolf $(DESTDIR)/bin/direwolf
+- $(INSTALL) -D --mode=755 decode_aprs $(DESTDIR)/bin/decode_aprs
+- $(INSTALL) -D --mode=755 text2tt $(DESTDIR)/bin/text2tt
+- $(INSTALL) -D --mode=755 tt2text $(DESTDIR)/bin/tt2text
+- $(INSTALL) -D --mode=755 ll2utm $(DESTDIR)/bin/ll2utm
+- $(INSTALL) -D --mode=755 utm2ll $(DESTDIR)/bin/utm2ll
+- $(INSTALL) -D --mode=755 aclients $(DESTDIR)/bin/aclients
+- $(INSTALL) -D --mode=755 log2gpx $(DESTDIR)/bin/log2gpx
+- $(INSTALL) -D --mode=755 gen_packets $(DESTDIR)/bin/gen_packets
+- $(INSTALL) -D --mode=755 atest $(DESTDIR)/bin/atest
+- $(INSTALL) -D --mode=755 ttcalc $(DESTDIR)/bin/ttcalc
+- $(INSTALL) -D --mode=755 kissutil $(DESTDIR)/bin/kissutil
+- $(INSTALL) -D --mode=755 cm108 $(DESTDIR)/bin/cm108
+- $(INSTALL) -D --mode=755 dwespeak.sh $(DESTDIR)/bin/dwspeak.sh
++ $(INSTALL) -D --mode=755 direwolf $(INSTALLDIR)/bin/direwolf
++ $(INSTALL) -D --mode=755 decode_aprs $(INSTALLDIR)/bin/decode_aprs
++ $(INSTALL) -D --mode=755 text2tt $(INSTALLDIR)/bin/text2tt
++ $(INSTALL) -D --mode=755 tt2text $(INSTALLDIR)/bin/tt2text
++ $(INSTALL) -D --mode=755 ll2utm $(INSTALLDIR)/bin/ll2utm
++ $(INSTALL) -D --mode=755 utm2ll $(INSTALLDIR)/bin/utm2ll
++ $(INSTALL) -D --mode=755 aclients $(INSTALLDIR)/bin/aclients
++ $(INSTALL) -D --mode=755 log2gpx $(INSTALLDIR)/bin/log2gpx
++ $(INSTALL) -D --mode=755 gen_packets $(INSTALLDIR)/bin/gen_packets
++ $(INSTALL) -D --mode=755 atest $(INSTALLDIR)/bin/atest
++ $(INSTALL) -D --mode=755 ttcalc $(INSTALLDIR)/bin/ttcalc
++ $(INSTALL) -D --mode=755 kissutil $(INSTALLDIR)/bin/kissutil
++ $(INSTALL) -D --mode=755 cm108 $(INSTALLDIR)/bin/cm108
++ $(INSTALL) -D --mode=755 dwespeak.sh $(INSTALLDIR)/bin/dwspeak.sh
+ #
+ # Telemetry Toolkit executables. Other .conf and .txt files will go into doc directory.
+ #
+- $(INSTALL) -D --mode=755 telemetry-toolkit/telem-balloon.pl $(DESTDIR)/bin/telem-balloon.pl
+- $(INSTALL) -D --mode=755 telemetry-toolkit/telem-bits.pl $(DESTDIR)/bin/telem-bits.pl
+- $(INSTALL) -D --mode=755 telemetry-toolkit/telem-data.pl $(DESTDIR)/bin/telem-data.pl
+- $(INSTALL) -D --mode=755 telemetry-toolkit/telem-data91.pl $(DESTDIR)/bin/telem-data91.pl
+- $(INSTALL) -D --mode=755 telemetry-toolkit/telem-eqns.pl $(DESTDIR)/bin/telem-eqns.pl
+- $(INSTALL) -D --mode=755 telemetry-toolkit/telem-parm.pl $(DESTDIR)/bin/telem-parm.pl
+- $(INSTALL) -D --mode=755 telemetry-toolkit/telem-seq.sh $(DESTDIR)/bin/telem-seq.sh
+- $(INSTALL) -D --mode=755 telemetry-toolkit/telem-unit.pl $(DESTDIR)/bin/telem-unit.pl
+- $(INSTALL) -D --mode=755 telemetry-toolkit/telem-volts.py $(DESTDIR)/bin/telem-volts.py
++ $(INSTALL) -D --mode=755 telemetry-toolkit/telem-balloon.pl $(INSTALLDIR)/bin/telem-balloon.pl
++ $(INSTALL) -D --mode=755 telemetry-toolkit/telem-bits.pl $(INSTALLDIR)/bin/telem-bits.pl
++ $(INSTALL) -D --mode=755 telemetry-toolkit/telem-data.pl $(INSTALLDIR)/bin/telem-data.pl
++ $(INSTALL) -D --mode=755 telemetry-toolkit/telem-data91.pl $(INSTALLDIR)/bin/telem-data91.pl
++ $(INSTALL) -D --mode=755 telemetry-toolkit/telem-eqns.pl $(INSTALLDIR)/bin/telem-eqns.pl
++ $(INSTALL) -D --mode=755 telemetry-toolkit/telem-parm.pl $(INSTALLDIR)/bin/telem-parm.pl
++ $(INSTALL) -D --mode=755 telemetry-toolkit/telem-seq.sh $(INSTALLDIR)/bin/telem-seq.sh
++ $(INSTALL) -D --mode=755 telemetry-toolkit/telem-unit.pl $(INSTALLDIR)/bin/telem-unit.pl
++ $(INSTALL) -D --mode=755 telemetry-toolkit/telem-volts.py $(INSTALLDIR)/bin/telem-volts.py
+ #
+ # Misc. data such as "tocall" to system mapping.
+ #
+- $(INSTALL) -D --mode=644 tocalls.txt $(DESTDIR)/share/direwolf/tocalls.txt
+- $(INSTALL) -D --mode=644 symbols-new.txt $(DESTDIR)/share/direwolf/symbols-new.txt
+- $(INSTALL) -D --mode=644 symbolsX.txt $(DESTDIR)/share/direwolf/symbolsX.txt
++ $(INSTALL) -D --mode=644 tocalls.txt $(INSTALLDIR)/share/direwolf/tocalls.txt
++ $(INSTALL) -D --mode=644 symbols-new.txt $(INSTALLDIR)/share/direwolf/symbols-new.txt
++ $(INSTALL) -D --mode=644 symbolsX.txt $(INSTALLDIR)/share/direwolf/symbolsX.txt
+ #
+ # For desktop icon.
+ #
+- $(INSTALL) -D --mode=644 dw-icon.png $(DESTDIR)/share/direwolf/pixmaps/dw-icon.png
+- $(INSTALL) -D --mode=644 direwolf.desktop $(DESTDIR)/share/applications/direwolf.desktop
++ $(INSTALL) -D --mode=644 dw-icon.png $(INSTALLDIR)/share/direwolf/pixmaps/dw-icon.png
++ $(INSTALL) -D --mode=644 direwolf.desktop $(INSTALLDIR)/share/applications/direwolf.desktop
+ #
+ # Documentation. Various plain text files and PDF.
+ #
+- $(INSTALL) -D --mode=644 CHANGES.md $(DESTDIR)/share/doc/direwolf/CHANGES.md
+- $(INSTALL) -D --mode=644 LICENSE-dire-wolf.txt $(DESTDIR)/share/doc/direwolf/LICENSE-dire-wolf.txt
+- $(INSTALL) -D --mode=644 LICENSE-other.txt $(DESTDIR)/share/doc/direwolf/LICENSE-other.txt
++ $(INSTALL) -D --mode=644 CHANGES.md $(INSTALLDIR)/share/doc/direwolf-$(PV)/CHANGES.md
++ $(INSTALL) -D --mode=644 LICENSE-dire-wolf.txt $(INSTALLDIR)/share/doc/direwolf-$(PV)/LICENSE-dire-wolf.txt
++ $(INSTALL) -D --mode=644 LICENSE-other.txt $(INSTALLDIR)/share/doc/direwolf-$(PV)/LICENSE-other.txt
+ #
+ # ./README.md is an overview for the project main page.
+ # Maybe we could stick it in some other place.
+ # doc/README.md contains an overview of the PDF file contents and is more useful here.
+ #
+- $(INSTALL) -D --mode=644 doc/README.md $(DESTDIR)/share/doc/direwolf/README.md
+- $(INSTALL) -D --mode=644 doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf $(DESTDIR)/share/doc/direwolf/2400-4800-PSK-for-APRS-Packet-Radio.pdf
+- $(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf $(DESTDIR)/share/doc/direwolf/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf
+- $(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf $(DESTDIR)/share/doc/direwolf/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf
+- $(INSTALL) -D --mode=644 doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf $(DESTDIR)/share/doc/direwolf/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf
+- $(INSTALL) -D --mode=644 doc/APRS-Telemetry-Toolkit.pdf $(DESTDIR)/share/doc/direwolf/APRS-Telemetry-Toolkit.pdf
+- $(INSTALL) -D --mode=644 doc/APRStt-Implementation-Notes.pdf $(DESTDIR)/share/doc/direwolf/APRStt-Implementation-Notes.pdf
+- $(INSTALL) -D --mode=644 doc/APRStt-interface-for-SARTrack.pdf $(DESTDIR)/share/doc/direwolf/APRStt-interface-for-SARTrack.pdf
+- $(INSTALL) -D --mode=644 doc/APRStt-Listening-Example.pdf $(DESTDIR)/share/doc/direwolf/APRStt-Listening-Example.pdf
+- $(INSTALL) -D --mode=644 doc/Bluetooth-KISS-TNC.pdf $(DESTDIR)/share/doc/direwolf/Bluetooth-KISS-TNC.pdf
+- $(INSTALL) -D --mode=644 doc/Going-beyond-9600-baud.pdf $(DESTDIR)/share/doc/direwolf/Going-beyond-9600-baud.pdf
+- $(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS.pdf $(DESTDIR)/share/doc/direwolf/Raspberry-Pi-APRS.pdf
+- $(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS-Tracker.pdf $(DESTDIR)/share/doc/direwolf/Raspberry-Pi-APRS-Tracker.pdf
+- $(INSTALL) -D --mode=644 doc/Raspberry-Pi-SDR-IGate.pdf $(DESTDIR)/share/doc/direwolf/Raspberry-Pi-SDR-IGate.pdf
+- $(INSTALL) -D --mode=644 doc/Successful-APRS-IGate-Operation.pdf $(DESTDIR)/share/doc/direwolf/Successful-APRS-IGate-Operation.pdf
+- $(INSTALL) -D --mode=644 doc/User-Guide.pdf $(DESTDIR)/share/doc/direwolf/User-Guide.pdf
+- $(INSTALL) -D --mode=644 doc/WA8LMF-TNC-Test-CD-Results.pdf $(DESTDIR)/share/doc/direwolf/WA8LMF-TNC-Test-CD-Results.pdf
++ $(INSTALL) -D --mode=644 doc/README.md $(INSTALLDIR)/share/doc/direwolf-$(PV)/README.md
++ $(INSTALL) -D --mode=644 doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/2400-4800-PSK-for-APRS-Packet-Radio.pdf
++ $(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf
++ $(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf
++ $(INSTALL) -D --mode=644 doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf
++ $(INSTALL) -D --mode=644 doc/APRS-Telemetry-Toolkit.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/APRS-Telemetry-Toolkit.pdf
++ $(INSTALL) -D --mode=644 doc/APRStt-Implementation-Notes.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/APRStt-Implementation-Notes.pdf
++ $(INSTALL) -D --mode=644 doc/APRStt-interface-for-SARTrack.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/APRStt-interface-for-SARTrack.pdf
++ $(INSTALL) -D --mode=644 doc/APRStt-Listening-Example.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/APRStt-Listening-Example.pdf
++ $(INSTALL) -D --mode=644 doc/Bluetooth-KISS-TNC.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/Bluetooth-KISS-TNC.pdf
++ $(INSTALL) -D --mode=644 doc/Going-beyond-9600-baud.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/Going-beyond-9600-baud.pdf
++ $(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/Raspberry-Pi-APRS.pdf
++ $(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS-Tracker.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/Raspberry-Pi-APRS-Tracker.pdf
++ $(INSTALL) -D --mode=644 doc/Raspberry-Pi-SDR-IGate.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/Raspberry-Pi-SDR-IGate.pdf
++ $(INSTALL) -D --mode=644 doc/Successful-APRS-IGate-Operation.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/Successful-APRS-IGate-Operation.pdf
++ $(INSTALL) -D --mode=644 doc/User-Guide.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/User-Guide.pdf
++ $(INSTALL) -D --mode=644 doc/WA8LMF-TNC-Test-CD-Results.pdf $(INSTALLDIR)/share/doc/direwolf-$(PV)/WA8LMF-TNC-Test-CD-Results.pdf
+ #
+ # Various sample config and other files go into examples under the doc directory.
+ # When building from source, these can be put in home directory with "make install-conf".
+ # When installed from .DEB or .RPM package, the user will need to copy these to
+ # the home directory or other desired location.
+ #
+- $(INSTALL) -D --mode=644 direwolf.conf $(DESTDIR)/share/doc/direwolf/examples/direwolf.conf
+- $(INSTALL) -D --mode=755 dw-start.sh $(DESTDIR)/share/doc/direwolf/examples/dw-start.sh
+- $(INSTALL) -D --mode=644 sdr.conf $(DESTDIR)/share/doc/direwolf/examples/sdr.conf
+- $(INSTALL) -D --mode=644 telemetry-toolkit/telem-m0xer-3.txt $(DESTDIR)/share/doc/direwolf/examples/telem-m0xer-3.txt
+- $(INSTALL) -D --mode=644 telemetry-toolkit/telem-balloon.conf $(DESTDIR)/share/doc/direwolf/examples/telem-balloon.conf
+- $(INSTALL) -D --mode=644 telemetry-toolkit/telem-volts.conf $(DESTDIR)/share/doc/direwolf/examples/telem-volts.conf
++ $(INSTALL) -D --mode=644 direwolf.conf $(INSTALLDIR)/share/doc/direwolf-$(PV)/examples/direwolf.conf
++ $(INSTALL) -D --mode=755 dw-start.sh $(INSTALLDIR)/share/doc/direwolf-$(PV)/examples/dw-start.sh
++ $(INSTALL) -D --mode=644 sdr.conf $(INSTALLDIR)/share/doc/direwolf-$(PV)/examples/sdr.conf
++ $(INSTALL) -D --mode=644 telemetry-toolkit/telem-m0xer-3.txt $(INSTALLDIR)/share/doc/direwolf-$(PV)/examples/telem-m0xer-3.txt
++ $(INSTALL) -D --mode=644 telemetry-toolkit/telem-balloon.conf $(INSTALLDIR)/share/doc/direwolf-$(PV)/examples/telem-balloon.conf
++ $(INSTALL) -D --mode=644 telemetry-toolkit/telem-volts.conf $(INSTALLDIR)/share/doc/direwolf-$(PV)/examples/telem-volts.conf
+ #
+ # "man" pages
+ #
+- $(INSTALL) -D --mode=644 man1/aclients.1 $(DESTDIR)/share/man/man1/aclients.1
+- $(INSTALL) -D --mode=644 man1/atest.1 $(DESTDIR)/share/man/man1/atest.1
+- $(INSTALL) -D --mode=644 man1/decode_aprs.1 $(DESTDIR)/share/man/man1/decode_aprs.1
+- $(INSTALL) -D --mode=644 man1/direwolf.1 $(DESTDIR)/share/man/man1/direwolf.1
+- $(INSTALL) -D --mode=644 man1/gen_packets.1 $(DESTDIR)/share/man/man1/gen_packets.1
+- $(INSTALL) -D --mode=644 man1/kissutil.1 $(DESTDIR)/share/man/man1/kissutil.1
+- $(INSTALL) -D --mode=644 man1/ll2utm.1 $(DESTDIR)/share/man/man1/ll2utm.1
+- $(INSTALL) -D --mode=644 man1/log2gpx.1 $(DESTDIR)/share/man/man1/log2gpx.1
+- $(INSTALL) -D --mode=644 man1/text2tt.1 $(DESTDIR)/share/man/man1/text2tt.1
+- $(INSTALL) -D --mode=644 man1/tt2text.1 $(DESTDIR)/share/man/man1/tt2text.1
+- $(INSTALL) -D --mode=644 man1/utm2ll.1 $(DESTDIR)/share/man/man1/utm2ll.1
++ $(INSTALL) -D --mode=644 man1/aclients.1 $(INSTALLDIR)/share/man/man1/aclients.1
++ $(INSTALL) -D --mode=644 man1/atest.1 $(INSTALLDIR)/share/man/man1/atest.1
++ $(INSTALL) -D --mode=644 man1/decode_aprs.1 $(INSTALLDIR)/share/man/man1/decode_aprs.1
++ $(INSTALL) -D --mode=644 man1/direwolf.1 $(INSTALLDIR)/share/man/man1/direwolf.1
++ $(INSTALL) -D --mode=644 man1/gen_packets.1 $(INSTALLDIR)/share/man/man1/gen_packets.1
++ $(INSTALL) -D --mode=644 man1/kissutil.1 $(INSTALLDIR)/share/man/man1/kissutil.1
++ $(INSTALL) -D --mode=644 man1/ll2utm.1 $(INSTALLDIR)/share/man/man1/ll2utm.1
++ $(INSTALL) -D --mode=644 man1/log2gpx.1 $(INSTALLDIR)/share/man/man1/log2gpx.1
++ $(INSTALL) -D --mode=644 man1/text2tt.1 $(INSTALLDIR)/share/man/man1/text2tt.1
++ $(INSTALL) -D --mode=644 man1/tt2text.1 $(INSTALLDIR)/share/man/man1/tt2text.1
++ $(INSTALL) -D --mode=644 man1/utm2ll.1 $(INSTALLDIR)/share/man/man1/utm2ll.1
+ #
+ # Set group and mode of HID devices corresponding to C-Media USB Audio adapters.
+ # This will allow us to use the CM108/CM119 GPIO pins for PTT.
+ #
+- $(INSTALL) -D --mode=644 99-direwolf-cmedia.rules /etc/udev/rules.d/99-direwolf-cmedia.rules
++ifneq ($(enable_cm108),)
++ $(INSTALL) -D --mode=644 99-direwolf-cmedia.rules $(DESTDIR)/lib/udev/rules.d/99-direwolf-cmedia.rules
++endif
+ #
+ @echo " "
+ @echo "If this is your first install, not an upgrade, type this to put a copy"
+@@ -693,7 +696,7 @@
+ # Put sample configuration & startup files in home directory.
+ # This step would be done as ordinary user.
+ # Some people like to put the direwolf config file in /etc/ax25.
+-# Note that all of these are also in $(DESTDIR)/share/doc/direwolf/examples/.
++# Note that all of these are also in $(INSTALLDIR)/share/doc/direwolf/examples/.
+
+ # The Raspberry Pi has ~/Desktop but Ubuntu does not.
+
+@@ -724,7 +727,7 @@
+
+ .PHONY: install-rpi
+ install-rpi :
+- ln -f -s $(DESTDIR)/share/applications/direwolf.desktop ~/Desktop/direwolf.desktop
++ ln -f -s $(INSTALLDIR)/share/applications/direwolf.desktop ~/Desktop/direwolf.desktop
+
+
+
diff --git a/media-radio/direwolf/files/direwolf-gpsd-API-9.patch b/media-radio/direwolf/files/direwolf-gpsd-API-9.patch
new file mode 100644
index 00000000000..ffaf84dee56
--- /dev/null
+++ b/media-radio/direwolf/files/direwolf-gpsd-API-9.patch
@@ -0,0 +1,213 @@
+--- direwolf-1.5/dwgpsd.orig.c 2020-09-13 13:25:07.294828708 +0200
++++ direwolf-1.5/dwgpsd.c 2020-09-13 13:26:48.957086728 +0200
+@@ -1,7 +1,7 @@
+ //
+ // This file is part of Dire Wolf, an amateur radio packet TNC.
+ //
+-// Copyright (C) 2013, 2014, 2015 John Langner, WB2OSZ
++// Copyright (C) 2013, 2014, 2015, 2020 John Langner, WB2OSZ
+ //
+ // This program is free software: you can redistribute it and/or modify
+ // it under the terms of the GNU General Public License as published by
+@@ -54,10 +54,10 @@
+
+ #include <gps.h>
+
+-// Debian bug report: direwolf (1.2-1) FTBFS with libgps22 as part of the gpsd transition (#803605):
+-// dwgps.c claims to only support GPSD_API_MAJOR_VERSION 5, but also builds successfully with
+-// GPSD_API_MAJOR_VERSION 6 provided by libgps22 when the attached patch is applied.
+-#if GPSD_API_MAJOR_VERSION < 5 || GPSD_API_MAJOR_VERSION > 6
++// An incompatibility was introduced with version 7
++// and again with 9 and again with 10.
++
++#if GPSD_API_MAJOR_VERSION < 5 || GPSD_API_MAJOR_VERSION > 10
+ #error libgps API version might be incompatible.
+ #endif
+
+@@ -112,7 +112,7 @@
+ * shared region via dwgps_put_data.
+ *
+ * The application calls dwgps_read to get the most
+- 8 recent information.
++ * recent information.
+ *
+ *--------------------------------------------------------------------*/
+
+@@ -122,7 +122,7 @@
+ * Originally, I wanted to use the shared memory interface to gpsd
+ * because it is simpler and more efficient. Just access it when we
+ * actually need the data and we don't have a lot of extra unnecessary
+- * busy work going on.
++ * busy work going on constantly polling it when we don't need the information.
+ *
+ * The current version of gpsd, supplied with Raspian (Wheezy), is 3.6 from back in
+ * May 2012, is missing support for the shared memory interface.
+@@ -138,13 +138,28 @@
+ * cd gpsd-3.11
+ * scons prefix=/usr libdir=lib/arm-linux-gnueabihf shm_export=True python=False
+ * sudo scons udev-install
+- *
++ *
+ * For now, we will use the socket interface. Maybe get back to this again someday.
+ *
+ * Update: January 2016.
+ *
+ * I'm told that the shared memory interface might work in Raspian, Jessie version.
+ * Haven't tried it yet.
++ *
++ * June 2020: This is how to build the most recent.
++ *
++ * Based on https://www.satsignal.eu/raspberry-pi/UpdatingGPSD.html
++ *
++ * git clone https://gitlab.com/gpsd/gpsd.git gpsd-gitlab
++ * cd gpsd-gitlab
++ * scons --config=force
++ * scons
++ * sudo scons install
++ *
++ * The problem we have here is that the library is put in /usr/local/lib and direwolf
++ * can't find it there. Solution is to define environment variable:
++ *
++ * export LD_LIBRARY_PATH=/use/local/lib
+ */
+
+
+@@ -228,7 +243,7 @@
+ *
+ *--------------------------------------------------------------------*/
+
+-#define TIMEOUT 30
++#define TIMEOUT 15
+
+ #if ENABLE_GPSD
+
+@@ -251,13 +266,34 @@
+
+ while (1) {
+
++// Example code found here:
++// https://lists.nongnu.org/archive/html/gpsd-dev/2017-11/msg00001.html
++
+ if ( ! gps_waiting(&gpsdata, TIMEOUT * 1000000)) {
+ text_color_set(DW_COLOR_ERROR);
+- dw_printf ("GPSD: Timeout waiting for GPS data.\n");
+- /* Fall thru to read which should get error and bail out. */
++ dw_printf ("------------------------------------------\n");
++ dw_printf ("dwgpsd: Timeout waiting for GPS data.\n");
++ dw_printf ("Is GPSD daemon running?\n");
++ dw_printf ("Troubleshooting tip: Try running cgps or xgps.\n");
++ dw_printf ("------------------------------------------\n");
++ info.fix = DWFIX_ERROR;
++ SLEEP_MS(5000);
++ continue;
+ }
+
++// https://github.com/wb2osz/direwolf/issues/196
++// https://bugzilla.redhat.com/show_bug.cgi?id=1674812
++
++// gps_read has two new parameters in API version 7.
++// It looks like this could be used to obtain the JSON message from the daemon.
++// Specify NULL, instead of message buffer space, if this is not desired.
++// Why couldn't they add a new function instead of introducing incompatibility?
++
++#if GPSD_API_MAJOR_VERSION >= 7
++ if (gps_read (&gpsdata, NULL, 0) == -1) {
++#else
+ if (gps_read (&gpsdata) == -1) {
++#endif
+ text_color_set(DW_COLOR_ERROR);
+
+ dw_printf ("------------------------------------------\n");
+@@ -274,16 +310,47 @@
+ break; // Jump out of loop and terminate thread.
+ }
+
++#if GPSD_API_MAJOR_VERSION >= 9
++
++// The gps.h revision history says:
++// * mark altitude in gps_fix_t as deprecated and undefined
++// This seems really stupid to me.
++// If it is deprecated and undefined then take it out. Someone trying to use
++// it would get a compile error and know that something needs to be done.
++// Instead we all just go merrily on our way using a field that is [allegedly] undefined.
++// Why not simply add more variables with different definitions of altitude
++// and keep the original variable working as it always did?
++// If it is truly undefined, as the comment would have us believe, numerous
++// people will WASTE VAST AMOUNTS OF TIME pondering why altitude is now broken in
++// their applications.
++
++#define stupid_altitude altMSL
++#else
++#define stupid_altitude altitude
++#endif
++
++#if GPSD_API_MAJOR_VERSION >= 10
++
++// They did it again. Whimsical incompatibilities that cause
++// pain and aggravation for everyone trying to use this library.
++//
++// error: ‘struct gps_data_t’ has no member named ‘status’
++//
++// Yes, I can understand that it is a more logical place but it breaks
++// all existing code that uses this.
++// I'm really getting annoyed about wasting so much time on keeping up with all
++// of these incompatibilities that are completely unnecessary.
++
++#define stupid_status fix.status
++#else
++#define stupid_status status
++#endif
++
++ // Inform user about change in fix status.
++
+ switch (gpsdata.fix.mode) {
+ default:
+ case MODE_NOT_SEEN:
+- if (info.fix >= DWFIX_2D) {
+- text_color_set(DW_COLOR_INFO);
+- dw_printf ("GPSD: Lost location fix.\n");
+- }
+- info.fix = DWFIX_NOT_SEEN;
+- break;
+-
+ case MODE_NO_FIX:
+ if (info.fix >= DWFIX_2D) {
+ text_color_set(DW_COLOR_INFO);
+@@ -309,11 +376,7 @@
+ break;
+ }
+
+- /* Data is available. */
+- // TODO: what is gpsdata.status?
+-
+-
+- if (gpsdata.status >= STATUS_FIX && gpsdata.fix.mode >= MODE_2D) {
++ if (gpsdata.stupid_status >= STATUS_FIX && gpsdata.fix.mode >= MODE_2D) {
+
+ info.dlat = isnan(gpsdata.fix.latitude) ? G_UNKNOWN : gpsdata.fix.latitude;
+ info.dlon = isnan(gpsdata.fix.longitude) ? G_UNKNOWN : gpsdata.fix.longitude;
+@@ -321,9 +384,15 @@
+ info.speed_knots = isnan(gpsdata.fix.speed) ? G_UNKNOWN : (MPS_TO_KNOTS * gpsdata.fix.speed);
+
+ if (gpsdata.fix.mode >= MODE_3D) {
+- info.altitude = isnan(gpsdata.fix.altitude) ? G_UNKNOWN : gpsdata.fix.altitude;
++ info.altitude = isnan(gpsdata.fix.stupid_altitude) ? G_UNKNOWN : gpsdata.fix.stupid_altitude;
+ }
+ }
++ else {
++ // Keep the last known location.
++ // Using info.fix, the caller knows if the location is current (DWFIX_[23]D),
++ // last known (DWFIX_NONE), or never known (DWFIX_NOT_SEEN).
++ info.fix = DWFIX_NO_FIX;
++ }
+
+ info.timestamp = time(NULL);
+ if (s_debug >= 2) {
+@@ -357,6 +426,7 @@
+
+ #if ENABLE_GPSD
+
++ gps_stream (&gpsdata, WATCH_DISABLE, NULL);
+ gps_close (&gpsdata);
+
+ #endif
diff --git a/media-radio/direwolf/metadata.xml b/media-radio/direwolf/metadata.xml
index b9c6cabfa90..b2d8ba721f3 100644
--- a/media-radio/direwolf/metadata.xml
+++ b/media-radio/direwolf/metadata.xml
@@ -1,7 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
- <email>rich0@gentoo.org</email>
-</maintainer>
+ <maintainer type="person">
+ <email>rich0@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="hamlib">Enables support by the Hamlib amateur radio rig control library</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">wb2osz/direwolf</remote-id>
+ </upstream>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-radio/direwolf/files/, media-radio/direwolf/
@ 2021-11-26 5:11 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2021-11-26 5:11 UTC (permalink / raw
To: gentoo-commits
commit: 413d7d28cfa04ff1d59688563ffeb432b7e5d381
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 26 04:46:55 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 26 05:11:24 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=413d7d28
media-radio/direwolf: respect AR, CC, and LDFLAGS
Bug: https://bugs.gentoo.org/807664
Closes: https://bugs.gentoo.org/750911
Closes: https://bugs.gentoo.org/750914
Closes: https://bugs.gentoo.org/750935
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-radio/direwolf/direwolf-1.5-r1.ebuild | 4 ++++
.../direwolf/files/direwolf-1.5-respect-AR.patch | 22 ++++++++++++++++++++++
.../files/direwolf-1.5-respect-LDFLAGS.patch | 22 ++++++++++++++++++++++
3 files changed, 48 insertions(+)
diff --git a/media-radio/direwolf/direwolf-1.5-r1.ebuild b/media-radio/direwolf/direwolf-1.5-r1.ebuild
index ee2fa3ecbbd6..deef4a8a736a 100644
--- a/media-radio/direwolf/direwolf-1.5-r1.ebuild
+++ b/media-radio/direwolf/direwolf-1.5-r1.ebuild
@@ -30,6 +30,8 @@ INSTALLDIR="${D}"
src_prepare() {
eapply "${FILESDIR}/${PV}-makefile.patch"
eapply "${FILESDIR}/direwolf-gpsd-API-9.patch"
+ eapply "${FILESDIR}/direwolf-1.5-respect-LDFLAGS.patch"
+ eapply "${FILESDIR}/direwolf-1.5-respect-AR.patch"
eapply_user
@@ -47,6 +49,8 @@ src_prepare() {
}
src_compile() {
+ tc-export AR CC
+
emake PKG_CONFIG="$(tc-getPKG_CONFIG)"
}
diff --git a/media-radio/direwolf/files/direwolf-1.5-respect-AR.patch b/media-radio/direwolf/files/direwolf-1.5-respect-AR.patch
new file mode 100644
index 000000000000..1a833cc06ba8
--- /dev/null
+++ b/media-radio/direwolf/files/direwolf-1.5-respect-AR.patch
@@ -0,0 +1,22 @@
+diff --git a/Makefile.linux b/Makefile.linux
+index 3d433bd..bf8ed3d 100644
+--- a/Makefile.linux
++++ b/Makefile.linux
+@@ -474,7 +474,7 @@ ttcalc : ttcalc.o ax25_pad.o fcs_calc.o textcolor.o misc.a
+ # UTM, USNG, MGRS conversions.
+
+ geotranz.a : error_string.o mgrs.o polarst.o tranmerc.o ups.o usng.o utm.o
+- ar -cr $@ $^
++ $(AR) -cr $@ $^
+
+ error_string.o : geotranz/error_string.c
+ $(CC) $(CFLAGS) -c -o $@ $^
+@@ -502,7 +502,7 @@ utm.o : geotranz/utm.c
+ # We don't need the others in that same directory.
+
+ misc.a : strlcpy.o strlcat.o
+- ar -cr $@ $^
++ $(AR) -cr $@ $^
+
+ strlcpy.o : misc/strlcpy.c
+ $(CC) $(CFLAGS) -I. -c -o $@ $^
diff --git a/media-radio/direwolf/files/direwolf-1.5-respect-LDFLAGS.patch b/media-radio/direwolf/files/direwolf-1.5-respect-LDFLAGS.patch
new file mode 100644
index 000000000000..38dddcc281fd
--- /dev/null
+++ b/media-radio/direwolf/files/direwolf-1.5-respect-LDFLAGS.patch
@@ -0,0 +1,22 @@
+diff --git a/Makefile.linux b/Makefile.linux
+index 7418a63..3d433bd 100644
+--- a/Makefile.linux
++++ b/Makefile.linux
+@@ -447,7 +447,7 @@ atest : atest.c demod.o demod_afsk.o demod_psk.o demod_9600.o \
+ # Multiple AGWPE network or serial port clients to test TNCs side by side.
+
+ aclients : aclients.c ax25_pad.c fcs_calc.c textcolor.o misc.a
+- $(CC) $(CFLAGS) -g -o $@ $^
++ $(CC) $(CFLAGS) -g -o $@ $^ $(LDFLAGS)
+
+
+ # Talk to a KISS TNC.
+@@ -466,7 +466,7 @@ cm108 : cm108.c textcolor.o misc.a
+ # Touch Tone to Speech sample application.
+
+ ttcalc : ttcalc.o ax25_pad.o fcs_calc.o textcolor.o misc.a
+- $(CC) $(CFLAGS) -g -o $@ $^
++ $(CC) $(CFLAGS) -g -o $@ $^ $(LDFLAGS)
+
+
+ # ----------------------------------------- Libraries --------------------------------------------
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-26 5:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-26 5:11 [gentoo-commits] repo/gentoo:master commit in: media-radio/direwolf/files/, media-radio/direwolf/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2020-10-23 19:59 Richard Freeman
2017-12-22 13:23 Richard Freeman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox