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,192 +1,193 @@ COMMENT = Emulators for other operating systems + SUBDIR += 86Box SUBDIR += adamem SUBDIR += almostti SUBDIR += anese SUBDIR += aqemu SUBDIR += aranym SUBDIR += atari800 SUBDIR += bfe SUBDIR += bochs SUBDIR += bsvc SUBDIR += cannonball SUBDIR += catapult SUBDIR += cemu SUBDIR += cingb SUBDIR += citra SUBDIR += citra-qt5 SUBDIR += cpmtools SUBDIR += cpmtools2 SUBDIR += darcnes SUBDIR += dgen-sdl SUBDIR += dolphin-emu SUBDIR += dosbox SUBDIR += dosbox-staging SUBDIR += dosbox-x SUBDIR += dps8m SUBDIR += duckstation SUBDIR += dynamips-community SUBDIR += edumips64 SUBDIR += elliott-803 SUBDIR += emu64 SUBDIR += emulationstation SUBDIR += fceux SUBDIR += flexemu SUBDIR += fmsx SUBDIR += frodo SUBDIR += fs-uae SUBDIR += fs-uae-launcher SUBDIR += fuse SUBDIR += fuse-roms SUBDIR += fuse-utils SUBDIR += gbe SUBDIR += gens SUBDIR += gngb SUBDIR += gxemul SUBDIR += hatari SUBDIR += hercules SUBDIR += higan SUBDIR += hv_kvp_cmd SUBDIR += javatari SUBDIR += joytran SUBDIR += jzintv SUBDIR += klh10 SUBDIR += lib765 SUBDIR += libc6-shim SUBDIR += libdsk SUBDIR += libretro-bsnes SUBDIR += libretro-flycast SUBDIR += libretro-kronos SUBDIR += libretro-mame SUBDIR += libretro-pcsx2 SUBDIR += libretro-ppsspp SUBDIR += libretro-reicast SUBDIR += libretro-vice SUBDIR += libspectrum SUBDIR += linux-c7 SUBDIR += linux-power10-functional-sim SUBDIR += linux-power9-functional-sim SUBDIR += linux-rl9 SUBDIR += linux_base-c7 SUBDIR += linux_base-rl9 SUBDIR += magia SUBDIR += mame SUBDIR += mastergear SUBDIR += mednafen SUBDIR += mesen SUBDIR += mgba SUBDIR += mtools SUBDIR += mupen64plus SUBDIR += mupen64plus-audio-sdl SUBDIR += mupen64plus-core SUBDIR += mupen64plus-input-sdl SUBDIR += mupen64plus-plugins SUBDIR += mupen64plus-qt SUBDIR += mupen64plus-rsp-cxd4 SUBDIR += mupen64plus-rsp-hle SUBDIR += mupen64plus-rsp-z64 SUBDIR += mupen64plus-ui-console SUBDIR += mupen64plus-video-arachnoid SUBDIR += mupen64plus-video-glide64 SUBDIR += mupen64plus-video-glide64mk2 SUBDIR += mupen64plus-video-rice SUBDIR += mupen64plus-video-z64 SUBDIR += nemu SUBDIR += nestopia SUBDIR += o2em SUBDIR += ods2reader SUBDIR += open-simh SUBDIR += open-vm-tools SUBDIR += openmsx SUBDIR += p5-Acme-6502 SUBDIR += parallels-tools SUBDIR += pcem SUBDIR += pcemu SUBDIR += pcsx2 SUBDIR += playonbsd SUBDIR += ppsspp SUBDIR += ppsspp-qt5 SUBDIR += py-gns3-converter SUBDIR += py-m64py SUBDIR += py-unicorn SUBDIR += qemu SUBDIR += qemu-cheri SUBDIR += qemu-devel SUBDIR += qemu-powernv SUBDIR += qemu-user-static SUBDIR += qemu-user-static-devel SUBDIR += qemu8 SUBDIR += qmc2 SUBDIR += quasi88 SUBDIR += reicast SUBDIR += ripes SUBDIR += riscv-isa-sim SUBDIR += rpcs3 SUBDIR += rubygem-fission SUBDIR += sameboy SUBDIR += simh SUBDIR += simh-hp2100 SUBDIR += simh-hp3000 SUBDIR += simh-hpdoc SUBDIR += snes9x-gtk SUBDIR += spim SUBDIR += stella SUBDIR += stonx SUBDIR += teo SUBDIR += tic-80 SUBDIR += tiemu3 SUBDIR += tilem SUBDIR += tme SUBDIR += tnylpo SUBDIR += tpm-emulator SUBDIR += uae SUBDIR += ucon64 SUBDIR += uconvert SUBDIR += ukncbtl SUBDIR += unicorn SUBDIR += vba SUBDIR += vboxtool SUBDIR += vgb-bin SUBDIR += vgba-bin SUBDIR += vice SUBDIR += virtualbox-ose SUBDIR += virtualbox-ose-additions SUBDIR += virtualbox-ose-additions-legacy SUBDIR += virtualbox-ose-additions-nox11 SUBDIR += virtualbox-ose-additions-nox11-legacy SUBDIR += virtualbox-ose-kmod SUBDIR += virtualbox-ose-kmod-legacy SUBDIR += virtualbox-ose-legacy SUBDIR += virtualbox-ose-nox11 SUBDIR += virtualbox-ose-nox11-legacy SUBDIR += visualboyadvance-m SUBDIR += vmips SUBDIR += vmsbackup SUBDIR += vmw SUBDIR += vt100 SUBDIR += vxtools SUBDIR += wine SUBDIR += wine-devel SUBDIR += wine-gecko SUBDIR += wine-gecko-devel SUBDIR += wine-mono SUBDIR += wine-mono-devel SUBDIR += wine-proton SUBDIR += wine8 SUBDIR += winetricks SUBDIR += x16-emulator SUBDIR += x16-rom SUBDIR += x48 SUBDIR += x49gp SUBDIR += xbraitenberg SUBDIR += xcpc SUBDIR += xen-kernel SUBDIR += xhomer SUBDIR += xsystem35 SUBDIR += xzx SUBDIR += yaze-ag SUBDIR += yuzu SUBDIR += z80pack SUBDIR += zsnes .include