From 90d947f4c5564d1924404ad27b78308a25cb58ef Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Tue, 21 Dec 2021 16:28:19 +0900 Subject: [PATCH] Bump to libdatrie 0.2.13 Change-Id: I0f5aff329a20ba01cbfa8808a56b27b8131342b8 --- configure.ac | 4 +- packaging/Add-pie-compile-option.patch | 13 ++++++ packaging/Fix_AC_MSG_RESULT_undefied.patch | 35 +++++++++++++++ packaging/baselibs.conf | 1 + packaging/libdatrie.manifest | 5 +++ packaging/libdatrie.spec | 72 ++++++++++++++++++++++++++++++ 6 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 packaging/Add-pie-compile-option.patch create mode 100644 packaging/Fix_AC_MSG_RESULT_undefied.patch create mode 100644 packaging/baselibs.conf create mode 100644 packaging/libdatrie.manifest create mode 100644 packaging/libdatrie.spec diff --git a/configure.ac b/configure.ac index 7bca279..3d4a711 100644 --- a/configure.ac +++ b/configure.ac @@ -116,8 +116,8 @@ if test "x$enable_doxygen_doc" = "xyes"; then else AC_MSG_CHECKING([doxygen >= $DOXYGEN_REQ_VER]) DOXYGEN_VER=$($DOXYGEN --version) - AX_COMPARE_VERSION([$DOXYGEN_VER],[ge],[DOXYGEN_REQ_VER], - [AC_MSG_RESULT([$DOXYGEN_VER, yes])], + AX_COMPARE_VERSION([$DOXYGEN_VER],[ge],[DOXYGEN_REQ_VER], + [AC_MSG_RESULT([$DOXYGEN_VER, yes])], [AC_MSG_RESULT([$DOXYGEN_VER, no, documentation disabled]); enable_doxygen_doc="no"]) fi fi diff --git a/packaging/Add-pie-compile-option.patch b/packaging/Add-pie-compile-option.patch new file mode 100644 index 0000000..7a563ad --- /dev/null +++ b/packaging/Add-pie-compile-option.patch @@ -0,0 +1,13 @@ +diff --git a/tools/Makefile.am b/tools/Makefile.am +index 992530b..470ac84 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -6,6 +6,8 @@ trietool_SOURCES = trietool.c + trietool_LDADD = \ + $(top_builddir)/datrie/libdatrie.la \ + $(ICONV_LIBS) ++trietool_CFLAGS = -fPIC ++trietool_LDFLAGS = -pie + + OLD_PROG_NAME=trietool-0.2 + diff --git a/packaging/Fix_AC_MSG_RESULT_undefied.patch b/packaging/Fix_AC_MSG_RESULT_undefied.patch new file mode 100644 index 0000000..b5e23ea --- /dev/null +++ b/packaging/Fix_AC_MSG_RESULT_undefied.patch @@ -0,0 +1,35 @@ +diff --git a/configure.ac b/configure.ac +index 3d4a711..aa2b304 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -109,18 +109,18 @@ AC_ARG_ENABLE(doxygen-doc, + [disable document generation with doxygen])], + , enable_doxygen_doc="yes") + +-if test "x$enable_doxygen_doc" = "xyes"; then +- AC_CHECK_PROG(DOXYGEN,doxygen,doxygen,no) +- if test "x$DOXYGEN" = "xno"; then +- enable_doxygen_doc="no" +- else +- AC_MSG_CHECKING([doxygen >= $DOXYGEN_REQ_VER]) +- DOXYGEN_VER=$($DOXYGEN --version) +- AX_COMPARE_VERSION([$DOXYGEN_VER],[ge],[DOXYGEN_REQ_VER], +- [AC_MSG_RESULT([$DOXYGEN_VER, yes])], +- [AC_MSG_RESULT([$DOXYGEN_VER, no, documentation disabled]); enable_doxygen_doc="no"]) +- fi +-fi ++# if test "x$enable_doxygen_doc" = "xyes"; then ++# AC_CHECK_PROG(DOXYGEN,doxygen,doxygen,no) ++# if test "x$DOXYGEN" = "xno"; then ++# enable_doxygen_doc="no" ++# else ++# AC_MSG_CHECKING([doxygen >= $DOXYGEN_REQ_VER]) ++# DOXYGEN_VER=$($DOXYGEN --version) ++# AX_COMPARE_VERSION([$DOXYGEN_VER],[ge],[DOXYGEN_REQ_VER], ++# [AC_MSG_RESULT([$DOXYGEN_VER, yes])], ++# [AC_MSG_RESULT([$DOXYGEN_VER, no, documentation disabled]); enable_doxygen_doc="no"]) ++# fi ++# fi + + dnl where to install the doxygen-generated HTML doc + AC_ARG_WITH(html-docdir, diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf new file mode 100644 index 0000000..bc428c7 --- /dev/null +++ b/packaging/baselibs.conf @@ -0,0 +1 @@ +libdatrie diff --git a/packaging/libdatrie.manifest b/packaging/libdatrie.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/libdatrie.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/libdatrie.spec b/packaging/libdatrie.spec new file mode 100644 index 0000000..0e23889 --- /dev/null +++ b/packaging/libdatrie.spec @@ -0,0 +1,72 @@ +Name: libdatrie +Version: 0.2.13 +Release: 0 +License: LGPL-2.1+ +Summary: Double-Array Trie Library +Url: http://linux.thai.net/~thep/datrie/datrie.html +Group: System/Libraries +Source: %{name}-%{version}.tar.gz +Source1: Add-pie-compile-option.patch +Source2: Fix_AC_MSG_RESULT_undefied.patch +Source99: baselibs.conf +Source1001: libdatrie.manifest + +BuildRequires: pkg-config + +%description +This is an implementation of double-array structure for representing +trie, as proposed by Junichi Aoe. + +Summary: Double-Array Trie Library +Group: Development/Libraries/C and C++ + +%package devel +Summary: Double-Array Trie Library (development) +Group: Development/Libraries/C and C++ +Requires: libdatrie = %{version} + +%description devel +This is an implementation of double-array structure for representing +trie, as proposed by Junichi Aoe. + +This package contains the development files for libdatrie. + +%prep +%setup -q +cp %{SOURCE1001} . +%__patch -p1 < %{SOURCE1} +%__patch -p1 < %{SOURCE2} + +%build +autoreconf -fi + +chmod +x ./configure +%configure \ + --disable-static --with-pic \ + --disable-doxygen-doc +%__make %{?_smp_mflags} + +%check +# %__make check || exit 0 + +%install +%make_install +%remove_docs + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%manifest %{name}.manifest +%license COPYING +%{_libdir}/libdatrie.so.1* + +%files devel +%manifest %{name}.manifest +%license COPYING +%{_bindir}/trietool +%{_bindir}/trietool-0.2 +%{_includedir}/datrie/ +%{_libdir}/libdatrie.so +%{_libdir}/pkgconfig/datrie-0.2.pc -- 2.7.4