diff --git a/community/texmaker/PKGBUILD b/community/texmaker/PKGBUILD new file mode 100644 index 000000000..90fd48bbe --- /dev/null +++ b/community/texmaker/PKGBUILD @@ -0,0 +1,34 @@ +# $Id$ +#Maintainer: Federico Cinelli <cinelli@aur.archlinux.org> + +# ALARM: Kevin Mihelich <kevin@archlinuxarm.org> +# - ARM patch to fix qreal issue + +pkgname=texmaker +pkgver=4.0.1 +pkgrel=1 +pkgdesc='Free cross-platform LaTeX editor' +arch=('i686' 'x86_64') +url="http://www.xm1math.net/texmaker/index.html" +license=('GPL') +depends=('poppler-qt' 'qtwebkit') +optdepends=('ghostscript: LaTeX to HTML conversion command' + 'ibus-qt: accented characters support'bu + 'poppler: PDF rendering support') +install="$pkgname.install" +source=("http://www.xm1math.net/$pkgname/$pkgname-$pkgver.tar.bz2" arm.patch) +md5sums=('62f87f7b44e92ca68817663d3d5aeca4' + '1457390a811e66ca0587828666122b9d') + +build() { + cd "$pkgname-$pkgver" + patch -p0 -i "$srcdir"/arm.patch + qmake-qt4 PREFIX=/usr texmaker.pro + make +} +package() { + cd "$srcdir/$pkgname-$pkgver" + + install -dm755 "$pkgdir/usr/share" + make INSTALL_PATH="$pkgdir" INSTALL_ROOT="$pkgdir" PREFIX="/usr" install +} diff --git a/community/texmaker/arm.patch b/community/texmaker/arm.patch new file mode 100644 index 000000000..5d68de372 --- /dev/null +++ b/community/texmaker/arm.patch @@ -0,0 +1,78 @@ +--- documentview.cpp 2012-10-30 14:17:33.000000000 +0000 ++++ documentview.cpp 2012-11-22 23:15:58.901398313 +0000 +@@ -673,12 +673,12 @@ + { + PageItem* page = m_pages.at(m_currentPage - 1); + +- setScaleFactor(qMin(page->scaleFactor() + 0.1, s_maximumScaleFactor)); ++ setScaleFactor(qMin(qreal(page->scaleFactor() + 0.1), s_maximumScaleFactor)); + setScaleMode(ScaleFactor); + } + else + { +- setScaleFactor(qMin(scaleFactor() + 0.1, s_maximumScaleFactor)); ++ setScaleFactor(qMin(qreal(scaleFactor() + 0.1), s_maximumScaleFactor)); + } + } + +@@ -689,12 +689,12 @@ + { + PageItem* page = m_pages.at(m_currentPage - 1); + +- setScaleFactor(qMax(page->scaleFactor() - 0.1, s_minimumScaleFactor)); ++ setScaleFactor(qMax(qreal(page->scaleFactor() - 0.1), s_minimumScaleFactor)); + setScaleMode(ScaleFactor); + } + else + { +- setScaleFactor(qMax(scaleFactor() - 0.1, s_minimumScaleFactor)); ++ setScaleFactor(qMax(qreal(scaleFactor() - 0.1), s_minimumScaleFactor)); + } + } + +@@ -1342,7 +1342,7 @@ + + pageHeight = boundingRect.height(); + +- left = qMin(left, -boundingRect.width() - 1.5 * s_pageSpacing); ++ left = qMin(left, qreal(-boundingRect.width() - 1.5 * s_pageSpacing)); + } + else + { +@@ -1350,7 +1350,7 @@ + + pageHeight = qMax(pageHeight, boundingRect.height()); + +- right = qMax(right, boundingRect.width() + 1.5 * s_pageSpacing); ++ right = qMax(right, qreal(boundingRect.width() + 1.5 * s_pageSpacing)); + height += pageHeight + s_pageSpacing; + } + } +@@ -1362,15 +1362,15 @@ + + pageHeight = boundingRect.height(); + +- left = qMin(left, -0.5 * boundingRect.width() - s_pageSpacing); +- right = qMax(right, 0.5 * boundingRect.width() + s_pageSpacing); ++ left = qMin(left, qreal(-0.5 * boundingRect.width() - s_pageSpacing)); ++ right = qMax(right, qreal(0.5 * boundingRect.width() + s_pageSpacing)); + height += pageHeight + s_pageSpacing; + } + } + + if(m_twoPagesMode && m_numberOfPages % 2 != 0) + { +- right = qMax(right, 0.5 * s_pageSpacing); ++ right = qMax(right, qreal(0.5 * s_pageSpacing)); + height += pageHeight + s_pageSpacing; + } + +@@ -1424,7 +1424,7 @@ + QRectF boundingRect = page->boundingRect().translated(page->pos()); + + top = qMin(top, boundingRect.top() - s_pageSpacing); +- height = qMax(height, boundingRect.height() + 2.0 * s_pageSpacing); ++ height = qMax(height, qreal(boundingRect.height() + 2.0 * s_pageSpacing)); + } + else + { diff --git a/community/texmaker/texmaker.install b/community/texmaker/texmaker.install new file mode 100644 index 000000000..9591f6c5d --- /dev/null +++ b/community/texmaker/texmaker.install @@ -0,0 +1,7 @@ +post_install() { + update-desktop-database -q +} + +post_remove() { + update-desktop-database -q +}