[DO-972][DO-980] add freetype and pkgconf recipes (!6)

Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/6
This commit is contained in:
Aleksandr Vodyanov
2024-12-06 16:48:28 +03:00
parent 25212f3eed
commit cb6a88b7f4
184 changed files with 1708 additions and 9302 deletions

View File

@@ -0,0 +1,20 @@
--- meson.build
+++ meson.build
@@ -84,12 +84,16 @@
soversion : '3',
)
+libpkgconf_dep = declare_dependency(
+ link_with: libpkgconf,
+ compile_args: '-DLIBPKGCONF_EXPORT',
+)
pkgconf_exe = executable('pkgconf',
'cli/main.c',
'cli/getopt_long.c',
'cli/renderer-msvc.c',
- link_with : libpkgconf,
+ dependencies: libpkgconf_dep,
install : true)
if get_option('tests')

View File

@@ -0,0 +1,19 @@
--- meson.build
+++ meson.build
@@ -31,11 +31,11 @@
- ['HAVE_CYGWIN_CONV_PATH', 'cygwin_conv_path', 'sys/cygwin.h'],
- ['HAVE_STRLCAT', 'strlcat', 'string.h'],
- ['HAVE_STRLCPY', 'strlcpy', 'string.h'],
- ['HAVE_STRNDUP', 'strndup', 'string.h'],
+ ['HAVE_CYGWIN_CONV_PATH', 'cygwin_conv_path(CCP_POSIX_TO_WIN_A, (void*)0, (void*)0, 0)', 'sys/cygwin.h'],
+ ['HAVE_STRLCAT', 'strlcat((void*)0, (void*)0, 0)', 'string.h'],
+ ['HAVE_STRLCPY', 'strlcpy((void*)0, (void*)0, 0)', 'string.h'],
+ ['HAVE_STRNDUP', 'strndup((void*)0, 0)', 'string.h'],
]
foreach f : check_functions
- if cc.has_function(f.get(1), prefix : '#include <' + f.get(2) + '>') and cc.has_header_symbol(f.get(2), f.get(1))
+ if cc.links('#include <' + f.get(2) + '>\nint main() { ' + f.get(1) + ';}')
cdata.set(f.get(0), 1)
endif
endforeach

View File

@@ -0,0 +1,11 @@
--- meson.build
+++ meson.build
@@ -63,7 +63,7 @@
subdir('libpkgconf')
-libpkgconf = shared_library('pkgconf',
+libpkgconf = library('pkgconf',
'libpkgconf/argvsplit.c',
'libpkgconf/audit.c',
'libpkgconf/bsdstubs.c',

View File

@@ -0,0 +1,11 @@
--- libpkgconf/path.c
+++ libpkgconf/path.c
@@ -146,7 +146,7 @@
return 0;
iter = workbuf = strdup(text);
- while ((p = strtok(iter, PKG_CONFIG_PATH_SEP_S)) != NULL)
+ while ((p = strtok(iter, ":;")) != NULL)
{
pkgconf_path_add(p, dirlist, filter);

View File

@@ -0,0 +1,19 @@
--- meson.build
+++ meson.build
@@ -13,11 +13,11 @@
- ['HAVE_CYGWIN_CONV_PATH', 'cygwin_conv_path', 'sys/cygwin.h'],
- ['HAVE_STRLCAT', 'strlcat', 'string.h'],
- ['HAVE_STRLCPY', 'strlcpy', 'string.h'],
- ['HAVE_STRNDUP', 'strndup', 'string.h'],
+ ['HAVE_CYGWIN_CONV_PATH', 'cygwin_conv_path(CCP_POSIX_TO_WIN_A, (void*)0, (void*)0, 0)', 'sys/cygwin.h'],
+ ['HAVE_STRLCAT', 'strlcat((void*)0, (void*)0, 0)', 'string.h'],
+ ['HAVE_STRLCPY', 'strlcpy((void*)0, (void*)0, 0)', 'string.h'],
+ ['HAVE_STRNDUP', 'strndup((void*)0, 0)', 'string.h'],
]
foreach f : check_functions
- if cc.has_function(f.get(1), prefix : '#include <' + f.get(2) + '>') and cc.has_header_symbol(f.get(2), f.get(1))
+ if cc.links('#include <' + f.get(2) + '>\nint main() { ' + f.get(1) + ';}')
cdata.set(f.get(0), 1)
endif
endforeach

View File

@@ -0,0 +1,44 @@
diff --git a/meson.build b/meson.build
index e7822b8da..8f7aa0075 100644
--- a/meson.build
+++ b/meson.build
@@ -45,6 +45,13 @@ cdata.set('abs_top_builddir', meson.build_root())
subdir('libpkgconf')
+libtype = get_option('default_library')
+if libtype == 'static'
+ build_static = '-DPKGCONFIG_IS_STATIC'
+else
+ build_static = '-DLIBPKGCONF_EXPORT'
+endif
+
libpkgconf = library('pkgconf',
'libpkgconf/argvsplit.c',
'libpkgconf/audit.c',
@@ -60,7 +67,7 @@ libpkgconf = library('pkgconf',
'libpkgconf/pkg.c',
'libpkgconf/queue.c',
'libpkgconf/tuple.c',
- c_args: '-DLIBPKGCONF_EXPORT',
+ c_args: build_static,
install : true,
version : '3.0.0',
soversion : '3',
@@ -73,13 +80,16 @@ pkg.generate(libpkgconf,
url: 'http://github.com/pkgconf/pkgconf',
filebase : 'libpkgconf',
subdirs: ['pkgconf'],
+ extra_cflags : build_static
)
+
pkgconf_exe = executable('pkgconf',
'cli/main.c',
'cli/getopt_long.c',
'cli/renderer-msvc.c',
link_with : libpkgconf,
+ c_args: build_static,
install : true)
if get_option('tests')

View File

@@ -0,0 +1,11 @@
--- libpkgconf/path.c
+++ libpkgconf/path.c
@@ -142,7 +142,7 @@
return 0;
iter = workbuf = strdup(text);
- while ((p = strtok(iter, PKG_CONFIG_PATH_SEP_S)) != NULL)
+ while ((p = strtok(iter, ":;")) != NULL)
{
pkgconf_path_add(p, dirlist, filter);

View File

@@ -0,0 +1,11 @@
--- libpkgconf/path.c
+++ libpkgconf/path.c
@@ -138,7 +138,7 @@
return 0;
iter = workbuf = strdup(text);
- while ((p = strtok(iter, PKG_CONFIG_PATH_SEP_S)) != NULL)
+ while ((p = strtok(iter, ":;")) != NULL)
{
pkgconf_path_add(p, dirlist, filter);

View File

@@ -0,0 +1,11 @@
--- libpkgconf/path.c
+++ libpkgconf/path.c
@@ -170,7 +170,7 @@
return 0;
iter = workbuf = strdup(text);
- while ((p = strtok(iter, PKG_CONFIG_PATH_SEP_S)) != NULL)
+ while ((p = strtok(iter, ":;")) != NULL)
{
pkgconf_path_add(p, dirlist, filter);

View File

@@ -0,0 +1,11 @@
--- libpkgconf/path.c
+++ libpkgconf/path.c
@@ -170,7 +170,7 @@
return 0;
iter = workbuf = strdup(text);
- while ((p = strtok(iter, PKG_CONFIG_PATH_SEP_S)) != NULL)
+ while ((p = strtok(iter, ";:")) != NULL)
{
pkgconf_path_add(p, dirlist, filter);