diff -u texmaker-1.6/debian/control texmaker-1.6/debian/control --- texmaker-1.6/debian/control +++ texmaker-1.6/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ubuntu MOTU Developers XSBC-Original-Maintainer: Joseph Smidt -Build-Depends: debhelper (>= 5.0.0), libqt4-dev (>=4.3), libglib2.0-dev +Build-Depends: debhelper (>= 5.0.0), dpatch, libqt4-dev (>=4.3), libglib2.0-dev Standards-Version: 3.7.2 Package: texmaker diff -u texmaker-1.6/debian/rules texmaker-1.6/debian/rules --- texmaker-1.6/debian/rules +++ texmaker-1.6/debian/rules @@ -6,6 +6,8 @@ # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. +include /usr/share/dpatch/dpatch.make + CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) @@ -24,14 +26,14 @@ build: build-stamp -build-stamp: configure-stamp +build-stamp: configure-stamp patch-stamp dh_testdir $(MAKE) touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp configure-stamp @@ -79,7 +81,7 @@ dh_installdocs dh_installman debian/texmaker.1 dh_installmenu - dh_iconcache + dh_icons dh_link dh_strip dh_compress diff -u texmaker-1.6/debian/changelog texmaker-1.6/debian/changelog --- texmaker-1.6/debian/changelog +++ texmaker-1.6/debian/changelog @@ -1,3 +1,20 @@ +texmaker (1.6-1ubuntu2) hardy; urgency=low + + * debian/patches/10_external_files_inclusion.dpatch: add patch to calculate + the relative paths between a document and the file being included + (LP: #186137). Thanks to Gianluca Borello for the patch. + * Add dpatch patchsystem: + + debian/control: add dpatch as build-dep; + + debian/rules: add dpatch support; + + debian/patches/00list: create and update. + * debian/rules: modify dh_iconcache call to dh_icons. + * debian/texmaker.desktop: + + remove deprecated "Encoding" field; + + remove duplicated "Icon" field + + remove deprecated value "Application" in "Categories" field. + + -- Andrea Colangelo Fri, 07 Mar 2008 18:04:27 +0100 + texmaker (1.6-1ubuntu1) gutsy; urgency=low * Merge from Debian unstable. Remaining Ubuntu changes: diff -u texmaker-1.6/debian/texmaker.desktop texmaker-1.6/debian/texmaker.desktop --- texmaker-1.6/debian/texmaker.desktop +++ texmaker-1.6/debian/texmaker.desktop @@ -1,6 +1,5 @@ [Desktop Entry] Version=0.9.4 -Encoding=UTF-8 Name=Texmaker GenericName=LaTeX Editor GenericName[fr]=Editeur LaTeX @@ -10,7 +9,6 @@ Icon=texmaker -MimeType=text/x-tex -Icon=texmaker32x32.png +MimeType=text/x-tex; Terminal=false Type=Application -Categories=Application;Utility;TextEditor;Publishing; +Categories=Utility;TextEditor;Publishing; only in patch2: unchanged: --- texmaker-1.6.orig/debian/patches/10_external_files_inclusion.dpatch +++ texmaker-1.6/debian/patches/10_external_files_inclusion.dpatch @@ -0,0 +1,107 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_external_files_inclusion.dpatch by Andrea Colangelo +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: add a function to calculate relative paths between two files. + +@DPATCH@ +diff -urNad texmaker-1.6~/filechooser.cpp texmaker-1.6/filechooser.cpp +--- texmaker-1.6~/filechooser.cpp 2007-06-05 20:44:16.000000000 +0200 ++++ texmaker-1.6/filechooser.cpp 2008-03-07 18:08:27.000000000 +0100 +@@ -10,7 +10,8 @@ + ***************************************************************************/ + + #include "filechooser.h" +-#include ++#include ++#include + + FileChooser::FileChooser( QWidget *parent, QString name) + : QDialog( parent) +@@ -48,3 +49,45 @@ + } + } + ++QString FileChooser::relativePath(const QString basepath, const QString & file) ++{ ++ ++ QFileInfo fi(file); ++ QString filename = fi.fileName(); ++ QString path = fi.path(); ++ QStringList basedirs = basepath.split("/"); ++ QStringList dirs = path.split("/"); ++ //QStringList basedirs = QStringList::split("/", basepath, false); ++ //QStringList dirs = QStringList::split("/", path, false); ++ ++ uint nDirs = dirs.count(); ++ ++ while ( dirs.count() > 0 && basedirs.count() > 0 && dirs[0] == basedirs[0] ) ++ { ++ dirs.pop_front(); ++ basedirs.pop_front(); ++ } ++ ++ if (nDirs != dirs.count() ) ++ { ++ path = dirs.join("/"); ++ ++ if (basedirs.count() > 0) ++ { ++ for (uint j=0; j < basedirs.count(); ++j) ++ { ++ path = "../" + path; ++ } ++ } ++ ++ if ( path.length()>0 && path.right(1) != "/" ) path = path + "/"; ++ } ++ else ++ { ++ path = fi.path(); ++ } ++ ++ return path; ++} ++ ++ +diff -urNad texmaker-1.6~/filechooser.h texmaker-1.6/filechooser.h +--- texmaker-1.6~/filechooser.h 2007-06-05 20:44:24.000000000 +0200 ++++ texmaker-1.6/filechooser.h 2008-03-07 18:08:27.000000000 +0100 +@@ -23,6 +23,7 @@ + Ui::FileChooser ui; + QString fileName() const; + QString filter,dir; ++ QString relativePath(const QString basepath, const QString & file); + + public slots: + void setDir( const QString &di ); +diff -urNad texmaker-1.6~/texmaker.cpp texmaker-1.6/texmaker.cpp +--- texmaker-1.6~/texmaker.cpp 2007-06-05 20:51:01.000000000 +0200 ++++ texmaker-1.6/texmaker.cpp 2008-03-07 18:08:27.000000000 +0100 +@@ -2743,7 +2743,7 @@ + { + QString fn=sfDlg->fileName(); + QFileInfo fi(fn); +- InsertTag("\\includegraphics[scale=1]{"+fi.baseName()+"."+fi.completeSuffix()+"} ",26,0); ++ InsertTag("\\includegraphics[scale=1]{"+sfDlg->relativePath(currentDir, fn)+fi.baseName()+"."+fi.completeSuffix()+"} ",26,0); + } + } + +@@ -2763,7 +2763,7 @@ + { + QString fn=sfDlg->fileName(); + QFileInfo fi(fn); +-InsertTag("\\include{"+fi.baseName()+"}",9,0); ++InsertTag("\\include{"+sfDlg->relativePath(currentDir, fn)+fi.baseName()+"}",9,0); + } + UpdateStructure(); + } +@@ -2784,7 +2784,7 @@ + { + QString fn=sfDlg->fileName(); + QFileInfo fi(fn); +-InsertTag("\\input{"+fi.baseName()+"}",7,0); ++InsertTag("\\input{"+sfDlg->relativePath(currentDir, fn)+fi.baseName()+"}",7,0); + } + UpdateStructure(); + } only in patch2: unchanged: --- texmaker-1.6.orig/debian/patches/00list +++ texmaker-1.6/debian/patches/00list @@ -0,0 +1 @@ +10_external_files_inclusion.dpatch