summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO30
-rw-r--r--PKGBUILD46
-rw-r--r--archlinux-phonon.patch12
-rw-r--r--qt-5.6.0.patch25
-rw-r--r--texstudio-phonon.install14
5 files changed, 127 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..11f0283e02df
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = texstudio-phonon
+ pkgdesc = Fork of the LaTeX IDE TexMaker. Gives you an environment where you can easily create and manage LaTeX documents. Built with Phonon.
+ pkgver = 2.10.8
+ pkgrel = 1
+ url = http://texstudio.sourceforge.net/
+ install = texstudio-phonon.install
+ arch = i686
+ arch = x86_64
+ license = GPLv2
+ makedepends = sed
+ makedepends = qt5-tools
+ depends = poppler-qt5
+ depends = phonon-qt5
+ depends = qt5-svg
+ depends = qt5-script
+ depends = texlive-core
+ optdepends = evince: pdf reader,
+ optdepends = okular: alternate pdf reader
+ provides = texstudio
+ replaces = texmakerx
+ replaces = texstudio
+ source = http://downloads.sourceforge.net/texstudio/texstudio-2.10.8.tar.gz
+ source = archlinux-phonon.patch
+ source = qt-5.6.0.patch
+ sha256sums = 0a569544ceb0ff92e52ed57a34e8eb12e7a16eef1209320737aef5d5b81b3404
+ sha256sums = 8efdaf94a99e41ea2e5276fca8788e55ae502ee707100e5aeaad0ed05753c8d9
+ sha256sums = 661cf3a6c423c1077f124835655ccca20b79d846926a74ea88688e00b760e175
+
+pkgname = texstudio-phonon
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4c5fdc43350a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Larry Hajali <larryhaja [at] gmail [dot] com>
+
+pkgname=texstudio-phonon
+_srcname=texstudio
+pkgver=2.10.8
+pkgrel=1
+pkgdesc="Fork of the LaTeX IDE TexMaker. Gives you an environment where you can easily create and manage LaTeX documents. Built with Phonon."
+arch=('i686' 'x86_64')
+url="http://texstudio.sourceforge.net/"
+license=('GPLv2')
+depends=('poppler-qt5' 'phonon-qt5' 'qt5-svg' 'qt5-script' 'texlive-core')
+makedepends=('sed' 'qt5-tools')
+optdepends=('evince: pdf reader', 'okular: alternate pdf reader')
+replaces=('texmakerx' 'texstudio')
+provides=('texstudio')
+install=$pkgname.install
+source=("http://downloads.sourceforge.net/${_srcname}/${_srcname}-${pkgver}.tar.gz"
+ 'archlinux-phonon.patch'
+ 'qt-5.6.0.patch')
+sha256sums=('0a569544ceb0ff92e52ed57a34e8eb12e7a16eef1209320737aef5d5b81b3404'
+ '8efdaf94a99e41ea2e5276fca8788e55ae502ee707100e5aeaad0ed05753c8d9'
+ '661cf3a6c423c1077f124835655ccca20b79d846926a74ea88688e00b760e175')
+
+build() {
+ cd "${srcdir}/${_srcname}${pkgver}"
+ # Patch include path for phonon detection on archlinux.
+ patch -p1 -d pdfviewer < "${srcdir}"/archlinux-phonon.patch
+ # Patch for qt >= 5.6.0.
+ patch -p1 < "${srcdir}"/qt-5.6.0.patch
+ # Fix .desktop item.
+ sed -i -e '/^Encoding/d' -e "/^Icon/s|=.*|=${_srcname}|" utilities/${_srcname}.desktop
+ qmake-qt5 PREFIX=/usr QMAKE_CFLAGS+="${CFLAGS}" QMAKE_CXXFLAGS+="${CXXFLAGS}" \
+ PHONON=true INCLUDEPATH+="/usr/include/poppler/qt5" \
+ CONFIG-="debug" -o Makefile texstudio.pro
+ make
+}
+
+package() {
+ cd "${srcdir}/${_srcname}${pkgver}"
+ make INSTALL_ROOT="$pkgdir" install
+ for _i in 16 22 32 48 64 128; do
+ install -D -m 0644 utilities/${_srcname}${_i}x${_i}.png \
+ "${pkgdir}"/usr/share/icons/hicolor/${_i}x${_i}/apps/${_srcname}.png
+ done
+ install -D -m 0644 utilities/${_srcname}.svg "${pkgdir}"/usr/share/icons/hicolor/scalable/apps/${_srcname}.svg
+}
diff --git a/archlinux-phonon.patch b/archlinux-phonon.patch
new file mode 100644
index 000000000000..94e1bc0e019b
--- /dev/null
+++ b/archlinux-phonon.patch
@@ -0,0 +1,12 @@
+diff -Naur texstudio2.6.6.orig/PDFDocument.h texstudio2.6.6/PDFDocument.h
+--- texstudio2.6.6.orig/PDFDocument.h 2013-11-02 22:23:51.000000000 +0000
++++ texstudio2.6.6/PDFDocument.h 2014-01-05 06:44:39.803435721 +0000
+@@ -91,7 +91,7 @@
+ };
+
+ #ifdef PHONON
+-#include <Phonon/VideoPlayer>
++#include <phonon/VideoPlayer>
+
+ class PDFMovie: public Phonon::VideoPlayer
+ {
diff --git a/qt-5.6.0.patch b/qt-5.6.0.patch
new file mode 100644
index 000000000000..1785c0258c46
--- /dev/null
+++ b/qt-5.6.0.patch
@@ -0,0 +1,25 @@
+diff -Naur texstudio2.10.8.orig/pdfviewer/PDFDocument.cpp texstudio2.10.8/pdfviewer/PDFDocument.cpp
+--- texstudio2.10.8.orig/pdfviewer/PDFDocument.cpp 2016-01-20 20:40:13.000000000 +0000
++++ texstudio2.10.8/pdfviewer/PDFDocument.cpp 2016-03-30 19:57:06.096666655 +0000
+@@ -965,17 +965,17 @@
+
+ scrollArea->goToPage(page);
+
+- if (isnan(xinpdf)) xinpdf = 0;
++ if (std::isnan(xinpdf)) xinpdf = 0;
+ xinpdf = qBound<float>(0, xinpdf, 1);
+- if (isnan(yinpdf)) yinpdf = 0;
++ if (std::isnan(yinpdf)) yinpdf = 0;
+ yinpdf = qBound<float>(0, yinpdf, 1);
+
+ QPoint p = mapFromScaledPosition(page, QPointF( xinpdf, yinpdf));
+
+- if (!isnan(xinpdf))
++ if (!std::isnan(xinpdf))
+ scrollArea->horizontalScrollBar()->setValue(p.x());
+
+- if (!isnan(yinpdf)) {
++ if (!std::isnan(yinpdf)) {
+ int val = 0;
+ if (scrollArea->getContinuous())
+ val = scrollArea->verticalScrollBar()->value();
diff --git a/texstudio-phonon.install b/texstudio-phonon.install
new file mode 100644
index 000000000000..be2dfcf1b9c3
--- /dev/null
+++ b/texstudio-phonon.install
@@ -0,0 +1,14 @@
+post_install() {
+ update-desktop-database -q
+ xdg-icon-resource forceupdate --theme hicolor
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ update-desktop-database -q
+ xdg-icon-resource forceupdate --theme hicolor
+}
+