summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-09-20 10:46:25 +0000
committerCoprDistGit <infra@openeuler.org>2023-09-20 10:46:25 +0000
commitd65c916465e99b2e633a887d5b48ce60b1327adf (patch)
tree8946b70643a262a79abe5ab97987b0271a42411a
parenta71766a39cff287a4c7b9481638612721eb7b29c (diff)
automatic import of liblangtagopeneuler23.03openeuler22.09
-rw-r--r--.gitignore1
-rw-r--r--1001-liblangtag-gcc10.patch28
-rw-r--r--liblangtag-noparallel-gir.patch8
-rw-r--r--liblangtag.spec141
-rw-r--r--sources1
5 files changed, 179 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..b2f83ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/liblangtag-0.6.2.tar.bz2
diff --git a/1001-liblangtag-gcc10.patch b/1001-liblangtag-gcc10.patch
new file mode 100644
index 0000000..358f887
--- /dev/null
+++ b/1001-liblangtag-gcc10.patch
@@ -0,0 +1,28 @@
+From 49135ef561f309078f0bfd6e1f15052769cf75b4 Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Thu, 26 Sep 2019 18:57:32 +0900
+Subject: [PATCH] Fix possible null argument for %s directive
+
+Patch from Jeff Law
+---
+ liblangtag/lt-script-db.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/liblangtag/lt-script-db.c b/liblangtag/lt-script-db.c
+index 8278078..bbbd3e7 100644
+--- a/liblangtag/lt-script-db.c
++++ b/liblangtag/lt-script-db.c
+@@ -133,6 +133,10 @@ lt_script_db_parse(lt_script_db_t *scriptdb,
+ }
+ cnode = cnode->next;
+ }
++ if (!subtag && !desc) {
++ lt_warning("No subtag and no description");
++ goto bail1;
++ }
+ if (!subtag) {
+ lt_warning("No subtag node: description = '%s'",
+ desc);
+--
+2.10.5
+
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..250a4af
--- /dev/null
+++ b/liblangtag.spec
@@ -0,0 +1,141 @@
+%global girname LangTag
+%global girapiversion 0.6
+%global soversion 1
+%global soversion_gobject 0
+
+Name: liblangtag
+Version: 0.6.2
+Release: 1%{?dist}
+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
+
+# Begin: Anolis customized patches
+# backport patch from upstream
+Patch1001: 1001-liblangtag-gcc10.patch
+# End: Anolis customized patches
+
+Requires: %{name}-data = %{version}-%{release}
+
+BuildRequires: glibc-common
+%if ! 0%{?flatpak}
+BuildRequires: gtk-doc
+%endif
+BuildRequires: pkgconfig(check)
+BuildRequires: pkgconfig(gobject-2.0)
+BuildRequires: pkgconfig(gobject-introspection-1.0)
+BuildRequires: pkgconfig(libxml-2.0)
+
+%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: UCD
+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 doc
+Summary: Documentation of %{name} API
+BuildArch: noarch
+
+%description doc
+The %{name}-doc package contains documentation files for %{name}.
+
+%prep
+%autosetup -p1
+
+%build
+%configure \
+%if 0%{?flatpak}
+ --disable-gtk-doc \
+%endif
+ --disable-silent-rules --disable-static --enable-shared --enable-introspection --disable-test
+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 %{?_smp_mflags}
+
+%install
+make install DESTDIR=%{buildroot}
+rm -f %{buildroot}/%{_libdir}/*.la %{buildroot}/%{_libdir}/%{name}/*.la
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%post gobject -p /sbin/ldconfig
+%postun gobject -p /sbin/ldconfig
+
+%check
+export LD_LIBRARY_PATH=`pwd`/liblangtag/.libs:`pwd`/liblangtag-gobject/.libs${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
+make %{?_smp_mflags} check
+
+%files
+%{_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 doc
+%license COPYING
+%doc AUTHORS NEWS README
+%{_datadir}/gtk-doc/html/%{name}
+
+%changelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..3f32a8d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+284f120247323a35122ab32b4b359c45 liblangtag-0.6.2.tar.bz2