git: 0b84c671259d - main - sysutils/bulk_extractor: Update to 2.2.0

MANTANI Nobutaka <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <[email protected]>
The branch main has been updated by nobutaka:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0b84c671259d35ac273283d2271c95342d645d28

commit 0b84c671259d35ac273283d2271c95342d645d28
Author:     MANTANI Nobutaka <[email protected]>
AuthorDate: 2026-08-18 17:35:38 +0000
Commit:     MANTANI Nobutaka <[email protected]>
CommitDate: 2026-08-18 17:36:08 +0000

    sysutils/bulk_extractor: Update to 2.2.0
---
 sysutils/bulk_extractor/Makefile                   |  21 +---
 sysutils/bulk_extractor/distinfo                   |  14 +--
 .../bulk_extractor/files/patch-src_Makefile.am     |  11 ++
 ...ch-src_be20__api_dfxml__cpp_src_dfxml__writer.h |  13 ---
 .../files/patch-src_bulk__extractor__restarter.h   |  22 ++++
 .../bulk_extractor/files/patch-src_scan__exiv2.cpp | 125 ---------------------
 6 files changed, 39 insertions(+), 167 deletions(-)

diff --git a/sysutils/bulk_extractor/Makefile b/sysutils/bulk_extractor/Makefile
index 816c57b65c76..a47d6904253b 100644
--- a/sysutils/bulk_extractor/Makefile
+++ b/sysutils/bulk_extractor/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	bulk_extractor
-PORTVERSION=	2.1.1
-PORTREVISION=	2
+PORTVERSION=	2.2.0
 DISTVERSIONPREFIX=	v
 CATEGORIES=	sysutils
 
@@ -15,23 +14,15 @@ LIB_DEPENDS=	libabsl_base.so:devel/abseil \
 		libewf.so:devel/libewf \
 		libexiv2.so:graphics/exiv2 \
 		libexpat.so:textproc/expat2 \
+		libfmt.so:devel/libfmt \
 		libgcrypt.so:security/libgcrypt \
 		libgpg-error.so:security/libgpg-error \
 		libre2.so:devel/re2
 
 USES=		autoreconf compiler:c++17-lang gnome iconv:wchar_t \
-		pkgconfig python:build sqlite ssl
+		libtool pkgconfig python:build sqlite ssl
 USE_GITHUB=	yes
-
 GH_ACCOUNT=	simsong
-GH_TUPLE=	simsong:be20_api:${GH_TAG_BE20_API}:be20_api \
-		dfxml-working-group:dfxml_cpp:${GH_TAG_DFXML_CPP}:dfxml_cpp \
-		dfxml-working-group:dfxml_schema:${GH_TAG_DFXML_SCHEMA}:dfxml_schema \
-		nemtrif:utfcpp:${GH_TAG_UTFCPP}:utfcpp
-GH_TAG_BE20_API=	efa4d69
-GH_TAG_DFXML_CPP=	1e92fe8
-GH_TAG_DFXML_SCHEMA=	f2a702e
-GH_TAG_UTFCPP=	6be08bb
 
 GNU_CONFIGURE=	yes
 GNU_CONFIGURE_MANPREFIX=	${PREFIX}/share
@@ -41,12 +32,6 @@ TEST_TARGET=	check
 
 PLIST_FILES=	bin/bulk_extractor share/man/man1/bulk_extractor.1.gz
 
-post-extract:
-	${CP} -R ${WRKSRC_be20_api}/* ${WRKSRC}/src/be20_api/
-	${CP} -R ${WRKSRC_dfxml_cpp}/* ${WRKSRC}/src/be20_api/dfxml_cpp/
-	${CP} -R ${WRKSRC_utfcpp}/* ${WRKSRC}/src/be20_api/utfcpp/
-	${CP} -R ${WRKSRC_dfxml_schema}/* ${WRKSRC}/dfxml_schema/
-
 pre-configure:
 	(cd ${WRKSRC} && ${PYTHON_CMD} etc/makefile_builder.py)
 
diff --git a/sysutils/bulk_extractor/distinfo b/sysutils/bulk_extractor/distinfo
index 44de21c2afef..22cf06b0aa8d 100644
--- a/sysutils/bulk_extractor/distinfo
+++ b/sysutils/bulk_extractor/distinfo
@@ -1,11 +1,3 @@
-TIMESTAMP = 1714283914
-SHA256 (simsong-bulk_extractor-v2.1.1_GH0.tar.gz) = 314cdaaff7d21b30f4990989d6981b70c4e55514edea08b6f0f8676706dfe74d
-SIZE (simsong-bulk_extractor-v2.1.1_GH0.tar.gz) = 44856151
-SHA256 (simsong-be20_api-efa4d69_GH0.tar.gz) = 44fe4af4d98c57f3662741a64d04ee7bb71d268cd84e5bb96ff9a64b1c2d192a
-SIZE (simsong-be20_api-efa4d69_GH0.tar.gz) = 474346
-SHA256 (dfxml-working-group-dfxml_cpp-1e92fe8_GH0.tar.gz) = 3eb1879769f588bb747bfc24bb24ba48f852a19dfd17ea014896d4818a7e1856
-SIZE (dfxml-working-group-dfxml_cpp-1e92fe8_GH0.tar.gz) = 177565
-SHA256 (dfxml-working-group-dfxml_schema-f2a702e_GH0.tar.gz) = ce7034f36dda27b7dd4192a05545c87f69a68bcc1321e7ffdaeb638bf41919be
-SIZE (dfxml-working-group-dfxml_schema-f2a702e_GH0.tar.gz) = 10421
-SHA256 (nemtrif-utfcpp-6be08bb_GH0.tar.gz) = c04f72d1580efab4156faed36fa2037435937d53d4f556ffc6784ef5ea21044f
-SIZE (nemtrif-utfcpp-6be08bb_GH0.tar.gz) = 34136
+TIMESTAMP = 1787067768
+SHA256 (simsong-bulk_extractor-v2.2.0_GH0.tar.gz) = 3f79d9aa3c87d138d1d3603869e755f794c9cc21e66485d70483e061bb23020e
+SIZE (simsong-bulk_extractor-v2.2.0_GH0.tar.gz) = 46318159
diff --git a/sysutils/bulk_extractor/files/patch-src_Makefile.am b/sysutils/bulk_extractor/files/patch-src_Makefile.am
new file mode 100644
index 000000000000..4501b7278235
--- /dev/null
+++ b/sysutils/bulk_extractor/files/patch-src_Makefile.am
@@ -0,0 +1,11 @@
+--- src/Makefile.am.orig	2026-08-18 16:56:21 UTC
++++ src/Makefile.am
+@@ -23,7 +23,7 @@ scan_test_plugin_la_LDFLAGS = -module -avoid-version -
+ scan_test_plugin_la_SOURCES = test_plugin.cpp
+ scan_test_plugin_la_LDFLAGS = -module -avoid-version -rpath $(abs_builddir)/.libs
+ 
+-bulk_extractor_LDADD = libbe20.a @RE2_LIBS@
++bulk_extractor_LDADD = libbe20.a @RE2_LIBS@ -lfmt
+ test_be_LDADD = libbe20.a @RE2_LIBS@
+ test_be_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_PLUGIN_DIR=\"$(abs_builddir)/.libs\" -DTEST_RAR_UNPACK -DTEST_TOP_SRCDIR=\"$(abs_top_srcdir)\"
+ test_be20_api_LDADD = libbe20.a @RE2_LIBS@
diff --git a/sysutils/bulk_extractor/files/patch-src_be20__api_dfxml__cpp_src_dfxml__writer.h b/sysutils/bulk_extractor/files/patch-src_be20__api_dfxml__cpp_src_dfxml__writer.h
deleted file mode 100644
index c01216240489..000000000000
--- a/sysutils/bulk_extractor/files/patch-src_be20__api_dfxml__cpp_src_dfxml__writer.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/be20_api/dfxml_cpp/src/dfxml_writer.h.orig	2023-07-02 09:24:33 UTC
-+++ src/be20_api/dfxml_cpp/src/dfxml_writer.h
-@@ -96,6 +96,10 @@
- #include <uuid/uuid.h>
- #endif
- 
-+#ifdef HAVE_EXIV2
-+#include <exiv2/exiv2.hpp>
-+#endif
-+
- #include "cpuid.h"
- 
- class dfxml_writer {
diff --git a/sysutils/bulk_extractor/files/patch-src_bulk__extractor__restarter.h b/sysutils/bulk_extractor/files/patch-src_bulk__extractor__restarter.h
new file mode 100644
index 000000000000..d123d68a27f2
--- /dev/null
+++ b/sysutils/bulk_extractor/files/patch-src_bulk__extractor__restarter.h
@@ -0,0 +1,22 @@
+--- src/bulk_extractor_restarter.h.orig	2026-08-18 16:51:54 UTC
++++ src/bulk_extractor_restarter.h
+@@ -28,8 +28,8 @@ class bulk_extractor_restarter { (private)
+     std::stringstream       cdata {};
+     std::string             thisElement {};
+     std::string             provided_filename {};
+-    scanner_config          &sc;
+-    Phase1::Config          &cfg;
++    [[maybe_unused]] scanner_config          &sc;
++    [[maybe_unused]] Phase1::Config          &cfg;
+ 
+ public:
+     bulk_extractor_restarter(scanner_config &sc_,
+@@ -100,7 +100,7 @@ class bulk_extractor_restarter { (private)
+         return {report_path_bak, cfg.seen_page_ids.size()};
+     }
+ #else
+-    restart_summary restart() {
++    [[noreturn]] restart_summary restart() {
+         throw std::runtime_error("Compiled without libexpat; cannot restart.");
+     }
+ #endif
diff --git a/sysutils/bulk_extractor/files/patch-src_scan__exiv2.cpp b/sysutils/bulk_extractor/files/patch-src_scan__exiv2.cpp
deleted file mode 100644
index ae9c9d6cd03c..000000000000
--- a/sysutils/bulk_extractor/files/patch-src_scan__exiv2.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
---- src/scan_exiv2.cpp.orig	2023-04-07 18:27:14 UTC
-+++ src/scan_exiv2.cpp
-@@ -33,6 +33,8 @@
- #pragma GCC diagnostic ignored "-Weffc++"
- #endif
- 
-+using std::string;
-+
- #include <exiv2/image.hpp>
- #include <exiv2/exif.hpp>
- #include <exiv2/error.hpp>
-@@ -90,7 +92,7 @@ static string fix_gps(string s)
-     std::vector<std::string> parts = split(s,' ');
-     if(parts.size()!=3) return s;	// return the original
-     double res = rational(parts[0]) + rational(parts[1])/60.0 + rational(parts[2])/3600.0;
--    s = dtos(res);
-+    s = std::to_string(res);
-     return s;
- }
- 
-@@ -106,7 +108,7 @@ void scan_exiv2(struct scanner_params &sp)
- {
-     sp.check_version();
-     if(sp.phase==scanner_params::PHASE_INIT){
--        sp.info.set_name("exiv2" );
-+        sp.info->set_name("exiv2" );
-         sp.info->author         = "Simson L. Garfinkel";
-         sp.info->description    = "Searches for EXIF information using exiv2. Use exif scanner if this is not available or if this crashes.";
-         sp.info->scanner_flags.default_enabled = false;
-@@ -117,7 +119,7 @@ void scan_exiv2(struct scanner_params &sp)
-     }
-     if(sp.phase==scanner_params::PHASE_SCAN){
- 
--	const sbuf_t &sbuf = sp.sbuf;
-+	const sbuf_t *sbuf = sp.sbuf;
- 	feature_recorder &exif_recorder = sp.named_feature_recorder("exif");
- 	feature_recorder &gps_recorder  = sp.named_feature_recorder("gps");
- 
-@@ -127,23 +129,23 @@ void scan_exiv2(struct scanner_params &sp)
- #endif
- 
- 	size_t pos_max = 1;		// by default, just scan 1 byte
--	if(sbuf.bufsize > min_exif_size){
--	    pos_max = sbuf.bufsize - min_exif_size; //  we can scan more!
-+	if(sbuf->bufsize > min_exif_size){
-+	    pos_max = sbuf->bufsize - min_exif_size; //  we can scan more!
- 	}
- 
- 	/* Loop through all possible locations in the buffer */
- 	for(size_t pos=0;pos<pos_max;pos++){
- 	    size_t count = exif_gulp_size;
--	    count = min(count,sbuf.bufsize-pos);
--	    //size_t count = sbuf.bufsize-pos; // use all to end
-+	    count = min(count,sbuf->bufsize-pos);
-+	    //size_t count = sbuf->bufsize-pos; // use all to end
- 
- 	    /* Explore the beginning of each 512-byte block as well as the starting location
- 	     * of any JPEG on any boundary. This will cause processing of any multimedia file
- 	     * that Exiv2 recognizes (for which I do not know all the headers.
- 	     */
--	    if(pos%512==0 || jpeg_start(sbuf+pos)){
-+	    if(pos%512==0 || jpeg_start(sbuf->slice(pos))){
- 		try {
--		    Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(sbuf.buf+pos,count);
-+		    Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(sbuf->slice(pos).get_buf(),count);
- 		    if(image->good()){
- 			image->readMetadata();
- 
-@@ -153,8 +155,8 @@ void scan_exiv2(struct scanner_params &sp)
- 			/*
- 			 * Create the MD5 of the first 4K to use as a unique identifier.
- 			 */
--			sbuf_t tohash(sbuf,0,4096);
--			string md5_hex = exif_recorder->fs.hasher.func(tohash.buf,tohash.bufsize);
-+			sbuf_t tohash(*sbuf,0,4096);
-+			string md5_hex = exif_recorder.hash(tohash.slice(0, tohash.bufsize));
- 
- 			char xmlbuf[1024];
- 			snprintf(xmlbuf,sizeof(xmlbuf),
-@@ -250,10 +252,10 @@ void scan_exiv2(struct scanner_params &sp)
- 				gps_lat = fix_gps(i->value().toString());
- 			    } else if(key=="Exif.GPSInfo.GPSAltitude"){
-                                 has_gps = true;
--				gps_ele   = dtos(rational(i->value().toString()));
-+				gps_ele   = std::to_string(rational(i->value().toString()));
- 			    } else if(key=="Exif.GPSInfo.GPSSpeed"){
-                                 has_gps = true;
--				gps_speed = dtos(rational(i->value().toString()));
-+				gps_speed = std::to_string(rational(i->value().toString()));
- 			    } else if(key=="Exif.GPSInfo.GPSTrack"){
-                                 has_gps = true;
- 				gps_course = i->value().toString();
-@@ -262,20 +264,20 @@ void scan_exiv2(struct scanner_params &sp)
- 			xml.append("</exiv2>");
- 
-                         // record EXIF
--			exif_recorder->write(sp.sbuf.pos0+pos,md5_hex,xml);
-+			exif_recorder.write(sp.sbuf->pos0+pos,md5_hex,xml);
- 
-                         // record GPS
-                         if (has_gps) {
-                             if (has_gps_date) {
-                                 // record the GPS entry using the GPS date
--                                gps_recorder->write(sp.sbuf.pos0+pos,md5_hex,
-+                                gps_recorder.write(sp.sbuf->pos0+pos,md5_hex,
- 					    gps_date+"T"+gps_time+","+gps_lat_ref+gps_lat+","
- 					    +gps_lon_ref+gps_lon+","
- 					    +gps_ele+","+gps_speed+","+gps_course);
- 
-                             } else {
-                                 // record the GPS entry using the date obtained from Photo
--                                gps_recorder->write(sp.sbuf.pos0+pos,md5_hex,
-+                                gps_recorder.write(sp.sbuf->pos0+pos,md5_hex,
- 					    photo_time+","+gps_lat_ref+gps_lat+","
- 					    +gps_lon_ref+gps_lon+","
- 					    +gps_ele+","+gps_speed+","+gps_course);
-@@ -283,7 +285,7 @@ void scan_exiv2(struct scanner_params &sp)
- 			}
- 		    }
- 		}
--		catch (Exiv2::AnyError &e) { }
-+		catch (Exiv2::Error &e) { }
- 		catch (std::exception &e) { }
- 	    }
- 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.