From nobody Sat Jul 08 19:07:02 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 4Qz0BG2fn5z4m6sf; Sat, 8 Jul 2023 19:07:02 +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 4Qz0BG2DLbz3CHb; Sat, 8 Jul 2023 19:07:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688843222; 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=vY29u9yAmFPXn8s+ms5Jh0jnnVYfQqBC0Je8riHd5Xg=; b=bw7HADYY7U3izpg6hBmWqLi4JQyngf1HCh0+Dd2sx+ryHM4lnw5//NRT/431oQXzlTkoOq hr6lWSNDtzW+NMMQaVEFHArUULFK3f1+ylwvuq7dSpGZBfsaalRyNS9+6kCSFsex38QHpx S93uwG3h73hM58ijVXoyfmsRBl8tBWi82zWzLwRgkb6g3z41vVML26lRSXRDpjXWzI7Xmz UqtQx0e3V0QamXFS8fgawiqr1UeK7tuH0sU4/Cve6JexA2vlBef3K/sOzazAPy+Lj/AasE 8q0/xwbyrSQPu8YP6BGMgaBpJ7dU8QsMP+eurdDEeqBR/+ZXOVZven/LbujCYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688843222; 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=vY29u9yAmFPXn8s+ms5Jh0jnnVYfQqBC0Je8riHd5Xg=; b=d4s10zfuwZnJdXTZpznXS3QP94CzgARu1qy3Q/QdusHKh3pPEqYBtEYEKO0FxyRYnFaRMi VAx3NHk28fe28iUlc1DIIeXPrt/9iXwYmABYt0nbc28a7INXWVHH4IOOeEFYURT8WvZAuT eRTeLrl/3OEU+VggREDlhIqb/gQhyNYoqF0ojwHqviJnQUIrAeOSAC+ntBYaewMsm7wDaA QkotoabhOaKpWaAFchMfqhmcja/xeCuii8RNzrmAXWfAhfZ1blr8B3xNGwxLvDPZAXQP5X XvFTrj1eEBVkSwo1h4scr2mWyFxKx17Gtqn91MFFe6mYMuUaXDZT9CTtTBonYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688843222; a=rsa-sha256; cv=none; b=Q8qq7tVmSVknN4SZUlCWDh3mgY/2/r94ApImUx+uGpmzE5NnVkQUZeVS5bMvQ525uHLHBI U54emEFpZ0kyY2V9M5dV2WScrYpSbTXHh4UPNynUhUqUnSV7BbSw7LdkyRHJRHi3gRc1hQ nfwDoYX/nrPKX02ksI9SqQKcdnn9A9LItX1dUzquzrAbO666IQPcM/COHpb4PL0FJkZeZ3 Y1i5AxteQmrxpm55qQ914aw8aOyJfEKfS9CshIoWVdpLThg9rm6z9P6oOgg95tWwOMiJOq qDN0jTBaTRIXXdQn+DFYLEiY1Fw05zYeB6gfIYS4PzzwnuJVjMCpTOofU8ZavQ== 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 4Qz0BG1HPSzXSk; Sat, 8 Jul 2023 19:07:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 368J72cG011081; Sat, 8 Jul 2023 19:07:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 368J72Sf011080; Sat, 8 Jul 2023 19:07:02 GMT (envelope-from git) Date: Sat, 8 Jul 2023 19:07:02 GMT Message-Id: <202307081907.368J72Sf011080@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: 7b672c1318c0 - main - games/qudos: try to unbreak the port's build against 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: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b672c1318c098a6594315efc151fd1e4f370b32 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=7b672c1318c098a6594315efc151fd1e4f370b32 commit 7b672c1318c098a6594315efc151fd1e4f370b32 Author: Alexey Dokuchaev AuthorDate: 2023-07-08 19:05:14 +0000 Commit: Alexey Dokuchaev CommitDate: 2023-07-08 19:05:14 +0000 games/qudos: try to unbreak the port's build against Clang 16 While here, remove compiler flags `-fomit-frame-pointer' and `-funroll-loops': the effect of the former is minuscule these days (but it still breaks debugging) and for the latter, one should let the [modern] compiler decide which loops to unroll and when; forcing it will most likely yield larger and slower code due to instruction cache misses. Last but not least, make some private functions in the OpenGL renderer static and define LICENSE (GPLv2 or later). Reported by: pkg-fallout --- games/qudos/Makefile | 7 +- games/qudos/files/patch-Makefile | 2 +- games/qudos/files/patch-src__ref_gl__gl_local.h | 17 ++++- games/qudos/files/patch-src_ref__gl_gl__image.c | 90 +++++++++++++++++++++++++ 4 files changed, 108 insertions(+), 8 deletions(-) diff --git a/games/qudos/Makefile b/games/qudos/Makefile index afb1b53fafb6..7068871234ea 100644 --- a/games/qudos/Makefile +++ b/games/qudos/Makefile @@ -11,6 +11,8 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= danfe@FreeBSD.org COMMENT= Enhanced OpenGL-only Quake II engine +LICENSE= GPLv2+ + USES= gmake tar:bzip2 MAKE_ENV= WITH_DATADIR=YES WITH_LIBDIR=YES WITH_XMMS=NO \ DATADIR="${Q2DIR}" LIBDIR="${LIBDIR}" BUILD_ARTS_SND=NO @@ -169,11 +171,6 @@ MAKE_ENV+= WITH_X86_ASM=YES MAKE_ENV+= WITH_X86_ASM=NO .endif -post-patch: -# Resolve name collision with jpeg-8 - @${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \ - ${WRKSRC}/src/ref_gl/gl_image.c - post-build: .for bin in ${Q2BIN} @cd ${WRKSRC}/quake2 && ${MV} ${bin:S/qudos/QuDos/} ${bin} diff --git a/games/qudos/files/patch-Makefile b/games/qudos/files/patch-Makefile index f6c6589ff280..a0681e694af3 100644 --- a/games/qudos/files/patch-Makefile +++ b/games/qudos/files/patch-Makefile @@ -6,7 +6,7 @@ else -CFLAGS+= -O3 -ffast-math -funroll-loops -fomit-frame-pointer \ - -fexpensive-optimizations -+CFLAGS+= -fcommon -ffast-math -funroll-loops -fomit-frame-pointer ++CFLAGS+= -fcommon -ffast-math -Wno-incompatible-function-pointer-types ifeq ($(ARCH),i386) -CFLAGS+= -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ +CFLAGS+= -falign-functions=2 \ diff --git a/games/qudos/files/patch-src__ref_gl__gl_local.h b/games/qudos/files/patch-src__ref_gl__gl_local.h index aa9dce66ef0d..4b6e34a4bfda 100644 --- a/games/qudos/files/patch-src__ref_gl__gl_local.h +++ b/games/qudos/files/patch-src__ref_gl__gl_local.h @@ -1,5 +1,5 @@ ---- src/ref_gl/gl_local.h.orig 2006-06-10 12:22:27.000000000 +0200 -+++ src/ref_gl/gl_local.h 2012-04-25 06:13:42.000000000 +0200 +--- src/ref_gl/gl_local.h.orig 2006-06-10 10:22:27 UTC ++++ src/ref_gl/gl_local.h @@ -30,6 +30,7 @@ #include @@ -8,3 +8,16 @@ #include #include "../client/ref.h" +@@ -480,12 +481,6 @@ int Draw_GetPalette(void); + void GL_ResampleTexture(unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight); + + struct image_s *R_RegisterSkin(char *name); +- +-void LoadPCX (char *filename, byte ** pic, byte ** palette, int *width, int *height); +-void LoadTGA (char *filename, byte ** pic, int *width, int *height); +-void LoadJPG (char *filename, byte ** pic, int *width, int *height); +-void LoadPNG (char *filename, byte ** pic, int *width, int *height); +- + + image_t *GL_LoadPic(char *name, byte * pic, int width, int height, imagetype_t type, int bits); + image_t *GL_FindImage(char *name, imagetype_t type); diff --git a/games/qudos/files/patch-src_ref__gl_gl__image.c b/games/qudos/files/patch-src_ref__gl_gl__image.c new file mode 100644 index 000000000000..74a9cf4f8777 --- /dev/null +++ b/games/qudos/files/patch-src_ref__gl_gl__image.c @@ -0,0 +1,90 @@ +--- src/ref_gl/gl_image.c.orig 2006-06-02 18:14:31 UTC ++++ src/ref_gl/gl_image.c +@@ -477,7 +477,7 @@ Scrap_Upload(void) + /* + * ============== LoadPCX ============== + */ +-void ++static void + LoadPCX(char *filename, byte ** pic, byte ** palette, int *width, int *height) + { + byte *raw; +@@ -602,7 +602,7 @@ typedef struct _TargaHeader { + * ============= LoadTGA NiceAss: LoadTGA() from Q2Ice, it supports more + * formats ============= + */ +-void ++static void + LoadTGA(char *filename, byte ** pic, int *width, int *height) + { + int w, h, x, y, i, temp1, temp2; +@@ -888,19 +888,19 @@ LoadTGA(char *filename, byte ** pic, int *width, int * + * ================================================================= + */ + +-void ++static void + jpg_null(j_decompress_ptr cinfo) + { + } + +-boolean ++static boolean + jpg_fill_input_buffer(j_decompress_ptr cinfo) + { + ri.Con_Printf(PRINT_ALL, "Premature end of JPEG data\n"); + return 1; + } + +-void ++static void + jpg_skip_input_data(j_decompress_ptr cinfo, long num_bytes) + { + +@@ -911,8 +911,8 @@ jpg_skip_input_data(j_decompress_ptr cinfo, long num_b + ri.Con_Printf(PRINT_ALL, "Premature end of JPEG data\n"); + } + +-void +-jpeg_mem_src(j_decompress_ptr cinfo, byte * mem, int len) ++static void ++local_jpeg_mem_src(j_decompress_ptr cinfo, byte *mem, int len) + { + cinfo->src = (struct jpeg_source_mgr *)(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(struct jpeg_source_mgr)); + cinfo->src->init_source = jpg_null; +@@ -927,7 +927,7 @@ jpeg_mem_src(j_decompress_ptr cinfo, byte * mem, int l + /* + * ============== LoadJPG ============== + */ +-void ++static void + LoadJPG(char *filename, byte ** pic, int *width, int *height) + { + struct jpeg_decompress_struct cinfo; +@@ -956,7 +956,7 @@ LoadJPG(char *filename, byte ** pic, int *width, int * + jpeg_create_decompress(&cinfo); + + /* Feed JPEG memory into the libJpeg Object */ +- jpeg_mem_src(&cinfo, rawdata, rawsize); ++ local_jpeg_mem_src(&cinfo, rawdata, rawsize); + + /* Process JPEG header */ + jpeg_read_header(&cinfo, true); +@@ -1139,7 +1139,7 @@ fReadData(png_structp png, png_bytep data, png_size_t + * ============================================================= + */ + +-void ++static void + LoadPNG(char *filename, byte ** pic, int *width, int *height) + { + png_structp png; +@@ -1186,7 +1186,7 @@ LoadPNG(char *filename, byte ** pic, int *width, int * + if (my_png->ColorType == PNG_COLOR_TYPE_PALETTE) + png_set_palette_to_rgb(png); + if (my_png->ColorType == PNG_COLOR_TYPE_GRAY && my_png->BitDepth < 8) +- png_set_gray_1_2_4_to_8(png); ++ png_set_expand_gray_1_2_4_to_8(png); + + /* Add alpha channel if present */ + if (png_get_valid(png, pnginfo, PNG_INFO_tRNS))