Bug 263819 - [NEW PORT] devel/fungw: function gateway
Summary: [NEW PORT] devel/fungw: function gateway
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Li-Wen Hsu
URL: http://repo.hu/projects/fungw/
Keywords: feature
Depends on:
Blocks: 263849 264289
  Show dependency treegraph
 
Reported: 2022-05-06 15:21 UTC by Robert Clausecker
Modified: 2022-06-05 15:14 UTC (History)
1 user (show)

See Also:


Attachments
[NEW PORT] devel/fungw: function gateway (18.72 KB, patch)
2022-05-06 15:21 UTC, Robert Clausecker
fuz: maintainer-approval+
Details | Diff
[NEW PORT] devel/fungw: function gateway (19.98 KB, patch)
2022-05-06 16:13 UTC, Robert Clausecker
fuz: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2022-05-06 15:21:12 UTC
Created attachment 233771 [details]
[NEW PORT] devel/fungw: function gateway

Fungw is a tiny, portable library written in C (C89) that manages
dynamic function calls across different programming languages.  For
this, fungw provides:

 - a simplistic scalar data type abstraction, supporting the most common types
 - semi-automatic conversion between data types
 - contexts that can host objects; objects can host named functions
 - a set of optional language bindings to the most popular scripting languages

The main use of fungw is to provide the host application a framework
where dynamic parts of the code (e.g. plugins) can register their calls,
allowing app-plugin, plugin-app, and plugin-plugin calls.

The second main use is doing all this in a language-agnostic way: any
part of the code can be implemented in any of the numerous supported
scripting languages (such as awk or lua).  The caller of a function
doesn't need to know what language the function is implemented in.

The main property of fungw is simplicity.  The only API between objects
is the plain old function call mechanism.

WWW: http://repo.hu/projects/fungw/

(this port is a prerequisite for the ringdove EDA suite)
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2022-05-06 15:26:14 UTC
Forgot to mention:

Tested successfully on armv7 arm64 i386 amd64 FreeBSD 13.
Portlint and portclippy like the port.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2022-05-06 16:13:27 UTC
Created attachment 233773 [details]
[NEW PORT] devel/fungw: function gateway

Replaced patch with updated patch that address an issue I didn't notice in initial testing (port has a second header file + library it requires, but doesn't install for some reason).
Comment 3 Li-Wen Hsu freebsd_committer freebsd_triage 2022-06-05 06:43:39 UTC
Some minor suggestions:
- How about a more descriptive comment? How about something like "C Function gateway for different programming languages" ?
- Since we have `PYTHON3_USES=python`, how about just name the option PYTHON3 as PYTHON? As now python3 is the default anyway
- What's python(2) in the comment of line 18?
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2022-06-05 12:05:05 UTC
(In reply to Li-Wen Hsu from comment #3)

> How about a more descriptive comment? How about something like "C Function gateway for different programming languages" ?

You can change it to that when you commit if you like, but I think it might be too long for the COMMENT field.

>  Since we have `PYTHON3_USES=python`, how about just name the option PYTHON3 as PYTHON? As now python3 is the default anyway

PYTHON and PYTHON3 are pre-defined options from bsd.options.desc.mk.  The port has both Python 2 and Python 3 binding support, but due to the deprecation of Python 2, I had only implemented the Python 3 binding.  That also explains the python(2) comment as the binding is just called “python” but refers to Python 2.  So naming the option PYTHON3 makes clear that Python 3 support is meant.
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-06-05 15:14:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5b1f2cff0ed195b4a215b78c2f58b6ff21c5f4ac

commit 5b1f2cff0ed195b4a215b78c2f58b6ff21c5f4ac
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-06-05 15:11:27 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2022-06-05 15:11:27 +0000

    Add devel/fungw: C Function gateway for different programming languages

    PR:             263819

 devel/Makefile                                     |   1 +
 devel/fungw/Makefile (new)                         |  47 ++++++++++
 devel/fungw/distinfo (new)                         |   3 +
 devel/fungw/files/patch-Makefile (new)             |  64 +++++++++++++
 devel/fungw/files/patch-doc_Makefile.in (new)      |  18 ++++
 devel/fungw/files/patch-libfungw_Makefile.in (new) |  25 ++++++
 .../files/patch-libfungwbind_Makefile.in (new)     |  20 +++++
 .../files/patch-libfungwbind_Plugin.tmpasm (new)   |  25 ++++++
 .../fungw/files/patch-regression_Makefile.in (new) |  11 +++
 ...atch-scconfig_src_scripts_find__duktape.c (new) |  11 +++
 .../patch-scconfig_src_scripts_find__lua.c (new)   |  11 +++
 ...patch-scconfig_src_scripts_find__python.c (new) |  19 ++++
 .../files/patch-src__3rd_genht_Makefile (new)      |  38 ++++++++
 devel/fungw/pkg-descr (new)                        |  22 +++++
 devel/fungw/pkg-plist (new)                        | 100 +++++++++++++++++++++
 15 files changed, 415 insertions(+)