dev-db/sqlite: Fix csv extension on ppc/ppc64 (bug #630698).
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Thu, 28 Sep 2017 15:26:19 +0000 (17:26 +0200)
committerMike Gilbert <floppym@gentoo.org>
Thu, 28 Sep 2017 17:10:57 +0000 (13:10 -0400)
dev-db/sqlite/files/sqlite-3.20.1-full_tarball-csv-unsigned_char.patch [new file with mode: 0644]
dev-db/sqlite/sqlite-3.20.1-r1.ebuild [moved from dev-db/sqlite/sqlite-3.20.1.ebuild with 99% similarity]

diff --git a/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-csv-unsigned_char.patch b/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-csv-unsigned_char.patch
new file mode 100644 (file)
index 0000000..86236c4
--- /dev/null
@@ -0,0 +1,33 @@
+https://sqlite.org/src/info/42f0777555675875
+
+--- ext/misc/csv.c
++++ ext/misc/csv.c
+@@ -78,7 +78,7 @@
+   int nAlloc;            /* Space allocated for z[] */
+   int nLine;             /* Current line number */
+   int bNotFirst;         /* True if prior text has been seen */
+-  char cTerm;            /* Character that terminated the most recent field */
++  int cTerm;             /* Character that terminated the most recent field */
+   size_t iIn;            /* Next unread character in the input buffer */
+   size_t nIn;            /* Number of characters in the input buffer */
+   char *zIn;             /* The input buffer */
+@@ -166,7 +166,7 @@
+     if( p->in!=0 ) return csv_getc_refill(p);
+     return EOF;
+   }
+-  return p->zIn[p->iIn++];
++  return ((unsigned char*)p->zIn)[p->iIn++];
+ }
+ 
+ /* Increase the size of p->z and append character c to the end. 
+--- test/releasetest.tcl
++++ test/releasetest.tcl
+@@ -114,7 +114,7 @@
+   }
+   "Debug-One" {
+     --disable-shared
+-    -O2
++    -O2 -funsigned-char
+     -DSQLITE_DEBUG=1
+     -DSQLITE_MEMDEBUG=1
+     -DSQLITE_MUTEX_NOOP=1
similarity index 99%
rename from dev-db/sqlite/sqlite-3.20.1.ebuild
rename to dev-db/sqlite/sqlite-3.20.1-r1.ebuild
index ee52cadc0f774d810d452066e6ea305cc0b7c7af..7b6ce7814c0f493a8116b7b58dc34675644414ca 100644 (file)
@@ -50,6 +50,7 @@ pkg_setup() {
 src_prepare() {
        if full_tarball; then
                eapply -p0 "${FILESDIR}/${PN}-3.20.0-full_tarball-build.patch"
+               eapply -p0 "${FILESDIR}/${PN}-3.20.1-full_tarball-csv-unsigned_char.patch"
 
                eapply_user