441 Commits

Author SHA1 Message Date
Nathan Moinvaziri
55db144e03 Version 4.0.8. 2025-01-08 10:12:15 -08:00
Nathan Moinvaziri
7df56f7cc8 Split compat layer into different source files #806 2024-10-30 18:11:27 -04:00
Kai Pastor
95fdb49672 Do not use REQUIRED with find_dependency 2024-10-23 11:28:07 -07:00
Nathan Moinvaziri
fe5fedc365 Version 4.0.7. 2024-06-15 09:21:44 -07:00
Nathan Moinvaziri
b887f8104b Rename cli instead of lib for VS conflicts to prevent linker error. #778 2024-06-07 19:48:35 -07:00
Nathan Moinvaziri
1ddb23dfc0 Clean up casing in CMake. 2024-06-07 19:48:03 -07:00
Nathan Moinvaziri
8a00c0e9fb Disable zlib-ng tests. 2024-06-01 18:30:05 -07:00
Nathan Moinvaziri
db940ff659 Fixed zlib-ng build error about installing zlibstatic alias. 2024-06-01 16:44:53 -07:00
Nathan Moinvaziri
1e402d2c2a Rename minizip_cmd to minizip_cli. 2024-06-01 16:44:30 -07:00
Nathan Moinvaziri
4cec116210 Version 4.0.6. 2024-06-01 14:10:39 -07:00
Nathan Moinvaziri
c7ed3c8e4c Update liblzma repository to GitHub. 2024-06-01 13:39:36 -07:00
Nathan Moinvaziri
0725402ff1 Switch to using zlib-ng stable.
zlib's CMake is just fucked up for far too long.
2024-06-01 13:27:20 -07:00
Nathan Moinvaziri
5aec551bf7 Fixed zstd master branch no longer working. 2024-04-01 09:44:11 -07:00
Nathan Moinvaziri
3eed562ef0 Version 4.0.5. 2024-03-05 19:30:16 -08:00
rezso
e91cdbc485 Fix bz2 library name 2024-01-12 12:09:22 -05:00
Nathan Moinvaziri
13b01a74a4 Version 4.0.4. 2023-12-29 07:05:05 -08:00
Brad Smith
0211461993 Remove DOS line endings 2023-12-21 10:38:11 -08:00
Nathan Moinvaziri
ef3ef9a4b8 Version 4.0.3. 2023-11-13 10:04:26 -08:00
Nathan Moinvaziri
4f670cc7d7 Version 4.0.2. 2023-10-26 10:06:19 -07:00
Nathan Moinvaziri
0d81d2eaae Added ioapi.h shim for backwards compatibility. 2023-10-19 10:04:40 -07:00
Nathan Moinvaziri
aa4f87309d Silence warnings about BSD_SOURCE being deprecated. 2023-10-03 15:41:28 -07:00
Leander Schulten
7cb316f28b Fix pkgconfig file for private dependencies 2023-09-12 12:05:12 -07:00
Nathan Moinvaziri
680d6f1dcf Version 4.0.1. 2023-08-04 11:23:54 -07:00
pmq
23945b8f43 Add sanitizers from zlib-ng
Co-authored-by: Nathan Moinvaziri <nathan@nathanm.com>
2023-07-31 10:02:18 -07:00
Nathan Moinvaziri
706737f980 Change CMake to use CheckCSourceCompiles for compatibility. #720 2023-07-31 10:01:03 -07:00
Sam James
d14fb2f294 CMake: fix SONAME for MZ_COMPAT
zlib's minizip has SONAME 1. MZ_COMPAT intends to provide ABI and API compatibility,
so its SONAME should match.

The layout with this is:
```
libminizip.so -> libminizip.so.1
libminizip.so.1 -> libminizip.so.4.0.0
libminizip.so.4.0.0
```

Signed-off-by: Sam James <sam@gentoo.org>
2023-06-27 14:19:03 -07:00
Brad Smith
57be074f6f CMake: Fix build with OpenBSD #711
Setting _POSIX_C_SOURCE on OpenBSD breaks the build. _BSD_SOURCE needs
to be set at the same time to enable some functions.

In file included from /home/brad/tmp/ffmpeg-ports/ports/pobj/minizip-4.0.0/minizip-ng-4.0.0/test/test_main.cc:5:
In file included from /usr/local/include/gtest/gtest.h:55:
In file included from /usr/include/c++/v1/ostream:140:
In file included from /usr/include/c++/v1/locale:218:
/usr/include/c++/v1/__bsd_locale_fallbacks.h:122:17: error: use of undeclared identifier 'vasprintf'; did you mean 'vsprintf'?
    int __res = vasprintf(__s, __format, __va);
                ^
/usr/include/c++/v1/cstdio:124:9: note: 'vsprintf' declared here
using ::vsprintf _LIBCPP_USING_IF_EXISTS;
        ^
In file included from /home/brad/tmp/ffmpeg-ports/ports/pobj/minizip-4.0.0/minizip-ng-4.0.0/test/test_main.cc:5:
In file included from /usr/local/include/gtest/gtest.h:55:
In file included from /usr/include/c++/v1/ostream:140:
In file included from /usr/include/c++/v1/locale:218:
/usr/include/c++/v1/__bsd_locale_fallbacks.h:122:27: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'char **'
    int __res = vasprintf(__s, __format, __va);
                          ^~~
/usr/include/stdio.h:269:21: note: passing argument to parameter here
int      vsprintf(char *, const char *, __va_list);
                        ^
2 errors generated.
2023-06-11 09:47:50 -07:00
scribam
3da646bab3 Remove CMake POSITION_INDEPENDENT_CODE properties 2023-06-10 10:38:35 -07:00
Kyle Schwarz
382335a99e Fix cmake install location 2023-06-08 11:25:58 -07:00
Nathan Moinvaziri
a1f568d601 Version 4.0.0. 2023-05-19 10:27:46 -07:00
Nathan Moinvaziri
75508d7f92 Check for existence of BCrypt symbols before using BCrypt API. 2023-04-24 10:33:39 -07:00
Nathan Moinvaziri
a4c6fd3100 Improved check for zlib's example and example64 project. 2023-04-24 10:28:54 -07:00
Nathan Moinvaziri
a0b138e06c Change CMake to do BCrypt detection. 2023-04-19 10:45:38 -07:00
Nathan Moinvaziri
8eed140133 Remove MZ_BCRYPT option from CMake. 2023-04-18 17:32:08 -07:00
Nathan Moinvaziri
be23e857ed Fix ALIAS target name to be consistent with imported target.
Co-authored-by: SpaceIm <SpaceIm@users.noreply.github.com>
2023-04-15 23:12:19 -07:00
Nathan Moinvaziri
e15e1462f2 Proper use of GNUInstallDirs cmake module.
Co-authored-by: Tomasz Kłoczko <kloczek@users.noreply.github.com>
2023-04-15 23:05:15 -07:00
Nathan Moinvaziri
85a4ee2864 Added description and homepage url to CMake. 2023-04-15 23:03:31 -07:00
Nathan Moinvaziri
10d06fa43c Modify CMake to call project() early as possible.
Co-authored-by: SpaceIm <SpaceIm@users.noreply.github.com>
2023-04-15 22:55:07 -07:00
Nathan Moinvaziri
3b0461e229 Added _CRT_NONSTDC_NO_DEPRECATE for MSVC compilation with strdup. 2023-04-12 13:58:39 -07:00
Nathan Moinvaziri
3da04514cd Remove signing feature.
Too much work to maintain and rarely used. Continue to use v3 for that feature.
2023-04-09 11:14:26 -07:00
Nathan Moinvaziri
8d2488c481 Version 3.0.10. 2023-04-09 11:13:13 -07:00
lawadr
b3a7caee9a Fix MZ_FETCH_LIBS option for non-WIN32 systems
Using `cmake_dependent_option` overrides a previously set directory
scope MZ_FETCH_LIBS variable. This means if a project sets MZ_FETCH_LIBS
before adding minizip-ng as a subdirectory in order to force it to fetch
zlib, it will set the variable to OFF, only use `find_library` and never
fetch zlib on non-WIN32 systems. This is a regression from previous
behaviour.

Instead, revert back to using `option` as this obeys a directory scope
MZ_FETCH_LIBS variable set by a parent directory, allowing said parent
directory to control zlib version.
2023-03-29 17:34:35 -07:00
lawadr
944b6aa523 Use POSIX implementation if platform is not Windows
Non-UNIX platforms may support POSIX, partly or fully, through a
compatibility layer of some kind. If a non-Windows platform does not
have the UNIX CMake variable set, take the POSIX path through the CMake
anyway.
2023-03-29 17:34:00 -07:00
Sam James
36f6d729be CMake: set newer POSIX_C_SOURCE
Enable POSIX 2008 as it's needed for strdup(), otherwise we get:
```
/var/tmp/portage/sys-libs/minizip-ng-3.0.9/work/minizip-ng-3.0.9/mz_os.c: In function ‘mz_dir_make’:
/var/tmp/portage/sys-libs/minizip-ng-3.0.9/work/minizip-ng-3.0.9/mz_os.c:286:19: error: implicit declaration of function ‘strdup’ [-Werror=implicit-function-declaration]
  286 |     current_dir = strdup(path);
      |                   ^~~~~~
```

The man page for strdup says:
```
strdup():
	_XOPEN_SOURCE >= 500
	|| /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
	|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
```
2023-03-16 16:40:21 -07:00
Nathan Moinvaziri
db9df99b91 Version 3.0.9. 2023-03-16 09:37:00 -07:00
Nathan Moinvaziri
9829913018 Remove MZ_WINRT_API, use newer API if targeting newer version of Windows 2023-02-17 09:47:02 -08:00
Nathan Moinvaziri
03e4d2213d Remove copyright years. 2023-02-16 13:14:21 -08:00
Nathan Moinvaziri
abc80d1049 Clean up CMake options and add feature_info for MZ_BCRYPT. 2023-02-16 12:49:39 -08:00
Sergey Markelov
d1558fe864 Make cmake option MZ_BCRYPT conditional
Always ON on UWP and depends on a user choice or OFF otherwise.
2023-02-16 11:27:07 -08:00
Sergey Markelov
682dfd23e3 Implemented mz_crypt_sign for UWP 2023-02-16 11:27:07 -08:00