summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch224
-rw-r--r--meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch48
-rw-r--r--meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in24
-rw-r--r--meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in6
-rwxr-xr-xmeta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper16
-rw-r--r--meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb73
6 files changed, 391 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch b/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch
new file mode 100644
index 0000000000..3805ad3ebd
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf/0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch
@@ -0,0 +1,224 @@
1From 4d7b4d7c8e9966c593f472355607204c6c80fecb Mon Sep 17 00:00:00 2001
2From: Dan Kegel <dank@kegel.com>
3Date: Sun, 4 Jun 2017 19:19:55 -0700
4Subject: [PATCH] Minimal tweaks to compile with Visual C 2015
5
6Upstream-Status: Backport
7
8Signed-off-by: Maxin B. John <maxin.john@intel.com>
9---
10 getopt_long.c | 2 ++
11 libpkgconf/bsdstubs.c | 1 +
12 libpkgconf/libpkgconf.h | 2 +-
13 libpkgconf/path.c | 10 +++++-----
14 libpkgconf/pkg.c | 28 +++++++++++++++++++---------
15 libpkgconf/stdinc.h | 9 +++++++--
16 6 files changed, 35 insertions(+), 17 deletions(-)
17
18diff --git a/getopt_long.c b/getopt_long.c
19index afeb68d..5ce9bfd 100644
20--- a/getopt_long.c
21+++ b/getopt_long.c
22@@ -62,7 +62,9 @@
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26+#ifndef _WIN32
27 #include <unistd.h>
28+#endif
29
30 #define PKGCONF_HACK_LOGICAL_OR_ALL_VALUES
31
32diff --git a/libpkgconf/bsdstubs.c b/libpkgconf/bsdstubs.c
33index 8f70ff3..2c000ac 100644
34--- a/libpkgconf/bsdstubs.c
35+++ b/libpkgconf/bsdstubs.c
36@@ -17,6 +17,7 @@
37 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38 */
39
40+#include <stdlib.h>
41 #include <sys/types.h>
42 #include <string.h>
43
44diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h
45index 404bf0c..551d85d 100644
46--- a/libpkgconf/libpkgconf.h
47+++ b/libpkgconf/libpkgconf.h
48@@ -310,7 +310,7 @@ void pkgconf_audit_log_dependency(pkgconf_client_t *client, const pkgconf_pkg_t
49 /* path.c */
50 void pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter);
51 size_t pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter);
52-size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist, bool filter);
53+size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist, bool filter);
54 bool pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist);
55 void pkgconf_path_free(pkgconf_list_t *dirlist);
56 bool pkgconf_path_relocate(char *buf, size_t buflen);
57diff --git a/libpkgconf/path.c b/libpkgconf/path.c
58index dddb3bf..59e003e 100644
59--- a/libpkgconf/path.c
60+++ b/libpkgconf/path.c
61@@ -20,7 +20,7 @@
62 # include <sys/cygwin.h>
63 #endif
64
65-#ifdef HAVE_SYS_STAT_H
66+#if defined(HAVE_SYS_STAT_H) && ! defined(_WIN32)
67 # include <sys/stat.h>
68 # define PKGCONF_CACHE_INODES
69 #endif
70@@ -156,12 +156,12 @@ pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter)
71 /*
72 * !doc
73 *
74- * .. c:function:: size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist)
75+ * .. c:function:: size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist)
76 *
77 * Adds the paths specified in an environment variable to a path list. If the environment variable is not set,
78 * an optional default set of paths is added.
79 *
80- * :param char* environ: The environment variable to look up.
81+ * :param char* envvarname: The environment variable to look up.
82 * :param char* fallback: The fallback paths to use if the environment variable is not set.
83 * :param pkgconf_list_t* dirlist: The path list to add the path nodes to.
84 * :param bool filter: Whether to perform duplicate filtering.
85@@ -169,11 +169,11 @@ pkgconf_path_split(const char *text, pkgconf_list_t *dirlist, bool filter)
86 * :rtype: size_t
87 */
88 size_t
89-pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist, bool filter)
90+pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist, bool filter)
91 {
92 const char *data;
93
94- data = getenv(environ);
95+ data = getenv(envvarname);
96 if (data != NULL)
97 return pkgconf_path_split(data, dirlist, filter);
98
99diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c
100index 7aebd61..5dacae3 100644
101--- a/libpkgconf/pkg.c
102+++ b/libpkgconf/pkg.c
103@@ -30,6 +30,8 @@
104 # define PKG_CONFIG_REG_KEY "Software\\pkgconfig\\PKG_CONFIG_PATH"
105 # undef PKG_DEFAULT_PATH
106 # define PKG_DEFAULT_PATH "../lib/pkgconfig;../share/pkgconfig"
107+#define strncasecmp _strnicmp
108+#define strcasecmp _stricmp
109 #endif
110
111 #define PKG_CONFIG_EXT ".pc"
112@@ -134,21 +136,21 @@ static int pkgconf_pkg_parser_keyword_pair_cmp(const void *key, const void *ptr)
113 static void
114 pkgconf_pkg_parser_tuple_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
115 {
116- char **dest = ((void *) pkg + offset);
117+ char **dest = (char **)((char *) pkg + offset);
118 *dest = pkgconf_tuple_parse(client, &pkg->vars, value);
119 }
120
121 static void
122 pkgconf_pkg_parser_fragment_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
123 {
124- pkgconf_list_t *dest = ((void *) pkg + offset);
125+ pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset);
126 pkgconf_fragment_parse(client, dest, &pkg->vars, value);
127 }
128
129 static void
130 pkgconf_pkg_parser_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const ptrdiff_t offset, char *value)
131 {
132- pkgconf_list_t *dest = ((void *) pkg + offset);
133+ pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset);
134 pkgconf_dependency_parse(client, pkg, dest, value);
135 }
136
137@@ -238,7 +240,7 @@ pkgconf_pkg_validate(const pkgconf_client_t *client, const pkgconf_pkg_t *pkg)
138
139 for (i = 0; i < PKGCONF_ARRAY_SIZE(pkgconf_pkg_validations); i++)
140 {
141- char **p = ((void *) pkg + pkgconf_pkg_validations[i].offset);
142+ char **p = (char **)((char *) pkg + pkgconf_pkg_validations[i].offset);
143
144 if (*p != NULL)
145 continue;
146@@ -587,7 +589,7 @@ pkgconf_scan_all(pkgconf_client_t *client, void *data, pkgconf_pkg_iteration_fun
147
148 #ifdef _WIN32
149 static pkgconf_pkg_t *
150-pkgconf_pkg_find_in_registry_key(const pkgconf_client_t *client, HKEY hkey, const char *name)
151+pkgconf_pkg_find_in_registry_key(pkgconf_client_t *client, HKEY hkey, const char *name)
152 {
153 pkgconf_pkg_t *pkg = NULL;
154
155@@ -1048,8 +1050,12 @@ typedef struct {
156
157 static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_rules[] = {
158 [PKGCONF_CMP_ANY] = {
159- .rulecmp = {},
160- .depcmp = {},
161+ .rulecmp = {
162+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
163+ },
164+ .depcmp = {
165+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
166+ },
167 },
168 [PKGCONF_CMP_LESS_THAN] = {
169 .rulecmp = {
170@@ -1121,7 +1127,9 @@ static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_
171 [PKGCONF_CMP_EQUAL] = pkgconf_pkg_comparator_eq,
172 [PKGCONF_CMP_NOT_EQUAL] = pkgconf_pkg_comparator_ne
173 },
174- .depcmp = {},
175+ .depcmp = {
176+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
177+ },
178 },
179 [PKGCONF_CMP_NOT_EQUAL] = {
180 .rulecmp = {
181@@ -1133,7 +1141,9 @@ static const pkgconf_pkg_provides_vermatch_rule_t pkgconf_pkg_provides_vermatch_
182 [PKGCONF_CMP_EQUAL] = pkgconf_pkg_comparator_ne,
183 [PKGCONF_CMP_NOT_EQUAL] = pkgconf_pkg_comparator_eq
184 },
185- .depcmp = {},
186+ .depcmp = {
187+ [PKGCONF_CMP_ANY] = pkgconf_pkg_comparator_none,
188+ },
189 },
190 };
191
192diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h
193index 58cc6c7..ac7e53c 100644
194--- a/libpkgconf/stdinc.h
195+++ b/libpkgconf/stdinc.h
196@@ -24,9 +24,7 @@
197 #include <stdbool.h>
198 #include <stdarg.h>
199 #include <string.h>
200-#include <dirent.h>
201 #include <sys/types.h>
202-#include <unistd.h>
203 #include <stdint.h>
204
205 #ifdef _WIN32
206@@ -34,8 +32,15 @@
207 # include <windows.h>
208 # include <malloc.h>
209 # define PATH_DEV_NULL "nul"
210+# ifndef ssize_t
211+# include <BaseTsd.h>
212+# define ssize_t SSIZE_T
213+# endif
214+# include "win-dirent.h"
215 #else
216 # define PATH_DEV_NULL "/dev/null"
217+# include <dirent.h>
218+# include <unistd.h>
219 #endif
220
221 #endif
222--
2232.4.0
224
diff --git a/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch b/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch
new file mode 100644
index 0000000000..49ebe31e46
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf/0001-stdinc.h-fix-build-with-mingw.patch
@@ -0,0 +1,48 @@
1From ea28c5b34457cf7676181b284e22ea5f79a30d85 Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Thu, 13 Jul 2017 14:47:31 +0300
4Subject: [PATCH] stdinc.h: fix build with mingw
5
6Fixes this build error with mingw:
7...
8| compilation terminated.
9| In file included from ../pkgconf-1.3.7/libpkgconf/libpkgconf.h:19:0,
10| from ../pkgconf-1.3.7/libpkgconf/audit.c:16:
11| ../pkgconf-1.3.7/libpkgconf/stdinc.h:36:12: fatal error: BaseTsd.h: No
12such file or directory
13| # include <BaseTsd.h>
14
15Upstream-Status: Submitted
16
17Signed-off-by: Maxin B. John <maxin.john@intel.com>
18---
19 libpkgconf/stdinc.h | 10 +++++++++-
20 1 file changed, 9 insertions(+), 1 deletion(-)
21
22diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h
23index ac7e53c..d8efcf5 100644
24--- a/libpkgconf/stdinc.h
25+++ b/libpkgconf/stdinc.h
26@@ -33,10 +33,18 @@
27 # include <malloc.h>
28 # define PATH_DEV_NULL "nul"
29 # ifndef ssize_t
30+# ifndef __MINGW32__
31 # include <BaseTsd.h>
32+# else
33+# include <basetsd.h>
34+# endif
35 # define ssize_t SSIZE_T
36 # endif
37-# include "win-dirent.h"
38+# ifndef __MINGW32__
39+# include "win-dirent.h"
40+# else
41+# include <dirent.h>
42+# endif
43 #else
44 # define PATH_DEV_NULL "/dev/null"
45 # include <dirent.h>
46--
472.4.0
48
diff --git a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in
new file mode 100644
index 0000000000..4fc9b0a4a7
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-esdk.in
@@ -0,0 +1,24 @@
1#! /bin/sh
2
3# Orignal pkg-config-native action when called as pkg-config-native
4# NO Change here
5if [ "pkg-config-native" = "`basename $0`" ] ; then
6 PKG_CONFIG_PATH="@PATH_NATIVE@"
7 PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
8 unset PKG_CONFIG_SYSROOT_DIR
9else
10 # in this case check if we are in the esdk
11 if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then
12 parentpid=`ps -o ppid= -p $$`
13 parentpid_info=`ps -wo comm= -o args= -p $parentpid`
14
15 # check if we are being called from the kernel's make menuconfig
16 if ( echo $parentpid_info | grep -q check-lxdialog ) ; then
17 PKG_CONFIG_PATH="@PATH_NATIVE@"
18 PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
19 unset PKG_CONFIG_SYSROOT_DIR
20 fi
21 fi
22fi
23
24pkg-config.real "$@"
diff --git a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in
new file mode 100644
index 0000000000..9ed30a0d80
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in
@@ -0,0 +1,6 @@
1#! /bin/sh
2
3PKG_CONFIG_PATH="@PATH_NATIVE@"
4unset PKG_CONFIG_SYSROOT_DIR
5
6pkg-config "$@"
diff --git a/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper
new file mode 100755
index 0000000000..695f349566
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf/pkg-config-wrapper
@@ -0,0 +1,16 @@
1#!/bin/sh
2# pkgconf wrapper to deal with pkg-config/pkgconf compatibility issues
3#
4# Copyright (C) 2015 Christopher Larson <chris_larson@mentor.com>
5# License: MIT (see COPYING.MIT at the root of the repository for terms)
6
7for arg; do
8 case "$arg" in
9 --variable|--variable=*)
10 # pkg-config doesn't sysroot-prefix user variables
11 unset PKG_CONFIG_SYSROOT_DIR
12 ;;
13 esac
14done
15
16exec pkgconf "$@"
diff --git a/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb b/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
new file mode 100644
index 0000000000..5da0dd15bd
--- /dev/null
+++ b/meta/recipes-devtools/pkgconf/pkgconf_1.3.7.bb
@@ -0,0 +1,73 @@
1SUMMARY = "pkgconf provides compiler and linker configuration for development frameworks."
2DESCRIPTION = "pkgconf is a program which helps to configure compiler and linker \
3flags for development frameworks. It is similar to pkg-config from \
4freedesktop.org, providing additional functionality while also maintaining \
5compatibility."
6HOMEPAGE = "http://pkgconf.org"
7BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues"
8SECTION = "devel"
9PROVIDES += "pkgconfig"
10RPROVIDES_${PN} += "pkgconfig"
11DEFAULT_PREFERENCE = "-1"
12
13# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
14# ISC, but has different wording, so needs its own name.
15LICENSE = "pkgconf"
16LIC_FILES_CHKSUM = "file://COPYING;md5=548a9d1db10cc0a84810c313a0e9266f"
17
18SRC_URI = "\
19 https://distfiles.dereferenced.org/pkgconf/pkgconf-${PV}.tar.xz \
20 file://0001-Minimal-tweaks-to-compile-with-Visual-C-2015.patch \
21 file://0001-stdinc.h-fix-build-with-mingw.patch \
22 file://pkg-config-wrapper \
23 file://pkg-config-native.in \
24 file://pkg-config-esdk.in \
25"
26SRC_URI[md5sum] = "ac35c34d84eeb6a03d4d61b8555d6197"
27SRC_URI[sha256sum] = "1be7e40900c7467893c65f810211b1e68da3f8d5e70fddb883fc24839cad0339"
28
29inherit autotools update-alternatives
30
31EXTRA_OECONF += "--with-pkg-config-dir='${libdir}/pkgconfig:${datadir}/pkgconfig'"
32
33do_install_append () {
34 # Install a wrapper which deals, as much as possible with pkgconf vs
35 # pkg-config compatibility issues.
36 install -m 0755 "${WORKDIR}/pkg-config-wrapper" "${D}${bindir}/pkg-config"
37}
38
39do_install_append_class-native () {
40 # Install a pkg-config-native wrapper that will use the native sysroot instead
41 # of the MACHINE sysroot, for using pkg-config when building native tools.
42 sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
43 < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
44 install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
45 sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
46 -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
47 < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
48 install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
49}
50
51ALTERNATIVE_${PN} = "pkg-config"
52
53# When using the RPM generated automatic package dependencies, some packages
54# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by
55# specifying an appropriate provide.
56RPROVIDES_${PN} += "pkgconfig(pkg-config)"
57
58# Include pkg.m4 in the main package, leaving libpkgconf dev files in -dev
59FILES_${PN}-dev_remove = "${datadir}/aclocal"
60FILES_${PN} += "${datadir}/aclocal"
61
62BBCLASSEXTEND += "native nativesdk"
63
64pkgconf_sstate_fixup_esdk () {
65 if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
66 pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
67 mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
68 lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
69 sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
70 fi
71}
72
73SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconf_sstate_fixup_esdk"