rathann pushed to tre (master). "update to latest snapshot from github (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Jun 8 21:10:28 UTC 2015


From 4c8976479d349c73f767249114208efe8e9ddaf5 Mon Sep 17 00:00:00 2001
From: Dominik 'Rathann' Mierzejewski <dominik at greysector.net>
Date: Mon, 8 Jun 2015 23:10:10 +0200
Subject: update to latest snapshot from github

- drop patches merged upstream
- fix broken LDFLAGS in tre.pc (#1224203)

diff --git a/.gitignore b/.gitignore
index e2f92d9..81cb040 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 tre-0.8.0.tar.bz2
+/tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca.tar.gz
diff --git a/sources b/sources
index e65ee39..7e979b5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b4d3232593dadf6746f4727bdda20b41  tre-0.8.0.tar.bz2
+93f5b1e6e0e15897a9745f4b7219065d  tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca.tar.gz
diff --git a/tre-0.8.0-Rfixes-8e84229.patch b/tre-0.8.0-Rfixes-8e84229.patch
deleted file mode 100644
index 4ce62e6..0000000
--- a/tre-0.8.0-Rfixes-8e84229.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-diff -up tre-0.8.0/lib/tre-compile.c.Rfixes tre-0.8.0/lib/tre-compile.c
---- tre-0.8.0/lib/tre-compile.c.Rfixes	2014-02-04 17:32:59.166084511 -0500
-+++ tre-0.8.0/lib/tre-compile.c	2014-02-04 17:33:17.165067538 -0500
-@@ -1890,6 +1890,8 @@ tre_compile(regex_t *preg, const tre_cha
-   parse_ctx.len = n;
-   parse_ctx.cflags = cflags;
-   parse_ctx.max_backref = -1;
-+/* workaround for PR#14408: use 8-bit optimizations in 8-bit mode */
-+  parse_ctx.cur_max = (cflags & REG_USEBYTES) ? 1 : TRE_MB_CUR_MAX;
-   DPRINT(("tre_compile: parsing '%.*" STRF "'\n", (int)n, regex));
-   errcode = tre_parse(&parse_ctx);
-   if (errcode != REG_OK)
-diff -up tre-0.8.0/lib/tre.h.Rfixes tre-0.8.0/lib/tre.h
---- tre-0.8.0/lib/tre.h.Rfixes	2014-02-04 17:34:20.173008141 -0500
-+++ tre-0.8.0/lib/tre.h	2014-02-04 17:39:39.044707983 -0500
-@@ -106,6 +106,8 @@ typedef enum {
- #define REG_RIGHT_ASSOC (REG_LITERAL << 1)
- #define REG_UNGREEDY    (REG_RIGHT_ASSOC << 1)
- 
-+#define REG_USEBYTES    (REG_UNGREEDY << 1)
-+
- /* POSIX tre_regexec() flags. */
- #define REG_NOTBOL 1
- #define REG_NOTEOL (REG_NOTBOL << 1)
-diff -up tre-0.8.0/lib/tre-parse.c.Rfixes tre-0.8.0/lib/tre-parse.c
---- tre-0.8.0/lib/tre-parse.c.Rfixes	2014-02-04 17:33:24.393060723 -0500
-+++ tre-0.8.0/lib/tre-parse.c	2014-02-04 17:33:44.011042227 -0500
-@@ -332,7 +332,7 @@ tre_parse_bracket_items(tre_parse_ctx_t
- 		  if (!class)
- 		    status = REG_ECTYPE;
- 		  /* Optimize character classes for 8 bit character sets. */
--		  if (status == REG_OK && TRE_MB_CUR_MAX == 1)
-+		  if (status == REG_OK && ctx->cur_max == 1)
- 		    {
- 		      status = tre_expand_ctype(ctx->mem, class, items,
- 						&i, &max_i, ctx->cflags);
-diff -up tre-0.8.0/lib/tre-parse.h.Rfixes tre-0.8.0/lib/tre-parse.h
---- tre-0.8.0/lib/tre-parse.h.Rfixes	2014-02-04 17:33:51.032035608 -0500
-+++ tre-0.8.0/lib/tre-parse.h	2014-02-04 17:34:14.212013759 -0500
-@@ -38,6 +38,8 @@ typedef struct {
-   int nofirstsub;
-   /* The currently set approximate matching parameters. */
-   int params[TRE_PARAM_LAST];
-+  /* the CUR_MAX in use */
-+  int cur_max;
- } tre_parse_ctx_t;
- 
- /* Parses a wide character regexp pattern into a syntax tree.  This parser
diff --git a/tre-0.8.0-Rfixes-d0a2382.patch b/tre-0.8.0-Rfixes-d0a2382.patch
deleted file mode 100644
index 4519402..0000000
--- a/tre-0.8.0-Rfixes-d0a2382.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-diff -up tre-0.8.0/lib/regcomp.c.Rfixes2 tre-0.8.0/lib/regcomp.c
---- tre-0.8.0/lib/regcomp.c.Rfixes2	2014-02-04 17:35:13.915957501 -0500
-+++ tre-0.8.0/lib/regcomp.c	2014-02-04 17:36:32.919883096 -0500
-@@ -99,12 +99,58 @@ tre_regncomp(regex_t *preg, const char *
-   return ret;
- }
- 
-+/* this version takes bytes literally, to be used with raw vectors */
-+int
-+tre_regncompb(regex_t *preg, const char *regex, size_t n, int cflags)
-+{
-+  int ret;
-+#if TRE_WCHAR /* wide chars = we need to convert it all to the wide format */
-+  tre_char_t *wregex;
-+  size_t i;
-+
-+  wregex = xmalloc(sizeof(tre_char_t) * n);
-+  if (wregex == NULL)
-+    return REG_ESPACE;
-+
-+  for (i = 0; i < n; i++)
-+    wregex[i] = (tre_char_t) ((unsigned char) regex[i]);
-+
-+  ret = tre_compile(preg, wregex, n, cflags | REG_USEBYTES);
-+  xfree(wregex);
-+#else /* !TRE_WCHAR */
-+  ret = tre_compile(preg, (const tre_char_t *)regex, n, cflags | REG_USEBYTES);
-+#endif /* !TRE_WCHAR */
-+
-+  return ret;
-+}
-+
- int
- tre_regcomp(regex_t *preg, const char *regex, int cflags)
- {
-   return tre_regncomp(preg, regex, regex ? strlen(regex) : 0, cflags);
- }
- 
-+int
-+tre_regcompb(regex_t *preg, const char *regex, int cflags)
-+{
-+  int ret;
-+  tre_char_t *wregex;
-+  size_t wlen, n = strlen(regex);
-+  unsigned int i;
-+  const unsigned char *str = (const unsigned char *)regex;
-+  tre_char_t *wstr;
-+
-+  wregex = xmalloc(sizeof(tre_char_t) * (n + 1));
-+  if (wregex == NULL) return REG_ESPACE;
-+  wstr = wregex;
-+
-+  for (i = 0; i < n; i++) *(wstr++) = *(str++);
-+  wlen = n;
-+  wregex[wlen] = L'\0';
-+  ret = tre_compile(preg, wregex, wlen, cflags | REG_USEBYTES);
-+  xfree(wregex);
-+  return ret;
-+}
- 
- #ifdef TRE_WCHAR
- int
-diff -up tre-0.8.0/lib/regexec.c.Rfixes2 tre-0.8.0/lib/regexec.c
---- tre-0.8.0/lib/regexec.c.Rfixes2	2014-02-04 17:36:47.962868935 -0500
-+++ tre-0.8.0/lib/regexec.c	2014-02-04 17:38:02.141799122 -0500
-@@ -216,6 +216,23 @@ tre_regexec(const regex_t *preg, const c
-   return tre_regnexec(preg, str, (unsigned)-1, nmatch, pmatch, eflags);
- }
- 
-+int
-+tre_regexecb(const regex_t *preg, const char *str,
-+        size_t nmatch, regmatch_t pmatch[], int eflags)
-+{
-+  tre_tnfa_t *tnfa = (void *)preg->TRE_REGEX_T_FIELD;
-+
-+  return tre_match(tnfa, str, (unsigned)-1, STR_BYTE, nmatch, pmatch, eflags);
-+}
-+
-+int
-+tre_regnexecb(const regex_t *preg, const char *str, size_t len,
-+        size_t nmatch, regmatch_t pmatch[], int eflags)
-+{
-+  tre_tnfa_t *tnfa = (void *)preg->TRE_REGEX_T_FIELD;
-+
-+  return tre_match(tnfa, str, len, STR_BYTE, nmatch, pmatch, eflags);
-+}
- 
- #ifdef TRE_WCHAR
- 
-@@ -309,6 +326,16 @@ tre_regaexec(const regex_t *preg, const
-   return tre_reganexec(preg, str, (unsigned)-1, match, params, eflags);
- }
- 
-+int
-+tre_regaexecb(const regex_t *preg, const char *str,
-+          regamatch_t *match, regaparams_t params, int eflags)
-+{
-+  tre_tnfa_t *tnfa = (void *)preg->TRE_REGEX_T_FIELD;
-+
-+  return tre_match_approx(tnfa, str, (unsigned)-1, STR_BYTE,
-+                          match, params, eflags);
-+}
-+
- #ifdef TRE_WCHAR
- 
- int
-diff -up tre-0.8.0/lib/tre.h.Rfixes2 tre-0.8.0/lib/tre.h
---- tre-0.8.0/lib/tre.h.Rfixes2	2014-02-04 17:38:11.315790492 -0500
-+++ tre-0.8.0/lib/tre.h	2014-02-04 17:39:39.044707983 -0500
-@@ -137,6 +137,13 @@ extern int
- tre_regexec(const regex_t *preg, const char *string, size_t nmatch,
- 	regmatch_t pmatch[], int eflags);
- 
-+extern int
-+tre_regcompb(regex_t *preg, const char *regex, int cflags);
-+
-+extern int
-+tre_regexecb(const regex_t *preg, const char *string, size_t nmatch,
-+	regmatch_t pmatch[], int eflags);
-+
- extern size_t
- tre_regerror(int errcode, const regex_t *preg, char *errbuf,
- 	 size_t errbuf_size);
-@@ -167,6 +174,14 @@ extern int
- tre_regnexec(const regex_t *preg, const char *string, size_t len,
- 	 size_t nmatch, regmatch_t pmatch[], int eflags);
- 
-+/* regn*b versions take byte literally as 8-bit values */
-+extern int
-+tre_regncompb(regex_t *preg, const char *regex, size_t n, int cflags);
-+
-+extern int
-+tre_regnexecb(const regex_t *preg, const char *str, size_t len,
-+	  size_t nmatch, regmatch_t pmatch[], int eflags);
-+
- #ifdef TRE_WCHAR
- extern int
- tre_regwncomp(regex_t *preg, const wchar_t *regex, size_t len, int cflags);
-@@ -210,6 +225,11 @@ tre_regaexec(const regex_t *preg, const
- extern int
- tre_reganexec(const regex_t *preg, const char *string, size_t len,
- 	  regamatch_t *match, regaparams_t params, int eflags);
-+
-+extern int
-+tre_regaexecb(const regex_t *preg, const char *string,
-+	  regamatch_t *match, regaparams_t params, int eflags);
-+
- #ifdef TRE_WCHAR
- /* Wide character approximate matching. */
- extern int
diff --git a/tre-ldflags.patch b/tre-ldflags.patch
new file mode 100644
index 0000000..827f6fa
--- /dev/null
+++ b/tre-ldflags.patch
@@ -0,0 +1,10 @@
+diff -up tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/tre.pc.in.ldflags tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/tre.pc.in
+--- tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/tre.pc.in.ldflags	2014-02-28 19:55:36.000000000 +0100
++++ tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/tre.pc.in	2015-06-08 22:55:39.316078801 +0200
+@@ -6,5 +6,5 @@ includedir=@includedir@
+ Name: TRE
+ Description: TRE regexp matching library
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -ltre @LDFLAGS@ @LIBINTL@ @LIBS@
++Libs: -L${libdir} -ltre @LIBINTL@ @LIBS@
+ Cflags: -I${includedir} @CPPFLAGS@
diff --git a/tre.spec b/tre.spec
index e9cd014..f78182a 100644
--- a/tre.spec
+++ b/tre.spec
@@ -1,15 +1,16 @@
+%global commit c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
 Name: tre
 Version: 0.8.0
-Release: 12%{?dist}
+Release: 13.20140228git%{shortcommit}%{?dist}
 License: BSD
-Source0: http://laurikari.net/tre/%{name}-%{version}.tar.bz2
+Source0: https://github.com/laurikari/tre/archive/%{commit}/tre-%{commit}.tar.gz
 Patch0: %{name}-chicken.patch
 # make internal tests of agrep work with just-built shared library
 Patch1: %{name}-tests.patch
-# add additional functions needed for R to use tre sys lib
-# https://github.com/laurikari/tre/pull/14
-Patch2: tre-0.8.0-Rfixes-8e84229.patch
-Patch3: tre-0.8.0-Rfixes-d0a2382.patch
+# don't force build-time LDFLAGS into tre.pc
+Patch2: %{name}-ldflags.patch
 Summary: POSIX compatible regexp library with approximate matching
 URL: http://laurikari.net/tre/
 # rebuild autotools for bug #926655
@@ -53,14 +54,14 @@ Unlike other agrep implementations, TRE agrep allows full POSIX
 regexps of any length, any number of errors, and non-uniform costs.
 
 %prep
-%setup -q
+%setup -q -n tre-%{commit}
 # hack to fix python bindings build
 ln -s lib tre
 %patch0 -p1 -b .chicken
 %patch1 -p1 -b .tests
-%patch2 -p1 -b .Rfixes
-%patch3 -p1 -b .Rfixes2
+%patch2 -p1 -b .ldflags
 # rebuild autotools for bug #926655
+touch ChangeLog
 autoreconf -vif
 
 %build
@@ -104,6 +105,11 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.la
 %{_mandir}/man1/agrep.1*
 
 %changelog
+* Mon Jun 08 2015 Dominik Mierzejewski <rpm at greysector.net> 0.8.0-13.20140228gitc2f5d13
+- update to latest snapshot from github
+- drop patches merged upstream
+- fix broken LDFLAGS in tre.pc (#1224203)
+
 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.0-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/tre.git/commit/?h=master&id=4c8976479d349c73f767249114208efe8e9ddaf5


More information about the scm-commits mailing list