[texworks] 10/73: Imported Debian patch 0.3~svn671-1
This is an automated email from the git hooks/post-receive script.
preining pushed a commit to branch master
in repository texworks.
commit 621d44a791459b055b10190cb9e48816c94c16ba
Merge: 83908e5 eae6531
Author: Atsuhito KOHDA <kohda@debian.org>
Date: Tue Aug 3 15:31:17 2010 +0900
Imported Debian patch 0.3~svn671-1
README | 4 +-
TeXworks.pro | 41 +++-
debian/changelog | 7 +
debian/patch-luatex | 2 +-
debian/patch-plugin | 31 +--
debian/patch-print | 14 +-
debian/rules | 4 +-
man/texworks.1 | 69 ++++++
plugins-src/TWLuaPlugin/Makefile | 244 -------------------
plugins-src/TWLuaPlugin/TWLuaPlugin.cpp | 90 +++++--
plugins-src/TWLuaPlugin/TWLuaPlugin.pro | 6 +-
plugins-src/TWPythonPlugin/Makefile | 241 ------------------
plugins-src/TWPythonPlugin/TWPythonPlugin.cpp | 33 ++-
plugins-src/TWPythonPlugin/TWPythonPlugin.h | 2 +-
plugins-src/TWPythonPlugin/TWPythonPlugin.pro | 5 +-
res/icon-blender/tw-logo-blender-v10.blend | Bin 0 -> 1732878 bytes
res/resfiles.qrc | 1 +
res/resfiles/completion/tw-beamer.txt | 63 +++++
res/resfiles/scripts/LaTeX styles/toggleEmph.js | 4 +-
src/CommandlineParser.cpp | 184 ++++++++++++++
src/CommandlineParser.h | 94 ++++++++
src/CompletingEdit.cpp | 6 +-
src/PDFDocument.cpp | 5 +
src/PrefsDialog.cpp | 58 ++++-
src/TWApp.cpp | 308 ++++++++++++++++++++++--
src/TWApp.h | 45 +++-
src/TWScript.cpp | 263 +++++++++++++++-----
src/TWScript.h | 36 ++-
src/TWScriptAPI.cpp | 198 +++++++++++++++
src/TWScriptAPI.h | 121 ++++------
src/TWScriptable.cpp | 111 ++++++++-
src/TWScriptable.h | 23 +-
src/TWUtils.cpp | 27 ++-
src/TWUtils.h | 8 +-
src/TeXDocument.cpp | 186 +++++++-------
src/TeXDocument.h | 12 +-
src/TeXHighlighter.h | 3 +-
src/TemplateDialog.cpp | 9 +
src/TemplateDialog.h | 1 +
src/main.cpp | 81 +++++--
texworks.desktop | 15 ++
41 files changed, 1759 insertions(+), 896 deletions(-)
diff --cc debian/changelog
index 71b34ea,0000000..7e24596
mode 100644,000000..100644
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,48 -1,0 +1,55 @@@
++texworks (0.3~svn671-1) experimental; urgency=low
++
++ * New Upstream Release. (Rev.671)
++ * Updated patches.
++
++ -- Atsuhito KOHDA <kohda@debian.org> Tue, 03 Aug 2010 15:31:17 +0900
++
+texworks (0.3~svn606-1) experimental; urgency=low
+
+ * New Upstream Release. (Rev.606)
+ * Updated patches.
+
+ -- Atsuhito KOHDA <kohda@debian.org> Thu, 15 Apr 2010 08:15:38 +0900
+
+texworks (0.3~svn569-3) experimental; urgency=low
+
+ * Fixed TWPythonPlugin compilation problems on AMD64 by consulting
+ a package of Stefan Löffler. (Closes: #570841)
+ * Modified TW_HELPPATH as a package of Stefan Löffler. I expect one can
+ use a texworks-help-en package by Stefan Löffler now.
+ * Added LuaTeX in a list of Typeset engines for experiment.
+
+ -- Atsuhito KOHDA <kohda@debian.org> Mon, 22 Feb 2010 12:52:39 +0900
+
+texworks (0.3~svn569-2) experimental; urgency=low
+
+ * Added Lua and Python scripting plugins. These are called
+ texworks-scripting-lua and texworks-scripting-python following packages
+ (Ubuntu version) of Stefan Löffler.
+
+ -- Atsuhito KOHDA <kohda@debian.org> Thu, 18 Feb 2010 09:14:31 +0900
+
+texworks (0.3~svn569-1) experimental; urgency=low
+
+ * SVN version for experiment.
+
+ -- Atsuhito KOHDA <kohda@debian.org> Mon, 15 Feb 2010 22:09:05 +0900
+
+texworks (0.2.3-2) unstable; urgency=low
+
+ * Rebuild under poppler 0.12 (Closes: #551435)
+ * Added note on synctex feature in README.Debian
+ * Fixed copyright file to express Jérôme Laurens correctly
+ * Added texlive-latex-base and texlive-xetex to Recommends and Suggests
+ respectively.
+ * Moved "uudecode debian/document-print.png.enc" to configure-stamp
+ from build-stamp because configure searched it.
+
+ -- Atsuhito KOHDA <kohda@debian.org> Sun, 18 Oct 2009 19:16:52 +0900
+
+texworks (0.2.3-1) unstable; urgency=low
+
+ * Initial release (Closes: #538211)
+
+ -- Atsuhito KOHDA <kohda@debian.org> Sun, 11 Oct 2009 15:25:52 +0900
diff --cc debian/patch-luatex
index 27e5de3,0000000..9a107cd
mode 100644,000000..100644
--- a/debian/patch-luatex
+++ b/debian/patch-luatex
@@@ -1,11 -1,0 +1,11 @@@
+--- texworks-0.3/src/TWApp.cpp.orig 2010-02-22 13:19:33.000000000 +0900
++++ texworks-0.3/src/TWApp.cpp 2010-02-22 13:20:27.000000000 +0900
- @@ -599,6 +599,8 @@
++@@ -816,6 +816,8 @@
+ << Engine("pdfLaTeX", "pdflatex" EXE, QStringList("$synctexoption") << "$fullname", true)
+ << Engine("XeTeX", "xetex" EXE, QStringList("$synctexoption") << "$fullname", true)
+ << Engine("XeLaTeX", "xelatex" EXE, QStringList("$synctexoption") << "$fullname", true)
++ << Engine("LuaTeX", "luatex" EXE, QStringList("$synctexoption") << "$fullname", true)
++ << Engine("LuaLaTeX", "lualatex" EXE, QStringList("$synctexoption") << "$fullname", true)
+ << Engine("ConTeXt", "texmfstart" EXE, QStringList("texexec") << "$fullname", true)
+ << Engine("XeConTeXt", "texmfstart" EXE, QStringList("texexec") << "--xtx" << "$fullname", true)
+ << Engine("BibTeX", "bibtex" EXE, QStringList("$basename"), false)
diff --cc debian/patch-plugin
index 4a835d7,0000000..c02e67a
mode 100644,000000..100644
--- a/debian/patch-plugin
+++ b/debian/patch-plugin
@@@ -1,42 -1,0 +1,13 @@@
+--- texworks-0.3~svn569.orig/TeXworks.pro
++++ texworks-0.3~svn569/TeXworks.pro
- @@ -87,8 +87,8 @@
++@@ -95,8 +95,8 @@
+
+ # Enclose the path in \\\" (which later gets expanded to \", which in turn
+ # gets expanded to " in the c++ code)
+- QMAKE_CXXFLAGS += -DTW_HELPPATH=\\\"/usr/local/share/texworks-help\\\"
+- QMAKE_CXXFLAGS += -DTW_PLUGINPATH=\\\"/usr/local/lib/texworks\\\"
++ QMAKE_CXXFLAGS += -DTW_HELPPATH=\\\"/usr/share/doc/texworks-help\\\"
++ QMAKE_CXXFLAGS += -DTW_PLUGINPATH=\\\"/usr/lib/texworks\\\"
+ QMAKE_CXXFLAGS += -DTW_DICPATH=\\\"/usr/share/myspell/dicts\\\"
+ }
+
- --- texworks-0.3~svn569/plugins-src/TWPythonPlugin/TWPythonPlugin.cpp 2010-02-16 12:38:52.000000000 +0900
- +++ texworks-scripting-python-0.3.0~svn558~karmic1/plugins-src/TWPythonPlugin/TWPythonPlugin.cpp 2010-01-31 18:00:06.000000000 +0900
- @@ -44,17 +44,6 @@
- typedef int Py_ssize_t;
- #endif
-
- -/* macros that may not be available in older python headers */
- -#ifndef Py_RETURN_NONE
- -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
- -#endif
- -#ifndef Py_RETURN_TRUE
- -#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
- -#endif
- -#ifndef Py_RETURN_FALSE
- -#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False
- -#endif
- -
- /** \brief Structure to hold data for the pyQObject wrapper */
- typedef struct {
- PyObject_HEAD
- @@ -458,7 +447,7 @@
- QVariantList list;
- QVariantMap map;
- PyObject * key, * value;
- - int i = 0;
- + Py_ssize_t i = 0;
- QString str;
-
- // in Python 3.x, the PyInt_* were removed in favor of PyLong_*
diff --cc debian/patch-print
index e128069,0000000..61f290e
mode 100644,000000..100644
--- a/debian/patch-print
+++ b/debian/patch-print
@@@ -1,378 -1,0 +1,378 @@@
+--- texworks-0.0.1~svn337.orig/src/TeXDocument.h
++++ texworks-0.0.1~svn337/src/TeXDocument.h
- @@ -127,6 +127,7 @@
++@@ -133,6 +133,7 @@
+ public slots:
+ void typeset();
+ void interrupt();
++ void print();
+ void newFile();
+ void newFromTemplate();
+ void open();
+--- texworks-0.0.1~svn337.orig/src/PDFDocument.cpp
++++ texworks-0.0.1~svn337/src/PDFDocument.cpp
+@@ -49,6 +49,11 @@
+ #include <QFileSystemWatcher>
+ #include <QDebug>
+ #include <QToolTip>
++#include <QPrinter>
++#include <QPrintDialog>
++#include <QPrintEngine>
++#include <QBuffer>
++#include <QProgressDialog>
+
+ #include <math.h>
+
- @@ -1131,6 +1136,7 @@
++@@ -1136,6 +1141,7 @@
+ connect(actionNew, SIGNAL(triggered()), qApp, SLOT(newFile()));
+ connect(actionNew_from_Template, SIGNAL(triggered()), qApp, SLOT(newFromTemplate()));
+ connect(actionOpen, SIGNAL(triggered()), qApp, SLOT(open()));
++ connect(actionPrintPDF, SIGNAL(triggered()), this, SLOT(print()));
+
+ connect(actionQuit_TeXworks, SIGNAL(triggered()), TWApp::instance(), SLOT(maybeQuit()));
+
- @@ -1711,3 +1717,203 @@
++@@ -1716,3 +1722,203 @@
+ }
+ }
+
++void PDFDocument::print()
++{
++ QPrinter printer(QPrinter::HighResolution);
++ QPrintDialog printDlg(&printer, this);
++ QPainter painter;
++ QProgressDialog progressDlg(this);
++ Poppler::Page * page;
++ QImage pageImage;
++ QRect viewport;
++ int dpiX, dpiY;
++ double dpiXScale = 1.0, dpiYScale = 1.0;
++ double scale;
++ unsigned int firstPage, lastPage, i;
++ bool success = false;
++
++ // check if there's a pdf document to print
++ if(!document) return;
++
++ // check if we have permission to print the document
++ if(!document->okToPrint()) {
++ QMessageBox::critical(this, tr("Printing denied"), tr("You are not permitted to print this document"));
++ return;
++ }
++
++ // Set up some basic information about the document
++ printer.setCreator(TEXWORKS_NAME);
++ printer.setDocName(document->info("Title"));
++ if(printer.docName().isEmpty()) printer.setDocName(QFileInfo(curFile).baseName());
++
++ // do some setup for the print dialog
++ printDlg.setMinMax(1, document->numPages());
++ printDlg.setOption(QAbstractPrintDialog::PrintToFile, true);
++ printDlg.setOption(QAbstractPrintDialog::PrintSelection, false);
++ printDlg.setOption(QAbstractPrintDialog::PrintPageRange, true);
++ printDlg.setOption(QAbstractPrintDialog::PrintCollateCopies, true);
++ printDlg.setWindowTitle(tr("Print %1").arg(QFileInfo(curFile).fileName()));
++
++ // show the print dialog to the user
++ if(printDlg.exec() != QDialog::Accepted) return;
++
++ // determine the print range
++ switch(printDlg.printRange()) {
++ case QAbstractPrintDialog::PageRange:
++ firstPage = printDlg.fromPage();
++ lastPage = printDlg.toPage();
++ break;
++ default:
++ firstPage = 1;
++ lastPage = document->numPages();
++ }
++
++ // On *nix-like platforms, try using lp for printing
++ #if defined(Q_WS_X11) || defined(Q_WS_MAC)
++ // Catch empty printer names (e.g. used by CUPS for "printing to pdf")
++ if(!printer.printerName().isEmpty()) {
++ QStringList arguments;
++
++ arguments << "lp";
++
++ arguments << QString("-d %1").arg(printer.printerName());
++ arguments << QString("-n %1").arg(printer.numCopies());
++ arguments << QString("-t \"%1\"").arg(printer.docName());
++ arguments << QString("-P %1-%2").arg(firstPage).arg(lastPage);
++
++ switch(printer.duplex()) {
++ case QPrinter::DuplexNone:
++ arguments << "-o sides=one-sided";
++ break;
++ case QPrinter::DuplexShortSide:
++ arguments << "-o sides=two-sided-short-edge";
++ break;
++ case QPrinter::DuplexLongSide:
++ arguments << "-o sides=two-sided-long-edge";
++ break;
++ default:
++ break;
++ }
++ arguments << "--";
++
++ arguments << QString("\"%1\"").arg(curFile);
++
++ // passing arguments as QStringList didn't work for me - probably
++ // because of improper quoting of spaces
++ if(QProcess::execute(arguments.join(" ")) == 0) return;
++ }
++ #endif // On *nix, try using lpr for printing
++
++ // On Windows, try using OS native operation
++ #if defined(Q_WS_WIN)
++ {
++ // First try: directly passing postscript to the printer (if supported)
++ // I'm not sure if this is supported anywhere
++ // Note: QPrinter::getDC and QPrinter::releaseDC are undocumented
++ HDC dc;
++ Poppler::PSConverter * psConv;
++
++ dc = printer.getDC();
++
++ if(dc) {
++ int nEscapeCode = POSTSCRIPT_PASSTHROUGH;
++ if(ExtEscape(dc, QUERYESCSUPPORT, sizeof(int), (LPCSTR)&nEscapeCode, 0, NULL ) > 0 && (psConv = document->psConverter())) {
++ // Convert the pdf to postscript instructions
++ QBuffer buffer;
++
++ buffer.open(QBuffer::ReadWrite);
++ psConv->setOutputDevice(&buffer);
++ psConv->convert();
++
++ // and send them to the printer
++ success = (ExtEscape(dc, POSTSCRIPT_PASSTHROUGH, buffer.data().size(), buffer.data().data(), 0, NULL) > 0);
++
++ buffer.close();
++ }
++ printer.releaseDC(dc);
++ if(success) return;
++ }
++ // Second try: print by calling the system's standard printing program for pdf
++ // Seems to only print to the default printer, hence disabled for now
++/*
++ wchar_t * filename;
++ HRESULT coInit;
++ filename = new wchar_t[curFile.size()];
++
++ curFile.toWCharArray(filename);
++ coInit = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
++ if(coInit == S_OK || coInit == S_FALSE) {
++ success = ((int)ShellExecute(NULL, L"print", filename, NULL, NULL, SW_NORMAL) > 32);
++ CoUninitialize();
++ }
++ delete[] filename;
++ if(success) return;
++*/
++ }
++ #endif // On Windows, try using OS native operation
++
++ // Fallback: use Qt for printing
++ //
++ // This means rendering the pages as images via poppler and printing those
++ // To keep the rendering time and file size reasonable, resolution is
++ // clamped to a maximum of 300dpi. If you need more, use another program ;).
++
++ {
++ // ignore printer margins while painting - the margins are included in the
++ // pdf file
++ printer.setFullPage(true);
++
++ painter.begin(&printer);
++ viewport = painter.viewport();
++
++ dpiX = printer.printEngine()->metric(QPaintDevice::PdmDpiX);
++ dpiY = printer.printEngine()->metric(QPaintDevice::PdmDpiY);
++
++ // clamp the resolution to 300 dpi (postscript devices return 1200 dpi to
++ // Qt by default) to reduce file size and render time
++ dpiXScale = qMax(1, dpiX / 300);
++ dpiYScale = qMax(1, dpiY / 300);
++ dpiX = qMin(300, dpiX);
++ dpiY = qMin(300, dpiY);
++
++ progressDlg.setAutoClose(true);
++ progressDlg.setRange(firstPage, lastPage + 1);
++ progressDlg.setWindowModality(Qt::WindowModal);
++ for(i = firstPage; i <= lastPage && !progressDlg.wasCanceled(); ++i) {
++ progressDlg.setValue(i - firstPage);
++ progressDlg.setLabelText(tr("Printing page %1 of %2").arg(i - firstPage + 1).arg(lastPage - firstPage + 1));
++
++ page = document->page(i - 1);
++ if(page) {
++ pageImage = page->renderToImage(dpiX, dpiY);
++ painter.save();
++
++ // calculate the scale factor necessary to resize the page image to
++ // the real page while retaining the aspect ratio
++ scale = qMin((double)viewport.width() / (dpiXScale * pageImage.width()), (double)viewport.height() / (dpiYScale * pageImage.height()));
++
++ // if we need to shrink the page, so be it
++ if(scale < 1) {
++ painter.scale(scale, scale);
++ }
++ // otherwise center the page image on the page
++ // TODO: handle landscape etc.
++ else {
++ painter.translate( (viewport.width() - dpiXScale * pageImage.width()) / 2, (viewport.height() - dpiYScale * pageImage.height()) / 2);
++ }
++ painter.scale(dpiXScale, dpiYScale);
++
++ painter.drawImage(0, 0, pageImage);
++
++ painter.restore();
++ }
++
++ if(i != lastPage) printer.newPage();
++ }
++
++ if(progressDlg.wasCanceled()) printer.abort();
++ else painter.end();
++
++ progressDlg.reset();
++ }
++}
+--- texworks-0.0.1~svn337.orig/src/TeXDocument.ui
++++ texworks-0.0.1~svn337/src/TeXDocument.ui
+@@ -163,7 +163,7 @@
+ <x>0</x>
+ <y>0</y>
+ <width>780</width>
+- <height>22</height>
++ <height>25</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuFile">
+@@ -180,6 +180,7 @@
+ <addaction name="actionSave_As"/>
+ <addaction name="actionSave_All"/>
+ <addaction name="actionRevert_to_Saved"/>
++ <addaction name="actionPrintSource"/>
+ <addaction name="separator"/>
+ <addaction name="actionRemove_Aux_Files"/>
+ <addaction name="separator"/>
+@@ -1096,6 +1097,18 @@
+ <enum>QAction::NoRole</enum>
+ </property>
+ </action>
++ <action name="actionPrintSource">
++ <property name="icon">
++ <iconset resource="../res/resources.qrc">
++ <normaloff>:/images/tango/document-print.png</normaloff>:/images/tango/document-print.png</iconset>
++ </property>
++ <property name="text">
++ <string>Print</string>
++ </property>
++ <property name="shortcut">
++ <string>Ctrl+P</string>
++ </property>
++ </action>
+ </widget>
+ <customwidgets>
+ <customwidget>
+--- texworks-0.0.1~svn337.orig/src/TeXDocument.cpp
++++ texworks-0.0.1~svn337/src/TeXDocument.cpp
- @@ -58,6 +58,8 @@
- #include <QPushButton>
++@@ -56,6 +56,8 @@
+ #include <QFileSystemWatcher>
++ #include <QTextBrowser>
+ #include <QDebug>
++#include <QPrinter>
++#include <QPrintDialog>
+
+ #ifdef Q_WS_WIN
+ #include <windows.h>
- @@ -169,6 +171,7 @@
++@@ -171,6 +173,7 @@
+ connect(actionSave_All, SIGNAL(triggered()), this, SLOT(saveAll()));
+ connect(actionRevert_to_Saved, SIGNAL(triggered()), this, SLOT(revert()));
+ connect(actionClose, SIGNAL(triggered()), this, SLOT(close()));
++ connect(actionPrintSource, SIGNAL(triggered()), this, SLOT(print()));
+
+ connect(actionRemove_Aux_Files, SIGNAL(triggered()), this, SLOT(removeAuxFiles()));
+
- @@ -2866,3 +2869,26 @@
++@@ -2844,3 +2847,26 @@
+ pdfDoc = NULL;
+ }
+ }
++
++void TeXDocument::print()
++{
++ QPrinter printer(QPrinter::HighResolution);
++ QPrintDialog printDlg(&printer, this);
++
++ // Set up some basic information about the document
++ printer.setCreator(TEXWORKS_NAME);
++ printer.setDocName(QFileInfo(curFile).baseName());
++
++ // do some setup for the print dialog
++ // Note: no page range since we don't know how many pages this will be.
++ printDlg.setOption(QAbstractPrintDialog::PrintToFile, true);
++ printDlg.setOption(QAbstractPrintDialog::PrintSelection, true);
++ printDlg.setOption(QAbstractPrintDialog::PrintPageRange, false);
++ printDlg.setOption(QAbstractPrintDialog::PrintCollateCopies, true);
++ printDlg.setWindowTitle(tr("Print %1").arg(QFileInfo(curFile).fileName()));
++
++ // show the print dialog to the user
++ if(printDlg.exec() != QDialog::Accepted) return;
++
++ textEdit->print(&printer);
++}
+--- texworks-0.0.1~svn337.orig/src/PDFDocument.ui
++++ texworks-0.0.1~svn337/src/PDFDocument.ui
+@@ -23,7 +23,7 @@
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+- <height>22</height>
++ <height>25</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuHelp">
+@@ -43,6 +43,7 @@
+ <addaction name="actionNew_from_Template"/>
+ <addaction name="actionOpen"/>
+ <addaction name="actionOpen_Recent"/>
++ <addaction name="actionPrintPDF"/>
+ <addaction name="separator"/>
+ <addaction name="actionClose"/>
+ <addaction name="separator"/>
+@@ -729,6 +730,18 @@
+ <enum>QAction::NoRole</enum>
+ </property>
+ </action>
++ <action name="actionPrintPDF">
++ <property name="icon">
++ <iconset resource="../res/resources.qrc">
++ <normaloff>:/images/tango/document-print.png</normaloff>:/images/tango/document-print.png</iconset>
++ </property>
++ <property name="text">
++ <string>Print...</string>
++ </property>
++ <property name="shortcut">
++ <string>Ctrl+P</string>
++ </property>
++ </action>
+ </widget>
+ <resources>
+ <include location="../res/resources.qrc"/>
+--- texworks-0.0.1~svn337.orig/src/PDFDocument.h
++++ texworks-0.0.1~svn337/src/PDFDocument.h
+@@ -251,6 +251,7 @@
+ public slots:
+ void texClosed(QObject *obj);
+ void reload();
++ void print();
+ void retypeset();
+ void interrupt();
+ void sideBySide();
+--- texworks-0.0.1~svn337.orig/res/resources.qrc
++++ texworks-0.0.1~svn337/res/resources.qrc
+@@ -19,6 +19,7 @@
+ <file>tango/document-open.png</file>
+ <file>images/fileprint.png</file>
+ <file>tango/document-save.png</file>
++ <file>tango/document-print.png</file>
+ <file>tango/go-first.png</file>
+ <file>images/fitwidth.png</file>
+ <file>images/fitwindow.png</file>
diff --cc debian/rules
index cbba457,0000000..b5215cb
mode 100755,000000..100755
--- a/debian/rules
+++ b/debian/rules
@@@ -1,131 -1,0 +1,131 @@@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# 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.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+USDIR=$(CURDIR)/debian/texworks/usr/share
+PLIDIR=plugins-src/TWLuaPlugin
+PLIPYT=plugins-src/TWPythonPlugin
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+ patch -p1 < ./debian/patch-print
+ uudecode debian/document-print.png.enc
+ mv document-print.png res/tango/
+ patch -p1 < ./debian/patch-plugin
+ patch -p1 < ./debian/patch-luatex
+ qmake-qt4
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ # Lua plugin
+ cd $(PLIDIR) && qmake-qt4 -after 'target.path = /usr/lib/texworks' && $(MAKE)
+ # Python plugin
+ cd $(PLIPYT) && qmake-qt4 -after 'target.path = /usr/lib/texworks' && $(MAKE)
+ #docbook-to-man debian/texworks.sgml > texworks.1
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ if [ -f Makefile ]; then $(MAKE) clean; fi
+ rm -f ./texworks ./Makefile src/DefaultBinaryPaths.h
+ if [ -d moc ]; then rmdir moc; fi
+ if [ -d obj ]; then rmdir obj; fi
+ if [ -d rcc ]; then rmdir rcc; fi
+ if [ -d ui ]; then rmdir ui; fi
+ if [ -f $(PLIDIR)/Makefile ]; then cd $(PLIDIR) && $(MAKE) clean; fi
+ if [ -d $(PLIDIR)/moc ]; then rmdir $(PLIDIR)/moc; fi
+ if [ -d $(PLIDIR)/obj ]; then rmdir $(PLIDIR)/obj; fi
+ if [ -d $(PLIDIR)/rcc ]; then rmdir $(PLIDIR)/rcc; fi
+ if [ -d $(PLIDIR)/ui ]; then rmdir $(PLIDIR)/ui; fi
+ if [ -f $(PLIPYT)/Makefile ]; then cd $(PLIPYT) && $(MAKE) clean; fi
+ if [ -d $(PLIPYT)/moc ]; then rmdir $(PLIPYT)/moc; fi
+ if [ -d $(PLIPYT)/obj ]; then rmdir $(PLIPYT)/obj; fi
+ if [ -d $(PLIPYT)/rcc ]; then rmdir $(PLIPYT)/rcc; fi
+ if [ -d $(PLIPYT)/ui ]; then rmdir $(PLIPYT)/ui; fi
+ patch -NRp1 < ./debian/patch-luatex || true
+ patch -NRp1 < ./debian/patch-print || true
+ patch -NRp1 < ./debian/patch-plugin || true
+
+ rm -f document-print.png res/tango/document-print.png
- rm -f $(PLIDIR)/libTWLuaPlugin.so
- rm -f $(PLIPYT)/libTWPythonPlugin.so
++ rm -f $(PLIDIR)/libTWLuaPlugin.so $(PLIDIR)/Makefile
++ rm -f $(PLIPYT)/libTWPythonPlugin.so $(PLIPYT)/Makefile
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_prep
+ dh_installdirs -A
+
+ # Add here commands to install the package into debian/texworks.
+# $(MAKE) DESTDIR=$(CURDIR)/debian/texworks install
+ install -m 755 -p ./texworks $(CURDIR)/debian/texworks/usr/bin
+ cp debian/texworks.xpm $(USDIR)/pixmaps/
+ cp debian/texworks.desktop $(USDIR)/applications/
+ install -m 755 -p "$(PLIDIR)/libTWLuaPlugin.so" \
+ $(CURDIR)/debian/texworks-scripting-lua/usr/lib/texworks
+ install -m 755 -p "$(PLIPYT)/libTWPythonPlugin.so" \
+ $(CURDIR)/debian/texworks-scripting-python/usr/lib/texworks
+
+# Build architecture-independent files here.
+binary-indep: install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+ dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman debian/texworks.1
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+#%:
+# dh $@
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/texworks.git
Reply to: