cheeselee pushed to texworks (master). "Fix Qt4/ARM build with Tw_ARM2.patch (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon Apr 20 11:16:09 UTC 2015
>From a4c38919d4e03a7d57b6f29463ccddbb1ab86fbe Mon Sep 17 00:00:00 2001
From: Robin Lee <cheeselee at fedoraproject.org>
Date: Fri, 17 Apr 2015 16:12:21 +0800
Subject: Fix Qt4/ARM build with Tw_ARM2.patch - Use Qt5 on Fedora >= 22
diff --git a/Tw_ARM2.patch b/Tw_ARM2.patch
new file mode 100644
index 0000000..7b53ef6
--- /dev/null
+++ b/Tw_ARM2.patch
@@ -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;
diff --git a/texworks.spec b/texworks.spec
index 2d473b3..d92b602 100644
--- a/texworks.spec
+++ b/texworks.spec
@@ -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 at 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 at fedoraproject.org> - 0.4.6-1
- Update to 0.4.6
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/texworks.git/commit/?h=master&id=a4c38919d4e03a7d57b6f29463ccddbb1ab86fbe
More information about the scm-commits
mailing list