Skip to content

Commit

Permalink
py312-ruamel-yaml-clib: fix incompatible function pointer types
Browse files Browse the repository at this point in the history
*fixes package build on macOS Sequoia with clang16

Closes: https://trac.macports.org/ticket/70796
  • Loading branch information
rveznaver authored and reneeotten committed Sep 24, 2024
1 parent 2dbe05b commit fc45ac0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/py-ruamel-yaml-clib/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version 0.2.8
checksums rmd160 58caef0372063cfa06e27a75fea1e85c43b1c891 \
sha256 beb2e0404003de9a4cab9753a8805a8fe9320ee6673136ed7f04255fe60bb512 \
size 213824
revision 0
revision 1

license MIT
maintainers {michaelld @michaelld} openmaintainer
Expand All @@ -26,6 +26,8 @@ if {${name} ne ${subport}} {
port:py${python.version}-ruamel-yaml
}

patchfiles clang16.patch

# pypi requires "." not "-" in project names for fetching
regsub ^py- [option name] "" python_rootname
regsub -all {\-} ${python_rootname} "." python.rootname
33 changes: 33 additions & 0 deletions python/py-ruamel-yaml-clib/files/clang16.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Fix build with clang16
https://cgit.freebsd.org/ports/plain/devel/py-ruamel.yaml.clib/files/patch-clang16
--- _ruamel_yaml.c.orig 2023-10-03 06:54:38 UTC
+++ _ruamel_yaml.c
@@ -2272,8 +2272,8 @@ static int __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_
static int __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_8CEmitter__serialize_node(struct __pyx_obj_6ruamel_4yaml_4clib_12_ruamel_yaml_CEmitter *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_parent, PyObject *__pyx_v_index); /* proto*/

/* Module declarations from "ruamel.yaml.clib._ruamel_yaml" */
-static int __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_input_handler(void *, char *, int, int *); /*proto*/
-static int __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_output_handler(void *, char *, int); /*proto*/
+static int __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_input_handler(void *, unsigned char *, size_t, size_t *); /*proto*/
+static int __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_output_handler(void *, unsigned char *, size_t); /*proto*/
static PyObject *__pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml___pyx_unpickle_Mark__set_state(struct __pyx_obj_6ruamel_4yaml_4clib_12_ruamel_yaml_Mark *, PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
@@ -16092,7 +16092,7 @@ static PyObject *__pyx_pf_6ruamel_4yaml_4clib_12_ruame
* parser = <CParser>data
*/

-static int __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_input_handler(void *__pyx_v_data, char *__pyx_v_buffer, int __pyx_v_size, int *__pyx_v_read) {
+static int __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_input_handler(void *__pyx_v_data, unsigned char *__pyx_v_buffer, size_t __pyx_v_size, size_t *__pyx_v_read) {
struct __pyx_obj_6ruamel_4yaml_4clib_12_ruamel_yaml_CParser *__pyx_v_parser = 0;
PyObject *__pyx_v_value = NULL;
int __pyx_r;
@@ -25321,7 +25321,7 @@ static PyObject *__pyx_pf_6ruamel_4yaml_4clib_12_ruame
* emitter = <CEmitter>data
*/

-static int __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_output_handler(void *__pyx_v_data, char *__pyx_v_buffer, int __pyx_v_size) {
+static int __pyx_f_6ruamel_4yaml_4clib_12_ruamel_yaml_output_handler(void *__pyx_v_data, unsigned char *__pyx_v_buffer, size_t __pyx_v_size) {
struct __pyx_obj_6ruamel_4yaml_4clib_12_ruamel_yaml_CEmitter *__pyx_v_emitter = 0;
PyObject *__pyx_v_value = NULL;
int __pyx_r;

0 comments on commit fc45ac0

Please sign in to comment.