Skip to content

Commit

Permalink
Add patch for agg pointer type
Browse files Browse the repository at this point in the history
  • Loading branch information
djhoese committed Sep 11, 2024
1 parent 789c26e commit c7d8c51
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
11 changes: 11 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion agg2/font_freetype/agg_font_freetype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions patches/tags_pointer_type_fix.patch
Original file line number Diff line number Diff line change
@@ -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
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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',
Expand Down

0 comments on commit c7d8c51

Please sign in to comment.