I would add @pkgpath graphics/mojoshader to fna3d rather than adding a quirks entry, then users who have installed fna/fna3d won't need to do anything to remove it, it will just get merged automatically.

--
 Sent from a phone, apologies for poor formatting.

On 3 September 2022 22:58:55 Thomas Frohwein <tfrohw...@fastmail.com> wrote:

Hi,

With the update to FNA 22.08 including static linking of mojoshader in
fna3d [1], the need for a separate mojoshader port is gone. Only
FNA{,3D}-related ports depended on it before the update, and I'm not
aware of another significant use case for mojoshader.

Diff below to remove the port. ok?

[1] https://marc.info/?l=openbsd-ports-cvs&m=166216925830932&w=2

Index: graphics/Makefile
===================================================================
RCS file: /cvs/ports/graphics/Makefile,v
retrieving revision 1.581
diff -u -p -r1.581 Makefile
--- graphics/Makefile   23 Aug 2022 12:16:30 -0000      1.581
+++ graphics/Makefile   3 Sep 2022 21:35:52 -0000
@@ -170,7 +170,6 @@
     SUBDIR += mapivi
     SUBDIR += mapnik
     SUBDIR += mhgui
-     SUBDIR += mojoshader
     SUBDIR += mpeg-lib
     SUBDIR += mpeg_encode
     SUBDIR += mscgen
Index: devel/quirks/Makefile
===================================================================
RCS file: /cvs/ports/devel/quirks/Makefile,v
retrieving revision 1.1415
diff -u -p -r1.1415 Makefile
--- devel/quirks/Makefile       3 Sep 2022 07:52:28 -0000       1.1415
+++ devel/quirks/Makefile       3 Sep 2022 21:35:52 -0000
@@ -3,7 +3,7 @@ CATEGORIES =    devel databases
DISTFILES =

# API.rev
-PKGNAME =      quirks-6.31
+PKGNAME =      quirks-6.32
PKG_ARCH =      *
MAINTAINER =    Marc Espie <es...@openbsd.org>

Index: devel/quirks/files/Quirks.pm
===================================================================
RCS file: /cvs/ports/devel/quirks/files/Quirks.pm,v
retrieving revision 1.1425
diff -u -p -r1.1425 Quirks.pm
--- devel/quirks/files/Quirks.pm        3 Sep 2022 07:52:28 -0000       1.1425
+++ devel/quirks/files/Quirks.pm        3 Sep 2022 21:35:52 -0000
@@ -1706,6 +1706,7 @@ setup_obsolete_reason(
        6 => 'mlt-gpl',
        6 => 'webvfx',
        6 => 'libXp',
+       5 => 'mojoshader',
);

# though it's not yet used, these should be pkgnames, so that eventually
Index: graphics/mojoshader/Makefile
===================================================================
RCS file: graphics/mojoshader/Makefile
diff -N graphics/mojoshader/Makefile
--- graphics/mojoshader/Makefile        11 Mar 2022 19:22:51 -0000      1.14
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,55 +0,0 @@
-COMMENT =      library to move Direct3D shader calls to OpenGL
-
-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
-
-CATEGORIES =   graphics
-MAINTAINER =   Thomas Frohwein <t...@openbsd.org>
-
-HOMEPAGE =     https://icculus.org/mojoshader/
-
-# zlib
-PERMIT_PACKAGE =       Yes
-
-COMPILER =     base-clang ports-gcc
-COMPILER_LANGS =       c
-
-WANTLIB += m
-
-MODULES =      devel/cmake
-
-BUILD_DEPENDS =        devel/re2c \
-               devel/sdl2 \
-               graphics/vulkan-headers
-
-TEST_DEPENDS = security/p5-Digest-SHA1
-
-# FLIP_VIEWPORT is needed by some FNA games (FEZ if I recall correctly)
-CONFIGURE_ARGS =       -DBUILD_SHARED_LIBS=ON \
-                       -DFLIP_VIEWPORT=1 \
-                       -DPROFILE_METAL=OFF
-
-CFLAGS +=      -I${LOCALBASE}/include
-
-SUBST_VARS +=  HG_CHANGESET HG_COMMIT
-
-.include <bsd.port.arch.mk>
-.if !${PROPERTIES:Mclang}
-CFLAGS +=      -std=gnu99
-.endif
-
-do-gen:
-       ${SUBST_CMD} ${WRKSRC}/CMakeLists.txt
-
-# No upstream install target
-do-install:
-       ${INSTALL_DATA} ${WRKSRC}/mojoshader*.h ${PREFIX}/include
-       ${INSTALL_DATA} ${WRKBUILD}/libmojoshader.so.${LIBmojoshader_VERSION} \
-               ${PREFIX}/lib
-
-.include <bsd.port.mk>
Index: graphics/mojoshader/distinfo
===================================================================
RCS file: graphics/mojoshader/distinfo
diff -N graphics/mojoshader/distinfo
--- graphics/mojoshader/distinfo        12 Dec 2021 04:41:03 -0000      1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-SHA256 (mojoshader-0.0.0.20211124-76293ed6.tar.gz) = mFw9ui9ziphuTh+H0dw2JGc/rq0i+cIXGRN81jQjcYY=
-SIZE (mojoshader-0.0.0.20211124-76293ed6.tar.gz) = 477384
Index: graphics/mojoshader/patches/patch-mojoshader_compiler_c
===================================================================
RCS file: graphics/mojoshader/patches/patch-mojoshader_compiler_c
diff -N graphics/mojoshader/patches/patch-mojoshader_compiler_c
--- graphics/mojoshader/patches/patch-mojoshader_compiler_c 11 Mar 2022 19:22:51 -0000 1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-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
-
-
Index: graphics/mojoshader/patches/patch-mojoshader_opengl_c
===================================================================
RCS file: graphics/mojoshader/patches/patch-mojoshader_opengl_c
diff -N graphics/mojoshader/patches/patch-mojoshader_opengl_c
--- graphics/mojoshader/patches/patch-mojoshader_opengl_c 11 Mar 2022 19:22:51 -0000 1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-re-add MOJOSHADER_glProgramViewportFlip() for backwards compatibility.
-Was removed by upstream in changeset 1210
-(https://hg.icculus.org/icculus/mojoshader/rev/c586d4590241)
-
-Index: mojoshader_opengl.c
---- mojoshader_opengl.c.orig
-+++ mojoshader_opengl.c
-@@ -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
-
-+#ifdef MOJOSHADER_FLIP_RENDERTARGET
-+
-+
-+void MOJOSHADER_glProgramViewportFlip(int flip)
-+{
-+      assert(ctx->bound_program->vs_flip_loc != -1);
-+
-+      /* Some compilers require that vpFlip be a float value, rather than int.
-+       * However, there's no real reason for it to be a float in the API, so 
we
-+       * do a cast in here. That's not so bad, right...?
-+       * -flibit
-+       */
-+      if (flip != ctx->bound_program->current_flip)
-+      {
-+              ctx->glUniform1f(ctx->bound_program->vs_flip_loc, (float) flip);
-+              ctx->bound_program->current_flip = flip;
-+      } // if
-+}
-+
-+#endif
-+
-
- int MOJOSHADER_glGetVertexAttribLocation(MOJOSHADER_usage usage, int index)
- {
Index: graphics/mojoshader/pkg/DESCR
===================================================================
RCS file: graphics/mojoshader/pkg/DESCR
diff -N graphics/mojoshader/pkg/DESCR
--- graphics/mojoshader/pkg/DESCR       12 Jan 2018 22:50:45 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-MojoShader is a library to work with Direct3D shaders on alternate 3D
-APIs and non-Windows platforms. The primary motivation is moving shaders
-to OpenGL languages on the fly. The developer deals with "profiles" that
-represent various target languages, such as GLSL or ARB_*_program.
-
-This allows a developer to manage one set of shaders, presumably written
-in Direct3D HLSL, and use them across multiple rendering backends. This
-also means that the developer only has to worry about one (offline)
-compiler to manage program complexity, while MojoShader itself deals
-with the reduced complexity of the bytecode at runtime.
-
-MojoShader provides both a simple API to convert bytecode to various
-profiles, and (optionally) basic glue to rendering APIs to abstract the
-management of the shaders at runtime.
Index: graphics/mojoshader/pkg/PLIST
===================================================================
RCS file: graphics/mojoshader/pkg/PLIST
diff -N graphics/mojoshader/pkg/PLIST
--- graphics/mojoshader/pkg/PLIST       11 Mar 2022 19:22:51 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-include/mojoshader.h
-include/mojoshader_effects.h
-include/mojoshader_internal.h
-include/mojoshader_parser_hlsl.h
-include/mojoshader_version.h
-include/mojoshader_vulkan_vkfuncs.h
-@lib lib/libmojoshader.so.${LIBmojoshader_VERSION}

Reply via email to