File 0001-Remove-built-in-deps.patch of Package epsonscan2
diff -uNr a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2024-09-12 15:10:44.000000000 +0800
+++ b/CMakeLists.txt 2024-10-07 22:49:02.417350345 +0800
@@ -17,33 +17,10 @@
# CMakeLists.txt -- template and derived ESC/I ESC/I-2 protocol commands
project (epsonscan2)
-set (CMAKE_INSTALL_PREFIX "/usr")
cmake_minimum_required (VERSION 2.8.12.2)
include(GNUInstallDirs)
-if (DEFINED ENV{BUILD_TYPE})
-
-if (${BUILD_TYPE} STREQUAL "Release")
-set(CMAKE_BUILD_TYPE Release)
-elseif (${BUILD_TYPE} STREQUAL "Debug")
-set(CMAKE_BUILD_TYPE Debug)
-endif ()
-
-else ()
-set(CMAKE_BUILD_TYPE Release)
-endif()
-
-if (DEFINED ENV{EPSON_VERSION})
-else ()
-set(EPSON_VERSION -1.0.0.0-1)
-endif()
-
-SET(CMAKE_C_FLAGS_DEBUG "-g -O0")
-SET(CMAKE_CXX_FLAGS_DEBUG "-g -std=c++11 -O0")
-SET(CMAKE_C_FLAGS_RELEASE "-O3")
-SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -std=c++11")
-
### Boost settings ########
set(Boost_USE_STATIC_LIBS OFF)
@@ -113,17 +90,8 @@
install(DIRECTORY Resources DESTINATION ${EPSON_INSTALL_ROOT}${EPSON_INSTALL_PATH})
-install(FILES epsonscan2.rules DESTINATION ${EPSON_INSTALL_ROOT}/lib/udev/rules.d/ RENAME 60-epsonscan2.rules)
+install(FILES epsonscan2.rules DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d/ RENAME 60-epsonscan2.rules)
install(FILES epsonscan2 DESTINATION ${EPSON_INSTALL_ROOT}/etc/sane.d/dll.d)
-install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/)")
-install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1)")
-install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1.0.0)")
-
-install(FILES changelog.Debian DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/share/doc/epsonscan2${EPSON_VERSION})
-
-install(FILES NEWS DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/share/doc/epsonscan2${EPSON_VERSION})
-install(FILES AUTHORS DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/share/doc/epsonscan2${EPSON_VERSION})
-install(FILES README DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/share/doc/epsonscan2${EPSON_VERSION})
-install(FILES COPYING DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/share/doc/epsonscan2${EPSON_VERSION})
-install(FILES LICENSE DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/share/doc/epsonscan2${EPSON_VERSION})
-
+install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${EPSON_DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/sane/)")
+install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so ${EPSON_DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1)")
+install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so ${EPSON_DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1.0.0)")
diff -uNr a/src/CommonUtility/Linux/CMakeLists.txt b/src/CommonUtility/Linux/CMakeLists.txt
--- a/src/CommonUtility/Linux/CMakeLists.txt 2024-09-12 15:10:30.000000000 +0800
+++ b/src/CommonUtility/Linux/CMakeLists.txt 2024-10-07 22:50:31.374483247 +0800
@@ -25,7 +25,6 @@
INCLUDE_DIRECTORIES(
../
../../
-../../../thirdparty/rapidjson/include/
)
ADD_LIBRARY( commonutility SHARED
diff -uNr a/src/Controller/CMakeLists.txt b/src/Controller/CMakeLists.txt
--- a/src/Controller/CMakeLists.txt 2024-09-12 15:10:30.000000000 +0800
+++ b/src/Controller/CMakeLists.txt 2024-10-08 00:21:30.751540423 +0800
@@ -38,9 +38,6 @@
./Src/KeysValues/All
./Src/Filter
./Src/FileFormat
-../../thirdparty/HaruPDF/include
-../../thirdparty/HaruPDF/zlib
-../../thirdparty/HaruPDF/zlib/
../CommonUtility/utils/
../CommonUtility
../Include
@@ -113,79 +110,6 @@
./Src/KeysValues/All/DeficiencyCorrection.cpp
./Src/FileFormat/ESManageFileFormatKit.cpp
./Src/FileFormat/FFManager.cpp
-../../thirdparty/HaruPDF/hpdf_annotation.c
-../../thirdparty/HaruPDF/hpdf_array.c
-../../thirdparty/HaruPDF/hpdf_binary.c
-../../thirdparty/HaruPDF/hpdf_boolean.c
-../../thirdparty/HaruPDF/hpdf_catalog.c
-../../thirdparty/HaruPDF/hpdf_destination.c
-../../thirdparty/HaruPDF/hpdf_dict.c
-../../thirdparty/HaruPDF/hpdf_doc_png.c
-../../thirdparty/HaruPDF/hpdf_doc.c
-../../thirdparty/HaruPDF/hpdf_encoder_cns.c
-../../thirdparty/HaruPDF/hpdf_encoder_cnt.c
-../../thirdparty/HaruPDF/hpdf_encoder_jp.c
-../../thirdparty/HaruPDF/hpdf_encoder_kr.c
-../../thirdparty/HaruPDF/hpdf_encoder.c
-../../thirdparty/HaruPDF/hpdf_encrypt.c
-../../thirdparty/HaruPDF/hpdf_encryptdict.c
-../../thirdparty/HaruPDF/hpdf_error.c
-../../thirdparty/HaruPDF/hpdf_ext_gstate.c
-../../thirdparty/HaruPDF/hpdf_font_cid.c
-../../thirdparty/HaruPDF/hpdf_font_tt.c
-../../thirdparty/HaruPDF/hpdf_font_type1.c
-../../thirdparty/HaruPDF/hpdf_font.c
-../../thirdparty/HaruPDF/hpdf_fontdef_base14.c
-../../thirdparty/HaruPDF/hpdf_fontdef_cid.c
-../../thirdparty/HaruPDF/hpdf_fontdef_cns.c
-../../thirdparty/HaruPDF/hpdf_fontdef_cnt.c
-../../thirdparty/HaruPDF/hpdf_fontdef_jp.c
-../../thirdparty/HaruPDF/hpdf_fontdef_kr.c
-../../thirdparty/HaruPDF/hpdf_fontdef_tt.c
-../../thirdparty/HaruPDF/hpdf_fontdef_type1.c
-../../thirdparty/HaruPDF/hpdf_fontdef.c
-../../thirdparty/HaruPDF/hpdf_gstate.c
-../../thirdparty/HaruPDF/hpdf_image_ccitt.c
-../../thirdparty/HaruPDF/hpdf_image_png.c
-../../thirdparty/HaruPDF/hpdf_image.c
-../../thirdparty/HaruPDF/hpdf_info.c
-../../thirdparty/HaruPDF/hpdf_list.c
-../../thirdparty/HaruPDF/hpdf_mmgr.c
-../../thirdparty/HaruPDF/hpdf_name.c
-../../thirdparty/HaruPDF/hpdf_namedict.c
-../../thirdparty/HaruPDF/hpdf_null.c
-../../thirdparty/HaruPDF/hpdf_number.c
-../../thirdparty/HaruPDF/hpdf_objects.c
-../../thirdparty/HaruPDF/hpdf_outline.c
-../../thirdparty/HaruPDF/hpdf_page_label.c
-../../thirdparty/HaruPDF/hpdf_page_operator.c
-../../thirdparty/HaruPDF/hpdf_pages.c
-../../thirdparty/HaruPDF/hpdf_real.c
-../../thirdparty/HaruPDF/hpdf_streams.c
-../../thirdparty/HaruPDF/hpdf_string.c
-../../thirdparty/HaruPDF/hpdf_u3d.c
-../../thirdparty/HaruPDF/hpdf_utils.c
-../../thirdparty/HaruPDF/hpdf_xref.c
-../../thirdparty/HaruPDF/hpdf_pdfa.c
-../../thirdparty/HaruPDF/hpdf_3dmeasure.c
-../../thirdparty/HaruPDF/hpdf_exdata.c
-../../thirdparty/HaruPDF/hpdf_encoder_utf.c
-
-../../thirdparty/zlib/adler32.c
-../../thirdparty/zlib/crc32.c
-../../thirdparty/zlib/gzclose.c
-../../thirdparty/zlib/gzread.c
-../../thirdparty/zlib/infback.c
-../../thirdparty/zlib/inflate.c
-../../thirdparty/zlib/trees.c
-../../thirdparty/zlib/zutil.c
-../../thirdparty/zlib/compress.c
-../../thirdparty/zlib/deflate.c
-../../thirdparty/zlib/gzlib.c
-../../thirdparty/zlib/gzwrite.c
-../../thirdparty/zlib/inffast.c
-../../thirdparty/zlib/inftrees.c
-../../thirdparty/zlib/uncompr.c
../../thirdparty/sha1/sha1.c
)
@@ -194,6 +118,7 @@
dl
commonutility
${Boost_LIBRARIES}
+ hpdf
usb-1.0
)
diff -uNr a/src/ES2Command/Linux/CMakeLists.txt b/src/ES2Command/Linux/CMakeLists.txt
--- a/src/ES2Command/Linux/CMakeLists.txt 2024-09-12 15:10:30.000000000 +0800
+++ b/src/ES2Command/Linux/CMakeLists.txt 2024-10-07 23:44:51.437327163 +0800
@@ -27,16 +27,8 @@
LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../bin)
-# ビルドのタイプはリリース
-#SET(CMAKE_BUILD_TYPE Release)
-SET(CMAKE_C_FLAGS_DEBUG "-g -O0")
-SET(CMAKE_CXX_FLAGS_DEBUG "-g -std=c++11 -Wno-multichar -O0")
-SET(CMAKE_C_FLAGS_RELEASE "-O3")
-SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -std=c++11 -Wno-multichar")
-
# ビルドするためにインクルードするヘッダーファイルの場所
INCLUDE_DIRECTORIES(
-../../../thirdparty/rapidjson/include/
../../
../../Include/ES2Command
../Src
diff -uNr a/src/ES2FileFormat/Linux/CMakeLists.txt b/src/ES2FileFormat/Linux/CMakeLists.txt
--- a/src/ES2FileFormat/Linux/CMakeLists.txt 2024-09-12 15:10:30.000000000 +0800
+++ b/src/ES2FileFormat/Linux/CMakeLists.txt 2024-10-07 23:01:43.061049836 +0800
@@ -26,7 +26,6 @@
INCLUDE_DIRECTORIES(
../
../../
-../../../Libraries/rapidjson/include
../../CommonUtility
../../CommonUtility/utils
../../Include/ES2FileFormat
@@ -44,7 +43,6 @@
INCLUDE_DIRECTORIES(
../
../../
-../../../Libraries/rapidjson/include
../../CommonUtility
../../CommonUtility/utils
../../Include/ES2FileFormat