summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-09-13 10:57:27 +0000
committerCoprDistGit <infra@openeuler.org>2023-09-13 10:57:27 +0000
commit56228942a7f8b62fd39a090be2ab8cc8fc43cce8 (patch)
tree07d850809cc485a9b459d22de0778e572121f020
parentbcbd5da59eac94d29d56451193eb50ecc7b2d609 (diff)
automatic import of liblangtag
-rw-r--r--.gitignore1
-rw-r--r--0001-ro-MD-ro-to-get-make-check-to-succeed.patch25
-rw-r--r--liblangtag-noparallel-gir.patch8
-rw-r--r--liblangtag.spec129
-rw-r--r--sources1
5 files changed, 164 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..c70ebd8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/liblangtag-0.6.4.tar.bz2
diff --git a/0001-ro-MD-ro-to-get-make-check-to-succeed.patch b/0001-ro-MD-ro-to-get-make-check-to-succeed.patch
new file mode 100644
index 0000000..2e64634
--- /dev/null
+++ b/0001-ro-MD-ro-to-get-make-check-to-succeed.patch
@@ -0,0 +1,25 @@
+From f46641f735e8a22d4c2a2002d0b6b90ff7a664b3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Thu, 30 Jun 2022 10:19:18 +0100
+Subject: [PATCH] ro-MD -> ro to get make check to succeed
+
+---
+ tests/check-tag.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/check-tag.c b/tests/check-tag.c
+index 99466e2..29e738b 100644
+--- a/tests/check-tag.c
++++ b/tests/check-tag.c
+@@ -197,7 +197,7 @@ TDEF (lt_tag_canonicalize) {
+ fail_unless(lt_tag_parse(t1, "mo", NULL), "should be valid langtag.");
+ s = lt_tag_canonicalize(t1, NULL);
+ fail_unless(s != NULL, "Unable to be canonicalize.");
+- fail_unless(lt_strcmp0(s, "ro-MD") == 0, "Unexpected result to be canonicalized.");
++ fail_unless(lt_strcmp0(s, "ro") == 0, "Unexpected result to be canonicalized.");
+ free(s);
+
+ lt_tag_unref(t1);
+--
+2.36.1
+
diff --git a/liblangtag-noparallel-gir.patch b/liblangtag-noparallel-gir.patch
new file mode 100644
index 0000000..d5b2bcf
--- /dev/null
+++ b/liblangtag-noparallel-gir.patch
@@ -0,0 +1,8 @@
+diff -pruN liblangtag-0.6.2.orig/liblangtag-gobject/gendeps.sh liblangtag-0.6.2/liblangtag-gobject/gendeps.sh
+--- liblangtag-0.6.2.orig/liblangtag-gobject/gendeps.sh 2012-12-13 17:59:17.000000000 +0900
++++ liblangtag-0.6.2/liblangtag-gobject/gendeps.sh 2020-11-18 21:10:08.511540427 +0900
+@@ -11,3 +11,4 @@ while [ $# -ne 0 ]; do
+ echo " \$(AM_V_GEN) \$(srcdir)/gengir.sh \$(top_srcdir)/liblangtag \$@"
+ done
+ echo "\$(srcdir)/gendir.sh:"
++echo ".NOTPARALLEL:"
diff --git a/liblangtag.spec b/liblangtag.spec
new file mode 100644
index 0000000..7e41bdd
--- /dev/null
+++ b/liblangtag.spec
@@ -0,0 +1,129 @@
+%global girname LangTag
+%global girapiversion 0.6
+%global soversion 1
+%global soversion_gobject 0
+
+Name: liblangtag
+Version: 0.6.4
+Release: 1
+Summary: An interface library to access tags for identifying languages
+
+License: LGPLv3+ or MPLv2.0
+URL: http://tagoh.bitbucket.org/liblangtag/
+Source0: https://bitbucket.org/tagoh/%{name}/downloads/%{name}-%{version}.tar.bz2
+Patch0: liblangtag-noparallel-gir.patch
+Patch1: 0001-ro-MD-ro-to-get-make-check-to-succeed.patch
+
+Requires: %{name}-data = %{version}-%{release}
+
+BuildRequires: glibc-common pkgconfig(check) pkgconfig(gobject-2.0) make gcc
+BuildRequires: pkgconfig(gobject-introspection-1.0) pkgconfig(libxml-2.0)
+%if ! 0%{?flatpak}
+BuildRequires: gtk-doc
+%endif
+
+%description
+%{name} is an interface library to access tags for identifying
+languages.
+
+Features:
+* several subtag registry database supports:
+ - language
+ - extlang
+ - script
+ - region
+ - variant
+ - extension
+ - grandfathered
+ - redundant
+* handling of the language tags
+ - parser
+ - matching
+ - canonicalizing
+
+%package data
+Summary: %{name} data files
+License: Unicode
+BuildArch: noarch
+
+%description data
+The %{name}-data package contains data files for %{name}.
+
+%package gobject
+Summary: GObject introspection for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description gobject
+The %{name}-gobject package contains files for GObject introspection for
+%{name}.
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}-gobject%{?_isa} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+%package_help
+
+%prep
+%autosetup -p1
+
+%build
+%configure \
+%if 0%{?flatpak}
+ --disable-gtk-doc \
+%endif
+ --disable-silent-rules --disable-static --enable-shared --enable-introspection
+sed -i \
+ -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ libtool
+export LD_LIBRARY_PATH=`pwd`/liblangtag/.libs:`pwd`/liblangtag-gobject/.libs${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
+%make_build
+
+%install
+%make_install
+rm -f %{buildroot}/%{_libdir}/*.la %{buildroot}/%{_libdir}/%{name}/*.la
+
+%ldconfig_scriptlets
+
+%ldconfig_scriptlets gobject
+
+%check
+export LD_LIBRARY_PATH=`pwd`/liblangtag/.libs:`pwd`/liblangtag-gobject/.libs${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
+%make_build check
+
+%files
+%doc AUTHORS NEWS README
+%{_libdir}/%{name}.so.%{soversion}
+%{_libdir}/%{name}.so.%{soversion}.*
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/*.so
+
+%files data
+%license COPYING
+%{_datadir}/%{name}
+
+%files gobject
+%{_libdir}/%{name}-gobject.so.%{soversion_gobject}
+%{_libdir}/%{name}-gobject.so.%{soversion_gobject}.*
+%{_libdir}/girepository-1.0/%{girname}-%{girapiversion}.typelib
+
+%files devel
+%{_includedir}/%{name}
+%{_libdir}/%{name}.so
+%{_libdir}/%{name}-gobject.so
+%{_libdir}/pkgconfig/%{name}.pc
+%{_libdir}/pkgconfig/%{name}-gobject.pc
+%{_datadir}/gir-1.0/%{girname}-%{girapiversion}.gir
+
+%files help
+%license COPYING
+%{_datadir}/gtk-doc/html/%{name}
+
+%changelog
+* Wed Sep 06 2023 Darssin <2020303249@mail.nwpu.edu.cn> - 0.6.4-1
+- Package init
diff --git a/sources b/sources
new file mode 100644
index 0000000..c5be82e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+c93611c472b5875166b4a3a35a66a62d liblangtag-0.6.4.tar.bz2