Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/tgif/files/, media-gfx/tgif/
Date: Thu, 01 Dec 2022 03:42:24
Message-Id: 1669866114.f2f9718f1989903363410e628354bc286b2d7cd2.sam@gentoo
1 commit: f2f9718f1989903363410e628354bc286b2d7cd2
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 1 02:16:36 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 1 03:41:54 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2f9718f
7
8 media-gfx/tgif: fix build w/ clang 16
9
10 Technically no need to revbump wrt the patch because all
11 the types were an int in the end, but doing it for the EAPI
12 8 part.
13
14 Closes: https://bugs.gentoo.org/881325
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 media-gfx/tgif/files/tgif-4.2.5-implicit-int.patch | 153 +++++++++++++++++++++
18 .../{tgif-4.2.5-r2.ebuild => tgif-4.2.5-r3.ebuild} | 30 ++--
19 2 files changed, 173 insertions(+), 10 deletions(-)
20
21 diff --git a/media-gfx/tgif/files/tgif-4.2.5-implicit-int.patch b/media-gfx/tgif/files/tgif-4.2.5-implicit-int.patch
22 new file mode 100644
23 index 000000000000..60a0ca2175ad
24 --- /dev/null
25 +++ b/media-gfx/tgif/files/tgif-4.2.5-implicit-int.patch
26 @@ -0,0 +1,153 @@
27 +https://bugs.gentoo.org/881325
28 +https://bugzilla.redhat.com/show_bug.cgi?id=2148487
29 +https://src.fedoraproject.org/rpms/tgif/blob/ba3fa76ca8fde5c83569a703b849c8921923712f/f/tgif-c99.patch
30 +--- a/exec.c
31 ++++ b/exec.c
32 +@@ -518,6 +518,7 @@ int AppendToTmpStr(psz)
33 +
34 + int AppendToTmpStr2(psz1, psz2, tg2)
35 + char *psz1, *psz2;
36 ++ int tg2;
37 + {
38 + int len1=strlen(psz1), len2=strlen(psz2), rc=0;
39 + char *psz=(char*)malloc((len1+len2+1)*sizeof(char));
40 +--- a/file.c
41 ++++ b/file.c
42 +@@ -4725,6 +4725,7 @@ int LoadFile(FullName, ObjFile, GzippedObjFile)
43 + int ObjFile; /* equals TRUE if the file is an OBJ file */
44 + /* equals FALSE if the file is a SYM or PIN file */
45 + /* equals -1 if the file is an temporary OBJ file */
46 ++ int GzippedObjFile;
47 + {
48 + struct ObjRec *obj_ptr=NULL;
49 + char tmp_filename[MAXPATHLENGTH+1], tmp_filefullpath[MAXPATHLENGTH+1];
50 +--- a/import.c
51 ++++ b/import.c
52 +@@ -1373,7 +1373,7 @@ int ConvertGifToPpm6(pszGifPath, pszPpm6Path, ppm6_path_sz)
53 + static
54 + int FinishImport(remote_file, remote_tmp_fname, local_fname, which, pn_image_w,
55 + pn_image_h)
56 +- int remote_file, *pn_image_w, *pn_image_h;
57 ++ int remote_file, which, *pn_image_w, *pn_image_h;
58 + char *remote_tmp_fname, *local_fname;
59 + {
60 + char xpm_fname[MAXPATHLENGTH+1], *rest=NULL, *psz_format=NULL;
61 +--- a/polygon.c
62 ++++ b/polygon.c
63 +@@ -1007,7 +1007,7 @@ void ContinueForStructSplinePolygonControlPoints(OrigX, OrigY, LastX, LastY,
64 + static
65 + void EraseStructSplineLinesForContAndUpdateSvs(OrigX, OrigY, grid_x, grid_y,
66 + pev, num_pts, psv, sn, psv2, sn2, pipt_prev, pipt_first)
67 +- int OrigX, OrigY, grid_x, grid_y, sn, sn2;
68 ++ int OrigX, OrigY, grid_x, grid_y, num_pts, sn, sn2;
69 + XEvent *pev;
70 + XPoint **psv, **psv2;
71 + IntPointTriplet *pipt_prev, *pipt_first;
72 +--- a/rect.c
73 ++++ b/rect.c
74 +@@ -37,7 +37,7 @@
75 +
76 + void DumpRectPath(FP, LtX, LtY, RbX, RbY, Indent, LastLF)
77 + FILE *FP;
78 +- int LtX, LtY, RbX, RbY, Indent;
79 ++ int LtX, LtY, RbX, RbY, Indent, LastLF;
80 + {
81 + register int i;
82 +
83 +--- a/ruler.c
84 ++++ b/ruler.c
85 +@@ -510,6 +510,7 @@ void DrawHRuleTick(XOff)
86 +
87 + static
88 + void DrawVRuleTick(YOff)
89 ++ int YOff;
90 + {
91 + XDrawLine(mainDisplay, vRuleWindow, revDefaultGC, 0, YOff, rulerLen, YOff);
92 + }
93 +--- a/scroll.c
94 ++++ b/scroll.c
95 +@@ -153,7 +153,8 @@ int TgPressButtonLoop(dpy, win, pbbox, psbci)
96 +
97 + int TgGetScrollHit(x, y, orientation, scroll_area_w, scroll_area_h,
98 + start_frac, length, total, pn_btn_offset)
99 +- int x, y, scroll_area_w, scroll_area_h, length, total, *pn_btn_offset;
100 ++ int x, y, orientation, scroll_area_w, scroll_area_h, length, total,
101 ++ *pn_btn_offset;
102 + double start_frac;
103 + {
104 + int block_start=0, block_size=0, min_block_size=1+(windowPadding<<1);
105 +@@ -211,7 +212,7 @@ void TgDrawScrollBar(dpy, win, orientation, x_off, y_off, scroll_area_w,
106 + scroll_area_h, start_frac, length, total)
107 + Display *dpy;
108 + Window win;
109 +- int x_off, y_off, scroll_area_w, scroll_area_h, length, total;
110 ++ int orientation, x_off, y_off, scroll_area_w, scroll_area_h, length, total;
111 + double start_frac;
112 + {
113 + int block_start=0, block_size=0, min_block_size=1+(windowPadding<<1);
114 +--- a/spline.c
115 ++++ b/spline.c
116 +@@ -795,7 +795,7 @@ typedef struct MultiSplineRec {
117 + } *MultiSplineRecPtr;
118 +
119 + XPoint *MakeMultiSplinePolyVertex(Curved, N, Smooth, XOff, YOff, NumVs, Vs)
120 +- int *N, XOff, YOff, NumVs;
121 ++ int Curved, *N, XOff, YOff, NumVs;
122 + char *Smooth;
123 + IntPoint *Vs;
124 + {
125 +--- a/stretch.c
126 ++++ b/stretch.c
127 +@@ -4247,7 +4247,7 @@ void SizeAnObj(ObjPtr, TopOwner, AbsW, AbsH)
128 +
129 + static
130 + void DoSizeAllSelToGivenWidthHeight(abs_w, abs_h, do_width, do_height)
131 +- int abs_h, do_width, do_height;
132 ++ int abs_w, abs_h, do_width, do_height;
133 + {
134 + struct SelRec *saved_top_sel=topSel, *saved_bot_sel=botSel, *sel_ptr=NULL;
135 + int saved_h_align=horiAlign, saved_v_align=vertAlign, num_to_resize=0;
136 +--- a/tdgtbtn.c
137 ++++ b/tdgtbtn.c
138 +@@ -491,7 +491,7 @@ TdgtBtn *CreateTdgtBtn(parent_win, parent_tidgetinfo, ctl_id, x, y, w, h, h_pad,
139 + v_pad, btn_type, btn_style, state, font_style, str, pmosi)
140 + Window parent_win;
141 + TidgetInfo *parent_tidgetinfo;
142 +- int ctl_id, x, y, w, h, h_pad, v_pad, state, font_style;
143 ++ int ctl_id, x, y, w, h, h_pad, v_pad, btn_type, btn_style, state, font_style;
144 + char *str;
145 + MouseOverStatusInfo *pmosi;
146 + {
147 +--- a/tdgtlist.c
148 ++++ b/tdgtlist.c
149 +@@ -1039,7 +1039,8 @@ TdgtList *CreateTdgtList(parent_win, parent_tidgetinfo, ctl_id, x, y, w, h_pad,
150 + v_pad, num_visible_lines, can_select, multicolor, auto_scroll_on_insert)
151 + Window parent_win;
152 + TidgetInfo *parent_tidgetinfo;
153 +- int ctl_id, x, y, w, h_pad, v_pad, num_visible_lines, auto_scroll_on_insert;
154 ++ int ctl_id, x, y, w, h_pad, v_pad, num_visible_lines, can_select,
155 ++ multicolor, auto_scroll_on_insert;
156 + {
157 + int bg_pixel=(threeDLook ? myLtGryPixel : myBgPixel), h=0, content_h=0;
158 + TdgtList *pTdgtList=NULL;
159 +--- a/text.c
160 ++++ b/text.c
161 +@@ -2059,7 +2059,7 @@ void HandleClickOnText(drag, from_cursor_keys, x_off, y_off,
162 + pressed_in_same_text, obj_ptr, double_clicked, saved_text_highlight,
163 + skip_post_processing, click_time)
164 + int drag, from_cursor_keys, x_off, y_off, pressed_in_same_text;
165 +- int double_clicked, saved_text_highlight;
166 ++ int double_clicked, saved_text_highlight, skip_post_processing;
167 + struct ObjRec *obj_ptr;
168 + Time click_time;
169 + {
170 +@@ -4760,7 +4760,7 @@ int ReadTextLines(FP, ObjPtr, text_ptr, color_str, num_lines, has_ps_bitmap,
171 + char *color_str;
172 + int num_lines, has_ps_bitmap, cur_sb_font, cur_db_font;
173 + int double_byte, db_mod_bytes, db_vertical, direction;
174 +- int x, baseline_y, *pn_max_len, *pn_max_h;
175 ++ int x, baseline_y, text_w, *pn_max_len, *pn_max_h;
176 + /*
177 + * (Note: text_w is only used for fileVersion <= 36)
178 + */
179 +
180
181 diff --git a/media-gfx/tgif/tgif-4.2.5-r2.ebuild b/media-gfx/tgif/tgif-4.2.5-r3.ebuild
182 similarity index 76%
183 rename from media-gfx/tgif/tgif-4.2.5-r2.ebuild
184 rename to media-gfx/tgif/tgif-4.2.5-r3.ebuild
185 index 8bed92678866..64fe95e20c46 100644
186 --- a/media-gfx/tgif/tgif-4.2.5-r2.ebuild
187 +++ b/media-gfx/tgif/tgif-4.2.5-r3.ebuild
188 @@ -1,7 +1,7 @@
189 -# Copyright 1999-2021 Gentoo Authors
190 +# Copyright 1999-2022 Gentoo Authors
191 # Distributed under the terms of the GNU General Public License v2
192
193 -EAPI=6
194 +EAPI=8
195
196 inherit autotools flag-o-matic
197
198 @@ -10,36 +10,46 @@ MY_P="${PN}-QPL-${PV}"
199 DESCRIPTION="Xlib base 2-D drawing facility under X11"
200 HOMEPAGE="http://bourbon.usc.edu/tgif/index.html"
201 SRC_URI="ftp://bourbon.usc.edu/pub/${PN}/${MY_P}.tar.gz"
202 +S="${WORKDIR}/${MY_P}"
203
204 LICENSE="QPL-1.0"
205 SLOT="0"
206 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
207 -IUSE=""
208
209 -DEPEND="sys-libs/zlib
210 +DEPEND="
211 + sys-libs/zlib
212 x11-libs/libICE
213 x11-libs/libSM
214 x11-libs/libX11
215 x11-libs/libXext
216 x11-libs/libXmu
217 - x11-libs/libXt"
218 -RDEPEND="${DEPEND}
219 - media-libs/netpbm"
220 + x11-libs/libXt
221 +"
222 +RDEPEND="
223 + ${DEPEND}
224 + media-libs/netpbm
225 +"
226
227 PATCHES=(
228 "${FILESDIR}/${P}-wformat-security.patch"
229 + "${FILESDIR}/${P}-implicit-int.patch"
230 )
231
232 -S="${WORKDIR}/${MY_P}"
233 -
234 src_prepare() {
235 + default
236 +
237 sed -i \
238 -e 's/^CFLAGS=/CFLAGS+=/' \
239 -e 's:^TGIFDIR.*:TGIFDIR = $(datadir)/tgif:' \
240 Makefile.am || die 'sed on Makefile.am failed'
241
242 + eautoreconf
243 +}
244 +
245 +src_configure() {
246 + # bug #881325
247 + append-cflags -std=gnu89
248 append-cppflags -D_DONT_USE_MKTEMP -DHAS_STREAMS_SUPPORT
249
250 default
251 - eautoreconf
252 }