commit:     025a0a1714eb7bd4f8505f5b4a8828b11b65ad4f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 15 01:47:39 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 15 01:47:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=025a0a17

sci-misc/oww: update EAPI 7 -> 8, modern C fixes

Closes: https://bugs.gentoo.org/781929
Closes: https://bugs.gentoo.org/874081
Closes: https://bugs.gentoo.org/863272
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-misc/oww/files/oww-0.86.5-c99.patch | 59 +++++++++++++++++++++++++++++++++
 sci-misc/oww/oww-0.86.5-r1.ebuild       | 42 +++++++++++++++++++++++
 2 files changed, 101 insertions(+)

diff --git a/sci-misc/oww/files/oww-0.86.5-c99.patch 
b/sci-misc/oww/files/oww-0.86.5-c99.patch
new file mode 100644
index 000000000000..98c69337d041
--- /dev/null
+++ b/sci-misc/oww/files/oww-0.86.5-c99.patch
@@ -0,0 +1,59 @@
+https://bugs.gentoo.org/781929
+https://bugs.gentoo.org/863272
+https://bugs.gentoo.org/874081
+--- a/src/devices.h
++++ b/src/devices.h
+@@ -455,4 +455,6 @@ int devices_poll();
+ 
+ int devices_queue_realloc(int search_entry, char *target, int wipe, void 
(*callback)(void));
+ 
++int devices_have_uv_data(int i);
++
+ #endif
+--- a/src/hobbyboards_moist.c
++++ b/src/hobbyboards_moist.c
+@@ -7,6 +7,7 @@
+ 
+ 
+ // Include Files
++#include <ctype.h>
+ #include <stdio.h>
+ #include <math.h>
+ #include "werr.h"
+--- a/src/mainwin.c
++++ b/src/mainwin.c
+@@ -16,6 +16,7 @@
+ #include "setup.h"
+ #include "oww.h"
+ #include "convert.h"
++#include "devices.h"
+ //#include "message.h"
+ #include "globaldef.h"
+ #include "werr.h"
+--- a/src/mownetu.c
++++ b/src/mownetu.c
+@@ -52,11 +52,11 @@ static SMALLINT bitacc(SMALLINT,SMALLINT,SMALLINT,uchar *);
+ static int LastDiscrepancy[MAX_PORTNUM];
+ static int LastFamilyDiscrepancy[MAX_PORTNUM];
+ static uchar LastDevice[MAX_PORTNUM];
+-uchar SerialNum[MAX_PORTNUM][8];
++extern uchar SerialNum[MAX_PORTNUM][8];
+ 
+ // external globals
+ extern int UMode[MAX_PORTNUM];
+-extern uchar USpeed[MAX_PORTNUM];
++extern SMALLINT USpeed[MAX_PORTNUM];
+ 
+ //--------------------------------------------------------------------------
+ // The 'owFirst' finds the first device on the 1-Wire Net  This function
+--- a/src/weather.h
++++ b/src/weather.h
+@@ -21,6 +21,8 @@ int FindWeatherStation(void) ;
+ void weather_lcd_output(void) ;
+ //int weather_read_ws_read_gpc (void) ;
+ void weather_sub_update_gpcs (void) ;
++int weather_primary_uv (statsmean * means);
++int weather_primary_leafwetness (statsmean * means);
+ 
+ #define TEMP_CONV_TIME 100L
+ #define UNDEFINED_T -1000.0F

diff --git a/sci-misc/oww/oww-0.86.5-r1.ebuild 
b/sci-misc/oww/oww-0.86.5-r1.ebuild
new file mode 100644
index 000000000000..e91581f01553
--- /dev/null
+++ b/sci-misc/oww/oww-0.86.5-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A one-wire weather station for Dallas Semiconductor"
+HOMEPAGE="http://oww.sourceforge.net/";
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gtk nls usb"
+
+RDEPEND="
+       net-misc/curl
+       gtk? ( x11-libs/gtk+:2 )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.86.4-build.patch
+       "${FILESDIR}"/${P}-format-security.patch
+       "${FILESDIR}"/${P}-musl.patch
+       "${FILESDIR}"/${P}-c99.patch
+)
+
+src_prepare() {
+       default
+       mv configure.{in,ac} || die
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               --enable-interactive \
+               $(use_enable nls) \
+               $(use_enable gtk gui) \
+               $(use_with usb)
+}

Reply via email to