Gentoo Archives: gentoo-commits

From: Thomas Beierlein <tomjbe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/hamlib/
Date: Thu, 24 Jun 2021 05:46:43
Message-Id: 1624513588.108c5996b25c0f0e7b78d7784343dd2bb1d4515c.tomjbe@gentoo
1 commit: 108c5996b25c0f0e7b78d7784343dd2bb1d4515c
2 Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 24 05:46:28 2021 +0000
4 Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 24 05:46:28 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=108c5996
7
8 media-libs/hamlib: Version bump
9
10 Closes: https://bugs.gentoo.org/796866
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
13
14 media-libs/hamlib/Manifest | 1 +
15 media-libs/hamlib/hamlib-4.2.ebuild | 94 +++++++++++++++++++++++++++++++++++++
16 2 files changed, 95 insertions(+)
17
18 diff --git a/media-libs/hamlib/Manifest b/media-libs/hamlib/Manifest
19 index b6f546e6b23..5c3d50cf665 100644
20 --- a/media-libs/hamlib/Manifest
21 +++ b/media-libs/hamlib/Manifest
22 @@ -1 +1,2 @@
23 DIST hamlib-4.1.tar.gz 2260629 BLAKE2B e53249f476005f3ec8afcbba6d875d913cdc45eb741fdb8b8718c1c5bda9cf8d50087165b72055600bc9ff364117f7d72235a3d68a9fb0882a77a6fdbf366605 SHA512 a5fca5dc89a7408628bc77fe22c6d8c77474b3dabee7b2b6d0b280becb6cb63f5619e4a620ad11aeb81b8412145b0f8cb0291a2d4cd3751c643cb1709b2dfa78
24 +DIST hamlib-4.2.tar.gz 2311775 BLAKE2B 4fe8d3e6d489369aede1a4cd59f01be44a7787ca71c21c5b92d436666c67de68013f488834d0f57238e6a947c24cd5b4c6c667397dec30392f1cccd695df252e SHA512 08ccf4e592fbae938ae1aaa5afede7e2e6ec7d23b449a65b00e093502f4aeb36930624f055d9802349f77df9dd2b7b983aa44d83f8c62a6de5789e7df627f804
25
26 diff --git a/media-libs/hamlib/hamlib-4.2.ebuild b/media-libs/hamlib/hamlib-4.2.ebuild
27 new file mode 100644
28 index 00000000000..a1babce2a0e
29 --- /dev/null
30 +++ b/media-libs/hamlib/hamlib-4.2.ebuild
31 @@ -0,0 +1,94 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{7..9} )
38 +MY_P=${P/_rc2/~rc2}
39 +
40 +inherit autotools python-single-r1
41 +
42 +DESCRIPTION="Ham radio backend rig control libraries"
43 +HOMEPAGE="https://www.hamlib.org"
44 +SRC_URI="mirror://sourceforge/hamlib/${MY_P}.tar.gz"
45 +
46 +LICENSE="LGPL-2 GPL-2"
47 +SLOT="0/4.2"
48 +KEYWORDS="~amd64 ~x86"
49 +IUSE="doc perl python tcl"
50 +
51 +RESTRICT="test"
52 +
53 +RDEPEND="
54 + =virtual/libusb-0*
55 + dev-libs/libxml2
56 + sys-libs/readline:0=
57 + perl? ( dev-lang/perl )
58 + python? ( ${PYTHON_DEPS} )
59 + tcl? ( dev-lang/tcl:0= )"
60 +
61 +DEPEND=" ${RDEPEND}
62 + virtual/pkgconfig
63 + dev-lang/swig
64 + >=sys-devel/libtool-2.2
65 + doc? ( app-doc/doxygen )"
66 +
67 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
68 +
69 +DOCS=(AUTHORS NEWS PLAN README README.betatester README.developer)
70 +
71 +S="${WORKDIR}/${MY_P}"
72 +
73 +pkg_setup() {
74 + use python && python-single-r1_pkg_setup
75 +}
76 +
77 +src_prepare() {
78 + # fix hardcoded libdir paths
79 + sed -i -e "s#fix}/lib#fix}/$(get_libdir)/hamlib#" \
80 + -e "s#fix}/include#fix}/include/hamlib#" \
81 + hamlib.pc.in || die "sed failed"
82 +
83 + # Correct install target to whatever INSTALLDIRS says and use vendor
84 + # installdirs everywhere (bug #611550)
85 + sed -i -e "s#install_site#install#" \
86 + -e 's#MAKEFILE="Hamlib-pl.mk"#MAKEFILE="Hamlib-pl.mk" INSTALLDIRS=vendor#' \
87 + bindings/Makefile.am || die "sed failed patching for perl"
88 +
89 + # make building of documentation compatible with autotools-utils
90 + sed -i -e "s/doc:/html:/g" doc/Makefile.am || die "sed failed"
91 +
92 + eautoreconf
93 +
94 + eapply_user
95 +}
96 +
97 +src_configure() {
98 + econf \
99 + --libdir=/usr/$(get_libdir)/hamlib \
100 + --disable-static \
101 + --with-xml-support \
102 + $(use_with perl perl-binding) \
103 + $(use_with python python-binding) \
104 + $(use_with tcl tcl-binding)
105 +}
106 +
107 +src_compile() {
108 + emake
109 + use doc && emake html
110 +}
111 +
112 +src_install() {
113 + emake DESTDIR="${D}" install
114 +
115 + use python && python_optimize
116 +
117 + use doc && HTML_DOCS=( doc/html/ )
118 + einstalldocs
119 +
120 + insinto /usr/$(get_libdir)/pkgconfig
121 + doins hamlib.pc
122 +
123 + echo "LDPATH=/usr/$(get_libdir)/hamlib" > "${T}"/73hamlib
124 + doenvd "${T}"/73hamlib
125 +}