Commit graph

245 commits

Author SHA1 Message Date
Riccardo Schirone
eaec1a8893
build: fix BINDIR_DEPTH computation on Windows (#3075)
Before there was a special case for the root dir and it was implemented
by using `os.sep` as the representation for the root. That did not work
on Windows. This commit rewrite the BINDIR_DEPTH computation's logic to
use Path objects instead.
2022-10-09 10:14:36 +08:00
Giovanni
5b1e5e6762
Support blake3 hash algo (#3030) 2022-09-17 18:38:21 +02:00
Florian Märkl
06ee5e3aaf
Replace meson cmake module usage by plain configure_file() (#2948)
As due to https://github.com/mesonbuild/meson/issues/9702 we are not
using the expansion of @PACKAGE_INIT@ anyway, the cmake module provides
little additional value over a plain configure_file().
More importantly, by not using it, we get full support for muon, which
does not implement the cmake module yet.
2022-08-21 22:01:54 +08:00
Khairul Azhar Kasmiran
54508aee39
Rename rz_version.h.in to rz_build_version.h.in (#2914) 2022-08-13 22:20:36 +08:00
Khairul Azhar Kasmiran
801567c0b7
Move gittip to share/rizin (#2907) 2022-08-11 23:13:38 +08:00
GustavoLCR
c40744eba4
Fix Windows cross build (#2897)
* Fix build without ZLIB
* Fix cyclic include when cross-compiling
* Fixes `rz_util/rz_version.h`->`rz_types.h`->`rz_userconf.h`->`rz_util/rz_version.h`
2022-08-10 21:49:17 +08:00
Khairul Azhar Kasmiran
dc8cd44db4
gittip: Use subprocess.PIPE instead for Python 3.6 compatibility (#2873) 2022-08-06 21:21:07 +08:00
Florian Märkl
b85636317c Drop libuv dependency
libuv was only ever used for the tcp server for almost 4 years. Since
the non-libuv implementation of that is working now, it can be dropped
entirely without sacrificing functionality.
2022-08-06 13:20:52 +02:00
Khairul Azhar Kasmiran
2588aa8a1a
gittip: Use Meson's capture: true for Python 3.6 compatibility (#2869) 2022-08-04 22:37:58 +08:00
Riccardo Schirone
95ea48f537 build: use meson.current_source_dir() instead of '.'
build: remove special code if rizin is compiled as subproject
2022-08-04 11:48:21 +02:00
Khairul Azhar Kasmiran
fc24887c5c
Update on every build the git hash shown by rizin -v (#2863) 2022-08-01 23:28:34 +08:00
GustavoLCR
d3446789c7 Windows: Various fixes
* Fix some XP incompatibility
* Use wide version of APIs
* Remove unused/unnecessary function pointers
2022-07-24 21:00:51 +08:00
GustavoLCR
1b144864a9 Windows: Refactor environment variables
* Implement `rz_sys_clearenv()`
* Use the CRT function `_wputenv_s()` and `_wdupenv_s()`
* Fix `rz_sys_set_environ()`
2022-07-24 21:00:51 +08:00
Riccardo Schirone
a689f0a86e librz: refactor a bit how plugins are built
Rely on RZ_ARRAY_SIZE to add librz plugins instead of NULL terminators.
2022-07-20 22:04:02 +02:00
Riccardo Schirone
fd3a79f9e3 bin: remove Ldr plugins
RzBinLdrPlugins were not used. There was just one for Linux, but it was
not doing anything.
2022-07-20 22:04:02 +02:00
Riccardo Schirone
faac2436b1 Move SDB into RzUtil
* Make SDB code SPDX compliant
* Use some RzUtil functions inside SDB

util: compile natively without any extra dependency
2022-07-19 08:45:20 +02:00
Riccardo Schirone
33974fccc8 util: make zlib dependency optional 2022-07-18 08:39:11 +02:00
Riccardo Schirone
8939fdbd7d
Use add_global_arguments instead of passing cflags/ldflags all around (#2812)
See also 66a0e22293/docs/TESTING_WITH_SANITIZERS.md (clang)
2022-07-17 21:33:51 +08:00
Riccardo Schirone
6c665c6098 Use Rizin specific macros instead of the ones from SDB 2022-07-17 12:11:13 +02:00
Khairul Azhar Kasmiran
0603a78871
meson: Remove unused version_commit (#2808) 2022-07-14 23:09:49 +08:00
Khairul Azhar Kasmiran
b79201b49a
Remove RZ_BIRTH (#2803) 2022-07-13 17:01:42 +08:00
Anton Kochkov
481f7f5b56 Set default warning level 1 for Meson 2022-07-07 18:08:57 +08:00
Riccardo Schirone
395c2d745d build: keep using meson 0.55.0 functions 2022-07-04 19:05:50 +08:00
Riccardo Schirone
98acbb041a build: use gnu99 globally instead of per-project 2022-07-04 19:05:50 +08:00
Khairul Azhar Kasmiran
1b688fa89e
Meson: Simplify crca_crc hash plugin summary output (#2767) 2022-07-03 09:59:43 +08:00
Riccardo Schirone
2f1e39818e Add liblzma subproject 2022-07-02 10:12:26 +02:00
Giovanni
ea02b0d25f
Remove zignatures and move aaF[l] -> F[al] , zf[sdc] -> F[sdc] (#2682) 2022-06-29 07:49:43 +08:00
Riccardo Schirone
2987e035da hash: use RzHash in most hash APIs 2022-06-28 21:55:26 +08:00
Giovanni
648882d544
Add libmspack and add idpx to extracts compressed pdb (#2728)
* Add libmspack, cabextract and add idpx to extracts compressed pdb
* Remove cabextract from CIs since it is not anymore required.
2022-06-27 23:52:07 +02:00
Riccardo Schirone
d4a2a28bd5 build: check for 'backtrace' presence in meson 2022-06-24 13:30:50 +08:00
Riccardo Schirone
64677f1a01 Bump version to v0.5.0 for development 2022-06-08 10:09:55 +02:00
Riccardo Schirone
fdd7c6200c
Fix compilation on Termux and Haiku (#2671)
* build: fix compilation on Termux by using meson checks
* build: fix compilation on termux, which is recognized as linux

meson identifies termux as "linux" system, however pthread_sigmask is
not available there. Since pthread-fixes.c just defines
uv__pthread_sigmask we include it also in regular linux builds, because
the function is then used automatically instead of pthread_sigmask only
when __ANDROID__ is defined.

* subprojects/rzwinkd: define cc in meson.build before use
2022-06-07 23:44:41 +02:00
Riccardo Schirone
f65aa8add6 build: fix bindir_depth calculation 2022-06-02 08:27:53 +08:00
Riccardo Schirone
72c29e83d5 RzUtil: fix rz_path_prefix in case of portable build
Before this patch the function was using RZ_PREFIX even when IS_PORTABLE
was set, making the function not working well because RZ_PREFIX might
not exist in the system where the portable build is used (the path was
passed to realpath(), which requires an existing path).

This patch fixes the problem by searching for the BINDIR without using
realpath() on the RZ_PREFIX. Moreover, it avoid retrieving the same
prefix every time by saving it in a global variable.

* Add rz_constructor.h to allow defining constructors/destructors on
  multiple compilers.
2022-05-31 23:32:52 +08:00
Riccardo Schirone
ce6ac3e467 meson: use major/minor only in the lib soversion 2022-05-10 21:04:43 +02:00
David CARLIER
d964f85564
rz_file_copy use copy_file_range (linux only) (#2570) 2022-04-29 11:03:12 +02:00
Nicolas Jeker
cb9e96679e
Fix build with use_sys_tree_sitter (#2562) 2022-04-28 01:38:03 +08:00
GustavoLCR
53de45300c
Normalize paths on Windows (#2485, Fix #2124) 2022-04-03 07:44:01 +00:00
Riccardo Schirone
3fd578ef7a build: use run_command(..., check: false) as return code is used
run_command(..., check: true) was introduced because of a breaking
change in newer meson versions
(https://github.com/mesonbuild/meson/issues/9300), however Rizin uses
the return code to see if the subproject is in the right state or not.

Revert back to check: false, so that meson will not fail and we can
detect the failure in our meson.build files.

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2022-03-29 16:53:15 +02:00
Riccardo Schirone
57a5ab5d0b Keep targeting meson 0.55 2022-03-25 17:43:56 +01:00
Riccardo Schirone
230652aa98
Add -Wimplicit-fallthrough to meson file (#2438) 2022-03-24 08:27:18 +08:00
Giovanni
bfec86a12e
Add option to install sigdb systemwise and custom user location for additional signatures (#2328) 2022-02-28 14:32:38 +01:00
Riccardo Schirone
7c5e4f1fad
Update required meson version to 0.59.0 (#2351)
We are already using `import(..., required: ..)` where `required`
argument was introduced in 0.59.0, so let's update the required version
of meson necessary to build rizin.
2022-02-22 22:05:44 +00:00
yossizap
b744c8749a
Fix rz_path_prefix not working when BINDIR is at the root directory or several folders deep (#2332)
* Add an option to provide a custom prefix for portable binaries
* Use bindir's depth to find the portable root path in rz_path_prefix
* Skip the prefix folder check if we are not in bindir
2022-02-22 11:08:56 +08:00
Anton Kochkov
60a1698b62
Make CMake config generation optional (#2340) 2022-02-20 12:54:43 +01:00
Riccardo Schirone
ff56018b74
Add support for SOURCE_DATE_EPOCH for reproducible builds (#2322) 2022-02-15 09:21:41 +00:00
Riccardo Schirone
6f40dfe493
Move remaining things from shlr/ to meson subprojects (#2126)
* Move binrz meson directives to binrz/ dir

* Move rizin-shell-parser to a subproject

* Move bochs to a meson subproject

* Move rzqnx to meson subproject

* Move winkd to a meson subproject

* Move rzar to a meson subproject

* Move rzw32dbg_wrap to a meson subproject

* Move ptrace-wrap to a meson subproject

* Move rzgdb to a meson subproject

* Rename w32dbg_wrap to rzw32dbg_wrap

* Update CODEOWNERS

* Remove old references to shlr

* Move shlr/heap stuff in core and remove shlr/arm

* Move spp to a meson subproject

* Remove last references to shlr

* Remove use_webui option

* Move include files directives to librz/include/meson.build

* Move librz meson directives into librz/meson.build

* Handle d/ directories inside the specific module meson.build

* Move plugins listing to specific module meson.build

* Move rzheap to its own subproject

* Fix js linter and licenses

* Use meson.override_dependency for all rz_ modules
2021-12-22 09:20:39 +08:00
Khairul Azhar Kasmiran
95106d3d9c
Make meson.build work again with meson 0.55.3 (#2113) 2021-12-17 22:01:21 +08:00
Riccardo Schirone
47e1cb8335
Provide CMake config files for CMake projects (#2057)
* Remove wrong librz.pc.in file
* Add plugindir variable to .pc files to allow easy plugin configuration
* Add CMake config files to find Rizin in CMake projects
* Add CI jobs to check cmake files
* Provide workaround for mesonbuild/meson#9702
* Use .lib suffix and no prefix on MSVC to make CMake files work
* Disable cmake files on static libraries build
2021-12-17 09:16:25 +00:00
Riccardo Schirone
24af48b6e4
Add dist script to remove .git folders from subprojects (#1998) 2021-12-16 11:37:13 +00:00