FreeBSD Bugzilla – Attachment 204706 Details for
Bug 238225
java/openjdk7: fix build with freetype2 2.10.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix openjdk7 build with freetype2 2.10.0
openjdk7-freetype2-2-10-0-build-fix-rev0.diff (text/plain), 3.37 KB, created by
Steve Wills
on 2019-05-29 22:47:13 UTC
(
hide
)
Description:
patch to fix openjdk7 build with freetype2 2.10.0
Filename:
MIME Type:
Creator:
Steve Wills
Created:
2019-05-29 22:47:13 UTC
Size:
3.37 KB
patch
obsolete
>diff --git java/openjdk7/files/patch-jdk_make_tools_freetypecheck_freetypecheck.c java/openjdk7/files/patch-jdk_make_tools_freetypecheck_freetypecheck.c >new file mode 100644 >index 000000000000..6b9453bdc746 >--- /dev/null >+++ java/openjdk7/files/patch-jdk_make_tools_freetypecheck_freetypecheck.c >@@ -0,0 +1,78 @@ >+--- ./jdk/make/tools/freetypecheck/freetypecheck.c.orig 2013-09-06 14:27:43.000000000 -0400 >++++ ./jdk/make/tools/freetypecheck/freetypecheck.c 2019-05-29 18:16:30.696642000 -0400 >+@@ -74,26 +74,65 @@ >+ #define QUOTEMACRO(x) QUOTEME(x) >+ #define QUOTEME(x) #x >+ >++int compare_versions(FT_Int req_major, FT_Int req_minor, FT_Int req_patch, >++ FT_Int major, FT_Int minor, FT_Int patch) { >++ if (major > req_major) { >++ printf("Major version %d greater than required major version %d\n", >++ major, req_major); >++ return 0; >++ } >++ if (major < req_major) { >++ printf("Major version %d less than required major version %d\n", >++ major, req_major); >++ return -1; >++ } >++ printf("Major version %d equal to required major version %d\n", >++ major, req_major); >++ if (minor > req_minor) { >++ printf("Minor version %d greater than required minor version %d\n", >++ minor, req_minor); >++ return 0; >++ } >++ if (minor < req_minor) { >++ printf("Minor version %d less than required minor version %d\n", >++ minor, req_minor); >++ return -2; >++ } >++ printf("Minor version %d equal to required minor version %d\n", >++ minor, req_minor); >++ if (patch >= req_patch) { >++ printf("Patch version %d greater than or equal to required patch version %d\n", >++ patch, req_patch); >++ return 0; >++ } >++ printf("Patch version %d less than required patch version %d\n", >++ patch, req_patch); >++ return -3; >++} >++ >+ int main(int argc, char** argv) { >+- char v[50]; >+- FT_Int major, minor, patch; >++ FT_Int major, minor, patch, req_major, req_minor, req_patch; >+ FT_Library library; >+- sprintf(v, "%d.%d.%d", FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH); >+ >+- printf("Required version of freetype: %s\n", >+- QUOTEMACRO(REQUIRED_FREETYPE_VERSION)); >++ sscanf(QUOTEMACRO(REQUIRED_FREETYPE_VERSION), >++ "%d.%d.%d", &req_major, &req_minor, &req_patch); >++ printf("Required version of freetype: %d.%d.%d\n", >++ req_major, req_minor, req_patch); >+ >+- printf("Detected freetype headers: %s\n", v); >+- if (strcmp(v, QUOTEMACRO(REQUIRED_FREETYPE_VERSION)) < 0) { >++ printf("Detected freetype headers: %d.%d.%d\n", >++ FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH); >++ if (compare_versions(req_major, req_minor, req_patch, >++ FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH) < 0) { >+ printf("Failed: headers are too old.\n"); >+ } >+ >+ FT_Init_FreeType(&library); >+ FT_Library_Version(library, &major, &minor, &patch); >+- sprintf(v, "%d.%d.%d", major, minor, patch); >+ >+- printf("Detected freetype library: %s\n", v); >+- if (strcmp(v, QUOTEMACRO(REQUIRED_FREETYPE_VERSION)) < 0) { >++ printf("Detected freetype library: %d.%d.%d\n", >++ major, minor, patch); >++ if (compare_versions(req_major, req_minor, req_patch, >++ major, minor, patch) < 0) { >+ printf("Failed: too old library.\n"); >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238225
: 204706