From nobody Sat Aug 03 11:40:02 2024 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 4WbgjZ4tSPz5SJ5X; Sat, 03 Aug 2024 11:40:02 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbgjZ4MBlz40Dy; Sat, 3 Aug 2024 11:40:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722685202; 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=YC52U8TpnspQTnBOTiBcdBVOtolQFfKxNb/XDT6HAc8=; b=TNW7ynM02z7oG8qjK4DV2teRfDxWn21gQjLJXMmCwbmhYYz++zfK8Wir6/ncvoXZdfe/4p DsslQTTlsXsrIs9orm3TwpmvSo0/qI4Go7DvKexEZDD00sxyZAJashnM8rAC+g+4Ekinqb FvP4e4rYwV7Cs/GHeqBNQkCHGR9MDji+RemySvNcDT5yv035vtPOwZGvES+nsP7zkT01qv KTYkRKge0xrDatv8K4tOZs48w1iUEywSpciYIDMbEjANb6FQzru9+HTm8fVTLHEmPEQV6+ jsFIYHQQayiN7+fkIUH+z2qcmzM7fv9LDMicu5c+IaiubCtrNfPIMAK0SCo5ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722685202; a=rsa-sha256; cv=none; b=BuPDxfgZwBToUX0Xcf4tnYB51Je3OAneq9BdkcezrfNhD3e1Pw3D7JHCpftoTEFGMTw/qn M7jgCTbyF1P4/fQTvPzlProwfJYEr0CjQIIPNsDVXFZVEOuZT4+2PvQloR1Pr1wJg52CZM QO2IwrcNXBwD/THabNPtdireEODSl86XpeUyT3IcyDOaG4MhodN9L8pmxf1FR79cKROCac rfjWBIT9CwNe9S/PYqXU4yiIduX6hxjhipfA+8bRkG0/V4fQbhGmyh5loJo5C0N+9o3TjN PqV2sgarwmQ4fzykEr8ypXM9iEAL0KF43C7CcEDWfgkOqX6A65oFlStrMHKTyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722685202; 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=YC52U8TpnspQTnBOTiBcdBVOtolQFfKxNb/XDT6HAc8=; b=CLdAjWjF1RsYkSYm+VJKqo/KxipFCn8fsYEFACoAPjUfok7UapmavL6wFwaEWi5X7mnVD+ 1iq6CQ5oM/vfZhnQ8uQ8IJRqGLzNYTYp+B6S7fuad4u5OTd/OwlH3iUhkpP22DsV7o0ID3 3MITVQvly4he68amS9lG61l+BxtPCKcxiAWtWJKOnfEHF03wjBFhYI9kFmvyBu1JEX4pW2 v/SfPZDHTaodhSOqGNpJi/1Swarx5IGRJmmD+zQUTi4XD7cD08k30eqD7tt4YXTU72D1Qc K6ZjXCmU2yAfF/cRzaB/4DN/moR4Xbg3ZsGcffz3fHcsLDeB758E1RFSp8EWqw== 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 4WbgjZ3Yldz19Bj; Sat, 3 Aug 2024 11:40:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 473Be2aF013264; Sat, 3 Aug 2024 11:40:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473Be28l013259; Sat, 3 Aug 2024 11:40:02 GMT (envelope-from git) Date: Sat, 3 Aug 2024 11:40:02 GMT Message-Id: <202408031140.473Be28l013259@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Vladimir Druzenko Subject: git: af9050eeb8d0 - main - emulators/86Box: New port: low level x86 emulator based on PCem 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af9050eeb8d0c504ca1347398222f751bab6f329 Auto-Submitted: auto-generated The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=af9050eeb8d0c504ca1347398222f751bab6f329 commit af9050eeb8d0c504ca1347398222f751bab6f329 Author: gatekeeper AuthorDate: 2024-08-03 11:34:17 +0000 Commit: Vladimir Druzenko CommitDate: 2024-08-03 11:34:17 +0000 emulators/86Box: New port: low level x86 emulator based on PCem 86Box is a low level x86 emulator that runs older operating systems and software designed for IBM PC systems and compatibles from 1981 through fairly recent system designs based on the PCI bus. https://86box.net https://github.com/86Box/86Box PR: 280205 --- emulators/86Box/Makefile | 74 ++++++++++++++++++++++ emulators/86Box/distinfo | 3 + .../files/patch-cmake_flags-gcc-aarch64.cmake | 10 +++ .../86Box/files/patch-cmake_flags-gcc-armv7.cmake | 10 +++ .../files/patch-cmake_flags-gcc-x86__64.cmake | 12 ++++ emulators/86Box/files/patch-cmake_flags-gcc.cmake | 11 ++++ .../86Box/files/patch-src_printer_CMakeLists.txt | 10 +++ .../86Box/files/patch-src_qt_qt__mainwindow.cpp | 10 +++ emulators/86Box/pkg-descr | 3 + emulators/86Box/pkg-plist | 10 +++ emulators/Makefile | 1 + 11 files changed, 154 insertions(+) diff --git a/emulators/86Box/Makefile b/emulators/86Box/Makefile new file mode 100644 index 000000000000..8cae024dfbba --- /dev/null +++ b/emulators/86Box/Makefile @@ -0,0 +1,74 @@ +PORTNAME= 86Box +DISTVERSIONPREFIX= v +DISTVERSION= 4.2 +CATEGORIES= emulators + +MAINTAINER= tiago.gasiba@gmail.com +COMMENT= Emulator of x86-based machines based on PCem +WWW= https://86box.net/ + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +ONLY_FOR_ARCHS= amd64 + +BUILD_DEPENDS= evdev-proto>=5.8:devel/evdev-proto +LIB_DEPENDS= libevdev.so:devel/libevdev \ + libfluidsynth.so:audio/fluidsynth \ + libfreetype.so:print/freetype2 \ + libopenal.so:audio/openal-soft \ + libpng.so:graphics/png \ + librtmidi.so:audio/rtmidi \ + libslirp.so:net/libslirp \ + libsndfile.so:audio/libsndfile \ + libxkbcommon.so:x11/libxkbcommon + +FLAVORS= qt5 qt6 +FLAVOR?= ${FLAVORS:[2]} +qt5_PKGNAMESUFFIX= -qt5 +qt6_PKGNAMESUFFIX= -qt6 + +USES= cmake compiler gnome pkgconfig qmake sdl xorg +USE_GITHUB= yes +USE_GNOME= glib20 +USE_SDL= sdl2 +USE_XORG= x11 xcb xext xi + +.if ${FLAVOR} == qt5 +USES+= qt:5 +USE_QT= core gui network opengl widgets buildtools:build linguisttools:build +.else +BUILD_DEPENDS+= vulkan-headers>0:graphics/vulkan-headers +USES+= gl qt:6 +USE_GL= opengl +USE_QT= base tools:build +CMAKE_ON= USE_QT6 +CXXFLAGS+= -I${LOCALBASE}/include/qt6/QtGui/`pkg-config --modversion Qt6Gui`/QtGui +.endif + +OPTIONS_DEFINE= NLS WAYLAND +OPTIONS_DEFAULT= WAYLAND + +NLS_USES= gettext-runtime +NLS_CONFIGURE_ENABLE= nls + +WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland +WAYLAND_USES= kde:5 +WAYLAND_USE= kde=ecm:build +WAYLAND_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_Wayland:BOOL=ON + +ICON_RESOLUTIONS= 128x128 192x192 256x256 48x48 512x512 64x64 72x72 96x96 + +do-install: + ${INSTALL_PROGRAM} ${WRKDIR}/.build/src/86Box ${STAGEDIR}${PREFIX}/bin + ${REINPLACE_CMD} -e 's|Exec=86Box|Exec=/bin/sh -c "${PREFIX}/bin/86Box -C $${HOME}/86box.cfg"|' \ + ${WRKSRC}/src/unix/assets/net.86box.86Box.desktop + ${INSTALL_DATA} ${WRKSRC}/src/unix/assets/net.86box.86Box.desktop \ + ${STAGEDIR}${PREFIX}/share/applications +.for F in ${ICON_RESOLUTIONS} + ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${F}/apps + ${INSTALL_DATA} ${WRKSRC}/src/unix/assets/${F}/net.86box.86Box.png \ + ${STAGEDIR}${PREFIX}/share/icons/hicolor/${F}/apps +.endfor + +.include diff --git a/emulators/86Box/distinfo b/emulators/86Box/distinfo new file mode 100644 index 000000000000..95cede5345c6 --- /dev/null +++ b/emulators/86Box/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1722535296 +SHA256 (86Box-86Box-v4.2_GH0.tar.gz) = 891787580b67607490aa2257c0efa8b6a8afe954fa6fdb7c0db574caf307d615 +SIZE (86Box-86Box-v4.2_GH0.tar.gz) = 5297797 diff --git a/emulators/86Box/files/patch-cmake_flags-gcc-aarch64.cmake b/emulators/86Box/files/patch-cmake_flags-gcc-aarch64.cmake new file mode 100644 index 000000000000..3a58a593294f --- /dev/null +++ b/emulators/86Box/files/patch-cmake_flags-gcc-aarch64.cmake @@ -0,0 +1,10 @@ +--- cmake/flags-gcc-aarch64.cmake.orig 2024-07-26 18:14:45 UTC ++++ cmake/flags-gcc-aarch64.cmake +@@ -14,7 +14,4 @@ + # Copyright 2021 David Hrdlička. + # + +-string(APPEND CMAKE_C_FLAGS_INIT " -march=armv8-a") +-string(APPEND CMAKE_CXX_FLAGS_INIT " -march=armv8-a") +- + include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake) diff --git a/emulators/86Box/files/patch-cmake_flags-gcc-armv7.cmake b/emulators/86Box/files/patch-cmake_flags-gcc-armv7.cmake new file mode 100644 index 000000000000..5809748fa55e --- /dev/null +++ b/emulators/86Box/files/patch-cmake_flags-gcc-armv7.cmake @@ -0,0 +1,10 @@ +--- cmake/flags-gcc-armv7.cmake.orig 2024-07-26 18:16:08 UTC ++++ cmake/flags-gcc-armv7.cmake +@@ -14,7 +14,4 @@ + # Copyright 2021 David Hrdlička. + # + +-string(APPEND CMAKE_C_FLAGS_INIT " -march=armv7-a+fp -mfloat-abi=hard") +-string(APPEND CMAKE_CXX_FLAGS_INIT " -march=armv7-a+fp -mfloat-abi=hard") +- + include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake) diff --git a/emulators/86Box/files/patch-cmake_flags-gcc-x86__64.cmake b/emulators/86Box/files/patch-cmake_flags-gcc-x86__64.cmake new file mode 100644 index 000000000000..100bdd0cb47c --- /dev/null +++ b/emulators/86Box/files/patch-cmake_flags-gcc-x86__64.cmake @@ -0,0 +1,12 @@ +--- cmake/flags-gcc-x86_64.cmake.orig 2024-07-26 18:16:26 UTC ++++ cmake/flags-gcc-x86_64.cmake +@@ -14,7 +14,7 @@ + # Copyright 2021 David Hrdlička. + # + +-string(APPEND CMAKE_C_FLAGS_INIT " -m64 -march=x86-64 -msse2 -mfpmath=sse -mstackrealign") +-string(APPEND CMAKE_CXX_FLAGS_INIT " -m64 -march=x86-64 -msse2 -mfpmath=sse -mstackrealign") ++string(APPEND CMAKE_C_FLAGS_INIT " -mstackrealign") ++string(APPEND CMAKE_CXX_FLAGS_INIT " -mstackrealign") + + include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake) diff --git a/emulators/86Box/files/patch-cmake_flags-gcc.cmake b/emulators/86Box/files/patch-cmake_flags-gcc.cmake new file mode 100644 index 000000000000..d9b56c9c71ed --- /dev/null +++ b/emulators/86Box/files/patch-cmake_flags-gcc.cmake @@ -0,0 +1,11 @@ +--- cmake/flags-gcc.cmake.orig 2024-07-26 18:17:03 UTC ++++ cmake/flags-gcc.cmake +@@ -16,8 +16,6 @@ string(APPEND CMAKE_CXX_FLAGS_INIT " -fom + # Define our flags + string(APPEND CMAKE_C_FLAGS_INIT " -fomit-frame-pointer -Wall -fno-strict-aliasing -Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fomit-frame-pointer -Wall -fno-strict-aliasing") +-string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -g0 -O3") +-string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -g0 -O3") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -ggdb -Og") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -ggdb -Og") + string(APPEND CMAKE_C_FLAGS_OPTIMIZED_INIT " -march=native -mtune=native -O3 -ffp-contract=fast -flto") diff --git a/emulators/86Box/files/patch-src_printer_CMakeLists.txt b/emulators/86Box/files/patch-src_printer_CMakeLists.txt new file mode 100644 index 000000000000..a6da4a25f91e --- /dev/null +++ b/emulators/86Box/files/patch-src_printer_CMakeLists.txt @@ -0,0 +1,10 @@ +--- src/printer/CMakeLists.txt.orig 2024-08-02 00:15:09 UTC ++++ src/printer/CMakeLists.txt +@@ -29,6 +29,7 @@ target_link_libraries(86Box PkgConfig::FREETYPE) + find_package(PkgConfig REQUIRED) + pkg_check_modules(FREETYPE REQUIRED IMPORTED_TARGET freetype2) + target_link_libraries(86Box PkgConfig::FREETYPE) ++target_include_directories(print PRIVATE ${FREETYPE_INCLUDE_DIRS}) + if(STATIC_BUILD) + # if(QT) + # Qt provides its own version of harfbuzz which leads to duplicated symbols. diff --git a/emulators/86Box/files/patch-src_qt_qt__mainwindow.cpp b/emulators/86Box/files/patch-src_qt_qt__mainwindow.cpp new file mode 100644 index 000000000000..e6bbf8c52860 --- /dev/null +++ b/emulators/86Box/files/patch-src_qt_qt__mainwindow.cpp @@ -0,0 +1,10 @@ +--- src/qt/qt_mainwindow.cpp.orig 2024-08-02 00:15:09 UTC ++++ src/qt/qt_mainwindow.cpp +@@ -378,6 +378,7 @@ MainWindow::MainWindow(QWidget *parent) + + #if QT_CONFIG(vulkan) + bool vulkanAvailable = false; ++ if (0) + { + QVulkanInstance instance; + instance.setApiVersion(QVersionNumber(1, 0)); diff --git a/emulators/86Box/pkg-descr b/emulators/86Box/pkg-descr new file mode 100644 index 000000000000..7d5b9f1a6f35 --- /dev/null +++ b/emulators/86Box/pkg-descr @@ -0,0 +1,3 @@ +86Box is a low level x86 emulator that runs older operating systems +and software designed for IBM PC systems and compatibles from 1981 +through fairly recent system designs based on the PCI bus. diff --git a/emulators/86Box/pkg-plist b/emulators/86Box/pkg-plist new file mode 100644 index 000000000000..9dd5dc91a4a7 --- /dev/null +++ b/emulators/86Box/pkg-plist @@ -0,0 +1,10 @@ +bin/86Box +share/applications/net.86box.86Box.desktop +share/icons/hicolor/128x128/apps/net.86box.86Box.png +share/icons/hicolor/192x192/apps/net.86box.86Box.png +share/icons/hicolor/256x256/apps/net.86box.86Box.png +share/icons/hicolor/48x48/apps/net.86box.86Box.png +share/icons/hicolor/512x512/apps/net.86box.86Box.png +share/icons/hicolor/64x64/apps/net.86box.86Box.png +share/icons/hicolor/72x72/apps/net.86box.86Box.png +share/icons/hicolor/96x96/apps/net.86box.86Box.png diff --git a/emulators/Makefile b/emulators/Makefile index 8474e5a06209..e93755f0ec1c 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -1,5 +1,6 @@ COMMENT = Emulators for other operating systems + SUBDIR += 86Box SUBDIR += adamem SUBDIR += almostti SUBDIR += anese