Bump to pcre 8.45 66/269866/1 accepted/tizen_7.0_base accepted/tizen_7.0_base_hotfix accepted/tizen_7.0_base_tool accepted/tizen_7.0_base_tool_hotfix accepted/tizen_base_tool sandbox/dh0128.kwak/pcre-8.45-20220120 tizen_7.0_base tizen_7.0_base_hotfix accepted/tizen/7.0/base/20230714.003034 accepted/tizen/7.0/base/hotfix/20230714.003846 accepted/tizen/7.0/base/tool/20221028.121221 accepted/tizen/7.0/base/tool/hotfix/20221115.085729 accepted/tizen/8.0/base/20231005.045014 accepted/tizen/base/20230714.003440 accepted/tizen/base/tool/20220222.094009 submit/tizen_7.0_base/20221028.201101 submit/tizen_7.0_base_hotfix/20221115.161601 submit/tizen_base/20220121.045913 submit/tizen_base/20220206.231649 submit/tizen_base/20220214.002031 submit/tizen_base/20220214.044439 submit/tizen_base/20220222.045727 tizen_7.0_m2_release tizen_8.0_m2_release
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 21 Jan 2022 04:28:46 +0000 (13:28 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 21 Jan 2022 04:28:46 +0000 (13:28 +0900)
Change-Id: Ib5ddd5b49a9439b8719108a04db8123e7acc1cb9

packaging/add_pie_compile_option.patch [new file with mode: 0644]
packaging/baselibs.conf [new file with mode: 0644]
packaging/pcre.manifest [new file with mode: 0644]
packaging/pcre.spec [new file with mode: 0644]

diff --git a/packaging/add_pie_compile_option.patch b/packaging/add_pie_compile_option.patch
new file mode 100644 (file)
index 0000000..b0a99a9
--- /dev/null
@@ -0,0 +1,20 @@
+diff --git a/Makefile.am b/Makefile.am
+index 22b6947..52518d9 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -494,6 +494,7 @@ bin_PROGRAMS += pcretest
+ pcretest_SOURCES = pcretest.c
+ pcretest_CFLAGS = $(AM_CFLAGS)
+ pcretest_LDADD = $(LIBREADLINE)
++pcretest_LDFLAGS = -pie
+ if WITH_PCRE8
+ pcretest_SOURCES += pcre_printint.c
+ pcretest_LDADD += libpcre.la libpcreposix.la
+@@ -522,6 +523,7 @@ pcregrep_SOURCES = pcregrep.c
+ pcregrep_CFLAGS = $(AM_CFLAGS)
+ pcregrep_LDADD = $(LIBZ) $(LIBBZ2)
+ pcregrep_LDADD += libpcre.la libpcreposix.la
++pcregrep_LDFLAGS = -pie
+ if WITH_GCOV
+ pcregrep_CFLAGS += $(GCOV_CFLAGS)
+ pcregrep_LDADD += $(GCOV_LIBS)
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644 (file)
index 0000000..2e18f05
--- /dev/null
@@ -0,0 +1,5 @@
+libpcre
+libpcreposix
+libpcrecpp
+       provides "pcre-<targettype> = <version>"
+       obsoletes "pcre-<targettype> <= <version>"
diff --git a/packaging/pcre.manifest b/packaging/pcre.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/pcre.spec b/packaging/pcre.spec
new file mode 100644 (file)
index 0000000..92d2d1e
--- /dev/null
@@ -0,0 +1,181 @@
+%define keepstatic 1
+Name:           pcre
+Version:        8.45
+Release:        0
+License:        BSD-2.0
+Summary:        A library for Perl-compatible regular expressions
+Url:            ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
+Group:          System/Libraries
+Source:         ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{name}-%{version}.tar.bz2
+Source2:        baselibs.conf
+Source10:       add_pie_compile_option.patch
+Source1001:    pcre.manifest
+BuildRequires:  gcc-c++
+BuildRequires:  libtool
+BuildRequires:  pkg-config
+
+%description
+The PCRE library is a set of functions that implement regular
+expression pattern matching using the same syntax and semantics
+as Perl 5.
+
+%package        devel
+Summary:        A library for Perl-compatible regular expressions
+Group:          System/Libraries
+Requires:       libpcre = %{version}
+Requires:       libpcrecpp = %{version}
+Requires:       libpcreposix = %{version}
+Requires:       libstdc++-devel
+
+%description devel
+The PCRE library is a set of functions that implement regular
+expression pattern matching using the same syntax and semantics
+as Perl 5.
+
+%package        devel-static
+Summary:        A library for Perl-compatible regular expressions
+Group:          System/Libraries
+Requires:       pcre-devel = %{version}
+
+%description devel-static
+The PCRE library is a set of functions that implement regular
+expression pattern matching using the same syntax and semantics
+as Perl 5.
+This package contains static versions of the PCRE libraries.
+
+%package -n libpcre
+Summary:        A library for Perl-compatible regular expressions
+Group:          System/Libraries
+Provides:       %{name} = %{version}
+Obsoletes:      %{name} < %{version}
+
+%description -n libpcre
+The PCRE library is a set of functions that implement regular
+expression pattern matching using the same syntax and semantics
+as Perl 5.
+
+%package -n libpcreposix
+Summary:        A library for Perl-compatible regular expressions
+Group:          System/Libraries
+
+%description -n libpcreposix
+The PCRE library is a set of functions that implement regular
+expression pattern matching using the same syntax and semantics
+as Perl 5.
+
+%package -n libpcrecpp
+Summary:        A library for Perl-compatible regular expressions
+Group:          System/Libraries
+
+%description -n libpcrecpp
+The PCRE library is a set of functions that implement regular
+expression pattern matching using the same syntax and semantics
+as Perl 5.
+
+%package doc
+Summary:        A library for Perl-compatible regular expressions
+Group:          System/Libraries
+BuildArch:      noarch
+
+%description doc
+The PCRE library is a set of functions that implement regular
+expression pattern matching using the same syntax and semantics
+as Perl 5.
+
+%package tools
+Summary:        A library for Perl-compatible regular expressions
+Group:          System/Libraries
+
+%description tools
+The PCRE library is a set of functions that implement regular
+expression pattern matching using the same syntax and semantics
+as Perl 5.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+%{__patch} -p1 < %{SOURCE10}
+
+%build
+export CFLAGS="${CFLAGS} -fPIC"
+
+# Available JIT archs see sljit/sljitConfig.h
+autoreconf -fiv
+%configure \
+%ifarch %ix86 x86_64 %arm ppc ppc64 mips
+           --enable-jit \
+%endif
+           --enable-static \
+           --with-link-size=2 \
+           --with-match-limit=10000000 \
+           --enable-newline-is-lf \
+           --enable-utf8 \
+        --enable-unicode-properties
+make %{?_smp_mflags}
+
+
+# %check
+# export LANG=POSIX
+# make check || exit 0
+
+%install
+%make_install
+mkdir -p %{buildroot}/%{_defaultdocdir}
+mv %{buildroot}/usr/share/doc/pcre %{buildroot}/%{_defaultdocdir}/pcre-doc
+rm -f %{buildroot}%{_libdir}/*.la
+
+
+%post -n libpcre -p /sbin/ldconfig
+
+%postun -n libpcre -p /sbin/ldconfig
+
+%post -n libpcrecpp -p /sbin/ldconfig
+
+%postun -n libpcrecpp -p /sbin/ldconfig
+
+%post -n libpcreposix -p /sbin/ldconfig
+
+%postun -n libpcreposix -p /sbin/ldconfig
+
+%files -n libpcre
+%manifest %{name}.manifest
+%license LICENCE
+%{_libdir}/libpcre.so.*
+
+%files -n libpcrecpp
+%manifest %{name}.manifest
+%license LICENCE
+%{_libdir}/libpcrecpp.so.*
+
+%files -n libpcreposix
+%manifest %{name}.manifest
+%license LICENCE
+%{_libdir}/libpcreposix.so.*
+
+%files tools
+%manifest %{name}.manifest
+%license LICENCE
+%{_bindir}/pcregrep
+%{_bindir}/pcretest
+%{_mandir}/man1/pcregrep.*
+%{_mandir}/man1/pcretest.*
+
+%files doc
+%manifest %{name}.manifest
+%doc doc/html doc/*.txt AUTHORS COPYING ChangeLog LICENCE README NEWS
+
+%files devel
+%manifest %{name}.manifest
+%{_bindir}/pcre-config
+%{_includedir}/*
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/libpcre.pc
+%{_libdir}/pkgconfig/libpcrecpp.pc
+%{_libdir}/pkgconfig/libpcreposix.pc
+%{_mandir}/man1/pcre-config.*
+%{_mandir}/man3/*.gz
+
+%files devel-static
+%manifest %{name}.manifest
+%{_libdir}/*.a
+