wip/findcrcs: import findcrcs-0.3

findcrcs tries to find a chunk of a file that matches a particular
given CRC and MD5.
This commit is contained in:
Thomas Klausner 2019-09-01 12:24:56 +02:00
parent 3704ddcad6
commit 29e8be664c
6 changed files with 64 additions and 0 deletions

2
findcrcs/DESCR Normal file
View File

@ -0,0 +1,2 @@
findcrcs tries to find a chunk of a file that matches a particular
given CRC and MD5.

22
findcrcs/Makefile Normal file
View File

@ -0,0 +1,22 @@
# $NetBSD$
DISTNAME= findcrcs-0.3
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=claunia/}
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/claunia/findcrcs/
COMMENT= Find and extract pieces of data by CRC, size and MD5
LICENSE= gnu-gpl-v3 AND apache-2.0
USE_TOOLS+= gmake
USE_LANGUAGES= c++
TEST_TARGET= test
INSTALLATION_DIRS= bin share/doc/findcrcs
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/findcrcs ${DESTDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/findcrcs
.include "../../mk/bsd.pkg.mk"

3
findcrcs/PLIST Normal file
View File

@ -0,0 +1,3 @@
@comment $NetBSD$
bin/findcrcs
share/doc/findcrcs/README

8
findcrcs/distinfo Normal file
View File

@ -0,0 +1,8 @@
$NetBSD$
SHA1 (findcrcs-0.3.tar.gz) = 5144f3d17c318706b3e8113242bccfc59b62bfb7
RMD160 (findcrcs-0.3.tar.gz) = 05e6c25a15f1cfa78bad06a76e8862ffaf25e897
SHA512 (findcrcs-0.3.tar.gz) = b55a59fc3b2d11f10c87cb05d428409043bdcaaefc42a10c456f5fffc3ede18cc02f09397399cc60a6295666872776eb10662ec089d315f512129faac26b7d4f
Size (findcrcs-0.3.tar.gz) = 3981565 bytes
SHA1 (patch-Makefile) = 9d7784dcc6e44fbb70625b5b658604f7a41e87ed
SHA1 (patch-findcrcs.cc) = 80cc824ca3e3470050f488cdf35e136886922825

View File

@ -0,0 +1,15 @@
$NetBSD$
Honor LDFLAGS (fixes RELRO).
--- Makefile.orig 2015-05-24 22:26:34.000000000 +0000
+++ Makefile
@@ -69,7 +68,7 @@ test: $(BINARY) test.bin
@sh -c "time ./$(BINARY) test.bin 1000000 13fbda0d"
$(BINARY): findcrcs.cc md5.c md5.h crcutil-1.0 crcutil.a
- $(BINPREFIX)g++ -O3 -D_FILE_OFFSET_BITS=64 -Wall -o $@ $(EXEFLAGS) findcrcs.cc md5.c crcutil.a -Icrcutil-1.0/code -Icrcutil-1.0/examples
+ $(BINPREFIX)g++ -O3 -D_FILE_OFFSET_BITS=64 -Wall -o $@ $(EXEFLAGS) $(LDFLAGS) findcrcs.cc md5.c crcutil.a -Icrcutil-1.0/code -Icrcutil-1.0/examples
$(BINPREFIX)strip -s $@
crcutil.a: crcutil-1.0

View File

@ -0,0 +1,14 @@
$NetBSD$
Add missing include for errno.
--- findcrcs.cc.orig 2015-05-24 22:26:34.000000000 +0000
+++ findcrcs.cc
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>