1 |
commit: cd3b6b4a0bb16351f76c857f6beb0b9b95dc6565 |
2 |
Author: Gavin Howard <gavin <AT> yzena <DOT> com> |
3 |
AuthorDate: Sun Jan 1 05:05:20 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 1 21:08:34 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd3b6b4a |
7 |
|
8 |
sci-calculators/bc-gh: update to 6.2.2 |
9 |
|
10 |
This commit does two more things besides just update: |
11 |
|
12 |
* The MissingRemoteId pkgcheck warning is resolved by adding the proper |
13 |
remote ID to metadata.xml. |
14 |
* The `readline` and `libedit` USE flags are added since this bc now |
15 |
supports both as options. |
16 |
* The src_test() function was added to avoid crashes found with the Arch |
17 |
package. |
18 |
|
19 |
There are also some style fixes, as requested. |
20 |
|
21 |
Signed-off-by: Gavin Howard <gavin <AT> yzena.com> |
22 |
Closes: https://github.com/gentoo/gentoo/pull/28910 |
23 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
24 |
|
25 |
sci-calculators/bc-gh/Manifest | 1 + |
26 |
sci-calculators/bc-gh/bc-gh-6.2.2.ebuild | 75 ++++++++++++++++++++++++++++++++ |
27 |
sci-calculators/bc-gh/metadata.xml | 1 + |
28 |
3 files changed, 77 insertions(+) |
29 |
|
30 |
diff --git a/sci-calculators/bc-gh/Manifest b/sci-calculators/bc-gh/Manifest |
31 |
index 3c55a944627a..3d0aae049524 100644 |
32 |
--- a/sci-calculators/bc-gh/Manifest |
33 |
+++ b/sci-calculators/bc-gh/Manifest |
34 |
@@ -1 +1,2 @@ |
35 |
DIST bc-6.1.1.tar.xz 455456 BLAKE2B 7945ac623740abd9cbd894c20b8a03006caf64d2ce9770ade930d912c52b4e29b107b524d4a95ebea99e31921b7940e39e1afdeec837b4a03d3ed4e11b9f517b SHA512 0e7fb4d4223ace8ba5c1961cc0d7eba475174f92b75529fde64446b5d80db5729f848fd95507570711d2b8928996c87e837e926d31028f32e3f97cad47567d39 |
36 |
+DIST bc-6.2.2.tar.xz 456672 BLAKE2B 02a6b9012f3b2d6b87be9112c6ccaea84bb121b1de4ebe1276b2151ff24ff445de0cf5a591c2802069e8c9a69c29ca4985a52117761cbb40bc129b70c6f98a49 SHA512 11389ebd522dddb4b255856452d4ff851915331e36682899e946a3eee46e6a3b7ac7d28a0be8b86fc79c230f8ea3d8f335a4722a0c49daa68c51b6c667e1d1fe |
37 |
|
38 |
diff --git a/sci-calculators/bc-gh/bc-gh-6.2.2.ebuild b/sci-calculators/bc-gh/bc-gh-6.2.2.ebuild |
39 |
new file mode 100644 |
40 |
index 000000000000..3296ff1b6942 |
41 |
--- /dev/null |
42 |
+++ b/sci-calculators/bc-gh/bc-gh-6.2.2.ebuild |
43 |
@@ -0,0 +1,75 @@ |
44 |
+# Copyright 1999-2023 Gentoo Authors |
45 |
+# Distributed under the terms of the GNU General Public License v2 |
46 |
+ |
47 |
+EAPI=8 |
48 |
+ |
49 |
+MY_P="bc-${PV}" |
50 |
+DESCRIPTION="Implementation of POSIX bc with GNU extensions" |
51 |
+HOMEPAGE=" |
52 |
+ https://git.yzena.com/gavin/bc/ |
53 |
+ https://github.com/gavinhoward/bc/ |
54 |
+" |
55 |
+SRC_URI=" |
56 |
+ https://github.com/gavinhoward/bc/releases/download/${PV}/${MY_P}.tar.xz |
57 |
+" |
58 |
+S=${WORKDIR}/${MY_P} |
59 |
+ |
60 |
+LICENSE="BSD-2" |
61 |
+SLOT="0" |
62 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
63 |
+IUSE="libedit readline" |
64 |
+ |
65 |
+DEPEND=" |
66 |
+ !readline? ( |
67 |
+ libedit? ( dev-libs/libedit:= ) |
68 |
+ ) |
69 |
+ readline? ( |
70 |
+ sys-libs/readline:= |
71 |
+ sys-libs/ncurses:= |
72 |
+ ) |
73 |
+" |
74 |
+RDEPEND=" |
75 |
+ ${DEPEND} |
76 |
+" |
77 |
+ |
78 |
+src_configure() { |
79 |
+ local myconf=( |
80 |
+ # GNU and BSD bc's have slightly different behavior. This bc can act |
81 |
+ # like both, changing at runtime with environment variables, but it |
82 |
+ # needs defaults, which can be set at compile time. This option sets all |
83 |
+ # of the defaults to match the GNU bc/dc since it's common on Linux. |
84 |
+ -pGNU |
85 |
+ # A lot of test results are generated first by a bc compatible with the |
86 |
+ # GNU bc. If there is no GNU bc installed, then those tests should be |
87 |
+ # skipped. That's what this option does. Without it, we would have a |
88 |
+ # dependency cycle. Those tests are super long, anyway. |
89 |
+ -G |
90 |
+ # Disables the automatic stripping of binaries. |
91 |
+ -T |
92 |
+ # Enables installing all locales, which is important for packages. |
93 |
+ -l |
94 |
+ # Disables some "problematic" tests that need specific options on Linux |
95 |
+ # to not trigger the OOM killer because malloc() lies. |
96 |
+ -P |
97 |
+ ) |
98 |
+ if use readline ; then |
99 |
+ myconf+=( -r ) |
100 |
+ elif use libedit ; then |
101 |
+ myconf+=( -e ) |
102 |
+ fi |
103 |
+ |
104 |
+ local -x EXECSUFFIX="-gh" |
105 |
+ local -x PREFIX="${EPREFIX}/usr" |
106 |
+ ./configure.sh "${myconf[@]}" || die |
107 |
+} |
108 |
+ |
109 |
+src_test() { |
110 |
+ # This is to fix a bug encountered on Arch. It is to ensure we don't get |
111 |
+ # segfaults on `make check` when the error messages change because the error |
112 |
+ # messages are passed to printf(); they have format specifiers. With these |
113 |
+ # env vars, the internal error messages are used, instead of the installed |
114 |
+ # locales, which might be different since the new locale files are not |
115 |
+ # installed yet. (It is impossible to use uninstalled locales because of the |
116 |
+ # poor design of POSIX locales.) |
117 |
+ env LANG=C LC_ALL=C make check |
118 |
+} |
119 |
|
120 |
diff --git a/sci-calculators/bc-gh/metadata.xml b/sci-calculators/bc-gh/metadata.xml |
121 |
index cf7960fcff59..b16dce8c90eb 100644 |
122 |
--- a/sci-calculators/bc-gh/metadata.xml |
123 |
+++ b/sci-calculators/bc-gh/metadata.xml |
124 |
@@ -16,6 +16,7 @@ |
125 |
</maintainer> |
126 |
<bugs-to>https://git.yzena.com/gavin/bc</bugs-to> |
127 |
<doc>https://git.yzena.com/gavin/bc/src/branch/master/manuals</doc> |
128 |
+ <remote-id type="github">gavinhoward/bc</remote-id> |
129 |
</upstream> |
130 |
<longdescription lang="en"> |
131 |
An implementation of POSIX bc and Unix dc with GNU extensions and some of |