[poppler] cmake/modules
cmake/modules/FindCairo.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 49a883dfac1a92fd959a1421627279aec26dcbb9 Author: Albert Astals Cid Date: Sun Dec 4 03:57:01 2022 +0100 cmake: Make sure cairo includes are complete diff --git a/cmake/modules/FindCairo.cmake b/cmake/modules/FindCairo.cmake index d536c051..f0d1466a 100644 --- a/cmake/modules/FindCairo.cmake +++ b/cmake/modules/FindCairo.cmake @@ -47,7 +47,7 @@ if(CAIRO_FOUND) HINTS ${_pc_cairo_INCLUDE_DIRS} PATH_SUFFIXES cairo ) - set(CAIRO_INCLUDE_DIRS "${CAIRO_INCLUDE_DIR}") + set(CAIRO_INCLUDE_DIRS "${CAIRO_INCLUDE_DIR};${_pc_cairo_INCLUDE_DIRS}") include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Cairo DEFAULT_MSG CAIRO_LIBRARIES CAIRO_INCLUDE_DIRS)
[poppler] cmake/modules
cmake/modules/FindNSS3.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 46b185c25472cb1cb90b9f83229a920fd638fd02 Author: Albert Astals Cid Date: Sun Dec 4 02:17:56 2022 +0100 Increase our minimum supported NSS to that of Ubuntu 20.04 too diff --git a/cmake/modules/FindNSS3.cmake b/cmake/modules/FindNSS3.cmake index 9945a689..f83ef914 100644 --- a/cmake/modules/FindNSS3.cmake +++ b/cmake/modules/FindNSS3.cmake @@ -18,6 +18,6 @@ include(FindPackageHandleStandardArgs) find_package(PkgConfig REQUIRED) -pkg_check_modules(NSS3 IMPORTED_TARGET "nss>=3.19") +pkg_check_modules(NSS3 IMPORTED_TARGET "nss>=3.49") find_package_handle_standard_args(NSS3 DEFAULT_MSG NSS3_LIBRARIES NSS3_CFLAGS)
[poppler] cmake/modules
cmake/modules/FindNSS3.cmake | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) New commits: commit 66100be4fa629d03634c6461c084a72926473ce8 Author: Albert Astals Cid Date: Mon Jan 17 23:25:20 2022 +0100 FindNSS3: Improve documentation and remove "wrong" MSVC check diff --git a/cmake/modules/FindNSS3.cmake b/cmake/modules/FindNSS3.cmake index c0820b26..9945a689 100644 --- a/cmake/modules/FindNSS3.cmake +++ b/cmake/modules/FindNSS3.cmake @@ -2,21 +2,22 @@ # Once done this will define # # NSS_FOUND - system has NSS3 -# NSS3_CFLAGS - the NSS CFlags -# NSS3_LIBRARIES - Link these to use NSS +# PkgConfig::NSS3 - Use this in target_link_libraries to bring both includes and link libraries +# +# Deprecated, use the above variables: +# NSS3_CFLAGS - the NSS CFlags +# NSS3_LIBRARIES - Link these to use NSS # # Copyright 2015 André Guerreiro, +# Copyright 2022 Albert Astals Cid, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. include(FindPackageHandleStandardArgs) -if (NOT MSVC) - find_package(PkgConfig REQUIRED) - - pkg_check_modules(NSS3 IMPORTED_TARGET "nss>=3.19") +find_package(PkgConfig REQUIRED) - find_package_handle_standard_args(NSS3 DEFAULT_MSG NSS3_LIBRARIES NSS3_CFLAGS) +pkg_check_modules(NSS3 IMPORTED_TARGET "nss>=3.19") -endif(NOT MSVC) +find_package_handle_standard_args(NSS3 DEFAULT_MSG NSS3_LIBRARIES NSS3_CFLAGS)
[poppler] cmake/modules
cmake/modules/PopplerMacros.cmake |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 3ea3ad26bca27bd78f753f4296d4a544ed666e60 Author: Albert Astals Cid Date: Wed Dec 2 18:02:19 2020 +0100 cmake: We don't support gcc < 5 anymore diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 707e7497..fe1182da 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -94,9 +94,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(_warn "${_warn} -Wundef") set(_warn "${_warn} -Wzero-as-null-pointer-constant") set(_warn "${_warn} -Wshadow") - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") -set(_warn "${_warn} -Wsuggest-override") - endif() + set(_warn "${_warn} -Wsuggest-override") # set extra warnings set(_warnx "${_warnx} -Wconversion") ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/PopplerMacros.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a01a75d66ddeeb9637475cb0d4a196a1c1838588 Author: Albert Astals Cid Date: Sat Nov 14 01:26:28 2020 +0100 gcc: Enable -fno-operator-names They are valid C++ but it's not what this project uses, it's a matter of uniformity (same reason we have clang-format for example) diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 6e5f0050..0950791d 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -123,7 +123,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}") set(_save_cxxflags "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS"-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE") + set(CMAKE_CXX_FLAGS"-fno-exceptions -fno-check-new -fno-common -fno-operator-names -D_DEFAULT_SOURCE") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}") set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG ${_save_cxxflags}") set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cxxflags}") ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/PopplerMacros.cmake | 15 +++ 1 file changed, 15 insertions(+) New commits: commit d03f5ab76b0d0dee199b65fc801236a38830b5fc Author: Even Rouault Date: Sun Oct 6 12:52:31 2019 +0200 Do not override user-defined CMAKE_C[XX]_FLAGS for clang 337585e3d881c2c2c9099888b09902119dc05bf8 unconditionnaly overrides any potential user-defined CMAKE_C[XX]_FLAGS. This for example breaks the GDAL oss-fuzz builds which build Poppler from source (see https://github.com/OSGeo/gdal/blob/master/gdal/fuzzers/build.sh#L54) So do the same as the GCC path where we save input CMAKE_C[XX]_FLAGS and reinject them in custom CMAKE_C{XX}_FLAGS_{build_configuration} The values are identical to GCC, execpt for the _DEBUG configuration where we remove '-O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline' since clang does not support -fno-reorder-blocks and -fno-schedule-insns, so it is likely better to disable any optimization for proper debugging. diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 5ccbc4ef..a9d20948 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -166,8 +166,23 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(DEFAULT_COMPILE_WARNINGS "${_warn}") set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}") + set(_save_cxxflags "${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS"-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}") + set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG ${_save_cxxflags}") + # clang does not support -fno-reorder-blocks -fno-schedule-insns, so do not use -O2 + set(CMAKE_CXX_FLAGS_DEBUG "-g ${_save_cxxflags}") + set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline ${_save_cxxflags}") + set(CMAKE_CXX_FLAGS_PROFILE"-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cxxflags}") + set(_save_cflags "${CMAKE_C_FLAGS}") set(CMAKE_C_FLAGS "-std=c99 -D_DEFAULT_SOURCE") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cflags}") + set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${_save_cflags}") + # clang does not support -fno-reorder-blocks -fno-schedule-insns, so do not use -O2 + set(CMAKE_C_FLAGS_DEBUG"-g ${_save_cflags}") + set(CMAKE_C_FLAGS_DEBUGFULL"-g3 -fno-inline ${_save_cflags}") + set(CMAKE_C_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cflags}") + endif() if(CMAKE_C_COMPILER MATCHES "icc") ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/MacroPushRequiredVars.cmake | 47 -- 1 file changed, 47 deletions(-) New commits: commit 9f247fbb14df853274423035530a141405c90cda Author: Volker Krause Date: Wed Jan 16 20:17:12 2019 +0100 Remove unused MacroPushRequiredVars.cmake This is nowadays also provided by CMake itself via CMakePushCheckState. diff --git a/cmake/modules/MacroPushRequiredVars.cmake b/cmake/modules/MacroPushRequiredVars.cmake deleted file mode 100644 index 650b566e.. --- a/cmake/modules/MacroPushRequiredVars.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# this module defines two macros: -# MACRO_PUSH_REQUIRED_VARS() -# and -# MACRO_POP_REQUIRED_VARS() -# use these if you call cmake macros which use -# any of the CMAKE_REQUIRED_XXX variables -# -# Usage: -# MACRO_PUSH_REQUIRED_VARS() -# SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DSOME_MORE_DEF) -# CHECK_FUNCTION_EXISTS(...) -# MACRO_POP_REQUIRED_VARS() - -# Copyright (c) 2006, Alexander Neundorf, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -MACRO(MACRO_PUSH_REQUIRED_VARS) - - IF(NOT DEFINED _PUSH_REQUIRED_VARS_COUNTER) - SET(_PUSH_REQUIRED_VARS_COUNTER 0) - ENDIF(NOT DEFINED _PUSH_REQUIRED_VARS_COUNTER) - - MATH(EXPR _PUSH_REQUIRED_VARS_COUNTER "${_PUSH_REQUIRED_VARS_COUNTER}+1") - - SET(_CMAKE_REQUIRED_INCLUDES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_INCLUDES}) - SET(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS}) - SET(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_LIBRARIES}) - SET(_CMAKE_REQUIRED_FLAGS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_FLAGS}) -ENDMACRO(MACRO_PUSH_REQUIRED_VARS) - -MACRO(MACRO_POP_REQUIRED_VARS) - -# don't pop more than we pushed - IF("${_PUSH_REQUIRED_VARS_COUNTER}" GREATER "0") - - SET(CMAKE_REQUIRED_INCLUDES ${_CMAKE_REQUIRED_INCLUDES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}}) - SET(CMAKE_REQUIRED_DEFINITIONS ${_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}}) - SET(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}}) - SET(CMAKE_REQUIRED_FLAGS ${_CMAKE_REQUIRED_FLAGS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}}) - - MATH(EXPR _PUSH_REQUIRED_VARS_COUNTER "${_PUSH_REQUIRED_VARS_COUNTER}-1") - ENDIF("${_PUSH_REQUIRED_VARS_COUNTER}" GREATER "0") - -ENDMACRO(MACRO_POP_REQUIRED_VARS) - ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/FindLCMS.cmake | 84 --- 1 file changed, 84 deletions(-) New commits: commit f47c25939e8ef6ee995d312bac219791fc5b0236 Author: Albert Astals Cid Date: Tue Oct 23 00:02:56 2018 +0200 We don't need the LCMS find module anymore We only support lcms2 for a while diff --git a/cmake/modules/FindLCMS.cmake b/cmake/modules/FindLCMS.cmake deleted file mode 100644 index 9d162d2c.. --- a/cmake/modules/FindLCMS.cmake +++ /dev/null @@ -1,84 +0,0 @@ -# - Find LCMS -# Find the LCMS includes and library -# This module defines -# LCMS_INCLUDE_DIR, where to find lcms.h -# LCMS_LIBRARIES, the libraries needed to use LCMS. -# LCMS_VERSION, The value of LCMS_VERSION defined in lcms.h -# LCMS_FOUND, If false, do not try to use LCMS. - - -# Copyright (c) 2008, Adrian Page, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls -if(NOT WIN32) - find_package(PkgConfig) - pkg_check_modules(PC_LCMS lcms) - set(LCMS_DEFINITIONS ${PC_LCMS_CFLAGS_OTHER}) -endif(NOT WIN32) - -find_path(LCMS_INCLUDE_DIR lcms.h - PATHS - ${PC_LCMS_INCLUDEDIR} - ${PC_LCMS_INCLUDE_DIRS} - PATH_SUFFIXES lcms liblcms1 -) - -find_library(LCMS_LIBRARIES NAMES lcms liblcms lcms-1 liblcms-1 - PATHS - ${PC_LCMS_LIBDIR} - ${PC_LCMS_LIBRARY_DIRS} - PATH_SUFFIXES lcms -) - -if(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES) - set(LCMS_FOUND TRUE) -else(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES) - set(LCMS_FOUND FALSE) -endif(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES) - -if(LCMS_FOUND) - set(FIND_LCMS_VERSION_SOURCE - "#include \n int main()\n {\n return LCMS_VERSION;\n }\n") - set(FIND_LCMS_VERSION_SOURCE_FILE ${CMAKE_BINARY_DIR}/CMakeTmp/FindLCMS.cxx) - file(WRITE "${FIND_LCMS_VERSION_SOURCE_FILE}" "${FIND_LCMS_VERSION_SOURCE}") - - set(FIND_LCMS_VERSION_ADD_INCLUDES - "-DINCLUDE_DIRECTORIES:STRING=${LCMS_INCLUDE_DIR}") - - try_run(LCMS_VERSION LCMS_COMPILE_RESULT - ${CMAKE_BINARY_DIR} - ${FIND_LCMS_VERSION_SOURCE_FILE} - CMAKE_FLAGS "${FIND_LCMS_VERSION_ADD_INCLUDES}" - OUTPUT_VARIABLE OUTPUT) - - if(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN) - if(NOT LCMS_FIND_QUIETLY) - string(SUBSTRING ${LCMS_VERSION} 0 1 LCMS_MAJOR_VERSION) - string(SUBSTRING ${LCMS_VERSION} 1 2 LCMS_MINOR_VERSION) - message(STATUS "Found lcms version ${LCMS_MAJOR_VERSION}.${LCMS_MINOR_VERSION}, ${LCMS_LIBRARIES}") - endif(NOT LCMS_FIND_QUIETLY) - else(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN) - if(NOT LCMS_FIND_QUIETLY) - message(STATUS "Found lcms but failed to find version ${LCMS_LIBRARIES}") - file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log -"Find lcms version failed with the following output:\n${OUTPUT}\nFindLCMS.cxx:\n${FIND_LCMS_VERSION_SOURCE}\n\n") - endif(NOT LCMS_FIND_QUIETLY) - set(LCMS_VERSION NOTFOUND) - endif(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN) -else(LCMS_FOUND) - if(NOT LCMS_FIND_QUIETLY) - if(LCMS_FIND_REQUIRED) - message(FATAL_ERROR "Required package lcms NOT found") - else(LCMS_FIND_REQUIRED) - message(STATUS "lcms NOT found") - endif(LCMS_FIND_REQUIRED) - endif(NOT LCMS_FIND_QUIETLY) -endif(LCMS_FOUND) - -mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARIES LCMS_VERSION) - ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/FindLIBOPENJPEG2.cmake | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) New commits: commit 08a4ac65d202742209bca6cf3806c4d111a5522c Author: Albert Astals Cid Date: Fri May 4 15:51:18 2018 +0200 FindLIBOPENJPEG2.cmake: Remove cache code It wasn't working since the if mentioned LIBOPENJPEG2_INCLUDE_DIR instead of LIBOPENJPEG2_INCLUDE_DIRS and when fixing the typo it broke the build because we were not defining USE_OPENJPEG2, so better just remove the broken if code diff --git a/cmake/modules/FindLIBOPENJPEG2.cmake b/cmake/modules/FindLIBOPENJPEG2.cmake index f18bd3ce..654620eb 100644 --- a/cmake/modules/FindLIBOPENJPEG2.cmake +++ b/cmake/modules/FindLIBOPENJPEG2.cmake @@ -11,20 +11,12 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (LIBOPENJPEG2_LIBRARIES AND LIBOPENJPEG2_INCLUDE_DIR) +set(LIBOPENJPEG2_FOUND FALSE) +set(LIBOPENJPEG2_INCLUDE_DIRS) +set(LIBOPENJPEG2_LIBRARIES) - # in cache already - set(LIBOPENJPEG2_FOUND TRUE) - -else () - - set(LIBOPENJPEG2_FOUND FALSE) - set(LIBOPENJPEG2_INCLUDE_DIRS) - set(LIBOPENJPEG2_LIBRARIES) - - find_package(PkgConfig REQUIRED) - pkg_check_modules(LIBOPENJPEG2 libopenjp2) - if (LIBOPENJPEG2_FOUND) -add_definitions(-DUSE_OPENJPEG2) - endif () +find_package(PkgConfig REQUIRED) +pkg_check_modules(LIBOPENJPEG2 libopenjp2) +if (LIBOPENJPEG2_FOUND) + add_definitions(-DUSE_OPENJPEG2) endif () ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules glib/demo
cmake/modules/FindGTK.cmake |2 +- glib/demo/annots.c |2 +- glib/demo/selections.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit c7a317635cfc6934e975e846335e37a68d6b3876 Author: Albert Astals Cid Date: Mon Mar 26 16:10:05 2018 +0200 glib: less deprecated calls And increate gdk pixbuf requirement to the version i think we actually require diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake index 10e22924..4b9e23e2 100644 --- a/cmake/modules/FindGTK.cmake +++ b/cmake/modules/FindGTK.cmake @@ -15,7 +15,7 @@ include(FindPackageHandleStandardArgs) if (NOT WIN32) find_package(PkgConfig REQUIRED) - pkg_check_modules(GTK3 "gtk+-3.0>=3.8" "gdk-pixbuf-2.0") + pkg_check_modules(GTK3 "gtk+-3.0>=3.8" "gdk-pixbuf-2.0>=2.8") find_package_handle_standard_args(GTK DEFAULT_MSG GTK3_LIBRARIES GTK3_CFLAGS) diff --git a/glib/demo/annots.c b/glib/demo/annots.c index 7f2e8618..bbcc31c2 100644 --- a/glib/demo/annots.c +++ b/glib/demo/annots.c @@ -350,7 +350,7 @@ pgd_annots_update_cursor (PgdAnnotsDemo *demo, demo->cursor = cursor_type; gdk_window_set_cursor (gtk_widget_get_window (demo->main_box), cursor); - gdk_flush (); + gdk_display_flush (gtk_widget_get_display (demo->main_box)); if (cursor) g_object_unref (cursor); } diff --git a/glib/demo/selections.c b/glib/demo/selections.c index eff099e2..d450f36a 100644 --- a/glib/demo/selections.c +++ b/glib/demo/selections.c @@ -168,7 +168,7 @@ pgd_selections_update_cursor (PgdSelectionsDemo *demo, demo->cursor = cursor_type; gdk_window_set_cursor (window, cursor); - gdk_flush (); + gdk_display_flush (gtk_widget_get_display (demo->darea)); if (cursor) g_object_unref (cursor); } ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules glib/poppler-structure-element.cc poppler/GfxFont.cc poppler/JBIG2Stream.cc test/gtk-test.cc test/pdf-fullrewrite.cc utils/pdfdetach.cc utils/pdffonts.cc utils/pdfimages.cc uti
cmake/modules/PopplerMacros.cmake |2 +- glib/poppler-structure-element.cc | 29 +++-- poppler/GfxFont.cc|4 ++-- poppler/JBIG2Stream.cc| 20 ++-- test/gtk-test.cc |2 +- test/pdf-fullrewrite.cc |2 +- utils/pdfdetach.cc|3 ++- utils/pdffonts.cc |4 ++-- utils/pdfimages.cc|4 ++-- utils/pdfinfo.cc |4 ++-- utils/pdfseparate.cc |4 ++-- utils/pdfsig.cc |4 ++-- utils/pdftocairo.cc |4 ++-- utils/pdftohtml.cc|4 ++-- utils/pdftoppm.cc |4 ++-- utils/pdftops.cc |4 ++-- utils/pdftotext.cc|4 ++-- utils/pdfunite.cc |4 ++-- 18 files changed, 54 insertions(+), 52 deletions(-) New commits: commit ef4e450c921f4373955def51a74ebffd8f7b4599 Author: Albert Astals Cid Date: Tue Jan 9 19:36:16 2018 +0100 Enable no-missing-field-initializers diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 54895bdc..51cca111 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -101,7 +101,7 @@ endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) if(CMAKE_COMPILER_IS_GNUCXX) # set the default compile warnings set(_warn "-Wall -Wextra -Wpedantic") - set(_warn "${_warn} -Wno-unused-parameter -Wno-missing-field-initializers") + set(_warn "${_warn} -Wno-unused-parameter") set(_warn "${_warn} -Wcast-align") set(_warn "${_warn} -Wformat-security") set(_warn "${_warn} -Wframe-larger-than=65536") diff --git a/glib/poppler-structure-element.cc b/glib/poppler-structure-element.cc index c7383c84..a905fa46 100644 --- a/glib/poppler-structure-element.cc +++ b/glib/poppler-structure-element.cc @@ -1,6 +1,7 @@ /* poppler-structure.cc: glib interface to poppler * * Copyright (C) 2013 Igalia S.L. + * Copyright (C) 2018 Albert Astals Cid * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -242,7 +243,7 @@ ENUM_VALUES (PopplerStructurePlacement, Placement) { "Before", POPPLER_STRUCTURE_PLACEMENT_BEFORE }, { "Start", POPPLER_STRUCTURE_PLACEMENT_START }, { "End",POPPLER_STRUCTURE_PLACEMENT_END}, - { nullptr } + { } }; ENUM_VALUES (PopplerStructureWritingMode, WritingMode) @@ -250,7 +251,7 @@ ENUM_VALUES (PopplerStructureWritingMode, WritingMode) { "LrTb", POPPLER_STRUCTURE_WRITING_MODE_LR_TB }, { "RlTb", POPPLER_STRUCTURE_WRITING_MODE_RL_TB }, { "TbRl", POPPLER_STRUCTURE_WRITING_MODE_TB_RL }, - { nullptr } + { } }; ENUM_VALUES (PopplerStructureBorderStyle, BorderStyle) @@ -264,7 +265,7 @@ ENUM_VALUES (PopplerStructureBorderStyle, BorderStyle) { "Groove", POPPLER_STRUCTURE_BORDER_STYLE_GROOVE }, { "Inset", POPPLER_STRUCTURE_BORDER_STYLE_INSET }, { "Outset", POPPLER_STRUCTURE_BORDER_STYLE_OUTSET }, - { nullptr } + { } }; ENUM_VALUES (PopplerStructureTextAlign, TextAlign) @@ -273,7 +274,7 @@ ENUM_VALUES (PopplerStructureTextAlign, TextAlign) { "Center", POPPLER_STRUCTURE_TEXT_ALIGN_CENTER }, { "End", POPPLER_STRUCTURE_TEXT_ALIGN_END }, { "Justify", POPPLER_STRUCTURE_TEXT_ALIGN_JUSTIFY }, - { nullptr } + { } }; ENUM_VALUES (PopplerStructureBlockAlign, BlockAlign) @@ -282,7 +283,7 @@ ENUM_VALUES (PopplerStructureBlockAlign, BlockAlign) { "Middle", POPPLER_STRUCTURE_BLOCK_ALIGN_MIDDLE }, { "After", POPPLER_STRUCTURE_BLOCK_ALIGN_AFTER }, { "Justify", POPPLER_STRUCTURE_BLOCK_ALIGN_JUSTIFY }, - { nullptr } + { } }; ENUM_VALUES (PopplerStructureInlineAlign, InlineAlign) @@ -290,7 +291,7 @@ ENUM_VALUES (PopplerStructureInlineAlign, InlineAlign) { "Start", POPPLER_STRUCTURE_INLINE_ALIGN_START }, { "Center", POPPLER_STRUCTURE_INLINE_ALIGN_CENTER }, { "End",POPPLER_STRUCTURE_INLINE_ALIGN_END}, - { nullptr } + { } }; ENUM_VALUES (PopplerStructureTextDecoration, TextDecorationType) @@ -299,7 +300,7 @@ ENUM_VALUES (PopplerStructureTextDecoration, TextDecorationType) { "Underline", POPPLER_STRUCTURE_TEXT_DECORATION_UNDERLINE }, { "Overline",POPPLER_STRUCTURE_TEXT_DECORATION_OVERLINE}, { "LineThrough", POPPLER_STRUCTURE_TEXT_DECORATION_LINETHROUGH }, - { nullptr } + { } }; ENUM_VALUES (PopplerStructureRubyAlign, RubyAlign) @@ -309,7 +310,7 @@ ENUM_VALUES (PopplerStructureRubyAlign, RubyAlign) { "End",POPPLER_STRUCTURE_RUBY_ALIGN_END}, { "Justify",POPPLER_STRUCTURE_RUBY_ALIGN_JUSTIFY}, { "Distribute", POPPLER_STRUCTURE_RUBY_ALIGN_DISTRIBUTE }, - { nullptr } + { } }; ENUM_VALUES (PopplerStructureRubyPosition, RubyPosition) @@ -318,7 +319,7 @@ ENUM_VALUES (PopplerStructureRubyPosition, RubyPosition) { "After", POPPL
[poppler] cmake/modules
cmake/modules/FindLIBOPENJPEG.cmake | 64 1 file changed, 64 deletions(-) New commits: commit 15dd674a384c80a8f3d4f0647f6617ba72d9bd26 Author: Albert Astals Cid Date: Thu Dec 14 15:11:31 2017 +0100 Remove unused FindLIBOPENJPEG.cmake diff --git a/cmake/modules/FindLIBOPENJPEG.cmake b/cmake/modules/FindLIBOPENJPEG.cmake deleted file mode 100644 index e2fccf30.. --- a/cmake/modules/FindLIBOPENJPEG.cmake +++ /dev/null @@ -1,64 +0,0 @@ -# - Try to find the libopenjpeg library -# Once done this will define -# -# LIBOPENJPEG_FOUND - system has libopenjpeg -# LIBOPENJPEG_INCLUDE_DIRS - the libopenjpeg include directories -# LIBOPENJPEG_LIBRARIES - Link these to use libopenjpeg -# LIBOPENJPEG_INCLUDE_DIR is internal and deprecated for use - -# Copyright (c) 2008, Albert Astals Cid, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR) - - # in cache already - set(LIBOPENJPEG_FOUND TRUE) - -else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR) - - #reset vars - set(LIBOPENJPEG_LIBRARIES) - set(LIBOPENJPEG_INCLUDE_DIR) - - find_package(PkgConfig REQUIRED) - pkg_check_modules(LIBOPENJPEG libopenjpeg) - - if(LIBOPENJPEG_FOUND) -add_definitions(-DUSE_OPENJPEG1) -set(LIBOPENJPEG_INCLUDE_DIR ${LIBOPENJPEG_INCLUDE_DIRS}) - else(LIBOPENJPEG_FOUND) - -find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg) -find_library(LIBOPENJPEG_LIBRARIES openjpeg) -if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES) - - include(CheckCXXSourceCompiles) - - set(CMAKE_REQUIRED_INCLUDES ${LIBOPENJPEG_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${LIBOPENJPEG_LIBRARIES}) - - check_cxx_source_compiles(" -#include -int main() -{ - int foo = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG; - return 0; -}" -WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG) - - set(CMAKE_REQUIRED_INCLUDES) - set(CMAKE_REQUIRED_LIBRARIES) - - set(LIBOPENJPEG_FOUND TRUE) -endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LibOpenJPEG DEFAULT_MSG LIBOPENJPEG_LIBRARIES LIBOPENJPEG_INCLUDE_DIR) - - endif (LIBOPENJPEG_FOUND) -endif (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR) - -set(LIBOPENJPEG_INCLUDE_DIRS ${LIBOPENJPEG_INCLUDE_DIR}) ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/PopplerMacros.cmake |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 6ae4293fce77290f4fbdc643c999809d5924bf2c Author: Roland Hieber Date: Wed Nov 8 08:22:01 2017 +0100 CMake: add the custom buildtests target only once Make BUILDTESTS_ADDED a global property, so the `buildtests` target gets added only once. As far as I understood, this seems to fulfil the requirements of CMP0002. Bug #103003 diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index aa5ca6de..ccb27904 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -13,10 +13,10 @@ macro(POPPLER_ADD_TEST exe build_flag) # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests if(NOT build_test AND NOT MSVC_IDE) -get_directory_property(_buildtestsAdded BUILDTESTS_ADDED) +get_property(_buildtestsAdded GLOBAL PROPERTY BUILDTESTS_ADDED) if(NOT _buildtestsAdded) add_custom_target(buildtests) - set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE) + set_property(GLOBAL PROPERTY BUILDTESTS_ADDED TRUE) endif(NOT _buildtestsAdded) add_dependencies(buildtests ${exe}) endif(NOT build_test AND NOT MSVC_IDE) @@ -33,10 +33,10 @@ macro(POPPLER_ADD_UNITTEST exe build_flag) # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests if(NOT build_test) -get_directory_property(_buildtestsAdded BUILDTESTS_ADDED) +get_property(_buildtestsAdded GLOBAL PROPERTY BUILDTESTS_ADDED) if(NOT _buildtestsAdded) add_custom_target(buildtests) - set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE) + set_property(GLOBAL PROPERTY BUILDTESTS_ADDED TRUE) endif(NOT _buildtestsAdded) add_dependencies(buildtests ${exe}) endif(NOT build_test) ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/PopplerMacros.cmake |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit f6ad64878d91cbd0c19531c7ff669af0e0fa0912 Author: Sandro Mani Date: Tue Oct 31 00:24:11 2017 +0100 Install pkg-config files also on mingw diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 95af97cf..aa5ca6de 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -43,10 +43,10 @@ macro(POPPLER_ADD_UNITTEST exe build_flag) endmacro(POPPLER_ADD_UNITTEST) macro(POPPLER_CREATE_INSTALL_PKGCONFIG generated_file install_location) - if(NOT WIN32) + if(NOT MSVC) configure_file(${generated_file}.cmake ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} DESTINATION ${install_location}) - endif(NOT WIN32) + endif(NOT MSVC) endmacro(POPPLER_CREATE_INSTALL_PKGCONFIG) macro(SHOW_END_MESSAGE what value) ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/FindLIBOPENJPEG.cmake |2 ++ 1 file changed, 2 insertions(+) New commits: commit e816c7a47caa0c3f5261d467333f8c2eb6a2ad51 Author: Albert Astals Cid Date: Thu Oct 5 18:51:49 2017 +0200 FindLIBOPENJPEG.cmake: Add CheckCXXSourceCompiles Since we use check_cxx_source_compiles diff --git a/cmake/modules/FindLIBOPENJPEG.cmake b/cmake/modules/FindLIBOPENJPEG.cmake index 8a49193b..e2fccf30 100644 --- a/cmake/modules/FindLIBOPENJPEG.cmake +++ b/cmake/modules/FindLIBOPENJPEG.cmake @@ -35,6 +35,8 @@ else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR) find_library(LIBOPENJPEG_LIBRARIES openjpeg) if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES) + include(CheckCXXSourceCompiles) + set(CMAKE_REQUIRED_INCLUDES ${LIBOPENJPEG_INCLUDE_DIR}) set(CMAKE_REQUIRED_LIBRARIES ${LIBOPENJPEG_LIBRARIES}) ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/GObjectIntrospectionMacros.cmake |1 - 1 file changed, 1 deletion(-) New commits: commit 376ae2f8b8a92fd7bd751fbfcd0aa46530b59ca4 Author: Albert Astals Cid Date: Sat Sep 30 11:27:44 2017 +0200 Remove the gir-girs target It depends on the same files (subset) as the gir-typelibs target meaning that sometimes when doing a parallel build you'd get the two commands trying to generate the same file at once and bad things happen diff --git a/cmake/modules/GObjectIntrospectionMacros.cmake b/cmake/modules/GObjectIntrospectionMacros.cmake index 62af11d8..fddaf60f 100644 --- a/cmake/modules/GObjectIntrospectionMacros.cmake +++ b/cmake/modules/GObjectIntrospectionMacros.cmake @@ -90,7 +90,6 @@ macro(gir_add_introspections introspections_girs) endforeach() - add_custom_target(gir-girs ALL DEPENDS ${_gir_girs}) add_custom_target(gir-typelibs ALL DEPENDS ${_gir_typelibs}) endmacro(gir_add_introspections) ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules cpp/tests glib/poppler-action.cc goo/gmem.h goo/JpegWriter.cc poppler/Annot.cc poppler/Decrypt.cc poppler/TextOutputDev.cc qt4/src qt4/tests qt5/src qt5/tests test/perf-test.cc
cmake/modules/PopplerMacros.cmake |2 - cpp/tests/poppler-dump.cpp|2 - glib/poppler-action.cc|1 goo/JpegWriter.cc |2 - goo/gmem.h|2 - poppler/Annot.cc |6 +-- poppler/Decrypt.cc|2 - poppler/TextOutputDev.cc |2 - qt4/src/poppler-link.cc |2 - qt4/src/poppler-private.cc|6 +-- qt4/tests/check_links.cpp |4 +- qt4/tests/poppler-forms.cpp | 14 qt5/src/poppler-link.cc |2 - qt5/src/poppler-private.cc|6 +-- qt5/tests/check_links.cpp |4 +- qt5/tests/poppler-forms.cpp | 18 +-- test/perf-test-preview-dummy.cc |4 ++ test/perf-test.cc | 62 +++--- utils/pdfinfo.cc |4 +- utils/pdfseparate.cc |2 - utils/pdfsig.cc |6 +-- utils/pdftotext.cc|2 - utils/pdfunite.cc |6 +-- 23 files changed, 83 insertions(+), 78 deletions(-) New commits: commit 0790dd3afb8370aebca8e7e154bbd2b5ae5cd5a2 Author: Albert Astals Cid Date: Sat Sep 16 18:01:49 2017 +0200 Fix missing-declarations warnings ... and add it to default warning set diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index bc24ed9f..ba4bceb3 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -109,13 +109,13 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(_warn "${_warn} -Wmissing-format-attribute") set(_warn "${_warn} -Wnon-virtual-dtor") set(_warn "${_warn} -Woverloaded-virtual") + set(_warn "${_warn} -Wmissing-declarations") if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") set(_warn "${_warn} -Wsuggest-override") endif() # set extra warnings set(_warnx "${_warnx} -Wconversion") - set(_warnx "${_warnx} -Wmissing-declarations") set(_warnx "${_warnx} -Wshadow") set(_warnx "${_warnx} -Wundef") set(_warnx "${_warnx} -Wuseless-cast") diff --git a/cpp/tests/poppler-dump.cpp b/cpp/tests/poppler-dump.cpp index f9c8b6e4..706ad390 100644 --- a/cpp/tests/poppler-dump.cpp +++ b/cpp/tests/poppler-dump.cpp @@ -85,7 +85,7 @@ static void error(const std::string &msg) exit(1); } -std::ostream& operator<<(std::ostream& stream, const poppler::ustring &str) +static std::ostream& operator<<(std::ostream& stream, const poppler::ustring &str) { const poppler::byte_array ba = str.to_utf8(); for (unsigned int i = 0; i < ba.size(); ++i) { diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc index ad8ed18d..72969a5e 100644 --- a/glib/poppler-action.cc +++ b/glib/poppler-action.cc @@ -229,6 +229,7 @@ poppler_action_copy (PopplerAction *action) return new_action; } +static PopplerDest * dest_new_goto (PopplerDocument *document, LinkDest*link_dest) diff --git a/goo/JpegWriter.cc b/goo/JpegWriter.cc index a5a4d5a6..43c25e09 100644 --- a/goo/JpegWriter.cc +++ b/goo/JpegWriter.cc @@ -30,7 +30,7 @@ struct JpegWriterPrivate { struct jpeg_error_mgr jerr; }; -void outputMessage(j_common_ptr cinfo) +static void outputMessage(j_common_ptr cinfo) { char buffer[JMSG_LENGTH_MAX]; diff --git a/goo/gmem.h b/goo/gmem.h index 898f3393..e6eb6368 100644 --- a/goo/gmem.h +++ b/goo/gmem.h @@ -44,7 +44,7 @@ extern void *gmalloc_checkoverflow(size_t size); * returns NULL. If is NULL, calls malloc instead of realloc(). */ extern void *grealloc(void *p, size_t size); -extern void *grealloc_checkoverflow(size_t size); +extern void *grealloc_checkoverflow(void *p, size_t size); /* * These are similar to gmalloc and grealloc, but take an object count diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 83261038..db9a5715 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -113,7 +113,7 @@ // = (4 * (sqrt(2) - 1) / 3) * r #define bezierCircle 0.55228475 -AnnotLineEndingStyle parseAnnotLineEndingStyle(GooString *string) { +static AnnotLineEndingStyle parseAnnotLineEndingStyle(GooString *string) { if (string != NULL) { if (!string->cmp("Square")) { return annotLineEndingSquare; @@ -141,7 +141,7 @@ AnnotLineEndingStyle parseAnnotLineEndingStyle(GooString *string) { } } -const char* convertAnnotLineEndingStyle(AnnotLineEndingStyle style) { +static const char* convertAnnotLineEndingStyle(AnnotLineEndingStyle style) { switch (style) { case annotLineEndingSquare: return "Square"; @@ -185,7 +185,7 @@ static AnnotExternalDataType parseAnnotExternalData(Dict* dict) { return type; } -PDFRectangle *parseDiffRectangle(Array *array, PDFRectangle *rect) { +static PDFRectangle *parseDiffRectangle(Array *array, PDFRectangle *rect) { PDFRectangle *newRect = NULL; if (array->getLength() == 4) { // deltas diff --git a/poppler/Decrypt.cc b/poppler/Decrypt.cc index c82
[poppler] cmake/modules
cmake/modules/PopplerMacros.cmake | 44 -- 1 file changed, 24 insertions(+), 20 deletions(-) New commits: commit 951e7b3c1f337ceaf490edce3c575f89c45cb6d4 Author: Adrian Johnson Date: Wed Sep 13 19:24:07 2017 +0930 cmake: ensure user cflags/cxxflags are appended to end diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 408e6dca..442e7ee5 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -100,7 +100,7 @@ endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) if(CMAKE_COMPILER_IS_GNUCXX) if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override" ) + set(CMAKE_CXX_FLAGS "-Wsuggest-override ${CMAKE_CXX_FLAGS}" ) endif() # set the default compile warnings @@ -108,18 +108,20 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") - set(CMAKE_CXX_FLAGS"-Wnon-virtual-dtor -Woverloaded-virtual -D_DEFAULT_SOURCE ${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") - set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG") - set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") - set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline") - set(CMAKE_CXX_FLAGS_PROFILE"-g3 -fno-inline -ftest-coverage -fprofile-arcs") + set(_save_cxxflags "${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS"-Wnon-virtual-dtor -Woverloaded-virtual -D_DEFAULT_SOURCE") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}") + set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG ${_save_cxxflags}") + set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cxxflags}") + set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline ${_save_cxxflags}") + set(CMAKE_CXX_FLAGS_PROFILE"-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cxxflags}") + set(_save_cflags "${CMAKE_C_FLAGS}") set(CMAKE_C_FLAGS "-std=c99") - set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g") - set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG") - set(CMAKE_C_FLAGS_DEBUG"-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") - set(CMAKE_C_FLAGS_DEBUGFULL"-g3 -fno-inline") - set(CMAKE_C_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cflags}") + set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${_save_cflags}") + set(CMAKE_C_FLAGS_DEBUG"-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cflags}") + set(CMAKE_C_FLAGS_DEBUGFULL"-g3 -fno-inline ${_save_cflags}") + set(CMAKE_C_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cflags}") poppler_check_link_flag("-Wl,--as-needed" GCC_HAS_AS_NEEDED) if(GCC_HAS_AS_NEEDED) @@ -130,13 +132,15 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif (CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_C_COMPILER MATCHES "icc") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") - set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG") - set(CMAKE_CXX_FLAGS_DEBUG "-O2 -g -0b0 -noalign") - set(CMAKE_CXX_FLAGS_DEBUGFULL "-g -Ob0 -noalign") - set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g") - set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG") - set(CMAKE_C_FLAGS_DEBUG"-O2 -g -Ob0 -noalign") - set(CMAKE_C_FLAGS_DEBUGFULL"-g -Ob0 -noalign") + set(_save_cxxflags "${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}") + set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG ${_save_cxxflags}") + set(CMAKE_CXX_FLAGS_DEBUG "-O2 -g -0b0 -noalign ${_save_cxxflags}") + set(CMAKE_CXX_FLAGS_DEBUGFULL "-g -Ob0 -noalign ${_save_cxxflags}") + set(_save_cflags "${CMAKE_C_FLAGS}") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cflags}") + set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${_save_cflags}") + set(CMAKE_C_FLAGS_DEBUG"-O2 -g -Ob0 -noalign ${_save_cflags}") + set(CMAKE_C_FLAGS_DEBUGFULL"-g -Ob0 -noalign ${_save_cflags}") endif(CMAKE_C_COMPILER MATCHES "icc") ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/FindGLIB.cmake |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) New commits: commit 26f64a2a34a9273897c34045ea7af5e8c3c603cb Author: Albert Astals Cid Date: Thu Aug 31 15:37:07 2017 +0200 cmake: enable glib for windows too There's no need to not having it enabled diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake index 35a9f9e7..a7d43fa6 100644 --- a/cmake/modules/FindGLIB.cmake +++ b/cmake/modules/FindGLIB.cmake @@ -13,11 +13,8 @@ include(FindPackageHandleStandardArgs) -if (NOT WIN32) - find_package(PkgConfig REQUIRED) +find_package(PkgConfig REQUIRED) - pkg_check_modules(GLIB2 "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}" "gio-2.0>=${GLIB_REQUIRED}") +pkg_check_modules(GLIB2 "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) - -endif(NOT WIN32) +find_package_handle_standard_args(GLib DEFAULT_MSG GLIB2_LIBRARIES GLIB2_CFLAGS) ___ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler
Re: [poppler] cmake/modules configure.ac utils/pdfinfo.1 utils/pdfinfo.cc
Albert Astals Cid writes: > The discussion about C++11 was in my opinion not concluded, i.e. noone > contacted the people that [wrongly] use core library about if they can use C+ > +11, i'd prefer if you revert the change that needs C++11. Yes, but the patch made poppler build with C++11, without using any C++11 features in "public" header files, so it shouldn't affect libraries using internal core api. > Cheers, > Albert > > > El dissabte, 17 de setembre de 2016, a les 12:55:19 CEST, Adrian Johnson va > escriure: >> cmake/modules/PopplerMacros.cmake |2 >> configure.ac |1 >> utils/pdfinfo.1 |4 + >> utils/pdfinfo.cc | 140 >> +- 4 files changed, 145 insertions(+), >> 2 deletions(-) >> >> New commits: >> commit 183dbf3249e8db2398b63a749eb010bc0a89dc35 >> Author: Adrian Johnson >> Date: Sat Sep 17 22:08:23 2016 +0930 >> >> pdfinfo: add -dests option to print named destinations >> >> Bug 97262 >> >> diff --git a/cmake/modules/PopplerMacros.cmake >> b/cmake/modules/PopplerMacros.cmake index 6cadf40..e9b75b9 100644 >> --- a/cmake/modules/PopplerMacros.cmake >> +++ b/cmake/modules/PopplerMacros.cmake >> @@ -104,7 +104,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) >>set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions >> -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE >> "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align >> -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security >> -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") >> >> - set(CMAKE_CXX_FLAGS"-Wnon-virtual-dtor >> -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS >> "-std=c++11 -Wnon-virtual-dtor -Woverloaded-virtual >> ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") >>set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG") >>set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks >> -fno-schedule-insns -fno-inline") diff --git a/configure.ac b/configure.ac >> index c4cfc2c..9ce36e1 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -85,6 +85,7 @@ AC_ARG_ENABLE(build-type, >>enable_build_type=no) >> >> if test "x$GCC" = "xyes"; then >> +CXXFLAGS="-std=c++11 $CXXFLAGS" >> case "$enable_build_type" in >> relwithdebinfo) >> CFLAGS="-O2 -g $CFLAGS" >> diff --git a/utils/pdfinfo.1 b/utils/pdfinfo.1 >> index 741219f..b699dff 100644 >> --- a/utils/pdfinfo.1 >> +++ b/utils/pdfinfo.1 >> @@ -113,6 +113,10 @@ Prints dates in ISO-8601 format (including the time >> zone). .B \-rawdates >> Prints the raw (undecoded) date strings, directly from the PDF file. >> .TP >> +.B \-dests >> +Print a list of all named destinations. If a page range is specified using >> "\-f" and "\-l", only +destinations in the page range are listed. >> +.TP >> .BI \-enc " encoding-name" >> Sets the encoding to use for text output. This defaults to "UTF-8". >> .TP >> diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc >> index 9cfdc0f..50e756e 100644 >> --- a/utils/pdfinfo.cc >> +++ b/utils/pdfinfo.cc >> @@ -36,6 +36,7 @@ >> #include >> #include >> #include >> +#include >> #include "parseargs.h" >> #include "printencodings.h" >> #include "goo/GooString.h" >> @@ -77,6 +78,7 @@ static GBool printHelp = gFalse; >> static GBool printEnc = gFalse; >> static GBool printStructure = gFalse; >> static GBool printStructureText = gFalse; >> +static GBool printDests = gFalse; >> >> static const ArgDesc argDesc[] = { >>{"-f", argInt, &firstPage,0, >> @@ -97,6 +99,8 @@ static const ArgDesc argDesc[] = { >> "print the dates in ISO-8601 format"}, >>{"-rawdates", argFlag, &rawDates, 0, >> "print the undecoded date strings directly from the PDF file"}, >> + {"-dests", argFlag, &printDests, 0, >> + "print all named destinations in the PDF"}, >>{"-enc",argString, textEncName,sizeof(textEncName), >> "output text encoding name"}, >>{"-listenc",argFlag, &printEnc, 0, >> @@ -289,6 +293,135 @@ static void printStruct(const StructElement *element, >> unsigned indent) { } >> } >> >> +struct RefCompare { >> + bool operator() (const Ref& lhs, const Ref& rhs) const { >> +return lhs.num < rhs.num; >> + } >> +}; >> + >> +struct GooStringCompare { >> + bool operator() (GooString* lhs, GooString* rhs) const { >> +return lhs->cmp(const_cast(rhs)) < 0; >> + } >> +}; >> + >> +static void printLinkDest(LinkDest *dest) { >> + char buf[100]; >> + >> + switch (dest->getKind()) { >> +case destXYZ: >> + sprintf(buf, "[ XYZ "); >> + if (dest->getChangeLeft()) { >> +sprintf(buf+strlen(buf), "%4.f ", dest->getLeft()); >> + } else { >> +strcat(buf, "null "); >> + } >> + if (dest->getChangeTop()) { >> +sprintf(buf+strlen(buf), "%4.f ", dest->getTop
Re: [poppler] cmake/modules configure.ac utils/pdfinfo.1 utils/pdfinfo.cc
I am planning to rework the patch when I get time. On 29/09/16 06:50, Albert Astals Cid wrote: > Is there so much C++11 need there that you can't have the feature without it? > > Cheers, > Albert > > El dimarts, 27 de setembre de 2016, a les 20:41:49 CEST, Adrian Johnson va > escriure: >> cmake/modules/PopplerMacros.cmake |2 >> configure.ac |1 >> utils/pdfinfo.1 |4 - >> utils/pdfinfo.cc | 140 >> -- 4 files changed, 2 insertions(+), >> 145 deletions(-) >> >> New commits: >> commit 86e50e156952713f0ce3ecc7b6f03f06dc0902c1 >> Author: Adrian Johnson >> Date: Wed Sep 28 06:10:20 2016 +0930 >> >> Revert "pdfinfo: add -dests option to print named destinations" >> >> This reverts commit 183dbf3249e8db2398b63a749eb010bc0a89dc35. >> >> diff --git a/cmake/modules/PopplerMacros.cmake >> b/cmake/modules/PopplerMacros.cmake index e9b75b9..6cadf40 100644 >> --- a/cmake/modules/PopplerMacros.cmake >> +++ b/cmake/modules/PopplerMacros.cmake >> @@ -104,7 +104,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) >>set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions >> -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE >> "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align >> -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security >> -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") >> >> - set(CMAKE_CXX_FLAGS"-std=c++11 -Wnon-virtual-dtor >> -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS >> "-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") >> set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") >>set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG") >>set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks >> -fno-schedule-insns -fno-inline") diff --git a/configure.ac b/configure.ac >> index 9ce36e1..c4cfc2c 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -85,7 +85,6 @@ AC_ARG_ENABLE(build-type, >>enable_build_type=no) >> >> if test "x$GCC" = "xyes"; then >> -CXXFLAGS="-std=c++11 $CXXFLAGS" >> case "$enable_build_type" in >> relwithdebinfo) >> CFLAGS="-O2 -g $CFLAGS" >> diff --git a/utils/pdfinfo.1 b/utils/pdfinfo.1 >> index b699dff..741219f 100644 >> --- a/utils/pdfinfo.1 >> +++ b/utils/pdfinfo.1 >> @@ -113,10 +113,6 @@ Prints dates in ISO-8601 format (including the time >> zone). .B \-rawdates >> Prints the raw (undecoded) date strings, directly from the PDF file. >> .TP >> -.B \-dests >> -Print a list of all named destinations. If a page range is specified using >> "\-f" and "\-l", only -destinations in the page range are listed. >> -.TP >> .BI \-enc " encoding-name" >> Sets the encoding to use for text output. This defaults to "UTF-8". >> .TP >> diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc >> index 50e756e..9cfdc0f 100644 >> --- a/utils/pdfinfo.cc >> +++ b/utils/pdfinfo.cc >> @@ -36,7 +36,6 @@ >> #include >> #include >> #include >> -#include >> #include "parseargs.h" >> #include "printencodings.h" >> #include "goo/GooString.h" >> @@ -78,7 +77,6 @@ static GBool printHelp = gFalse; >> static GBool printEnc = gFalse; >> static GBool printStructure = gFalse; >> static GBool printStructureText = gFalse; >> -static GBool printDests = gFalse; >> >> static const ArgDesc argDesc[] = { >>{"-f", argInt, &firstPage,0, >> @@ -99,8 +97,6 @@ static const ArgDesc argDesc[] = { >> "print the dates in ISO-8601 format"}, >>{"-rawdates", argFlag, &rawDates, 0, >> "print the undecoded date strings directly from the PDF file"}, >> - {"-dests", argFlag, &printDests, 0, >> - "print all named destinations in the PDF"}, >>{"-enc",argString, textEncName,sizeof(textEncName), >> "output text encoding name"}, >>{"-listenc",argFlag, &printEnc, 0, >> @@ -293,135 +289,6 @@ static void printStruct(const StructElement *element, >> unsigned indent) { } >> } >> >> -struct RefCompare { >> - bool operator() (const Ref& lhs, const Ref& rhs) const { >> -return lhs.num < rhs.num; >> - } >> -}; >> - >> -struct GooStringCompare { >> - bool operator() (GooString* lhs, GooString* rhs) const { >> -return lhs->cmp(const_cast(rhs)) < 0; >> - } >> -}; >> - >> -static void printLinkDest(LinkDest *dest) { >> - char buf[100]; >> - >> - switch (dest->getKind()) { >> -case destXYZ: >> - sprintf(buf, "[ XYZ "); >> - if (dest->getChangeLeft()) { >> -sprintf(buf+strlen(buf), "%4.f ", dest->getLeft()); >> - } else { >> -strcat(buf, "null "); >> - } >> - if (dest->getChangeTop()) { >> -sprintf(buf+strlen(buf), "%4.f ", dest->getTop()); >> - } else { >> -strcat(buf, "null "); >> - } >> - if (dest->getChangeZoom()) { >> -sprintf(buf+strlen(buf), "%4.2f ", dest->getZoom()); >> - } else
Re: [poppler] cmake/modules configure.ac utils/pdfinfo.1 utils/pdfinfo.cc
Is there so much C++11 need there that you can't have the feature without it? Cheers, Albert El dimarts, 27 de setembre de 2016, a les 20:41:49 CEST, Adrian Johnson va escriure: > cmake/modules/PopplerMacros.cmake |2 > configure.ac |1 > utils/pdfinfo.1 |4 - > utils/pdfinfo.cc | 140 > -- 4 files changed, 2 insertions(+), > 145 deletions(-) > > New commits: > commit 86e50e156952713f0ce3ecc7b6f03f06dc0902c1 > Author: Adrian Johnson > Date: Wed Sep 28 06:10:20 2016 +0930 > > Revert "pdfinfo: add -dests option to print named destinations" > > This reverts commit 183dbf3249e8db2398b63a749eb010bc0a89dc35. > > diff --git a/cmake/modules/PopplerMacros.cmake > b/cmake/modules/PopplerMacros.cmake index e9b75b9..6cadf40 100644 > --- a/cmake/modules/PopplerMacros.cmake > +++ b/cmake/modules/PopplerMacros.cmake > @@ -104,7 +104,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) >set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions > -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE > "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align > -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security > -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") > > - set(CMAKE_CXX_FLAGS"-std=c++11 -Wnon-virtual-dtor > -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS > "-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") > set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") >set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG") >set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks > -fno-schedule-insns -fno-inline") diff --git a/configure.ac b/configure.ac > index 9ce36e1..c4cfc2c 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -85,7 +85,6 @@ AC_ARG_ENABLE(build-type, >enable_build_type=no) > > if test "x$GCC" = "xyes"; then > -CXXFLAGS="-std=c++11 $CXXFLAGS" > case "$enable_build_type" in > relwithdebinfo) > CFLAGS="-O2 -g $CFLAGS" > diff --git a/utils/pdfinfo.1 b/utils/pdfinfo.1 > index b699dff..741219f 100644 > --- a/utils/pdfinfo.1 > +++ b/utils/pdfinfo.1 > @@ -113,10 +113,6 @@ Prints dates in ISO-8601 format (including the time > zone). .B \-rawdates > Prints the raw (undecoded) date strings, directly from the PDF file. > .TP > -.B \-dests > -Print a list of all named destinations. If a page range is specified using > "\-f" and "\-l", only -destinations in the page range are listed. > -.TP > .BI \-enc " encoding-name" > Sets the encoding to use for text output. This defaults to "UTF-8". > .TP > diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc > index 50e756e..9cfdc0f 100644 > --- a/utils/pdfinfo.cc > +++ b/utils/pdfinfo.cc > @@ -36,7 +36,6 @@ > #include > #include > #include > -#include > #include "parseargs.h" > #include "printencodings.h" > #include "goo/GooString.h" > @@ -78,7 +77,6 @@ static GBool printHelp = gFalse; > static GBool printEnc = gFalse; > static GBool printStructure = gFalse; > static GBool printStructureText = gFalse; > -static GBool printDests = gFalse; > > static const ArgDesc argDesc[] = { >{"-f", argInt, &firstPage,0, > @@ -99,8 +97,6 @@ static const ArgDesc argDesc[] = { > "print the dates in ISO-8601 format"}, >{"-rawdates", argFlag, &rawDates, 0, > "print the undecoded date strings directly from the PDF file"}, > - {"-dests", argFlag, &printDests, 0, > - "print all named destinations in the PDF"}, >{"-enc",argString, textEncName,sizeof(textEncName), > "output text encoding name"}, >{"-listenc",argFlag, &printEnc, 0, > @@ -293,135 +289,6 @@ static void printStruct(const StructElement *element, > unsigned indent) { } > } > > -struct RefCompare { > - bool operator() (const Ref& lhs, const Ref& rhs) const { > -return lhs.num < rhs.num; > - } > -}; > - > -struct GooStringCompare { > - bool operator() (GooString* lhs, GooString* rhs) const { > -return lhs->cmp(const_cast(rhs)) < 0; > - } > -}; > - > -static void printLinkDest(LinkDest *dest) { > - char buf[100]; > - > - switch (dest->getKind()) { > -case destXYZ: > - sprintf(buf, "[ XYZ "); > - if (dest->getChangeLeft()) { > - sprintf(buf+strlen(buf), "%4.f ", dest->getLeft()); > - } else { > - strcat(buf, "null "); > - } > - if (dest->getChangeTop()) { > - sprintf(buf+strlen(buf), "%4.f ", dest->getTop()); > - } else { > - strcat(buf, "null "); > - } > - if (dest->getChangeZoom()) { > - sprintf(buf+strlen(buf), "%4.2f ", dest->getZoom()); > - } else { > - strcat(buf, "null "); > - } > - break; > -case destFit: > - sprintf(buf, "[ Fit "); > - break; > -case destFitH: > - if (dest->getChangeTop()) { > - sprintf(buf, "[ FitH %4.
[poppler] cmake/modules configure.ac utils/pdfinfo.1 utils/pdfinfo.cc
cmake/modules/PopplerMacros.cmake |2 configure.ac |1 utils/pdfinfo.1 |4 - utils/pdfinfo.cc | 140 -- 4 files changed, 2 insertions(+), 145 deletions(-) New commits: commit 86e50e156952713f0ce3ecc7b6f03f06dc0902c1 Author: Adrian Johnson Date: Wed Sep 28 06:10:20 2016 +0930 Revert "pdfinfo: add -dests option to print named destinations" This reverts commit 183dbf3249e8db2398b63a749eb010bc0a89dc35. diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index e9b75b9..6cadf40 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -104,7 +104,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") - set(CMAKE_CXX_FLAGS"-std=c++11 -Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS"-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG") set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") diff --git a/configure.ac b/configure.ac index 9ce36e1..c4cfc2c 100644 --- a/configure.ac +++ b/configure.ac @@ -85,7 +85,6 @@ AC_ARG_ENABLE(build-type, enable_build_type=no) if test "x$GCC" = "xyes"; then -CXXFLAGS="-std=c++11 $CXXFLAGS" case "$enable_build_type" in relwithdebinfo) CFLAGS="-O2 -g $CFLAGS" diff --git a/utils/pdfinfo.1 b/utils/pdfinfo.1 index b699dff..741219f 100644 --- a/utils/pdfinfo.1 +++ b/utils/pdfinfo.1 @@ -113,10 +113,6 @@ Prints dates in ISO-8601 format (including the time zone). .B \-rawdates Prints the raw (undecoded) date strings, directly from the PDF file. .TP -.B \-dests -Print a list of all named destinations. If a page range is specified using "\-f" and "\-l", only -destinations in the page range are listed. -.TP .BI \-enc " encoding-name" Sets the encoding to use for text output. This defaults to "UTF-8". .TP diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc index 50e756e..9cfdc0f 100644 --- a/utils/pdfinfo.cc +++ b/utils/pdfinfo.cc @@ -36,7 +36,6 @@ #include #include #include -#include #include "parseargs.h" #include "printencodings.h" #include "goo/GooString.h" @@ -78,7 +77,6 @@ static GBool printHelp = gFalse; static GBool printEnc = gFalse; static GBool printStructure = gFalse; static GBool printStructureText = gFalse; -static GBool printDests = gFalse; static const ArgDesc argDesc[] = { {"-f", argInt, &firstPage,0, @@ -99,8 +97,6 @@ static const ArgDesc argDesc[] = { "print the dates in ISO-8601 format"}, {"-rawdates", argFlag, &rawDates, 0, "print the undecoded date strings directly from the PDF file"}, - {"-dests", argFlag, &printDests, 0, - "print all named destinations in the PDF"}, {"-enc",argString, textEncName,sizeof(textEncName), "output text encoding name"}, {"-listenc",argFlag, &printEnc, 0, @@ -293,135 +289,6 @@ static void printStruct(const StructElement *element, unsigned indent) { } } -struct RefCompare { - bool operator() (const Ref& lhs, const Ref& rhs) const { -return lhs.num < rhs.num; - } -}; - -struct GooStringCompare { - bool operator() (GooString* lhs, GooString* rhs) const { -return lhs->cmp(const_cast(rhs)) < 0; - } -}; - -static void printLinkDest(LinkDest *dest) { - char buf[100]; - - switch (dest->getKind()) { -case destXYZ: - sprintf(buf, "[ XYZ "); - if (dest->getChangeLeft()) { - sprintf(buf+strlen(buf), "%4.f ", dest->getLeft()); - } else { - strcat(buf, "null "); - } - if (dest->getChangeTop()) { - sprintf(buf+strlen(buf), "%4.f ", dest->getTop()); - } else { - strcat(buf, "null "); - } - if (dest->getChangeZoom()) { - sprintf(buf+strlen(buf), "%4.2f ", dest->getZoom()); - } else { - strcat(buf, "null "); - } - break; -case destFit: - sprintf(buf, "[ Fit "); - break; -case destFitH: - if (dest->getChangeTop()) { - sprintf(buf, "[ FitH %4.f ", dest->getTop()); - } else { - sprintf(buf, "[ FitH null "); - } - break; -case destFitV: - if (dest->getChangeLeft()) { - sprintf(buf, "[ FitV %4.f ", dest->getLeft()); - } else { - strcat(buf, "[ FitV null "); - } - break; -case destFitR: - sprintf(buf, "[ FitR %4.f %4.f %4.f %4.f ", - dest->getLeft(), - de
Re: [poppler] cmake/modules configure.ac utils/pdfinfo.1 utils/pdfinfo.cc
The discussion about C++11 was in my opinion not concluded, i.e. noone contacted the people that [wrongly] use core library about if they can use C+ +11, i'd prefer if you revert the change that needs C++11. Cheers, Albert El dissabte, 17 de setembre de 2016, a les 12:55:19 CEST, Adrian Johnson va escriure: > cmake/modules/PopplerMacros.cmake |2 > configure.ac |1 > utils/pdfinfo.1 |4 + > utils/pdfinfo.cc | 140 > +- 4 files changed, 145 insertions(+), > 2 deletions(-) > > New commits: > commit 183dbf3249e8db2398b63a749eb010bc0a89dc35 > Author: Adrian Johnson > Date: Sat Sep 17 22:08:23 2016 +0930 > > pdfinfo: add -dests option to print named destinations > > Bug 97262 > > diff --git a/cmake/modules/PopplerMacros.cmake > b/cmake/modules/PopplerMacros.cmake index 6cadf40..e9b75b9 100644 > --- a/cmake/modules/PopplerMacros.cmake > +++ b/cmake/modules/PopplerMacros.cmake > @@ -104,7 +104,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) >set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions > -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE > "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align > -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security > -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") > > - set(CMAKE_CXX_FLAGS"-Wnon-virtual-dtor > -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS > "-std=c++11 -Wnon-virtual-dtor -Woverloaded-virtual > ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") >set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG") >set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks > -fno-schedule-insns -fno-inline") diff --git a/configure.ac b/configure.ac > index c4cfc2c..9ce36e1 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -85,6 +85,7 @@ AC_ARG_ENABLE(build-type, >enable_build_type=no) > > if test "x$GCC" = "xyes"; then > +CXXFLAGS="-std=c++11 $CXXFLAGS" > case "$enable_build_type" in > relwithdebinfo) > CFLAGS="-O2 -g $CFLAGS" > diff --git a/utils/pdfinfo.1 b/utils/pdfinfo.1 > index 741219f..b699dff 100644 > --- a/utils/pdfinfo.1 > +++ b/utils/pdfinfo.1 > @@ -113,6 +113,10 @@ Prints dates in ISO-8601 format (including the time > zone). .B \-rawdates > Prints the raw (undecoded) date strings, directly from the PDF file. > .TP > +.B \-dests > +Print a list of all named destinations. If a page range is specified using > "\-f" and "\-l", only +destinations in the page range are listed. > +.TP > .BI \-enc " encoding-name" > Sets the encoding to use for text output. This defaults to "UTF-8". > .TP > diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc > index 9cfdc0f..50e756e 100644 > --- a/utils/pdfinfo.cc > +++ b/utils/pdfinfo.cc > @@ -36,6 +36,7 @@ > #include > #include > #include > +#include > #include "parseargs.h" > #include "printencodings.h" > #include "goo/GooString.h" > @@ -77,6 +78,7 @@ static GBool printHelp = gFalse; > static GBool printEnc = gFalse; > static GBool printStructure = gFalse; > static GBool printStructureText = gFalse; > +static GBool printDests = gFalse; > > static const ArgDesc argDesc[] = { >{"-f", argInt, &firstPage,0, > @@ -97,6 +99,8 @@ static const ArgDesc argDesc[] = { > "print the dates in ISO-8601 format"}, >{"-rawdates", argFlag, &rawDates, 0, > "print the undecoded date strings directly from the PDF file"}, > + {"-dests", argFlag, &printDests, 0, > + "print all named destinations in the PDF"}, >{"-enc",argString, textEncName,sizeof(textEncName), > "output text encoding name"}, >{"-listenc",argFlag, &printEnc, 0, > @@ -289,6 +293,135 @@ static void printStruct(const StructElement *element, > unsigned indent) { } > } > > +struct RefCompare { > + bool operator() (const Ref& lhs, const Ref& rhs) const { > +return lhs.num < rhs.num; > + } > +}; > + > +struct GooStringCompare { > + bool operator() (GooString* lhs, GooString* rhs) const { > +return lhs->cmp(const_cast(rhs)) < 0; > + } > +}; > + > +static void printLinkDest(LinkDest *dest) { > + char buf[100]; > + > + switch (dest->getKind()) { > +case destXYZ: > + sprintf(buf, "[ XYZ "); > + if (dest->getChangeLeft()) { > + sprintf(buf+strlen(buf), "%4.f ", dest->getLeft()); > + } else { > + strcat(buf, "null "); > + } > + if (dest->getChangeTop()) { > + sprintf(buf+strlen(buf), "%4.f ", dest->getTop()); > + } else { > + strcat(buf, "null "); > + } > + if (dest->getChangeZoom()) { > + sprintf(buf+strlen(buf), "%4.2f ", dest->getZoom()); > + } else { > + strcat(buf, "null "); > + } > + break; > +case destFit: > + sprintf(buf, "[ Fit "); > + break; > +case destFit
[poppler] cmake/modules configure.ac utils/pdfinfo.1 utils/pdfinfo.cc
cmake/modules/PopplerMacros.cmake |2 configure.ac |1 utils/pdfinfo.1 |4 + utils/pdfinfo.cc | 140 +- 4 files changed, 145 insertions(+), 2 deletions(-) New commits: commit 183dbf3249e8db2398b63a749eb010bc0a89dc35 Author: Adrian Johnson Date: Sat Sep 17 22:08:23 2016 +0930 pdfinfo: add -dests option to print named destinations Bug 97262 diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 6cadf40..e9b75b9 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -104,7 +104,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") - set(CMAKE_CXX_FLAGS"-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS"-std=c++11 -Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG") set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") diff --git a/configure.ac b/configure.ac index c4cfc2c..9ce36e1 100644 --- a/configure.ac +++ b/configure.ac @@ -85,6 +85,7 @@ AC_ARG_ENABLE(build-type, enable_build_type=no) if test "x$GCC" = "xyes"; then +CXXFLAGS="-std=c++11 $CXXFLAGS" case "$enable_build_type" in relwithdebinfo) CFLAGS="-O2 -g $CFLAGS" diff --git a/utils/pdfinfo.1 b/utils/pdfinfo.1 index 741219f..b699dff 100644 --- a/utils/pdfinfo.1 +++ b/utils/pdfinfo.1 @@ -113,6 +113,10 @@ Prints dates in ISO-8601 format (including the time zone). .B \-rawdates Prints the raw (undecoded) date strings, directly from the PDF file. .TP +.B \-dests +Print a list of all named destinations. If a page range is specified using "\-f" and "\-l", only +destinations in the page range are listed. +.TP .BI \-enc " encoding-name" Sets the encoding to use for text output. This defaults to "UTF-8". .TP diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc index 9cfdc0f..50e756e 100644 --- a/utils/pdfinfo.cc +++ b/utils/pdfinfo.cc @@ -36,6 +36,7 @@ #include #include #include +#include #include "parseargs.h" #include "printencodings.h" #include "goo/GooString.h" @@ -77,6 +78,7 @@ static GBool printHelp = gFalse; static GBool printEnc = gFalse; static GBool printStructure = gFalse; static GBool printStructureText = gFalse; +static GBool printDests = gFalse; static const ArgDesc argDesc[] = { {"-f", argInt, &firstPage,0, @@ -97,6 +99,8 @@ static const ArgDesc argDesc[] = { "print the dates in ISO-8601 format"}, {"-rawdates", argFlag, &rawDates, 0, "print the undecoded date strings directly from the PDF file"}, + {"-dests", argFlag, &printDests, 0, + "print all named destinations in the PDF"}, {"-enc",argString, textEncName,sizeof(textEncName), "output text encoding name"}, {"-listenc",argFlag, &printEnc, 0, @@ -289,6 +293,135 @@ static void printStruct(const StructElement *element, unsigned indent) { } } +struct RefCompare { + bool operator() (const Ref& lhs, const Ref& rhs) const { +return lhs.num < rhs.num; + } +}; + +struct GooStringCompare { + bool operator() (GooString* lhs, GooString* rhs) const { +return lhs->cmp(const_cast(rhs)) < 0; + } +}; + +static void printLinkDest(LinkDest *dest) { + char buf[100]; + + switch (dest->getKind()) { +case destXYZ: + sprintf(buf, "[ XYZ "); + if (dest->getChangeLeft()) { + sprintf(buf+strlen(buf), "%4.f ", dest->getLeft()); + } else { + strcat(buf, "null "); + } + if (dest->getChangeTop()) { + sprintf(buf+strlen(buf), "%4.f ", dest->getTop()); + } else { + strcat(buf, "null "); + } + if (dest->getChangeZoom()) { + sprintf(buf+strlen(buf), "%4.2f ", dest->getZoom()); + } else { + strcat(buf, "null "); + } + break; +case destFit: + sprintf(buf, "[ Fit "); + break; +case destFitH: + if (dest->getChangeTop()) { + sprintf(buf, "[ FitH %4.f ", dest->getTop()); + } else { + sprintf(buf, "[ FitH null "); + } + break; +case destFitV: + if (dest->getChangeLeft()) { + sprintf(buf, "[ FitV %4.f ", dest->getLeft()); + } else { + strcat(buf, "[ FitV null "); + } + break; +case destFitR: + sprintf(buf, "[ FitR %4.f %4.f %4.f %4.f ", + dest->getLeft(), + dest->getBottom(), + dest->getRight(), +
[poppler] cmake/modules configure.ac
cmake/modules/FindGTK.cmake |2 +- configure.ac|4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit b2905a0d299cc09fcd219afe49cb370f6db61c5a Author: Albert Astals Cid Date: Mon Feb 10 20:19:07 2014 +0100 increase gtk3 dependency gtk_tree_view_set_activate_on_single_click was introduced in 3.8 diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake index cb67220..10e2292 100644 --- a/cmake/modules/FindGTK.cmake +++ b/cmake/modules/FindGTK.cmake @@ -15,7 +15,7 @@ include(FindPackageHandleStandardArgs) if (NOT WIN32) find_package(PkgConfig REQUIRED) - pkg_check_modules(GTK3 "gtk+-3.0>=3.0" "gdk-pixbuf-2.0") + pkg_check_modules(GTK3 "gtk+-3.0>=3.8" "gdk-pixbuf-2.0") find_package_handle_standard_args(GTK DEFAULT_MSG GTK3_LIBRARIES GTK3_CFLAGS) diff --git a/configure.ac b/configure.ac index 9d91229..686819b 100644 --- a/configure.ac +++ b/configure.ac @@ -702,9 +702,9 @@ AC_ARG_ENABLE(gtk-test, enable_gtk_test=$enableval, enable_gtk_test="try") if test x$enable_gtk_test = xyes; then - PKG_CHECK_MODULES(GTK_TEST, gtk+-3.0 >= 3.0 gdk-pixbuf-2.0) + PKG_CHECK_MODULES(GTK_TEST, gtk+-3.0 >= 3.8 gdk-pixbuf-2.0) elif test x$enable_gtk_test = xtry; then - PKG_CHECK_MODULES(GTK_TEST, gtk+-3.0 >= 3.0 gdk-pixbuf-2.0, + PKG_CHECK_MODULES(GTK_TEST, gtk+-3.0 >= 3.8 gdk-pixbuf-2.0, [enable_gtk_test="yes"], [enable_gtk_test="no"]) fi ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/PopplerMacros.cmake |1 + 1 file changed, 1 insertion(+) New commits: commit 834cd18e3ddfda44a11316290f7eee98cd871305 Author: Albert Astals Cid Date: Sun Jan 26 16:10:20 2014 +0100 Use c99 for the c compiler diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 27ba7af..6cadf40 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -110,6 +110,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline") set(CMAKE_CXX_FLAGS_PROFILE"-g3 -fno-inline -ftest-coverage -fprofile-arcs") + set(CMAKE_C_FLAGS "-std=c99") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g") set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG") set(CMAKE_C_FLAGS_DEBUG"-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules configure.ac
cmake/modules/PopplerMacros.cmake |5 - configure.ac | 15 --- 2 files changed, 20 deletions(-) New commits: commit c8a845cf7c7752d3b7dad06013d3154812c66c92 Author: Albert Astals Cid Date: Tue Jan 14 20:26:59 2014 +0100 Do not define -ansi We are using long long that is not defined in ansi, so forcing ansi strictness does not make any sense. Bug #72499 diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 04dfc46..27ba7af 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -116,11 +116,6 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_C_FLAGS_DEBUGFULL"-g3 -fno-inline") set(CMAKE_C_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs") - if(CMAKE_SYSTEM_NAME MATCHES Linux) -set(DEFAULT_COMPILE_WARNINGS_YES "${DEFAULT_COMPILE_WARNINGS_YES} -ansi") -set(DEFAULT_COMPILE_WARNINGS_KDE "${DEFAULT_COMPILE_WARNINGS_KDE} -ansi") - endif(CMAKE_SYSTEM_NAME MATCHES Linux) - poppler_check_link_flag("-Wl,--as-needed" GCC_HAS_AS_NEEDED) if(GCC_HAS_AS_NEEDED) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed") diff --git a/configure.ac b/configure.ac index 9c5c7ee..9d91229 100644 --- a/configure.ac +++ b/configure.ac @@ -25,21 +25,6 @@ AC_PROG_CC_STDC # CXX="gcc" #fi AC_PROG_CXX -if test "x$GXX" = "xyes"; then - case "$host_os" in -cygwin* | mingw*) -;; -*) - case "${CXXFLAGS}" in - *-std=*) -;; - *) -CXXFLAGS="$CXXFLAGS -ansi" -;; - esac -;; - esac -fi AC_PROG_INSTALL dnl # Check for pkgconfig ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules glib/demo test/CMakeLists.txt
cmake/modules/FindGTK.cmake |8 glib/demo/CMakeLists.txt|6 +++--- test/CMakeLists.txt |6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) New commits: commit 892e486addcbcad619613c7be1ca692a0d36d6e5 Author: Albert Astals Cid Date: Mon May 21 20:28:42 2012 +0200 Compile++ diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake index 4d66bd3..1a32483 100644 --- a/cmake/modules/FindGTK.cmake +++ b/cmake/modules/FindGTK.cmake @@ -2,8 +2,8 @@ # Once done this will define # # GTK_FOUND - system has GTK -# GTK2_CFLAGS - the GTK CFlags -# GTK2_LIBRARIES - Link these to use GTK +# GTK3_CFLAGS - the GTK CFlags +# GTK3_LIBRARIES - Link these to use GTK # # Copyright 2008-2010 Pino Toscano, # @@ -15,8 +15,8 @@ include(FindPackageHandleStandardArgs) if (NOT WIN32) find_package(PkgConfig REQUIRED) - pkg_check_modules(GTK2 "gtk+-2.0>=2.14" "gdk-pixbuf-2.0" "gthread-2.0" "gio-2.0") + pkg_check_modules(GTK3 "gtk+-3.0>=3.0" "gdk-pixbuf-2.0" "gthread-2.0" "gio-2.0") - find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS) + find_package_handle_standard_args(GTK DEFAULT_MSG GTK3_LIBRARIES GTK3_CFLAGS) endif(NOT WIN32) diff --git a/glib/demo/CMakeLists.txt b/glib/demo/CMakeLists.txt index 286fbd7..316371e 100644 --- a/glib/demo/CMakeLists.txt +++ b/glib/demo/CMakeLists.txt @@ -1,8 +1,8 @@ include_directories( - ${GTK2_INCLUDE_DIRS} + ${GTK3_INCLUDE_DIRS} ) -add_definitions(${GTK2_CFLAGS_OTHER}) +add_definitions(${GTK3_CFLAGS_OTHER}) set(poppler_glib_demo_SRCS main.c @@ -25,4 +25,4 @@ set(poppler_glib_demo_SRCS selections.c ) poppler_add_test(poppler-glib-demo BUILD_GTK_TESTS ${poppler_glib_demo_SRCS}) -target_link_libraries(poppler-glib-demo poppler-glib ${GTK2_LIBRARIES}) +target_link_libraries(poppler-glib-demo poppler-glib ${GTK3_LIBRARIES}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index cff715c..178b15e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,7 +17,7 @@ endif (ENABLE_SPLASH) if (GTK_FOUND) - add_definitions(${GTK2_CFLAGS}) + add_definitions(${GTK3_CFLAGS}) include_directories( ${CMAKE_SOURCE_DIR}/glib @@ -28,7 +28,7 @@ if (GTK_FOUND) gtk-test.cc ) poppler_add_test(gtk-test BUILD_GTK_TESTS ${gtk_splash_test_SRCS}) - target_link_libraries(gtk-test poppler-glib ${GTK2_LIBRARIES}) + target_link_libraries(gtk-test poppler-glib ${GTK3_LIBRARIES}) if (HAVE_CAIRO) @@ -36,7 +36,7 @@ if (GTK_FOUND) pdf-inspector.cc ) poppler_add_test(pdf-inspector BUILD_GTK_TESTS ${pdf_inspector_SRCS}) -target_link_libraries(pdf-inspector poppler-glib ${GTK2_LIBRARIES}) +target_link_libraries(pdf-inspector poppler-glib ${GTK3_LIBRARIES}) endif (HAVE_CAIRO) ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/FindLIBOPENJPEG.cmake |3 +++ 1 file changed, 3 insertions(+) New commits: commit f69f41056fc8cd8a70b38024f255e9074af20bdc Author: Pino Toscano Date: Tue Mar 20 15:18:33 2012 +0100 cmake: reset CMAKE_REQUIRED_INCLUDES/CMAKE_REQUIRED_LIBRARIES diff --git a/cmake/modules/FindLIBOPENJPEG.cmake b/cmake/modules/FindLIBOPENJPEG.cmake index ab1721d..d9c1369 100644 --- a/cmake/modules/FindLIBOPENJPEG.cmake +++ b/cmake/modules/FindLIBOPENJPEG.cmake @@ -39,6 +39,9 @@ int main() } " WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG) + set(CMAKE_REQUIRED_INCLUDES) + set(CMAKE_REQUIRED_LIBRARIES) + set(LIBOPENJPEG_FOUND TRUE) endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES) ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules config.h.cmake configure.ac poppler/JPEG2000Stream.cc
cmake/modules/FindLIBOPENJPEG.cmake | 13 + config.h.cmake |3 +++ configure.ac|8 poppler/JPEG2000Stream.cc |7 ++- 4 files changed, 30 insertions(+), 1 deletion(-) New commits: commit cbe7131e63c5896010e7e1ad5c0c3aa91611704d Author: Albert Astals Cid Date: Fri Jan 27 00:36:18 2012 +0100 Set OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG if you have it Fixes/workarounds bug 43414 with openjpeg 1.5 (unreleased) (cherry picked from commit de6415af1a39ec7dfa4f149c6c5e311b86352cec) diff --git a/cmake/modules/FindLIBOPENJPEG.cmake b/cmake/modules/FindLIBOPENJPEG.cmake index 978ee7d..ab1721d 100644 --- a/cmake/modules/FindLIBOPENJPEG.cmake +++ b/cmake/modules/FindLIBOPENJPEG.cmake @@ -26,6 +26,19 @@ else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR) find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg) find_library(LIBOPENJPEG_LIBRARIES openjpeg) if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES) + + set(CMAKE_REQUIRED_INCLUDES ${LIBOPENJPEG_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${LIBOPENJPEG_LIBRARIES}) + +check_cxx_source_compiles(" +#include +int main() +{ + int foo = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG; + return 0; +} +" WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG) + set(LIBOPENJPEG_FOUND TRUE) endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES) diff --git a/config.h.cmake b/config.h.cmake index cae2e71..7dcb1f7 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -189,6 +189,9 @@ /* Use win32 font configuration backend */ #cmakedefine WITH_FONTCONFIGURATION_WIN32 1 +/* OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag */ +#cmakedefine WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG 1 + /* Define to 1 if the X Window System is missing or not being used. */ /* #undef X_DISPLAY_MISSING */ diff --git a/configure.ac b/configure.ac index 5b1d04a..3ab6609 100644 --- a/configure.ac +++ b/configure.ac @@ -171,6 +171,14 @@ if test x$enable_libopenjpeg = xyes; then LIBOPENJPEG_LIBS="-lopenjpeg" AC_SUBST(LIBOPENJPEG_LIBS) AC_DEFINE(ENABLE_LIBOPENJPEG) + AC_TRY_COMPILE([ +#include +], [ + int foo = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG; +], have_openjpeg_flag="yes", am_cv_proto_iconv_arg1="no") + if test x$have_openjpeg_flag = xyes; then +AC_DEFINE(WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG, 1, [OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag.]) + fi fi AM_CONDITIONAL(BUILD_LIBOPENJPEG, test x$enable_libopenjpeg = xyes) diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc index b7a29bf..5ea6406 100644 --- a/poppler/JPEG2000Stream.cc +++ b/poppler/JPEG2000Stream.cc @@ -4,7 +4,7 @@ // // A JPX stream decoder using OpenJPEG // -// Copyright 2008-2010 Albert Astals Cid +// Copyright 2008-2010, 2012 Albert Astals Cid // Copyright 2011 Daniel Glöckner // // Licensed under GPLv2 or later @@ -13,6 +13,8 @@ #include "JPEG2000Stream.h" +#include "config.h" + JPXStream::JPXStream(Stream *strA) : FilterStream(strA) { inited = gFalse; @@ -127,6 +129,9 @@ void JPXStream::init2(unsigned char *buf, int bufLen, OPJ_CODEC_FORMAT format) /* Use default decompression parameters */ opj_dparameters_t parameters; opj_set_default_decoder_parameters(¶meters); +#ifdef WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG + parameters.flags = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG; +#endif /* Configure the event manager to receive errors and warnings */ opj_event_mgr_t event_mgr; ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/MacroOptionalFindPackage.cmake | 40 --- 1 file changed, 30 insertions(+), 10 deletions(-) New commits: commit 71ec4c7a6715a40d536d1e4b911dae48d1bba7b9 Author: Pino Toscano Date: Sun Oct 17 14:57:43 2010 +0200 [CMake] update MacroOptionalFindPackage.cmake from KDE SVN no radical changes, just a minor improvement for the "explicitly disabled" case diff --git a/cmake/modules/MacroOptionalFindPackage.cmake b/cmake/modules/MacroOptionalFindPackage.cmake index 816cdb7..d4ed48e 100644 --- a/cmake/modules/MacroOptionalFindPackage.cmake +++ b/cmake/modules/MacroOptionalFindPackage.cmake @@ -7,22 +7,42 @@ # The standard _FOUND variables can be used in the same way # as when using the normal FIND_PACKAGE() -# Copyright (c) 2006, Alexander Neundorf, +# Copyright (c) 2006-2010 Alexander Neundorf, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# This is just a helper macro to set a bunch of variables empty. +# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both: +macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var) + if(DEFINED ${_name}_${_var}) + set(${_name}_${_var} "") + endif(DEFINED ${_name}_${_var}) -MACRO (MACRO_OPTIONAL_FIND_PACKAGE _name ) - OPTION(WITH_${_name} "Search for ${_name} package" ON) + string(TOUPPER ${_name} _nameUpper) + if(DEFINED ${_nameUpper}_${_var}) + set(${_nameUpper}_${_var} "") + endif(DEFINED ${_nameUpper}_${_var}) +endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var) + + +macro (MACRO_OPTIONAL_FIND_PACKAGE _name ) + option(WITH_${_name} "Search for ${_name} package" ON) if (WITH_${_name}) - FIND_PACKAGE(${_name} ${ARGN}) + find_package(${_name} ${ARGN}) else (WITH_${_name}) - set(${_name}_FOUND) - set(${_name}_INCLUDE_DIR) - set(${_name}_INCLUDES) - set(${_name}_LIBRARY) - set(${_name}_LIBRARIES) + string(TOUPPER ${_name} _nameUpper) + set(${_name}_FOUND FALSE) + set(${_nameUpper}_FOUND FALSE) + + _mofp_set_empty_if_defined(${_name} INCLUDE_DIRS) + _mofp_set_empty_if_defined(${_name} INCLUDE_DIR) + _mofp_set_empty_if_defined(${_name} INCLUDES) + _mofp_set_empty_if_defined(${_name} LIBRARY) + _mofp_set_empty_if_defined(${_name} LIBRARIES) + _mofp_set_empty_if_defined(${_name} LIBS) + _mofp_set_empty_if_defined(${_name} FLAGS) + _mofp_set_empty_if_defined(${_name} DEFINITIONS) endif (WITH_${_name}) -ENDMACRO (MACRO_OPTIONAL_FIND_PACKAGE) +endmacro (MACRO_OPTIONAL_FIND_PACKAGE) ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/PopplerMacros.cmake |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 87128ab0dfec6be1a034361512ee41301b078831 Author: Maciej Mrozowski Date: Thu May 27 17:31:00 2010 +0200 [CMake] Do not force -O2, preserve compiler flags instead. diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index e6b1efc..9b4ae13 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -102,9 +102,9 @@ if(CMAKE_COMPILER_IS_GNUCXX) # set the default compile warnings set(DEFAULT_COMPILE_WARNINGS_NO) set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wno-write-strings") - set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") + set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") - set(CMAKE_CXX_FLAGS"-Wnon-virtual-dtor -Woverloaded-virtual") + set(CMAKE_CXX_FLAGS"-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG") set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules config.h.cmake
cmake/modules/FindCairo.cmake | 18 -- config.h.cmake|3 --- 2 files changed, 21 deletions(-) New commits: commit cbb7519904d9b6395d0128e16a79324e4b8bfcc0 Author: Pino Toscano Date: Mon Feb 22 13:15:11 2010 +0100 [CMake] no more need to build system check for the Cairo blend modes followup of 880890c14e99a954b365a3a6b59deeffa5304d30 for the cmake build system diff --git a/cmake/modules/FindCairo.cmake b/cmake/modules/FindCairo.cmake index ccf8208..a0a8400 100644 --- a/cmake/modules/FindCairo.cmake +++ b/cmake/modules/FindCairo.cmake @@ -37,24 +37,6 @@ if (NOT WIN32) endif(NOT WIN32) -if (CAIRO_FOUND) - include(MacroPushRequiredVars) - include(CheckCSourceCompiles) - - macro_push_required_vars() - set(CMAKE_REQUIRED_DEFINITIONS ${CAIRO_CFLAGS}) - set(CMAKE_REQUIRED_LIBRARIES ${CAIRO_LIBRARIES}) - check_c_source_compiles(" -#include -int main() { - cairo_t *cr; - cairo_set_operator(cr, CAIRO_OPERATOR_MULTIPLY); - return 0; -} -" CAIRO_HAS_BLEND_MODES) - macro_pop_required_vars() -endif (CAIRO_FOUND) - mark_as_advanced( CAIRO_CFLAGS CAIRO_LIBRARIES diff --git a/config.h.cmake b/config.h.cmake index ec12045..1253549 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,8 +1,5 @@ /* config.h. Generated from config.h.cmake by cmake. */ -/* Whether cairo has blend modes support */ -#cmakedefine CAIRO_HAS_BLEND_MODES 1 - /* Use libjpeg instead of builtin jpeg decoder. */ #cmakedefine ENABLE_LIBJPEG 1 ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/FindGTK.cmake |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 30e5f76e372114339fa1d37c335e6bbade8b6d8a Author: Pino Toscano Date: Thu Jan 7 11:18:36 2010 +0100 [CMake] followup recent glib/gtk+ version requirements - glib to 2.18, see ce9404b1999f81b3f9e5a89bcd6e715463f89024 - gtk+ to 2.14, see e338643f2cebb1203f7ff0646f87b3dea8318757 diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake index c751d3a..0ec29f0 100644 --- a/cmake/modules/FindGTK.cmake +++ b/cmake/modules/FindGTK.cmake @@ -20,14 +20,14 @@ if (NOT WIN32) set (GLIB_FOUND FALSE) if (_LibGLIB2IncDir) -exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.6 glib-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull) +exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.18 glib-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull) if(_return_VALUE STREQUAL "0") set(_glib_FOUND TRUE) endif(_return_VALUE STREQUAL "0") endif (_LibGLIB2IncDir) if (_LibGDK2IncDir) -exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.4.0 gdk-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull) +exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.14 gdk-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull) if(_return_VALUE STREQUAL "0") set(_gdk_FOUND TRUE) endif(_return_VALUE STREQUAL "0") @@ -51,7 +51,7 @@ if (NOT WIN32) pkgconfig(gthread-2.0 _LibGThread2IncDir _LibGThread2LinkDir GThread2LinkFlags GThread2Cflags) if (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGThread2IncDir) -exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.8.0 gtk+-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull) +exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.14 gtk+-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull) if(_return_VALUE STREQUAL "0") set(_gtk_FOUND TRUE) endif(_return_VALUE STREQUAL "0") ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules configure.ac utils/parseargs.c utils/parseargs.h
cmake/modules/PopplerMacros.cmake |2 +- configure.ac |2 +- utils/parseargs.c | 30 +++--- utils/parseargs.h | 26 +- 4 files changed, 30 insertions(+), 30 deletions(-) New commits: commit f346c1f6b55f87ebd6bb0b0932462d5514aa40ff Author: Albert Astals Cid Date: Fri Oct 9 00:29:06 2009 +0200 add -ansi flag to default warnings diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 239b6f3..a421f60 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -88,7 +88,7 @@ endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) if(CMAKE_COMPILER_IS_GNUCXX) # set the default compile warnings set(DEFAULT_COMPILE_WARNINGS_NO) - set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wno-write-strings") + set(DEFAULT_COMPILE_WARNINGS_YES "-ansi -Wall -Wno-write-strings") set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") set(CMAKE_CXX_FLAGS"-Wnon-virtual-dtor -Woverloaded-virtual") diff --git a/configure.ac b/configure.ac index 2beb096..13d492a 100644 --- a/configure.ac +++ b/configure.ac @@ -511,7 +511,7 @@ if test "x$GCC" != xyes; then fi case "$enable_compile_warnings" in no) ;; - yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor $CXXFLAGS" ;; + yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -ansi $CXXFLAGS" ;; kde) CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi \ -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align \ -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith \ diff --git a/utils/parseargs.c b/utils/parseargs.c index 8e84a9b..c5f3007 100644 --- a/utils/parseargs.c +++ b/utils/parseargs.c @@ -6,21 +6,21 @@ * Copyright 1996-2003 Glyph & Cog, LLC */ -// -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// Poppler project changes to this file are under the GPLv2 or later license -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008, 2009 Albert Astals Cid -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -// +/* + + Modified under the Poppler project - http://poppler.freedesktop.org + + Poppler project changes to this file are under the GPLv2 or later license + + All changes made under the Poppler project to this file are licensed + under GPL version 2 or later + + Copyright (C) 2008, 2009 Albert Astals Cid + + To see a description of the changes please see the Changelog file that + came with your tarball or type make ChangeLog if you are building from git + +*/ #include #include diff --git a/utils/parseargs.h b/utils/parseargs.h index 4418421..410dcc4 100644 --- a/utils/parseargs.h +++ b/utils/parseargs.h @@ -6,19 +6,19 @@ * Copyright 1996-2003 Glyph & Cog, LLC */ -// -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Albert Astals Cid -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -// +/* + + Modified under the Poppler project - http://poppler.freedesktop.org + + All changes made under the Poppler project to this file are licensed + under GPL version 2 or later + + Copyright (C) 2008 Albert Astals Cid + + To see a description of the changes please see the Changelog file that + came with your tarball or type make ChangeLog if you are building from git + +*/ #ifndef PARSEARGS_H #define PARSEARGS_H ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/FindGTK.cmake |9 - 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit d42b9425fb2f98fa79e7a60e4f71ef14f5bacfe9 Author: Albert Astals Cid Date: Sun Jul 12 19:55:14 2009 +0200 glade is not used anymore diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake index b152c21..c751d3a 100644 --- a/cmake/modules/FindGTK.cmake +++ b/cmake/modules/FindGTK.cmake @@ -50,21 +50,20 @@ if (NOT WIN32) pkgconfig(gdk-pixbuf-2.0 _LibGDK2PixbufIncDir _LibGDK2PixbufLinkDir GDK2PixbufLinkFlags GDK2PixbufCflags) pkgconfig(gthread-2.0 _LibGThread2IncDir _LibGThread2LinkDir GThread2LinkFlags GThread2Cflags) - if (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGLADE2IncDir AND _LibGThread2IncDir) - + if (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGThread2IncDir) exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.8.0 gtk+-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull) if(_return_VALUE STREQUAL "0") set(_gtk_FOUND TRUE) endif(_return_VALUE STREQUAL "0") if (_gtk_FOUND) - set (GTK2_CFLAGS ${GTK2Cflags} ${GDK2PixbufCflags} ${GLADE2Cflags} ${GThread2Cflags}) - set (GTK2_LIBRARIES ${GTK2LinkFlags} ${GDK2PixbufLinkFlags} ${GLADE2LinkFlags} ${GThread2LinkFlags}) + set (GTK2_CFLAGS ${GTK2Cflags} ${GDK2PixbufCflags} ${GThread2Cflags}) + set (GTK2_LIBRARIES ${GTK2LinkFlags} ${GDK2PixbufLinkFlags} ${GThread2LinkFlags}) endif (_gtk_FOUND) find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS) - endif (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGLADE2IncDir AND _LibGThread2IncDir) + endif (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGThread2IncDir) endif(NOT WIN32) ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules configure.ac test/Makefile.am test/pdf-inspector.cc test/pdf-inspector.glade test/pdf-inspector.ui
cmake/modules/FindGTK.cmake |1 configure.ac|4 test/Makefile.am|2 test/pdf-inspector.cc | 34 ++- test/pdf-inspector.glade| 434 test/pdf-inspector.ui | 416 ++ 6 files changed, 439 insertions(+), 452 deletions(-) New commits: commit dcc3c384919f1562b8f312ad3ac847e23f3e83ab Author: Sebastien Bacher Date: Wed Jul 1 10:09:12 2009 +0200 [test] Use gtkbuilder rather than libglade Fixes bug #21673 diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake index b934cf0..b152c21 100644 --- a/cmake/modules/FindGTK.cmake +++ b/cmake/modules/FindGTK.cmake @@ -48,7 +48,6 @@ if (NOT WIN32) pkgconfig(gtk+-2.0 _LibGTK2IncDir _LibGTK2LinkDir GTK2LinkFlags GTK2Cflags) pkgconfig(gdk-pixbuf-2.0 _LibGDK2PixbufIncDir _LibGDK2PixbufLinkDir GDK2PixbufLinkFlags GDK2PixbufCflags) - pkgconfig(libglade-2.0 _LibGLADE2IncDir _LibGLADE2LinkDir GLADE2LinkFlags GLADE2Cflags) pkgconfig(gthread-2.0 _LibGThread2IncDir _LibGThread2LinkDir GThread2LinkFlags GThread2Cflags) if (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGLADE2IncDir AND _LibGThread2IncDir) diff --git a/configure.ac b/configure.ac index 0bebbf9..e7db018 100644 --- a/configure.ac +++ b/configure.ac @@ -420,9 +420,9 @@ AC_ARG_ENABLE(gtk-test, enable_gtk_test=$enableval, enable_gtk_test="try") if test x$enable_gtk_test = xyes; then - PKG_CHECK_MODULES(GTK_TEST, gtk+-2.0 >= 2.8.0 gdk-pixbuf-2.0 libglade-2.0 gthread-2.0) + PKG_CHECK_MODULES(GTK_TEST, gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0) elif test x$enable_gtk_test = xtry; then - PKG_CHECK_MODULES(GTK_TEST, gtk+-2.0 >= 2.8.0 gdk-pixbuf-2.0 libglade-2.0 gthread-2.0, + PKG_CHECK_MODULES(GTK_TEST, gtk+-2.0 >= 2.12 gdk-pixbuf-2.0 gthread-2.0, [enable_gtk_test="yes"], [enable_gtk_test="no"]) fi diff --git a/test/Makefile.am b/test/Makefile.am index 8c873d3..38bf72d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -94,4 +94,4 @@ pdf_fullrewrite_LDADD = \ EXTRA_DIST = \ pdf-operators.c \ - pdf-inspector.glade + pdf-inspector.ui diff --git a/test/pdf-inspector.cc b/test/pdf-inspector.cc index ce09757..24bebbd 100644 --- a/test/pdf-inspector.cc +++ b/test/pdf-inspector.cc @@ -29,7 +29,6 @@ #include "GlobalParams.h" #include "ErrorCodes.h" #include -#include // Mapping @@ -60,7 +59,7 @@ private: static void on_selection_changed (GtkTreeSelection *selection, PdfInspector *inspector); static void on_analyze_clicked (GtkWidget *widget, PdfInspector *inspector); - GladeXML *xml; + GtkBuilder* builder; GtkTreeModel *model; PDFDoc *doc; CairoOutputDev *output; @@ -71,17 +70,24 @@ private: PdfInspector::PdfInspector(void) { GtkWidget *widget; + GError* error = NULL; + + builder = gtk_builder_new (); - xml = glade_xml_new ("./pdf-inspector.glade", NULL, NULL); + if (!gtk_builder_add_from_file (builder, "./pdf-inspector.ui", &error)) + { +g_warning ("Couldn't load builder file: %s", error->message); +g_error_free (error); + } - widget = glade_xml_get_widget (xml, "pdf_file_chooser_button"); + widget = GTK_WIDGET (gtk_builder_get_object (builder, "pdf_file_chooser_button")); g_signal_connect (widget, "selection-changed", G_CALLBACK (on_file_activated), this); - widget = glade_xml_get_widget (xml, "analyze_button"); + widget = GTK_WIDGET (gtk_builder_get_object (builder, "analyze_button")); g_signal_connect (widget, "clicked", G_CALLBACK (on_analyze_clicked), this); // setup the TreeView - widget = glade_xml_get_widget (xml, "pdf_tree_view"); + widget = GTK_WIDGET (gtk_builder_get_object (builder, "pdf_tree_view")); g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (widget)), "changed", G_CALLBACK (on_selection_changed), this); model = (GtkTreeModel *)gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT, @@ -136,7 +142,7 @@ PdfInspector::set_file_name(const char *file_name) { GtkWidget *widget; - widget = glade_xml_get_widget (xml, "pdf_file_chooser_button"); + widget = GTK_WIDGET (gtk_builder_get_object (builder, "pdf_file_chooser_button")); gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), file_name); } @@ -161,7 +167,7 @@ PdfInspector::on_selection_changed (GtkTreeSelection *selection, PdfInspector *i GtkTreeIter iter; gchar *op = NULL; - label = glade_xml_get_widget (inspector->xml, "description_label"); + label = GTK_WIDGET (gtk_builder_get_object (inspector->builder, "description_label")); gtk_label_set_markup (GTK_LABEL (label), "No Description"); if (gtk_tree_selection_get_selected (selection, &model, &iter)) @@ -197,7 +203,7 @@ PdfInspector::on_analyze_clicked (GtkWidget *widget, PdfInspector *inspector)
[poppler] cmake/modules
cmake/modules/FindLIBOPENJPEG.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 401632e4eeb4b10b1183a820f32461da77e8e4f2 Author: Albert Astals Cid Date: Fri Dec 12 00:14:04 2008 +0100 Try harder to look for openjpeg diff --git a/cmake/modules/FindLIBOPENJPEG.cmake b/cmake/modules/FindLIBOPENJPEG.cmake index 973aa16..978ee7d 100644 --- a/cmake/modules/FindLIBOPENJPEG.cmake +++ b/cmake/modules/FindLIBOPENJPEG.cmake @@ -23,7 +23,7 @@ else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR) set(LIBOPENJPEG_LIBRARIES) set(LIBOPENJPEG_INCLUDE_DIR) - find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h) + find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg) find_library(LIBOPENJPEG_LIBRARIES openjpeg) if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES) set(LIBOPENJPEG_FOUND TRUE) ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/FindGTK.cmake |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit 0480a788c0f25af1bc09360b599debb37f831e10 Author: Albert Astals Cid <[EMAIL PROTECTED]> Date: Tue May 27 23:20:32 2008 +0200 require gthread-2.0 diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake index 0e90bd1..b934cf0 100644 --- a/cmake/modules/FindGTK.cmake +++ b/cmake/modules/FindGTK.cmake @@ -49,8 +49,9 @@ if (NOT WIN32) pkgconfig(gtk+-2.0 _LibGTK2IncDir _LibGTK2LinkDir GTK2LinkFlags GTK2Cflags) pkgconfig(gdk-pixbuf-2.0 _LibGDK2PixbufIncDir _LibGDK2PixbufLinkDir GDK2PixbufLinkFlags GDK2PixbufCflags) pkgconfig(libglade-2.0 _LibGLADE2IncDir _LibGLADE2LinkDir GLADE2LinkFlags GLADE2Cflags) + pkgconfig(gthread-2.0 _LibGThread2IncDir _LibGThread2LinkDir GThread2LinkFlags GThread2Cflags) - if (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGLADE2IncDir) + if (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGLADE2IncDir AND _LibGThread2IncDir) exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.8.0 gtk+-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull) if(_return_VALUE STREQUAL "0") @@ -58,13 +59,13 @@ if (NOT WIN32) endif(_return_VALUE STREQUAL "0") if (_gtk_FOUND) - set (GTK2_CFLAGS ${GTK2Cflags} ${GDK2PixbufCflags} ${GLADE2Cflags}) - set (GTK2_LIBRARIES ${GTK2LinkFlags} ${GDK2PixbufLinkFlags} ${GLADE2LinkFlags}) + set (GTK2_CFLAGS ${GTK2Cflags} ${GDK2PixbufCflags} ${GLADE2Cflags} ${GThread2Cflags}) + set (GTK2_LIBRARIES ${GTK2LinkFlags} ${GDK2PixbufLinkFlags} ${GLADE2LinkFlags} ${GThread2LinkFlags}) endif (_gtk_FOUND) find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS) - endif (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGLADE2IncDir) + endif (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGLADE2IncDir AND _LibGThread2IncDir) endif(NOT WIN32) ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler
[poppler] cmake/modules
cmake/modules/PopplerMacros.cmake |4 1 file changed, 4 insertions(+) New commits: commit ecabc9469b137e8251344e5502de1cbf875223b9 Author: Pino Toscano <[EMAIL PROTECTED]> Date: Thu Jan 31 00:20:55 2008 +0100 Set RelWithDebInfo as default build type, if not specified. diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index f2a5290..a0a7c27 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -81,6 +81,10 @@ if(WIN32) "${CMAKE_INSTALL_PREFIX}/bin" ) endif(WIN32) +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE RelWithDebInfo) +endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + if(CMAKE_COMPILER_IS_GNUCXX) # set the default compile warnings set(DEFAULT_COMPILE_WARNINGS_NO) ___ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler