From owner-svn-ports-all@freebsd.org Fri Jun 14 07:13:02 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1420915C8BAA; Fri, 14 Jun 2019 07:13:02 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACC468727D; Fri, 14 Jun 2019 07:13:01 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8493CC876; Fri, 14 Jun 2019 07:13:01 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5E7D1xg081262; Fri, 14 Jun 2019 07:13:01 GMT (envelope-from pkubaj@FreeBSD.org) Received: (from pkubaj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5E7D1sH081261; Fri, 14 Jun 2019 07:13:01 GMT (envelope-from pkubaj@FreeBSD.org) Message-Id: <201906140713.x5E7D1sH081261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkubaj set sender to pkubaj@FreeBSD.org using -f From: Piotr Kubaj Date: Fri, 14 Jun 2019 07:13:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r504166 - head/print/libraqm/files X-SVN-Group: ports-head X-SVN-Commit-Author: pkubaj X-SVN-Commit-Paths: head/print/libraqm/files X-SVN-Commit-Revision: 504166 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ACC468727D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2019 07:13:02 -0000 Author: pkubaj Date: Fri Jun 14 07:13:01 2019 New Revision: 504166 URL: https://svnweb.freebsd.org/changeset/ports/504166 Log: print/libraqm: fix build with GCC-based architectures Don't shadow global variable index: cc1: warnings being treated as errors raqm.c: In function '_raqm_u32_to_u8_index': raqm.c:1602: warning: declaration of 'index' shadows a global declaration Fails to build with base GCC. PR: 237949 Approved by: kwm (maintainer), mat (mentor) Differential Revision: https://reviews.freebsd.org/D20613 Added: head/print/libraqm/files/ head/print/libraqm/files/patch-src_raqm.c (contents, props changed) Added: head/print/libraqm/files/patch-src_raqm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/print/libraqm/files/patch-src_raqm.c Fri Jun 14 07:13:01 2019 (r504166) @@ -0,0 +1,177 @@ +--- src/raqm.c.orig 2019-05-17 11:29:46 UTC ++++ src/raqm.c +@@ -1599,14 +1599,14 @@ _raqm_shape (raqm_t *rq) + /* Convert index from UTF-32 to UTF-8 */ + static uint32_t + _raqm_u32_to_u8_index (raqm_t *rq, +- uint32_t index) ++ uint32_t raqm_index) + { + FriBidiStrIndex length; +- char *output = malloc ((sizeof (char) * 4 * index) + 1); ++ char *output = malloc ((sizeof (char) * 4 * raqm_index) + 1); + + length = fribidi_unicode_to_charset (FRIBIDI_CHAR_SET_UTF8, + rq->text, +- index, ++ raqm_index, + output); + + free (output); +@@ -1616,14 +1616,14 @@ _raqm_u32_to_u8_index (raqm_t *rq, + /* Convert index from UTF-8 to UTF-32 */ + static uint32_t + _raqm_u8_to_u32_index (raqm_t *rq, +- uint32_t index) ++ uint32_t raqm_index) + { + FriBidiStrIndex length; +- uint32_t *output = malloc (sizeof (uint32_t) * (index + 1)); ++ uint32_t *output = malloc (sizeof (uint32_t) * (raqm_index + 1)); + + length = fribidi_charset_to_unicode (FRIBIDI_CHAR_SET_UTF8, + rq->text_utf8, +- index, ++ raqm_index, + output); + + free (output); +@@ -1655,7 +1655,7 @@ _raqm_in_hangul_syllable (hb_codepoint_t ch); + */ + bool + raqm_index_to_position (raqm_t *rq, +- size_t *index, ++ size_t *raqm_index, + int *x, + int *y) + { +@@ -1667,19 +1667,19 @@ raqm_index_to_position (raqm_t *rq, + return false; + + if (rq->flags & RAQM_FLAG_UTF8) +- *index = _raqm_u8_to_u32_index (rq, *index); ++ *raqm_index = _raqm_u8_to_u32_index (rq, *raqm_index); + +- if (*index >= rq->text_len) ++ if (*raqm_index >= rq->text_len) + return false; + + RAQM_TEST ("\n"); + +- while (*index < rq->text_len) ++ while (*raqm_index < rq->text_len) + { +- if (_raqm_allowed_grapheme_boundary (rq->text[*index], rq->text[*index + 1])) ++ if (_raqm_allowed_grapheme_boundary (rq->text[*raqm_index], rq->text[*raqm_index + 1])) + break; + +- ++*index; ++ ++*raqm_index; + } + + for (raqm_run_t *run = rq->runs; run != NULL; run = run->next) +@@ -1712,11 +1712,11 @@ raqm_index_to_position (raqm_t *rq, + if (next_cluster == curr_cluster) + next_cluster = run->pos + run->len; + +- if (*index < next_cluster && *index >= curr_cluster) ++ if (*raqm_index < next_cluster && *raqm_index >= curr_cluster) + { + if (run->direction == HB_DIRECTION_RTL) + *x -= position[i].x_advance; +- *index = curr_cluster; ++ *raqm_index = curr_cluster; + goto found; + } + } +@@ -1724,8 +1724,8 @@ raqm_index_to_position (raqm_t *rq, + + found: + if (rq->flags & RAQM_FLAG_UTF8) +- *index = _raqm_u32_to_u8_index (rq, *index); +- RAQM_TEST ("The position is %d at index %zu\n",*x ,*index); ++ *raqm_index = _raqm_u32_to_u8_index (rq, *raqm_index); ++ RAQM_TEST ("The position is %d at index %zu\n",*x ,*raqm_index); + return true; + } + +@@ -1749,7 +1749,7 @@ bool + raqm_position_to_index (raqm_t *rq, + int x, + int y, +- size_t *index) ++ size_t *raqm_index) + { + int delta_x = 0, current_x = 0; + (void)y; +@@ -1760,9 +1760,9 @@ raqm_position_to_index (raqm_t *rq, + if (x < 0) /* Get leftmost index */ + { + if (rq->resolved_dir == RAQM_DIRECTION_RTL) +- *index = rq->text_len; ++ *raqm_index = rq->text_len; + else +- *index = 0; ++ *raqm_index = 0; + return true; + } + +@@ -1789,7 +1789,7 @@ raqm_position_to_index (raqm_t *rq, + before = (x > current_x + (delta_x / 2)); + + if (before) +- *index = info[i].cluster; ++ *raqm_index = info[i].cluster; + else + { + uint32_t curr_cluster = info[i].cluster; +@@ -1805,25 +1805,25 @@ raqm_position_to_index (raqm_t *rq, + if (next_cluster == curr_cluster) + next_cluster = run->pos + run->len; + +- *index = next_cluster; ++ *raqm_index = next_cluster; + } +- if (_raqm_allowed_grapheme_boundary (rq->text[*index],rq->text[*index + 1])) ++ if (_raqm_allowed_grapheme_boundary (rq->text[*raqm_index],rq->text[*raqm_index + 1])) + { +- RAQM_TEST ("The start-index is %zu at position %d \n", *index, x); ++ RAQM_TEST ("The start-index is %zu at position %d \n", *raqm_index, x); + return true; + } + +- while (*index < (unsigned)run->pos + run->len) ++ while (*raqm_index < (unsigned)run->pos + run->len) + { +- if (_raqm_allowed_grapheme_boundary (rq->text[*index], +- rq->text[*index + 1])) ++ if (_raqm_allowed_grapheme_boundary (rq->text[*raqm_index], ++ rq->text[*raqm_index + 1])) + { +- *index += 1; ++ *raqm_index += 1; + break; + } +- *index += 1; ++ *raqm_index += 1; + } +- RAQM_TEST ("The start-index is %zu at position %d \n", *index, x); ++ RAQM_TEST ("The start-index is %zu at position %d \n", *raqm_index, x); + return true; + } + else +@@ -1833,11 +1833,11 @@ raqm_position_to_index (raqm_t *rq, + + /* Get rightmost index*/ + if (rq->resolved_dir == RAQM_DIRECTION_RTL) +- *index = 0; ++ *raqm_index = 0; + else +- *index = rq->text_len; ++ *raqm_index = rq->text_len; + +- RAQM_TEST ("The start-index is %zu at position %d \n", *index, x); ++ RAQM_TEST ("The start-index is %zu at position %d \n", *raqm_index, x); + + return true; + }