rpms/inkscape/EL-5 inkscape-0.45.1-desktop.patch, NONE, 1.1 inkscape-0.45.1-gtkprint.patch, NONE, 1.1 inkscape-0.45-python.patch, 1.1, 1.2 inkscape.spec, 1.36, 1.37
Denis Leroy (denis)
fedora-extras-commits at redhat.com
Thu Dec 13 02:23:46 UTC 2007
- Previous message: rpms/python-vobject/devel .cvsignore,1.6,1.7 sources,1.6,1.7
- Next message: rpms/stgit/devel .cvsignore, 1.3, 1.4 sources, 1.3, 1.4 stgit.spec, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: denis
Update of /cvs/pkgs/rpms/inkscape/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24595
Modified Files:
inkscape-0.45-python.patch inkscape.spec
Added Files:
inkscape-0.45.1-desktop.patch inkscape-0.45.1-gtkprint.patch
Log Message:
Merge with F-8 spec, inkboard support removed.
inkscape-0.45.1-desktop.patch:
--- NEW FILE inkscape-0.45.1-desktop.patch ---
Make desktop-file-validate and rpmlint happy, handle compressed svgs (#245413)
and let it conform enough not to break the build in Rawhide.
(Lubomir Kundrak <lkundrak at redhat.com>)
--- inkscape-0.45.1.orig/inkscape.desktop.in 2007-01-16 03:49:00.000000000 +0100
+++ inkscape-0.45.1/inkscape.desktop.in 2007-12-02 03:17:08.000000000 +0100
@@ -2,18 +2,16 @@
_Name=Inkscape SVG Vector Illustrator
_Comment=Create and edit Scalable Vector Graphics images
-Encoding=UTF-8
Version=1.0
Type=Application
-Categories=Application;Graphics;VectorGraphics;GTK;
+Categories=Graphics;VectorGraphics;GTK;
-MimeType=image/svg+xml
+MimeType=image/svg+xml;image/svg+xml-compressed;
-FilePattern=inkscape
Exec=inkscape %F
TryExec=inkscape
Terminal=false
StartupNotify=true
-Icon=inkscape.png
+Icon=inkscape
inkscape-0.45.1-gtkprint.patch:
--- NEW FILE inkscape-0.45.1-gtkprint.patch ---
Patch from upstream SVN, by Kees Cook of Ubuntu
Index: src/extension/internal/ps.cpp
===================================================================
--- src/extension/internal/ps.cpp (revision 14039)
+++ src/extension/internal/ps.cpp (revision 14040)
@@ -43,6 +43,8 @@
#include <gtk/gtkentry.h>
#include <gtk/gtktooltips.h>
+#include <gtk/gtkprintunixdialog.h>
+
#include <glibmm/i18n.h>
#include "display/nr-arena-item.h"
#include "display/canvas-bpath.h"
@@ -102,6 +104,59 @@
return;
}
+static void
+unix_print_complete (GtkPrintJob *print_job,
+ gpointer user_data,
+ GError *error)
+{
+ fprintf(stderr,"job finished: %s\n",error ? error->message : "no error");
+}
+
+static void
+unix_print_dialog (const gchar * ps_file, const gchar * jobname)
+{
+ GtkWidget* dlg = gtk_print_unix_dialog_new(_("Print"), NULL);
+
+/*
+ gtk_print_unix_dialog_add_custom_tab (GtkPrintUnixDialog *dialog,
+ GtkWidget *child,
+ GtkWidget *tab_label);
+*/
+
+ int const response = gtk_dialog_run(GTK_DIALOG(dlg));
+
+ if (response == GTK_RESPONSE_OK) {
+ GtkPrinter* printer = gtk_print_unix_dialog_get_selected_printer(GTK_PRINT_UNIX_DIALOG(dlg));
+
+ fprintf(stderr,"Selected printer '%s'\n",gtk_printer_get_name (printer));
+
+ if (gtk_printer_accepts_ps (printer)) {
+ GtkPrintJob* job = gtk_print_job_new (jobname, printer,
+ gtk_print_unix_dialog_get_settings(GTK_PRINT_UNIX_DIALOG(dlg)),
+ gtk_print_unix_dialog_get_page_setup(GTK_PRINT_UNIX_DIALOG(dlg)));
+
+
+ GError * error = NULL;
+ if ( gtk_print_job_set_source_file (job, ps_file, &error)) {
+ fprintf(stderr,"sending...\n");
+ gtk_print_job_send (job, unix_print_complete, NULL, NULL);
+ }
+ else {
+ fprintf(stderr,"Could not set print source: %s\n",error ? error->message : "unknown error");
+ }
+ }
+ else {
+ fprintf(stderr,"Printer can't support PS output\n");
+ }
+ }
+ else if (response == GTK_RESPONSE_APPLY) {
+ fprintf(stderr,"preview not available\n");
+ }
+
+ gtk_widget_destroy(dlg);
+}
+
+
unsigned int
PrintPS::setup(Inkscape::Extension::Print * mod)
{
@@ -118,13 +173,21 @@
g_object_ref((GObject *) tt);
gtk_object_sink((GtkObject *) tt);
+#ifdef HAVE_GTK_UNIX_PRINT
+ GtkWidget *dlg = gtk_dialog_new_with_buttons(_("Print Configuration"),
+#else
GtkWidget *dlg = gtk_dialog_new_with_buttons(_("Print Destination"),
+#endif
// SP_DT_WIDGET(SP_ACTIVE_DESKTOP)->window,
NULL,
(GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR | GTK_DIALOG_DESTROY_WITH_PARENT),
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
+#ifdef HAVE_GTK_UNIX_PRINT
+ GTK_STOCK_GO_FORWARD,
+#else
GTK_STOCK_PRINT,
+#endif
GTK_RESPONSE_OK,
NULL);
@@ -180,6 +243,7 @@
GtkWidget *l = gtk_label_new(_("Resolution:"));
gtk_box_pack_end(GTK_BOX(hb), l, FALSE, FALSE, 0);
+#ifndef HAVE_GTK_UNIX_PRINT
/* Print destination frame */
f = gtk_frame_new(_("Print destination"));
gtk_box_pack_start(GTK_BOX(vbox), f, FALSE, FALSE, 4);
@@ -204,6 +268,7 @@
// pressing enter in the destination field is the same as clicking Print:
gtk_entry_set_activates_default(GTK_ENTRY(e), TRUE);
+#endif
gtk_widget_show_all(vbox);
@@ -218,15 +283,26 @@
_bitmap = gtk_toggle_button_get_active((GtkToggleButton *) rb);
sstr = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry));
_dpi = (unsigned int) MAX((int)(atof(sstr)), 1);
+#ifndef HAVE_GTK_UNIX_PRINT
/* Arrgh, have to do something */
fn = gtk_entry_get_text(GTK_ENTRY(e));
/* skip leading whitespace, bug #1068483 */
while (fn && *fn==' ') { fn++; }
/* g_print("Printing to %s\n", fn); */
+ mod->set_param_string("destination", (gchar *)fn);
+#else
+ /* unix print dialog prints to a tempfile */
+ char * filename = strdup("/tmp/inkscape-ps-XXXXXX");
+ int tmpfd = mkstemp(filename);
+ close(tmpfd);
+ Glib::ustring dest = ">";
+ dest+=filename;
+ free(filename);
+ mod->set_param_string("destination", dest.c_str());
+#endif
mod->set_param_bool("bitmap", _bitmap);
mod->set_param_string("resolution", (gchar *)sstr);
- mod->set_param_string("destination", (gchar *)fn);
ret = TRUE;
}
@@ -283,6 +359,7 @@
epsexport = g_str_has_suffix(fn,".eps");
while (isspace(*fn)) fn += 1;
Inkscape::IO::dump_fopen_call(fn, "K");
+ _tmpfilename = fn;
osf = Inkscape::IO::fopen_utf8name(fn, "w+");
if (!osf) {
fprintf(stderr, "inkscape: fopen(%s): %s\n",
@@ -582,12 +659,23 @@
{
while((c = fgetc(_stream))!=EOF) fputc(c, _begin_stream);
}
- fclose(_begin_stream);
+ fclose(_stream);
+ _stream = _begin_stream;
}
+#ifdef HAVE_GTK_UNIX_PRINT
+ /* redirect output to new print dialog */
+ fseek(_stream, 0, SEEK_SET);
+ Glib::ustring output = _tmpfilename;
+ unix_print_dialog(output.c_str(),"job name");
+ unlink(output.c_str());
+ /* end redirected new print dialog */
+#endif
+
/* fixme: should really use pclose for popen'd streams */
fclose(_stream);
- _stream = 0;
+ _stream = NULL;
+
_latin1_encoded_fonts.clear();
g_tree_destroy(_fonts);
Index: src/extension/internal/ps.h
===================================================================
--- src/extension/internal/ps.h (revision 14039)
+++ src/extension/internal/ps.h (revision 14040)
@@ -36,6 +36,7 @@
float _height;
FILE * _begin_stream;//stream to print prolog and document setup of EPS, if font embedding
FILE * _stream;//(main) stream to print the (E)PS output, or only the script part following prolog/document setup, if font embedding
+ Glib::ustring _tmpfilename;
unsigned short _dpi;
bool _bitmap;
Index: src/Makefile.am
===================================================================
--- src/Makefile.am (revision 14039)
+++ src/Makefile.am (revision 14040)
@@ -20,6 +20,7 @@
$(GNOME_VFS_CFLAGS) \
$(INKBOARD_CFLAGS) \
$(XFT_CFLAGS) \
+ $(GTK_UNIX_PRINT_CFLAGS) \
-DPOTRACE=\"potrace\" \
$(INKSCAPE_CFLAGS) \
-I$(top_srcdir)/cxxtest
Index: configure.ac
===================================================================
--- configure.ac (revision 14039)
+++ configure.ac (revision 14040)
@@ -525,6 +525,11 @@
AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether the Cairo PDF backend is available])
fi
+PKG_CHECK_MODULES(GTK_UNIX_PRINT, gtk+-unix-print-2.0, gtk_unix_print=yes, gtk_unix_print=no)
+if test "x$gtk_unix_print" = "xyes"; then
+ AC_DEFINE(HAVE_GTK_UNIX_PRINT, 1, [Whether the GTK Unix printing backend is available])
+fi
+
dnl Shouldn't we test for libpng and libz?
INKSCAPE_LIBS="$INKSCAPE_LIBS -lpng -lz"
inkscape-0.45-python.patch:
Index: inkscape-0.45-python.patch
===================================================================
RCS file: /cvs/pkgs/rpms/inkscape/EL-5/inkscape-0.45-python.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- inkscape-0.45-python.patch 8 Feb 2007 18:48:21 -0000 1.1
+++ inkscape-0.45-python.patch 13 Dec 2007 02:23:15 -0000 1.2
@@ -9,3 +9,28 @@
if test "$?" -gt "0"; then
with_python="no"
else
+--- inkscape-0.45/src/extension/script/inkscape_py_wrap.cpp.orig 2007-02-07 17:11:42.000000000 -0800
++++ inkscape-0.45/src/extension/script/inkscape_py_wrap.cpp 2007-02-07 18:19:21.000000000 -0800
+@@ -802,7 +802,7 @@
+ obj = pyobj;
+ if (PyCFunction_Check(obj)) {
+ /* here we get the method pointer for callbacks */
+- char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
++ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+ c = doc ? strstr(doc, "swig_ptr: ") : 0;
+ if (c) {
+ c += 10;
+@@ -977,11 +977,11 @@
+ swig_type_info **types_initial) {
+ int i;
+ for (i = 0; methods[i].ml_name; ++i) {
+- char *c = methods[i].ml_doc;
++ const char *c = methods[i].ml_doc;
+ if (c && (c = strstr(c, "swig_ptr: "))) {
+ int j;
+ swig_const_info *ci = 0;
+- char *name = c + 10;
++ const char *name = c + 10;
+ for (j = 0; const_table[j].type; j++) {
+ if (strncmp(const_table[j].name, name,
+ strlen(const_table[j].name)) == 0) {
Index: inkscape.spec
===================================================================
RCS file: /cvs/pkgs/rpms/inkscape/EL-5/inkscape.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- inkscape.spec 21 Mar 2007 08:32:12 -0000 1.36
+++ inkscape.spec 13 Dec 2007 02:23:15 -0000 1.37
@@ -1,16 +1,17 @@
-%define _with_inkboard 1
Name: inkscape
Version: 0.45.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Vector-based drawing program using SVG
Group: Applications/Productivity
-License: GPL
+License: GPLv2+
URL: http://inkscape.sourceforge.net/
Source0: http://download.sourceforge.net/inkscape/inkscape-%{version}.tar.gz
Patch0: inkscape-0.44.1-psinput.patch
Patch1: inkscape-0.45-python.patch
+Patch2: inkscape-0.45.1-gtkprint.patch
+Patch3: inkscape-0.45.1-desktop.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: atk-devel
@@ -29,14 +30,17 @@
BuildRequires: pkgconfig
BuildRequires: lcms-devel >= 1.13
BuildRequires: cairo-devel
-BuildRequires: openssl-devel
BuildRequires: dos2unix
BuildRequires: perl-XML-Parser
BuildRequires: python-devel
-%{?_with_inkboard:BuildRequires: loudmouth-devel >= 1.0}
+BuildRequires: popt
+# The following are needed due to gtkprint patch changing configure.ac
+BuildRequires: autoconf automake17 intltool
Requires: pstoedit
Requires: perl(Image::Magick)
+Requires: numpy
+Requires: PyXML
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
@@ -60,12 +64,17 @@
%setup -q
%patch0 -p1 -b .psinput
%patch1 -p1 -b .python
+%patch2 -p0 -b .gtkprint
+%patch3 -p1 -b .desktop
find -type f -regex '.*\.\(cpp\|h\)' -perm +111 -exec chmod -x {} ';'
find share/extensions/ -type f -regex '.*\.py' -perm +111 -exec chmod -x {} ';'
dos2unix share/extensions/*.py
%build
+intltoolize --force
+autoconf
+autoheader
%configure \
--disable-dependency-tracking \
--with-xinerama \
@@ -91,7 +100,6 @@
desktop-file-install --vendor fedora --delete-original \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
- --add-category X-Fedora \
${RPM_BUILD_ROOT}/usr/share/applications/%{name}.desktop
@@ -119,6 +127,9 @@
%changelog
+* Wed Dec 12 2007 <denis at localhost.localdomain> - 0.45.1-2
+- Merging with F-8 spec
+
* Tue Mar 20 2007 Denis Leroy <denis at poolshark.org> - 0.45.1-1
- Update to bugfix release 0.45.1
- Added R to ImageMagick-perl (#231563)
- Previous message: rpms/python-vobject/devel .cvsignore,1.6,1.7 sources,1.6,1.7
- Next message: rpms/stgit/devel .cvsignore, 1.3, 1.4 sources, 1.3, 1.4 stgit.spec, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list