On Thu, 28 Nov 2024 14:35:02 +0100,
Stuart Henderson <[email protected]> wrote:
>
> [1 <text/plain; us-ascii (7bit)>]
> On 2024/11/25 01:36, Kirill A. Korinsky wrote:
> > CVSROOT: /cvs
> > Module name: ports
> > Changes by: [email protected] 2024/11/25 01:36:16
> >
> > Added files:
> > net/ejabberd : Makefile distinfo modules.inc
> > net/ejabberd/patches: patch-Makefile_in
> > patch-ejabberd_yml_example
> > patch-src_mod_s2s_bidi_erl
> > net/ejabberd/pkg: DESCR PLIST README ejabberd.rc
> >
> > Log message:
> > net/ejabberd: new port (version 24.10)
> >
> > ejabberd is an open-source, robust, scalable and extensible realtime
> > platform built using Erlang/OTP, that includes XMPP Server, MQTT Broker
> > and SIP Service.
> >
> > OK: sthen@ volker@
> >
>
> Build fails on i386, full log attached.
>
> ===> Compiling
> /pobj/ejabberd-24.10/ejabberd-24.10/c_src/double-conversion/strtod.cc
> ===>
> /pobj/ejabberd-24.10/ejabberd-24.10/c_src/double-conversion/strtod.cc:41:18:
> error: unused variable 'kMaxExactDoubleIntegerDecimalDigi
> ts' [-Werror,-Wunused-const-variable]
> static const int kMaxExactDoubleIntegerDecimalDigits = 15;
> ^
> /pobj/ejabberd-24.10/ejabberd-24.10/c_src/double-conversion/strtod.cc:58:21:
> error: variable 'exact_powers_of_ten' is not needed and will n
> ot be emitted [-Werror,-Wunneeded-internal-declaration]
> static const double exact_powers_of_ten[] = {
> ^
> /pobj/ejabberd-24.10/ejabberd-24.10/c_src/double-conversion/strtod.cc:84:18:
> error: unused variable 'kExactPowersOfTenSize' [-Werror,-Wunus
> ed-const-variable]
> static const int kExactPowersOfTenSize = ARRAY_SIZE(exact_powers_of_ten);
> ^
> 3 errors generated.
>
> gmake: *** [Makefile:216: _build/default/lib/.built] Error 1
>
Here the fix, tested on -current/i386.
Ok?
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/net/ejabberd/Makefile,v
diff -u -p -r1.51 Makefile
--- Makefile 25 Nov 2024 08:36:16 -0000 1.51
+++ Makefile 28 Nov 2024 01:25:58 -0000
@@ -1,6 +1,7 @@
COMMENT = robust, ubiquitous and massively scalable messaging
platform
V = 24.10
+REVISION = 0
DIST_TUPLE += github processone ejabberd ${V} .
CATEGORIES = net
Index: patches/patch-_checkouts_jiffy_c_src_double-conversion_strtod_cc
===================================================================
RCS file: patches/patch-_checkouts_jiffy_c_src_double-conversion_strtod_cc
diff -N patches/patch-_checkouts_jiffy_c_src_double-conversion_strtod_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-_checkouts_jiffy_c_src_double-conversion_strtod_cc 28 Nov
2024 16:29:31 -0000
@@ -0,0 +1,35 @@
+https://github.com/davisp/jiffy/issues/241
+https://github.com/google/double-conversion/pull/123
+
+Index: _checkouts/jiffy/c_src/double-conversion/strtod.cc
+--- _checkouts/jiffy/c_src/double-conversion/strtod.cc.orig
++++ _checkouts/jiffy/c_src/double-conversion/strtod.cc
+@@ -35,10 +35,12 @@
+
+ namespace double_conversion {
+
++#if defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS)
+ // 2^53 = 9007199254740992.
+ // Any integer with at most 15 decimal digits will hence fit into a double
+ // (which has a 53bit significand) without loss of precision.
+ static const int kMaxExactDoubleIntegerDecimalDigits = 15;
++#endif // #if defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS)
+ // 2^64 = 18446744073709551616 > 10^19
+ static const int kMaxUint64DecimalDigits = 19;
+
+@@ -55,6 +57,7 @@ static const int kMinDecimalPower = -324;
+ static const uint64_t kMaxUint64 = UINT64_2PART_C(0xFFFFFFFF, FFFFFFFF);
+
+
++#if defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS)
+ static const double exact_powers_of_ten[] = {
+ 1.0, // 10^0
+ 10.0,
+@@ -82,6 +85,7 @@ static const double exact_powers_of_ten[] = {
+ 10000000000000000000000.0
+ };
+ static const int kExactPowersOfTenSize = ARRAY_SIZE(exact_powers_of_ten);
++#endif // #if defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS)
+
+ // Maximum number of significant digits in the decimal representation.
+ // In fact the value is 772 (see conversions.cc), but to give us some margin
Index: patches/patch-ejabberdctl_template
===================================================================
RCS file: patches/patch-ejabberdctl_template
diff -N patches/patch-ejabberdctl_template
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-ejabberdctl_template 28 Nov 2024 01:26:59 -0000
@@ -0,0 +1,14 @@
+OpenBSD su treats -c before username as class, and don't requires --
+
+Index: ejabberdctl.template
+--- ejabberdctl.template.orig
++++ ejabberdctl.template
+@@ -126,7 +126,7 @@ set_dist_client()
+ exec_cmd()
+ {
+ case $EXEC_CMD in
+- as_install_user) su -s /bin/sh -c 'exec "$0" "$@"' "$INSTALLUSER" --
"$@" ;;
++ as_install_user) su -s /bin/sh "$INSTALLUSER" -c 'exec "$0" "$@"'
"$@" ;;
+ as_current_user) "$@" ;;
+ esac
+ }
--
wbr, Kirill