diff --git a/README.rst b/README.rst index 53f782f..19da976 100644 --- a/README.rst +++ b/README.rst @@ -93,3 +93,14 @@ ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Additional Patches +------------------ + +The AGG C++ vendored source code in this repository is no longer compatible +with some modern compilers and coding styles. The aggdraw project has had to +apply additional patches over time to fix compatibility or to retain backwards +compatibility with previous versions of AGG to get the same end result. Some +patches may be documented in README files, but all future patches should appear +in the `patches/` directory in the root of this repository and were applied with +commands such as `patch -p0 patches/tags_pointer_type_fix.patch`. diff --git a/agg2/font_freetype/agg_font_freetype.cpp b/agg2/font_freetype/agg_font_freetype.cpp index 0af06f6..8218d15 100644 --- a/agg2/font_freetype/agg_font_freetype.cpp +++ b/agg2/font_freetype/agg_font_freetype.cpp @@ -150,7 +150,7 @@ namespace agg FT_Vector* point; FT_Vector* limit; - char* tags; + unsigned char* tags; int n; // index of contour in outline int first; // index of first point in contour diff --git a/patches/tags_pointer_type_fix.patch b/patches/tags_pointer_type_fix.patch new file mode 100644 index 0000000..14d85a6 --- /dev/null +++ b/patches/tags_pointer_type_fix.patch @@ -0,0 +1,11 @@ +--- agg2/font_freetype/agg_font_freetype.cpp.orig 2024-03-06 10:16:58 ++++ agg2/font_freetype/agg_font_freetype.cpp 2024-09-11 09:17:23 +@@ -150,7 +150,7 @@ + + FT_Vector* point; + FT_Vector* limit; +- char* tags; ++ unsigned char* tags; + + int n; // index of contour in outline + int first; // index of first point in contour diff --git a/setup.py b/setup.py index a22f66f..67c261a 100644 --- a/setup.py +++ b/setup.py @@ -146,9 +146,6 @@ def _get_freetype_with_pkgconfig(): if sys.platform == "win32": libraries.extend(["kernel32", "user32", "gdi32"]) -# agg C++ is not compatible with gcc 14 -extra_compile_args = ["-fpermissive", "-Wno-pointer-sign"] - setup( name="aggdraw", version=VERSION, @@ -169,7 +166,6 @@ def _get_freetype_with_pkgconfig(): define_macros=defines, include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, - extra_compile_args=extra_compile_args, ) ], python_requires='>=3.9',