SHA256
1
0
forked from pool/librcc
Stephan Kulow 2012-05-11 09:03:47 +00:00 committed by Git OBS Bridge
commit b540f1a698
10 changed files with 355 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

1
baselibs.conf Normal file
View File

@ -0,0 +1 @@
librcc0

View File

@ -0,0 +1,16 @@
Author: Kyrill Detinov <lazy.kent.suse@gmail.com>
Description: Fix Czech locale code in config file.
Index: examples/rcc.xml
===================================================================
--- examples/rcc.xml.orig 2009-08-27 23:57:37.000000000 +0400
+++ examples/rcc.xml 2010-03-14 22:19:39.000000000 +0300
@@ -38,7 +38,7 @@
<Charset>ISO-IR-111</Charset>
</Charsets>
</Language>
- <Language name="cz">
+ <Language name="cs">
<FullName locale="ru">Чешский</FullName>
<Charsets>
<Charset>CP1250</Charset>

View File

@ -0,0 +1,52 @@
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

@ -0,0 +1,42 @@
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;

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

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

31
librcc-printf.diff Normal file
View File

@ -0,0 +1,31 @@
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);

67
librcc.changes Normal file
View File

@ -0,0 +1,67 @@
-------------------------------------------------------------------
Fri May 11 08:55:36 UTC 2012 - coolo@suse.com
- rename base package to librcc to avoid package renames later
-------------------------------------------------------------------
Fri Dec 16 11:26:39 UTC 2011 - lazy.kent@opensuse.org
- Corrected License tag according to SPDX standard.
- Use full URL as a source.
- Removed unsupported SUSE version check.
- Spec clean up and formatting.
-------------------------------------------------------------------
Mon Nov 21 15:27:44 UTC 2011 - jengelh@medozas.de
- Remove redundant/unwanted tags/section (cf. specfile guidelines)
- Use %_smp_mflags for parallel building
-------------------------------------------------------------------
Sun Nov 20 06:18:35 UTC 2011 - coolo@suse.com
- add libtool as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Tue Aug 23 14:34:00 CEST 2011 - pth@suse.de
- Use packageand to pull in librcc0 if aspell and unzip are
installed (bnc#710609).
-------------------------------------------------------------------
Mon Jun 7 12:04:31 UTC 2010 - lazy.kent.suse@gmail.com
- corrected rccFree patch
-------------------------------------------------------------------
Wed May 26 10:59:41 UTC 2010 - pth@suse.de
- Fixx rccFree definition and all its callers.
-------------------------------------------------------------------
Fri Apr 2 19:36:54 UTC 2010 - lazy.kent.suse@gmail.com
- add COPYING
-------------------------------------------------------------------
Sun Mar 14 19:30:24 UTC 2010 - lazy.kent.suse@gmail.com
- fix Czech locale code in config file
-------------------------------------------------------------------
Thu Mar 11 18:57:30 UTC 2010 - lazy.kent.suse@gmail.com
- split off runtime package
- remove rpmlint warnings
-------------------------------------------------------------------
Mon Mar 8 18:46:02 UTC 2010 - lazy.kent.suse@gmail.com
- spec-file reworked
- don't build GTK UI
-------------------------------------------------------------------
Sat Feb 13 00:00:00 MSK 2010 - csa@dside.dyndns.org
New version

119
librcc.spec Normal file
View File

@ -0,0 +1,119 @@
#
# spec file for package librcc
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define lname librcc0
Name: librcc
Version: 0.2.9
Release: 0
Summary: Russian Charset Conversion Library
License: LGPL-2.1+
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: librcd-devel
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: pkgconfig(libxml-2.0)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: rcc-runtime
Supplements: packageand(unzip:aspell)
%description
Provides posibility to automaticaly convert considered encodings (a lot
of languages is supported, not only russian one) to/from UTF-8. The
library is part of rusxmms patch.
%package -n %lname
Summary: Russian Charset Conversion Library
Group: System/Libraries
%description -n %lname
Provides posibility to automaticaly convert considered encodings (a lot
of languages is supported, not only russian one) to/from UTF-8. The
library is part of rusxmms patch.
%package -n librcc-devel
Summary: Development Files for LibRCC
Group: Development/Libraries/C and C++
Requires: %{lname} = %{version}
%description -n librcc-devel
Development files for the package LibRCC.
%package -n rcc-runtime
Summary: LibRCC Runtime Environment
Group: Productivity/Text/Convertors
%description -n rcc-runtime
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}
%install
%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}
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root,-)
%{_libdir}/librcc.so.*
%{_libdir}/librccui.so.*
%files -n librcc-devel
%defattr(-,root,root,-)
%doc docs examples
%{_includedir}/*
%{_libdir}/lib*.so
%files -n rcc-runtime
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/rcc
%config(noreplace) %{_sysconfdir}/rcc.xml
%changelog