From owner-dev-commits-ports-all@freebsd.org Fri Sep 24 09:45:41 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E2F666A1F7; Fri, 24 Sep 2021 09:45:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HG6bT2MrNz4csb; Fri, 24 Sep 2021 09:45:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3132C14901; Fri, 24 Sep 2021 09:45:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18O9jfsj081544; Fri, 24 Sep 2021 09:45:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18O9jfph081543; Fri, 24 Sep 2021 09:45:41 GMT (envelope-from git) Date: Fri, 24 Sep 2021 09:45:41 GMT Message-Id: <202109240945.18O9jfph081543@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 96b3a0cfc168 - main - math/tiny-bignum-c: New port: Small portable multiple-precision unsigned integer arithmetic in C MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96b3a0cfc1683f0e657f625c77e7ba31ee8ac974 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2021 09:45:41 -0000 The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=96b3a0cfc1683f0e657f625c77e7ba31ee8ac974 commit 96b3a0cfc1683f0e657f625c77e7ba31ee8ac974 Author: Yuri Victorovich AuthorDate: 2021-09-24 09:35:21 +0000 Commit: Yuri Victorovich CommitDate: 2021-09-24 09:44:16 +0000 math/tiny-bignum-c: New port: Small portable multiple-precision unsigned integer arithmetic in C --- math/Makefile | 1 + math/tiny-bignum-c/Makefile | 40 +++++++++++++++++++++++++++++++++ math/tiny-bignum-c/distinfo | 3 +++ math/tiny-bignum-c/files/patch-Makefile | 8 +++++++ math/tiny-bignum-c/pkg-descr | 7 ++++++ 5 files changed, 59 insertions(+) diff --git a/math/Makefile b/math/Makefile index fab655259b3c..5ffb5cae6a85 100644 --- a/math/Makefile +++ b/math/Makefile @@ -1033,6 +1033,7 @@ SUBDIR += tetgen SUBDIR += teyjus SUBDIR += timbl + SUBDIR += tiny-bignum-c SUBDIR += tmv SUBDIR += tomsfastmath SUBDIR += topaz diff --git a/math/tiny-bignum-c/Makefile b/math/tiny-bignum-c/Makefile new file mode 100644 index 000000000000..e664bcdf80fd --- /dev/null +++ b/math/tiny-bignum-c/Makefile @@ -0,0 +1,40 @@ +PORTNAME= tiny-bignum-c +DISTVERSION= g20210222 +CATEGORIES= math + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Small portable multiple-precision unsigned integer arithmetic in C + +LICENSE= UNLICENSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= python:build,test # build only for BINARY_ALIAS +USE_LDCONFIG= yes + +USE_GITHUB= yes +GH_ACCOUNT= kokke +GH_TAGNAME= 201fb20 + +ENAME= bignum # libbn.so is used by another package, so install it as bignum + +TEST_TARGET= all test # some tests fail, see https://github.com/kokke/tiny-bignum-c/issues/29 + +BINARY_ALIAS= python=${PYTHON_CMD} + +PLIST_FILES= include/${ENAME}.h \ + lib/lib${ENAME}.a \ + lib/lib${ENAME}.so + +do-build: + @cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${CC} -c ${CFLAGS} bn.c && \ + ${AR} -cq lib${ENAME}.a bn.o && \ + ${SETENV} ${MAKE_ENV} ${CC} -c ${CFLAGS} -fPIC bn.c && \ + ${CC} -shared -o lib${ENAME}.so -Wl,-soname,lib${ENAME}.so ${LDFLAGS} bn.o + +do-install: + ${INSTALL_DATA} ${WRKSRC}/bn.h ${STAGEDIR}${PREFIX}/include/${ENAME}.h + ${INSTALL_DATA} ${WRKSRC}/lib${ENAME}.a ${STAGEDIR}${PREFIX}/lib + ${INSTALL_LIB} ${WRKSRC}/lib${ENAME}.so ${STAGEDIR}${PREFIX}/lib + +.include diff --git a/math/tiny-bignum-c/distinfo b/math/tiny-bignum-c/distinfo new file mode 100644 index 000000000000..1553cba184fc --- /dev/null +++ b/math/tiny-bignum-c/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1632474320 +SHA256 (kokke-tiny-bignum-c-g20210222-201fb20_GH0.tar.gz) = 20838d8c239994de91394724c43c1e7f1207821c59974228976e10e39ee7002b +SIZE (kokke-tiny-bignum-c-g20210222-201fb20_GH0.tar.gz) = 34401 diff --git a/math/tiny-bignum-c/files/patch-Makefile b/math/tiny-bignum-c/files/patch-Makefile new file mode 100644 index 000000000000..db5359aa1a19 --- /dev/null +++ b/math/tiny-bignum-c/files/patch-Makefile @@ -0,0 +1,8 @@ +--- Makefile.orig 2021-02-22 22:03:20 UTC ++++ Makefile +@@ -1,4 +1,4 @@ +-CC := gcc ++#CC := gcc + MACROS := + CFLAGS := -I. -Wundef -Wall -Wextra -O3 $(MACROS) + diff --git a/math/tiny-bignum-c/pkg-descr b/math/tiny-bignum-c/pkg-descr new file mode 100644 index 000000000000..816f5726db29 --- /dev/null +++ b/math/tiny-bignum-c/pkg-descr @@ -0,0 +1,7 @@ +tiny-bignum-c is a small portable arbitrary-precision unsigned integer +arithmetic in C, for calculating with large numbers. + +Uses an array of uint8_t, uint16_t or uint32_t as underlying data-type utilizing +all bits in each word. + +WWW: https://github.com/kokke/tiny-bignum-c