|
| 1 | +Only in libgd-2.2.3-new: .vscode |
| 2 | +diff -ur libgd-2.2.3/CMakeLists.txt libgd-2.2.3-new/CMakeLists.txt |
| 3 | +--- libgd-2.2.3/CMakeLists.txt 2016-07-21 10:32:27.000000000 +0200 |
| 4 | ++++ libgd-2.2.3-new/CMakeLists.txt 2016-09-24 10:02:06.156526100 +0200 |
| 5 | +@@ -203,6 +207,7 @@ |
| 6 | + ADD_DEFINITIONS("/D_CRT_SECURE_NO_DEPRECATE") |
| 7 | + endif(NOT MINGW AND MSVC_VERSION GREATER 1399) |
| 8 | + if (MINGW OR MSYS) |
| 9 | ++ SET(GD_LIB gd) |
| 10 | + ADD_DEFINITIONS("-mms-bitfields") # -m32 |
| 11 | + endif (MINGW OR MSYS) |
| 12 | + else (WIN32) |
| 13 | +@@ -278,6 +282,6 @@ |
| 14 | + "^${PROJECT_SOURCE_DIR}/old/" |
| 15 | + "^${PROJECT_SOURCE_DIR}/bld/" |
| 16 | + ) |
| 17 | +-install(FILES ${top_level_DOCFILES} DESTINATION ${DOC_DIR}) |
| 18 | ++# install(FILES ${top_level_DOCFILES} DESTINATION ${DOC_DIR}) |
| 19 | + INCLUDE(CPack) |
| 20 | + |
| 21 | +diff -ur libgd-2.2.3/config/gdlib.pc.in libgd-2.2.3-new/config/gdlib.pc.in |
| 22 | +--- libgd-2.2.3/config/gdlib.pc.in 2016-06-03 10:34:39.000000000 +0200 |
| 23 | ++++ libgd-2.2.3-new/config/gdlib.pc.in 2016-09-25 11:09:38.702045800 +0200 |
| 24 | +@@ -1,13 +1,13 @@ |
| 25 | +-prefix=@prefix@ |
| 26 | +-exec_prefix=@exec_prefix@ |
| 27 | +-libdir=@libdir@ |
| 28 | +-includedir=@includedir@ |
| 29 | ++prefix=@CMAKE_INSTALL_PREFIX@ |
| 30 | ++exec_prefix=${prefix} |
| 31 | ++libdir=${prefix}/lib |
| 32 | ++includedir=${prefix}/include/ |
| 33 | + |
| 34 | + Name: gd |
| 35 | + Description: GD graphics library |
| 36 | +-Version: @VERSION@ |
| 37 | +-Requires: |
| 38 | +-Requires.private: @PKG_REQUIRES_PRIVATES@ |
| 39 | +-Cflags: -I${includedir} |
| 40 | +-Libs.private: @LIBS_PRIVATES@ @LIBICONV@ |
| 41 | ++Version: @GD_VERSION_STRING@ |
| 42 | ++Requires: |
| 43 | ++Requires.private: @PKG_REQUIRES_PRIVATES@ |
| 44 | ++Cflags: -I${includedir} |
| 45 | ++Libs.private: @PRIVLIBLIST@ |
| 46 | + Libs: -L${libdir} -lgd |
| 47 | +diff -ur libgd-2.2.4/src/CMakeLists.txt.orig libgd-2.2.4/src/CMakeLists.txt |
| 48 | +--- libgd-2.2.4/src/CMakeLists.txt.orig 2017-01-18 06:01:19.000000000 -0500 |
| 49 | ++++ libgd-2.2.4/src/CMakeLists.txt 2017-01-23 13:39:47.661420900 -0500 |
| 50 | +@@ -105,14 +105,14 @@ |
| 51 | + add_library(gd_programs_lib STATIC ${GD_PROGRAMS_LIB_SRC_FILES}) |
| 52 | + endif() |
| 53 | + |
| 54 | +-if (WIN32 AND NOT MINGW AND NOT MSYS) |
| 55 | ++if (WIN32) |
| 56 | + # SET_TARGET_PROPERTIES(${GD_LIB} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:msvcrt.lib") |
| 57 | + |
| 58 | + if (BUILD_STATIC_LIBS) |
| 59 | + SET_PROPERTY(TARGET ${GD_LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS NONDLL=1) |
| 60 | + endif() |
| 61 | + |
| 62 | +-ENDIF(WIN32 AND NOT MINGW AND NOT MSYS) |
| 63 | ++ENDIF(WIN32) |
| 64 | + |
| 65 | + if (MINGW OR MSYS) |
| 66 | + ADD_DEFINITIONS("-mms-bitfields") |
| 67 | +@@ -157,7 +157,7 @@ |
| 68 | + endif() |
| 69 | + |
| 70 | + install(TARGETS ${GD_INSTALL_TARGETS} |
| 71 | +- RUNTIME DESTINATION bin |
| 72 | ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 73 | + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 74 | + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
| 75 | + install(PROGRAMS bdftogd DESTINATION bin) |
| 76 | +@@ -176,7 +179,7 @@ |
| 77 | + gdfontt.h |
| 78 | + gdfx.h |
| 79 | + gdpp.h |
| 80 | +- DESTINATION include) |
| 81 | ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) |
| 82 | + |
| 83 | + CONFIGURE_FILE(../config/gdlib.pc.cmake gdlib.pc @ONLY) |
| 84 | + INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/gdlib.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") |
| 85 | +diff -ur libgd-2.2.3/src/webpng.c libgd-2.2.3-new/src/webpng.c |
| 86 | +--- libgd-2.2.3/src/webpng.c 2016-06-03 10:34:39.000000000 +0200 |
| 87 | ++++ libgd-2.2.3-new/src/webpng.c 2016-09-24 09:49:11.582098800 +0200 |
| 88 | +@@ -18,6 +18,25 @@ |
| 89 | + #include <unistd.h> |
| 90 | + #endif |
| 91 | + |
| 92 | ++#if defined (_WIN32) |
| 93 | ++int opterr = 1, /* if error message should be printed */ |
| 94 | ++ optind = 1, /* index into parent argv vector */ |
| 95 | ++ optopt, /* character checked for validity */ |
| 96 | ++ optreset; /* reset getopt */ |
| 97 | ++char *optarg; /* argument associated with option */ |
| 98 | ++ |
| 99 | ++#define BADCH (int)'?' |
| 100 | ++#define BADARG (int)':' |
| 101 | ++#define EMSG "" |
| 102 | ++ |
| 103 | ++/* |
| 104 | ++* getopt -- |
| 105 | ++* Parse argc/argv argument vector. |
| 106 | ++*/ |
| 107 | ++int getopt(int nargc, char * const nargv[], const char *ostr); |
| 108 | ++ |
| 109 | ++#endif // defined (_WIN32) |
| 110 | ++ |
| 111 | + #ifdef __clang__ |
| 112 | + /* Workaround broken clang behavior: https://llvm.org/bugs/show_bug.cgi?id=20144 */ |
| 113 | + #undef strcmp |
| 114 | +@@ -295,3 +314,66 @@ |
| 115 | + /* All's well that ends well. */ |
| 116 | + return 0; |
| 117 | + } |
| 118 | ++ |
| 119 | ++#if defined (_WIN32) |
| 120 | ++/* |
| 121 | ++* getopt -- |
| 122 | ++* Parse argc/argv argument vector. |
| 123 | ++*/ |
| 124 | ++int |
| 125 | ++ getopt(int nargc, char * const nargv[], const char *ostr) |
| 126 | ++{ |
| 127 | ++ static char *place = EMSG; /* option letter processing */ |
| 128 | ++ const char *oli; /* option letter list index */ |
| 129 | ++ |
| 130 | ++ if (optreset || !*place) { /* update scanning pointer */ |
| 131 | ++ optreset = 0; |
| 132 | ++ if (optind >= nargc || *(place = nargv[optind]) != '-') { |
| 133 | ++ place = EMSG; |
| 134 | ++ return (-1); |
| 135 | ++ } |
| 136 | ++ if (place[1] && *++place == '-') { /* found "--" */ |
| 137 | ++ ++optind; |
| 138 | ++ place = EMSG; |
| 139 | ++ return (-1); |
| 140 | ++ } |
| 141 | ++ } /* option letter okay? */ |
| 142 | ++ if ((optopt = (int)*place++) == (int)':' || |
| 143 | ++ !(oli = strchr(ostr, optopt))) { |
| 144 | ++ /* |
| 145 | ++ * if the user didn't specify '-' as an option, |
| 146 | ++ * assume it means -1. |
| 147 | ++ */ |
| 148 | ++ if (optopt == (int)'-') |
| 149 | ++ return (-1); |
| 150 | ++ if (!*place) |
| 151 | ++ ++optind; |
| 152 | ++ if (opterr && *ostr != ':') |
| 153 | ++ (void)printf("illegal option -- %c\n", optopt); |
| 154 | ++ return (BADCH); |
| 155 | ++ } |
| 156 | ++ if (*++oli != ':') { /* don't need argument */ |
| 157 | ++ optarg = NULL; |
| 158 | ++ if (!*place) |
| 159 | ++ ++optind; |
| 160 | ++ } |
| 161 | ++ else { /* need an argument */ |
| 162 | ++ if (*place) /* no white space */ |
| 163 | ++ optarg = place; |
| 164 | ++ else if (nargc <= ++optind) { /* no arg */ |
| 165 | ++ place = EMSG; |
| 166 | ++ if (*ostr == ':') |
| 167 | ++ return (BADARG); |
| 168 | ++ if (opterr) |
| 169 | ++ (void)printf("option requires an argument -- %c\n", optopt); |
| 170 | ++ return (BADCH); |
| 171 | ++ } |
| 172 | ++ else /* white space */ |
| 173 | ++ optarg = nargv[optind]; |
| 174 | ++ place = EMSG; |
| 175 | ++ ++optind; |
| 176 | ++ } |
| 177 | ++ return (optopt); /* dump back option letter */ |
| 178 | ++} |
| 179 | ++#endif //defined (_WIN32) |
| 180 | ++ |
| 181 | +--- libgd-2.2.5/src/gd.h.orig 2017-10-02 13:50:31.857516500 +0300 |
| 182 | ++++ libgd-2.2.5/src/gd.h 2017-10-02 14:03:15.317333300 +0300 |
| 183 | +@@ -46,34 +46,31 @@ |
| 184 | + |
| 185 | + /* http://gcc.gnu.org/wiki/Visibility */ |
| 186 | + #if defined(_WIN32) || defined(CYGWIN) || defined(_WIN32_WCE) |
| 187 | +-# ifdef BGDWIN32 |
| 188 | +-# ifdef NONDLL |
| 189 | +-# define BGD_EXPORT_DATA_PROT |
| 190 | +-# else |
| 191 | +-# ifdef __GNUC__ |
| 192 | +-# define BGD_EXPORT_DATA_PROT __attribute__ ((__dllexport__)) |
| 193 | +-# else |
| 194 | +-# define BGD_EXPORT_DATA_PROT __declspec(dllexport) |
| 195 | +-# endif |
| 196 | +-# endif |
| 197 | +-# else |
| 198 | +-# ifdef __GNUC__ |
| 199 | +-# define BGD_EXPORT_DATA_PROT __attribute__ ((__dllimport__)) |
| 200 | +-# else |
| 201 | +-# define BGD_EXPORT_DATA_PROT __declspec(dllimport) |
| 202 | +-# endif |
| 203 | +-# endif |
| 204 | +-# define BGD_STDCALL __stdcall |
| 205 | +-# define BGD_EXPORT_DATA_IMPL |
| 206 | ++ #ifdef NONDLL // static build |
| 207 | ++ #define BGD_EXPORT_DATA_PROT |
| 208 | ++ #define BGD_STDCALL |
| 209 | ++ #else |
| 210 | ++ #ifdef BGDWIN32 // defined if we are building the GD DLL (instead of using it) |
| 211 | ++ #define BGD_EXPORT_DATA_PROT __attribute__ ((dllexport)) |
| 212 | ++ #else |
| 213 | ++ #define BGD_EXPORT_DATA_PROT __attribute__ ((dllimport)) |
| 214 | ++ #endif |
| 215 | ++ #ifdef __MINGW32__ |
| 216 | ++ #define BGD_STDCALL |
| 217 | ++ #else |
| 218 | ++ #define BGD_STDCALL __stdcall |
| 219 | ++ #endif |
| 220 | ++ #endif |
| 221 | ++ #define BGD_EXPORT_DATA_IMPL |
| 222 | + #else |
| 223 | +-# if defined(__GNUC__) || defined(__clang__) |
| 224 | +-# define BGD_EXPORT_DATA_PROT __attribute__ ((__visibility__ ("default"))) |
| 225 | +-# define BGD_EXPORT_DATA_IMPL __attribute__ ((__visibility__ ("hidden"))) |
| 226 | +-# else |
| 227 | +-# define BGD_EXPORT_DATA_PROT |
| 228 | +-# define BGD_EXPORT_DATA_IMPL |
| 229 | +-# endif |
| 230 | +-# define BGD_STDCALL |
| 231 | ++ #if defined(__GNUC__) || defined(__clang__) |
| 232 | ++ #define BGD_EXPORT_DATA_PROT __attribute__ ((visibility ("default"))) |
| 233 | ++ #define BGD_EXPORT_DATA_IMPL __attribute__ ((visibility ("hidden"))) |
| 234 | ++ #else |
| 235 | ++ #define BGD_EXPORT_DATA_PROT |
| 236 | ++ #define BGD_EXPORT_DATA_IMPL |
| 237 | ++ #endif |
| 238 | ++ #define BGD_STDCALL |
| 239 | + #endif |
| 240 | + |
| 241 | + #define BGD_DECLARE(rt) BGD_EXPORT_DATA_PROT rt BGD_STDCALL |
0 commit comments