From 09405a180016306fa6ff58048862bc1478e20433 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Feb 06 2008 12:02:12 +0000 Subject: 0.46 prerelease --- diff --git a/.cvsignore b/.cvsignore index eac392d..1bd7807 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -inkscape-0.45.1.tar.gz +inkscape-0.45.1+0.46pre1.tar.bz2 diff --git a/inkscape-0.44.1-psinput.patch b/inkscape-0.44.1-psinput.patch deleted file mode 100644 index 3454888..0000000 --- a/inkscape-0.44.1-psinput.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- inkscape-0.44.1/share/extensions/ps_input.inx.orig 2006-12-06 11:47:27.000000000 +0100 -+++ inkscape-0.44.1/share/extensions/ps_input.inx 2006-12-06 11:46:40.000000000 +0100 -@@ -1,7 +1,6 @@ - - <_name>Postscript Input - org.inkscape.input.ps -- org.inkscape.input.sk - pstoedit - - .ps -@@ -11,7 +10,6 @@ - org.inkscape.output.ps - - - ---- inkscape-0.44.1/share/extensions/eps_input.inx.orig 2006-12-06 12:19:56.000000000 +0100 -+++ inkscape-0.44.1/share/extensions/eps_input.inx 2006-12-06 12:19:42.000000000 +0100 -@@ -1,9 +1,8 @@ - - <_name>EPS Input - org.inkscape.input.eps -- org.inkscape.input.ps -- gs -- -+ pstoedit -+ - .eps - image/x-encapsulated-postscript - <_filetypename>Encapsulated Postscript (*.eps) -@@ -11,7 +10,6 @@ - org.inkscape.output.eps - - - diff --git a/inkscape-0.45-python.patch b/inkscape-0.45-python.patch deleted file mode 100644 index 51dcc6b..0000000 --- a/inkscape-0.45-python.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- inkscape-0.45/configure.orig 2007-02-07 12:08:44.000000000 -0800 -+++ inkscape-0.45/configure 2007-02-07 12:22:34.000000000 -0800 -@@ -10769,7 +10769,7 @@ - if test "$?" -gt "0"; then - with_python="no" - else -- checkPYTHON_LIBS=`python -c "import distutils.sysconfig ; print '%s/%s %s' % (distutils.sysconfig.get_config_var('LIBPL'),distutils.sysconfig.get_config_var('LDLIBRARY'),distutils.sysconfig.get_config_var('LIBS'))" 2>/dev/null` -+ checkPYTHON_LIBS=`python -c "import distutils.sysconfig ; print '%s/%s %s' % (distutils.sysconfig.get_config_var('DBLIB'),distutils.sysconfig.get_config_var('LDLIBRARY'),distutils.sysconfig.get_config_var('LIBS'))" 2>/dev/null` - 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) { diff --git a/inkscape-0.45.1-gtkprint.patch b/inkscape-0.45.1-gtkprint.patch deleted file mode 100644 index 239b62d..0000000 --- a/inkscape-0.45.1-gtkprint.patch +++ /dev/null @@ -1,215 +0,0 @@ -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 - #include - -+#include -+ - #include - #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" - diff --git a/inkscape-0.45.1-ill2svg.patch b/inkscape-0.45.1-ill2svg.patch deleted file mode 100644 index 9ed36fd..0000000 --- a/inkscape-0.45.1-ill2svg.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- inkscape-0.45.1/share/extensions/ill2svg.pl.orig 2007-03-25 14:40:18.000000000 +0200 -+++ inkscape-0.45.1/share/extensions/ill2svg.pl 2007-03-25 14:41:47.000000000 +0200 -@@ -355,20 +355,9 @@ - print " xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n"; - - while (<>) { -- if (m/$NL_DOS$/) { -- $/ = $NL_DOS; -- foreach (split /$NL_DOS/) { -- process_line($_); -- } -- } elsif (m/$NL_MAC$/) { -- $/ = $NL_MAC; -- foreach (split /$NL_MAC/) { -- process_line($_); -- } -- } else { -- chomp; -+ foreach (split /[\015\012]+/) { - process_line($_); -- } -+ } - } - print "\n"; - diff --git a/inkscape-16571-cxxinclude.patch b/inkscape-16571-cxxinclude.patch new file mode 100644 index 0000000..3ebfbb1 --- /dev/null +++ b/inkscape-16571-cxxinclude.patch @@ -0,0 +1,12 @@ +--- inkscape-16571/src/Makefile.in.orig 2007-11-29 13:38:13.000000000 +0100 ++++ inkscape-16571/src/Makefile.in 2007-11-29 13:38:29.000000000 +0100 +@@ -317,7 +317,8 @@ + $(POPPLER_GLIB_CFLAGS) \ + -DPOTRACE=\"potrace\" \ + $(INKSCAPE_CFLAGS) \ +- -I$(top_srcdir)/cxxtest ++ -I$(top_srcdir)/cxxtest \ ++ -I$(top_srcdir)/src/extension/script + + + @PLATFORM_WIN32_TRUE@win32_sources = winmain.cpp registrytool.cpp registrytool.h diff --git a/inkscape.spec b/inkscape.spec index 11d62f7..f9b9107 100644 --- a/inkscape.spec +++ b/inkscape.spec @@ -1,18 +1,14 @@ -%define _with_inkboard 1 - Name: inkscape -Version: 0.45.1 -Release: 5%{?dist} +Version: 0.45.1+0.46pre1 +Release: 1%{?dist} Summary: Vector-based drawing program using SVG Group: Applications/Productivity 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 +Source0: http://download.sourceforge.net/inkscape/inkscape-%{version}.tar.bz2 +Patch0: inkscape-16571-cxxinclude.patch +Patch1: inkscape-0.45.1-desktop.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: atk-devel @@ -20,11 +16,10 @@ BuildRequires: desktop-file-utils BuildRequires: freetype-devel BuildRequires: gc-devel >= 6.4 BuildRequires: gettext -BuildRequires: gtkmm24-devel +BuildRequires: gtkmm24-devel >= 2.8.0 BuildRequires: gtkspell-devel BuildRequires: gnome-vfs2-devel >= 2.0 BuildRequires: libpng-devel >= 1.2 -BuildRequires: libsigc++20-devel >= 2.0.12 BuildRequires: libxml2-devel >= 2.6.11 BuildRequires: libxslt-devel >= 1.0.15 BuildRequires: pango-devel @@ -35,19 +30,16 @@ BuildRequires: openssl-devel BuildRequires: dos2unix BuildRequires: perl-XML-Parser BuildRequires: python-devel -%if %{fedora} > 7 +BuildRequires: poppler-devel >= 0.5.9 BuildRequires: popt-devel -%else -BuildRequires: popt -%endif -# The following are needed due to gtkprint patch changing configure.ac -BuildRequires: autoconf automake17 intltool -%{?_with_inkboard:BuildRequires: loudmouth-devel >= 1.0} +BuildRequires: loudmouth-devel >= 1.0 +BuildRequires: boost-devel Requires: pstoedit Requires: perl(Image::Magick) Requires: numpy Requires: PyXML +Requires: python-lxml Requires(post): desktop-file-utils Requires(postun): desktop-file-utils @@ -69,19 +61,14 @@ C and C++, using the Gtk+ toolkit and optionally some Gnome libraries. %prep %setup -q -%patch0 -p1 -b .psinput -%patch1 -p1 -b .python -%patch2 -p0 -b .gtkprint -%patch3 -p1 -b .desktop +%patch0 -p1 -b .cxxinclude +%patch1 -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,14 +78,15 @@ autoheader --with-gnome-vfs \ --with-inkjar \ --enable-inkboard \ ---enable-lcms +--enable-lcms \ +--enable-poppler-cairo make %{?_smp_mflags} %install -rm -rf ${RPM_BUILD_ROOT} -make install DESTDIR=${RPM_BUILD_ROOT} +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT %find_lang %{name} find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' @@ -106,12 +94,12 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions/outline2svg.* rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions/txt2svg.* desktop-file-install --vendor fedora --delete-original \ - --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ - ${RPM_BUILD_ROOT}/usr/share/applications/%{name}.desktop + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop %clean -rm -rf ${RPM_BUILD_ROOT} +rm -rf $RPM_BUILD_ROOT %post @@ -134,6 +122,16 @@ update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || : %changelog +* Wed Feb 06 2008 Lubomir Kundrak - 0.45.1+0.46pre1-1 +- 0.46 prerelease +- Minor cosmetic changes to satisfy the QA script +- Dependency on Boost +- Inkboard is not optional +- Merge from Denis Leroy's svn16571 snapshot: +- Require specific gtkmm24-devel versions +- enable-poppler-cairo +- No longer BuildRequire libsigc++20-devel + * Wed Dec 5 2007 Denis Leroy - 0.45.1-5 - Rebuild with new openssl diff --git a/sources b/sources index 8d59a12..439a6a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1ac63dfd5d78a676599bf5cf6d22e493 inkscape-0.45.1.tar.gz +2b3b31cb92c558a68534f190d31b0d72 inkscape-0.45.1+0.46pre1.tar.bz2