[pdfedit/f17] fix the build and address re-review comments
Kai Engert
kengert at fedoraproject.org
Mon Dec 10 14:26:14 UTC 2012
commit 8f4a0933cb08f81c112e43253d2d2cea114f66da
Author: Kai Engert <kaie at redhat.com>
Date: Mon Dec 10 15:25:45 2012 +0100
fix the build and address re-review comments
pdfedit-fixbuild.patch | 35 ++++++++++++++++++++++++++++++++++
pdfedit.spec | 49 ++++++++++++++++++++++-------------------------
2 files changed, 58 insertions(+), 26 deletions(-)
---
diff --git a/pdfedit-fixbuild.patch b/pdfedit-fixbuild.patch
new file mode 100644
index 0000000..ffad56c
--- /dev/null
+++ b/pdfedit-fixbuild.patch
@@ -0,0 +1,35 @@
+diff -up ./src/gui/rect2Darray.h.045f17 ./src/gui/rect2Darray.h
+--- ./src/gui/rect2Darray.h.045f17 2009-04-06 17:24:50.000000000 +0200
++++ ./src/gui/rect2Darray.h 2012-12-07 23:15:09.703862328 +0100
+@@ -305,7 +305,7 @@ void RectArray<T>::myAppend ( const BBox
+ minY = std::min( minY, item->top() );
+ maxY = std::max( maxY, item->bottom() );
+ }
+- append( item );
++ this->append( item );
+ }
+
+ template <typename T>
+@@ -461,7 +461,7 @@ void Rect2DArray<T>::myAppend( BBoxOfObj
+ if (toAppend) {
+ current = new RectArray<T>();
+ current->myAppend( bbox );
+- append( current );
++ this->append( current );
+ }
+ }
+
+diff -up ./src/kernel/cobject2xpdf.cc.045f17 ./src/kernel/cobject2xpdf.cc
+--- ./src/kernel/cobject2xpdf.cc.045f17 2009-09-11 14:02:56.000000000 +0200
++++ ./src/kernel/cobject2xpdf.cc 2012-12-07 23:15:33.847932118 +0100
+@@ -718,6 +718,10 @@ simpleValueFromXpdfObj (const Object& ob
+ rp (obj,val);
+ }
+
++template
++void
++simpleValueFromXpdfObj<pReal, double&> (const Object&, double& val);
++
+ //
+ // Special case for pNull
+ //
diff --git a/pdfedit.spec b/pdfedit.spec
index 84f8255..a3625ff 100644
--- a/pdfedit.spec
+++ b/pdfedit.spec
@@ -1,6 +1,6 @@
Name: pdfedit
Version: 0.4.5
-Release: 4%{?dist}
+Release: 6%{?dist}
Summary: A complete pdf document editing solution
Group: Applications/Publishing
@@ -9,23 +9,16 @@ URL: http://sourceforge.net/projects/pdfedit/
Source0: http://downloads.sourceforge.net/pdfedit/%{name}-%{version}.tar.bz2
Source1: pdfedit.desktop
Source2: pdfedit_event.conf
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch1: pdfedit-fixbuild.patch
BuildRequires: boost-devel
-%if 0%{?rhel}
BuildRequires: openmotif-devel
-%else
-BuildRequires: lesstif-devel
-%endif
BuildRequires: libpaper-devel
-BuildRequires: libXpm-devel, t1lib-devel
-BuildRequires: desktop-file-utils, doxygen
-
-%if 0%{?fedora} >= 9
+BuildRequires: libXpm-devel
+BuildRequires: t1lib-devel
+BuildRequires: desktop-file-utils
+BuildRequires: doxygen
BuildRequires: qt3-devel
-%else
-BuildRequires: qt-devel
-%endif
%description
Free pdf editing using PdfEdit. Complete editing of pdf documents is made
@@ -36,12 +29,14 @@ everything is based on a script.
%prep
%setup -q
+%patch1 -p0 -b .fixbuild
# fix paths to be relative to rpm build root
sed -i 's/\(.path\s\+= \)/\1$(QMAKE_DESTDIR)\//' src/gui/pdfedit.pro
%build
export QMAKESPEC=linux-g++
+export QTDIR=`pkg-config qt-mt --variable=prefix`
# Tools aren't actually installed, so not building them now
# --enable-pdfedit-core-dev --enable-tools
%configure
@@ -49,7 +44,8 @@ make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
+export QMAKESPEC=linux-g++
+export QTDIR=`pkg-config qt-mt --variable=prefix`
# DESTDIR is reserved in qmake
make install INSTALL_ROOT=$RPM_BUILD_ROOT
@@ -58,7 +54,7 @@ mv $RPM_BUILD_ROOT%{_docdir}/%{name} \
$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
# install desktop file
-desktop-file-install --vendor="fedora" \
+desktop-file-install \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
%{SOURCE1}
@@ -79,26 +75,21 @@ mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/abrt/events.d
cp -p %SOURCE2 $RPM_BUILD_ROOT/%{_sysconfdir}/abrt/events.d/
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%post
update-desktop-database &> /dev/null ||:
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
update-desktop-database &> /dev/null ||:
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+ /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
-%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/abrt/events.d/pdfedit_event.conf
%{_bindir}/*
%{_mandir}/man1/*
@@ -109,6 +100,12 @@ fi
%changelog
+* Fri Dec 08 2012 Kai Engert <kaie at redhat.com> - 0.4.5-6
+- address package re-review comments, bz#885467
+
+* Fri Dec 07 2012 Kai Engert <kaie at redhat.com> - 0.4.5-5
+- Fix the build on Fedora 17
+
* Mon May 16 2011 Orion Poplawski <orion at cora.nwra.com> - 0.4.5-4
- Prevent abrt reports
More information about the scm-commits
mailing list