Two options to install plugins.
Mention the whole path:
`/plugins install ~/src/profanity-plugins/my.py`
Mention only the plugin name:
`/plugins install my.py`
The latter will look in `/usr/local/share/profanity/plugins/` for the
file and copy it over to `~/.local/share/profanity/plugins`.
At first I was thinking about loading the plugins from the global
location. But users most likely don't want to have all plugins activated
that an admin installs on a system.
Regards https://github.com/profanity-im/profanity/issues/945
This partly reverts d3a387a0ec.
For proanity 0.9.x we still wanted to support older glib versions so
that we can be packaged for various linux distros.
Now with 0.10 we want to move on.
- Add NetBSD as a recognized platform without -ldl.
- Allow building with NetBSD libcurses instead of ncurses.
- Portability to NetBSD sh - use POSIX '=' instead of '=='.
With recent changes to c99 and -D_POSIX_C_SOURCE=200809L we get the following:
openSUSE TW CI sais:
```
Now you can run `make' to build profanity
In file included from /usr/include/python2.7/Python.h:8,
from src/plugins/python_plugins.c:37:
/usr/include/python2.7/pyconfig.h:1226: error: "_POSIX_C_SOURCE" redefined [-Werror]
1226 | #define _POSIX_C_SOURCE 200112L
|
<command-line>: note: this is the location of the previous definition
In file included from /usr/include/python2.7/Python.h:8,
from src/plugins/python_api.c:37:
/usr/include/python2.7/pyconfig.h:1226: error: "_POSIX_C_SOURCE" redefined [-Werror]
1226 | #define _POSIX_C_SOURCE 200112L
|
<command-line>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
```
OpenBSD CI sais:
```
cc1: warnings being treated as errors
src/database.c: In function 'log_database_get_previous_chat':
src/database.c:226: warning: implicit declaration of function 'asprintf'
gmake[1]: *** [Makefile:1924: src/database.o] Error 1
gmake[1]: Leaving directory '/home/build/profanity'
gmake: *** [Makefile:1211: all] Error 2
```
Let us use gnu99. Has been proposed before already and is fine.
Regards https://github.com/profanity-im/profanity/issues/1357
Regards https://github.com/profanity-im/profanity/pull/1351
98c38dc6d6
sets C99 as standard.
strdup() is not part of C99.
For now set `-D_POSIX_C_SOURCE=200809L` macro to have strdup() in C99.
Using `gnu99` instead would be another option.
We should take more care to use glib functions whenever possible.
Regards https://github.com/profanity-im/profanity/issues/1357
Some systems don't provide recent libstrophe releases. When older
version of libstrophe is detected, don't build legacy auth support.
To simplify this patch, report about unsupported legacy auth and
keep commands option as is.
without this, i receive this error on openbsd 6.7:
src/event/server_events.c:1477:19: error: universal character names are only valid in C++ and C99
src/event/server_events.c:1478:19: error: universal character names are only valid in C++ and C99
gmake[1]: *** [Makefile:1925: src/event/server_events.o] Error 1
gmake[1]: Leaving directory '/home/toogley/profanity'
gmake: *** [Makefile:1212: all] Error 2
After the library is found by pkg-config, try to build a simple program
to check the installation. The motivation of this check is that the
chance that users manually install libstrophe/libmesode is higher than
for other libs.
Fixes#1334.
Use g_date_time_format() instead of g_date_time_format_iso8601() to only
rely on glib 2.56.0 which is the latest version in Debian Buster
(current stable).
We also only use basic sqlite functions so 3.27.0 should be fine there
(also the one in Debian buster).
Thanks to @DebXWoody.
I plan to save all messages in an SQLite db.
For retrieving information it's nicer than having it in a text file.
We will have more info in there and easier to parse it.
This will also be good for later MAM
(https://github.com/profanity-im/profanity/issues/660).
Regular text files will still be an option for users so that they can
easily grep them and do whatever they like.
Internally Profanity will only use the SQLite db.
* Add .builds/openbsd.yml for builds.sr.ht
* Update travis-build.sh -> ci-build.sh with OpenBSD case
* Fix libdl check in configure.ac (OpenBSD has libdl built-in)
* Fix some minor issues found when compiling on OpenBSD with GCC (e.g.
uninitialized variables)
Instead of adding `profanity_LDADD = -lm` to Makefile.am or using
`AC_CHECK_LIB()` in configurea.c I use `AC_SEARCH_LIBS()` in case the
fmod() function is in the libc.
See https://autotools.io/autoconf/finding.html
We already use uint_32 from stdint.h which AFAIK is C99.
I seem to remember there is more C99 in the code. Let's explicitly
define it here.
Also fixes build for https://github.com/boothj5/profanity/pull/1053
The sha1 function `xmpp_sha1_digest()` from libmesode/libstrophe, that we now use instead of `p_sha1_hash() which depended on another third party sha1 lib is only avilable in version >= 0.9.2.
PR #999 adds call of g_object_unref() which requires libgobject-2.0.
The library is dependency of gio-2.0 and the problem is that current
configure.ac simply adds -lgio-2.0 without dependencies.
As fix, use pkg-config module.
In OpenBSD we have two readline libs. On the one hand we have an old
version in the base OS and on the other hand we have an new one in the
ports tree. profanity needs the new one and should pick up the right
one. readline from ports tree is prefixed as ereadline.
Note:
Original patch by Rafael Sadowski.
Cleaned up by jubalh with heavy help of pasis.
OS X contains libcurl without a pkg-config file and ./configure
reports error. Add AC_CHECK_LIB in order to find libcurl properly.
Also remove manual adding -lncurses and -lcurl to LIBS, because
AC_CHECK_LIB does this job.