<pre style='margin:0'>
Michael Dickens (michaelld) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/a7bb7220d55fb1c5385b88cce11deb6b1a249ea1">https://github.com/macports/macports-ports/commit/a7bb7220d55fb1c5385b88cce11deb6b1a249ea1</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit a7bb7220d55fb1c5385b88cce11deb6b1a249ea1
</span>Author: Michael Dickens <michaelld@macports.org>
AuthorDate: Wed Oct 14 12:17:00 2020 -0400
<span style='display:block; white-space:pre;color:#404040;'> poppler: various fixes for better macOS / MacPorts building
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/58574
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/61316
</span>---
graphics/poppler/Portfile | 29 ++++++++---
graphics/poppler/files/patch-327a7ce0.diff | 57 ++++++++++++++++++++++
.../patch-cmake_modules_PopplerMacros.cmake.diff | 11 +++++
...h-glib_CMakeFiles.txt-fix-include-ordering.diff | 33 +++++++++++++
4 files changed, 122 insertions(+), 8 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/poppler/Portfile b/graphics/poppler/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 45388f1a486..ec4fd20fc42 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/poppler/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/poppler/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,14 +1,13 @@
</span> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-PortGroup conflicts_build 1.0
</span> PortGroup gobject_introspection 1.0
PortGroup cmake 1.1
PortGroup legacysupport 1.0
name poppler
version 20.10.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span>
conflicts xpdf-tools
license GPL-2+
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -53,12 +52,14 @@ depends_lib-append port:bzip2 \
</span> # libraries are used instead of any already-installed ones.
configure.ldflags-delete -L${prefix}/lib
configure.cppflags-delete -I${prefix}/include
<span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.cpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.library_path
</span>
configure.ldflags-append -liconv
gobject_introspection yes
compiler.cxx_standard 2014
<span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.cxxflags-append -std=c++14
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.c_standard 1999
</span> compiler.thread_local_storage yes
patchfiles-append patch-check-boost.diff
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -69,6 +70,16 @@ patchfiles-append patch-bug106417.diff
</span> # https://trac.macports.org/ticket/57167
patchfiles-append patch-trac-57167.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# upstream fix; remove at next release
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-327a7ce0.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# match clang, not streual
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-cmake_modules_PopplerMacros.cmake.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# fix header include path ordering for gobject-introspection call to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# be source / build first, then system, as best can be determined
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-glib_CMakeFiles.txt-fix-include-ordering.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> configure.args-append \
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
-DENABLE_QT5=OFF \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -80,6 +91,13 @@ configure.args-append \
</span> -DWITH_NSS3=ON \
-DUSE_BOOST_HEADERS=OFF
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Poppler cmake doesn't understand build type "MacPorts"; use release unless +debug is set
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[variant_isset debug]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cmake.build_type Debug
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cmake.build_type Release
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> variant boost description "Use Boost when building the Splash graphics backend" {
depends_build-append port:boost
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -115,7 +133,6 @@ if {${subport} ne ${name}} {
</span> system -W ${workpath} "${prefix}/bin/git clone --depth=1 https://anongit.freedesktop.org/git/poppler/test"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # currently poppler only provides unit tests for the Qt wrappers
test.run yes
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -135,10 +152,6 @@ if {${subport} ne ${name}} {
</span> ${destroot}${prefix}/lib/pkgconfig/poppler-splash.pc \
${destroot}${prefix}/lib/pkgconfig/poppler.pc
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-} else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # generation of Poppler-0.18.gir fails if previous version of poppler is active
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # and new symbols are introduced, appropriate for main poppler port only
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- conflicts_build ${name}
</span> }
livecheck.type regex
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/poppler/files/patch-327a7ce0.diff b/graphics/poppler/files/patch-327a7ce0.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..5cb9313e693
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/poppler/files/patch-327a7ce0.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,57 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- glib/CMakeLists.txt.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ glib/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -126,30 +126,38 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # GObject Introspection
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (HAVE_INTROSPECTION AND BUILD_SHARED_LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ include(GObjectIntrospectionMacros)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # General gir: Reset object-list for introspection & load tool args
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(INTROSPECTION_GIRS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR} --warn-all")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(INTROSPECTION_SCANNER_ARGS "--library-path=${CMAKE_CURRENT_BINARY_DIR}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}" "--warn-all")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ list(APPEND INTROSPECTION_SCANNER_ARGS "--library-path=${CMAKE_CURRENT_BINARY_DIR}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(INTROSPECTION_COMPILER_ARGS "--includedir=${CMAKE_CURRENT_SOURCE_DIR}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(introspection_files ${poppler_glib_SRCS} ${poppler_glib_public_headers})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Poppler: Assign package to gir & export keys
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(Poppler_0_18_gir "poppler-glib")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(Poppler_0_18_gir_INCLUDES GObject-2.0 Gio-2.0 cairo-1.0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(Poppler_0_18_gir_EXPORT_PACKAGES "poppler-glib")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Then load library and header lists
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(Poppler_0_18_gir_LIBS "poppler-glib" "poppler")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(Poppler_0_18_gir_INCLUDES "GObject-2.0" "Gio-2.0" "cairo-1.0")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Format list of include directories as compiler flags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ get_directory_property(_tmp_includes INCLUDE_DIRECTORIES)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _list_prefix(_includes _tmp_includes "-I")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # And set flags for gir compiler and scanner
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(Poppler_0_18_gir_CFLAGS ${_includes} -L${CMAKE_BINARY_DIR} -L${CMAKE_CURRENT_BINARY_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(Poppler_0_18_gir_LIBS poppler-glib poppler)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _list_prefix(_abs_introspection_files introspection_files "${CMAKE_CURRENT_SOURCE_DIR}/")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- list(APPEND _abs_introspection_files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ${CMAKE_CURRENT_BINARY_DIR}/poppler-features.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(Poppler_0_18_gir_FILES ${_abs_introspection_files})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(Poppler_0_18_gir_SCANNERFLAGS --c-include poppler.h)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(Poppler_0_18_gir_EXPORT_PACKAGES poppler-glib)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(Poppler_0_18_gir_SCANNERFLAGS "--c-include=poppler.h")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Load temporary source-file lists, including a few generated at build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(orig_introspect_srcs ${poppler_glib_SRCS} ${poppler_glib_public_headers})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(gen_introspect_srcs "poppler-enums.c" "poppler-enums.h" "poppler-features.h")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Prefix the files with their correct directories for full paths
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _list_prefix(_orig_introspect_paths orig_introspect_srcs "${CMAKE_CURRENT_SOURCE_DIR}/")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _list_prefix(_gen_introspect_paths gen_introspect_srcs "${CMAKE_CURRENT_BINARY_DIR}/")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Now load them to the final file list
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(Poppler_0_18_gir_FILES ${_orig_introspect_paths} ${_gen_introspect_paths})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Finally, load the list of objects for introspection & invoke macro
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ list(APPEND INTROSPECTION_GIRS Poppler-0.18.gir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gir_add_introspections(INTROSPECTION_GIRS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif ()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/poppler/files/patch-cmake_modules_PopplerMacros.cmake.diff b/graphics/poppler/files/patch-cmake_modules_PopplerMacros.cmake.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..a2b8e6ec88e
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/poppler/files/patch-cmake_modules_PopplerMacros.cmake.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- cmake/modules/PopplerMacros.cmake.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ cmake/modules/PopplerMacros.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -145,7 +145,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif(GCC_HAS_AS_NEEDED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif (CMAKE_COMPILER_IS_GNUCXX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # set the default compile warnings
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(_warn "-Wall -Wextra -Wpedantic")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(_warn "${_warn} -Wno-unused-parameter")
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/poppler/files/patch-glib_CMakeFiles.txt-fix-include-ordering.diff b/graphics/poppler/files/patch-glib_CMakeFiles.txt-fix-include-ordering.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..e6350cf9ffa
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/poppler/files/patch-glib_CMakeFiles.txt-fix-include-ordering.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,33 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- glib/CMakeLists.txt.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ glib/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -142,9 +142,28 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Format list of include directories as compiler flags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ get_directory_property(_tmp_includes INCLUDE_DIRECTORIES)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _list_prefix(_includes _tmp_includes "-I")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _list_prefix(_tmp2_includes _tmp_includes "-I")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # reorder includes to be interal to build or source first, then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # external, as best we can determine which is which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(_includes "")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(_includes_last "")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ foreach(_item IN LISTS _tmp2_includes)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ string(FIND "${_item}" "${CMAKE_BINARY_DIR}" _is_in_build)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if(NOT ${_is_in_build} EQUAL -1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ list(APPEND _includes "${_item}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ string(FIND "${_item}" "${CMAKE_SOURCE_DIR}" _is_in_source)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if(NOT ${_is_in_source} EQUAL -1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ list(APPEND _includes "${_item}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ list(APPEND _includes_last "${_item}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endforeach()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ list(APPEND _includes ${_includes_last})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # And set flags for gir compiler and scanner
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(Poppler_0_18_gir_CFLAGS ${_includes} -L${CMAKE_BINARY_DIR} -L${CMAKE_CURRENT_BINARY_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(Poppler_0_18_gir_CFLAGS -v ${_includes} -L${CMAKE_BINARY_DIR} -L${CMAKE_CURRENT_BINARY_DIR})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(Poppler_0_18_gir_SCANNERFLAGS "--c-include=poppler.h")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Load temporary source-file lists, including a few generated at build
</span></pre><pre style='margin:0'>
</pre>