.gitlab-ci.yml | 4 ++-- CMakeLists.txt | 17 ++++++----------- cmake/modules/FindGLIB.cmake | 6 +----- cmake/modules/FindGTK.cmake | 6 +----- cmake/modules/FindNSS3.cmake | 6 +----- glib/CMakeLists.txt | 6 +----- glib/demo/CMakeLists.txt | 6 +----- glib/tests/CMakeLists.txt | 9 ++------- qt5/CMakeLists.txt | 2 +- qt5/src/poppler-annotation.cc | 4 ++-- qt5/src/poppler-form.cc | 6 +++--- qt5/tests/poppler-forms.cpp | 6 +----- 12 files changed, 22 insertions(+), 56 deletions(-)
New commits: commit d1e5c5b29214d82f43eb72d51b2df5184fcbbe33 Author: Albert Astals Cid <[email protected]> Date: Wed Feb 3 00:26:26 2021 +0100 Require the newer glib&friends provided by the new base CI diff --git a/CMakeLists.txt b/CMakeLists.txt index ced2664f..1c6be697 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,9 +124,9 @@ set(TEXTOUT_WORD_LIST ON) # setting the minimum required versions for some components set(CAIRO_VERSION "1.10.0") -set(GLIB_REQUIRED "2.41") -set(GTK_REQUIRED "3.8") -set(GDK_PIXBUF_REQUIRED "2.8") +set(GLIB_REQUIRED "2.56") +set(GTK_REQUIRED "3.22") +set(GDK_PIXBUF_REQUIRED "2.36") find_package(Freetype REQUIRED) if(WITH_FONTCONFIGURATION_FONTCONFIG) commit 0b34c18882ee3920c5ab9e9b953b3bb642f1b198 Author: Albert Astals Cid <[email protected]> Date: Wed Feb 3 00:24:11 2021 +0100 Require the newer qt5 provided by the new base CI diff --git a/CMakeLists.txt b/CMakeLists.txt index a1cac481..ced2664f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -154,7 +154,7 @@ else() endif() if (ENABLE_QT5) - find_package(Qt5Core 5.5) # Update QT_DISABLE_DEPRECATED_BEFORE in qt5/CMakeLists.txt when increasing this + find_package(Qt5Core 5.9) # Update QT_DISABLE_DEPRECATED_BEFORE in qt5/CMakeLists.txt when increasing this find_package(Qt5Gui) find_package(Qt5Xml) find_package(Qt5Widgets) diff --git a/qt5/CMakeLists.txt b/qt5/CMakeLists.txt index 58b42f5e..64e81601 100644 --- a/qt5/CMakeLists.txt +++ b/qt5/CMakeLists.txt @@ -5,7 +5,7 @@ if(ENABLE_QT_STRICT_ITERATORS) add_definitions(-DQT_STRICT_ITERATORS) endif() -add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050500) +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050900) add_definitions(-DQT_NO_DEPRECATED_WARNINGS) add_subdirectory(src) diff --git a/qt5/src/poppler-annotation.cc b/qt5/src/poppler-annotation.cc index 58b06c8f..336a395b 100644 --- a/qt5/src/poppler-annotation.cc +++ b/qt5/src/poppler-annotation.cc @@ -1371,7 +1371,7 @@ void Annotation::setModificationDate(const QDateTime &date) if (d->pdfAnnot) { if (date.isValid()) { - const time_t t = date.toTime_t(); + const time_t t = date.toSecsSinceEpoch(); GooString *s = timeToDateString(&t); d->pdfAnnot->setModified(s); delete s; @@ -1408,7 +1408,7 @@ void Annotation::setCreationDate(const QDateTime &date) AnnotMarkup *markupann = dynamic_cast<AnnotMarkup *>(d->pdfAnnot); if (markupann) { if (date.isValid()) { - const time_t t = date.toTime_t(); + const time_t t = date.toSecsSinceEpoch(); GooString *s = timeToDateString(&t); markupann->setDate(s); delete s; diff --git a/qt5/src/poppler-form.cc b/qt5/src/poppler-form.cc index d83e66af..b7c8213b 100644 --- a/qt5/src/poppler-form.cc +++ b/qt5/src/poppler-form.cc @@ -958,8 +958,8 @@ static CertificateInfoPrivate *createCertificateInfoPrivate(const X509Certificat certPriv->nick_name = ci->getNickName().c_str(); X509CertificateInfo::Validity certValidity = ci->getValidity(); - certPriv->validity_start = QDateTime::fromTime_t(certValidity.notBefore, Qt::UTC); - certPriv->validity_end = QDateTime::fromTime_t(certValidity.notAfter, Qt::UTC); + certPriv->validity_start = QDateTime::fromSecsSinceEpoch(certValidity.notBefore, Qt::UTC); + certPriv->validity_end = QDateTime::fromSecsSinceEpoch(certValidity.notAfter, Qt::UTC); const X509CertificateInfo::PublicKeyInfo &pkInfo = ci->getPublicKeyInfo(); certPriv->public_key = QByteArray(pkInfo.publicKey.c_str(), pkInfo.publicKey.getLength()); @@ -978,7 +978,7 @@ static CertificateInfoPrivate *createCertificateInfoPrivate(const X509Certificat SignatureValidationInfo FormFieldSignature::validate(int opt, const QDateTime &validationTime) const { FormWidgetSignature *fws = static_cast<FormWidgetSignature *>(m_formData->fm); - const time_t validationTimeT = validationTime.isValid() ? validationTime.toTime_t() : -1; + const time_t validationTimeT = validationTime.isValid() ? validationTime.toSecsSinceEpoch() : -1; SignatureInfo *si = fws->validateSignature(opt & ValidateVerifyCertificate, opt & ValidateForceRevalidation, validationTimeT); // get certificate info diff --git a/qt5/tests/poppler-forms.cpp b/qt5/tests/poppler-forms.cpp index 1e0ceedb..c2175be8 100644 --- a/qt5/tests/poppler-forms.cpp +++ b/qt5/tests/poppler-forms.cpp @@ -259,11 +259,7 @@ int main(int argc, char **argv) else std::cout << "\t\t\tSignerName: " << "(null)" << std::endl; - // http://doc.qt.io/qt-5/qdatetime.html#fromTime_t-1 - // Requires Qt 5.2 -> configure.ac update - // QDateTime::fromTime_t(svi->signingTime(), Qt::UTC).toString(); - QDateTime sviTime; - sviTime.setTime_t(svi.signingTime()); + const QDateTime sviTime = QDateTime::fromSecsSinceEpoch(svi.signingTime(), Qt::UTC); std::cout << "\t\t\tSigningTime: " << sviTime.toString() << std::endl; } break; } commit e85ba5cc74f283398fb97e0c568c43970bf29fa3 Author: Albert Astals Cid <[email protected]> Date: Wed Feb 3 00:11:05 2021 +0100 Require the newer cmake provided by the new base CI diff --git a/CMakeLists.txt b/CMakeLists.txt index 949f2353..a1cac481 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ project(poppler) -cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) @@ -492,12 +492,7 @@ if (ENABLE_NSS3) set(poppler_SRCS ${poppler_SRCS} poppler/SignatureHandler.cc ) - if(${CMAKE_VERSION} VERSION_LESS "3.6.0") - set(poppler_LIBS ${poppler_LIBS} ${NSS3_LIBRARIES}) - include_directories(SYSTEM ${NSS3_INCLUDE_DIRS}) - else() - set(poppler_LIBS ${poppler_LIBS} PkgConfig::NSS3) - endif() + set(poppler_LIBS ${poppler_LIBS} PkgConfig::NSS3) endif() if (OpenJPEG_FOUND) set(poppler_SRCS ${poppler_SRCS} diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake index d54ec4b4..be9d6fc8 100644 --- a/cmake/modules/FindGLIB.cmake +++ b/cmake/modules/FindGLIB.cmake @@ -15,10 +15,6 @@ include(FindPackageHandleStandardArgs) find_package(PkgConfig REQUIRED) -if(${CMAKE_VERSION} VERSION_LESS "3.6.0") - pkg_check_modules(GLIB2 "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}" "gio-2.0>=${GLIB_REQUIRED}") -else() - pkg_check_modules(GLIB2 IMPORTED_TARGET "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}" "gio-2.0>=${GLIB_REQUIRED}") -endif() +pkg_check_modules(GLIB2 IMPORTED_TARGET "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}" "gio-2.0>=${GLIB_REQUIRED}") find_package_handle_standard_args(GLIB DEFAULT_MSG GLIB2_LIBRARIES GLIB2_CFLAGS) diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake index 5f793aac..20561343 100644 --- a/cmake/modules/FindGTK.cmake +++ b/cmake/modules/FindGTK.cmake @@ -16,10 +16,6 @@ include(FindPackageHandleStandardArgs) find_package(PkgConfig REQUIRED) -if(${CMAKE_VERSION} VERSION_LESS "3.6.0") - pkg_check_modules(GTK3 "gtk+-3.0>=${GTK_REQUIRED}" "gdk-pixbuf-2.0>=${GDK_PIXBUF_REQUIRED}") -else() - pkg_check_modules(GTK3 IMPORTED_TARGET "gtk+-3.0>=${GTK_REQUIRED}" "gdk-pixbuf-2.0>=${GDK_PIXBUF_REQUIRED}") -endif() +pkg_check_modules(GTK3 IMPORTED_TARGET "gtk+-3.0>=${GTK_REQUIRED}" "gdk-pixbuf-2.0>=${GDK_PIXBUF_REQUIRED}") find_package_handle_standard_args(GTK DEFAULT_MSG GTK3_LIBRARIES GTK3_CFLAGS) diff --git a/cmake/modules/FindNSS3.cmake b/cmake/modules/FindNSS3.cmake index 6b47be4c..c0820b26 100644 --- a/cmake/modules/FindNSS3.cmake +++ b/cmake/modules/FindNSS3.cmake @@ -15,11 +15,7 @@ include(FindPackageHandleStandardArgs) if (NOT MSVC) find_package(PkgConfig REQUIRED) - if(${CMAKE_VERSION} VERSION_LESS "3.6.0") - pkg_check_modules(NSS3 "nss>=3.19") - else () - pkg_check_modules(NSS3 IMPORTED_TARGET "nss>=3.19") - endif() + pkg_check_modules(NSS3 IMPORTED_TARGET "nss>=3.19") find_package_handle_standard_args(NSS3 DEFAULT_MSG NSS3_LIBRARIES NSS3_CFLAGS) diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt index f0aaf990..961b7756 100644 --- a/glib/CMakeLists.txt +++ b/glib/CMakeLists.txt @@ -95,11 +95,7 @@ if(MINGW AND BUILD_SHARED_LIBS) get_target_property(POPPLER_GLIB_SOVERSION poppler-glib SOVERSION) set_target_properties(poppler-glib PROPERTIES SUFFIX "-${POPPLER_GLIB_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}") endif() -if(${CMAKE_VERSION} VERSION_LESS "3.6.0") - target_link_libraries(poppler-glib poppler ${GLIB2_LIBRARIES} ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES}) -else() - target_link_libraries(poppler-glib poppler PkgConfig::GLIB2 ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES}) -endif() +target_link_libraries(poppler-glib poppler PkgConfig::GLIB2 ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES}) if(CMAKE_USE_PTHREADS_INIT) target_link_libraries(poppler-glib Threads::Threads) endif() diff --git a/glib/demo/CMakeLists.txt b/glib/demo/CMakeLists.txt index 5add9ca8..09215170 100644 --- a/glib/demo/CMakeLists.txt +++ b/glib/demo/CMakeLists.txt @@ -28,8 +28,4 @@ set(poppler_glib_demo_SRCS ) poppler_add_test(poppler-glib-demo BUILD_GTK_TESTS ${poppler_glib_demo_SRCS}) -if(${CMAKE_VERSION} VERSION_LESS "3.6.0") - target_link_libraries(poppler-glib-demo ${CAIRO_LIBRARIES} poppler-glib ${GTK3_LIBRARIES}) -else() - target_link_libraries(poppler-glib-demo ${CAIRO_LIBRARIES} poppler-glib PkgConfig::GTK3) -endif() +target_link_libraries(poppler-glib-demo ${CAIRO_LIBRARIES} poppler-glib PkgConfig::GTK3) diff --git a/glib/tests/CMakeLists.txt b/glib/tests/CMakeLists.txt index a2259cbe..9bbd4758 100644 --- a/glib/tests/CMakeLists.txt +++ b/glib/tests/CMakeLists.txt @@ -20,13 +20,8 @@ set(poppler_check_bb_SRCS ) poppler_add_test(poppler-check-bb BUILD_GTK_TESTS ${poppler_check_bb_SRCS}) -if(${CMAKE_VERSION} VERSION_LESS "3.6.0") - target_link_libraries(poppler-check-text poppler-glib ${GTK3_LIBRARIES}) - target_link_libraries(poppler-check-bb poppler-glib ${GTK3_LIBRARIES}) -else() - target_link_libraries(poppler-check-text poppler-glib PkgConfig::GTK3) - target_link_libraries(poppler-check-bb poppler-glib PkgConfig::GTK3) -endif() +target_link_libraries(poppler-check-text poppler-glib PkgConfig::GTK3) +target_link_libraries(poppler-check-bb poppler-glib PkgConfig::GTK3) poppler_add_testcase(poppler-check-bb shapes+attachments.pdf 42.5 42.5 557.5 557.5) poppler_add_testcase(poppler-check-bb orientation.pdf 34 34 83.74 49 793 34 808 97.19 488.02 793 561 808 34 503.61 49 56) commit 73c1e61b183db17692b3ddec51f1859ed4030765 Author: Albert Astals Cid <[email protected]> Date: Wed Feb 3 00:06:47 2021 +0100 Increase our supported Linux to >= ubuntu 18.04 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea7dffa3..59b9dac6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,9 +59,9 @@ build_clang_libcpp: - ninja - ctest --output-on-failure -build_ubuntu_16_04: +build_ubuntu_18_04: stage: build - image: ubuntu:xenial + image: ubuntu:bionic before_script: - apt-get update - apt-get install --yes --no-install-recommends build-essential cmake ninja-build libjpeg-dev libopenjp2-7-dev qtbase5-dev gobject-introspection libglib2.0-dev libgtk-3-dev libgirepository1.0-dev libnss3-dev ca-certificates libcurl4-nss-dev liblcms2-dev _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
