pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics



Module Name:    pkgsrc
Committed By:   maya
Date:           Sun Jan 24 19:03:47 UTC 2021

Modified Files:
        pkgsrc/graphics: Makefile
Added Files:
        pkgsrc/graphics/fna3d: DESCR Makefile PLIST buildlink3.mk distinfo
        pkgsrc/graphics/fna3d/patches: patch-CMakeLists.txt
            patch-src_FNA3D__Driver__Vulkan.c

Log Message:
Add fna3d version 21.01

This is FNA3D, the 3D graphics library for FNA.

FNA3D was written to be used for FNA's Graphics namespace. It carries the same
API design as XNA 4.0, with various implementations available at runtime
(including Vulkan, OpenGL, Metal, and Direct3D). For shaders, we support
Direct3D 9 Effect Framework binaries via MojoShader.

Note that while FNA is the main consumer of FNA3D, we do NOT provide separate C#
bindings. If you want to use FNA3D in C#, simply use FNA instead; it's the same
API and can be used entirely by itself without dragging in other dependencies.


To generate a diff of this commit:
cvs rdiff -u -r1.918 -r1.919 pkgsrc/graphics/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/fna3d/DESCR \
    pkgsrc/graphics/fna3d/Makefile pkgsrc/graphics/fna3d/PLIST \
    pkgsrc/graphics/fna3d/buildlink3.mk pkgsrc/graphics/fna3d/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/fna3d/patches/patch-CMakeLists.txt \
    pkgsrc/graphics/fna3d/patches/patch-src_FNA3D__Driver__Vulkan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/Makefile
diff -u pkgsrc/graphics/Makefile:1.918 pkgsrc/graphics/Makefile:1.919
--- pkgsrc/graphics/Makefile:1.918      Sun Jan 24 18:59:47 2021
+++ pkgsrc/graphics/Makefile    Sun Jan 24 19:03:46 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.918 2021/01/24 18:59:47 maya Exp $
+# $NetBSD: Makefile,v 1.919 2021/01/24 19:03:46 maya Exp $
 #
 
 COMMENT=       Graphics tools and libraries
@@ -130,6 +130,7 @@ SUBDIR+=    faba-icon-theme
 SUBDIR+=       fbm
 SUBDIR+=       feh
 SUBDIR+=       fly
+SUBDIR+=       fna3d
 SUBDIR+=       fnlib
 SUBDIR+=       fotoxx
 SUBDIR+=       frameworks

Added files:

Index: pkgsrc/graphics/fna3d/DESCR
diff -u /dev/null pkgsrc/graphics/fna3d/DESCR:1.1
--- /dev/null   Sun Jan 24 19:03:47 2021
+++ pkgsrc/graphics/fna3d/DESCR Sun Jan 24 19:03:46 2021
@@ -0,0 +1,10 @@
+This is FNA3D, the 3D graphics library for FNA.
+
+FNA3D was written to be used for FNA's Graphics namespace. It carries the same
+API design as XNA 4.0, with various implementations available at runtime
+(including Vulkan, OpenGL, Metal, and Direct3D). For shaders, we support
+Direct3D 9 Effect Framework binaries via MojoShader.
+
+Note that while FNA is the main consumer of FNA3D, we do NOT provide separate C#
+bindings. If you want to use FNA3D in C#, simply use FNA instead; it's the same
+API and can be used entirely by itself without dragging in other dependencies.
Index: pkgsrc/graphics/fna3d/Makefile
diff -u /dev/null pkgsrc/graphics/fna3d/Makefile:1.1
--- /dev/null   Sun Jan 24 19:03:47 2021
+++ pkgsrc/graphics/fna3d/Makefile      Sun Jan 24 19:03:46 2021
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.1 2021/01/24 19:03:46 maya Exp $
+
+GITHUB_PROJECT=        FNA3D
+GITHUB_TAG=    21.01
+DISTNAME=      21.01
+PKGNAME=       ${GITHUB_PROJECT:tl}-${DISTNAME}
+CATEGORIES=    graphics
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=FNA-XNA/}
+DIST_SUBDIR=   ${GITHUB_PROJECT}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://fna-xna.github.io/
+COMMENT=       3D graphics library for FNA
+LICENSE=       zlib
+
+WRKSRC=                ${WRKDIR}/FNA3D-21.01
+USE_CMAKE=     yes
+
+# No upstream install target
+INSTALLATION_DIRS=      lib include
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/include/*.h ${DESTDIR}${PREFIX}/include/
+       ${INSTALL_DATA} ${WRKSRC}/libFNA3D.so* ${DESTDIR}${PREFIX}/lib/
+
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../graphics/vulkan-headers/buildlink3.mk"
+.include "../../graphics/mojoshader/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/graphics/fna3d/PLIST
diff -u /dev/null pkgsrc/graphics/fna3d/PLIST:1.1
--- /dev/null   Sun Jan 24 19:03:47 2021
+++ pkgsrc/graphics/fna3d/PLIST Sun Jan 24 19:03:46 2021
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1 2021/01/24 19:03:46 maya Exp $
+include/FNA3D.h
+include/FNA3D_Image.h
+lib/libFNA3D.so
+lib/libFNA3D.so.0
+lib/libFNA3D.so.0.${PKGVERSION}
Index: pkgsrc/graphics/fna3d/buildlink3.mk
diff -u /dev/null pkgsrc/graphics/fna3d/buildlink3.mk:1.1
--- /dev/null   Sun Jan 24 19:03:47 2021
+++ pkgsrc/graphics/fna3d/buildlink3.mk Sun Jan 24 19:03:47 2021
@@ -0,0 +1,15 @@
+# $NetBSD: buildlink3.mk,v 1.1 2021/01/24 19:03:47 maya Exp $
+
+BUILDLINK_TREE+=       FNA3D
+
+.if !defined(FNA3D_BUILDLINK3_MK)
+FNA3D_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.FNA3D+=  FNA3D>=21.01
+BUILDLINK_PKGSRCDIR.FNA3D?=    ../../graphics/fna3d
+
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../graphics/mojoshader/buildlink3.mk"
+.endif # FNA3D_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -FNA3D
Index: pkgsrc/graphics/fna3d/distinfo
diff -u /dev/null pkgsrc/graphics/fna3d/distinfo:1.1
--- /dev/null   Sun Jan 24 19:03:47 2021
+++ pkgsrc/graphics/fna3d/distinfo      Sun Jan 24 19:03:47 2021
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2021/01/24 19:03:47 maya Exp $
+
+SHA1 (FNA3D/21.01.tar.gz) = 0553df59ef236835c62aa0642f9ca1abfb6f618d
+RMD160 (FNA3D/21.01.tar.gz) = 783541a575568906c9ecb23c4563f11f0900eab1
+SHA512 (FNA3D/21.01.tar.gz) = ae99280d2b160cbadf19df60aa2e81eb3ae4da4267613f97aa8e132b0b743068091460d8f3097d47adbd6a7b7292a7640088ae7104e2a3a783e0050b72ca497a
+Size (FNA3D/21.01.tar.gz) = 315856 bytes
+SHA1 (patch-CMakeLists.txt) = 27ebc2e42a5819b6298b6faa8488234e8f3ecbb1
+SHA1 (patch-src_FNA3D__Driver__Vulkan.c) = b9eb107f3d0430ab9536f709871c5d1af1d1e06a

Index: pkgsrc/graphics/fna3d/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/fna3d/patches/patch-CMakeLists.txt:1.1
--- /dev/null   Sun Jan 24 19:03:47 2021
+++ pkgsrc/graphics/fna3d/patches/patch-CMakeLists.txt  Sun Jan 24 19:03:47 2021
@@ -0,0 +1,65 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2021/01/24 19:03:47 maya Exp $
+
+set correct library version
+disable bundled mojoshader in favor of the one from pkgsrc
+
+--- CMakeLists.txt.orig        2021-01-01 16:22:56.000000000 +0000
++++ CMakeLists.txt
+@@ -3,6 +3,9 @@
+ cmake_minimum_required(VERSION 2.8.12)
+ project(FNA3D C)
+ 
++include_directories("${PREFIX}/include"
++                      "${X11BASE}/include")
++
+ # Options
+ option(BUILD_SHARED_LIBS "Build shared library" ON)
+ option(DISABLE_D3D11 "Disable D3D11 backend")
+@@ -105,28 +108,11 @@ add_library(FNA3D
+       src/FNA3D_Image.c
+       src/FNA3D_PipelineCache.c
+ )
+-add_library(mojoshader STATIC
+-      MojoShader/mojoshader.c
+-      MojoShader/mojoshader_effects.c
+-      MojoShader/mojoshader_common.c
+-      MojoShader/mojoshader_d3d11.c
+-      MojoShader/mojoshader_opengl.c
+-      MojoShader/mojoshader_metal.c
+-      MojoShader/mojoshader_vulkan.c
+-      MojoShader/profiles/mojoshader_profile_common.c
+-      MojoShader/profiles/mojoshader_profile_glsl.c
+-      MojoShader/profiles/mojoshader_profile_hlsl.c
+-      MojoShader/profiles/mojoshader_profile_metal.c
+-      MojoShader/profiles/mojoshader_profile_spirv.c
+-)
+ 
+ # Build flags
+ if(NOT MSVC)
+       set_property(TARGET FNA3D PROPERTY COMPILE_FLAGS "-std=gnu99 -Wall -Wno-strict-aliasing -pedantic")
+ endif()
+-if(BUILD_SHARED_LIBS)
+-      set_property(TARGET mojoshader PROPERTY POSITION_INDEPENDENT_CODE ON)
+-endif()
+ 
+ # FNA3D folders as includes, for other targets to consume
+ target_include_directories(FNA3D PUBLIC
+@@ -134,10 +120,6 @@ target_include_directories(FNA3D PUBLIC
+       $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+       $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/include>
+ )
+-target_include_directories(mojoshader PUBLIC
+-      $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/MojoShader>
+-      $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/include>
+-)
+ 
+ # MinGW builds should statically link libgcc
+ if(MINGW)
+@@ -165,7 +147,6 @@ else()
+       if (TARGET SDL2::SDL2)
+               message(STATUS "using TARGET SDL2::SDL2")
+               target_link_libraries(FNA3D PUBLIC SDL2::SDL2)
+-              target_link_libraries(mojoshader PUBLIC SDL2::SDL2)
+       elseif (TARGET SDL2)
+               message(STATUS "using TARGET SDL2")
+               target_link_libraries(FNA3D PUBLIC SDL2)
Index: pkgsrc/graphics/fna3d/patches/patch-src_FNA3D__Driver__Vulkan.c
diff -u /dev/null pkgsrc/graphics/fna3d/patches/patch-src_FNA3D__Driver__Vulkan.c:1.1
--- /dev/null   Sun Jan 24 19:03:47 2021
+++ pkgsrc/graphics/fna3d/patches/patch-src_FNA3D__Driver__Vulkan.c     Sun Jan 24 19:03:47 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_FNA3D__Driver__Vulkan.c,v 1.1 2021/01/24 19:03:47 maya Exp $
+
+Match the headers in vulkan-headers
+
+--- src/FNA3D_Driver_Vulkan.c.orig     2021-01-01 16:22:56.000000000 +0000
++++ src/FNA3D_Driver_Vulkan.c
+@@ -4444,7 +4444,7 @@ static void VULKAN_INTERNAL_SubmitComman
+       /* Present, if applicable */
+       if (present && acquireSuccess)
+       {
+-              if (renderer->physicalDeviceDriverProperties.driverID == VK_DRIVER_ID_GGP_PROPRIETARY)
++              if (renderer->physicalDeviceDriverProperties.driverID == VK_DRIVER_ID_GGP_PROPRIETARY_KHR)
+               {
+                       const void* token = SDL_GetWindowData(
+                               (SDL_Window*) renderer->presentOverrideWindowHandle,



Home | Main Index | Thread Index | Old Index