aboutsummaryrefslogtreecommitdiff
path: root/math/gh-bc
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2019-11-11 14:33:58 +0000
committerStefan Eßer <se@FreeBSD.org>2019-11-11 14:33:58 +0000
commit64c3a642b6d170b3a89748d084b1c1574519c032 (patch)
tree687b9cbde786b0d82cb30d2e525c2ff3024975ec /math/gh-bc
parent5361f64161dedaac7694d604a4bc8f5548800847 (diff)
downloadports-64c3a642b6d170b3a89748d084b1c1574519c032.tar.gz
ports-64c3a642b6d170b3a89748d084b1c1574519c032.zip
Notes
Diffstat (limited to 'math/gh-bc')
-rw-r--r--math/gh-bc/Makefile13
-rw-r--r--math/gh-bc/distinfo6
-rw-r--r--math/gh-bc/files/patch-locale__install.sh15
3 files changed, 25 insertions, 9 deletions
diff --git a/math/gh-bc/Makefile b/math/gh-bc/Makefile
index 3588fde0decc..d7d634c975e8 100644
--- a/math/gh-bc/Makefile
+++ b/math/gh-bc/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= bc
-PORTVERSION= 2.1.0
+PORTVERSION= 2.3.0
CATEGORIES= math
PKGNAMEPREFIX= gh-
@@ -11,16 +11,25 @@ COMMENT= GNU compatible bc/dc calculator
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.md
+USES= compiler
USE_GITHUB= yes
GH_ACCOUNT= gavinhoward
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= configure.sh
CONFIGURE_ARGS= -G
+
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42
CFLAGS+= --std=c99
+.endif
CONFLICTS_INSTALL= gnubc-[0-9]*
+pre-build:
+ ${INSTALL_SCRIPT} ${WRKSRC}/gen/strgen.sh ${WRKSRC}/gen/strgen
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bin/bc ${STAGEDIR}${PREFIX}/bin/
${LN} ${STAGEDIR}${PREFIX}/bin/bc ${STAGEDIR}${PREFIX}/bin/dc
@@ -34,4 +43,4 @@ do-install:
do-test:
${MAKE} -C ${WRKSRC} test
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/math/gh-bc/distinfo b/math/gh-bc/distinfo
index 65154a43f41d..bec19052b3e8 100644
--- a/math/gh-bc/distinfo
+++ b/math/gh-bc/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1562335308
-SHA256 (gavinhoward-bc-2.1.0_GH0.tar.gz) = bc39c11cd91d2df079f9d7a7bae90f681cfe055b7ad58010c11020625bf1d8a9
-SIZE (gavinhoward-bc-2.1.0_GH0.tar.gz) = 237162
+TIMESTAMP = 1573478768
+SHA256 (gavinhoward-bc-2.3.0_GH0.tar.gz) = c3d6d86e8ffc3c6b657d0ca1a02c4499d760aa869ba9ff813c83f731493ee8e8
+SIZE (gavinhoward-bc-2.3.0_GH0.tar.gz) = 241071
diff --git a/math/gh-bc/files/patch-locale__install.sh b/math/gh-bc/files/patch-locale__install.sh
index 44bcfd8df43e..1c55c5f99c37 100644
--- a/math/gh-bc/files/patch-locale__install.sh
+++ b/math/gh-bc/files/patch-locale__install.sh
@@ -1,6 +1,6 @@
---- locale_install.sh.orig 2019-05-29 01:32:06 UTC
+--- locale_install.sh.orig 2019-11-09 19:04:17 UTC
+++ locale_install.sh
-@@ -114,6 +114,7 @@ for file in $locales_dir/*.msg; do
+@@ -193,6 +193,7 @@ for file in $locales_dir/*.msg; do
continue
fi
@@ -8,11 +8,18 @@
gencatfile "$loc" "$file"
done
-@@ -143,7 +144,8 @@ for file in $locales_dir/*.msg; do
+@@ -217,14 +218,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 -s "$linksrc" "$loc"
+- ln -fs "$rel" "$loc"
+ echo ln "$linksrc" "$loc"
+ ln "$linksrc" "$loc"
fi