diff --git a/.gitignore b/.gitignore index e69de29..ed5a532 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/texstudio-2.2.tar.gz diff --git a/sources b/sources index e69de29..51fcc4e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d23cf71c90f3fd950d49bf480285e920 texstudio-2.2.tar.gz diff --git a/texstudio-use-system-hunspell-instead-of-bundled-one.patch b/texstudio-use-system-hunspell-instead-of-bundled-one.patch new file mode 100644 index 0000000..1c365e3 --- /dev/null +++ b/texstudio-use-system-hunspell-instead-of-bundled-one.patch @@ -0,0 +1,94 @@ +From e14c4085029e89da0006a83e72e20e8da29092fd Mon Sep 17 00:00:00 2001 +From: Haikel Guemar +Date: Thu, 28 Jul 2011 17:01:34 +0200 +Subject: [PATCH 2/3] use system hunspell instead of bundled one + +--- + spellerutility.h | 2 +- + texstudio.pro | 38 +++++++------------------------------- + 2 files changed, 8 insertions(+), 32 deletions(-) + +diff --git spellerutility.h spellerutility.h +index 730920e..bb996e2 100644 +--- spellerutility.h ++++ spellerutility.h +@@ -13,7 +13,7 @@ + + #include "mostQtHeaders.h" + +-#include "hunspell/hunspell.hxx" ++#include + class SpellerUtility: public QObject { + Q_OBJECT + public: +diff --git texstudio.pro texstudio.pro +index 437a376..c0b67da 100644 +--- texstudio.pro ++++ texstudio.pro +@@ -55,24 +55,6 @@ HEADERS += texmaker.h \ + codesnippet.h \ + thesaurusdialog.h \ + xmltagslistwidget.h \ +- hunspell/affentry.hxx \ +- hunspell/affixmgr.hxx \ +- hunspell/atypes.hxx \ +- hunspell/baseaffix.hxx \ +- hunspell/csutil.hxx \ +- hunspell/dictmgr.hxx \ +- hunspell/hashmgr.hxx \ +- hunspell/htypes.hxx \ +- hunspell/hunspell.hxx \ +- hunspell/hunspell.h \ +- hunspell/langnum.hxx \ +- hunspell/license.hunspell \ +- hunspell/phonet.hxx \ +- hunspell/suggestmgr.hxx \ +- hunspell/license.myspell \ +- hunspell/filemgr.hxx \ +- hunspell/hunzip.hxx \ +- hunspell/w_char.hxx \ + qcodeedit/lib/qeditorinputbinding.h \ + qcodeedit/lib/qeditorinputbindinginterface.h \ + randomtextgenerator.h \ +@@ -88,7 +70,6 @@ HEADERS += texmaker.h \ + latexdocument.h \ + unicodeinsertion.h \ + universalinputdialog.h \ +- hunspell/replist.hxx \ + scriptengine.h \ + insertgraphics.h \ + tmxtabwidget.h \ +@@ -142,18 +123,6 @@ SOURCES += main.cpp \ + codesnippet.cpp \ + thesaurusdialog.cpp \ + xmltagslistwidget.cpp \ +- hunspell/affentry.cxx \ +- hunspell/affixmgr.cxx \ +- hunspell/csutil.cxx \ +- hunspell/dictmgr.cxx \ +- hunspell/hashmgr.cxx \ +- hunspell/hunspell.cxx \ +- hunspell/phonet.cxx \ +- hunspell/replist.cxx \ +- hunspell/suggestmgr.cxx \ +- hunspell/utf_info.cxx \ +- hunspell/filemgr.cxx \ +- hunspell/hunzip.cxx \ + encodingdialog.cpp \ + qcodeedit/lib/qeditorinputbinding.cpp \ + randomtextgenerator.cpp \ +@@ -528,3 +497,10 @@ SOURCES+=synctex_parser_utils.c synctex_parser.c + + #QMAKE_CXXFLAGS_DEBUG += -Werror -Wall -Wextra -Winit-self -Wmain -Wmissing-include-dirs -Wtrigraphs -Wunused -Wunknown-pragmas -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Wclobbered -Wempty-body -Wsign-compare -Waddress -Wlogical-op -Winline + QMAKE_CXXFLAGS_DEBUG += -Wall -Wextra -Winit-self -Wmain -Wmissing-include-dirs -Wtrigraphs -Wunused -Wunknown-pragmas -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Wclobbered -Wempty-body -Wsign-compare -Waddress -Wlogical-op -Winline ++ ++# enable use of pkgconfig ++unix { ++ CONFIG += link_pkgconfig ++ # use system hunspell ++ PKGCONFIG += hunspell ++} +\ No newline at end of file +-- +1.7.4.4 + diff --git a/texstudio-use-system-qtsingleapplication-instead-of-bundled-on.patch b/texstudio-use-system-qtsingleapplication-instead-of-bundled-on.patch new file mode 100644 index 0000000..8b02b9c --- /dev/null +++ b/texstudio-use-system-qtsingleapplication-instead-of-bundled-on.patch @@ -0,0 +1,36 @@ +From 15100e67881ac6ba99e4c29baaa4cb2baa62c3be Mon Sep 17 00:00:00 2001 +From: Haikel Guemar +Date: Thu, 28 Jul 2011 17:07:49 +0200 +Subject: [PATCH 3/3] use system qtsingleapplication instead of bundled one + +--- + texstudio.pro | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +diff --git texstudio.pro texstudio.pro +index c0b67da..0c1d9f1 100644 +--- texstudio.pro ++++ texstudio.pro +@@ -14,8 +14,6 @@ QT += network \ + QT += phonon + DEFINES += PHONON + } +-contains($$list($$[QT_VERSION]), 4.3.*):message("qt 4.3.x") +-else:include(qtsingleapplication/qtsingleapplication.pri) + + # ############################## + PRECOMPILED_HEADER = mostQtHeaders.h +@@ -503,4 +501,7 @@ unix { + CONFIG += link_pkgconfig + # use system hunspell + PKGCONFIG += hunspell +-} +\ No newline at end of file ++} ++ ++# use system qtsingleapplication ++CONFIG += qtsingleapplication +\ No newline at end of file +-- +1.7.4.4 + diff --git a/texstudio-viewers-use-xdg-open.patch b/texstudio-viewers-use-xdg-open.patch new file mode 100644 index 0000000..b008bc2 --- /dev/null +++ b/texstudio-viewers-use-xdg-open.patch @@ -0,0 +1,61 @@ +From 2ae917fad7cd4e5d3043e3ab3f1cfe4faa63f532 Mon Sep 17 00:00:00 2001 +From: Haikel Guemar +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/texstudio.desktop b/texstudio.desktop new file mode 100644 index 0000000..a68265d --- /dev/null +++ b/texstudio.desktop @@ -0,0 +1,15 @@ + +[Desktop Entry] +Categories=Office;Publishing;Qt;X-SuSE-Core-Office;X-Mandriva-Office-Publishing;X-Misc; +Exec=texstudio +GenericName=LaTeX Editor +GenericName[fr]=Editeur LaTeX +Comment=LaTeX development environment +Comment[fr]=Environnement de développement LaTeX +Icon=texstudio +MimeType=text/x-tex; +Name=TeXstudio +StartupNotify=false +Terminal=false +Type=Application + diff --git a/texstudio.spec b/texstudio.spec new file mode 100644 index 0000000..5292f30 --- /dev/null +++ b/texstudio.spec @@ -0,0 +1,182 @@ +Name: texstudio +Version: 2.2 +Release: 7%{?dist} + +Summary: A feature-rich editor for LaTeX documents +Group: Applications/Publishing +# texstudio binary: GPLv3 due to static linkage of bundled qcodeedit +# texstudio data and image files: GPLv2+ +License: GPLv2+ and GPLv3 +URL: http://texstudio.sourceforge.net + +Source0: http://downloads.sourceforge.net/texstudio/texstudio-%{version}.tar.gz +Source1: texstudio.desktop +Patch0: texstudio-use-system-hunspell-instead-of-bundled-one.patch +Patch1: texstudio-use-system-qtsingleapplication-instead-of-bundled-on.patch +Patch2: texstudio-viewers-use-xdg-open.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: qt4-devel +BuildRequires: hunspell-devel +BuildRequires: desktop-file-utils +BuildRequires: gettext +BuildRequires: poppler-qt4-devel +BuildRequires: qtsingleapplication-devel +BuildRequires: qtsinglecoreapplication-devel + +Requires: tex(latex) +Provides: bundled(qcodeedit) +Provides: texmakerx = %{version}-%{release} +Obsoletes: texmakerx < 2.2-1 +%description +TeXstudio, formerly known as TexmakerX is a fork of the +LaTeX IDE TexMaker and gives you an environment where you can +easily create and manage LaTeX documents. +It provides modern writing support, like interactive spell checking, +code folding and syntax highlighting. +Also it serves as a starting point from where you can easily run +all necessary LaTeX tools. +Although TeXstudio has a lot of additional features, +it tries to be like an improved version of Texmaker, +so it keeps it look&feel. + +%prep +%setup -q -n texstudio2.2 +%patch0 -p0 -b .hunspell +%patch1 -p0 -b .qtsingle +%patch2 -p0 -b .xdg + +rm -rf {hunspell,qtsingleapplication} + +%build +export QTDIR=%{_libdir}/qt4 +qmake-qt4 texstudio.pro +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make install INSTALL_ROOT=$RPM_BUILD_ROOT + +install -Dp -m 0644 utilities/texstudio16x16.png \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/texstudio.png +install -Dp -m 0644 utilities/texstudio22x22.png \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/22x22/apps/texstudio.png +install -Dp -m 0644 utilities/texstudio32x32.png \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/texstudio.png +install -Dp -m 0644 utilities/texstudio48x48.png \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/texstudio.png +install -Dp -m 0644 utilities/texstudio64x64.png \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/46x46/apps/texstudio.png + + +rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/{AUTHORS,COPYING,*.desktop,tex*.png,CHANGELOG.txt} +rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/{*.dic,*.aff} +rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/qt_*.qm + +%find_lang %{name} --with-qt + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/ +desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE1} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +update-desktop-database &> /dev/null ||: + +touch --no-create %{_datadir}/icons/hicolor + +%postun +update-desktop-database &> /dev/null ||: + +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null ||: +fi + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null ||: + +%files -f %{name}.lang +%defattr(-,root,root,-) +%{_bindir}/texstudio +%dir %{_datadir}/texstudio/ +%{_datadir}/texstudio/configure*.png +%{_datadir}/texstudio/doc*.png +%{_datadir}/texstudio/latexhelp.html +%{_datadir}/texstudio/template* +%{_datadir}/texstudio/texstudio.svg +%{_datadir}/texstudio/th_*.dat +%{_datadir}/texstudio/thesaurus.png +%{_datadir}/texstudio/usermanual_*.html +%{_datadir}/applications/texstudio.desktop +%{_datadir}/icons/hicolor/*/apps/*.png + + +%doc utilities/AUTHORS utilities/COPYING utilities/CHANGELOG.txt + +%changelog +* Sat Aug 13 2011 Johannes Lips 2.2-7 +- minor changes to the .desktop file +- fixed the ownership of the texstudio folder +- fixed the find_lang macro +- fixed minor problems with the installation of documentation files + +* Sat Aug 13 2011 Johannes Lips 2.2-6 +- added a .desktop file to prevent problems with the one provided by upstream + +* Fri Aug 12 2011 Johannes Lips 2.2-5 +- fixed the wrong paths in the rm statements +- fixed the TeXstudio spelling in the description +- added the %find_lang macro to install the language files and gettext as BR +- removed the unneeded and unmodified qt_*.mq +- listed all files in /usr/share/texstudio separately + + +* Wed Aug 10 2011 Johannes Lips 2.2-4 +- added the provides for qcodeedit after the exception was granted + +* Fri Jul 29 2011 Johannes Lips 2.2-3 +- removed the bundled source files in the prep section +- added a comment to clarify the licensing +- added tex(latex) instead of texlive-latex +- removal of the dic files instead of excluding them + +* Thu Jul 28 2011 Johannes Lips 2.2-2 +- removed the gcc-objc++ build requirement +- added patches to remove the bundled libraries (hunspell and qtsingleapplication) + +* Fri Jul 22 2011 Johannes Lips 2.2-1 +- renamed to Texstudio +- update to a recent upstream version +- update all parts of the spec to reflect the naming changes + +* Thu Mar 17 2011 Johannes Lips 2.1.0-0.1.svn20110317 +- Update to a recent svn checkout + +* Mon Nov 01 2010 Johannes Lips 2.0.0-0.1 +- Update to a recent svn checkout +- added several other build requirements + +* Sat Aug 28 2010 Johannes Lips 1.9.9a-3 +- Bump release + +* Tue Aug 10 2010 Johannes Lips 1.9.9a-2 +- removed the patch snippet +- added another summary entry + +* Thu Jul 22 2010 Johannes Lips 1.9.9a-1 +- Updated to the recent upstream version + +* Fri May 21 2010 Johannes Lips 1.9.9-2 +- Fixed some minor glitches + +* Sat May 08 2010 Johannes Lips 1.9.9-1 +- Updated to version 1.9.9 + +* Tue Apr 20 2010 Johannes Lips 1.9.3-1 +- Updated to recent version + +* Thu Nov 12 2009 Jochen Schmitt 1.9.2-1 +- Initial package +