pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/security/zxcvbn-c
Module Name: pkgsrc
Committed By: tnn
Date: Mon Apr 28 20:44:38 UTC 2025
Modified Files:
pkgsrc/security/zxcvbn-c: distinfo
pkgsrc/security/zxcvbn-c/patches: patch-makefile
Added Files:
pkgsrc/security/zxcvbn-c/patches: patch-dict-generate.cpp
Log Message:
zxcvbn-c: add some build fixes from upstream for GCC 15 and make -j
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/security/zxcvbn-c/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/security/zxcvbn-c/patches/patch-dict-generate.cpp
cvs rdiff -u -r1.1 -r1.2 pkgsrc/security/zxcvbn-c/patches/patch-makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/security/zxcvbn-c/distinfo
diff -u pkgsrc/security/zxcvbn-c/distinfo:1.1 pkgsrc/security/zxcvbn-c/distinfo:1.2
--- pkgsrc/security/zxcvbn-c/distinfo:1.1 Sun Feb 11 21:45:44 2024
+++ pkgsrc/security/zxcvbn-c/distinfo Mon Apr 28 20:44:38 2025
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2024/02/11 21:45:44 ryoon Exp $
+$NetBSD: distinfo,v 1.2 2025/04/28 20:44:38 tnn Exp $
BLAKE2s (zxcvbn-c-2.5.tar.gz) = 6e2e43801bd63da217ccbb03c48edcdf05a712a22e6c4a1b0561e295d8ec8d01
SHA512 (zxcvbn-c-2.5.tar.gz) = d7199b3cc36cd0e401bd8f857132425908307aefcdb1bb635ee81c34cf71ccbcdf0fe36a336a55da1281692b508881b54773afa41379a448863095f4abd5c0e8
Size (zxcvbn-c-2.5.tar.gz) = 1404434 bytes
-SHA1 (patch-makefile) = c5b863a4a64f83ad361353e000068ead98142065
+SHA1 (patch-dict-generate.cpp) = 963a1a2be8cb86868fc976630584a5c34555253a
+SHA1 (patch-makefile) = b8b7b1643ce0b6a04f32abadbd84a0dce0f78cb7
Index: pkgsrc/security/zxcvbn-c/patches/patch-makefile
diff -u pkgsrc/security/zxcvbn-c/patches/patch-makefile:1.1 pkgsrc/security/zxcvbn-c/patches/patch-makefile:1.2
--- pkgsrc/security/zxcvbn-c/patches/patch-makefile:1.1 Sun Feb 11 21:45:44 2024
+++ pkgsrc/security/zxcvbn-c/patches/patch-makefile Mon Apr 28 20:44:38 2025
@@ -1,8 +1,9 @@
-$NetBSD: patch-makefile,v 1.1 2024/02/11 21:45:44 ryoon Exp $
+$NetBSD: patch-makefile,v 1.2 2025/04/28 20:44:38 tnn Exp $
* Add install target.
+* https://github.com/tsyrogit/zxcvbn-c/commit/2c454989547390c944d02823b751e8ff4a3963e5
---- makefile.orig 2024-02-11 21:40:14.792287908 +0000
+--- makefile.orig 2022-04-07 17:19:00.000000000 +0000
+++ makefile
@@ -17,6 +17,14 @@ WORDS = words-eng_wiki.txt words-female.
@@ -19,3 +20,22 @@ $NetBSD: patch-makefile,v 1.1 2024/02/11
test-shlib: test.c $(TARGET_LIB)
if [ ! -e libzxcvbn.so ]; then ln -s $(TARGET_LIB) libzxcvbn.so; fi
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -L. $(LDFLAGS) -lzxcvbn -lm
+@@ -79,8 +87,7 @@ test-c++file: test.c zxcvbn-c++file.o
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) \
+ -DUSE_DICT_FILE -o test-c++file test.cpp zxcvbn-c++file.o $(LDFLAGS) -lm
+
+-zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h
+- if [ ! -e zxcvbn.cpp ]; then ln -s zxcvbn.c zxcvbn.cpp; fi
++zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h zxcvbn-c++inline.o
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) \
+ -DUSE_DICT_FILE -c -o zxcvbn-c++file.o zxcvbn.cpp
+
+@@ -102,7 +109,7 @@ test: test-internals test-file test-inli
+ @echo Finished
+
+ clean:
+- rm -f test-file zxcvbn-file.o test-c++file zxcvbn-c++file.o
++ rm -f test-file zxcvbn-file.o test-c++file zxcvbn-c++file.o
+ rm -f test-inline test-internals zxcvbn-inline.o zxcvbn-inline-pic.o test-c++inline zxcvbn-c++inline.o
+ rm -f dict-*.h zxcvbn.dict zxcvbn.cpp test.cpp
+ rm -f dictgen
Added files:
Index: pkgsrc/security/zxcvbn-c/patches/patch-dict-generate.cpp
diff -u /dev/null pkgsrc/security/zxcvbn-c/patches/patch-dict-generate.cpp:1.1
--- /dev/null Mon Apr 28 20:44:38 2025
+++ pkgsrc/security/zxcvbn-c/patches/patch-dict-generate.cpp Mon Apr 28 20:44:38 2025
@@ -0,0 +1,80 @@
+$NetBSD: patch-dict-generate.cpp,v 1.1 2025/04/28 20:44:38 tnn Exp $
+
+* https://github.com/tsyrogit/zxcvbn-c/commit/b9f30993c88d9057d7d95a1b059989f7853fd1b0
+* https://github.com/tsyrogit/zxcvbn-c/commit/92c6ea875231876ca264187326ce2d615d5ad543
+
+--- dict-generate.cpp.orig 2025-04-28 20:39:40.248646721 +0000
++++ dict-generate.cpp
+@@ -22,6 +22,8 @@
+ *
+ **********************************************************************************/
+
++#include <algorithm>
++#include <cstdint>
+ #include <iostream>
+ #include <string>
+ #include <fstream>
+@@ -387,7 +389,7 @@ typedef map<string, Entry> EntryMap_t;
+ typedef list<string> StringList_t;
+ typedef list<NodeSPtr> NodeList_t;
+ typedef set<StringInt> StringIntSet_t;
+-typedef basic_string<int> StringOfInts;
++typedef vector<int> StringOfInts;
+ typedef vector<unsigned int> UintVect;
+ typedef vector<uint64_t> Uint64Vect;
+ typedef vector<StringInt *> StrIntPtrVect_t;
+@@ -601,17 +603,14 @@ static void ScanTrieForOrder(EntryMap_t
+ static void ReduceTrie(NodeSPtr Root)
+ {
+ int Height;
+- int cnt=0, del=0;
+ Root->CalcCheck();
+
+ NodeSPtr pNode = Root;
+ for(Height = Root->CalcHeight(); Height >= 0; --Height)
+ {
+ // Get a list of all nodes at given height
+- int x=0;
+ NodeList_t Lst;
+ AddToListAtHeight(Lst, Root, Height);
+- cnt += Lst.size();
+
+ NodeList_t::iterator Ita, Itb;
+ for(Ita = Lst.begin(); Ita != Lst.end(); ++Ita)
+@@ -631,7 +630,6 @@ static void ReduceTrie(NodeSPtr Root)
+ // Remove the 2nd node from the scanning list to as it will
+ // get deleted by the sharing (as using std::shared_ptr)
+ Parentb->ChangeChild(*Ita, *Itb);
+- ++x;++del;
+ Itb = Lst.erase(Itb);
+ }
+ else
+@@ -741,7 +739,7 @@ static int CheckReduction(StringIntVect_
+ {
+ char Tmp[20];
+ Ranks[b].i = It->second.mRank;
+- sprintf(Tmp, "%d: ", n);
++ snprintf(Tmp, sizeof(Tmp), "%d: ", n);
+ Ranks[b].s = string(Tmp) + Text;
+ }
+ // Try to find a non-existant word
+@@ -868,15 +866,14 @@ void CreateArrays(NodeSPtr Root, StringI
+ for(Itc = Root->ChildBegin(); Itc != Root->ChildEnd(); ++Itc)
+ {
+ int i = Itc->second->GetAddr();
+- Chld += i;
++ Chld.push_back(i);
+ }
+ // Find where in pointer array the child pointer string is
+- StringOfInts::size_type x = ChildAddrs.find(Chld);
+- if (x == StringOfInts::npos)
++ StringOfInts::size_type x = search(ChildAddrs.begin(), ChildAddrs.end(), Chld.begin(), Chld.end()) - ChildAddrs.begin();
++ if (x == ChildAddrs.size())
+ {
+ // Not found, add it
+- x = ChildAddrs.length();
+- ChildAddrs += Chld;
++ ChildAddrs.insert(ChildAddrs.end(), Chld.begin(), Chld.end());
+ }
+ // Val will contain the final node data
+ uint64_t Val = Its->i;
Home |
Main Index |
Thread Index |
Old Index