Hello community,

here is the log from the commit of package fortune for openSUSE:Factory checked 
in at 2018-01-13 21:47:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fortune (Old)
 and      /work/SRC/openSUSE:Factory/.fortune.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fortune"

Sat Jan 13 21:47:40 2018 rev:23 rq:563551 version:1.99.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/fortune/fortune.changes  2017-08-07 
01:33:52.277098203 +0200
+++ /work/SRC/openSUSE:Factory/.fortune.new/fortune.changes     2018-01-13 
21:47:41.301960486 +0100
@@ -1,0 +2,5 @@
+Tue Jan  9 17:51:14 UTC 2018 - [email protected]
+
+- Add fortune-no-recode.patch.
+
+-------------------------------------------------------------------

New:
----
  fortune-no-recode.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fortune.spec ++++++
--- /var/tmp/diff_new_pack.NBmUMJ/_old  2018-01-13 21:47:42.469906036 +0100
+++ /var/tmp/diff_new_pack.NBmUMJ/_new  2018-01-13 21:47:42.473905850 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package fortune
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,21 +15,22 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Url:            ftp://sunsite.unc.edu/pub/Linux/games/amusements/fortune/
 
 Name:           fortune
 Version:        1.99.1
 Release:        0
 Summary:        Random Saying
+# let's treat debian as upstream, they take a lot of care
 License:        BSD-3-Clause
 Group:          Amusements/Toys/Other
-# let's treat debian as upstream, they take a lot of care
 Source:         
http://ftp.de.debian.org/debian/pool/main/f/fortune-mod/fortune-mod_%{version}.orig.tar.gz
 Patch0:         
http://ftp.de.debian.org/debian/pool/main/f/fortune-mod/fortune-mod_1.99.1-4.diff.gz
 # suse specifics
 Patch1:         move-debian-suse.diff
+Patch2:         fortune-no-recode.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  recode-devel
 
 %description
 Fortune displays a random text string from a set of files in a certain
@@ -42,6 +43,7 @@
 %setup  -n %name-mod-%version
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 make all %{?_smp_mflags} CC="%__cc"

++++++ fortune-no-recode.patch ++++++
From: Jan Engelhardt <[email protected]>
Date: 2018-01-09 18:59:13.664773029 +0100

No fortunes except ONE actually uses non-ASCII characters, which is substituted
in short order. This allows dropping the entire librecode use, and we do not
even need to convert it to iconv, though that's likewise trivial.

---
 Makefile              |    2 +-
 datfiles/Makefile     |    1 -
 datfiles/off/Makefile |    1 -
 datfiles/pets         |    2 +-
 fortune/fortune.c     |   33 ---------------------------------
 5 files changed, 2 insertions(+), 37 deletions(-)

Index: fortune-mod-1.99.1/Makefile
===================================================================
--- fortune-mod-1.99.1.orig/Makefile
+++ fortune-mod-1.99.1/Makefile
@@ -62,7 +62,7 @@ REGEXDEFS=-DHAVE_REGEX_H -DBSD_REGEX -DH
 #
 REGEXLIBS=
 
-RECODELIBS=-lrecode
+RECODELIBS=
 
 DEFINES=-DFORTDIR="\"$(COOKIEDIR)\"" -DOFFDIR="\"$(OCOOKIEDIR)\"" 
-DLOCFORTDIR="\"$(LOCALDIR)\"" -DLOCOFFDIR="\"$(LOCALODIR)\""
 CFLAGS=-O2 $(DEFINES) -Wall -fomit-frame-pointer -pipe -fsigned-char
Index: fortune-mod-1.99.1/datfiles/Makefile
===================================================================
--- fortune-mod-1.99.1.orig/datfiles/Makefile
+++ fortune-mod-1.99.1/datfiles/Makefile
@@ -46,7 +46,6 @@ cookies-stamp:
                if [ ! -f $$i.old ] ; then \
                        cp $$i $$i.old; \
                fi; \
-               recode latin1..u8 $$i ; \
                $(STRFILE) $$i ; \
                ln -s $$i $$i.u8 || exit $? ; \
            done
Index: fortune-mod-1.99.1/datfiles/off/Makefile
===================================================================
--- fortune-mod-1.99.1.orig/datfiles/off/Makefile
+++ fortune-mod-1.99.1/datfiles/off/Makefile
@@ -30,7 +30,6 @@ recoded-stamp:
                if [ ! -f unrotated/$$i.old ]; then \
                    cp unrotated/$$i unrotated/$$i.old ; \
                fi; \
-               recode latin1..u8 unrotated/$$i; \
            done
        touch recoded-stamp
        
Index: fortune-mod-1.99.1/datfiles/pets
===================================================================
--- fortune-mod-1.99.1.orig/datfiles/pets
+++ fortune-mod-1.99.1/datfiles/pets
@@ -19,7 +19,7 @@ About the only thing on a farm that has
 All intelligent species own cats.
 %
 Any Member introducing or causing to be introduced a dog into the Society's
-premises shall be liable to a fine of £5 inflicted by the Treasurer. Any animal
+premises shall be liable to a fine of GBP 5 inflicted by the Treasurer. Any 
animal
 leading a blind person shall be deemed to be a cat. Any animal entering on
 Police business shall be deemed to be a wombat.
                -- Rule 51, Oxford Union Society
Index: fortune-mod-1.99.1/fortune/fortune.c
===================================================================
--- fortune-mod-1.99.1.orig/fortune/fortune.c
+++ fortune-mod-1.99.1/fortune/fortune.c
@@ -140,7 +140,6 @@ typedef enum
 #include       <errno.h>
 #include       <locale.h>
 #include       <langinfo.h>
-#include       <recode.h>
 
 
 /* This makes GNU libc to prototype the BSD regex functions */
@@ -253,9 +252,6 @@ regex_t Re_pat;
 
 #endif /* BSD_REGEX */
 
-RECODE_REQUEST request;
-RECODE_OUTER outer;
-
 int add_dir(register FILEDESC *);
 
 char *program_version(void)
@@ -1548,12 +1544,7 @@ void matches_in_list(FILEDESC * list)
                *sp = '\0';
                nchar = sp - Fortbuf;
 
-               if (fp->utf8_charset && No_recode == FALSE) 
-               {
-                   output = recode_string (request, Fortbuf);
-               } else {
                    output = Fortbuf;
-               }
                /* Should maybe rot13 Fortbuf -allover */
 
                 if(fp->tbl.str_flags & STR_ROTATED)
@@ -1630,20 +1621,9 @@ void display(FILEDESC * fp)
                    *p = 'a' + (ch - 'a' + 13) % 26;
            }
        }
-       if(fp->utf8_charset && No_recode == FALSE) {
-           char *output;
-           output = recode_string (request, line);
-           fputs(output, stdout);
-           free(output);
-       }
-       else
            fputs(line, stdout);
     }
     fflush(stdout);
-
-    if(fp->utf8_charset) {
-       recode_delete_request(request);
-    }  
 }
 
 /*
@@ -1677,22 +1657,9 @@ int max(register int i, register int j)
 
 int main(int ac, char *av[])
 {
-    char *ctype, *crequest;
     getargs(ac, av);
 
-    outer = recode_new_outer(true);
-    request = recode_new_request (outer);
-
     setlocale(LC_ALL,"");
-    ctype = nl_langinfo(CODESET);
-    if(strcmp(ctype,"ANSI_X3.4-1968") == 0)
-        ctype="ISO-8859-1";
-       
-    crequest = malloc(strlen(ctype) + 7 + 1);
-    sprintf(crequest, "UTF-8..%s", ctype);
-    recode_scan_request (request, crequest);
-    free(crequest);
-
 #ifndef NO_REGEX
     if (Match)
        exit(find_matches() != 0);

Reply via email to