From nobody Thu May 19 17:44:05 2022 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 E01511AED499; Thu, 19 May 2022 17:44:06 +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 4L3y061s8wz3mGM; Thu, 19 May 2022 17:44:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652982246; 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=kLmNYvfuxKWImfA5j7i/XQ9vdW+GnEKmJK1Qkf0Z3v8=; b=ZZfLEWTJZpoKKfFEJgaRS1zHiqdWyihUMX2XoHrzeMcsFGGvXjrDJTiPRrSXD74qjvNZDL lI38L8fLB1VfFpz0kzAciddZ4eifhnrI2Al+qXO/NhC1SzTB1n4kZyBQyidMfUI/mO6eDp 3ZU8KH8GZjC2zMmHFSdodVRJtYgRo46C8Rp+eQLVkUW2TeQBzCh4mmwLeg/KkX+r3mLyYh ILRx4KmeczG91NPsmFcUE0CB7uX+krFfESmGMdvzcFYQNb1jhWzBnHsH83dCRSVamZVWIw qAPn6sIevQJYGRKGJfoGyLOJyQyTsX7TsH/Z7qtv1Dzep/CSGNgq1iFboJ9KMQ== 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 F07002240F; Thu, 19 May 2022 17:44:05 +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 24JHi5Kw028926; Thu, 19 May 2022 17:44:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24JHi5kI028925; Thu, 19 May 2022 17:44:05 GMT (envelope-from git) Date: Thu, 19 May 2022 17:44:05 GMT Message-Id: <202205191744.24JHi5kI028925@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Neel Chauhan Subject: git: e4ef39490253 - main - emulators/reicast: New port: Multi-platform Sega Dreamcast emulator 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: nc X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4ef394902532240899a3c3f5c6968c4eade9be8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652982246; 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=kLmNYvfuxKWImfA5j7i/XQ9vdW+GnEKmJK1Qkf0Z3v8=; b=vNyRXgHeaG+PO52gKXlqHUiyO8vPuAKZYzXGUUdZhHgCzoBjc3NJejJ8LtiPq5u0yNklBh 6Im9XGCv9KLvIQZDo/S6q3B3beGaJxRtYgRp864BkqDZJFcqLmZvY1SXKi5c790bTpwQ6t th3aF4GxnEkRWYiVcHDHW+H+XUFkD0hyPWZmtWPWTSqGjHTIrYFdjHSejxdFpLNawsGwAb VlRoaw+I84SUgBKbTO2iWg4OFK6I2mP+nSIZ9HzJVt0N80Q1xtUMf/+uz/SP0CBtt38kxT hHIJDbaNnWp21PUEPZjBUu5cgdub2/XlDAGGKMXIwqzD7cx0UQo9aPJnwsQDCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652982246; a=rsa-sha256; cv=none; b=UF8HIeNHiUO8RJR00sDcFro8xQgdjhPsTB7tmGzDgVitPmUCqxmccLfhsI4vHC6eg0ChpW U5DhiMAp3voKDcaVFTvYriYGobbPFdzwmBhsZzpzmUdM2WXKkM0nbzYTfvfDyFdxx21EPO hOOrjxPFpNyPSNeMzVHgbc846WsvNoEAk8mMLnaA3fcx5eINDp0ZafMg+QncNw1VSiQ0nu q2Wg+26oapbIWy3cPewPG1ufin6Z/QKAytKGWLfK/0ZylKAKaYqYoOAZYzdCe5BhwDCAVW wigHhHXoCFBPl4kifL433TL5fuDCcRuJw5Wj94CZxiJcEGbLNOlJ9BquTXnOvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by nc: URL: https://cgit.FreeBSD.org/ports/commit/?id=e4ef394902532240899a3c3f5c6968c4eade9be8 commit e4ef394902532240899a3c3f5c6968c4eade9be8 Author: Timothy Beyer AuthorDate: 2022-05-17 03:53:46 +0000 Commit: Neel Chauhan CommitDate: 2022-05-19 17:43:57 +0000 emulators/reicast: New port: Multi-platform Sega Dreamcast emulator PR: 252193 --- emulators/Makefile | 1 + emulators/reicast/Makefile | 44 ++++++++++++++++++++++ emulators/reicast/distinfo | 3 ++ emulators/reicast/files/patch-CMakeLists.txt | 11 ++++++ .../patch-libswirl_gui_gui__settings__about.cpp | 25 ++++++++++++ .../files/patch-libswirl_linux-dist_main.cpp | 10 +++++ .../reicast/files/patch-libswirl_linux_common.cpp | 42 +++++++++++++++++++++ .../reicast/files/patch-reicast_cmake_config.cmake | 16 ++++++++ emulators/reicast/pkg-descr | 3 ++ 9 files changed, 155 insertions(+) diff --git a/emulators/Makefile b/emulators/Makefile index 7ef793c3977f..2f85a9ca18de 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -114,6 +114,7 @@ SUBDIR += qemu6 SUBDIR += qmc2 SUBDIR += quasi88 + SUBDIR += reicast SUBDIR += ripes SUBDIR += riscv-isa-sim SUBDIR += rpcs3 diff --git a/emulators/reicast/Makefile b/emulators/reicast/Makefile new file mode 100644 index 000000000000..d6a317efb18f --- /dev/null +++ b/emulators/reicast/Makefile @@ -0,0 +1,44 @@ +# Created by: Timothy Beyer + +PORTNAME= reicast +PORTVERSION= 0.20201231 +CATEGORIES= emulators games + +MAINTAINER= beyert@cs.ucr.edu +COMMENT= Multi-platform Sega Dreamcast emulator + +LICENSE= BSD3CLAUSE GPLv2 LGPL21 +LICENSE_COMB= multi +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libao.so:audio/libao \ + libasound.so:audio/alsa-lib \ + libcurl.so:ftp/curl \ + libevdev.so:devel/libevdev \ + libpulse.so:audio/pulseaudio \ + libudev.so:devel/libudev-devd + +USES= cmake compiler gl xorg +USE_GCC= yes +USE_LDCONFIG= yes +CMAKE_ARGS= -DOPENGL_EGL_INCLUDE_DIR:PATH=${LOCALBASE}/include/EGL \ + -DOPENGL_GLX_INCLUDE_DIR:PATH=${LOCALBASE}/include/GL \ + -DOPENGL_INCLUDE_DIR:PATH=${LOCALBASE}/include/GL \ + -DOPENGL_opengl_LIBRARY:PATH=${LOCALBASE}/lib/libGL.so + +USE_GITHUB= yes +GH_ACCOUNT= reicast +GH_PROJECT= reicast-emulator +GH_TAGNAME= 0bd6ea3 + +USE_XORG= ice sm x11 xext +USE_GL= egl gbm gl + +PLIST_FILES= bin/reicast + +do-install: + ${INSTALL} ${WRKDIR}/.build/${PORTNAME} \ + ${STAGEDIR}/${PREFIX}/bin/${PORTNAME}; + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + +.include diff --git a/emulators/reicast/distinfo b/emulators/reicast/distinfo new file mode 100644 index 000000000000..9ade18ae5b8a --- /dev/null +++ b/emulators/reicast/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1623465538 +SHA256 (reicast-reicast-emulator-0.20201231-0bd6ea3_GH0.tar.gz) = a30e67754c28029e16cf2eb3d3878906888178e308800139e64e8e29533bc679 +SIZE (reicast-reicast-emulator-0.20201231-0bd6ea3_GH0.tar.gz) = 6467649 diff --git a/emulators/reicast/files/patch-CMakeLists.txt b/emulators/reicast/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..5532f40fde80 --- /dev/null +++ b/emulators/reicast/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2020-08-21 20:26:50 UTC ++++ CMakeLists.txt +@@ -431,6 +431,8 @@ if(${HOST_OS} EQUAL ${OS_DARWIN}) + + endif() + ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.1") ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1") + + if(DEBUG_CMAKE) + message(" ------------------------------------------------") diff --git a/emulators/reicast/files/patch-libswirl_gui_gui__settings__about.cpp b/emulators/reicast/files/patch-libswirl_gui_gui__settings__about.cpp new file mode 100644 index 000000000000..22d8576fbe7f --- /dev/null +++ b/emulators/reicast/files/patch-libswirl_gui_gui__settings__about.cpp @@ -0,0 +1,25 @@ +--- libswirl/gui/gui_settings_about.cpp.orig 2020-08-21 20:26:50 UTC ++++ libswirl/gui/gui_settings_about.cpp +@@ -40,13 +40,13 @@ void gui_settings_about() + { + ImGui::Text("CPU: %s", + #if HOST_CPU == CPU_X86 +- "x86" ++ "i386" + #elif HOST_CPU == CPU_ARM + "ARM" + #elif HOST_CPU == CPU_MIPS + "MIPS" + #elif HOST_CPU == CPU_X64 +- "x86/64" ++ "amd64" + #elif HOST_CPU == CPU_GENERIC + "Generic" + #elif HOST_CPU == CPU_ARM64 +@@ -88,4 +88,4 @@ void gui_settings_about() + ImGui::PopStyleVar(); + ImGui::EndTabItem(); + } +-} +\ No newline at end of file ++} diff --git a/emulators/reicast/files/patch-libswirl_linux-dist_main.cpp b/emulators/reicast/files/patch-libswirl_linux-dist_main.cpp new file mode 100644 index 000000000000..a0e4638bf5b9 --- /dev/null +++ b/emulators/reicast/files/patch-libswirl_linux-dist_main.cpp @@ -0,0 +1,10 @@ +--- libswirl/linux-dist/main.cpp.orig 2020-08-21 20:26:50 UTC ++++ libswirl/linux-dist/main.cpp +@@ -22,7 +22,6 @@ + #include "hw/sh4/dyna/blockmanager.h" + #include "hw/maple/maple_cfg.h" + #include +-#include + + #include "libswirl.h" + #include "hw/pvr/Renderer_if.h" diff --git a/emulators/reicast/files/patch-libswirl_linux_common.cpp b/emulators/reicast/files/patch-libswirl_linux_common.cpp new file mode 100644 index 000000000000..147dd36e4224 --- /dev/null +++ b/emulators/reicast/files/patch-libswirl_linux_common.cpp @@ -0,0 +1,42 @@ +--- libswirl/linux/common.cpp.orig 2020-08-21 20:26:50 UTC ++++ libswirl/linux/common.cpp +@@ -22,6 +22,12 @@ + #include + #if HOST_OS == OS_DARWIN + #import ++ #elif defined(__FreeBSD__) ++ #include ++ #include ++ #include ++ #include ++ #include + #else + #include + #endif +@@ -33,7 +39,7 @@ + #include + #include + #include +-#if !defined(TARGET_BSD) && !defined(TARGET_IPHONE) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64) ++#if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(TARGET_IPHONE) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64) + #include + #include + #endif +@@ -294,7 +300,7 @@ void enable_runfast() + } + + void linux_fix_personality() { +- #if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) ++ #if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) + printf("Personality: %08X\n", personality(0xFFFFFFFF)); + personality(~READ_IMPLIES_EXEC & personality(0xFFFFFFFF)); + printf("Updated personality: %08X\n", personality(0xFFFFFFFF)); +@@ -302,7 +308,7 @@ void linux_fix_personality() { + } + + void linux_rpi2_init() { +-#if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE) ++#if !defined(__FreeBSD__) && !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE) + void* handle; + void (*rpi_bcm_init)(void); + diff --git a/emulators/reicast/files/patch-reicast_cmake_config.cmake b/emulators/reicast/files/patch-reicast_cmake_config.cmake new file mode 100644 index 000000000000..4fa4fed8b020 --- /dev/null +++ b/emulators/reicast/files/patch-reicast_cmake_config.cmake @@ -0,0 +1,16 @@ +--- reicast/cmake/config.cmake.orig 2020-08-21 20:26:50 UTC ++++ reicast/cmake/config.cmake +@@ -106,11 +106,13 @@ endif() + # AMD64/x86_64:x64, i*86:x86, ppc/powerpc[64][b|l]e:ppc[64] etc + # + if(("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686") OR ++ ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i386") OR + ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "X86")) # todo: check MATCHES "i.86" ? + set(host_arch "x86") + set(HOST_CPU ${CPU_X86}) + # + elseif(("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64") OR ++ ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64") OR + ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") OR + ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x64")) + set(host_arch "x64") diff --git a/emulators/reicast/pkg-descr b/emulators/reicast/pkg-descr new file mode 100644 index 000000000000..4d95aa12b593 --- /dev/null +++ b/emulators/reicast/pkg-descr @@ -0,0 +1,3 @@ +Reicast is a multi-platform Sega Dreamcast emulator. + +WWW: https://github.com/reicast/reicast-emulator