Kyrill Detinov 2012-12-20 21:26:35 +00:00 committed by Git OBS Bridge
parent 1153b53f98
commit 0d2cc19c97
7 changed files with 19 additions and 143 deletions

3
librcc-0.2.10.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b0080d7a15b453d4a76719496d7b88425ffef4a55278694996467989d2d22361
size 469008

View File

@ -1,52 +0,0 @@
Description: Fix clean-up in the case of context initialization failure (call rccFreeContext instead of rccFree)
Author: Suren A. Chilingaryan <csa@dside.dyndns.org>
Index: src/librcc.c
===================================================================
--- src/librcc.c.orig 2010-06-05 13:56:37.000000000 +0400
+++ src/librcc.c 2010-06-05 13:56:40.000000000 +0400
@@ -82,7 +82,7 @@ rcc_compiled_configuration rccGetCompile
return &compiled_configuration;
}
-int rccInit() {
+int rccInit(void) {
int err;
unsigned long i, rpos;
@@ -126,7 +126,7 @@ int rccInit() {
return 0;
}
-void rccFree() {
+void rccFree(void) {
if (rcc_default_ctx) {
rccFreeContext(rcc_default_ctx);
rcc_default_ctx = NULL;
@@ -233,7 +233,7 @@ rcc_context rccCreateContext(const char
if (locale_variable) {
if (strlen(locale_variable)>=RCC_MAX_VARIABLE_CHARS) {
- rccFree(ctx);
+ rccFreeContext(ctx);
return NULL;
}
strcpy(ctx->locale_variable, locale_variable);
@@ -251,7 +251,7 @@ rcc_context rccCreateContext(const char
rccRegisterLanguage(ctx, rcc_default_languages+i);
if (max_languages < i) {
- rccFree(ctx);
+ rccFreeContext(ctx);
return NULL;
}
@@ -266,7 +266,7 @@ rcc_context rccCreateContext(const char
rccRegisterClass(ctx, defclasses+i);
if (max_classes < i) {
- rccFree(ctx);
+ rccFreeContext(ctx);
return NULL;
}
}

View File

@ -1,42 +0,0 @@
Author: Suren A. Chilingaryan <csa@dside.dyndns.org>
Description: Remove rpmlint warnings
Index: src/librcc.c
===================================================================
--- src/librcc.c.orig 2009-08-27 23:57:37.000000000 +0400
+++ src/librcc.c 2010-03-11 22:40:46.000000000 +0300
@@ -401,8 +401,8 @@ rcc_language_id rccRegisterLanguage(rcc_
if ((i==1)&&(!language->charsets[1])&&(rccIsUTF8(language->charsets[0])))
ctx->ilang[ctx->n_languages].latin = 1;
- ctx->languages[ctx->n_languages++] = (rcc_language_ptr)(ctx->ilang + ctx->n_languages);
- ctx->languages[ctx->n_languages] = NULL;
+ ctx->languages[ctx->n_languages] = (rcc_language_ptr)(ctx->ilang + ctx->n_languages);
+ ctx->languages[++ctx->n_languages] = NULL;
if (!ctx->current_language)
ctx->current_config = rccGetCurrentConfig(ctx);
@@ -508,8 +508,8 @@ rcc_class_id rccRegisterClass(rcc_contex
ctx->iclass[ctx->n_classes].disabled = NULL;
ctx->iclass[ctx->n_classes].additional = NULL;
- ctx->classes[ctx->n_classes++] = (rcc_class_ptr)(ctx->iclass + ctx->n_classes);
- ctx->classes[ctx->n_classes] = NULL;
+ ctx->classes[ctx->n_classes] = (rcc_class_ptr)(ctx->iclass + ctx->n_classes);
+ ctx->classes[++ctx->n_classes] = NULL;
if (!strcasecmp(cl->name, "id3")) {
rccRegisterDisabledCharsets(ctx, ctx->n_classes - 1, rcc_default_disabled_id3_charsets);
Index: src/rccstring.c
===================================================================
--- src/rccstring.c.orig 2009-08-27 23:57:37.000000000 +0400
+++ src/rccstring.c 2010-03-11 22:40:46.000000000 +0300
@@ -64,7 +64,7 @@ int rccStringFixID(rcc_string string, rc
header = (rcc_string_header*)string;
- memcpy(lang, header->language, 2); lang[3] = 0;
+ memcpy(lang, header->language, 2); lang[2] = 0;
curlang = rccGetLanguageName(ctx, header->language_id);
if ((curlang)&&(!strcasecmp(lang, curlang))) return 0;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8d3bd4083edfd54dcd866d5b9f3f3f2a4f63013c895eeabb00e3be79e44e3a43
size 411294

View File

@ -1,31 +0,0 @@
Author: Suren A. Chilingaryan <csa@dside.dyndns.org>
Index: examples/example1.c
===================================================================
--- examples/example1.c.orig 2009-08-27 23:57:37.000000000 +0400
+++ examples/example1.c 2010-03-08 22:59:20.000000000 +0300
@@ -49,9 +49,9 @@ int main() {
if (strlen(buf)<2) break;
recoded = rccRecode(NULL, 0, 1, buf);
if (recoded) {
- printf(recoded);
+ printf("%s", recoded);
free(recoded);
- } else printf(buf);
+ } else printf("%s", buf);
}
rccFree();
Index: examples/example2.c
===================================================================
--- examples/example2.c.orig 2009-08-27 23:57:37.000000000 +0400
+++ examples/example2.c 2010-03-08 22:59:20.000000000 +0300
@@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
if (rccstring) {
recoded = rccTo(NULL, 1, rccstring);
if (recoded) {
- printf(recoded);
+ printf("%s", recoded);
free(recoded);
} else printf("Recoding from UTF-8 is failed\n");
free(rccstring);

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Dec 20 21:09:11 UTC 2012 - lazy.kent@opensuse.org
- Update to 0.2.10.
* Fixed bugs.
- Drop librcc-printf.diff, librcc-0.2.9-suse-lint.diff,
librcc-0.2.9-provide_prototype.patch (fixed upstream).
- Build against libdb (build requires db-devel).
-------------------------------------------------------------------
Fri May 11 08:55:36 UTC 2012 - coolo@suse.com

View File

@ -18,7 +18,7 @@
%define lname librcc0
Name: librcc
Version: 0.2.9
Version: 0.2.10
Release: 0
Summary: Russian Charset Conversion Library
License: LGPL-2.1+
@ -26,22 +26,17 @@ Group: System/Libraries
Url: http://rusxmms.sourceforge.net
Source0: http://dside.dyndns.org/files/rusxmms/%{name}-%{version}.tar.bz2
Source1: baselibs.conf
# PATCH-FIX-UPSTREAM librcc-printf.diff csa@dside.dyndns.org
Patch1: librcc-printf.diff
# PATCH-FIX-UPSTREAM librcc-0.2.9-suse-lint.diff csa@dside.dyndns.org -- remove rpmlint warnings
Patch2: librcc-0.2.9-suse-lint.diff
# PATCH-FIX-UPSTREAM librcc-0.2.9-czech_config.patch lazy.kent.suse@gmail.com -- fix Czech locale code in config file
Patch3: librcc-0.2.9-czech_config.patch
# PATCH-FIX-UPSTREAM librcc-0.2.9-provide_prototype.patch csa@dside.dyndns.org -- fix clean-up in the case of context initialization failure
Patch4: librcc-0.2.9-provide_prototype.patch
BuildRequires: aspell-devel
BuildRequires: enca-devel
BuildRequires: db-devel
BuildRequires: librcd-devel
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: pkgconfig(enca)
BuildRequires: pkgconfig(libxml-2.0)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: rcc-runtime
Requires: rcc-runtime = %{version}
Supplements: packageand(unzip:aspell)
%description
@ -75,16 +70,12 @@ Runtime environment for the package LibRCC.
%prep
%setup -qn %{name}-%{version}
%patch1
%patch2
%patch3
%patch4
%build
./autogen.sh
%configure \
--disable-static \
--disable-bdb \
--disable-libtranslate \
--disable-gtk2
make %{?_smp_mflags}
@ -93,7 +84,7 @@ make %{?_smp_mflags}
%make_install
install -Dm 0644 examples/rcc.xml %{buildroot}%{_sysconfdir}/rcc.xml
rm -f %{buildroot}%{_libdir}/{*.la,rcc/engines/*.la}
rm -rf %{_builddir}/librcc-%{version}/examples/{.deps,Makefile}
rm -rf %{_builddir}/librcc-%{version}/examples/{.deps,Makefile,*~}
%post -n %lname -p /sbin/ldconfig
@ -109,11 +100,12 @@ rm -rf %{_builddir}/librcc-%{version}/examples/{.deps,Makefile}
%doc docs examples
%{_includedir}/*
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/%{name}.pc
%files -n rcc-runtime
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/rcc
%{_libdir}/rcc/
%config(noreplace) %{_sysconfdir}/rcc.xml
%changelog