1 |
commit: aa6bff56c719332a4f2a810bd2b690af1bc375e8 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 19 00:56:53 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 19 00:56:53 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa6bff56 |
7 |
|
8 |
net-misc/bopm: fix configure w/ clang 16 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/900254 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../{bopm-3.1.3-r6.ebuild => bopm-3.1.3-r7.ebuild} | 11 ++- |
14 |
net-misc/bopm/files/bopm-3.1.3-autotools.patch | 88 ---------------------- |
15 |
2 files changed, 8 insertions(+), 91 deletions(-) |
16 |
|
17 |
diff --git a/net-misc/bopm/bopm-3.1.3-r6.ebuild b/net-misc/bopm/bopm-3.1.3-r7.ebuild |
18 |
similarity index 80% |
19 |
rename from net-misc/bopm/bopm-3.1.3-r6.ebuild |
20 |
rename to net-misc/bopm/bopm-3.1.3-r7.ebuild |
21 |
index ae8dd5a2d897..d42d9a0d0a54 100644 |
22 |
--- a/net-misc/bopm/bopm-3.1.3-r6.ebuild |
23 |
+++ b/net-misc/bopm/bopm-3.1.3-r7.ebuild |
24 |
@@ -1,7 +1,7 @@ |
25 |
-# Copyright 1999-2021 Gentoo Authors |
26 |
+# Copyright 1999-2023 Gentoo Authors |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
|
29 |
-EAPI=7 |
30 |
+EAPI=8 |
31 |
|
32 |
inherit autotools |
33 |
|
34 |
@@ -14,6 +14,8 @@ SLOT="0" |
35 |
KEYWORDS="~alpha ~amd64 ~ppc ~x86" |
36 |
|
37 |
RDEPEND="acct-user/opm" |
38 |
+BDEPEND="acct-user/opm" |
39 |
+BDEPEND="sys-devel/autoconf-archive" |
40 |
|
41 |
PATCHES=( |
42 |
"${FILESDIR}"/${P}-remove-njabl.patch |
43 |
@@ -29,6 +31,8 @@ src_prepare() { |
44 |
|
45 |
mv configure.{in,ac} || die |
46 |
mv src/libopm/configure.{in,ac} || die |
47 |
+ mkdir src/libopm/m4 || die |
48 |
+ cp "${BROOT}"/usr/share/aclocal/ax_func_snprintf.m4 src/libopm/m4/ax_func_snprintf.m4 || die |
49 |
|
50 |
default |
51 |
cp bopm.conf{.sample,} || die |
52 |
@@ -37,7 +41,8 @@ src_prepare() { |
53 |
} |
54 |
|
55 |
src_configure() { |
56 |
- econf --localstatedir="${EPREFIX}"/var/log/${PN} |
57 |
+ # We need --enable-static to build libopm.a. We don't install it so it's fine. |
58 |
+ econf --localstatedir="${EPREFIX}"/var/log/${PN} --enable-static |
59 |
} |
60 |
|
61 |
src_install() { |
62 |
|
63 |
diff --git a/net-misc/bopm/files/bopm-3.1.3-autotools.patch b/net-misc/bopm/files/bopm-3.1.3-autotools.patch |
64 |
index e2927b0b74b6..e336150f430c 100644 |
65 |
--- a/net-misc/bopm/files/bopm-3.1.3-autotools.patch |
66 |
+++ b/net-misc/bopm/files/bopm-3.1.3-autotools.patch |
67 |
@@ -44,94 +44,6 @@ |
68 |
AC_CONFIG_SRCDIR(src/libopm.h) |
69 |
AM_CONFIG_HEADER(src/setup.h) |
70 |
AM_INIT_AUTOMAKE() |
71 |
---- bopm-3.1.3/src/libopm/m4/ax_func_snprintf.m4 |
72 |
-+++ bopm-3.1.3/src/libopm/m4/ax_func_snprintf.m4 |
73 |
-@@ -0,0 +1,85 @@ |
74 |
-+# =========================================================================== |
75 |
-+# http://www.gnu.org/software/autoconf-archive/ax_func_snprintf.html |
76 |
-+# =========================================================================== |
77 |
-+# |
78 |
-+# SYNOPSIS |
79 |
-+# |
80 |
-+# AX_FUNC_SNPRINTF |
81 |
-+# |
82 |
-+# DESCRIPTION |
83 |
-+# |
84 |
-+# Checks for a fully C99 compliant snprintf, in particular checks whether |
85 |
-+# it does bounds checking and returns the correct string length; does the |
86 |
-+# same check for vsnprintf. If no working snprintf or vsnprintf is found, |
87 |
-+# request a replacement and warn the user about it. Note: the mentioned |
88 |
-+# replacement is freely available and may be used in any project |
89 |
-+# regardless of it's license. |
90 |
-+# |
91 |
-+# LICENSE |
92 |
-+# |
93 |
-+# Copyright (c) 2008 Ruediger Kuhlmann <info@×××××××××××××××××.de> |
94 |
-+# |
95 |
-+# Copying and distribution of this file, with or without modification, are |
96 |
-+# permitted in any medium without royalty provided the copyright notice |
97 |
-+# and this notice are preserved. This file is offered as-is, without any |
98 |
-+# warranty. |
99 |
-+ |
100 |
-+#serial 5 |
101 |
-+ |
102 |
-+AU_ALIAS([AC_FUNC_SNPRINTF], [AX_FUNC_SNPRINTF]) |
103 |
-+AC_DEFUN([AX_FUNC_SNPRINTF], |
104 |
-+[AC_CHECK_FUNCS(snprintf vsnprintf) |
105 |
-+AC_MSG_CHECKING(for working snprintf) |
106 |
-+AC_CACHE_VAL(ac_cv_have_working_snprintf, |
107 |
-+[AC_TRY_RUN( |
108 |
-+[#include <stdio.h> |
109 |
-+ |
110 |
-+int main(void) |
111 |
-+{ |
112 |
-+ char bufs[5] = { 'x', 'x', 'x', '\0', '\0' }; |
113 |
-+ char bufd[5] = { 'x', 'x', 'x', '\0', '\0' }; |
114 |
-+ int i; |
115 |
-+ i = snprintf (bufs, 2, "%s", "111"); |
116 |
-+ if (strcmp (bufs, "1")) exit (1); |
117 |
-+ if (i != 3) exit (1); |
118 |
-+ i = snprintf (bufd, 2, "%d", 111); |
119 |
-+ if (strcmp (bufd, "1")) exit (1); |
120 |
-+ if (i != 3) exit (1); |
121 |
-+ exit(0); |
122 |
-+}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)]) |
123 |
-+AC_MSG_RESULT([$ac_cv_have_working_snprintf]) |
124 |
-+AC_MSG_CHECKING(for working vsnprintf) |
125 |
-+AC_CACHE_VAL(ac_cv_have_working_vsnprintf, |
126 |
-+[AC_TRY_RUN( |
127 |
-+[#include <stdio.h> |
128 |
-+#include <stdarg.h> |
129 |
-+ |
130 |
-+int my_vsnprintf (char *buf, const char *tmpl, ...) |
131 |
-+{ |
132 |
-+ int i; |
133 |
-+ va_list args; |
134 |
-+ va_start (args, tmpl); |
135 |
-+ i = vsnprintf (buf, 2, tmpl, args); |
136 |
-+ va_end (args); |
137 |
-+ return i; |
138 |
-+} |
139 |
-+ |
140 |
-+int main(void) |
141 |
-+{ |
142 |
-+ char bufs[5] = { 'x', 'x', 'x', '\0', '\0' }; |
143 |
-+ char bufd[5] = { 'x', 'x', 'x', '\0', '\0' }; |
144 |
-+ int i; |
145 |
-+ i = my_vsnprintf (bufs, "%s", "111"); |
146 |
-+ if (strcmp (bufs, "1")) exit (1); |
147 |
-+ if (i != 3) exit (1); |
148 |
-+ i = my_vsnprintf (bufd, "%d", 111); |
149 |
-+ if (strcmp (bufd, "1")) exit (1); |
150 |
-+ if (i != 3) exit (1); |
151 |
-+ exit(0); |
152 |
-+}], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)]) |
153 |
-+AC_MSG_RESULT([$ac_cv_have_working_vsnprintf]) |
154 |
-+if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then |
155 |
-+ AC_LIBOBJ(snprintf) |
156 |
-+ AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from http://www.ijs.si/software/snprintf/.]) |
157 |
-+ AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if system (v)snprintf is broken") |
158 |
-+fi]) |
159 |
--- bopm-3.1.3/src/libopm/m4/etr_socket_nsl.m4 |
160 |
+++ bopm-3.1.3/src/libopm/m4/etr_socket_nsl.m4 |
161 |
@@ -0,0 +1,81 @@ |