Position independent code

Compile poppler with position independent code turned on.
Otherwise it doesn't build on Fedora 33.

Resolves: #1673727
This commit is contained in:
Marek Kasik 2020-07-10 19:31:03 +02:00
parent db9b39308d
commit 1ef95951ba
2 changed files with 20 additions and 3 deletions

View File

@ -0,0 +1,12 @@
--- poppler-0.90.0/CMakeLists.txt
+++ poppler-0.90.0/CMakeLists.txt
@@ -17,6 +17,9 @@ else()
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
endif()
+
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
include(CheckFileOffsetBits)

View File

@ -4,7 +4,7 @@
Summary: PDF rendering library
Name: poppler
Version: 0.90.0
Release: 1%{?dist}
Release: 2%{?dist}
License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
URL: http://poppler.freedesktop.org/
Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.xz
@ -25,6 +25,8 @@ Patch5: poppler-0.84.0-MacroPushRequiredVars.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1673727
Patch6: poppler-0.90.0-qt4-update.patch
Patch7: poppler-0.90.0-position-independent-code.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: gettext-devel
@ -157,7 +159,6 @@ other formats.
%build
mkdir build
cd build
export CC="gcc -fPIC" # hack to make the cmake call pass
%cmake \
-DENABLE_CMS=lcms2 \
-DENABLE_DCTDECODER=libjpeg \
@ -166,7 +167,6 @@ export CC="gcc -fPIC" # hack to make the cmake call pass
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
-DENABLE_ZLIB=OFF \
..
unset CC
%make_build
%install
@ -255,6 +255,11 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}"
%{_mandir}/man1/*
%changelog
* Fri Jul 10 2020 Marek Kasik <mkasik@redhat.com> - 0.90.0-2
- Compile poppler with position independent code turned on.
- Otherwise it doesn't build on Fedora 33.
- Resolves: #1673727
* Wed Jul 08 2020 Marek Kasik <mkasik@redhat.com> - 0.90.0-1
- Update to 0.90.0
- Resolves: #1673727