Changes of Revision 3
[-] | Added | recode.spec |
x 1
2 +# $Id$ 3 +# Authority: dag 4 +# ExcludeDist: rh7 rh9 5 + 6 +Summary: Conversion between character sets and surfaces 7 +Name: recode 8 +Version: 3.6 9 +Release: 1.rf 10 +License: GPL 11 +Group: Applications/File 12 +URL: http://recode.progiciels-bpi.ca/ 13 + 14 +Packager: Dag Wieers <dag@wieers.com> 15 +Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ 16 + 17 +Source: http://recode.progiciels-bpi.ca/archives/recode-%{version}.tar.gz 18 +Patch0: recode.patch 19 +Patch1: recode-3.6-getcwd.patch 20 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root 21 + 22 +%description 23 +recode converts files between character sets and usages. It recognises or 24 +produces nearly 150 different character sets and is able to transliterate 25 +files between almost any pair. When exact transliteration are not possible, 26 +it may get rid of the offending characters or fall back on approximations. 27 +Most RFC 1345 character sets are supported. 28 + 29 +%package devel 30 +Summary: Header files, libraries and development documentation for %{name}. 31 +Group: Development/Libraries 32 +Requires: %{name} = %{version}-%{release} 33 + 34 +%description devel 35 +This package contains the header files, static libraries and development 36 +documentation for %{name}. If you like to develop programs using %{name}, 37 +you will need to install %{name}-devel. 38 + 39 +%prep 40 +%setup 41 +%patch0 -p1 42 +%patch1 -p1 -b .getcwd 43 + 44 +%build 45 +%configure --disable-static 46 +%{__make} %{?_smp_mflags} 47 + 48 +%install 49 +%{__rm} -rf %{buildroot} 50 +%{__make} install DESTDIR="%{buildroot}" 51 +%find_lang %{name} 52 + 53 +### Clean up buildroot 54 +%{__rm} -rf %{buildroot}%{_infodir}/dir 55 + 56 +%post 57 +/sbin/ldconfig 58 +if [ -e "%{_infodir}/recode.info.gz" ]; then 59 + /sbin/install-info %{_infodir}/recode.info.gz %{_infodir}/dir || : 60 +fi 61 + 62 +%preun 63 +if [ -e "%{_infodir}/recode.info.gz" ]; then 64 + /sbin/install-info --delete %{_infodir}/recode.info.gz %{_infodir}/dir || : 65 +fi 66 + 67 +%postun -p /sbin/ldconfig 68 + 69 +%clean 70 +%{__rm} -rf %{buildroot} 71 + 72 +%files -f %{name}.lang 73 +%defattr(-, root, root, 0755) 74 +%doc AUTHORS BACKLOG ChangeLog COPYING* NEWS README THANKS TODO 75 +%doc %{_infodir}/recode.info* 76 +%doc %{_mandir}/man1/recode.1* 77 +%{_bindir}/recode 78 +%{_libdir}/librecode.so.* 79 +%exclude %{_libdir}/librecode.la 80 + 81 +%files devel 82 +%defattr(-, root, root, 0755) 83 +%{_includedir}/recode.h 84 +%{_includedir}/recodext.h 85 +%{_libdir}/librecode.so 86 + 87 +%changelog 88 +* Fri Jun 08 2007 Dag Wieers <dag@wieers.com> - 3.6-1 - +/ 89 +- Initial package. (using DAR) 90 |
||
[+] | Added | recode-3.6-getcwd.patch ^ |
@@ -0,0 +1,11 @@ +--- recode-3.6/lib/gettext.c.orig 2005-03-07 12:18:30.000000000 +0100 ++++ recode-3.6/lib/gettext.c 2005-03-07 12:23:14.000000000 +0100 +@@ -1668,8 +1668,6 @@ + # if !defined HAVE_GETCWD + char *getwd (); + # define getcwd(buf, max) getwd (buf) +-# else +-char *getcwd (); + # endif + # ifndef HAVE_STPCPY + static char *stpcpy PARAMS ((char *dest, const char *src)); | ||
[+] | Added | recode.patch ^ |
@@ -0,0 +1,68 @@ +--- recode-3.6.orig/src/libiconv.c ++++ recode-3.6/src/libiconv.c +@@ -1,5 +1,5 @@ + /* Conversion of files between different charsets and surfaces. +- Copyright © 1999, 2000 Free Software Foundation, Inc. ++ Copyright © 1999, 2000, 2001 Free Software Foundation, Inc. + Contributed by François Pinard <pinard@iro.umontreal.ca>, 1999, + and Bruno Haible <haible@clisp.cons.org>, 2000. + +@@ -195,12 +195,17 @@ + memcpy() doesn't do here, because the regions might overlap. + memmove() isn't worth it, because we rarely have to move more + than 12 bytes. */ +- if (input > input_buffer && input_left > 0) ++ cursor = input_buffer; ++ if (input_left > 0) + { +- cursor = input_buffer; +- do +- *cursor++ = *input++; +- while (--input_left > 0); ++ if (input > input_buffer) ++ { ++ do ++ *cursor++ = *input++; ++ while (--input_left > 0); ++ } ++ else ++ cursor += input_left; + } + } + +--- recode-3.6.orig/src/request.c ++++ recode-3.6/src/request.c +@@ -1073,7 +1073,7 @@ + if (task->output.cursor + 4 >= task->output.limit) + { + RECODE_OUTER outer = task->request->outer; +- size_t old_size = task->output.limit - task->output.buffer; ++ size_t old_size = task->output.cursor - task->output.buffer; + size_t new_size = task->output.cursor + 4 - task->output.buffer; + + /* FIXME: Rethink about how the error should be reported. */ +--- recode-3.6.orig/src/task.c ++++ recode-3.6/src/task.c +@@ -1198,6 +1198,8 @@ + else + success = transform_mere_copy (subtask); + ++ task->output = subtask->output; ++ + if (subtask->input.name && *subtask->input.name) + fclose (subtask->input.file); + if (subtask->output.name && *subtask->output.name) +--- recode-3.6.orig/src/hash.h ++++ recode-3.6/src/hash.h +@@ -21,6 +21,11 @@ + /* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use + obstacks instead of malloc, and recompile `hash.c' with same setting. */ + ++#define hash_lookup recode_hash_lookup ++#define hash_delete recode_hash_delete ++#define hash_free recode_hash_free ++#define hash_insert recode_hash_insert ++ + #ifndef PARAMS + # if PROTOTYPES || __STDC__ + # define PARAMS(Args) Args | ||
Added | recode-3.6.tar.gz ^ |