Fix Qt4/ARM build with Tw_ARM2.patch
- Use Qt5 on Fedora >= 22
This commit is contained in:
parent
704a9b00a8
commit
a4c38919d4
|
@ -0,0 +1,22 @@
|
|||
diff --git a/src/PDFDocument.cpp b/src/PDFDocument.cpp
|
||||
index a6cabec..394f31b 100644
|
||||
--- a/src/PDFDocument.cpp
|
||||
+++ b/src/PDFDocument.cpp
|
||||
@@ -1831,9 +1831,14 @@ void PDFDocument::doFindAgain(bool newSearch /* = false */)
|
||||
|
||||
for (pageIdx = firstPage; pageIdx != lastPage; pageIdx += deltaPage) {
|
||||
page = document->page(pageIdx);
|
||||
-
|
||||
- double left, top, bottom, right;
|
||||
- lastSearchResult.selRect.getCoords(&left, &top, &right, &bottom);
|
||||
+ // Note: do _not_ use lastSearchResult.selRect.getCoords() as that
|
||||
+ // requires pointers to qreal, which may be float or double,
|
||||
+ // depending on the platform. As poppler requires (references to
|
||||
+ // double, we use double here.
|
||||
+ double left = lastSearchResult.selRect.left();
|
||||
+ double right = lastSearchResult.selRect.right();
|
||||
+ double top = lastSearchResult.selRect.top();
|
||||
+ double bottom = lastSearchResult.selRect.bottom();
|
||||
if (page->search(searchText, left, top, right, bottom, searchDir, searchMode)) {
|
||||
lastSearchResult.selRect.setCoords(left, top, right, bottom);
|
||||
lastSearchResult.doc = this;
|
|
@ -1,15 +1,34 @@
|
|||
%if 0%{?fedora} >= 22
|
||||
%global use_qt5 1
|
||||
%endif
|
||||
|
||||
Name: texworks
|
||||
Version: 0.4.6
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A simple IDE for authoring TeX documents
|
||||
|
||||
Group: Applications/Editors
|
||||
License: GPLv2+
|
||||
URL: http://tug.org/texworks/
|
||||
Source0: https://github.com/TeXworks/texworks/archive/release-%{version}/texworks-release-%{version}.tar.gz
|
||||
# don't assume qreal is double, fix ARM build, emailed from upstream
|
||||
Patch0: Tw_ARM2.patch
|
||||
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: hunspell-devel
|
||||
%if 0%{?use_qt5}
|
||||
BuildRequires: poppler-qt5-devel
|
||||
BuildRequires: pkgconfig(Qt5UiTools)
|
||||
BuildRequires: pkgconfig(Qt5Widgets)
|
||||
BuildRequires: pkgconfig(Qt5Gui)
|
||||
BuildRequires: pkgconfig(Qt5UiTools)
|
||||
BuildRequires: pkgconfig(Qt5Script)
|
||||
BuildRequires: pkgconfig(Qt5ScriptTools)
|
||||
BuildRequires: pkgconfig(Qt5DBus)
|
||||
BuildRequires: zlib-devel
|
||||
%else
|
||||
BuildRequires: poppler-qt4-devel
|
||||
%endif
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: lua-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
|
@ -25,11 +44,16 @@ You may install the texlive-* packages to make this program useful.
|
|||
|
||||
%prep
|
||||
%setup -q -n %{name}-release-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
mkdir build
|
||||
pushd build
|
||||
%cmake .. -DWITH_PYTHON=ON -DTW_BUILD_ID=Fedora -DTeXworks_DIC_DIR=%{_datadir}/myspell -DTeXworks_PLUGIN_DIR=%{_libdir}/texworks -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
%cmake .. -DWITH_PYTHON=ON -DTW_BUILD_ID=Fedora -DTeXworks_DIC_DIR=%{_datadir}/myspell -DTeXworks_PLUGIN_DIR=%{_libdir}/texworks -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
%if 0%{?use_qt5}
|
||||
-DDESIRED_QT_VERSION=5
|
||||
%endif
|
||||
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
|
||||
|
@ -55,6 +79,10 @@ update-desktop-database &> /dev/null || :
|
|||
|
||||
|
||||
%changelog
|
||||
* Fri Apr 17 2015 Robin Lee <cheeselee@fedoraproject.org> - 0.4.6-2
|
||||
- Fix Qt4/ARM build with Tw_ARM2.patch
|
||||
- Use Qt5 on Fedora >= 22
|
||||
|
||||
* Sat Apr 11 2015 Robin Lee <cheeselee@fedoraproject.org> - 0.4.6-1
|
||||
- Update to 0.4.6
|
||||
|
||||
|
|
Loading…
Reference in New Issue