mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <r.hieber@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <r.hieber@pengutronix.de>
Subject: [ptxdist] [PATCH 2/2] poppler: version bump 0.60.1 -> 0.61.1
Date: Mon, 20 Nov 2017 16:14:12 +0100	[thread overview]
Message-ID: <20171120151412.29614-2-r.hieber@pengutronix.de> (raw)
In-Reply-To: <20171120151412.29614-1-r.hieber@pengutronix.de>

Patches have gone upstream or are no longer needed because we now link
with libcms2, as libcms1 support will soon be dropped upstream.

Apparently pthread detection in CMake has changed, work around it.

Also include MD5 sums for the license files.

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
 ...dd-the-custom-buildtests-target-only-once.patch | 58 ------------------
 ...Make-make-FindLCMS.cmake-cross-compatible.patch | 69 ----------------------
 patches/poppler-0.60.1/series                      |  5 --
 rules/poppler.in                                   |  3 +-
 rules/poppler.make                                 | 17 ++++--
 5 files changed, 14 insertions(+), 138 deletions(-)
 delete mode 100644 patches/poppler-0.60.1/0001-CMake-add-the-custom-buildtests-target-only-once.patch
 delete mode 100644 patches/poppler-0.60.1/0002-CMake-make-FindLCMS.cmake-cross-compatible.patch
 delete mode 100644 patches/poppler-0.60.1/series

diff --git a/patches/poppler-0.60.1/0001-CMake-add-the-custom-buildtests-target-only-once.patch b/patches/poppler-0.60.1/0001-CMake-add-the-custom-buildtests-target-only-once.patch
deleted file mode 100644
index 7d996760a..000000000
--- a/patches/poppler-0.60.1/0001-CMake-add-the-custom-buildtests-target-only-once.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From: Roland Hieber <r.hieber@pengutronix.de>
-Date: Mon, 6 Nov 2017 15:36:34 +0100
-Subject: [PATCH] CMake: add the custom `buildtests` target only once
-
-This fixes building with -DBUILD_QT4_TESTS=NO or -DBUILD_QT5_TESTS=NO,
-which resulted in error messages like:
-
-  CMake Error at cmake/modules/PopplerMacros.cmake:41 (add_custom_target):
-    add_custom_target cannot create target "buildtests" because another
-    target with the same name already exists.  The existing target is a
-    custom target created in source directory
-    "[...]/poppler-0.60.1/qt4/tests".
-    See documentation for policy CMP0002 for more details.
-  Call Stack (most recent call first):
-    qt4/tests/CMakeLists.txt:30 (poppler_add_unittest)
-    qt4/tests/CMakeLists.txt:52 (qt4_add_qtest)
-
-Solve this by making BUILDTESTS_ADDED a global property so it is only
-remembered once per project instead of per directory.
-
-Fixes bug #103003.
-
-Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=103003#c5
-Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
----
- cmake/modules/PopplerMacros.cmake | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
-index ba4bceb36ba4..4542751a0857 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)
diff --git a/patches/poppler-0.60.1/0002-CMake-make-FindLCMS.cmake-cross-compatible.patch b/patches/poppler-0.60.1/0002-CMake-make-FindLCMS.cmake-cross-compatible.patch
deleted file mode 100644
index 2e9285c62..000000000
--- a/patches/poppler-0.60.1/0002-CMake-make-FindLCMS.cmake-cross-compatible.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From: Roland Hieber <r.hieber@pengutronix.de>
-Date: Mon, 6 Nov 2017 17:31:17 +0100
-Subject: [PATCH] CMake: make FindLCMS.cmake cross-compatible
-
-FindLCMS.make complains when being run in cross-compile mode:
-
-  -- Checking for module 'lcms'
-  --   Found lcms, version 1.19
-  CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the
-  following cache variables appropriately:
-     LCMS_VERSION (advanced)
-     LCMS_VERSION__TRYRUN_OUTPUT (advanced)
-  For details see [...]/poppler-0.60.1-build/TryRunResults.cmake
-  -- Found lcms version P.LE, [...]/sysroot-target/usr/lib/liblcms.so
-
-To work around this, replace try_run() with the version parsing regex
-from FindLCMS2.make, and adapt it accordingly for lcms1.
-
-Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=103593#c0
-Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
----
- cmake/modules/FindLCMS.cmake | 25 ++++++-------------------
- 1 file changed, 6 insertions(+), 19 deletions(-)
-
-diff --git a/cmake/modules/FindLCMS.cmake b/cmake/modules/FindLCMS.cmake
-index 9d162d2cfdd8..504f67fa75f1 100644
---- a/cmake/modules/FindLCMS.cmake
-+++ b/cmake/modules/FindLCMS.cmake
-@@ -42,34 +42,21 @@ else(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
- endif(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
- 
- if(LCMS_FOUND)
--   set(FIND_LCMS_VERSION_SOURCE
--      "#include <lcms.h>\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)
-+   file(READ ${LCMS_INCLUDE_DIR}/lcms.h LCMS_VERSION_CONTENT)
-+   string(REGEX MATCH "#define LCMS_VERSION[ ]*[0-9]*\n" LCMS_VERSION_MATCH ${LCMS_VERSION_CONTENT})
-+   if(LCMS_VERSION_MATCH)
-+      string(REGEX REPLACE "#define LCMS_VERSION[ ]*([0-9]*)\n" "\\1" LCMS_VERSION ${LCMS_VERSION_MATCH})
-       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)
-+   else(LCMS_VERSION_MATCH)
-       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)
-+    endif(LCMS_VERSION_MATCH)
- else(LCMS_FOUND)
-    if(NOT LCMS_FIND_QUIETLY)
-       if(LCMS_FIND_REQUIRED)
diff --git a/patches/poppler-0.60.1/series b/patches/poppler-0.60.1/series
deleted file mode 100644
index 5112de303..000000000
--- a/patches/poppler-0.60.1/series
+++ /dev/null
@@ -1,5 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-CMake-add-the-custom-buildtests-target-only-once.patch
-0002-CMake-make-FindLCMS.cmake-cross-compatible.patch
-# 288cf8b3409fa56f32b01aca61acb352  - git-ptx-patches magic
diff --git a/rules/poppler.in b/rules/poppler.in
index f0d635a16..8a7a48675 100644
--- a/rules/poppler.in
+++ b/rules/poppler.in
@@ -6,6 +6,7 @@ menuconfig POPPLER
 	select HOST_CMAKE
 	select FONTCONFIG
 	select FREETYPE
+	select LIBC_PTHREAD
 	select HOST_GETTEXT
 	select POPPLER_DATA			if POPPLER_WITH_DATA
 	select GLIB				if POPPLER_GLIB
@@ -172,7 +173,7 @@ config POPPLER_CMS
 	bool
 	prompt "enable color management support"
 	help
-	  compile poppler with color management support via libcms1
+	  compile poppler with color management support via libcms
 
 endif
 
diff --git a/rules/poppler.make b/rules/poppler.make
index bc38f9beb..cb28e9914 100644
--- a/rules/poppler.make
+++ b/rules/poppler.make
@@ -14,7 +14,6 @@
 # - package libtiff for additional TIFF support
 # - runtime-test the Qt5 backend
 # - package libopenjpeg and build with --enable-libopenjpeg
-# - update lcms to lcms2 and use --enable-cms=lcms2
 #
 # We provide this package
 #
@@ -23,14 +22,17 @@ PACKAGES-$(PTXCONF_POPPLER) += poppler
 #
 # Paths and names
 #
-POPPLER_VERSION	:= 0.60.1
-POPPLER_MD5	:= 7648416d51a6e9fbc4a75b6f8b53dd7c
+POPPLER_VERSION	:= 0.61.1
+POPPLER_MD5	:= 2d3dcea88d6a814317fac74d2a16c3cd
 POPPLER		:= poppler-$(POPPLER_VERSION)
 POPPLER_SUFFIX	:= tar.xz
 POPPLER_URL	:= http://poppler.freedesktop.org/$(POPPLER).$(POPPLER_SUFFIX)
 POPPLER_SOURCE	:= $(SRCDIR)/$(POPPLER).$(POPPLER_SUFFIX)
 POPPLER_DIR	:= $(BUILDDIR)/$(POPPLER)
 POPPLER_LICENSE	:= GPL-2.0 OR GPL-3.0
+POPPLER_LICENSE_FILES	:= \
+	file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+	file://COPYING3;md5=d32239bcb673463ab874e80d47fae504
 
 # ----------------------------------------------------------------------------
 # Prepare
@@ -40,13 +42,18 @@ POPPLER_PATH	:= PATH=$(CROSS_PATH)
 POPPLER_ENV 	:= $(CROSS_ENV)
 
 #
-# autoconf
+# CMake
+#
+# FindThreads.cmake tries to determine if our compiler understands -pthread by
+# compiling a file and running the binary. We set -DTHREADS_PTHREAD_ARG=2 to
+# tell CMake that this binary returns 2, which means -pthread. is understood.
 #
 POPPLER_CONF_TOOL	:= cmake
 POPPLER_CONF_OPT	:= \
 	$(CROSS_CMAKE_USR) \
 	-DBUILD_SHARED_LIBS=ON \
 	-DEXTRA_WARN=NO \
+	-DTHREADS_PTHREAD_ARG=2 \
 	-DFONT_CONFIGURATION=fontconfig \
 	-DENABLE_UTILS=$(call ptx/onoff,PTXCONF_POPPLER_BIN) \
 	-DENABLE_XPDF_HEADERS=$(call ptx/onoff,PTXCONF_POPPLER_XPDF) \
@@ -78,7 +85,7 @@ POPPLER_CONF_OPT	:= \
 	-DENABLE_ZLIB=$(call ptx/onoff,PTXCONF_POPPLER_ZLIB) \
 	-DENABLE_ZLIB_UNCOMPRESS=NO \
 	-DENABLE_LIBCURL=$(call ptx/onoff,PTXCONF_POPPLER_CURL) \
-	-DENABLE_CMS=$(call ptx/ifdef,PTXCONF_POPPLER_CMS,lcms1,)
+	-DENABLE_CMS=$(call ptx/ifdef,PTXCONF_POPPLER_CMS,lcms2,)
 
 # ----------------------------------------------------------------------------
 # Target-Install
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2017-11-20 15:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 15:14 [ptxdist] [PATCH 1/2] lcms: version bump 1.19 -> 2.9 Roland Hieber
2017-11-20 15:14 ` Roland Hieber [this message]
2017-11-20 15:57 ` Robert Schwebel
2017-11-23 10:08 ` [ptxdist] [PATCH v2 " Roland Hieber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171120151412.29614-2-r.hieber@pengutronix.de \
    --to=r.hieber@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox