summaryrefslogtreecommitdiff
path: root/media-libs/hamlib
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/hamlib')
-rw-r--r--media-libs/hamlib/Manifest2
-rw-r--r--media-libs/hamlib/files/hamlib-4.5.5-gcc14-fix.patch12
-rw-r--r--media-libs/hamlib/hamlib-4.5.5-r2.ebuild101
3 files changed, 115 insertions, 0 deletions
diff --git a/media-libs/hamlib/Manifest b/media-libs/hamlib/Manifest
index 029a985b9109..873c32fdba1b 100644
--- a/media-libs/hamlib/Manifest
+++ b/media-libs/hamlib/Manifest
@@ -1,3 +1,5 @@
+AUX hamlib-4.5.5-gcc14-fix.patch 224 BLAKE2B 882645207d62657b790e76d5e4d3a17be3aca9dfd978d5a2939bfc81a018788e6a2b3d1f37bf2d0e122740014e076820dfc9c626d24509741b1342ec700d2a75 SHA512 1529f2002de0e9c216dad0f4bcf0656fb70da543ab0f84d19e8a1621e87d9983f43f7bbc05cae09ab3a2310628b7522c152f15861f32adad05c9088e36b01acd
DIST hamlib-4.5.5.tar.gz 2603846 BLAKE2B ad4a286a7aa1e972707cb9ed15a4268909a7d252a64b98b01d35c9d9e42c605cd600e819e195e49d501c1e135191fda585581e27801fa217c9141236a81ad770 SHA512 2cdff2630e89fa95c7ac40e998492e8a04e000fcca18b9491ddcb967927ffaa771ed2e6ac3232a060947883533a6ae7405042a2f8fdb1de157d71f74381f5899
EBUILD hamlib-4.5.5-r1.ebuild 2165 BLAKE2B 9688c475db3b9b5dcb16de7b9ffa41440a8b0d2803b724ebb095725f09c5aaf1a27039e4c20e72c1d40adcf7abf9adaf06c6e9256c32f17f34d7282f5a3a0bc0 SHA512 ff76c2ef21ad4f458aba160408b5fa81dc99c1e84a0e30910b8ff3bf3386402aecdb84b7bfc0dce81cb690fb82698a76bb22fbe99c5042d36cf214f1065eb07e
+EBUILD hamlib-4.5.5-r2.ebuild 2223 BLAKE2B b0ce7f2baf6db30746b7be8f630d289f773322a116a012241ccbac4d707cdbef7e47691fddb4a95280ec887b521a7d75799fe0191b02c4593d71cf8ea4db3e53 SHA512 9034f5e0b9dcfc435a4de0f1348c61568c88870e62c76d5e3f1858f89b254193b1aed154316f92519fe3d63644e4e49bc766790049fa6bf4a5d95c437f4d6a70
MISC metadata.xml 379 BLAKE2B 17bfaa1ae7f031e14bef4bad4d552e3d4b644b9578bd996a9e8454b6b55f4029c3395e8a1cfc5a2b27a5372cd1aea140e0aebe637f7eb7889008fb434897b681 SHA512 c8c7a37088c0da4952a557776db8b6b701df23c07c4b17c50b77a199a6e7740369e27254eabae4e504ecb07871d33aec008e54bc7a787030828616ab36dfcb93
diff --git a/media-libs/hamlib/files/hamlib-4.5.5-gcc14-fix.patch b/media-libs/hamlib/files/hamlib-4.5.5-gcc14-fix.patch
new file mode 100644
index 000000000000..35eade8f68e2
--- /dev/null
+++ b/media-libs/hamlib/files/hamlib-4.5.5-gcc14-fix.patch
@@ -0,0 +1,12 @@
+diff --git a/tests/memload.c b/tests/memload.c
+index 6157a08..4f189d0 100644
+--- a/tests/memload.c
++++ b/tests/memload.c
+@@ -19,6 +19,7 @@
+ */
+
+
++#include <stdlib.h>
+ #include <hamlib/config.h>
+
+ #include <hamlib/rig.h>
diff --git a/media-libs/hamlib/hamlib-4.5.5-r2.ebuild b/media-libs/hamlib/hamlib-4.5.5-r2.ebuild
new file mode 100644
index 000000000000..7c6aabd3b754
--- /dev/null
+++ b/media-libs/hamlib/hamlib-4.5.5-r2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+MY_P=${P/_rc2/~rc2}
+
+inherit autotools python-single-r1
+
+DESCRIPTION="Ham radio backend rig control libraries"
+HOMEPAGE="https://www.hamlib.github.io"
+SRC_URI="mirror://sourceforge/hamlib/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LGPL-2+ GPL-2+"
+SLOT="0/4.2"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+IUSE="doc perl python tcl"
+
+RESTRICT="test"
+
+RDEPEND="
+ =virtual/libusb-0*
+ dev-libs/libxml2
+ sys-libs/readline:0=
+ perl? ( dev-lang/perl )
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:0= )"
+
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ dev-lang/swig
+ >=dev-build/libtool-2.2
+ doc? ( app-text/doxygen
+ dev-util/source-highlight )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DOCS=(AUTHORS NEWS PLAN README README.betatester README.developer)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.5.5-gcc14-fix.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # fix hardcoded libdir paths
+ sed -i -e "s#fix}/lib#fix}/$(get_libdir)/hamlib#" \
+ -e "s#fix}/include#fix}/include/hamlib#" \
+ hamlib.pc.in || die "sed failed"
+
+ # Correct install target to whatever INSTALLDIRS says and use vendor
+ # installdirs everywhere (bug #611550)
+ sed -i -e "s#install_site#install#" \
+ -e 's#MAKEFILE="Hamlib-pl.mk"#MAKEFILE="Hamlib-pl.mk" INSTALLDIRS=vendor#' \
+ bindings/Makefile.am || die "sed failed patching for perl"
+
+ # make building of documentation compatible with autotools-utils
+ sed -i -e "s/doc:/html:/g" doc/Makefile.am || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir)/hamlib \
+ --disable-static \
+ --with-xml-support \
+ $(use_with perl perl-binding) \
+ $(use_with python python-binding) \
+ $(use_with tcl tcl-binding)
+}
+
+src_compile() {
+ emake
+ use doc && emake html
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ use python && python_optimize
+
+ use doc && HTML_DOCS=( doc/html/ )
+ einstalldocs
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins hamlib.pc
+
+ echo "LDPATH=/usr/$(get_libdir)/hamlib" > "${T}"/73hamlib
+ doenvd "${T}"/73hamlib
+
+ find "${ED}" -name '*.la' -delete || die
+}