Previously it relied on AX_PYTHON_DEVEL, which in turn executes
python-config to get the build flags. However this does not work while
cross compiling because we can't execute the python-config build for the
target platform. To circumvent this problem the python build flags are
now queried via pkgconfig, which has the drawback of not having some
extra build flags, but they do not seem to be needed.
I tested this patch with the termux build system and it build without
their existing hack of injecting python after the configure step. I also
tested non cross compile build on Arch Linux and it also still works.
Fixes#851
gcc-12 detects redundant check against array of arrays as:
src/plugins/python_api.c: In function ‘python_api_register_command’:
src/plugins/python_api.c:199:31: error: the comparison will always evaluate as ‘true’ for the address of ‘c_arguments’ will never be NULL [-Werror=address]
199 | while (c_arguments[i] != NULL && c_arguments[i][0] != NULL) {
| ^~
src/plugins/python_api.c:161:15: note: ‘c_arguments’ declared here
161 | char* c_arguments[args_len == 0 ? 0 : args_len + 1][2];
| ^~~~~~~~~~~
gcc-12 detects redundant check against array of arrays as:
src/plugins/callbacks.c: In function ‘_free_command_help’:
src/plugins/callbacks.c:85:26: error: the comparison will always evaluate as ‘true’ for the address of ‘args’ will never be NULL [-Werror=address]
85 | while (help->args[i] != NULL && help->args[i][0] != NULL) {
| ^~
In file included from ./src/ui/ui.h:44,
from ./src/command/cmd_defs.h:42,
from src/plugins/callbacks.c:41:
./src/command/cmd_funcs.h:48:12: note: ‘args’ declared here
48 | gchar* args[128][2];
| ^~~~
If we receive a message we get:
<< room message: eagle@conference.anoxinon.me (win 2)
Same for private chats and regular chats.
And several other kinds of notifications.
If we only receive notifications from a chat window it would be nice to
also clear the hilight on the console window since we already catched up
by reading the actual message in the chat window.
Probably not the best description :-) I hope you get it..
Regards https://github.com/profanity-im/profanity/issues/1399
ncursesw defines _XOPEN_SOURCE macro via command-line. In particular, it
is defined in ncursesw.pc and extracted via pkg-config. From other side,
Python defines the same macro unconditionally in pyconfig.h. Python-3.x
defines the macro with value different than ncursesw does. In turn, this
causes a warning that the macro is redefined. And warnings are treated
as errors.
Since both entities define the mecro unconditionally, we can't simply
reorder headers as Python developers suggest. So, undefine the macro
just before the <Python.h> to fix this silly issue.
Probably missing copy of body to plain in carbon and privmessage.
Only covers the incoming message path because goal is OMEMO decryption
of untrusted message.
Cover some of the log functions but not all.
In case Python or C plugins are disabled install/load failed silently.
Notify the user that we can't load them because profanity was built
without support for plugins.
We try to decrypt all messages, if it's successful we use
sv_ev_incoming_message even for OMEMO messages. We pass an OMEMO
boolean to let UI be aware that message were encrypted.