From nobody Wed May 24 14:36:29 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QRDJs2VRzz4CmSk; Wed, 24 May 2023 14:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QRDJs1rwSz3mHD; Wed, 24 May 2023 14:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684938989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jmQ5ooz1JS7M+cniHkPjhco6j+qzxz/KfIW2gL2Avco=; b=QTC8CtnHHv99aATpwWd3sNpX9XOaZX833K+favi039EIwFZxYfQSZOV2c1h9zpX7D8WCuE Y3ufJR4mP5BXdeYOSa2n7NAYsHChUSBTL9Vjjpz/kf327gDuY+dMqVMaTOMB/5W+rC6kt3 G6EhK6o/XPV5m74BzQDXTcqdQBbdeNxoRsJG4W4OkgWh2gr1fx3DIufdRX+YVnMyM4OSba KDIBEcHjiNpGlt0+1I5ulFTyEjOsihZHQxeC+MAnXdtHXKx6dHbhrVVg4DtWGddHdY/bJk LJivTfKQYzLcOUz9bjXwyLsOww8Agu7zSfLPuWWVwHXtDeMVxUMAw830hqNOWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684938989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jmQ5ooz1JS7M+cniHkPjhco6j+qzxz/KfIW2gL2Avco=; b=CEg/c9wNe4F3W7F+dojekqcWwlkQZnqIUWjmupf8VLXwYB2phzFvTjW7inVoQU5GIyy3q9 VE6RDGUrpJQTvEL4aCYHJQOaM6zfaOv9PbLaQEbFP6gxgSCOzl7PiGiubJqqZViFXLHAGk qA5A8W0W6bDf04jHVnIF9dZ3+oJSS2jXtygKBC9DHDG6t348b4NJWz6Hm+FtjP7LsFxUXS HE+LfZhUFeBpvzDzxBJ4h5NsFDhoxelQ0EcUnyW2rnqkuoTMIVNzFdTgcojBkHqv/AoNH8 EUca92AWyIWD3WdTdlbmLOii0dY8+vncsdORn7YSzXoIcSX4k+YKEqf25seTKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684938989; a=rsa-sha256; cv=none; b=NpXuqtuA2IwstFSCyLTmhR4PLgF66aKgUm5MI697OTW1gh/ea6eflLHCEK1VLnOl20FHyw qdxcxT6kY+3RWykYlmoIKR1fKRVWH17IrlUovcSiNLjOcUk66Hy8YRQcflsfZFR3N5pjpM 7tu5OiJjVcMX/aSLEHUJX2T0q7y3NbjE2GI9ew6umY/Kdo2oyab+UMHEoqY6oufGNWHl4R zrra6biCnYOZwHHcf0QPL3o8IROEd6NxN0G6ZsV+4P2wcvSXEY5gJtds9jKUYyB+8hCzHI tCWRvGwxoEESSJLU1h05DFVqkNu+kD1sjZ8/wTlJJLgw3JwS7n5lT1NSfuPsFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QRDJs0tzMzmR3; Wed, 24 May 2023 14:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34OEaTlC005644; Wed, 24 May 2023 14:36:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34OEaTH6005643; Wed, 24 May 2023 14:36:29 GMT (envelope-from git) Date: Wed, 24 May 2023 14:36:29 GMT Message-Id: <202305241436.34OEaTH6005643@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dmitry Marakasov Subject: git: 9b762306ec7d - main - graphics/sdl_image: fix build with clang 16 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: amdmi3 X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b762306ec7d96352d13eb62f42697c2ad65a23f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=9b762306ec7d96352d13eb62f42697c2ad65a23f commit 9b762306ec7d96352d13eb62f42697c2ad65a23f Author: Dmitry Marakasov AuthorDate: 2023-05-24 14:32:38 +0000 Commit: Dmitry Marakasov CommitDate: 2023-05-24 14:33:49 +0000 graphics/sdl_image: fix build with clang 16 Use correct png and webp function prototypes PR: 271520 Submitted by: dim --- graphics/sdl_image/files/patch-IMG__png.c | 55 ++++++++++++++++++++++++++++++ graphics/sdl_image/files/patch-IMG__webp.c | 15 ++++++++ 2 files changed, 70 insertions(+) diff --git a/graphics/sdl_image/files/patch-IMG__png.c b/graphics/sdl_image/files/patch-IMG__png.c new file mode 100644 index 000000000000..03a1b3522530 --- /dev/null +++ b/graphics/sdl_image/files/patch-IMG__png.c @@ -0,0 +1,55 @@ +--- IMG_png.c.orig 2012-01-21 01:51:33 UTC ++++ IMG_png.c +@@ -78,26 +78,26 @@ + static struct { + int loaded; + void *handle; +- png_infop (*png_create_info_struct) (png_structp png_ptr); ++ png_infop (*png_create_info_struct) (png_const_structp png_ptr); + png_structp (*png_create_read_struct) (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn); + void (*png_destroy_read_struct) (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr); +- png_uint_32 (*png_get_IHDR) (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method); +- png_voidp (*png_get_io_ptr) (png_structp png_ptr); +- png_byte (*png_get_channels) (png_structp png_ptr, png_infop info_ptr); +- png_uint_32 (*png_get_PLTE) (png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette); +- png_uint_32 (*png_get_tRNS) (png_structp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values); +- png_uint_32 (*png_get_valid) (png_structp png_ptr, png_infop info_ptr, png_uint_32 flag); +- void (*png_read_image) (png_structp png_ptr, png_bytepp image); +- void (*png_read_info) (png_structp png_ptr, png_infop info_ptr); +- void (*png_read_update_info) (png_structp png_ptr, png_infop info_ptr); +- void (*png_set_expand) (png_structp png_ptr); +- void (*png_set_gray_to_rgb) (png_structp png_ptr); +- void (*png_set_packing) (png_structp png_ptr); +- void (*png_set_read_fn) (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn); +- void (*png_set_strip_16) (png_structp png_ptr); +- int (*png_sig_cmp) (png_bytep sig, png_size_t start, png_size_t num_to_check); ++ png_uint_32 (*png_get_IHDR) (png_const_structrp png_ptr, png_const_inforp info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method); ++ png_voidp (*png_get_io_ptr) (png_const_structrp png_ptr); ++ png_byte (*png_get_channels) (png_const_structrp png_ptr, png_const_inforp info_ptr); ++ png_uint_32 (*png_get_PLTE) (png_const_structrp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette); ++ png_uint_32 (*png_get_tRNS) (png_const_structrp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values); ++ png_uint_32 (*png_get_valid) (png_const_structrp png_ptr, png_const_inforp info_ptr, png_uint_32 flag); ++ void (*png_read_image) (png_structrp png_ptr, png_bytepp image); ++ void (*png_read_info) (png_structrp png_ptr, png_infop info_ptr); ++ void (*png_read_update_info) (png_structrp png_ptr, png_infop info_ptr); ++ void (*png_set_expand) (png_structrp png_ptr); ++ void (*png_set_gray_to_rgb) (png_structrp png_ptr); ++ void (*png_set_packing) (png_structrp png_ptr); ++ void (*png_set_read_fn) (png_structrp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn); ++ void (*png_set_strip_16) (png_structrp png_ptr); ++ int (*png_sig_cmp) (png_const_bytep sig, png_size_t start, png_size_t num_to_check); + #ifndef LIBPNG_VERSION_12 +- jmp_buf* (*png_set_longjmp_fn) (png_structp, png_longjmp_ptr, size_t); ++ jmp_buf* (*png_set_longjmp_fn) (png_structrp, png_longjmp_ptr, size_t); + #endif + } lib; + +@@ -237,7 +237,7 @@ int IMG_InitPNG() + } + #ifndef LIBPNG_VERSION_12 + lib.png_set_longjmp_fn = +- (jmp_buf * (*) (png_structp, png_longjmp_ptr, size_t)) ++ (jmp_buf * (*) (png_structrp, png_longjmp_ptr, size_t)) + SDL_LoadFunction(lib.handle, "png_set_longjmp_fn"); + if ( lib.png_set_longjmp_fn == NULL ) { + SDL_UnloadObject(lib.handle); diff --git a/graphics/sdl_image/files/patch-IMG__webp.c b/graphics/sdl_image/files/patch-IMG__webp.c new file mode 100644 index 000000000000..5e506a0929f2 --- /dev/null +++ b/graphics/sdl_image/files/patch-IMG__webp.c @@ -0,0 +1,15 @@ +--- IMG_webp.c.orig 2012-01-21 01:51:33 UTC ++++ IMG_webp.c +@@ -47,9 +47,9 @@ static struct { + static struct { + int loaded; + void *handle; +- int/*VP8StatuCode*/ (*webp_get_features_internal) (const uint8_t *data, uint32_t data_size, WebPBitstreamFeatures* const features, int decoder_abi_version); +- uint8_t* (*webp_decode_rgb_into) (const uint8_t* data, uint32_t data_size, uint8_t* output_buffer, int output_buffer_size, int output_stride); +- uint8_t* (*webp_decode_rgba_into) (const uint8_t* data, uint32_t data_size, uint8_t* output_buffer, int output_buffer_size, int output_stride); ++ VP8StatusCode (*webp_get_features_internal) (const uint8_t *data, size_t data_size, WebPBitstreamFeatures* features, int decoder_abi_version); ++ uint8_t* (*webp_decode_rgb_into) (const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride); ++ uint8_t* (*webp_decode_rgba_into) (const uint8_t* data, size_t data_size, uint8_t* output_buffer, size_t output_buffer_size, int output_stride); + } lib; + + #ifdef LOAD_WEBP_DYNAMIC