From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/indilib/, sci-libs/indilib/files/
Date: Sun, 6 Feb 2022 09:12:51 +0000 (UTC) [thread overview]
Message-ID: <1644138756.e35e4ff449e6652e55bc03dadbe6cb0629141175.sam@gentoo> (raw)
commit: e35e4ff449e6652e55bc03dadbe6cb0629141175
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 6 09:12:04 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 6 09:12:36 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e35e4ff4
sci-libs/indilib: fix musl build
Closes: https://bugs.gentoo.org/829487
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../indilib/files/indilib-1.9.4-musl-stdint.patch | 108 +++++++++++++++++++++
sci-libs/indilib/indilib-1.9.4.ebuild | 4 +
2 files changed, 112 insertions(+)
diff --git a/sci-libs/indilib/files/indilib-1.9.4-musl-stdint.patch b/sci-libs/indilib/files/indilib-1.9.4-musl-stdint.patch
new file mode 100644
index 000000000000..9adfae6bac25
--- /dev/null
+++ b/sci-libs/indilib/files/indilib-1.9.4-musl-stdint.patch
@@ -0,0 +1,108 @@
+https://patch-diff.githubusercontent.com/raw/indilib/indi/pull/1618.patch
+
+From: Sam James <sam@gentoo.org>
+Date: Sun, 6 Feb 2022 08:16:44 +0000
+Subject: [PATCH] Use <stdint.h> for uint* types (fix build on musl)
+
+<stdint.h> is already being used in some places, as are its
+types, e.g. uint8_t, but in some places, non-standard types
+like u_int16_t were being mix-and-matched.
+
+Consistently use the <stdint.h> types to fix build on e.g.
+musl.
+
+Bug: https://bugs.gentoo.org/829487
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/base64.c
++++ b/base64.c
+@@ -45,7 +45,7 @@
+ * Swap bytes in 16-bit value.
+ */
+ //#define bswap_16(x) __builtin_bswap16 (x);
+-#define bswap_16(x) ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
++#define bswap_16(x) ((uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
+
+ #include <arpa/inet.h>
+ #define IS_BIG_ENDIAN (1 == htons(1))
+--- a/drivers/focuser/focuslynxbase.cpp
++++ b/drivers/focuser/focuslynxbase.cpp
+@@ -2821,7 +2821,7 @@ bool FocusLynxBase::SyncFocuser(uint32_t ticks)
+ /************************************************************************************
+ *
+ * ***********************************************************************************/
+-//bool FocusLynxBase::setMaxTravel(u_int16_t travel)
++//bool FocusLynxBase::setMaxTravel(uint16_t travel)
+ bool FocusLynxBase::SetFocuserMaxPosition(uint32_t ticks)
+ {
+ char cmd[LYNX_MAX] = {0};
+@@ -2886,7 +2886,7 @@ bool FocusLynxBase::SetFocuserMaxPosition(uint32_t ticks)
+ /************************************************************************************
+ *
+ * ***********************************************************************************/
+-bool FocusLynxBase::setStepSize(u_int16_t stepsize)
++bool FocusLynxBase::setStepSize(uint16_t stepsize)
+ {
+ char cmd[LYNX_MAX] = {0};
+ int errcode = 0;
+--- a/drivers/focuser/focuslynxbase.h
++++ b/drivers/focuser/focuslynxbase.h
+@@ -28,6 +28,7 @@
+ #include "connectionplugins/connectiontcp.h"
+
+ #include <map>
++#include <stdint.h>
+ #include <termios.h>
+ #include <unistd.h>
+ #include <memory>
+@@ -154,7 +155,7 @@ class FocusLynxBase : public INDI::Focuser
+ // Set functions
+
+ // Position
+- bool setStepSize(u_int16_t stepsize);
++ bool setStepSize(uint16_t stepsize);
+
+ // Temperature
+ bool setTemperatureCompensation(bool enable);
+--- a/drivers/rotator/gemini.h
++++ b/drivers/rotator/gemini.h
+@@ -23,6 +23,7 @@
+ #include "indifocuser.h"
+ #include "indirotatorinterface.h"
+
++#include <stdint.h>
+ #include <map>
+
+ class Gemini : public INDI::Focuser, public INDI::RotatorInterface
+@@ -132,7 +133,7 @@ class Gemini : public INDI::Focuser, public INDI::RotatorInterface
+ // Set functions
+
+ // Position
+- bool setFocusPosition(u_int16_t position);
++ bool setFocusPosition(uint16_t position);
+
+ // Temperature
+ bool setTemperatureCompensation(bool enable);
+--- a/drivers/telescope/celestrondriver.h
++++ b/drivers/telescope/celestrondriver.h
+@@ -28,10 +28,7 @@
+ #include <string>
+ #include "indicom.h"
+
+-#ifdef __FreeBSD__
+ #include <stdint.h>
+-typedef uint8_t u_int8_t;
+-#endif
+
+ //#include <thread>
+ //#include <condition_variable>
+@@ -312,8 +309,8 @@ class CelestronDriver
+
+ // get and set guide rate
+ // 0 to 255 corresponding to 0 to 100% sidereal
+- bool get_guide_rate(CELESTRON_AXIS axis, u_int8_t * rate);
+- bool set_guide_rate(CELESTRON_AXIS axis, u_int8_t rate);
++ bool get_guide_rate(CELESTRON_AXIS axis, uint8_t * rate);
++ bool set_guide_rate(CELESTRON_AXIS axis, uint8_t rate);
+
+ // Pointing state, pier side, returns 'E' or 'W'
+ bool get_pier_side(char * sop);
diff --git a/sci-libs/indilib/indilib-1.9.4.ebuild b/sci-libs/indilib/indilib-1.9.4.ebuild
index b6d000763a3b..6180a9207d72 100644
--- a/sci-libs/indilib/indilib-1.9.4.ebuild
+++ b/sci-libs/indilib/indilib-1.9.4.ebuild
@@ -39,6 +39,10 @@ DEPEND="${RDEPEND}
websocket? ( dev-cpp/websocketpp )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.9.4-musl-stdint.patch
+)
+
src_configure() {
local mycmakeargs=(
-DINDI_BUILD_QT5_CLIENT=OFF
next reply other threads:[~2022-02-06 9:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-06 9:12 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-25 17:04 [gentoo-commits] repo/gentoo:master commit in: sci-libs/indilib/, sci-libs/indilib/files/ Andreas Sturmlechner
2023-07-31 16:26 Andreas Sturmlechner
2022-05-26 14:36 Andreas Sturmlechner
2021-07-14 13:44 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1644138756.e35e4ff449e6652e55bc03dadbe6cb0629141175.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox