summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/TLpatches
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-04-10 03:40:48 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-04-10 03:40:48 +0000
commit503c0227622254c0ae3209a1fa72bcb68bb450bc (patch)
tree48df20533f300f819504c15af33cdc03fc386a93 /Build/source/libs/gd/TLpatches
parenta9d86b73ecf95b83666e16c4d90e348c4958a63b (diff)
libgd 2.3.0
git-svn-id: svn://tug.org/texlive/trunk@54636 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/TLpatches')
-rw-r--r--Build/source/libs/gd/TLpatches/ChangeLog7
-rw-r--r--Build/source/libs/gd/TLpatches/TL-Changes2
-rw-r--r--Build/source/libs/gd/TLpatches/patch-01-win3262
-rw-r--r--Build/source/libs/gd/TLpatches/patch-02-no-stdcall6
4 files changed, 66 insertions, 11 deletions
diff --git a/Build/source/libs/gd/TLpatches/ChangeLog b/Build/source/libs/gd/TLpatches/ChangeLog
index 31121f5ca1f..b4e56063fcc 100644
--- a/Build/source/libs/gd/TLpatches/ChangeLog
+++ b/Build/source/libs/gd/TLpatches/ChangeLog
@@ -1,3 +1,10 @@
+2020-04-10 Akira Kakuto <kakuto@w32tex.org>
+
+ Import libgd-2.3.0 source tree from:
+ https://github.com/libgd/libgd/releases
+ * patch-01-win32: Adapted.
+ * patch-02-no-stdcall: Adapted.
+
2017-08-30 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Import libgd-2.2.5 source tree from:
diff --git a/Build/source/libs/gd/TLpatches/TL-Changes b/Build/source/libs/gd/TLpatches/TL-Changes
index 921ec63987b..a2332a72bba 100644
--- a/Build/source/libs/gd/TLpatches/TL-Changes
+++ b/Build/source/libs/gd/TLpatches/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the libgd-2.2.5/ tree as obtained from:
+Changes applied to the libgd-2.3.0/ tree as obtained from:
https://github.com/libgd/libgd/releases
Removed:
diff --git a/Build/source/libs/gd/TLpatches/patch-01-win32 b/Build/source/libs/gd/TLpatches/patch-01-win32
index 1f20e4d53ae..1a9a0788576 100644
--- a/Build/source/libs/gd/TLpatches/patch-01-win32
+++ b/Build/source/libs/gd/TLpatches/patch-01-win32
@@ -1,17 +1,65 @@
-diff -ur libgd-2.2.5.orig/src/gdft.c libgd-2.2.5/src/gdft.c
---- libgd-2.2.5.orig/src/gdft.c Wed Aug 30 20:05:55 2017
-+++ libgd-2.2.5/src/gdft.c Thu Aug 31 07:35:10 2017
-@@ -1683,6 +1683,16 @@
+diff -ur libgd-2.3.0/src/gd_interpolation.c libgd-src/src/gd_interpolation.c
+--- libgd-2.3.0/src/gd_interpolation.c Sun Mar 22 22:42:38 2020
++++ libgd-src/src/gd_interpolation.c Mon Mar 30 07:00:26 2020
+@@ -1988,19 +1988,19 @@
+ static int getPixelRgbInterpolated(gdImagePtr im, const int tcolor)
+ {
+ unsigned char r, g, b, a;
+- int ct;
++ int ct, i;
+
+ b = (unsigned char)tcolor;
+- g = (unsigned char)tcolor >> 8;
+- r = (unsigned char)tcolor >> 16;
+- a = (unsigned char)tcolor >> 24;
++ g = (unsigned char)(tcolor >> 8);
++ r = (unsigned char)(tcolor >> 16);
++ a = (unsigned char)(tcolor >> 24);
+
+ b = CLAMP(b, 0, 255);
+ g = CLAMP(g, 0, 255);
+ r = CLAMP(r, 0, 255);
+ a = CLAMP(a, 0, 127);
+
+- for (int i = 0; i < im->colorsTotal; i++) {
++ for (i = 0; i < im->colorsTotal; i++) {
+ if (im->red[i] == r && im->green[i] == g && im->blue[i] == b && im->alpha[i] == a) {
+ return i;
+ }
+diff -ur libgd-2.3.0/src/gdft.c libgd-src/src/gdft.c
+--- libgd-2.3.0/src/gdft.c Sun Mar 22 22:42:38 2020
++++ libgd-src/src/gdft.c Mon Mar 30 07:01:24 2020
+@@ -1519,6 +1519,8 @@
+ }
+
+ if (render) {
++ FT_Pos pen_x;
++ FT_Pos pen_y;
+ FT_Activate_Size (platform_specific);
+
+ /* load glyph again into the slot (erase previous one) - this time with scaling */
+@@ -1552,8 +1554,8 @@
+ bm = (FT_BitmapGlyph) image;
+ /* position rounded down to nearest pixel at current dpi
+ (the estimate was rounded up to next 1/METRIC_RES, so this should fit) */
+- FT_Pos pen_x = penf.x + info[i].x_offset;
+- FT_Pos pen_y = penf.y - info[i].y_offset;
++ pen_x = penf.x + info[i].x_offset;
++ pen_y = penf.y - info[i].y_offset;
+ gdft_draw_bitmap (tc_cache, im, fg, bm->bitmap,
+ (int)(x + (pen_x * cos_a + pen_y * sin_a)*hdpi/(METRIC_RES*64) + bm->left),
+ (int)(y - (pen_x * sin_a - pen_y * cos_a)*vdpi/(METRIC_RES*64) - bm->top));
+@@ -1787,6 +1789,16 @@
*/
*fontpath = NULL;
fontsearchpath = getenv ("GDFONTPATH");
+#ifdef _WIN32
+ if (!fontsearchpath) {
-+ char *ffptr = getenv ("SYSTEMROOT");
++ char *ffptr = getenv ("WINDIR");
+ if (ffptr) {
-+ fontsearchpath = malloc (strlen(ffptr) + strlen("\\fonts") + 1);
++ fontsearchpath = malloc (strlen(ffptr) + strlen("\\Fonts") + 1);
+ strcpy(fontsearchpath, ffptr);
-+ strcat(fontsearchpath, "\\fonts");
++ strcat(fontsearchpath, "\\Fonts");
+ }
+ }
+#endif
diff --git a/Build/source/libs/gd/TLpatches/patch-02-no-stdcall b/Build/source/libs/gd/TLpatches/patch-02-no-stdcall
index e3d283599bb..329990d1a60 100644
--- a/Build/source/libs/gd/TLpatches/patch-02-no-stdcall
+++ b/Build/source/libs/gd/TLpatches/patch-02-no-stdcall
@@ -1,6 +1,6 @@
-diff -ur libgd-2.2.5.orig/src/gd.h libgd-2.2.5/src/gd.h
---- libgd-2.2.5.orig/src/gd.h Wed Aug 30 20:05:54 2017
-+++ libgd-2.2.5/src/gd.h Thu Aug 31 07:36:57 2017
+diff -ur libgd-2.3.0/src/gd.h libgd-src/src/gd.h
+--- libgd-2.3.0/src/gd.h Sun Mar 22 22:42:41 2020
++++ libgd-src/src/gd.h Mon Mar 30 07:02:16 2020
@@ -63,7 +63,7 @@
# define BGD_EXPORT_DATA_PROT __declspec(dllimport)
# endif