pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import txtproc/FlightCrew



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Sat Oct 4 14:28:14 2025 +0200
Changeset:	347b1755f202496fad3973c7a8ff7596490ac477

Modified Files:
	Makefile
Added Files:
	FlightCrew/DESCR
	FlightCrew/Makefile
	FlightCrew/PLIST
	FlightCrew/distinfo
	FlightCrew/patches/patch-CMakeLists.txt
	FlightCrew/patches/patch-src_FlightCrew_CMakeLists.txt
	FlightCrew/patches/patch-src_FlightCrew_Validators_Opf_ReachabilityAnalysis.cpp
	FlightCrew/patches/patch-src_FlightCrew_Validators_SaxSchemaValidator.cpp
	FlightCrew/patches/patch-src_FlightCrew_tests_CMakeLists.txt
	FlightCrew/patches/patch-src_XercesExtensions_LocationAwareDOMParser.cpp
	FlightCrew/patches/patch-src_utf8-cpp_utf8_core.h

Log Message:
Import txtproc/FlightCrew

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=347b1755f202496fad3973c7a8ff7596490ac477

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 FlightCrew/DESCR                                   |  6 +++
 FlightCrew/Makefile                                | 54 ++++++++++++++++++++++
 FlightCrew/PLIST                                   |  3 ++
 FlightCrew/distinfo                                | 12 +++++
 FlightCrew/patches/patch-CMakeLists.txt            | 23 +++++++++
 .../patches/patch-src_FlightCrew_CMakeLists.txt    | 22 +++++++++
 ...ghtCrew_Validators_Opf_ReachabilityAnalysis.cpp | 25 ++++++++++
 ...rc_FlightCrew_Validators_SaxSchemaValidator.cpp | 17 +++++++
 .../patch-src_FlightCrew_tests_CMakeLists.txt      | 33 +++++++++++++
 ...src_XercesExtensions_LocationAwareDOMParser.cpp | 13 ++++++
 FlightCrew/patches/patch-src_utf8-cpp_utf8_core.h  | 13 ++++++
 Makefile                                           |  1 +
 12 files changed, 222 insertions(+)

diffs:
diff --git a/FlightCrew/DESCR b/FlightCrew/DESCR
new file mode 100644
index 0000000000..75747dffcd
--- /dev/null
+++ b/FlightCrew/DESCR
@@ -0,0 +1,6 @@
+FlightCrew is a C++, cross-platform, native code epub validator.
+It is composed of three parts:
+
+* FlightCrew, the validation library;
+* FlightCrew-cli, the command-line front-end to the FlightCrew library;
+* FlightCrew-gui, the GUI front-end to the FlightCrew library;
diff --git a/FlightCrew/Makefile b/FlightCrew/Makefile
new file mode 100644
index 0000000000..b9c5ebc05e
--- /dev/null
+++ b/FlightCrew/Makefile
@@ -0,0 +1,54 @@
+# $NetBSD: Makefile,v 1.79 2025/09/27 09:57:37 wiz Exp $
+
+DISTNAME=	FlightCrew-0.7.2-Code
+PKGNAME=	${DISTNAME:S/-Code//}
+PKGREVISION=	60
+CATEGORIES=	textproc
+MASTER_SITES=	http://flightcrew.googlecode.com/files/
+EXTRACT_SUFX=	.zip
+
+MAINTAINER=	ryoon%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/Sigil-Ebook/flightcrew
+COMMENT=	EPUB validator
+LICENSE=	gnu-lgpl-v3 AND cc-by-sa-v3.0
+
+WRKSRC=		${WRKDIR}
+
+USE_LANGUAGES=		c c++
+USE_CXX_FEATURES=	c++17
+FORCE_CXX_STD=		c++17
+
+CMAKE_CONFIGURE_ARGS+=	-DCMAKE_POLICY_VERSION_MINIMUM=3.5
+
+# Work around NetBSD unzip vs others for patched files.
+SUBST_CLASSES+=		cr
+SUBST_STAGE.cr=		post-extract
+SUBST_FILES.cr+=	CMakeLists.txt src/FlightCrew/CMakeLists.txt
+SUBST_FILES.cr+=	src/FlightCrew/Validators/Opf/ReachabilityAnalysis.cpp
+SUBST_FILES.cr+=	src/FlightCrew/tests/CMakeLists.txt
+SUBST_FILES.cr+=	src/XercesExtensions/LocationAwareDOMParser.cpp
+SUBST_FILES.cr+=	src/utf8-cpp/utf8/core.h
+SUBST_FILTER_CMD.cr=	${TR} -d '\r'
+SUBST_NOOP_OK.cr=	yes
+
+BUILDLINK_TRANSFORM+=	l:BoostParts:boost_date_time:boost_filesystem:boost_regex:boost_system:boost_thread:boost_program_options
+BUILDLINK_TRANSFORM+=	l:Xerces:xerces-c
+BUILDLINK_TRANSFORM+=	l:zlib:z
+
+SUBST_CLASSES+=			fix-damaged
+SUBST_STAGE.fix-damaged=	pre-patch
+SUBST_MESSAGE.fix-damaged=	fixing
+SUBST_FILES.fix-damaged=	src/FlightCrew/tests/misc_tests/ConvertUtf8PathToBoostPath_test.cpp
+SUBST_SED.fix-damaged+=		-e "2,2s/^/\//" # commented-out
+SUBST_SED.fix-damaged+=		-e "1,1d" # deleted
+
+post-extract:
+	${RM} -rf ${WRKDIR}/src/BoostParts ${WRKDIR}/src/Xerces ${WRKDIR}/src/zlib ${WRKDIR}/src/googlemock
+
+.include "../../devel/cmake/build.mk"
+.include "../../devel/googletest/buildlink3.mk"
+.include "../../textproc/xerces-c/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../x11/qt4-tools/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/FlightCrew/PLIST b/FlightCrew/PLIST
new file mode 100644
index 0000000000..0290c66305
--- /dev/null
+++ b/FlightCrew/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2011/07/29 19:32:18 ryoon Exp $
+bin/flightcrew-cli
+bin/flightcrew-gui
diff --git a/FlightCrew/distinfo b/FlightCrew/distinfo
new file mode 100644
index 0000000000..8148600dd2
--- /dev/null
+++ b/FlightCrew/distinfo
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.11 2025/08/18 07:02:05 wiz Exp $
+
+BLAKE2s (FlightCrew-0.7.2-Code.zip) = 50b593a716ff0d33052b3fe7b70b85e42a3c404c5fe2beebb3b71d8405575992
+SHA512 (FlightCrew-0.7.2-Code.zip) = 6933cd85bab0300ee2258106225cbf23474516c4993bc1bcad6736676169eabcaf4a5b31a6cdfc2bf4ff3be8fee9432a8048615112f330d1ac55a04874d094aa
+Size (FlightCrew-0.7.2-Code.zip) = 7794710 bytes
+SHA1 (patch-CMakeLists.txt) = 8423ab7b53fad354e04fdfd159b070a8f8bf61f9
+SHA1 (patch-src_FlightCrew_CMakeLists.txt) = 2c60cb722bb7613f007f2e3a644f1d9f8509f8ba
+SHA1 (patch-src_FlightCrew_Validators_Opf_ReachabilityAnalysis.cpp) = 53fbd6e1b1b9a11739f16383406f10ddaa253293
+SHA1 (patch-src_FlightCrew_Validators_SaxSchemaValidator.cpp) = 65b6fe9e04d4567449dd36039999d14bee1e7e61
+SHA1 (patch-src_FlightCrew_tests_CMakeLists.txt) = 934296b4cd2425d30d5e4926dfd8f835a5284953
+SHA1 (patch-src_XercesExtensions_LocationAwareDOMParser.cpp) = 5c49d264d7257ea988ef1a8f335ec59799ff3fce
+SHA1 (patch-src_utf8-cpp_utf8_core.h) = 1ff6b89132f1ff671e48735ca11153d17d38fd17
diff --git a/FlightCrew/patches/patch-CMakeLists.txt b/FlightCrew/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..4a5bb109b7
--- /dev/null
+++ b/FlightCrew/patches/patch-CMakeLists.txt
@@ -0,0 +1,23 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1.1.1 2011/07/29 19:32:18 ryoon Exp $
+
+* Use external boost, xerces-c, zlib, and gmock.
+
+--- CMakeLists.txt.orig	2010-11-11 10:05:50.000000000 +0000
++++ CMakeLists.txt
+@@ -42,12 +42,12 @@ set( CMAKE_OSX_SYSROOT "/Developer/SDKs/
+ set( CMAKE_OSX_ARCHITECTURES "i386;x86_64" )
+ 
+ # The parsing order is significant!
+-add_subdirectory( src/BoostParts )
+-add_subdirectory( src/Xerces )
++#add_subdirectory( src/BoostParts )
++#add_subdirectory( src/Xerces )
+ add_subdirectory( src/XercesExtensions )
+-add_subdirectory( src/zlib )
++#add_subdirectory( src/zlib )
+ add_subdirectory( src/zipios )
+-add_subdirectory( src/googlemock )
++#add_subdirectory( src/googlemock )
+ add_subdirectory( src/FlightCrew )
+ add_subdirectory( src/FlightCrew-cli )
+ 
diff --git a/FlightCrew/patches/patch-src_FlightCrew_CMakeLists.txt b/FlightCrew/patches/patch-src_FlightCrew_CMakeLists.txt
new file mode 100644
index 0000000000..22a7b976e0
--- /dev/null
+++ b/FlightCrew/patches/patch-src_FlightCrew_CMakeLists.txt
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_FlightCrew_CMakeLists.txt,v 1.1 2016/07/02 14:43:12 joerg Exp $
+
+--- src/FlightCrew/CMakeLists.txt.orig	2016-07-02 09:58:43.000000000 +0000
++++ src/FlightCrew/CMakeLists.txt
+@@ -55,7 +55,7 @@ set( ALL_INCLUDES ${BoostParts_SOURCE_DI
+                   ${zipios_SOURCE_DIR} )
+ set( GCC_PCH_TARGET gccPCH_fc )
+ 
+-precompiled_header( SOURCES ALL_INCLUDES ${GCC_PCH_TARGET} ${PCH_NAME} )
++# precompiled_header( SOURCES ALL_INCLUDES ${GCC_PCH_TARGET} ${PCH_NAME} )
+ 
+ #############################################################################
+ 
+@@ -112,7 +112,7 @@ elseif( CMAKE_COMPILER_IS_GNUCXX )
+     add_definitions( -Wall )
+ 
+     # Make sure the PCH is built for GCC
+-    add_dependencies( ${PROJECT_NAME} ${GCC_PCH_TARGET} )
++    #add_dependencies( ${PROJECT_NAME} ${GCC_PCH_TARGET} )
+ endif()
+ 
+ # needed for correct Xerces header inclusion
diff --git a/FlightCrew/patches/patch-src_FlightCrew_Validators_Opf_ReachabilityAnalysis.cpp b/FlightCrew/patches/patch-src_FlightCrew_Validators_Opf_ReachabilityAnalysis.cpp
new file mode 100644
index 0000000000..df1d7e400d
--- /dev/null
+++ b/FlightCrew/patches/patch-src_FlightCrew_Validators_Opf_ReachabilityAnalysis.cpp
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_FlightCrew_Validators_Opf_ReachabilityAnalysis.cpp,v 1.1 2012/01/16 21:09:23 ryoon Exp $
+
+* Fix build with boost 1.48.0.
+
+--- src/FlightCrew/Validators/Opf/ReachabilityAnalysis.cpp.orig	2011-08-11 12:03:56.000000000 +0000
++++ src/FlightCrew/Validators/Opf/ReachabilityAnalysis.cpp
+@@ -26,7 +26,9 @@
+ #include <XmlUtils.h>
+ #include "Misc/DetermineMimetype.h"
+ #include "Misc/Utilities.h"
++#include <boost/version.hpp>
+ 
++#if ( BOOST_VERSION < 104800 )
+ namespace boost
+ {
+ 
+@@ -48,7 +50,7 @@ namespace filesystem3
+ } // namespace filesystem3
+ 
+ } // namespace boost
+-
++#endif // BOOST_VERSION
+ 
+ namespace FlightCrew
+ {
diff --git a/FlightCrew/patches/patch-src_FlightCrew_Validators_SaxSchemaValidator.cpp b/FlightCrew/patches/patch-src_FlightCrew_Validators_SaxSchemaValidator.cpp
new file mode 100644
index 0000000000..c1326fb37b
--- /dev/null
+++ b/FlightCrew/patches/patch-src_FlightCrew_Validators_SaxSchemaValidator.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_FlightCrew_Validators_SaxSchemaValidator.cpp,v 1.1 2023/01/30 11:46:03 wiz Exp $
+
+Work around
+error: 'scoped_ptr' is not a member of 'boost'
+appearing with boost 1.81.0
+
+--- src/FlightCrew/Validators/SaxSchemaValidator.cpp.orig	2011-08-11 21:03:56.000000000 +0000
++++ src/FlightCrew/Validators/SaxSchemaValidator.cpp
+@@ -35,7 +35,7 @@ std::vector< Result > SaxSchemaValidator
+     const std::string &external_schema_location,
+     const std::vector< const xc::MemBufInputSource* > &schemas )
+ {
+-    boost::scoped_ptr< xc::SAX2XMLReader > parser( xc::XMLReaderFactory::createXMLReader() );
++    std::shared_ptr< xc::SAX2XMLReader > parser( xc::XMLReaderFactory::createXMLReader() );
+ 
+     parser->setFeature( xc::XMLUni::fgSAX2CoreValidation,            true  );
+     parser->setFeature( xc::XMLUni::fgXercesLoadSchema,              false );
diff --git a/FlightCrew/patches/patch-src_FlightCrew_tests_CMakeLists.txt b/FlightCrew/patches/patch-src_FlightCrew_tests_CMakeLists.txt
new file mode 100644
index 0000000000..8cf2b15927
--- /dev/null
+++ b/FlightCrew/patches/patch-src_FlightCrew_tests_CMakeLists.txt
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_FlightCrew_tests_CMakeLists.txt,v 1.3 2025/08/18 07:02:06 wiz Exp $
+
+* libgtest is needed.
+
+--- src/FlightCrew/tests/CMakeLists.txt.orig	2011-08-11 19:03:56.000000000 +0000
++++ src/FlightCrew/tests/CMakeLists.txt
+@@ -57,15 +57,14 @@ link_directories ( ${PROJECT_BINARY_DIR}
+ include( ${CMAKE_SOURCE_DIR}/cmake_extras/CustomPCH.cmake )
+ set( ALL_INCLUDES ${gtest_SOURCE_DIR}/include ${BoostParts_SOURCE_DIR} )
+ 
+-set( GCC_PCH_TARGET gccPCH_tests )
+ 
+-precompiled_header( TEST_SOURCES ALL_INCLUDES ${GCC_PCH_TARGET} ${PCH_NAME} )
++# precompiled_header( TEST_SOURCES ALL_INCLUDES ${GCC_PCH_TARGET} ${PCH_NAME} )
+ 
+ #############################################################################
+ 
+ add_executable( ${PROJECT_NAME} ${TEST_SOURCES} )
+ 
+-target_link_libraries( ${PROJECT_NAME} FlightCrew gmock )
++target_link_libraries( ${PROJECT_NAME} FlightCrew gmock gtest )
+ 
+ #############################################################################
+ 
+@@ -97,7 +96,7 @@ if( MSVC )
+     
+ elseif( CMAKE_COMPILER_IS_GNUCXX )
+     # Make sure the PCH is built for GCC
+-    add_dependencies( ${PROJECT_NAME} ${GCC_PCH_TARGET} )
++    add_dependencies( ${PROJECT_NAME} )
+ endif()
+ 
+ # needed for correct Xerces header inclusion
diff --git a/FlightCrew/patches/patch-src_XercesExtensions_LocationAwareDOMParser.cpp b/FlightCrew/patches/patch-src_XercesExtensions_LocationAwareDOMParser.cpp
new file mode 100644
index 0000000000..65290f8bd9
--- /dev/null
+++ b/FlightCrew/patches/patch-src_XercesExtensions_LocationAwareDOMParser.cpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_XercesExtensions_LocationAwareDOMParser.cpp,v 1.1 2012/11/16 20:08:25 joerg Exp $
+
+--- src/XercesExtensions/LocationAwareDOMParser.cpp.orig	2012-11-16 11:24:04.000000000 +0000
++++ src/XercesExtensions/LocationAwareDOMParser.cpp
+@@ -29,7 +29,7 @@
+ // super class call the handle() method of the handler.
+ // We only ever need a single handler and a const one at that... this could
+ // also easily go into a singleton, but this approach is simpler.
+-static const XercesExt::LocationInfoDataHandler LOCATION_DATA_HANDLER;
++static XercesExt::LocationInfoDataHandler LOCATION_DATA_HANDLER;
+ const char *LOCATION_INFO_KEY = "LocationInfoKey";
+ typedef unsigned int uint; 
+ 
diff --git a/FlightCrew/patches/patch-src_utf8-cpp_utf8_core.h b/FlightCrew/patches/patch-src_utf8-cpp_utf8_core.h
new file mode 100644
index 0000000000..1730119a65
--- /dev/null
+++ b/FlightCrew/patches/patch-src_utf8-cpp_utf8_core.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_utf8-cpp_utf8_core.h,v 1.1 2015/11/27 21:45:19 joerg Exp $
+
+--- src/utf8-cpp/utf8/core.h.orig	2015-11-27 17:25:18.000000000 +0000
++++ src/utf8-cpp/utf8/core.h
+@@ -29,7 +29,7 @@ DEALINGS IN THE SOFTWARE.
+ #define UTF8_FOR_CPP_CORE_H_2675DCD0_9480_4c0c_B92A_CC14C027B731
+ 
+ #include <iterator>
+-#include "../../BoostParts/boost/cstdint.hpp"
++#include <boost/cstdint.hpp>
+ 
+ namespace utf8
+ {
diff --git a/Makefile b/Makefile
index 6e176d263e..a6b56800f8 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,7 @@ SUBDIR+=	CuraEngine
 SUBDIR+=	ETL
 SUBDIR+=	FLIF
 SUBDIR+=	FLIF-git
+SUBDIR+=	FlightCrew
 SUBDIR+=	FreeBASIC
 SUBDIR+=	GNUMail-pgp
 SUBDIR+=	GSAlign


Home | Main Index | Thread Index | Old Index