git: 94a34f976b05 - main - math/gh-bc: update to version 5.0.0
Stefan Eßer
se at FreeBSD.org
Mon Aug 9 17:45:38 UTC 2021
The branch main has been updated by se:
URL: https://cgit.FreeBSD.org/ports/commit/?id=94a34f976b05bb8b3f2d9eeb4e55c167e4f34179
commit 94a34f976b05bb8b3f2d9eeb4e55c167e4f34179
Author: Stefan Eßer <se at FreeBSD.org>
AuthorDate: 2021-08-09 17:09:30 +0000
Commit: Stefan Eßer <se at FreeBSD.org>
CommitDate: 2021-08-09 17:44:01 +0000
math/gh-bc: update to version 5.0.0
This is a new major release with a number of changes and extensions:
- Limited the number of temporary numbers and made the space for them
static so that allocating more space for them cannot fail.
- Allowed integers with non-zero scale to be used with power, places,
and shift operators.
- Added greatest common divisor and least common multiple to lib2.bc.
- Made bc and dc UTF-8 capable.
- Added the ability for users to have bc and dc quit on SIGINT.
- Added the ability for users to disable prompt and TTY mode by
environment variables.
- Added the ability for users to redefine keywords.
- Added dc's modular exponentiation and divmod to bc.
- Added the ability to assign strings to variables and array elements
and pass them to functions in bc.
- Added dc's asciify command and stream printing to bc.
- Added bitwise and, or, xor, left shift, right shift, reverse,
left rotate, right rotate, and mod functions to lib2.bc.
- Added the functions s2u(x) and s2un(x,n), to lib2.bc.
---
math/gh-bc/Makefile | 19 ++++++++-------
math/gh-bc/distinfo | 6 ++---
math/gh-bc/files/patch-locale__install.sh | 27 ---------------------
math/gh-bc/files/patch-scripts_locale__install.sh | 29 +++++++++++++++++++++++
4 files changed, 42 insertions(+), 39 deletions(-)
diff --git a/math/gh-bc/Makefile b/math/gh-bc/Makefile
index 606f7db891b4..91e6d0f56434 100644
--- a/math/gh-bc/Makefile
+++ b/math/gh-bc/Makefile
@@ -1,5 +1,5 @@
PORTNAME= bc
-PORTVERSION= 4.0.2
+PORTVERSION= 5.0.0
CATEGORIES= math lang
PKGNAMEPREFIX= gh-
@@ -10,21 +10,22 @@ LICENSE= BSD2CLAUSE MIT
LICENSE_COMB= multi
LICENSE_FILE= ${WRKSRC}/LICENSE.md
-USES= compiler
+USES= compiler:c11
USE_GITHUB= yes
GH_ACCOUNT= gavinhoward
-HAS_CONFIGURE= yes
+HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= configure.sh
-CONFIGURE_ARGS= -G
+CONFIGURE_ARGS= -G
+CFLAGS+= -Dstatic_assert=_Static_assert
.include <bsd.port.pre.mk>
-.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42
-CFLAGS+= --std=c99
-.endif
+#.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42
+#CFLAGS+= --std=c99
+#.endif
-CONFLICTS_INSTALL= gnubc-[0-9]*
+CONFLICTS_INSTALL= gnubc
pre-build:
${INSTALL_SCRIPT} ${WRKSRC}/gen/strgen.sh ${WRKSRC}/gen/strgen
@@ -35,7 +36,7 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/manuals/bc.1 ${STAGEDIR}${MANPREFIX}/share/man/man1
${INSTALL_MAN} ${WRKSRC}/manuals/dc.1 ${STAGEDIR}${MANPREFIX}/share/man/man1
${MKDIR} ${STAGEDIR}${PREFIX}/share/nls/C
- ${WRKSRC}/locale_install.sh ${STAGEDIR}${PREFIX}/share/nls/%L/%N.cat ${PORTNAME}
+ ${WRKSRC}/scripts/locale_install.sh ${STAGEDIR}${PREFIX}/share/nls/%L/%N.cat ${PORTNAME}
${MV} ${STAGEDIR}${PREFIX}/share/nls/en_US/bc.cat ${STAGEDIR}${PREFIX}/share/nls/C/
${RMDIR} ${STAGEDIR}${PREFIX}/share/nls/en_US
diff --git a/math/gh-bc/distinfo b/math/gh-bc/distinfo
index 6fa232399800..e559bace8f83 100644
--- a/math/gh-bc/distinfo
+++ b/math/gh-bc/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1620795472
-SHA256 (gavinhoward-bc-4.0.2_GH0.tar.gz) = f940483d09087746b2da56000e406320a2a7e9ba7d61920621b33bd7981fa151
-SIZE (gavinhoward-bc-4.0.2_GH0.tar.gz) = 1139323
+TIMESTAMP = 1628528378
+SHA256 (gavinhoward-bc-5.0.0_GH0.tar.gz) = 3b25215f5e6ceb8c073f5486473d6542fe6d76c580f3e7a343cefc58a8dfc0ea
+SIZE (gavinhoward-bc-5.0.0_GH0.tar.gz) = 1164772
diff --git a/math/gh-bc/files/patch-locale__install.sh b/math/gh-bc/files/patch-locale__install.sh
deleted file mode 100644
index ce93b44a77bc..000000000000
--- a/math/gh-bc/files/patch-locale__install.sh
+++ /dev/null
@@ -1,27 +0,0 @@
---- locale_install.sh.orig 2020-11-26 16:00:16 UTC
-+++ locale_install.sh
-@@ -211,6 +211,7 @@ for file in $locales_dir/*.msg; do
-
- loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec")
-
-+ echo gencatfile "$loc" "$file"
- gencatfile "$loc" "$file"
-
- done
-@@ -239,14 +240,13 @@ for file in $locales_dir/*.msg; do
- linkdir=$(dirname "$file")
- locale=$(basename "$link" .msg)
- linksrc=$(gen_nlspath "$nlspath" "$locale" "$main_exec")
-- relloc="${loc##$destdir/}"
-- rel=$(relpath "$linksrc" "$relloc")
-
- if [ ! -f "$destdir/$linksrc" ]; then
- gencatfile "$destdir/$linksrc" "$linkdir/$link"
- fi
-
-- ln -fs "$rel" "$loc"
-+ echo ln "$linksrc" "$loc"
-+ ln "$linksrc" "$loc"
- fi
-
- done
diff --git a/math/gh-bc/files/patch-scripts_locale__install.sh b/math/gh-bc/files/patch-scripts_locale__install.sh
new file mode 100644
index 000000000000..4d452bd0b101
--- /dev/null
+++ b/math/gh-bc/files/patch-scripts_locale__install.sh
@@ -0,0 +1,29 @@
+--- scripts/locale_install.sh.orig 2021-06-28 18:10:45 UTC
++++ scripts/locale_install.sh
+@@ -243,6 +243,7 @@ for file in $locales_dir/*.msg; do
+ # Generate the proper location for the cat file.
+ loc=$(gen_nlspath "$destdir/$nlspath" "$locale" "$main_exec")
+
++ echo gencatfile "$loc" "$file"
+ gencatfile "$loc" "$file"
+
+ done
+@@ -282,8 +283,6 @@ for file in $locales_dir/*.msg; do
+ linkdir=$(dirname "$file")
+ locale=$(basename "$link" .msg)
+ linksrc=$(gen_nlspath "$nlspath" "$locale" "$main_exec")
+- relloc="${loc##$destdir/}"
+- rel=$(relpath "$linksrc" "$relloc")
+
+ # If the target file doesn't exist (because it's for a locale that is
+ # not installed), generate it anyway. It's easier this way.
+@@ -293,7 +292,8 @@ for file in $locales_dir/*.msg; do
+
+ # Finally, symlink to the install of the generated cat file that
+ # corresponds to the correct msg file.
+- ln -fs "$rel" "$loc"
++ echo ln "$linksrc" "$loc"
++ ln "$linksrc" "$loc"
+ fi
+
+ done
More information about the dev-commits-ports-all
mailing list