View | Details | Raw Unified | Return to bug 293507 | Differences between
and this patch

Collapse All | Expand All

(-)b/emulators/einstein-newton/Makefile (+50 lines)
Added Link Here
1
PORTNAME=	einstein-newton
2
DISTVERSIONPREFIX=	v
3
DISTVERSION=	2025.12.19
4
CATEGORIES=	emulators
5
6
MAINTAINER=	laurent.chardon@gmail.com
7
COMMENT=	Apple Newton Emulator
8
WWW=		https://github.com/pguyot/Einstein
9
10
LICENSE=	GPLv2+
11
LICENSE_FILE=	${WRKSRC}/LICENSE
12
13
BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto
14
LIB_DEPENDS=	libffi.so:devel/libffi \
15
		libfontconfig.so:x11-fonts/fontconfig \
16
		libpulse.so:audio/pulseaudio
17
18
USES=		bison cmake compiler:c++17-lang desktop-file-utils \
19
		shared-mime-info xorg
20
USE_GITHUB=	yes
21
GH_ACCOUNT=	pguyot
22
GH_PROJECT=	Einstein
23
GH_TUPLE=	fltk:fltk:release-1.4.4:fltk/fltk-src \
24
		MatthiasWM:NEWT64:d1a1aa1:newt64/newt64-src
25
USE_XORG=	ice sm x11 xcursor xext xfixes xinerama xft xrender
26
27
CMAKE_ARGS=	-DCMAKE_BUILD_TYPE=Release
28
29
ALL_TARGET=	Einstein
30
TEST_TARGET=	test
31
32
PLIST_FILES=	bin/Einstein
33
34
PORTDOCS=	*
35
OPTIONS_DEFINE=	DOCS
36
37
post-extract:
38
	${MKDIR} ${WRKDIR}/.build/_deps
39
	${RLN} ${WRKSRC_fltk}  ${WRKDIR}/.build/_deps/fltk-src
40
	${RLN} ${WRKSRC_newt64} ${WRKDIR}/.build/_deps/newt64-src
41
42
do-install:
43
	@${MKDIR} ${STAGEDIR}${PREFIX}/bin
44
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/Einstein ${STAGEDIR}${PREFIX}/bin/Einstein
45
46
post-install-DOCS-on:
47
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
48
	(cd ${WRKSRC}/Documentation && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
49
50
.include <bsd.port.mk>
(-)b/emulators/einstein-newton/distinfo (+7 lines)
Added Link Here
1
TIMESTAMP = 1771678463
2
SHA256 (pguyot-Einstein-v2025.12.19_GH0.tar.gz) = e2bd3d6eb4d5a0c6bf600c5546845335abef2002fec8e2ec8081a2f40c9b3383
3
SIZE (pguyot-Einstein-v2025.12.19_GH0.tar.gz) = 9409929
4
SHA256 (fltk-fltk-release-1.4.4_GH0.tar.gz) = cbf5f7846af596206e8e4489e14c9981f98d7b37168110a00dcd26d8d479a669
5
SIZE (fltk-fltk-release-1.4.4_GH0.tar.gz) = 9114031
6
SHA256 (MatthiasWM-NEWT64-d1a1aa1_GH0.tar.gz) = e69de1706d42c8e9f25c8df14380daa725d2a2f40a2c53631e24738b2640603d
7
SIZE (MatthiasWM-NEWT64-d1a1aa1_GH0.tar.gz) = 506404
(-)b/emulators/einstein-newton/files/patch-CMakeLists.txt (+86 lines)
Added Link Here
1
--- CMakeLists.txt.orig	2025-12-19 16:57:53 UTC
2
+++ CMakeLists.txt
3
@@ -56,6 +56,10 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
4
 
5
 	# Linux: nothing to do here
6
 
7
+elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD" )
8
+
9
+    # FreeBSD and NetBSD: nothing to do here
10
+
11
 elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" )
12
 
13
 	set_property ( GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1 )
14
@@ -423,7 +427,7 @@ if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
15
 		)
16
 	endif ()
17
 
18
-elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" )
19
+elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$" )
20
 
21
 	# create the application
22
 	add_executable ( Einstein
23
@@ -443,17 +447,22 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CM
24
 	# how to compile and link
25
 	target_compile_options ( Einstein PUBLIC
26
 		-Wall -Wno-multichar -Wno-misleading-indentation -Wno-unused-result
27
-		-Wno-missing-field-initializers -Wno-stringop-truncation # -Werror
28
+		-Wno-missing-field-initializers # -Werror
29
 		# Werror is disabled for testing purposes. Must reenable as soon as all Linux warnings are fixed.
30
 	)
31
 	target_compile_options ( EinsteinTests PUBLIC
32
 		-Wall -Wno-multichar -Wno-misleading-indentation -Wno-unused-result
33
-		-Wno-missing-field-initializers -Wno-stringop-truncation -Werror
34
+		-Wno-missing-field-initializers -Werror
35
 	)
36
 	target_compile_options ( EinsteinFLGUI PUBLIC
37
 		-Wall -Wno-multichar -Wno-misleading-indentation -Wno-unused-result
38
-		-Wno-missing-field-initializers -Wno-stringop-truncation -Werror
39
+		-Wno-missing-field-initializers -Werror
40
 	)
41
+	if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
42
+        target_compile_options(Einstein PUBLIC -Wno-stringop-truncation)
43
+        target_compile_options(EinsteinTests PUBLIC -Wno-stringop-truncation)
44
+        target_compile_options(EinsteinFLGUI PUBLIC -Wno-stringop-truncation)
45
+    endif()
46
 	target_compile_definitions ( Einstein PRIVATE
47
 		TARGET_UI_FLTK=1 TARGET_OS_LINUX=1
48
 	)
49
@@ -479,8 +488,8 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CM
50
 		fltk::fltk fltk::images fltk::png fltk::z
51
 	)
52
 
53
-	if ( ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" )
54
-		# Under OpenBSD, libffi is in ports (i.e. /usr/local) not base (i.e. /usr)
55
+	if ( ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$" )
56
+		# Under BSD, libffi is in ports (i.e. /usr/local) not base (i.e. /usr)
57
 		find_library ( ffi_lib NAMES ffi )
58
 		find_file ( ffi_incl NAMES ffi.h )
59
 		if ( ffi_lib MATCHES ".*NOTFOUND" OR ffi_incl MATCHES ".*NOTFOUND" )
60
@@ -493,7 +502,7 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CM
61
 			target_link_libraries ( Einstein ${ffi_lib} )
62
 		endif ()
63
 
64
-		# Under OpenBSD, pulseaudio is in ports (i.e. /usr/local) not base (i.e. /usr)
65
+		# Under BSD, pulseaudio is in ports (i.e. /usr/local) not base (i.e. /usr)
66
 		find_library ( pulse_lib NAMES pulse )
67
 		if ( pulse_lib MATCHES ".*NOTFOUND" )
68
 			message ( FATAL_ERROR "libpulse not found! " )
69
@@ -503,7 +512,7 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CM
70
 			target_link_libraries ( Einstein ${pulse_lib} )
71
 		endif ()
72
 
73
-		# Under OpenBSD, X11 is in /usr/X11R6
74
+		# Under BSD, find X11
75
 		include ( FindX11 )
76
 		if ( X11_FOUND )
77
 			target_include_directories ( Einstein SYSTEM PUBLIC ${X11_INCLUDE_DIR} )
78
@@ -682,7 +691,7 @@ find_program(CLANG_FORMAT_EXECUTABLE
79
 #
80
 
81
 find_program(CLANG_FORMAT_EXECUTABLE
82
-    NAMES clang-format-14 clang-format-mp-14 clang-format
83
+    NAMES clang-format-14 clang-format-mp-14 clang-format19 clang-format
84
     HINTS /usr/local/opt/clang-format@14/bin/ /usr/lib/llvm-14/bin/
85
     DOC "clang-format executable")
86
 if(CLANG_FORMAT_EXECUTABLE)
(-)b/emulators/einstein-newton/files/patch-Emulator_NativeCalls_CMakeLists.txt (+11 lines)
Added Link Here
1
--- Emulator/NativeCalls/CMakeLists.txt.orig	2025-11-07 12:31:53 UTC
2
+++ Emulator/NativeCalls/CMakeLists.txt
3
@@ -18,7 +18,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
4
 		Emulator/NativeCalls/TObjCBridgeCalls.mm
5
 		Emulator/NativeCalls/TObjCBridgeCalls.h
6
 	)
7
-elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
8
+elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$")
9
 	list (APPEND common_sources
10
 			Emulator/NativeCalls/NativeCallsDefines.h
11
 			Emulator/NativeCalls/TNativeCalls.cpp
(-)b/emulators/einstein-newton/files/patch-Emulator_Serial_CMakeLists.txt (+11 lines)
Added Link Here
1
--- Emulator/Serial/CMakeLists.txt.orig	2025-11-07 12:23:08 UTC
2
+++ Emulator/Serial/CMakeLists.txt
3
@@ -31,7 +31,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
4
 		Emulator/Serial/TPtySerialPortManager.cpp
5
 		Emulator/Serial/TPtySerialPortManager.h
6
 	)
7
-elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
8
+elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$")
9
 	list (APPEND common_sources
10
 		Emulator/Serial/TSerialHostPort.h
11
 		Emulator/Serial/TSerialHostPortDirect.h
(-)b/emulators/einstein-newton/files/patch-Emulator_Sound_CMakeLists.txt (+11 lines)
Added Link Here
1
--- Emulator/Sound/CMakeLists.txt.orig	2025-11-07 12:55:19 UTC
2
+++ Emulator/Sound/CMakeLists.txt
3
@@ -20,7 +20,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
4
 		Emulator/Sound/TCoreAudioSoundManager.cpp
5
 		Emulator/Sound/TCoreAudioSoundManager.h
6
 	)
7
-elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
8
+elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$")
9
 	list (APPEND app_sources
10
 		Emulator/Sound/TPulseAudioSoundManager.cpp
11
 		Emulator/Sound/TPulseAudioSoundManager.h
(-)b/emulators/einstein-newton/files/patch-newt64-src_CMakeLists.txt (+81 lines)
Added Link Here
1
--- newt64-src/CMakeLists.txt.orig	2024-12-27 00:20:35 UTC
2
+++ newt64-src/CMakeLists.txt
3
@@ -1,6 +1,6 @@
4
 #
5
 # Use a single CMake setup to compile Newt/64 on all supported platforms.
6
-# 
7
+#
8
 
9
 cmake_minimum_required(VERSION 3.13)
10
 
11
@@ -9,6 +9,7 @@ set (CMAKE_CXX_STANDARD 14)
12
 set (CMAKE_CXX_STANDARD 14)
13
 
14
 # prepare for various platforms
15
+set (IS_BSD FALSE)
16
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
17
 
18
 	# MacOS
19
@@ -21,9 +22,10 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
20
 	# Linux
21
 	set (NEWT64_INSTALL_PREFIX "")
22
 
23
-elseif (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
24
+elseif (${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$")
25
 
26
-	# OpenBSD
27
+	# FreeBSD, NetBSD and OpenBSD
28
+    set (IS_BSD TRUE)
29
 	set (NEWT64_INSTALL_PREFIX "")
30
 
31
 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
32
@@ -118,7 +120,7 @@ set (headers
33
 	src/newt_core/incs/platform.h
34
 	$<$<PLATFORM_ID:Darwin>:  src/newt_core/incs/darwin/config.h src/newt_core/incs/darwin/NewtConf.h>
35
 	$<$<PLATFORM_ID:Linux>:   src/newt_core/incs/darwin/config.h src/newt_core/incs/darwin/NewtConf.h>
36
-	$<$<PLATFORM_ID:OpenBSD>: src/newt_core/incs/darwin/config.h src/newt_core/incs/darwin/NewtConf.h>
37
+	$<$<BOOL:${IS_BSD}>:      src/newt_core/incs/darwin/config.h src/newt_core/incs/darwin/NewtConf.h>
38
 	$<$<PLATFORM_ID:Windows>: src/newt_core/incs/win/config.h src/newt_core/incs/win/NewtConf.h>
39
 )
40
 
41
@@ -164,21 +166,21 @@ target_include_directories (libnewt64 PUBLIC
42
 	src/
43
 	$<$<PLATFORM_ID:Darwin>:  src/newt_core/incs/darwin >
44
 	$<$<PLATFORM_ID:Linux>:   src/newt_core/incs/darwin >
45
-	$<$<PLATFORM_ID:OpenBSD>:   src/newt_core/incs/darwin >
46
+	$<$<BOOL:${IS_BSD}>:      src/newt_core/incs/darwin >
47
 	$<$<PLATFORM_ID:Windows>: src/newt_core/incs/win >
48
 )
49
 
50
-target_link_libraries(libnewt64 PUBLIC 
51
+target_link_libraries(libnewt64 PUBLIC
52
 	$<$<PLATFORM_ID:Darwin>:  >
53
 	$<$<PLATFORM_ID:Linux>:   >
54
-	$<$<PLATFORM_ID:OpenBSD>:   >
55
+	$<$<BOOL:${IS_BSD}>:      >
56
 	$<$<PLATFORM_ID:Windows>: shlwapi >
57
 )
58
 
59
 target_compile_definitions(libnewt64 PRIVATE
60
 	$<$<PLATFORM_ID:Darwin>:  TARGET_OS_DARWIN=1 >
61
 	$<$<PLATFORM_ID:Linux>:   TARGET_OS_LINUX=1 HAVE_ENDIAN_H=1>
62
-	$<$<PLATFORM_ID:OpenBSD>: TARGET_OS_LINUX=1 HAVE_ENDIAN_H=1>
63
+	$<$<BOOL:${IS_BSD}>:      TARGET_OS_LINUX=1 HAVE_ENDIAN_H=1>
64
 	$<$<PLATFORM_ID:Windows>: TARGET_OS_WINDOWS=1 >
65
 )
66
 
67
@@ -209,12 +211,12 @@ target_include_directories (newt64 PUBLIC
68
 	src/
69
 	$<$<PLATFORM_ID:Darwin>:  src/newt_core/incs/darwin >
70
 	$<$<PLATFORM_ID:Linux>:   src/newt_core/incs/darwin >
71
-	$<$<PLATFORM_ID:OpenBSD>: src/newt_core/incs/darwin >
72
+	$<$<BOOL:${IS_BSD}>:      src/newt_core/incs/darwin >
73
 	$<$<PLATFORM_ID:Windows>: src/newt_core/incs/win >
74
 )
75
 
76
 target_link_libraries(newt64
77
-	PUBLIC 
78
+	PUBLIC
79
 	libnewt64
80
 	$<$<PLATFORM_ID:Linux>:dl>
81
 )
(-)b/emulators/einstein-newton/pkg-descr (-1 / +3 lines)
Added Link Here
0
- 
1
Einstein is a NewtonOS emulator. A Newton ROM file is required to run Einstein.
2
If you own a Newton device, you may be able to dump your own ROM file from it.
3
See the documentation for more information.

Return to bug 293507