2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2012-04-17 20:07:25 +01:00
|
|
|
|
|
|
|
PKG := poppler
|
2016-12-18 05:43:56 +00:00
|
|
|
$(PKG)_WEBSITE := http://poppler.freedesktop.org/
|
2012-04-17 20:07:25 +01:00
|
|
|
$(PKG)_IGNORE :=
|
2016-12-27 00:58:03 +00:00
|
|
|
$(PKG)_VERSION := 0.50.0
|
|
|
|
$(PKG)_CHECKSUM := c9c93318b789d3933f6e0bad3bc65110280c28eac3f0666284bb9c9a0ab4bc36
|
2012-04-17 20:07:25 +01:00
|
|
|
$(PKG)_SUBDIR := poppler-$($(PKG)_VERSION)
|
2013-10-05 18:56:28 +01:00
|
|
|
$(PKG)_FILE := poppler-$($(PKG)_VERSION).tar.xz
|
2012-04-17 20:07:25 +01:00
|
|
|
$(PKG)_URL := http://poppler.freedesktop.org/$($(PKG)_FILE)
|
2015-09-23 08:41:16 +01:00
|
|
|
$(PKG)_DEPS := gcc cairo curl freetype glib jpeg lcms libpng qt tiff zlib
|
2012-04-17 20:07:25 +01:00
|
|
|
|
|
|
|
define $(PKG)_UPDATE
|
2012-05-08 16:16:05 +01:00
|
|
|
$(WGET) -q -O- 'http://poppler.freedesktop.org/' | \
|
2013-10-05 18:56:28 +01:00
|
|
|
$(SED) -n 's,.*"poppler-\([0-9.]\+\)\.tar\.xz".*,\1,p' | \
|
2012-04-17 20:07:25 +01:00
|
|
|
head -1
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD
|
|
|
|
# Note: Specifying LIBS explicitly is necessary for configure to properly
|
|
|
|
# pick up libtiff (otherwise linking a minimal test program fails not
|
|
|
|
# because libtiff is not found, but because some references are
|
|
|
|
# undefined)
|
2013-08-17 21:35:14 +01:00
|
|
|
cd '$(1)' \
|
|
|
|
&& PATH='$(PREFIX)/$(TARGET)/qt/bin:$(PATH)' \
|
|
|
|
./configure \
|
2016-06-05 23:35:41 +01:00
|
|
|
$(MXE_CONFIGURE_OPTS) \
|
2012-04-17 20:07:25 +01:00
|
|
|
--disable-silent-rules \
|
|
|
|
--enable-xpdf-headers \
|
2016-06-07 23:34:26 +01:00
|
|
|
$(if $(filter qtbase,$($(PKG)_DEPS)), \
|
2016-06-08 14:41:52 +01:00
|
|
|
--enable-poppler-qt5 \
|
|
|
|
--disable-poppler-qt4, \
|
2016-06-09 13:40:36 +01:00
|
|
|
--disable-poppler-qt5 \
|
|
|
|
--enable-poppler-qt4) \
|
2012-04-17 20:07:25 +01:00
|
|
|
--enable-zlib \
|
2013-08-17 20:22:00 +01:00
|
|
|
--enable-cms=lcms2 \
|
2012-04-17 20:07:25 +01:00
|
|
|
--enable-libcurl \
|
|
|
|
--enable-libtiff \
|
|
|
|
--enable-libjpeg \
|
|
|
|
--enable-libpng \
|
|
|
|
--enable-poppler-glib \
|
|
|
|
--enable-poppler-cpp \
|
|
|
|
--enable-cairo-output \
|
|
|
|
--enable-splash-output \
|
|
|
|
--enable-compile-warnings=yes \
|
|
|
|
--enable-introspection=auto \
|
|
|
|
--disable-libopenjpeg \
|
|
|
|
--disable-gtk-test \
|
|
|
|
--disable-utils \
|
|
|
|
--disable-gtk-doc \
|
|
|
|
--disable-gtk-doc-html \
|
|
|
|
--disable-gtk-doc-pdf \
|
|
|
|
--with-font-configuration=win32 \
|
2014-02-09 17:45:23 +00:00
|
|
|
PKG_CONFIG_PATH_$(subst .,_,$(subst -,_,$(TARGET)))='$(PREFIX)/$(TARGET)/qt/lib/pkgconfig' \
|
2013-10-06 17:17:21 +01:00
|
|
|
CXXFLAGS=-D_WIN32_WINNT=0x0500 \
|
2012-12-30 11:20:18 +00:00
|
|
|
LIBTIFF_LIBS="`'$(TARGET)-pkg-config' libtiff-4 --libs`"
|
2013-08-17 21:35:14 +01:00
|
|
|
PATH='$(PREFIX)/$(TARGET)/qt/bin:$(PATH)' \
|
2016-12-28 10:29:45 +00:00
|
|
|
$(MAKE) -C '$(1)' -j '$(JOBS)' $(MXE_DISABLE_CRUFT) HTML_DIR=
|
|
|
|
$(MAKE) -C '$(1)' -j 1 install $(MXE_DISABLE_CRUFT) HTML_DIR=
|
2012-04-17 20:07:25 +01:00
|
|
|
|
|
|
|
# Test program
|
|
|
|
'$(TARGET)-g++' \
|
|
|
|
-W -Wall -Werror -ansi -pedantic \
|
2016-07-30 20:14:38 +01:00
|
|
|
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-poppler.exe' \
|
2012-04-17 20:07:25 +01:00
|
|
|
`'$(TARGET)-pkg-config' poppler poppler-cpp --cflags --libs`
|
|
|
|
endef
|