FreeBSD Bugzilla – Attachment 268424 Details for
Bug 293507
[new port] emulators/einstein-newton: Apple Newton Emulator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to create new emulators/einstein-newton port
0001-emulators-einstein-newton-New-port.patch (text/plain), 13.60 KB, created by
Laurent Chardon
on 2026-02-28 19:39:33 UTC
(
hide
)
Description:
Patch to create new emulators/einstein-newton port
Filename:
MIME Type:
Creator:
Laurent Chardon
Created:
2026-02-28 19:39:33 UTC
Size:
13.60 KB
patch
obsolete
>From 5538a4a4d23e633eb6febef35ce0385110db8d19 Mon Sep 17 00:00:00 2001 >From: Laurent Chardon <laurent.chardon@gmail.com> >Date: Sat, 21 Feb 2026 11:58:36 -0500 >Subject: [PATCH] emulators/einstein-newton: New port > >--- > emulators/einstein-newton/Makefile | 50 +++++++++++ > emulators/einstein-newton/distinfo | 7 ++ > .../files/patch-CMakeLists.txt | 86 +++++++++++++++++++ > .../patch-Emulator_NativeCalls_CMakeLists.txt | 11 +++ > .../patch-Emulator_Serial_CMakeLists.txt | 11 +++ > .../files/patch-Emulator_Sound_CMakeLists.txt | 11 +++ > .../files/patch-newt64-src_CMakeLists.txt | 81 +++++++++++++++++ > emulators/einstein-newton/pkg-descr | 3 + > 8 files changed, 260 insertions(+) > create mode 100644 emulators/einstein-newton/Makefile > create mode 100644 emulators/einstein-newton/distinfo > create mode 100644 emulators/einstein-newton/files/patch-CMakeLists.txt > create mode 100644 emulators/einstein-newton/files/patch-Emulator_NativeCalls_CMakeLists.txt > create mode 100644 emulators/einstein-newton/files/patch-Emulator_Serial_CMakeLists.txt > create mode 100644 emulators/einstein-newton/files/patch-Emulator_Sound_CMakeLists.txt > create mode 100644 emulators/einstein-newton/files/patch-newt64-src_CMakeLists.txt > create mode 100644 emulators/einstein-newton/pkg-descr > >diff --git a/emulators/einstein-newton/Makefile b/emulators/einstein-newton/Makefile >new file mode 100644 >index 000000000000..24385760f3bc >--- /dev/null >+++ b/emulators/einstein-newton/Makefile >@@ -0,0 +1,50 @@ >+PORTNAME= einstein-newton >+DISTVERSIONPREFIX= v >+DISTVERSION= 2025.12.19 >+CATEGORIES= emulators >+ >+MAINTAINER= laurent.chardon@gmail.com >+COMMENT= Apple Newton Emulator >+WWW= https://github.com/pguyot/Einstein >+ >+LICENSE= GPLv2+ >+LICENSE_FILE= ${WRKSRC}/LICENSE >+ >+BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto >+LIB_DEPENDS= libffi.so:devel/libffi \ >+ libfontconfig.so:x11-fonts/fontconfig \ >+ libpulse.so:audio/pulseaudio >+ >+USES= bison cmake compiler:c++17-lang desktop-file-utils \ >+ shared-mime-info xorg >+USE_GITHUB= yes >+GH_ACCOUNT= pguyot >+GH_PROJECT= Einstein >+GH_TUPLE= fltk:fltk:release-1.4.4:fltk/fltk-src \ >+ MatthiasWM:NEWT64:d1a1aa1:newt64/newt64-src >+USE_XORG= ice sm x11 xcursor xext xfixes xinerama xft xrender >+ >+CMAKE_ARGS= -DCMAKE_BUILD_TYPE=Release >+ >+ALL_TARGET= Einstein >+TEST_TARGET= test >+ >+PLIST_FILES= bin/Einstein >+ >+PORTDOCS= * >+OPTIONS_DEFINE= DOCS >+ >+post-extract: >+ ${MKDIR} ${WRKDIR}/.build/_deps >+ ${RLN} ${WRKSRC_fltk} ${WRKDIR}/.build/_deps/fltk-src >+ ${RLN} ${WRKSRC_newt64} ${WRKDIR}/.build/_deps/newt64-src >+ >+do-install: >+ @${MKDIR} ${STAGEDIR}${PREFIX}/bin >+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/Einstein ${STAGEDIR}${PREFIX}/bin/Einstein >+ >+post-install-DOCS-on: >+ @${MKDIR} ${STAGEDIR}${DOCSDIR} >+ (cd ${WRKSRC}/Documentation && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) >+ >+.include <bsd.port.mk> >diff --git a/emulators/einstein-newton/distinfo b/emulators/einstein-newton/distinfo >new file mode 100644 >index 000000000000..e0374206dbfd >--- /dev/null >+++ b/emulators/einstein-newton/distinfo >@@ -0,0 +1,7 @@ >+TIMESTAMP = 1771678463 >+SHA256 (pguyot-Einstein-v2025.12.19_GH0.tar.gz) = e2bd3d6eb4d5a0c6bf600c5546845335abef2002fec8e2ec8081a2f40c9b3383 >+SIZE (pguyot-Einstein-v2025.12.19_GH0.tar.gz) = 9409929 >+SHA256 (fltk-fltk-release-1.4.4_GH0.tar.gz) = cbf5f7846af596206e8e4489e14c9981f98d7b37168110a00dcd26d8d479a669 >+SIZE (fltk-fltk-release-1.4.4_GH0.tar.gz) = 9114031 >+SHA256 (MatthiasWM-NEWT64-d1a1aa1_GH0.tar.gz) = e69de1706d42c8e9f25c8df14380daa725d2a2f40a2c53631e24738b2640603d >+SIZE (MatthiasWM-NEWT64-d1a1aa1_GH0.tar.gz) = 506404 >diff --git a/emulators/einstein-newton/files/patch-CMakeLists.txt b/emulators/einstein-newton/files/patch-CMakeLists.txt >new file mode 100644 >index 000000000000..7a61c2208eb6 >--- /dev/null >+++ b/emulators/einstein-newton/files/patch-CMakeLists.txt >@@ -0,0 +1,86 @@ >+--- CMakeLists.txt.orig 2025-12-19 16:57:53 UTC >++++ CMakeLists.txt >+@@ -56,6 +56,10 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) >+ >+ # Linux: nothing to do here >+ >++elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD" ) >++ >++ # FreeBSD and NetBSD: nothing to do here >++ >+ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" ) >+ >+ set_property ( GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1 ) >+@@ -423,7 +427,7 @@ if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" ) >+ ) >+ endif () >+ >+-elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" ) >++elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$" ) >+ >+ # create the application >+ add_executable ( Einstein >+@@ -443,17 +447,22 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CM >+ # how to compile and link >+ target_compile_options ( Einstein PUBLIC >+ -Wall -Wno-multichar -Wno-misleading-indentation -Wno-unused-result >+- -Wno-missing-field-initializers -Wno-stringop-truncation # -Werror >++ -Wno-missing-field-initializers # -Werror >+ # Werror is disabled for testing purposes. Must reenable as soon as all Linux warnings are fixed. >+ ) >+ target_compile_options ( EinsteinTests PUBLIC >+ -Wall -Wno-multichar -Wno-misleading-indentation -Wno-unused-result >+- -Wno-missing-field-initializers -Wno-stringop-truncation -Werror >++ -Wno-missing-field-initializers -Werror >+ ) >+ target_compile_options ( EinsteinFLGUI PUBLIC >+ -Wall -Wno-multichar -Wno-misleading-indentation -Wno-unused-result >+- -Wno-missing-field-initializers -Wno-stringop-truncation -Werror >++ -Wno-missing-field-initializers -Werror >+ ) >++ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") >++ target_compile_options(Einstein PUBLIC -Wno-stringop-truncation) >++ target_compile_options(EinsteinTests PUBLIC -Wno-stringop-truncation) >++ target_compile_options(EinsteinFLGUI PUBLIC -Wno-stringop-truncation) >++ endif() >+ target_compile_definitions ( Einstein PRIVATE >+ TARGET_UI_FLTK=1 TARGET_OS_LINUX=1 >+ ) >+@@ -479,8 +488,8 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CM >+ fltk::fltk fltk::images fltk::png fltk::z >+ ) >+ >+- if ( ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" ) >+- # Under OpenBSD, libffi is in ports (i.e. /usr/local) not base (i.e. /usr) >++ if ( ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$" ) >++ # Under BSD, libffi is in ports (i.e. /usr/local) not base (i.e. /usr) >+ find_library ( ffi_lib NAMES ffi ) >+ find_file ( ffi_incl NAMES ffi.h ) >+ if ( ffi_lib MATCHES ".*NOTFOUND" OR ffi_incl MATCHES ".*NOTFOUND" ) >+@@ -493,7 +502,7 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CM >+ target_link_libraries ( Einstein ${ffi_lib} ) >+ endif () >+ >+- # Under OpenBSD, pulseaudio is in ports (i.e. /usr/local) not base (i.e. /usr) >++ # Under BSD, pulseaudio is in ports (i.e. /usr/local) not base (i.e. /usr) >+ find_library ( pulse_lib NAMES pulse ) >+ if ( pulse_lib MATCHES ".*NOTFOUND" ) >+ message ( FATAL_ERROR "libpulse not found! " ) >+@@ -503,7 +512,7 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CM >+ target_link_libraries ( Einstein ${pulse_lib} ) >+ endif () >+ >+- # Under OpenBSD, X11 is in /usr/X11R6 >++ # Under BSD, find X11 >+ include ( FindX11 ) >+ if ( X11_FOUND ) >+ target_include_directories ( Einstein SYSTEM PUBLIC ${X11_INCLUDE_DIR} ) >+@@ -682,7 +691,7 @@ find_program(CLANG_FORMAT_EXECUTABLE >+ # >+ >+ find_program(CLANG_FORMAT_EXECUTABLE >+- NAMES clang-format-14 clang-format-mp-14 clang-format >++ NAMES clang-format-14 clang-format-mp-14 clang-format19 clang-format >+ HINTS /usr/local/opt/clang-format@14/bin/ /usr/lib/llvm-14/bin/ >+ DOC "clang-format executable") >+ if(CLANG_FORMAT_EXECUTABLE) >diff --git a/emulators/einstein-newton/files/patch-Emulator_NativeCalls_CMakeLists.txt b/emulators/einstein-newton/files/patch-Emulator_NativeCalls_CMakeLists.txt >new file mode 100644 >index 000000000000..9b1bf6fcbe95 >--- /dev/null >+++ b/emulators/einstein-newton/files/patch-Emulator_NativeCalls_CMakeLists.txt >@@ -0,0 +1,11 @@ >+--- Emulator/NativeCalls/CMakeLists.txt.orig 2025-11-07 12:31:53 UTC >++++ Emulator/NativeCalls/CMakeLists.txt >+@@ -18,7 +18,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") >+ Emulator/NativeCalls/TObjCBridgeCalls.mm >+ Emulator/NativeCalls/TObjCBridgeCalls.h >+ ) >+-elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") >++elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$") >+ list (APPEND common_sources >+ Emulator/NativeCalls/NativeCallsDefines.h >+ Emulator/NativeCalls/TNativeCalls.cpp >diff --git a/emulators/einstein-newton/files/patch-Emulator_Serial_CMakeLists.txt b/emulators/einstein-newton/files/patch-Emulator_Serial_CMakeLists.txt >new file mode 100644 >index 000000000000..32af641f9cbe >--- /dev/null >+++ b/emulators/einstein-newton/files/patch-Emulator_Serial_CMakeLists.txt >@@ -0,0 +1,11 @@ >+--- Emulator/Serial/CMakeLists.txt.orig 2025-11-07 12:23:08 UTC >++++ Emulator/Serial/CMakeLists.txt >+@@ -31,7 +31,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") >+ Emulator/Serial/TPtySerialPortManager.cpp >+ Emulator/Serial/TPtySerialPortManager.h >+ ) >+-elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") >++elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$") >+ list (APPEND common_sources >+ Emulator/Serial/TSerialHostPort.h >+ Emulator/Serial/TSerialHostPortDirect.h >diff --git a/emulators/einstein-newton/files/patch-Emulator_Sound_CMakeLists.txt b/emulators/einstein-newton/files/patch-Emulator_Sound_CMakeLists.txt >new file mode 100644 >index 000000000000..2c6e65c3054f >--- /dev/null >+++ b/emulators/einstein-newton/files/patch-Emulator_Sound_CMakeLists.txt >@@ -0,0 +1,11 @@ >+--- Emulator/Sound/CMakeLists.txt.orig 2025-11-07 12:55:19 UTC >++++ Emulator/Sound/CMakeLists.txt >+@@ -20,7 +20,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") >+ Emulator/Sound/TCoreAudioSoundManager.cpp >+ Emulator/Sound/TCoreAudioSoundManager.h >+ ) >+-elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") >++elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$") >+ list (APPEND app_sources >+ Emulator/Sound/TPulseAudioSoundManager.cpp >+ Emulator/Sound/TPulseAudioSoundManager.h >diff --git a/emulators/einstein-newton/files/patch-newt64-src_CMakeLists.txt b/emulators/einstein-newton/files/patch-newt64-src_CMakeLists.txt >new file mode 100644 >index 000000000000..044454ef4e1b >--- /dev/null >+++ b/emulators/einstein-newton/files/patch-newt64-src_CMakeLists.txt >@@ -0,0 +1,81 @@ >+--- newt64-src/CMakeLists.txt.orig 2024-12-27 00:20:35 UTC >++++ newt64-src/CMakeLists.txt >+@@ -1,6 +1,6 @@ >+ # >+ # Use a single CMake setup to compile Newt/64 on all supported platforms. >+-# >++# >+ >+ cmake_minimum_required(VERSION 3.13) >+ >+@@ -9,6 +9,7 @@ set (CMAKE_CXX_STANDARD 14) >+ set (CMAKE_CXX_STANDARD 14) >+ >+ # prepare for various platforms >++set (IS_BSD FALSE) >+ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") >+ >+ # MacOS >+@@ -21,9 +22,10 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") >+ # Linux >+ set (NEWT64_INSTALL_PREFIX "") >+ >+-elseif (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") >++elseif (${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$") >+ >+- # OpenBSD >++ # FreeBSD, NetBSD and OpenBSD >++ set (IS_BSD TRUE) >+ set (NEWT64_INSTALL_PREFIX "") >+ >+ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") >+@@ -118,7 +120,7 @@ set (headers >+ src/newt_core/incs/platform.h >+ $<$<PLATFORM_ID:Darwin>: src/newt_core/incs/darwin/config.h src/newt_core/incs/darwin/NewtConf.h> >+ $<$<PLATFORM_ID:Linux>: src/newt_core/incs/darwin/config.h src/newt_core/incs/darwin/NewtConf.h> >+- $<$<PLATFORM_ID:OpenBSD>: src/newt_core/incs/darwin/config.h src/newt_core/incs/darwin/NewtConf.h> >++ $<$<BOOL:${IS_BSD}>: src/newt_core/incs/darwin/config.h src/newt_core/incs/darwin/NewtConf.h> >+ $<$<PLATFORM_ID:Windows>: src/newt_core/incs/win/config.h src/newt_core/incs/win/NewtConf.h> >+ ) >+ >+@@ -164,21 +166,21 @@ target_include_directories (libnewt64 PUBLIC >+ src/ >+ $<$<PLATFORM_ID:Darwin>: src/newt_core/incs/darwin > >+ $<$<PLATFORM_ID:Linux>: src/newt_core/incs/darwin > >+- $<$<PLATFORM_ID:OpenBSD>: src/newt_core/incs/darwin > >++ $<$<BOOL:${IS_BSD}>: src/newt_core/incs/darwin > >+ $<$<PLATFORM_ID:Windows>: src/newt_core/incs/win > >+ ) >+ >+-target_link_libraries(libnewt64 PUBLIC >++target_link_libraries(libnewt64 PUBLIC >+ $<$<PLATFORM_ID:Darwin>: > >+ $<$<PLATFORM_ID:Linux>: > >+- $<$<PLATFORM_ID:OpenBSD>: > >++ $<$<BOOL:${IS_BSD}>: > >+ $<$<PLATFORM_ID:Windows>: shlwapi > >+ ) >+ >+ target_compile_definitions(libnewt64 PRIVATE >+ $<$<PLATFORM_ID:Darwin>: TARGET_OS_DARWIN=1 > >+ $<$<PLATFORM_ID:Linux>: TARGET_OS_LINUX=1 HAVE_ENDIAN_H=1> >+- $<$<PLATFORM_ID:OpenBSD>: TARGET_OS_LINUX=1 HAVE_ENDIAN_H=1> >++ $<$<BOOL:${IS_BSD}>: TARGET_OS_LINUX=1 HAVE_ENDIAN_H=1> >+ $<$<PLATFORM_ID:Windows>: TARGET_OS_WINDOWS=1 > >+ ) >+ >+@@ -209,12 +211,12 @@ target_include_directories (newt64 PUBLIC >+ src/ >+ $<$<PLATFORM_ID:Darwin>: src/newt_core/incs/darwin > >+ $<$<PLATFORM_ID:Linux>: src/newt_core/incs/darwin > >+- $<$<PLATFORM_ID:OpenBSD>: src/newt_core/incs/darwin > >++ $<$<BOOL:${IS_BSD}>: src/newt_core/incs/darwin > >+ $<$<PLATFORM_ID:Windows>: src/newt_core/incs/win > >+ ) >+ >+ target_link_libraries(newt64 >+- PUBLIC >++ PUBLIC >+ libnewt64 >+ $<$<PLATFORM_ID:Linux>:dl> >+ ) >diff --git a/emulators/einstein-newton/pkg-descr b/emulators/einstein-newton/pkg-descr >new file mode 100644 >index 000000000000..8e39b2a7d160 >--- /dev/null >+++ b/emulators/einstein-newton/pkg-descr >@@ -0,0 +1,3 @@ >+Einstein is a NewtonOS emulator. A Newton ROM file is required to run Einstein. >+If you own a Newton device, you may be able to dump your own ROM file from it. >+See the documentation for more information. >-- >2.53.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 293507
:
268424
|
269346
|
269417
|
269419
|
269440
|
269441
|
269770