Check-in [b566ab69ea]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:-- Add out-of-tree port ability, and add a port of Vision IRC -- * added Jam_generic.inc: include this in you port recipes ; * (might also be useful for compiling in-tree apps for SculptOS !) ; * added Vision "recipe" Jamfile (and patch-set) leveraging Jam_generic ; * (Vision needs patching due to some #defines that conflict with Genode headers) ; * didn't add dependencies for Vision yet, will commit later ; -- TESTS -- * Vision compiles and runs (with yet uncommited deps) but networking seems no-go yet ; * Also tested Mandelbrot with a similar "recipe", seems good too ;
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b566ab69ea97fc4ca559c963ec5f2f468b161291
User & Date: user 2024-01-25 14:31:37
Context
2024-02-06
13:25
fossil-add Haiku R1/b1 verbatim: dependencies for Vision IRC (BNotification, BCardView, BOutlineListView, BSecureSocket, BNetworkAddressResolver...) check-in: 2eff43fc89 user: user tags: trunk
2024-01-25
14:31
-- Add out-of-tree port ability, and add a port of Vision IRC -- * added Jam_generic.inc: include this in you port recipes ; * (might also be useful for compiling in-tree apps for SculptOS !) ; * added Vision "recipe" Jamfile (and patch-set) leveraging Jam_generic ; * (Vision needs patching due to some #defines that conflict with Genode headers) ; * didn't add dependencies for Vision yet, will commit later ; -- TESTS -- * Vision compiles and runs (with yet uncommited deps) but networking seems no-go yet ; * Also tested Mandelbrot with a similar "recipe", seems good too ; check-in: b566ab69ea user: user tags: trunk
2024-01-18
19:32
-- Port preferences/mail and its deps, Fix ellipse painting -- Add build rules needed for mail prefs build: * add UsePublicHeaders rule ; * add Preference rule (which just forwards to the 'Application' build rule) ; Enable prefs/mail and libnetapi: * mail prefs: adapt jamfiles ; * libnetapi: enable the 4 files we need, and just comment out BeOS R5 compatibility cruft ; Fix missing/broken ellipse code: * StrokeRoundRect() was missing the 4 'edges' (lines) between the corner arcs, from day one ; * StrokeRoundRect() and FillRoundRect() were using the wrong arc angles, from day one ; Misc: * also includes a few tweaks to nic_router from my ongoing investigation ^^ ; -- TESTS -- * 'E-mail' settings preflet runs and seems to work in Qemu (didn't test much yet) ; * nice to see that 'port' occur without the need to make any change in the 'ported' source code itself ; * all my "Pie Menus" show up nice and clean now (with the right 'slices' angles) ; * no luck with Nic on M73 yet, but gotta try a few more tricks ; check-in: ed56c08ca3 user: user tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to genode-haiku/hai-ports/README.md.

1
2
3
4
5
6
7
8











# Imported apps

Some of the smaller and easier to port (and MIT licensed) applications from the Be ecosystem
are imported into this repo, with build tweaks to accomodate HoG where applicable:

- FtpPositive (https://github.com/HaikuArchives/FtpPositive) (MIT-like license)



















>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Imported apps

Some of the smaller and easier to port (and MIT licensed) applications from the Be ecosystem
are imported into this repo, with build tweaks to accomodate HoG where applicable:

- FtpPositive (https://github.com/HaikuArchives/FtpPositive) (MIT-like license)


# Non-imported apps (recipes for "remote" builds)

Most ports are present only in "recipe" form : their source code is not part
of this repo, but is instead downloaded as zip or tgz archive, patched, and then built.
Folder `_contrib_remote` contains one subfoder for each app port, named
after the ported app, with the necessary build scripts/recipe/Jamfile inside
(e.g. "Vision" contains the Jamfile and patch set for downloading
the Vision source code, patching it, and compiling it).

Added genode-haiku/hai-ports/_contrib_remote/Jam_generic.inc.

































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# This jam file contains the common build routine for remote ports, it should
# not be used directly but rather 'included' by a recipe Jamfile, e.g. Vision/Jamfile


if ! $(list_src)
{
	Exit "*** Jam_generic.inc: don't call us directly, call the ('port') Jamfile which sets configuration variables and will in turn call us." ;
}


# -- Rule definitions : Download/extract/patch --

rule DownloadedArchive  destfile : url
{
	NotFile $(url) ;  # do not add a node for $(url) on the dependency graph
}

actions DownloadedArchive
{
	wget --quiet --output-document=$(1)  "$(2)"  # curl fails for some of the archives for some reason, let's use wget
	#  curl -o "$(1)"  "$(2)"  # or, to preserve the filename:  curl --remote-name  "$(2)"
}

rule ExtractedDir  dest_folder : source_archive
{
	Depends $(dest_folder) : $(source_archive) ;  # add a vertex on the dependency graph, between those two nodes
	
	if $(patch_set) {
		PatchedDir $(dest_folder) : $(patch_set) ;
	}
	
	RenameDir $(dest_folder) ;
}

actions ExtractedDir
{
	unzip -q $(2)  -d $(1).unpatched  # e.g.: unzip source.zip -d destdir.unpatched
		#///ToDo-2: switch $(source_archive:S).... case .zip, case .tgz etc
}

actions PatchedDir
{
	patch -p1 -d $(patch_root) < "$(2)" || exit 1  # apply patch-file generated by "git diff -p --stat"
		#(cd destdir.unpatched/Vision-0.10.6 && patch -p1 < "../../$(2)") || exit 1  # apply patch-file generated by "git diff -p --stat"
		# add -s for "silent/quiet" ?
}

actions RenameDir
{
	$(MV) $(1).unpatched $(1) ;  # e.g.:  mv -f destdir.unpatched destdir
}


# -- General setup --

# These must be set before loading Jamrules
HoG_TOP		?= ../../.. ;
LayerLevel	?= 7 ;
LOCATE_ToBuildFolder ?= "contrib_ports" ;  # instead of the default "bin-haiku_on_genode/" folder

# Load Jamrules, with definitions for...
#   * rule SetupHeadersHoG, rule Application, etc
#   * build configuration variables (so that we call gcc with flags "-fPIC -fno-builtin-sin" etc)
include $(HoG_TOP)/Jamrules ;

# Call this rule so that gcc will be called with...
#   -I"$GenodeRepos/libports/include/stdcxx"  (and other Genode and Genode contrib headers)
#   -I"../../../haiku-on-genode/kits/app"  (and other haiku headers)
SetupHeadersHoG ;


# -- App-specific setup, if any --
UsePrivateHeaders $(list_private_headers) ;

# -- Download/extract/patch/compile --
if $(dload_url)
{
	DownloadedArchive	source.zip	: $(dload_url) ;
	ExtractedDir		destdir		: source.zip ;
	
	Depends $(list_src) : destdir ;  # tell Jam to call 'ExtractedDir' before calling 'Application'
}
Application  $(app_name) : $(list_src) ;


# More config, for libs that don't have an .abi.so and get linked "as-is"...
# (this part of the script only works if located *below* the Application-rule call)
#
SEARCH on haiku.lib.so +=		$(HoG_TOP)/haiku-on-genode/system/kinda-kernel ;
SEARCH on avcodec.lib.so +=		$(GenodeBuild)/var/libcache/avcodec ;
SEARCH on avfilter.lib.so +=	$(GenodeBuild)/var/libcache/avfilter ;
SEARCH on avformat.lib.so +=	$(GenodeBuild)/var/libcache/avformat ;
SEARCH on avresample.lib.so +=	$(GenodeBuild)/var/libcache/avresample ;
SEARCH on avutil.lib.so +=		$(GenodeBuild)/var/libcache/avutil ;
SEARCH on swscale.lib.so +=		$(GenodeBuild)/var/libcache/swscale ;

Added genode-haiku/hai-ports/_contrib_remote/Vision/Jamfile.



































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Stand-alone "recipe" Jamfile for building Vision for haiku/on/genode
#
# Usage:
#	cd hai-ports/_contrib_remote/Vision/  # cd to this Jamfile, since it's stands apart from the rest of the jam hierarchy
#	jam -q -j4 Vision


# Vision-specific requirements: a #define and some private headers
DEFINES += VERSION_STRING=\\\"0.10.6-959a5bb9\\\" ;
list_private_headers = interface ;

local hash = 959a5bb9f18975d8246411ff9082cd98325d0b44 ;

# General/mandatory config
app_name		= Vision ;
#dload_url		= https://codeload.github.com/HaikuArchives/Vision/zip/refs/tags/0.10.6 ;
#dload_url		= https://github.com/HaikuArchives/Vision/archive/refs/tags/0.10.6.zip ;
dload_url		= https://github.com/HaikuArchives/Vision/archive/$(hash).zip ;
patch_set		= patch_set.patch ;
patch_root		= destdir.unpatched/Vision-$(hash) ;
SEARCH_SOURCE	+= . ;  # to find the patch-set  XXX does not work, jam still whines about it
SEARCH_SOURCE	+= destdir/Vision-$(hash)/src ;

list_src =
	Agent.cpp
	ChannelAgent.cpp
	ClickView.cpp
	ClientAgent.cpp
	ClientAgentInputFilter.cpp
	ClientAgentLogger.cpp
	ClientWindow.cpp
	ClientWindowDock.cpp
	ColorSelector.cpp
	ColorSwatch.cpp
	DCCConnect.cpp
	DCCFileWindow.cpp
	DCCHandler.cpp
	HistoryList.cpp
	IconMenu.cpp
	ListAgent.cpp
	#LuaScript.cpp
	MessageAgent.cpp
	NameItem.cpp
	NamesView.cpp
	NetPrefsServerView.cpp
	NetworkMenu.cpp
	NetworkPrefsView.cpp
	NetworkWindow.cpp
	NotifyList.cpp
	NumericFilter.cpp
	ParseCmd.cpp
	ParseCTCP.cpp
	ParseENums.cpp
	ParseEvents.cpp
	PlayButton.cpp
	PrefAliases.cpp
	PrefApp.cpp
	PrefColor.cpp
	PrefCommand.cpp
	PrefDCC.cpp
	PrefEvent.cpp
	PrefFont.cpp
	PrefGeneral.cpp
	PrefLog.cpp
	PrefsWindow.cpp
	Prompt.cpp
	RunView.cpp
	ServerAgent.cpp
	ServerEntryWindow.cpp
	SettingsFile.cpp
	SetupWindow.cpp
	StatusView.cpp
	TestScript.cpp
	Theme.cpp
	URLCrunch.cpp
	Utilities.cpp
	Vision.cpp
	WindowList.cpp
	;

# Jam normally takes care of setting $(LOCATE) on files which already exist, but
# since we download and extract them from an archive, the jam "binding phase"
# does not find them, so we have to do the binding manually:
for src in $(list_src)
{
	LOCATE on $(src) = destdir/Vision-$(hash)/src ;
}


# We may now call the 'generic port engine', parametrized by the above setup
#
include ../Jam_generic.inc ;


#JAMRULES = ../../../../../Jamrules ;
#SubDir TOP hai-ports _remote_contrib Vision ;

Added genode-haiku/hai-ports/_contrib_remote/Vision/patch_set.patch.

















































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
 src/MessageAgent.cpp | 2 ++
 src/ParseCTCP.cpp    | 1 +
 src/PrefCommand.cpp  | 2 ++
 src/PrefCommand.h    | 2 +-
 src/ServerAgent.cpp  | 4 +++-
 src/Vision.cpp       | 1 +
 src/Vision.h         | 1 +
 src/VisionBase.h     | 2 +-
 8 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/MessageAgent.cpp b/src/MessageAgent.cpp
index 81f7f83..2dca332 100644
--- a/src/MessageAgent.cpp
+++ b/src/MessageAgent.cpp
@@ -42,6 +42,7 @@
 #include <unistd.h>
 #include <stdlib.h>
 
+#include <netinet/in.h> ///
 #include <sys/socket.h>
 #include <sys/select.h>
 #include <arpa/inet.h>
@@ -472,6 +473,7 @@ void MessageAgent::MessageReceived(BMessage* msg)
 		AddSend(&dataSend, fChatee.String());
 		AddSend(&dataSend, endl);
 	}
+/// + break ??
 
 	case M_CHANGE_NICK: {
 		const char* oldNick, *newNick;
diff --git a/src/ParseCTCP.cpp b/src/ParseCTCP.cpp
index 92c45ce..a105316 100644
--- a/src/ParseCTCP.cpp
+++ b/src/ParseCTCP.cpp
@@ -177,6 +177,7 @@ void ServerAgent::ParseCTCP(BString theNick, BString theTarget, BString theMsg)
 				ResumeData* data((ResumeData*)fResumes.ItemAt(i));
 
 				if (data->nick == theNick && data->pos == pos && data->port == port)
+/// remove this semicolon ??
 					;
 				{
 					fResumes.RemoveItem(i);
diff --git a/src/PrefCommand.cpp b/src/PrefCommand.cpp
index 52eb3e8..827691a 100644
--- a/src/PrefCommand.cpp
+++ b/src/PrefCommand.cpp
@@ -26,6 +26,8 @@
 #include <ScrollView.h>
 #include <TextControl.h>
 
+#define MAX_COMMANDS 7 ///
+
 #undef B_TRANSLATION_CONTEXT
 #define B_TRANSLATION_CONTEXT "PrefCommand"
 
diff --git a/src/PrefCommand.h b/src/PrefCommand.h
index c357791..f7587ab 100644
--- a/src/PrefCommand.h
+++ b/src/PrefCommand.h
@@ -25,7 +25,7 @@
 
 #include <View.h>
 
-#define MAX_COMMANDS 7
+///#define MAX_COMMANDS 7
 
 class BTextControl;
 class BScrollView;
diff --git a/src/ServerAgent.cpp b/src/ServerAgent.cpp
index f0172ce..cc79b59 100644
--- a/src/ServerAgent.cpp
+++ b/src/ServerAgent.cpp
@@ -311,7 +311,9 @@ status_t ServerAgent::SocketThread()
 		ClientAgent::PackDisplay(&statMsg, statString.String(), C_ERROR);
 		sMsgrE->SendMessage(&statMsg);
 
-		BNetworkAddress remoteAddr(AF_INET, connectId.String(), connectPort);
+		BNetworkAddress remoteAddr(AF_INET, connectId.String(), connectPort); ///
+//how can that work in Haiku ??? anyway port is an int, not a string, seems we ought to do this instead:
+///		BNetworkAddress remoteAddr(AF_INET, connectId.String(), serverData->port);
 		if (remoteAddr.InitCheck() != B_OK) {
 			ClientAgent::PackDisplay(&statMsg, B_TRANSLATE(
 				"[@] Could not create connection to address and port. Make "
diff --git a/src/Vision.cpp b/src/Vision.cpp
index 4840b18..0721a74 100644
--- a/src/Vision.cpp
+++ b/src/Vision.cpp
@@ -49,6 +49,7 @@ class VisionApp* vision_app;
 #include <ctype.h>
 #include <stdio.h>
 #include <sys/select.h>
+#include <netinet/in.h> ///
 #include <sys/socket.h>
 
 #include "Vision.h"
diff --git a/src/Vision.h b/src/Vision.h
index e93cae4..13abc18 100644
--- a/src/Vision.h
+++ b/src/Vision.h
@@ -176,6 +176,7 @@ private:
 
 	rgb_color fColors[MAX_COLORS];
 	BFont* fClientFont[MAX_FONTS];
+enum { MAX_COMMANDS = 7 };
 	BString fCommands[MAX_COMMANDS];
 	BMessage fIdents;
 	map<BString, BString> fAliases;
diff --git a/src/VisionBase.h b/src/VisionBase.h
index 3a88733..10e022c 100644
--- a/src/VisionBase.h
+++ b/src/VisionBase.h
@@ -129,7 +129,7 @@
 #define CMD_BACK 5
 #define CMD_UPTIME 6
 
-#define MAX_COMMANDS 7
+///#define MAX_COMMANDS 7
 
 // tells the NamesView how to color the nicks
 #define STATUS_FOUNDER_BIT 0x0001