Commit graph

62 commits

Author SHA1 Message Date
Ivailo Monev
969ddd830f kutils: rewrite KHTTP and move it to kio library
same functionality but without extra dependencies and better throughput

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-25 04:59:18 +02:00
Ivailo Monev
4dbb501d25 generic: drop text-to-speech support
Katana (or any interface designed around key and mouse events) is not
for blind people, trying to slap text-to-speech on top of it was the
wrong thing to do to begin with

side note: speech-dispatcher tends to hang if the output device is not
configured properly (i.e. editing /etc/speech-dispatcher/speechd.conf
manually)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-18 15:56:59 +02:00
Ivailo Monev
aa6b5ea4f0 kinit: klauncher and KCrash rewrite
much simpler and easier to maintain, also it will be proper D-Bus
service now with no sockets, process title hack and whatnot. KCrash
and startkde script (in kde-workspace repo) have to be adjusted for
it tho

note that the internal KIO scheduler already has the functionality to
put slaves on hold but now they will be started as detached process.
eventually they may become plugins (they are loaded as such by kioslave
program) without event loop dispatcher

fixes application startup notification (ASN) and cleanup issues

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-04 23:20:15 +02:00
Ivailo Monev
881b47b8ea kdecore: use the Katie translations format
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-02 05:42:59 +02:00
Ivailo Monev
90928e8320 generic: store package found definitions in config header
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-30 05:41:21 +02:00
Ivailo Monev
704ef230d5 generic: make use of KUser and KUserGroup
eventually KUser and KUserGroup will use getpwnam_r(), getgrnam_r(), etc. for thread safety

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-10 21:05:19 +03:00
Ivailo Monev
9afece26a8 kutils: implement operator equal for KArchiveEntry
required to check if QList<KArchiveEntry> contains KArchiveEntry for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-06 21:31:25 +03:00
Ivailo Monev
3ab3f3b47f kutils: new karchive library to replace KZip and KTar
it has to solve a few problems like:
1. blocking the current thread while listing, extracting or adding to
   archive
2. lack of support for some archive formats such as 7-zip in the
   previously available classes for dealing with archive
3. progress and error reporting

a KArchiveJob class may have to be implemented to solve the above
issues. the API is just as frustrating to use as KTar and KZip right now
tho and I am not happy with that but the class itself is a 3-rd rewrite
of what was once Python module, plugin for another project and now used
as base in library.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-06 16:53:55 +03:00
Ivailo Monev
f2b5c374ed kdecore: check for arc4random_uniform() and use it in KRandom::randomMax() if available
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-01 21:22:43 +00:00
Ivailo Monev
08345f1315 cmake: new baseline kde4_bool_to_01() macro replacing macro_bool_to_01()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-27 16:44:28 +03:00
Ivailo Monev
5d31c03dcb generic: remove unused ENABLE_NLS configuration definition
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-27 15:59:16 +03:00
Ivailo Monev
bb883b346d generic: remove unused CMake module file inclusions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-27 11:09:26 +03:00
Ivailo Monev
dd6eab0c41 generic: remove unused ttyname_r() function configuration check
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-27 11:03:08 +03:00
Ivailo Monev
29a8459798 generic: remove checks for system headers that should be present
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-23 15:42:09 +03:00
Ivailo Monev
c9a0aaf40b generic: remove checks for limits and unistd system headers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-23 07:37:22 +03:00
Ivailo Monev
5ce2c51b25 generic: fix regression since d20002f957
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-12 12:39:09 +02:00
Ivailo Monev
d4691a6f09 generic: remove unused configuration checks
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-08 01:07:02 +02:00
Ivailo Monev
87d3f0455d kpty: assume grantpt() and unlockpt() are available
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-25 02:27:22 +02:00
Ivailo Monev
d20002f957 kio: drop obsolete proxy auto-discovery support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-21 04:53:38 +02:00
Ivailo Monev
abbd187372 generic: remove now unused posix_openpt() availability check
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-11-12 19:15:31 +02:00
Ivailo Monev
0ef4bf5019 kpty: assume posix_openpt() is available
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-11-11 05:19:50 +02:00
Ivailo Monev
304132f1c2 generic: assume vsnprintf() is present
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-09-14 21:47:50 +03:00
Ivailo Monev
1993db291c kioslave: mount/unmount actions reimplementation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-09-02 05:42:21 +03:00
Ivailo Monev
3f927bc6c4 generic: remove duplicate getgrouplist() function check
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-09-02 04:50:05 +03:00
Ivailo Monev
50c1957d1b generic: assume S_ISSOCK is defined [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-09-02 04:47:12 +03:00
Ivailo Monev
b6f77397c5 kdecore: include paths header if present on the system
fixes mount points detection on systems using musl libc

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-08-26 01:44:23 +03:00
Ivailo Monev
9775d571b0 generic: use ttyname_r() if available
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-06-18 22:44:10 +03:00
Ivailo Monev
d6d58917bc kpty: assume tcgetattr() and tcsetattr() are available
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-06-16 19:19:32 +03:00
Ivailo Monev
e529267d21 kpty: use ptsname_r() if available, assume ptsname() is available
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-06-16 19:18:25 +03:00
Ivailo Monev
825449e174 kdecore: rely solely on Katie's locale codec detection
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-03-24 00:18:15 +02:00
Ivailo Monev
c1caca5927 generic: drop support for libutil with mismatching utmp/utmpx struct
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-02-23 11:44:20 +02:00
Ivailo Monev
76765eee7d generic: do not assume certain systems have utmpx
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-02-23 05:04:38 +02:00
Ivailo Monev
171ac85118 generic: simplify CMAKE_SYSTEM_NAME match
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-02-18 05:37:53 +02:00
Ivailo Monev
fb3284e764 generic: use ut_user utmp/utmpx member if available
partially fixes build on FreeBSD

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-02-04 13:27:49 +02:00
Ivailo Monev
f5ad9fd03b Revert "generic: do not rely on login()/loginx() and logout()/logoutx()"
This reverts commit cf68640e13.
2021-02-03 04:09:48 +02:00
Ivailo Monev
cf68640e13 generic: do not rely on login()/loginx() and logout()/logoutx()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-01-26 21:40:14 +02:00
Ivailo Monev
9b97882c3d generic: drop libutempter support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-01-26 17:01:48 +02:00
Ivailo Monev
067afe442b generic: fix PTY login on NetBSD
based on patch from NetBSD's pkgsrc

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-01-23 02:53:46 +02:00
Ivailo Monev
d8d265082d generic: replace use of CheckStructMember with CheckStructHasMember
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2020-11-07 19:38:48 +02:00
Ivailo Monev
5a1d517641 generic: remove check for _getpty()
Katie does not support IRIX

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-24 21:13:19 +00:00
Ivailo Monev
b5303a651e generic: review configuration checks
despite the gettimeofday() check for an example, the function is used
unconditionally thus checks for errno header are removed aswell rather then
making them required from configuration checks and error-ing out if not
found.

other cases such as trunc() are used in kexiv2 unconditionally, not in
kdecore.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-24 21:04:54 +00:00
Ivailo Monev
7ff41b305d generic: remove use of getpt()
glibc-specific and the manual page for it recommends using posix_openpt()
instead

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-23 18:04:32 +00:00
Ivailo Monev
ad62a1101e generic: remove unused termios header check
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-23 16:16:50 +00:00
Ivailo Monev
578db06441 generic: move configuration files creation after package lookups
remove unused HAVE_LIBACL definition while at it

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-19 17:12:33 +00:00
Ivailo Monev
4d6fb007e7 generic: fix most of the overlinking issues
TODO from https://github.com/fluxer/katana/issues/7. I've decided to
keep KDE4 and Katie libraries as PUBLIC, all other libraries as PRIVATE
for that and not use INTERFACE at all since that will not require a lot
of changes to all other sub-projects (kde-baseapps, kde-workspace and
kde-extraapps) build systems.

MusicBrainz5 CMake module was also rewritten as the actual library that
should be linked to is libmusicbrainz5cc, libmusicbrainz5 is the C
version of it.

common checks for X11 extensions where move to main config header,
eventually to be moved to separate config-x11 header.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-09 21:58:11 +00:00
Ivailo Monev
478ca250a2 generic: replace installation paths with KDE4_ prefixed
this is TODO from issue #9. CPack and CTest configs will not be
supported. most of the changes done to other repisitories is automated
via:

find -type f -exec sed -i -e 's|${INSTALL_DIR}|${KDE4_INSTALL_DIR}|g' \
    -e 's|${EXEC_INSTALL_PREFIX}|${KDE4_EXEC_INSTALL_PREFIX}|g' \
    -e 's|${SHARE_INSTALL_PREFIX}|${KDE4_SHARE_INSTALL_PREFIX}|g' \
    -e 's|${BIN_INSTALL_DIR}|${KDE4_BIN_INSTALL_DIR}|g' \
    -e 's|${SBIN_INSTALL_DIR}|${KDE4_SBIN_INSTALL_DIR}|g' \
    -e 's|${LIB_INSTALL_DIR}|${KDE4_LIB_INSTALL_DIR}|g' \
    -e 's|${LIBEXEC_INSTALL_DIR}|${KDE4_LIBEXEC_INSTALL_DIR}|g' \
    -e 's|${INCLUDE_INSTALL_DIR}|${KDE4_INCLUDE_INSTALL_DIR}|g' \
    -e 's|${PLUGIN_INSTALL_DIR}|${KDE4_PLUGIN_INSTALL_DIR}|g' \
    -e 's|${IMPORTS_INSTALL_DIR}|${KDE4_IMPORTS_INSTALL_DIR}|g' \
    -e 's|${CONFIG_INSTALL_DIR}|${KDE4_CONFIG_INSTALL_DIR}|g' \
    -e 's|${DATA_INSTALL_DIR}|${KDE4_DATA_INSTALL_DIR}|g' \
    -e 's|${ICON_INSTALL_DIR}|${KDE4_ICON_INSTALL_DIR}|g' \
    -e 's|${KCFG_INSTALL_DIR}|${KDE4_KCFG_INSTALL_DIR}|g' \
    -e 's|${LOCALE_INSTALL_DIR}|${KDE4_LOCALE_INSTALL_DIR}|g' \
    -e 's|${MIME_INSTALL_DIR}|${KDE4_MIME_INSTALL_DIR}|g' \
    -e 's|${SERVICES_INSTALL_DIR}|${KDE4_SERVICES_INSTALL_DIR}|g' \
    -e 's|${SERVICETYPES_INSTALL_DIR}|${KDE4_SERVICETYPES_INSTALL_DIR}|g' \
    -e 's|${SOUND_INSTALL_DIR}|${KDE4_SOUND_INSTALL_DIR}|g' \
    -e 's|${TEMPLATES_INSTALL_DIR}|${KDE4_TEMPLATES_INSTALL_DIR}|g' \
    -e 's|${WALLPAPER_INSTALL_DIR}|${KDE4_WALLPAPER_INSTALL_DIR}|g' \
    -e 's|${AUTOSTART_INSTALL_DIR}|${KDE4_AUTOSTART_INSTALL_DIR}|g' \
    -e 's|${XDG_APPS_INSTALL_DIR}|${KDE4_XDG_APPS_INSTALL_DIR}|g' \
    -e 's|${XDG_DIRECTORY_INSTALL_DIR}|${KDE4_XDG_DIRECTORY_INSTALL_DIR}|g' \
    -e 's|${XDG_MIME_INSTALL_DIR}|${KDE4_XDG_MIME_INSTALL_DIR}|g' \
    -e 's|${SYSCONF_INSTALL_DIR}|${KDE4_SYSCONF_INSTALL_DIR}|g' \
    -e 's|${MAN_INSTALL_DIR}|${KDE4_MAN_INSTALL_DIR}|g' \
    -e 's|${INFO_INSTALL_DIR}|${KDE4_INFO_INSTALL_DIR}|g' \
    -e 's|${DBUS_INTERFACES_INSTALL_DIR}|${KDE4_DBUS_INTERFACES_INSTALL_DIR}|g' \
    -e 's|${DBUS_SERVICES_INSTALL_DIR}|${KDE4_DBUS_SERVICES_INSTALL_DIR}|g' \
    -e 's|${DBUS_SYSTEM_SERVICES_INSTALL_DIR}|${KDE4_DBUS_SYSTEM_SERVICES_INSTALL_DIR}|g' \
    -e 's|${KAUTH_HELPER_PLUGIN_DIR}|${KDE4_KAUTH_HELPER_PLUGIN_DIR}|g' \
    -e 's|${KAUTH_BACKEND_PLUGIN_DIR}|${KDE4_KAUTH_BACKEND_PLUGIN_DIR}|g' {} +

note that if you execute this command you may corrupt the git repository
files so move the .git directory out of the way. you can also verify
that there are no other reference to the compatibility installation
paths via:

git grep \
    -e INSTALL_DIR \
    -e EXEC_INSTALL_PREFIX \
    -e SHARE_INSTALL_PREFIX \
    -e BIN_INSTALL_DIR \
    -e SBIN_INSTALL_DIR \
    -e LIB_INSTALL_DIR \
    -e LIBEXEC_INSTALL_DIR \
    -e INCLUDE_INSTALL_DIR \
    -e PLUGIN_INSTALL_DIR \
    -e IMPORTS_INSTALL_DIR \
    -e CONFIG_INSTALL_DIR \
    -e DATA_INSTALL_DIR \
    -e ICON_INSTALL_DIR \
    -e KCFG_INSTALL_DIR \
    -e LOCALE_INSTALL_DIR \
    -e MIME_INSTALL_DIR \
    -e SERVICES_INSTALL_DIR \
    -e SERVICETYPES_INSTALL_DIR \
    -e SOUND_INSTALL_DIR \
    -e TEMPLATES_INSTALL_DIR \
    -e WALLPAPER_INSTALL_DIR \
    -e AUTOSTART_INSTALL_DIR \
    -e XDG_APPS_INSTALL_DIR \
    -e XDG_DIRECTORY_INSTALL_DIR \
    -e XDG_MIME_INSTALL_DIR \
    -e SYSCONF_INSTALL_DIR \
    -e MAN_INSTALL_DIR \
    -e INFO_INSTALL_DIR \
    -e DBUS_INTERFACES_INSTALL_DIR \
    -e DBUS_SERVICES_INSTALL_DIR \
    -e DBUS_SYSTEM_SERVICES_INSTALL_DIR \
    -e KAUTH_HELPER_PLUGIN_DIR \
    -e KAUTH_BACKEND_PLUGIN_DIR | grep -v KDE4_

this change should make default installation Filesystem Hierarchy
Standard (FHS) compliant and packaging easier since library suffix (e.g.
64 for x86_64 hosts) will not have to be specified explicitly, it may
solve possible conflicts with installation path variables from other
projects which use custom installation paths aswell

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-08 20:46:43 +00:00
Ivailo Monev
c70564040b generic: get rid of kdefakes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2017-08-02 04:38:42 +00:00
Ivailo Monev
6908880a09 generic: misc cleanups
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2017-06-24 08:06:43 +00:00
Ivailo Monev
7419f793b0 generic: replace kdesu with kdesudo
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-05-15 02:06:56 +00:00
Ivailo Monev
6d9fcf1304 generic: cleanup configuration checks
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2016-05-13 04:34:38 +00:00