rpms/gutenprint/F-10 gutenprint-locale.patch, NONE, 1.1 gutenprint-selinux.patch, NONE, 1.1 .cvsignore, 1.5, 1.6 gutenprint-O6.patch, 1.2, 1.3 gutenprint.spec, 1.40, 1.41 sources, 1.5, 1.6

Tim Waugh twaugh at fedoraproject.org
Fri Dec 5 16:19:31 UTC 2008


Author: twaugh

Update of /cvs/pkgs/rpms/gutenprint/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11468

Modified Files:
	.cvsignore gutenprint-O6.patch gutenprint.spec sources 
Added Files:
	gutenprint-locale.patch gutenprint-selinux.patch 
Log Message:
5.2.2

gutenprint-locale.patch:

--- NEW FILE gutenprint-locale.patch ---
diff -up gutenprint-5.2.2/src/cups/genppd.c.locale gutenprint-5.2.2/src/cups/genppd.c
--- gutenprint-5.2.2/src/cups/genppd.c.locale	2008-09-26 00:41:00.000000000 +0100
+++ gutenprint-5.2.2/src/cups/genppd.c	2008-12-05 13:46:48.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * "$Id: genppd.c,v 1.170 2008/09/25 23:41:00 rlk Exp $"
+ * "$Id: genppd.c,v 1.171 2008/12/05 03:27:20 easysw Exp $"
  *
  *   PPD file generation program for the CUPS drivers.
  *
@@ -200,6 +200,13 @@ int				    /* O - Exit status */
 main(int  argc,			    /* I - Number of command-line arguments */
      char *argv[])		    /* I - Command-line arguments */
 {
+ /*
+  * Force POSIX locale, since stp_init incorrectly calls setlocale...
+  */
+
+  putenv((char *)"LANG=C");
+  putenv((char *)"LC_ALL=C");
+  putenv((char *)"LC_NUMERIC=C");
 
  /*
   * Initialise libgutenprint
@@ -893,6 +900,7 @@ write_ppd(
 		min_height,
 		max_width,
 		max_height;
+  char		dimstr[255];		/* Dimension string */
   stp_parameter_t desc;
   stp_parameter_list_t param_list;
   const stp_param_string_t *opt;
@@ -1794,13 +1802,10 @@ write_ppd(
 		      for (i = desc.bounds.dimension.lower;
 			   i <= desc.bounds.dimension.upper; i++)
 			{
-			  /* FIXME
-			   * For now, just use mm; we'll fix it later
-			   * for the locale-appropriate setting.
-			   * --rlk 20040818
-			   */
-			  gzprintf(fp, "*Stp%s %d/%.1f mm: \"\"\n",
-				   desc.name, i, ((double) i) * 25.4 / 72);
+			  snprintf(dimstr, sizeof(dimstr), _("%.1f mm"),
+			           (double)i * 25.4 / 72.0);
+			  gzprintf(fp, "*Stp%s %d/%s: \"\"\n",
+				   desc.name, i, dimstr);
 			}
 
 		      print_close_ui = 0;
@@ -2197,19 +2202,14 @@ write_ppd(
 			  if (!desc.is_mandatory)
 			    gzprintf(fp, "*%s.Stp%s %s/%s: \"\"\n", lang, desc.name,
 				     "None", _("None"));
-			  if (localize_numbers)
+			  /* Unlike the other fields, dimensions are not strictly numbers */
+			  for (i = desc.bounds.dimension.lower;
+			       i <= desc.bounds.dimension.upper; i++)
 			    {
-			      for (i = desc.bounds.dimension.lower;
-				   i <= desc.bounds.dimension.upper; i++)
-				{
-				  /* FIXME
-				   * For now, just use mm; we'll fix it later
-				   * for the locale-appropriate setting.
-				   * --rlk 20040818
-				   */
-				  gzprintf(fp, "*%s.Stp%s %d/%.1f mm: \"\"\n", lang,
-					   desc.name, i, ((double) i) * 25.4 / 72);
-				}
+			      snprintf(dimstr, sizeof(dimstr), _("%.1f mm"),
+				       (double)i * 25.4 / 72.0);
+			      gzprintf(fp, "*%s.Stp%s %d/%s: \"\"\n", lang,
+				       desc.name, i, dimstr);
 			    }
 			  gzprintf(fp, "*%s.ParamCustomStp%s Value/%s: \"\"\n", lang,
 				   desc.name, _("Value"));
@@ -2320,5 +2320,5 @@ write_ppd(
 
 
 /*
- * End of "$Id: genppd.c,v 1.170 2008/09/25 23:41:00 rlk Exp $".
+ * End of "$Id: genppd.c,v 1.171 2008/12/05 03:27:20 easysw Exp $".
  */

gutenprint-selinux.patch:

--- NEW FILE gutenprint-selinux.patch ---
diff -up gutenprint-5.2.2/src/cups/cups-genppdupdate.in.selinux gutenprint-5.2.2/src/cups/cups-genppdupdate.in
--- gutenprint-5.2.2/src/cups/cups-genppdupdate.in.selinux	2008-11-20 16:08:57.000000000 +0000
+++ gutenprint-5.2.2/src/cups/cups-genppdupdate.in	2008-11-20 16:21:48.000000000 +0000
@@ -667,6 +667,8 @@ default_loop:
 	unlink $tmpnew;
 	return 0;
     }
+    my @args = ("chcon", "--reference=$ppd_dest_filename", $tmpnew);
+    system(@args);
 
     if (! rename $tmpnew, $ppd_dest_filename) {
 	warn "Can't rename $tmpnew to $ppd_dest_filename: $!\n";


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gutenprint/F-10/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- .cvsignore	18 Jan 2008 12:26:28 -0000	1.5
+++ .cvsignore	5 Dec 2008 16:19:01 -0000	1.6
@@ -2,3 +2,4 @@
 gutenprint-5.0.0.99.1.tar.bz2
 gutenprint-5.0.1.tar.bz2
 gutenprint-5.0.2.tar.bz2
+gutenprint-5.2.2.tar.bz2

gutenprint-O6.patch:

Index: gutenprint-O6.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gutenprint/F-10/gutenprint-O6.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gutenprint-O6.patch	18 Jan 2008 12:26:28 -0000	1.2
+++ gutenprint-O6.patch	5 Dec 2008 16:19:01 -0000	1.3
@@ -1,13 +1,44 @@
-diff -up gutenprint-5.0.2/configure.O6 gutenprint-5.0.2/configure
---- gutenprint-5.0.2/configure.O6	2008-01-18 12:19:25.000000000 +0000
-+++ gutenprint-5.0.2/configure	2008-01-18 12:21:05.000000000 +0000
-@@ -26044,410 +26044,6 @@ cat >>confdefs.h <<_ACEOF
+diff -up gutenprint-5.2.2/configure.ac.O6 gutenprint-5.2.2/configure.ac
+--- gutenprint-5.2.2/configure.ac.O6	2008-11-19 11:23:29.000000000 +0000
++++ gutenprint-5.2.2/configure.ac	2008-11-19 11:24:35.000000000 +0000
+@@ -625,27 +625,6 @@ AH_TEMPLATE(PKGMODULEDIR,, [Package modu
+ PKGMODULEDIR="${PACKAGE_LIB_DIR}/${GUTENPRINT_RELEASE_VERSION}/modules"
+ AC_DEFINE_UNQUOTED(PKGMODULEDIR, ["$PKGMODULEDIR"])
+ 
+-dnl Compiler flags
+-if test x$ac_compiler_gnu = "xyes"; then
+-  STP_ADD_COMPILER_ARGS([-Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072],, [GNUCFLAGS])
+-  if test x${USE_MAINTAINER_MODE} = xyes ; then
+-    STP_ADD_COMPILER_ARGS([-pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls],, [GNUCFLAGS])
+-  fi
+-  if test x$ENABLE_DEBUG = xyes ; then
+-    STP_ADD_COMPILER_ARG([-g])
+-  else
+-    STP_ADD_FIRST_COMPILER_ARG([-O6 -O3 -O2 -O1 -O])
+-  fi
+-else
+-  if test x$ENABLE_DEBUG = xyes ; then
+-    STP_ADD_COMPILER_ARG([-g])
+-  else
+-    STP_ADD_FIRST_COMPILER_ARG([-O])
+-  fi
+-fi
+-if test x$ENABLE_PROFILE = xyes ; then
+-  STP_ADD_COMPILER_ARG([-pg])
+-fi
+ AC_SUBST(GNUCFLAGS)
+ 
+ AH_TEMPLATE([HAVE_GCC_ATTRIBUTES],
+diff -up gutenprint-5.2.2/configure.O6 gutenprint-5.2.2/configure
+--- gutenprint-5.2.2/configure.O6	2008-11-19 11:23:32.000000000 +0000
++++ gutenprint-5.2.2/configure	2008-11-19 11:24:49.000000000 +0000
+@@ -26509,410 +26509,6 @@ cat >>confdefs.h <<_ACEOF
  _ACEOF
  
  
 -if test x$ac_compiler_gnu = "xyes"; then
 -
--  for stp_ac_arg in -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=1048576 ; do
+-  for stp_ac_arg in -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072 ; do
 -
 -  { echo "$as_me:$LINENO: checking if ${CC} supports ${stp_ac_arg}" >&5
 -echo $ECHO_N "checking if ${CC} supports ${stp_ac_arg}... $ECHO_C" >&6; }
@@ -412,36 +443,3 @@
  
  
  
-diff -up gutenprint-5.0.2/configure.ac.O6 gutenprint-5.0.2/configure.ac
---- gutenprint-5.0.2/configure.ac.O6	2008-01-18 12:18:40.000000000 +0000
-+++ gutenprint-5.0.2/configure.ac	2008-01-18 12:19:20.000000000 +0000
-@@ -648,29 +648,6 @@ AH_TEMPLATE(PKGMODULEDIR,, [Package modu
- PKGMODULEDIR="${PACKAGE_LIB_DIR}/${PACKAGE_VERSION}/modules"
- AC_DEFINE_UNQUOTED(PKGMODULEDIR, ["$PKGMODULEDIR"])
- 
--dnl Compiler flags
--if test x$ac_compiler_gnu = "xyes"; then
--  STP_ADD_COMPILER_ARGS([-Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=1048576],, [GNUCFLAGS])
--  if test x${USE_MAINTAINER_MODE} = xyes ; then
--    STP_ADD_COMPILER_ARGS([-pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls],, [GNUCFLAGS])
--  fi
--  if test x$ENABLE_DEBUG = xyes ; then
--    STP_ADD_COMPILER_ARG([-g])
--  else
--    STP_ADD_FIRST_COMPILER_ARG([-O6 -O3 -O2 -O1 -O])
--  fi
--else
--  if test x$ENABLE_DEBUG = xyes ; then
--    STP_ADD_COMPILER_ARG([-g])
--  else
--    STP_ADD_FIRST_COMPILER_ARG([-O])
--  fi
--fi
--if test x$ENABLE_PROFILE = xyes ; then
--  STP_ADD_COMPILER_ARG([-pg])
--fi
--AC_SUBST(GNUCFLAGS)
--
- AH_TEMPLATE([HAVE_GCC_ATTRIBUTES],
-             [Define to 1 if GCC special attributes are supported])
- AC_MSG_CHECKING([if $CC supports __attribute__ syntax])


Index: gutenprint.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gutenprint/F-10/gutenprint.spec,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- gutenprint.spec	4 Aug 2008 16:42:10 -0000	1.40
+++ gutenprint.spec	5 Dec 2008 16:19:01 -0000	1.41
@@ -3,14 +3,16 @@
 
 Name:           gutenprint
 Summary:        Printer Drivers Package.
-Version:        5.0.2
-Release:        3%{?dist}
+Version:        5.2.2
+Release:        2%{?dist}
 Group:          System Environment/Base
 URL:            http://gimp-print.sourceforge.net/
 Source0:        http://dl.sf.net/gimp-print/gutenprint-%{version}.tar.bz2
 Source1:        gutenprint-foomaticppdupdate
 Patch0:         gutenprint-menu.patch
 Patch1:         gutenprint-O6.patch
+Patch2:         gutenprint-selinux.patch
+Patch3:         gutenprint-locale.patch
 License:        GPLv2+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  cups-libs >= 1.1.22-0.rc1.9.10, cups >= 1.1.22-0.rc1.9.10 
@@ -21,6 +23,7 @@
 BuildRequires: ghostscript-devel
 %endif
 BuildRequires:  gimp
+BuildRequires:  chrpath
 Obsoletes: gimp-print-utils <= 4.2.7-25
 Provides: gimp-print-utils = 4.2.7-25
 
@@ -126,6 +129,8 @@
 %setup -q -n %{name}-%{version}
 %patch0 -p1 -b .menu
 %patch1 -p1 -b .O6
+%patch2 -p1 -b .selinux
+%patch3 -p1 -b .locale
 
 %build
 %ifarch ppc64
@@ -135,20 +140,21 @@
             --with-foomatic --with-ghostscript \
             --disable-libgutenprintui --without-gimp \
             --with-user-guide --with-samples \
-            --with-escputil --with-test --disable-rpath
+            --with-escputil --with-test --disable-rpath \
+	    --enable-cups-1_2-enhancements \
+	    --enable-simplified-cups-ppds
 
 make %{?_smp_mflags}
  
 %install
 rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
-mv %{buildroot}%{cups_serverbin}/driver/gutenprint.5.0 %{buildroot}%{_sbindir}
-ln -s %{_sbindir}/gutenprint.5.0 %{buildroot}%{cups_serverbin}/driver/
 
+mkdir -p %{buildroot}%{_sbindir}
 install -m755 %{SOURCE1} %{buildroot}%{_sbindir}
 
 rm -rf %{buildroot}%{_datadir}/gutenprint/doc
-rm -rf %{buildroot}%{_libdir}/gutenprint/5.0.0/modules/*.la
+rm -rf %{buildroot}%{_libdir}/gutenprint/5.2/modules/*.la
 
 %find_lang gutenprint
 
@@ -157,6 +163,19 @@
 rm -f %{buildroot}%{_mandir}/man1/ijsgutenprint.1*
 %endif
 
+# Fix up rpath.  If you can find a way to do this without resorting
+# to chrpath, please let me know!
+for file in \
+  %{buildroot}%{_sbindir}/cups-genppd.5.2 \
+  %{buildroot}%{_libdir}/gimp/*/plug-ins/* \
+  %{buildroot}%{_libdir}/*.so.* \
+  %{buildroot}%{cups_serverbin}/driver/* \
+  %{buildroot}%{cups_serverbin}/filter/* \
+  %{buildroot}%{_bindir}/*
+do
+  chrpath --delete ${file}
+done
+
 
 %clean
 rm -rf %{buildroot}
@@ -166,11 +185,7 @@
 %postun -p /sbin/ldconfig
 
 %post cups
-/usr/sbin/cups-genppdupdate.5.0
-/sbin/service cups reload >/dev/null 2>&1 || :
-exit 0
-
-%postun cups
+/usr/sbin/cups-genppdupdate
 /sbin/service cups reload >/dev/null 2>&1 || :
 exit 0
 
@@ -180,7 +195,7 @@
 %doc COPYING AUTHORS NEWS README doc/FAQ.html doc/gutenprint-users-manual.odt doc/gutenprint-users-manual.pdf
 %{_bindir}/escputil
 %{_mandir}/man1/escputil.1*
-%{_bindir}/ijsgutenprint.5.0
+%{_bindir}/ijsgutenprint.5.2
 %if %{build_with_ijs_support}
 %{_mandir}/man1/ijsgutenprint.1*
 %endif
@@ -188,12 +203,14 @@
 %{_libdir}/*.so.*
 %{_libdir}/gutenprint/
 
+# For some reason the po files are needed as well.
+%{_datadir}/locale/*/gutenprint_*.po
+
 %files devel
 %defattr(-,root,root,-)
 %doc ChangeLog doc/developer/reference-html doc/developer/gutenprint.pdf
 %doc doc/gutenprint doc/gutenprintui2
 %{_includedir}/gutenprint/
-%{_includedir}/gutenprintui/
 %{_includedir}/gutenprintui2/
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/gutenprint.pc
@@ -222,12 +239,10 @@
 %defattr(-, root, root,-)
 %config(noreplace) %{_sysconfdir}/cups/command.types
 %{_datadir}/cups/calibrate.ppm
-%{cups_serverbin}/backend/*
 %{cups_serverbin}/filter/*
 %{cups_serverbin}/driver/*
 %{_bindir}/cups-calibrate
 %{_sbindir}/cups-genppd*
-%{_sbindir}/gutenprint.5.0
 %{_mandir}/man8/cups-calibrate.8*
 %{_mandir}/man8/cups-genppd*.8*
 
@@ -239,6 +254,13 @@
 /bin/rm -f /var/cache/foomatic/*
 
 %changelog
+* Fri Dec  5 2008 Tim Waugh <twaugh at redhat.com> 5.2.2-2
+- Fixed generation of globalized PPDs.
+
+* Thu Nov 20 2008 Tim Waugh <twaugh at redhat.com> 5.2.2-1
+- 5.2.2.
+- Restore SELinux file contexts of modified PPDs.
+
 * Mon Aug  4 2008 Tim Waugh <twaugh at redhat.com>
 - Fixed summary for foomatic sub-package.
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gutenprint/F-10/sources,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sources	18 Jan 2008 12:26:28 -0000	1.5
+++ sources	5 Dec 2008 16:19:01 -0000	1.6
@@ -1 +1 @@
-ca6c45616caa720e9e185817272b08d7  gutenprint-5.0.2.tar.bz2
+ffd3fefd28638dfe49caad04ef6d9f50  gutenprint-5.2.2.tar.bz2




More information about the fedora-extras-commits mailing list