pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
SafeInt: start package
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Sat Sep 26 16:20:49 2026 +0200
Changeset: 91a45a1f618ab163b1412a972b4b4aea1375886f
Modified Files:
Makefile
Added Files:
SafeInt/DESCR
SafeInt/Makefile
SafeInt/PLIST
SafeInt/TODO
SafeInt/distinfo
Log Message:
SafeInt: start package
does not get very far
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=91a45a1f618ab163b1412a972b4b4aea1375886f
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
SafeInt/DESCR | 21 +++++++++++++++++++++
SafeInt/Makefile | 20 ++++++++++++++++++++
SafeInt/PLIST | 4 ++++
SafeInt/TODO | 9 +++++++++
SafeInt/distinfo | 5 +++++
6 files changed, 60 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index e141edf210..b103143a28 100644
--- a/Makefile
+++ b/Makefile
@@ -106,6 +106,7 @@ SUBDIR+= ReZound
SUBDIR+= RigelEngine
SUBDIR+= SDL2_testgamecontroller
SUBDIR+= SNAP
+SUBDIR+= SafeInt
SUBDIR+= SecLists
SUBDIR+= StepTalk
SUBDIR+= TT2020-ttf-git
diff --git a/SafeInt/DESCR b/SafeInt/DESCR
new file mode 100644
index 0000000000..122e63edc3
--- /dev/null
+++ b/SafeInt/DESCR
@@ -0,0 +1,21 @@
+TODO: Adjust the following lines from README.md
+
+# SafeInt
+SafeInt is a class library for C++ that manages integer overflows.
+
+As of July, 2022, there is also a C library that checks casting, multiplication, division, addition and subtraction for all combinations of signed and unsigned 32-bit and 64-bit integers. The C library has been validated against the same test vectors as SafeInt. It consists of two files, safe_math.h, and safe_math_impl.h.
+
+Now updated to keep the entire history of the class from the time it first was checked into CodePlex.
+
+March, 2018 - added support for constexpr, also enforcing a requirement that --std=c++11 or --std=c++14
+has to be used for gcc or clang, minimum Visual Studio compiler version TBD.
+
+Note - I do not accept pull requests for the core header, but may for test files, etc. The best thing to do is to give me a bit of sample code that allows me to repro the problem, and I'll fix it in the same style as the rest of the library. It's also critical that this library remain stable, so I will be conservative with changes.
+
+My bug priority is as follows:
+
+0) It either accepts invalid math, or throws with valid math. These have been very rare, but I try to turn these around in hours, not days.
+1) There might be a way to make things more efficient - for example, a pending bug to use intrinsics is something I'll take.
+1a) There's a cool new thing in the standard you'd like me to support, for example constexpr support was added most recently.
+2) You are trying to use the library in an unsupported environment, and you'd like changes so it builds cleanly with your compiler settings. Depending on what this entails, I'll do my best to work with these.
+3) The code could be tidier - while the goal is to use very clean, standard C++, it's nearly 7300 LOC, and it isn't perfect. I might take these if I happen to be making changes in that area. Or if you can show me that a change results in more efficient assembly, which makes it category (1).
diff --git a/SafeInt/Makefile b/SafeInt/Makefile
new file mode 100644
index 0000000000..c9562a1750
--- /dev/null
+++ b/SafeInt/Makefile
@@ -0,0 +1,20 @@
+# $NetBSD$
+
+DISTNAME= 3.0.28a
+PKGNAME= ${GITHUB_PROJECT}-${DISTNAME}
+CATEGORIES= # TODO: add primary category
+MASTER_SITES= ${MASTER_SITE_GITHUB:=dcleblanc/}
+GITHUB_PROJECT= SafeInt
+GITHUB_TAG= refs/tags/3.0.28a
+DIST_SUBDIR= ${GITHUB_PROJECT}
+
+MAINTAINER= INSERT_YOUR_MAIL_ADDRESS_HERE # or use pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/dcleblanc/SafeInt/
+COMMENT= TODO: Short description of the package
+#LICENSE= # TODO: (see mk/license.mk)
+
+WRKSRC= ${WRKDIR}/SafeInt-3.0.28a
+USE_LANGUAGES= c c++
+
+.include "../../devel/cmake/build.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/SafeInt/PLIST b/SafeInt/PLIST
new file mode 100644
index 0000000000..92ba51a2d7
--- /dev/null
+++ b/SafeInt/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+@comment TODO: to fill this file with the file listing:
+@comment TODO: 1. run "/usr/bin/make package"
+@comment TODO: 2. run "/usr/bin/make print-PLIST"
diff --git a/SafeInt/TODO b/SafeInt/TODO
new file mode 100644
index 0000000000..4e4461a24c
--- /dev/null
+++ b/SafeInt/TODO
@@ -0,0 +1,9 @@
+In file included from /usr/include/g++/bits/c++config.h:7,
+ from /usr/include/g++/cstdint:38,
+ from /tmp/wip/SafeInt/work/SafeInt-3.0.28a/Test/../SafeInt.hpp:209,
+ from /tmp/wip/SafeInt/work/SafeInt-3.0.28a/Test/CompileTest.cpp:13:
+/usr/include/g++/initializer_list: In function 'void MoveRegression()':
+/usr/include/g++/initializer_list:41:15: error: expected '=' before '__attribute__'
+ 41 | namespace std _GLIBCXX_VISIBILITY(default)
+ | ^~~~~~~~~~~~~~~~~~~
+/usr/include/g++/initializer_list:41:15: error: expected identifier before '__attribute__'
diff --git a/SafeInt/distinfo b/SafeInt/distinfo
new file mode 100644
index 0000000000..4b79f910c1
--- /dev/null
+++ b/SafeInt/distinfo
@@ -0,0 +1,5 @@
+$NetBSD$
+
+BLAKE2s (SafeInt/3.0.28a.tar.gz) = 8090b05757e90c46671ed1b7eb42cad3fbc277d86c39c42b799c5b5ee393939a
+SHA512 (SafeInt/3.0.28a.tar.gz) = 04f3d4202b7069f2970811311c422b48225466887768a1f1fcdc9417e2b6a1ebd64f83ee86abe25e667e7945b011b5ef7ce2bbc83ce8e518fc4bf609fa52d77c
+Size (SafeInt/3.0.28a.tar.gz) = 589772 bytes
Home |
Main Index |
Thread Index |
Old Index