Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > d40354889178ea34f626f4d0eec04a02 > files > 20

xpdf-4.02-1.1.mga7.src.rpm

%define	major 0
%define libname %mklibname xpdf %{major}
%define develname %mklibname xpdf -d

%define urwdir %{_datadir}/fonts/default/Type1
%define x11dir		/usr/X11R6

Summary:	A PDF file viewer for the X Window System
Name:		xpdf
Version:	4.02
%define subrel 1
Release:	%mkrel 1
License:	GPLv2+
URL:		http://www.xpdfreader.com/
Group:		Publishing
Source:		https://xpdfreader-dl.s3.amazonaws.com/%{name}-%{version}.tar.gz
Source1:	icons-%{name}.tar.bz2
Source3:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-chinese-simplified.tar.gz
Source4:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-chinese-traditional.tar.gz
Source5:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-japanese.tar.gz
Source6:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-korean.tar.gz
Source7:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-cyrillic.tar.gz
Source8:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-thai.tar.gz
Source12:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-arabic.tar.gz
Source13:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-greek.tar.gz
Source14:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-hebrew.tar.gz
Source15:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-latin2.tar.gz
Source16:	https://xpdfreader-dl.s3.amazonaws.com/%{name}-turkish.tar.gz

Patch3:		%{name}-4.01-ext.patch
Patch11:	%{name}-4.01-crash.patch
Patch12:	%{name}-4.01-64bit.patch

# Security patches
Patch100:	xpdf-4.02-CVE-2019-17064.patch

# Debian patches
Patch200:	xpdf-4.02-permissions.patch
# Proper stream encoding on 64bit platforms
Patch203:	fix-444648.dpatch

Requires:	urw-fonts
Requires:	xdg-utils
Requires:	poppler
# Lesstif user interface requires these
Requires:	x11-font-adobe-75dpi
Requires:	x11-font-adobe-100dpi
Requires:	%{_lib}qt5svg5
Requires:	%{name}-common >= %{version}-%{release}

BuildRequires:	pkgconfig(x11)
BuildRequires:	pkgconfig(xt)
BuildRequires:	pkgconfig(xpm)
BuildRequires:	freetype2-devel >= 2.1.7
BuildRequires:	pkgconfig(zlib)
BuildRequires:	pkgconfig(fontconfig)
BuildRequires:	pkgconfig(xrender)
BuildRequires:	pkgconfig(xft)
BuildRequires:	libpaper-devel
BuildRequires:	autoconf
BuildRequires:	libtool
BuildRequires:	pkgconfig(libpng)
BuildRequires:	qt5-devel
BuildRequires:	cmake
BuildRequires:	cups-devel

%description
Xpdf is an X Window System based viewer for Portable Document Format (PDF)
files. PDF files are sometimes called Acrobat files, after Adobe Acrobat
(Adobe's PDF viewer).  Xpdf is a small and efficient program which uses
standard X fonts.

%package	common
Group:		Publishing
Summary:	Common files for xpdf and the applications based on it
Conflicts:	xpdf < 3.02-7

%description	common
Xpdf is an X Window System based viewer for Portable Document Format (PDF)
files. PDF files are sometimes called Acrobat files, after Adobe Acrobat
(Adobe's PDF viewer).  Xpdf is a small and efficient program which uses
standard X fonts.

This package contains common files (such as UnicodeMap and xpdfrc) needed for
xpdf and the applications based on it.

%prep
%setup -q -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 12 -a 13 -a 14 -a 15 -a 16
%autopatch -p1

# Comment out unused urlCommand option
sed -i 's|urlCommand|#urlCommand|g' doc/sample-xpdfrc

%build
find -name "*orig" | xargs rm -f

# This may seem pointless, but in the unlikely event that _sysconfdir != /etc ...
for file in doc/*.1 doc/*.5 xpdf-*/README; do
  sed -i -e 's:/etc/xpdfrc:%{_sysconfdir}/xpdfrc:g' $file
done
# Same action for _datadir.
for file in xpdf-*/README xpdf-*/add-to-xpdfrc; do
  sed -i -e 's:/usr/share/:%{_datadir}/:g' $file
  sed -i -e 's:/usr/local/share/:%{_datadir}/:g' $file
done

export CFLAGS="%{optflags} -fPIC"
export CXXFLAGS="%{optflags} -Wno-deprecated -fPIC"
export LDFLAGS=$(echo "%{ldflags}" | sed "s/-Wl,--no-undefined//")
%cmake -DMULTITHREADED=ON -DOPI_SUPPORT=ON -DXPDFWIDGET_PRINTING=1 -DSYSTEM_XPDFRC="%{_sysconfdir}/xpdfrc"

%make_build
%make_build xpdf

%install
for i in chinese-simplified chinese-traditional cyrillic japanese \
	korean thai greek latin2 turkish hebrew arabic; \
	do
		mkdir -p %{buildroot}%{_datadir}/%{name}/$i
		cp -a xpdf-$i/* %{buildroot}%{_datadir}/%{name}/$i/
	done

pushd build
%make_install

mkdir -p %{buildroot}%{_libdir}
cp -a fofi/libfofi.so* %{buildroot}%{_libdir}
cp -a goo/libgoo.so* %{buildroot}%{_libdir}
cp -a splash/libsplash.so* %{buildroot}%{_libdir}
popd

install -m 755 -d %{buildroot}%{_datadir}/applications/
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Name=Xpdf
Comment=Views PDF files
Exec=%{_bindir}/%{name} %f
Icon=%{name}
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/pdf;text/x-pdf;application/pdf;application/x-pdf;
Categories=Office;Viewer;
EOF

# mdk icons
install -d %{buildroot}%{_iconsdir}
tar xjf %{SOURCE1} -C %{buildroot}%{_iconsdir}

# poppler provides all utilities now
rm %{buildroot}%{_bindir}/pdfdetach
rm %{buildroot}%{_bindir}/pdffonts
rm %{buildroot}%{_bindir}/pdfimages
rm %{buildroot}%{_bindir}/pdfinfo
rm %{buildroot}%{_bindir}/pdftohtml
rm %{buildroot}%{_bindir}/pdftops
rm %{buildroot}%{_bindir}/pdftotext
rm %{buildroot}%{_bindir}/pdftoppm
rm %{buildroot}%{_mandir}/man1/pdftoppm.1*
rm %{buildroot}%{_mandir}/man1/pdfdetach.1*
rm %{buildroot}%{_mandir}/man1/pdffonts.1*
rm %{buildroot}%{_mandir}/man1/pdfimages.1*
rm %{buildroot}%{_mandir}/man1/pdfinfo.1*
rm %{buildroot}%{_mandir}/man1/pdftohtml.1*
rm %{buildroot}%{_mandir}/man1/pdftops.1*
rm %{buildroot}%{_mandir}/man1/pdftotext.1*

mkdir -p %{buildroot}%{_sysconfdir}/xpdf/
for i in arabic chinese-simplified chinese-traditional cyrillic greek hebrew japanese korean latin2 thai turkish; do
     mv %{buildroot}%{_datadir}/%{name}/$i/README README.$i
     mv %{buildroot}%{_datadir}/%{name}/$i/add-to-xpdfrc %{buildroot}%{_sysconfdir}/xpdf/add-to-xpdfrc.$i
done

# xpdfrc cleanup
mkdir -p %{buildroot}%{_sysconfdir}/
cp -a doc/sample-xpdfrc %{buildroot}%{_sysconfdir}/xpdfrc
sed -i -e 's:/usr/local/share/:%{_datadir}/:g' %{buildroot}%{_sysconfdir}/xpdfrc

%files
%license COPYING COPYING3
%doc CHANGES README README.*
%{_bindir}/xpdf
%{_bindir}/pdftopng
%{_libdir}/lib*.so
%{_mandir}/man1/pdftopng.1*
%{_mandir}/man1/xpdf.1*
%{_datadir}/applications/%{name}.desktop
%{_iconsdir}/*.*
%{_liconsdir}/*.*
%{_miconsdir}/*.*

%files common
%{_mandir}/man5/*
%config(noreplace) %{_sysconfdir}/xpdfrc
%dir %{_sysconfdir}/%{name}
%lang(ar) %config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.arabic
%lang(zh_CN) %config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.chinese-simplified
%lang(zh_TW) %config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.chinese-traditional
%lang(el) %config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.greek
%lang(iw) %config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.hebrew
%lang(ja) %config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.japanese
%lang(ko) %config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.korean
%lang(th) %config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.thai
%lang(tr) %config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.turkish
# cyrillic and latin2 are not langs, many languages are cyrillic/latin2
%config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.cyrillic
%config(noreplace) %{_sysconfdir}/%{name}/add-to-xpdfrc.latin2
%dir %{_datadir}/%{name}
%lang(ar) %{_datadir}/%{name}/arabic
%lang(zh_CN) %{_datadir}/%{name}/chinese-simplified
%lang(zh_TW) %{_datadir}/%{name}/chinese-traditional
%lang(el) %{_datadir}/%{name}/greek
%lang(iw) %{_datadir}/%{name}/hebrew
%lang(ja) %{_datadir}/%{name}/japanese
%lang(ko) %{_datadir}/%{name}/korean
%lang(th) %{_datadir}/%{name}/thai
%lang(tr) %{_datadir}/%{name}/turkish
%{_datadir}/%{name}/cyrillic
%{_datadir}/%{name}/latin2


%changelog
* Fri Dec 27 2019 ns80 <ns80> 4.02-1.1.mga7
+ Revision: 1470515
- add patch for CVE-2019-17064 (mga#25973)
- new version 4.02 (mga#25364)

* Thu Apr 04 2019 ns80 <ns80> 4.01.01-1.mga7
+ Revision: 1385802
- new version 4.01.01 for CVE-2018-717[3-5], CVE-2018-745[24], CVE-2018-16368 (mga#24504)

* Sun Sep 23 2018 umeabot <umeabot> 3.04-7.mga7
+ Revision: 1301958
- Mageia 7 Mass Rebuild

* Fri Jun 08 2018 wally <wally> 3.04-6.mga7
+ Revision: 1235482
- build with motif instead of lesstif

* Mon Feb 01 2016 umeabot <umeabot> 3.04-5.mga6
+ Revision: 930062
- Mageia 6 Mass Rebuild

* Wed Oct 15 2014 umeabot <umeabot> 3.04-4.mga5
+ Revision: 747323
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 3.04-3.mga5
+ Revision: 690747
- Mageia 5 Mass Rebuild

* Thu Aug 21 2014 luigiwalser <luigiwalser> 3.04-2.mga5
+ Revision: 666220
- remove old MandrivaLinux category from desktop menu entry file

* Fri Jun 06 2014 luigiwalser <luigiwalser> 3.04-1.mga5
+ Revision: 633903
- 3.04
- remove conditional bundled freetype2 and lesstif
  (remove patch 9)
- update language packs
- rediff patches 2, 16, and 17
- remove no longer needed patch 18
- update patch 20 (from fedora)
- remove upstream patches 27 and 29
- do not build shared library, obsoleted by poppler
  (remove patches 0 and 28)
- fix perl substitutions in spec to change correct files

* Sat Oct 19 2013 umeabot <umeabot> 3.03-6.mga4
+ Revision: 532659
- Mageia 4 Mass Rebuild

* Thu Aug 22 2013 luigiwalser <luigiwalser> 3.03-5.mga4
+ Revision: 469194
- add patch from mancha to fix CVE-2012-2142 (rhbz#789936)

* Mon Jan 14 2013 umeabot <umeabot> 3.03-4.mga3
+ Revision: 387298
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Oct 26 2012 malo <malo> 3.03-3.mga3
+ Revision: 310407
- update RPM group

* Mon Feb 20 2012 fwang <fwang> 3.03-2.mga2
+ Revision: 211165
- correct link order
- fi xlink order
+ dmorgan <dmorgan>
- Do not package .la files

* Mon Feb 20 2012 luigiwalser <luigiwalser> 3.03-1.mga2
+ Revision: 211157
- fix BuildRequires
- fix another changed command in xpdfrc
- remove redundant command from spec
- do not force default paper size
- remove obsolete configure options
- versionate provides
- update chinese patch for changed xpdf command
- fix rediffed patch 0
- add patch 27 to fix compile error due to missing cast
- rediff patches and remove upstreamed ones
+ fwang <fwang>
- tighen br
+ tv <tv>
- new release
+ anaselli <anaselli>
- Fixes bug #2263 - missing file aconf.h

* Wed Jul 06 2011 dams <dams> 3.02pl6-1.mga2
+ Revision: 119433
- update to 3.02pl6
- disable t1lib

* Tue May 17 2011 dmorgan <dmorgan> 3.02-17.mga1
+ Revision: 99413
- imported package xpdf