summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2012-07-15 09:31:51 +0000
committerJustin Lecher <jlec@gentoo.org>2012-07-15 09:31:51 +0000
commit809e77ee9c7819a4e49790e482f80b4708625ce9 (patch)
treede279d8488d1e2015fca65d891062146a73c3e39 /app-office
parentRemove old version. (diff)
downloadgentoo-2-809e77ee9c7819a4e49790e482f80b4708625ce9.tar.gz
gentoo-2-809e77ee9c7819a4e49790e482f80b4708625ce9.tar.bz2
gentoo-2-809e77ee9c7819a4e49790e482f80b4708625ce9.zip
app-office/texstudio: Fix compilation with gg-4.6 whichw as broken by gcc-4.7 patch, #422619; imported a couple of patches form fedora including support of xdg-open and desktop file installation
(Portage version: 2.2.0_alpha118/cvs/Linux x86_64)
Diffstat (limited to 'app-office')
-rw-r--r--app-office/texstudio/ChangeLog11
-rw-r--r--app-office/texstudio/files/texstudio-2.3-gcc47.patch19
-rw-r--r--app-office/texstudio/files/texstudio-2.3-test.patch29
-rw-r--r--app-office/texstudio/files/texstudio-2.3-xdg-open.patch61
-rw-r--r--app-office/texstudio/texstudio-2.3-r1.ebuild62
5 files changed, 171 insertions, 11 deletions
diff --git a/app-office/texstudio/ChangeLog b/app-office/texstudio/ChangeLog
index 8bf5c78b8ef5..dd1a66dec46c 100644
--- a/app-office/texstudio/ChangeLog
+++ b/app-office/texstudio/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-office/texstudio
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/texstudio/ChangeLog,v 1.4 2012/06/20 19:09:57 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/texstudio/ChangeLog,v 1.5 2012/07/15 09:31:51 jlec Exp $
+
+*texstudio-2.3-r1 (15 Jul 2012)
+
+ 15 Jul 2012; Justin Lecher <jlec@gentoo.org> +texstudio-2.3-r1.ebuild,
+ files/texstudio-2.3-gcc47.patch, +files/texstudio-2.3-test.patch,
+ +files/texstudio-2.3-xdg-open.patch:
+ Fix compilation with gg-4.6 whichw as broken by gcc-4.7 patch, #422619;
+ imported a couple of patches form fedora including support of xdg-open and
+ desktop file installation
20 Jun 2012; Justin Lecher <jlec@gentoo.org> texstudio-2.3.ebuild,
+files/texstudio-2.3-gcc47.patch:
diff --git a/app-office/texstudio/files/texstudio-2.3-gcc47.patch b/app-office/texstudio/files/texstudio-2.3-gcc47.patch
index faa5173720b8..bdc1fedd858f 100644
--- a/app-office/texstudio/files/texstudio-2.3-gcc47.patch
+++ b/app-office/texstudio/files/texstudio-2.3-gcc47.patch
@@ -1,6 +1,6 @@
qcodeedit/lib/document/qdocumentcommand.cpp | 1 +
- qtsingleapplication/qtlocalpeer.cpp | 6 +++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ qtsingleapplication/qtlocalpeer.cpp | 5 +++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/qcodeedit/lib/document/qdocumentcommand.cpp b/qcodeedit/lib/document/qdocumentcommand.cpp
index 308e4e4..35b7d9f 100644
@@ -15,7 +15,7 @@ index 308e4e4..35b7d9f 100644
/*!
\brief ctor
diff --git a/qtsingleapplication/qtlocalpeer.cpp b/qtsingleapplication/qtlocalpeer.cpp
-index 120a8e8..cab57cd 100644
+index 120a8e8..fa32ff2 100644
--- a/qtsingleapplication/qtlocalpeer.cpp
+++ b/qtsingleapplication/qtlocalpeer.cpp
@@ -48,9 +48,9 @@
@@ -30,12 +30,11 @@ index 120a8e8..cab57cd 100644
#if defined(Q_OS_WIN)
#include <QtCore/QLibrary>
-@@ -103,7 +103,7 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
- socketName += QLatin1Char('-') + QString::number(sessionId, 16);
- }
- #else
-- socketName += QLatin1Char('-') + QString::number(::getuid(), 16);
-+ socketName += QLatin1Char('-') + QString::number(QtLP_Private::getuid(), 16);
+@@ -60,6 +60,7 @@ static PProcessIdToSessionId pProcessIdToSessionId = 0;
+ #endif
+ #if defined(Q_OS_UNIX)
+ #include <time.h>
++#include <unistd.h>
#endif
- server = new QLocalServer(this);
+ namespace QtLP_Private {
diff --git a/app-office/texstudio/files/texstudio-2.3-test.patch b/app-office/texstudio/files/texstudio-2.3-test.patch
new file mode 100644
index 000000000000..b3989e29bcde
--- /dev/null
+++ b/app-office/texstudio/files/texstudio-2.3-test.patch
@@ -0,0 +1,29 @@
+From cb478565396b325a0860747a3c9c90789b13aea1 Mon Sep 17 00:00:00 2001
+From: hannes <hannes@fedoraproject.org>
+Date: Thu, 16 Feb 2012 20:49:50 +0000
+Subject: [PATCH] Fix the testcase build failure
+
+---
+ tests/qsearchreplacepanel_t.cpp | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/qsearchreplacepanel_t.cpp b/tests/qsearchreplacepanel_t.cpp
+index e043f8b..22d6013 100644
+--- tests/qsearchreplacepanel_t.cpp
++++ tests/qsearchreplacepanel_t.cpp
+@@ -213,9 +213,9 @@ void QSearchReplacePanelTest::incrementalsearch(){
+ widget->cFind->lineEdit()->cursorForward(false,search.length());
+ QTest::keyClick(widget->cFind->lineEdit(),search[search.length()-1].toLatin1());
+ }
+- QDocumentCursor s=ed->cursor().selectionStart();
+- QEQUAL2(s.lineNumber(), cy, search+" "+ed->cursor().selectedText()+" "+QString::number(loop));
+- QEQUAL2(s.columnNumber(), cx, search+" "+ed->cursor().selectedText());
++ QDocumentCursor c=ed->cursor().selectionStart();
++ QEQUAL2(c.lineNumber(), cy, search+" "+ed->cursor().selectedText()+" "+QString::number(loop));
++ QEQUAL2(c.columnNumber(), cx, search+" "+ed->cursor().selectedText());
+ QEQUAL2(ed->cursor().selectedText(), res, search+" "+ed->cursor().selectedText());
+ //searching shouldn't change highlighted selection
+ QCEMULTIEQUAL(getHighlightedSelection(ed), panel->getSearchScope(), ed->document()->cursor(scopey1,scopex1,scopey2,scopex2));
+--
+1.7.7.6
+
diff --git a/app-office/texstudio/files/texstudio-2.3-xdg-open.patch b/app-office/texstudio/files/texstudio-2.3-xdg-open.patch
new file mode 100644
index 000000000000..b008bc2a1fc9
--- /dev/null
+++ b/app-office/texstudio/files/texstudio-2.3-xdg-open.patch
@@ -0,0 +1,61 @@
+From 2ae917fad7cd4e5d3043e3ab3f1cfe4faa63f532 Mon Sep 17 00:00:00 2001
+From: Haikel Guemar <haikel.guemar@sysfera.com>
+Date: Thu, 28 Jul 2011 16:55:32 +0200
+Subject: [PATCH 1/3] viewers: use xdg-open
+
+---
+ buildmanager.cpp | 22 +++++-----------------
+ 1 files changed, 5 insertions(+), 17 deletions(-)
+
+diff --git buildmanager.cpp buildmanager.cpp
+index 1441564..d8986bb 100644
+--- buildmanager.cpp
++++ buildmanager.cpp
+@@ -460,23 +460,11 @@ QString BuildManager::guessCommandName(LatexCommand cmd) {
+ // kdvi "file:%.dvi#src:@ %.tex"
+ switch (cmd) {
+ case CMD_VIEWDVI:
+- switch (x11desktop_env()) {
+- case 3: return "kdvi %.dvi > /dev/null";
+- case 4: return "okular %.dvi > /dev/null";
+- default:return "evince %.dvi > /dev/null";
+- };
++ return "xdg-open %.dvi > /dev/null";
+ case CMD_VIEWPS:
+- switch (x11desktop_env()) {
+- case 3: return "kghostview %.ps > /dev/null";
+- case 4: return "okular %.ps > /dev/null";
+- default:return "evince %.ps > /dev/null";
+- };
++ return "xdg-open %.ps > /dev/null";
+ case CMD_VIEWPDF:
+- switch (x11desktop_env()) {
+- case 3: return "kpdf %.pdf > /dev/null";
+- case 4: return "okular %.pdf > /dev/null";
+- default:return "evince %.pdf > /dev/null";
+- };
++ return "xdg-open %.pdf > /dev/null";
+ default:;
+ }
+ #endif
+@@ -610,7 +598,7 @@ void BuildManager::setLatexCommand(LatexCommand cmd, const QString &cmdString){
+ ((unquote == baseName) ||
+ ( (unquote.endsWith(QDir::separator() + baseName) || unquote.endsWith("/" + baseName))
+ && (!unquote.contains(" ") || (!unquote.contains('"') && unquote != trimmed)) //spaces mean options, if not everything is quoted
+- && (QFileInfo(unquote).exists())
++ && (QFileInfo(unquote).exists())
+ )
+ ))
+ commands[cmd] = cmdString + " " + defaultCommandOptions(cmd);
+@@ -619,7 +607,7 @@ void BuildManager::setLatexCommand(LatexCommand cmd, const QString &cmdString){
+ }
+ }
+
+-QString BuildManager::getLatexCommand(LatexCommand cmd){
++QString BuildManager::getLatexCommand(LatexCommand cmd){
+ return commands[cmd];
+ }
+ QString BuildManager::getLatexCommandForDisplay(LatexCommand cmd){
+--
+1.7.4.4
+
diff --git a/app-office/texstudio/texstudio-2.3-r1.ebuild b/app-office/texstudio/texstudio-2.3-r1.ebuild
new file mode 100644
index 000000000000..1e27dccc7000
--- /dev/null
+++ b/app-office/texstudio/texstudio-2.3-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-office/texstudio/texstudio-2.3-r1.ebuild,v 1.1 2012/07/15 09:31:51 jlec Exp $
+
+EAPI=4
+
+inherit base qt4-r2
+
+DESCRIPTION="Free cross-platform LaTeX editor (former texmakerX)"
+HOMEPAGE="http://texstudio.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/TeXstudio%20${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="video"
+
+COMMON_DEPEND="
+ app-text/hunspell
+ app-text/poppler[qt4]
+ x11-libs/libX11
+ x11-libs/libXext
+ >=x11-libs/qt-gui-4.6.1:4
+ >=x11-libs/qt-core-4.6.1:4
+ >=x11-libs/qt-script-4.6.1:4
+ >=x11-libs/qt-test-4.6.1:4
+ >=x11-libs/qt-webkit-4.6.1:4
+ video? ( media-libs/phonon )"
+RDEPEND="${COMMON_DEPEND}
+ virtual/latex-base
+ app-text/psutils
+ app-text/ghostscript-gpl
+ media-libs/netpbm"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/-/}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-hunspell.patch
+ "${FILESDIR}"/${P}-gcc47.patch
+ "${FILESDIR}"/${P}-test.patch
+ "${FILESDIR}"/${P}-xdg-open.patch
+ )
+
+src_prepare() {
+ find hunspell -delete
+ sed 's:hunspell/hunspell:hunspell:g' -i *.h || die
+ if use video; then
+ sed "/^PHONON/s:$:true:g" -i ${PN}.pro || die
+ fi
+ qt4-r2_src_prepare
+}
+
+src_install() {
+ make_desktop_entry texstudio "LaTeX Editor" texstudio "text/x-tex"
+ for i in 16x16 22x22 32x32 48x48 64x64; do
+ insinto /usr/share/icons/hicolor/${i}
+ newins utilities/${PN}${i}.png ${PN}.png
+ done
+ qt4-r2_src_install
+}