update mojoshader to last commit (2021-11-24). Project has moved to GitHub,
so versioning by mercurial commit isn't meaningful anymore. - remove manual version setting (mojoshader now sets version to -1 if it can't find git/hg info; this is fine) - 2 functions have incomplete signature; add ctx to complete them (plan to upstream this) - tested with fnaify and several FNA games, including Rogue Legacy, Cryptark, Miasma without issues
This commit is contained in:
parent
0e01c54935
commit
2469dec902
@ -1,22 +1,20 @@
|
||||
# $OpenBSD: Makefile,v 1.11 2021/03/07 17:09:36 thfr Exp $
|
||||
# $OpenBSD: Makefile,v 1.12 2021/12/12 04:41:03 thfr Exp $
|
||||
|
||||
COMMENT = library to move calls to Direct3D shaders to OpenGL
|
||||
COMMENT = library to move Direct3D shader calls to OpenGL
|
||||
|
||||
# HG_CHANGESET and HG_COMMIT must be kept in sync.
|
||||
HG_CHANGESET = 1321
|
||||
HG_COMMIT = 02f2aafb103c
|
||||
DISTNAME = mojoshader-0.0.0.20211124
|
||||
GH_ACCOUNT = icculus
|
||||
GH_PROJECT = mojoshader
|
||||
GH_COMMIT = 76293ed6d5c4bb33875abb92979309e2797cc6ed
|
||||
EPOCH = 0
|
||||
|
||||
SHARED_LIBS += mojoshader 2.0 # 0.0.0.20211124
|
||||
|
||||
DISTNAME = mojoshader-${HG_COMMIT}{${HG_COMMIT}}
|
||||
PKGNAME = mojoshader-${HG_CHANGESET}
|
||||
CATEGORIES = graphics
|
||||
MASTER_SITES = https://hg.icculus.org/icculus/mojoshader/archive/
|
||||
|
||||
SHARED_LIBS += mojoshader 1.0 # Changeset 1303
|
||||
MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
|
||||
|
||||
HOMEPAGE = https://icculus.org/mojoshader/
|
||||
|
||||
MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
|
||||
|
||||
# zlib
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
@ -36,7 +34,6 @@ CONFIGURE_ARGS = -DBUILD_SHARED_LIBS=ON \
|
||||
-DPROFILE_METAL=OFF
|
||||
|
||||
CFLAGS += -I${LOCALBASE}/include
|
||||
WRKDIST = ${WRKDIR}/mojoshader-${HG_COMMIT}
|
||||
|
||||
SUBST_VARS += HG_CHANGESET HG_COMMIT
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (mojoshader-02f2aafb103c.tar.gz) = UbCB4dyT4whIlXGav+8QE+7AW8OS94ijvbYGaZmGZvc=
|
||||
SIZE (mojoshader-02f2aafb103c.tar.gz) = 466287
|
||||
SHA256 (mojoshader-0.0.0.20211124-76293ed6.tar.gz) = mFw9ui9ziphuTh+H0dw2JGc/rq0i+cIXGRN81jQjcYY=
|
||||
SIZE (mojoshader-0.0.0.20211124-76293ed6.tar.gz) = 477384
|
||||
|
@ -1,18 +0,0 @@
|
||||
$OpenBSD: patch-CMakeLists_txt,v 1.3 2020/09/18 18:46:57 thfr Exp $
|
||||
|
||||
set version/changeset information manually
|
||||
|
||||
Index: CMakeLists.txt
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -67,8 +67,8 @@ WRITE_FILE(
|
||||
"/* This file was autogenerated. Do not edit! */\n"
|
||||
"#ifndef _INCL_MOJOSHADER_VERSION_H_\n"
|
||||
"#define _INCL_MOJOSHADER_VERSION_H_\n"
|
||||
- "#define MOJOSHADER_VERSION ${MOJOSHADER_VERSION}\n"
|
||||
- "#define MOJOSHADER_CHANGESET \"${MOJOSHADER_CHANGESET}\"\n"
|
||||
+ "#define MOJOSHADER_VERSION ${HG_CHANGESET}\n"
|
||||
+ "#define MOJOSHADER_CHANGESET \"${HG_CHANGESET}:${HG_COMMIT}\"\n"
|
||||
"#endif\n"
|
||||
)
|
||||
|
25
graphics/mojoshader/patches/patch-mojoshader_compiler_c
Normal file
25
graphics/mojoshader/patches/patch-mojoshader_compiler_c
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-mojoshader_compiler_c,v 1.1 2021/12/12 04:41:03 thfr Exp $
|
||||
|
||||
fix incomplete function signatures
|
||||
|
||||
Index: mojoshader_compiler.c
|
||||
--- mojoshader_compiler.c.orig
|
||||
+++ mojoshader_compiler.c
|
||||
@@ -475,7 +475,7 @@ static void pop_symbol(Context *ctx, SymbolMap *map)
|
||||
if (!item)
|
||||
return;
|
||||
if (item->symbol)
|
||||
- hash_remove(map->hash, item->symbol);
|
||||
+ hash_remove(map->hash, item->symbol, ctx);
|
||||
map->scope = item->next;
|
||||
Free(ctx, item);
|
||||
} // pop_symbol
|
||||
@@ -524,7 +524,7 @@ static void destroy_symbolmap(Context *ctx, SymbolMap
|
||||
{
|
||||
while (map->scope)
|
||||
pop_symbol(ctx, map);
|
||||
- hash_destroy(map->hash);
|
||||
+ hash_destroy(map->hash, ctx);
|
||||
} // destroy_symbolmap
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-mojoshader_opengl_c,v 1.2 2020/09/18 18:46:57 thfr Exp $
|
||||
$OpenBSD: patch-mojoshader_opengl_c,v 1.3 2021/12/12 04:41:03 thfr Exp $
|
||||
|
||||
re-add MOJOSHADER_glProgramViewportFlip() for backwards compatibility.
|
||||
Was removed by upstream in changeset 1210
|
||||
@ -7,7 +7,7 @@ Was removed by upstream in changeset 1210
|
||||
Index: mojoshader_opengl.c
|
||||
--- mojoshader_opengl.c.orig
|
||||
+++ mojoshader_opengl.c
|
||||
@@ -2671,6 +2671,27 @@ static inline GLenum opengl_attr_type(const MOJOSHADER
|
||||
@@ -2681,6 +2681,27 @@ static inline GLenum opengl_attr_type(const MOJOSHADER
|
||||
return GL_NONE; // oh well. Raises a GL error later.
|
||||
} // opengl_attr_type
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user