From nobody Thu May 18 08:20:35 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 4QMNFv73GCz3bMjq; Thu, 18 May 2023 08:20:35 +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 4QMNFv5sk7z3L8H; Thu, 18 May 2023 08:20:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684398035; 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=qCF+nrB9FzDphn1SUUZtTNU+7Y2Pci9zCrMRgh6PtU8=; b=qGvzrj39drY0tqxlReXSZOlliBUDv1rkJbliCHkYoPp5420663LK83mBucagz+cXeU4/Uy CGFsdTv/mwJrGvnEVa9VtbkBrnbrBZqmQqqQt7wW0vgVweX0eHo4lRWzvrTqYKL0JXSPoo FR8l+ncBJEwSc8qBhdJuw5bSqKkhqUefdVs1ihOdz4a4Fw5dJo64wNtlqe3wxlkhiWEaa6 gbstPLRbUG1jseUayRp22/DePQo1VYzl8svKeYySBEJc05xcrLQKRxdWIAr+ifffX84diT f7JWvmjpP84c4h5+KwnZNXTCZzngwG9OlxcwSG5EQ8pXT9r1N0KgX5g2OFcn5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684398035; 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=qCF+nrB9FzDphn1SUUZtTNU+7Y2Pci9zCrMRgh6PtU8=; b=yYR+rXBuKqqs2pdUlbvR1+O93niyGuF0d41x1+GgTAm610d6Knwv4pBw8K2xZg1Z29+jtR daeP2USIyq2t/Y3hJ4ity5D38UDUCu6xTW/ZQAvom9Sfm4um48w+vGewHuopYCjwswTiYa LxZ1nAeC1HAasu/uwkmfQUgAaIw4jPVC31wJQGLFLKidheKRhDNduqx8QrfiwdubsPaY4N BeNaM8wr+re5pxJvRRnBp52gxUsabIuFy8s9rbRj8hhLQ4zZekfWYHGru3gDdVPfIoNrZm VnG7V80B6J0xX1sRXea+C8457EjuRqziL3+qcTcKBeaICT9J03AvST4FGXTMqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684398035; a=rsa-sha256; cv=none; b=Lp7BSqNL3pnuKvKa5rxB+QPgNaF8I6n8oIm9TpnQcKtYy9B+/Ph9FMjiRFX3gsaZV8xOW2 B99dpYFEs1Jbmg2zmLX9J5BjADO4NdsgEs3Q/+FreZrWXfY3cRXmn39UgKsu0P8Twz1nbR Z9k6r3tMqp+16mo85N8phCR421QiC2LcXwCTy5IQT9LKzPkMEs6wnQ1HN4GuRO2S626Tg1 LRgb+2g+V5r5N9ckbwReySQP+pLXwd7nYl0Ugyu326Y/3cT+fn7uN7bp1oZWN9lCOg7P5G f8kOZ9ebnD5+59Lhnvd2szjSstgw9kxopnOX0Hwr4nRRhcCIhSZ1HH6PuF5mLA== 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 4QMNFv4Llbzf9x; Thu, 18 May 2023 08:20:35 +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 34I8KZaK056534; Thu, 18 May 2023 08:20:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34I8KZAZ056533; Thu, 18 May 2023 08:20:35 GMT (envelope-from git) Date: Thu, 18 May 2023 08:20:35 GMT Message-Id: <202305180820.34I8KZAZ056533@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 4e1ba94dcb85 - main - emulators/tic-80: support graphics/sdl2_gpu 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: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e1ba94dcb8507b747b02390366ee96cf70bb812 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=4e1ba94dcb8507b747b02390366ee96cf70bb812 commit 4e1ba94dcb8507b747b02390366ee96cf70bb812 Author: Robert Clausecker AuthorDate: 2023-05-15 16:55:34 +0000 Commit: Robert Clausecker CommitDate: 2023-05-18 08:19:44 +0000 emulators/tic-80: support graphics/sdl2_gpu Now that we've ported this library, wire it into the options. See also: https://github.com/nesbox/TIC-80/issues/2189 --- emulators/tic-80/Makefile | 10 ++- emulators/tic-80/files/patch-CMakeLists.txt | 108 +++++++++++++++++++++++++--- 2 files changed, 104 insertions(+), 14 deletions(-) diff --git a/emulators/tic-80/Makefile b/emulators/tic-80/Makefile index aef7b6644073..152ad29b2e60 100644 --- a/emulators/tic-80/Makefile +++ b/emulators/tic-80/Makefile @@ -1,6 +1,7 @@ PORTNAME= TIC-80 DISTVERSIONPREFIX= v DISTVERSION= 1.0.2164 +PORTREVISION= 1 CATEGORIES= emulators games MAINTAINER= fuz@FreeBSD.org @@ -45,20 +46,23 @@ USE_SDL= sdl2 # nodejs:http-parser:ec8b5ee63f0e51191ea43bb0c6eac7bfbff3141d:http_parser/vendor/http-parser # glennrp:libpng:dbe3e0c43e549a1602286144d94b0666549b18e6:libpng/vendor/libpng # libsdl-org:SDL:b424665e0899769b200231ba943353a5fee1b6b6:sdl2/vendor/sdl2 +# grimfang4:sdl-gpu:e3d350b325a0e0d0b3007f69ede62313df46c6ef:sdl_gpu/vendor/sdl-gpu # not actually needed # smuehlst:circle-stdlib:fdb3c4a948421d47fddab8042a92f980cba43915:circle_stdlib/vendor/circle-stdlib # floooh:sokol:487822d82ca79dba7b67718d962e1ba6beef01b2:sokol/vendor/sokol -# grimfang4:sdl-gpu:e3d350b325a0e0d0b3007f69ede62313df46c6ef:sdl_gpu/vendor/sdl-gpu # mruby:mruby:0f45836b5954accf508f333f932741b925214471:mruby/vendor/mruby # the demo carts are built, but don't seem to end up being installed # mruby: to be decided later; not essential CMAKE_OFF= BUILD_DEMO_CARTS BUILD_WITH_MRUBY BUILD_LIBRETRO -CMAKE_ARGS= -DLPEG_LIBRARY:STRING=${LUA_REFMODLIBDIR}/lpeg.so -OPTIONS_DEFINE= PRO +OPTIONS_DEFINE= PRO SDLGPU +OPTIONS_DEFAULT= SDLGPU PRO_DESC= Build PRO Version +SDLGPU_DESC= Support sdl-gpu through graphics/sdl2_gpu PRO_CMAKE_BOOL= BUILD_PRO +SDLGPU_LIB_DEPENDS= libSDL2_gpu.so:graphics/sdl2_gpu +SDLGPU_CMAKE_BOOL= BUILD_SDLGPU .include diff --git a/emulators/tic-80/files/patch-CMakeLists.txt b/emulators/tic-80/files/patch-CMakeLists.txt index edf75cac6331..3ae76ab51d8e 100644 --- a/emulators/tic-80/files/patch-CMakeLists.txt +++ b/emulators/tic-80/files/patch-CMakeLists.txt @@ -348,16 +348,88 @@ endif() if(BUILD_PRO) -@@ -982,7 +823,7 @@ if(ANDROID) - endif() +@@ -914,80 +755,6 @@ endif() + target_compile_definitions(tic80studio PUBLIC BUILD_EDITORS) - if(NOT EMSCRIPTEN) + ################################ +-# SDL GPU +-################################ +- +-if(BUILD_SDLGPU) +- +-set(SDLGPU_DIR ${THIRDPARTY_DIR}/sdl-gpu/src) +-set(SDLGPU_SRC +- ${SDLGPU_DIR}/renderer_GLES_2.c +- ${SDLGPU_DIR}/SDL_gpu.c +- ${SDLGPU_DIR}/SDL_gpu_matrix.c +- ${SDLGPU_DIR}/SDL_gpu_renderer.c +- ${SDLGPU_DIR}/externals/stb_image/stb_image.c +- ${SDLGPU_DIR}/externals/stb_image_write/stb_image_write.c +-) +- +-if(NOT ANDROID) +- list(APPEND SDLGPU_SRC +- ${SDLGPU_DIR}/renderer_GLES_1.c +- ${SDLGPU_DIR}/renderer_GLES_3.c +- ${SDLGPU_DIR}/renderer_OpenGL_1.c +- ${SDLGPU_DIR}/renderer_OpenGL_1_BASE.c +- ${SDLGPU_DIR}/renderer_OpenGL_2.c +- ${SDLGPU_DIR}/renderer_OpenGL_3.c +- ${SDLGPU_DIR}/renderer_OpenGL_4.c +- ${SDLGPU_DIR}/SDL_gpu_shapes.c +- ${SDLGPU_DIR}/externals/glew/glew.c +- ) +-endif() +- +-add_library(sdlgpu STATIC ${SDLGPU_SRC}) +- +-if(EMSCRIPTEN OR ANDROID) +- target_compile_definitions(sdlgpu PRIVATE GLEW_STATIC SDL_GPU_DISABLE_GLES_1 SDL_GPU_DISABLE_GLES_3 SDL_GPU_DISABLE_OPENGL) +-else() +- target_compile_definitions(sdlgpu PRIVATE GLEW_STATIC SDL_GPU_DISABLE_GLES SDL_GPU_DISABLE_OPENGL_3 SDL_GPU_DISABLE_OPENGL_4) +-endif() +- +-target_include_directories(sdlgpu PUBLIC ${THIRDPARTY_DIR}/sdl-gpu/include) +-target_include_directories(sdlgpu PRIVATE ${THIRDPARTY_DIR}/sdl-gpu/src/externals/glew) +-target_include_directories(sdlgpu PRIVATE ${THIRDPARTY_DIR}/sdl-gpu/src/externals/glew/GL) +-target_include_directories(sdlgpu PRIVATE ${THIRDPARTY_DIR}/sdl-gpu/src/externals/stb_image) +-target_include_directories(sdlgpu PRIVATE ${THIRDPARTY_DIR}/sdl-gpu/src/externals/stb_image_write) +- +-if(WIN32) +- target_link_libraries(sdlgpu opengl32) +-endif() +- +-if(LINUX) +- target_link_libraries(sdlgpu GL) +-endif() +- +-if(APPLE) +- find_library(OPENGL_LIBRARY OpenGL) +- target_link_libraries(sdlgpu ${OPENGL_LIBRARY}) +-endif() +- +-if(ANDROID) +- find_library( ANDROID_LOG_LIBRARY log ) +- find_library( ANDROID_GLES2_LIBRARY GLESv2 ) +- find_library( ANDROID_GLES1_LIBRARY GLESv1_CM ) +- target_link_libraries(sdlgpu +- ${ANDROID_LOG_LIBRARY} +- ${ANDROID_GLES2_LIBRARY} +- ${ANDROID_GLES1_LIBRARY} +- ) +-endif() +- +-if(NOT EMSCRIPTEN) - target_link_libraries(sdlgpu SDL2-static) -+ target_link_libraries(sdlgpu ${SDL2_LIBRARIES}) - endif() +-endif() +- +-endif() +- +-################################ + # TIC-80 app + ################################ - endif() -@@ -1028,7 +869,7 @@ if(BUILD_SDL) +@@ -1028,7 +795,7 @@ if(BUILD_SDL) endif() elseif(NOT ANDROID) @@ -366,7 +438,14 @@ endif() target_link_libraries(tic80 tic80studio) -@@ -1050,7 +891,7 @@ if(BUILD_SDL) +@@ -1044,13 +811,13 @@ if(BUILD_SDL) + endif() + + if(BUILD_SDLGPU) +- target_link_libraries(tic80 sdlgpu) ++ target_link_libraries(tic80 SDL2_gpu) + else() + if(EMSCRIPTEN) elseif(RPI) target_link_libraries(tic80 libSDL2.a bcm_host) else() @@ -375,7 +454,7 @@ endif() endif() -@@ -1121,7 +962,7 @@ if(N3DS) +@@ -1121,7 +888,7 @@ if(N3DS) ${CMAKE_SOURCE_DIR}/src) target_link_directories(tic80_n3ds PRIVATE ${DEVKITPRO}/libctru/lib ${DEVKITPRO}/portlibs/3ds/lib) @@ -384,7 +463,7 @@ add_custom_command(TARGET tic80_n3ds POST_BUILD -@@ -1181,7 +1022,7 @@ if(BUILD_STUB) +@@ -1181,7 +948,7 @@ if(BUILD_STUB) endif() else() @@ -393,7 +472,14 @@ endif() target_link_libraries(tic80${SCRIPT} tic80core${SCRIPT} argparse) -@@ -1199,7 +1040,7 @@ if(BUILD_STUB) +@@ -1193,13 +960,13 @@ if(BUILD_STUB) + endif() + + if(BUILD_SDLGPU) +- target_link_libraries(tic80${SCRIPT} sdlgpu) ++ target_link_libraries(tic80${SCRIPT} SDL2_gpu) + else() + if(EMSCRIPTEN) elseif(RPI) target_link_libraries(tic80${SCRIPT} libSDL2.a bcm_host pthread dl) else()