Texmaker

Make a PKGBUILD? Submit it here for user review and possible placement into the repository.

Texmaker

Postby heday » Sat Nov 24, 2012 1:25 am

Hi all,

I patched Archlinux's texmaker pkgbuild. Now it works on Raspberry Pi
PKGBUILD
$this->bbcode_second_pass_code('', '
# Maintainer: Maximilian Braeutigam < max - braeu at gmx.de >
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: furester <xfurester@hotmail.com>
# Contributor: Firmicus <firmicus gmx net>
# Contributor: Paulo Matias <matiasΘarchlinux-br·org>
# Contributor: Fabio Lima <fheday@gmail.com>>

pkgname=texmaker
pkgver=3.5.2
pkgrel=4
pkgdesc='Free cross-platform latex editor'
arch=('i686' 'x86_64' 'armv6h')
url="http://www.xm1math.net/texmaker/index.html"
license=('GPL')
install='texmaker.install'
depends=('poppler-qt' 'ghostscript' 'qtwebkit')
optdepends=('ibus-qt: accented characters support')
source=("http://www.xm1math.net/texmaker/texmaker-${pkgver}.tar.bz2" "patch.diff")
md5sums=('45eebb530e9516215665faf6d9dffe09'
'd27bdafcbd9b772056b22ce111a7ade8')
sha1sums=('0297653750bca7eff99f4a2ee4bc1514eba72a3a'
'4a173377c2eacb2011bc2905bb2df3c73ec1d3a7')
build() {

patch texmaker-${pkgver}/documentview.cpp < ../patch.diff

cd texmaker-${pkgver}

export INSTALL_ROOT=${pkgdir}

qmake -unix PREFIX=//usr texmaker.pro

make
}

package() {
cd texmaker-${pkgver}

export INSTALL_PATH=${pkgdir}

make install
}
')

patch.diff:
$this->bbcode_second_pass_code('', '
--- 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
{
')

Hope it is useful.
Attachments
texmaker-3.5.2-4.src.tar.gz
source pkg and patch
(1.51 KiB) Downloaded 536 times
heday
 
Posts: 2
Joined: Fri Aug 03, 2012 11:01 am

Return to User-Submitted Packages

Who is online

Users browsing this forum: No registered users and 5 guests