If there is not interest in this, feel free to let me know.
I decided to do this as libtool/autoconf was giving me a lot of trouble with cross compiling and there isn't really a good way to do both native and cross compiling due to how the dependencies work.
This makes cross compiling much easier as meson supports an exe_wrapper command which can be set to, for example, qemu.
I verified that the same files get outputted with both this and autoconf (except for the .la files which shouldn't be installed anyway, and the .a files, which can be enabled in meson with -Ddefault_library=both if so desired. meson by default uses the equivalent of --disable-static):
https://gist.github.com/oreo639/cd4d3c53d8bc4d90203d647debb53dbd
(confls is autoconf and mesonls is meson)
I also verified that the resulting package can be installed and works correctly (and can be used to build ibus-anthy and fcitx-anthy).
I didn't implement update_params/update_params0/update_params2 since I'm not sure how you want to handle those. (fujiwarat/anthy-unicode/calctrans/Makefile.am)
Let me know if I missed anything.
I didn't add meson to the autoconf dist, if that is something you want me to do, let me know. (meson dist works by pulling the files from git so it should be fine on that side)
I also added a fix for crashing when getpwuid() returns null when cross compiling (due to add_val("HOME", pw->pw_dir); trying to dereference a null ptr). I made it such that if getpwuid() returns null, HOME doesn't get added to the dictionary. I'm not sure how desirable this is. diclib should still be able to fallback on getenv() when that is the case, however if you have other suggestions, let me know.
If there is not interest in this, feel free to let me know.
I decided to do this as libtool/autoconf was giving me a lot of trouble with cross compiling and there isn't really a good way to do both native and cross compiling due to how the dependencies work. This makes cross compiling much easier as meson supports an
exe_wrapper
command which can be set to, for example, qemu.I verified that the same files get outputted with both this and autoconf (except for the .la files which shouldn't be installed anyway, and the .a files, which can be enabled in meson with
-Ddefault_library=both
if so desired. meson by default uses the equivalent of--disable-static
): https://gist.github.com/oreo639/cd4d3c53d8bc4d90203d647debb53dbd (confls is autoconf and mesonls is meson)I also verified that the resulting package can be installed and works correctly (and can be used to build ibus-anthy and fcitx-anthy).
I didn't implement
update_params
/update_params0
/update_params2
since I'm not sure how you want to handle those. (fujiwarat/anthy-unicode/calctrans/Makefile.am) Let me know if I missed anything. I didn't add meson to the autoconf dist, if that is something you want me to do, let me know. (meson dist works by pulling the files from git so it should be fine on that side)I also added a fix for crashing when
getpwuid()
returns null when cross compiling (due toadd_val("HOME", pw->pw_dir);
trying to dereference a null ptr). I made it such that ifgetpwuid()
returns null, HOME doesn't get added to the dictionary. I'm not sure how desirable this is. diclib should still be able to fallback ongetenv()
when that is the case, however if you have other suggestions, let me know.Of course, let me know if I missed something.