Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 30aefef768a8cc13818cb80f518911d0 > files > 34

xpdf-3.02-17mdv2010.1.src.rpm

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

%define urwdir %{_datadir}/fonts/default/Type1
%define lesstifver	0.93.41
%define freetypever	2.1.5
%define x11dir		/usr/X11R6
%define build_lesstif	0
%define build_freetype2	0
%define usefreetype2	1
%define	pkgversion	3.02
%define fversion	3.02

Summary:	A PDF file viewer for the X Window System
Name:		xpdf
Version:	%{pkgversion}
Release:	%mkrel 17
License:	GPLv2+
Source:		ftp://ftp.foolabs.com/pub/xpdf/%{name}-%{fversion}.tar.bz2
Source1:	icons-%{name}.tar.bz2
Source2:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-chinese-simplified.tar.bz2
Source3:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-chinese-traditional.tar.bz2
Source4:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-cyrillic.tar.bz2
Source5:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-japanese.tar.bz2
Source6:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-korean.tar.bz2
Source7:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-thai.tar.bz2
Source8:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-greek.tar.bz2
Source9:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-latin2.tar.bz2
Source10:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-turkish.tar.bz2
Source11:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-hebrew.tar.bz2
Source12:	ftp://ftp.hungry.com/pub/hungry/lesstif/srcdist/lesstif-%{lesstifver}.tar.bz2
Source13:	ftp://ftp.freetype.org/freetype/freetype2/freetype-%{freetypever}.tar.bz2
Source14:	ftp://ftp.foolabs.com/pub/xpdf/%{name}-arabic.tar.bz2

Patch0:		xpdf-3.02-shared.diff
Patch2:		%{name}-3.01-antihigh.patch
Patch3:		%{name}-3.02-mozilla.patch
Patch4:		%{name}-3.00-autohinting.patch
Patch5:		%{name}-2.02-ext.patch
Patch6:		%{name}-2.03-zoom.patch
# use some debian patches for static freetype 2.1.5
Patch9:		%{name}-2.03-ft215deb.patch
#
Patch10:	%{name}-3.01-xpdfrc3.patch
Patch16:	%{name}-chinese.patch
Patch17:	%{name}-3.02-CAN-2005-0206.patch
Patch18:	%{name}-3.00-gcc401.patch
Patch19:	%{name}-3.01-core.patch
Patch20:	%{name}-3.02-crash.patch
Patch21:	%{name}-3.01-xfont.patch
Patch22:	%{name}-3.02pl1.patch
Patch23:	%{name}-3.02pl2.patch
Patch24:	%{name}-3.02pl3.patch
Patch25:	xpdf-3.02pl4.patch
#
URL:		http://www.foolabs.com/xpdf/
Group:		Office
BuildRequires:	X11-devel
BuildRequires:	xpm-devel
BuildRequires:	t1lib-devel
BuildRequires:	freetype2-devel >= 2.0.5
BuildConflicts:	libpaper-devel
BuildRequires:	autoconf
BuildRequires:	libtool
%if %build_lesstif
BuildRequires:	libfontconfig-devel
BuildConflicts:	lesstif-devel
%else
BuildRequires:	lesstif-devel
%endif
Requires:	urw-fonts
# Lesstiff user interface requires these (btw, why a static lesstif and freetype?)
Requires:	x11-font-adobe-75dpi
Requires:	x11-font-adobe-100dpi
Requires:	%{name}-common >= %{version}-%{release}
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%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 -n	%{libname}
Summary:	Shared Xpdf library
Group:          System/Libraries

%description -n	%{libname}
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 -n	%{develname}
Summary:	Development files for the Xpdf library
Group:		Development/C++
Provides:	%{name}-devel
Provides:	lib%{name}-devel
Requires:	%{libname} >= %{version}

%description -n	%{develname}
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 the development files for Xpdf.

%package	common
Group:		Text tools
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 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -n %{name}-%{fversion}
%patch0 -p1 -b .shared
%patch2 -p1 -b .antihigh
%patch3 -p1 -b .mozilla
%patch4 -p1 -b .autohint
%patch5 -p1 -b .mktemp
%patch6 -p1 -b .zoom
%if %build_freetype2
%patch9 -p1 -b .deb
%endif
%patch10 -p1 -b .30
%patch16 -p1 -b .chinese
%patch17 -p1 -b .CAN-2005-0206
%patch18 -p1 -b .gcc401
%patch19 -p1 -b .core
%patch20 -p1 -b .crash
%patch21 -p1 -b .xfont
%patch22 -p1 -b .CVE-2007-3387
%patch23 -p1 -b .cve-2007-4352_5392_5393
%patch24 -p1 -b .CVE-2009-0195
%patch25 -p1 -b .CVE-2009-3603,3604,3605,3606,3608,3609

%build
CURRENTDIR=`pwd`

# build a local lesstif library
%if %build_lesstif
(cd lesstif-%{lesstifver}
CFLAGS="$RPM_OPT_FLAGS" \
	./configure \
			--prefix=%{x11dir} \
			--libdir=%{x11dir}/%{_lib} \
			--disable-shared \
			--enable-static \
			--disable-build-12 \
			--disable-build-20 \
			--enable-build-21 \
			--enable-default-21 \
			--disable-maintainer-mode \
			--disable-debug
%make
make install \
	prefix=$CURRENTDIR/lesstif-local \
	libdir=$CURRENTDIR/lesstif-local/lib
)
%endif

# build a local freetype2 library
%if %build_freetype2
(cd freetype-%{freetypever}
%configure2_5x --disable-shared
%make
make install DESTDIR=$CURRENTDIR/freetype2-local \
)
%endif

# build xpdf
export X_EXTRA_LIBS="-lXft -lXrender -lfontconfig -lz"
%configure2_5x --with-gzip \
	   --bindir=%{_bindir} \
	   --mandir=%{_mandir} \
	   --enable-a4-paper \
	   --enable-opi \
%if %build_lesstif
	   --with-Xm-library=$CURRENTDIR/lesstif-local/lib \
	   --with-Xm-includes=$CURRENTDIR/lesstif-local/include \
%endif
%if %build_freetype2
	   --enable-freetype2 \
	   --with-freetype2-includes=$CURRENTDIR/freetype2-local%{_includedir}/freetype2 \
	   --with-freetype2-library=$CURRENTDIR/freetype2-local%{_libdir} \
%endif
%if %usefreetype2
	   --enable-freetype2 \
	   --with-freetype2-includes=%{_includedir}/freetype2 \
%endif
	   --enable-japanese \
	   --enable-chinese-gb \
	   --enable-chinese-cns

%make

perl -pi -e 's@/usr/local/etc/@%{_sysconfdir}/@' doc/*.1 doc/*.5
perl -pi -e 's@/usr/local/share/ghostscript/fonts@%{urwdir}@' doc/sample-xpdfrc doc/*.1 doc/*.5
perl -pi -e 's@^#displayFontT1@displayFontT1@' doc/sample-xpdfrc
for i in chinese-simplified chinese-traditional cyrillic japanese \
	korean thai greek latin2 turkish hebrew arabic; \
	do
		perl -pi -e 's@/usr/local/share/xpdf@%{_datadir}/xpdf@' \
			xpdf-$i/add-to-xpdfrc \
			xpdf-$i/README
		echo >> doc/sample-xpdfrc
		cat xpdf-$i/add-to-xpdfrc >> doc/sample-xpdfrc
		rm xpdf-$i/add-to-xpdfrc 
	done
# Xpdf no longer supports X fonts
perl -pi -e 's/^displayCIDFontX/#displayCIDFontX/g' doc/sample-xpdfrc
perl -pi -e 's/^#urlCommand.*/urlCommand "www-browser %s"/' doc/sample-xpdfrc

%install
rm -rf %{buildroot}

install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_mandir}/man1

%makeinstall_std

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

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

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

# remove unpackaged files
rm -f %{buildroot}%{_bindir}/pdf* %{buildroot}%{_mandir}/man1/pdf*

# install headers
install -d %{buildroot}%{_includedir}/%{name}
install -m0644 xpdf/*.h %{buildroot}%{_includedir}/%{name}/

for i in fofi goo splash; do
    install -d %{buildroot}%{_includedir}/%{name}/$i
    install -m0644 $i/*.h %{buildroot}%{_includedir}/%{name}/$i/
done

%if %mdkversion < 200900
%post
%update_menus
%endif

%if %mdkversion < 200900
%postun
%clean_menus
%endif

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%clean
rm -rf %{buildroot}

%files -n %{libname}
%defattr(-,root,root)
%doc CHANGES README
%{_libdir}/libxpdf.so.%{major}*

%files -n %{develname}
%defattr(-,root,root)
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/*.*a

%files
%defattr(-,root,root)
%{_bindir}/xpdf
%{_mandir}/man1/xpdf.1*
%{_datadir}/applications/mandriva-%{name}.desktop
%{_iconsdir}/*.*
%{_liconsdir}/*.*
%{_miconsdir}/*.*

%files common
%defattr(-,root,root)
%{_datadir}/%{name}
%{_mandir}/man5/*
%config(noreplace) %{_sysconfdir}/xpdfrc


%changelog
* Tue May 11 2010 Oden Eriksson <oeriksson@mandriva.com> 3.02-17mdv2010.1
+ Revision: 544475
- provide shared libs

* Tue Oct 20 2009 Oden Eriksson <oeriksson@mandriva.com> 3.02-16mdv2010.0
+ Revision: 458393
- P25: security fixes for CVE-2009-3603,3604,3605,3606,3608,3609

* Mon Sep 21 2009 Thierry Vignaud <tv@mandriva.org> 3.02-15mdv2010.0
+ Revision: 446263
- rebuild

* Sun Apr 19 2009 Frederik Himpe <fhimpe@mandriva.org> 3.02-14mdv2009.1
+ Revision: 368008
- Switch patch23 to official 3.02pl2 patch, which fixes the same security
  problems
- Add rediffed 3.02pl3.patch to fix CVE-2009-0195

* Mon Apr 13 2009 Funda Wang <fwang@mandriva.org> 3.02-13mdv2009.1
+ Revision: 366741
- drop autoconf
- rediff crash patch
- rediff ppm patch

  + Michael Scherer <misc@mandriva.org>
    - fix patch3

  + Antoine Ginies <aginies@mandriva.com>
    - rebuild

* Thu Aug 07 2008 Thierry Vignaud <tv@mandriva.org> 3.02-12mdv2009.0
+ Revision: 266146
- rebuild early 2009.0 package (before pixel changes)

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas

* Fri Jun 06 2008 Funda Wang <fwang@mandriva.org> 3.02-11mdv2009.0
+ Revision: 216393
- updaet default chinese font name

* Wed Mar 19 2008 Frederic Crozat <fcrozat@mandriva.com> 3.02-10mdv2008.1
+ Revision: 188830
- Kill xpdf-tools, now provided by poppler package

  + Thierry Vignaud <tv@mandriva.org>
    - fix summary-not-capitalized
    - kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Sun Dec 16 2007 Funda Wang <fwang@mandriva.org> 3.02-9mdv2008.1
+ Revision: 120527
- fix CVE 2007 4352,5392,5393.

  + Thierry Vignaud <tv@mandriva.org>
    - buildrequires X11-devel instead of XFree86-devel

* Fri Sep 14 2007 Funda Wang <fwang@mandriva.org> 3.02-8mdv2008.0
+ Revision: 85615
- fix conflicts version

* Thu Sep 13 2007 Funda Wang <fwang@mandriva.org> 3.02-7mdv2008.0
+ Revision: 85219
- split out unicodemap and xpdfrc so that other packages such as kpdf could suggest it

* Wed Sep 12 2007 Funda Wang <fwang@mandriva.org> 3.02-6mdv2008.0
+ Revision: 84631
- fix bug#17626

* Tue Sep 11 2007 Paulo Andrade <pcpa@mandriva.com.br> 3.02-5mdv2008.0
+ Revision: 84434
- Add Requires to user interface required fonts.

  + Thierry Vignaud <tv@mandriva.org>
    - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated'

* Sun Aug 12 2007 Pixel <pixel@mandriva.com> 3.02-4mdv2008.0
+ Revision: 62246
- fix .desktop so that firefox correctly calls xpdf (#28720)

* Wed Aug 01 2007 Funda Wang <fwang@mandriva.org> 3.02-3mdv2008.0
+ Revision: 57555
- Add patch to fix CVE-2007-3387

* Wed Jul 04 2007 Andreas Hasenack <andreas@mandriva.com> 3.02-2mdv2008.0
+ Revision: 48237
- autoconf-2.5x is no more
- rebuild with new rpm-mandriva-setup package (-fstack-protector)


* Sat Mar 10 2007 Giuseppe Ghibò <ghibo@mandriva.com> 3.02-1mdv2007.1
+ Revision: 140528
- Reworked Patch3 (mozilla)
- Reworked Patch17 (can-2005-0206).
- Removed Patch25 (pl2), merged upstream.
- Removed Patch26 (noftinternal), merged upstream.
- Removed Patch27 (cve-2007-0104), mainstream 3.02 code modified to include the same features.

* Sun Feb 18 2007 Giuseppe Ghibò <ghibo@mandriva.com> 3.01pl2-5mdv2007.1
+ Revision: 122239
- Added Patch27 from Stew Benedict, security fix for CVE-2007-0104
  (close bug #28263).

* Sat Jan 06 2007 Götz Waschk <waschk@mandriva.org> 3.01pl2-4mdv2007.1
+ Revision: 104770
- Import xpdf

* Sat Jan 06 2007 Götz Waschk <waschk@mandriva.org> 3.01pl2-4mdv2007.1
- unpack patches

* Wed Jun 21 2006 Frederic Crozat <fcrozat@mandriva.com> 3.01pl2-3mdv2007.0
- Add conflicts to ease upgrade
- Patch26 (David Turner): don't use freetype internals

* Fri Apr 21 2006 Götz Waschk <waschk@mandriva.org> 3.01pl2-2mdk
- split out the command line tools

* Sat Feb 11 2006 Giuseppe Ghibò <ghibo@mandriva.com> 3.01pl2-1mdk
- Removed Patch22,23,24 (merged into 3.01pl2 Patch25).

* Wed Feb 01 2006 Stew Benedict <sbenedict@mandriva.com> 3.01-1.2.20060mdk
- P24: security fix for CVE-2006-0301

* Tue Jan 03 2006 Stew Benedict <sbenedict@mandriva.com> 3.01-1.1.20060mdk
- security update for CVE-2005-3191,3192,3193 (P22)                                                         
- additional overflow issues discovered by Chris Evans (P23)                                                
  (CVE-2005-3624,3625,3626,3627)

* Thu Aug 25 2005 Giuseppe Ghibò <ghibo@mandriva.com> 3.01-1mdk
- Release 3.01.
- Rebuilt Patch2.
- Removed Patch7, Patch12, Patch13, Patch14, Patch19, Patch21 (merged upstream).
- Removed Patch15, Patch20, Patch22.
- Rebuilt Patch10.
- Added Patch19 (core), Patch20 (crash), Patch21 (xfont) merged from RH.

* Thu Aug 25 2005 Giuseppe Ghibò <ghibo@mandriva.com> 3.00pl3-9mdk
- Added Patches from Funda Wang (Patch21, Patch22) for bug #17308.

* Wed Aug 17 2005 Laurent MONTEL <lmontel@mandriva.com> 3.00pl3-8mdk
- Fix crash on x86_64
- Add patch20: fix compile on x86_64

* Thu Aug 04 2005 Giuseppe Ghibò <ghibo@mandriva.com> 3.00pl3-7mdk
- Added Patch18 for gcc 4.0.1.

* Sun Apr 03 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.00pl3-6mdk
- Fix bug #14236.

* Wed Mar 16 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.00pl3-5mdk
- Added Source14 (for fixing bug #12209).

* Thu Mar 10 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.00pl3-4mdk
- Added Patch17 for CAN-2005-0206 (from Stew's updates).

* Wed Mar 09 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.00pl3-3mdk
- Added entry for Chinese Traditional and Simplified (fix bug #14236).

* Mon Feb 14 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.00pl3-2mdk
- Added Patch15 for MDKSA-2005:017 (CAN-2005-0064).

* Wed Jan 19 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.00pl3-1mdk
- Added pl1,pl2,pl3 patches.

* Wed Jan 19 2005 Frederic Lepied <flepied@mandrakesoft.com> 3.00-9mdk
- use www-browser in urlCommand

* Tue Jan 11 2005 Olivier Thauvin <thauvin@aerov.jussieu.fr> 3.00-8mdk
- Rebuild for t1lib
- remove redondant requires

* Tue Jul 20 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.00-7mdk
- Rebuilt.

* Fri Jun 04 2004 Laurent Montel <lmontel@mandrakesoft.com> 3.00-6mdk
- Rebuild against new gcc