uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,324 @@
--- a/glib/configure.ac 2013-08-04 20:21:20.808722600 -0500
+++ b/glib/configure.ac 2013-08-04 18:30:21.852852200 -0500
@@ -1880,7 +1880,7 @@ dnl ************************************
AC_MSG_CHECKING(for platform-dependent source)
case "$host" in
- *-*-cygwin*|*-*-mingw*)
+ *-*-mingw*)
PLATFORMDEP=gwin32.lo
;;
*)
@@ -2594,9 +2594,6 @@ dnl *** Win32 API libs ***
dnl **********************
case $host in
- *-*-cygwin*)
- G_LIBS_EXTRA="-luser32 -lkernel32"
- ;;
*-*-mingw*)
G_LIBS_EXTRA="-lws2_32 -lole32 -lwinmm -lshlwapi"
;;
--- a/glib/glib/gatomic.c 2013-08-04 20:21:20.907728300 -0500
+++ b/glib/glib/gatomic.c 2013-08-04 18:11:14.000000000 -0500
@@ -464,7 +464,7 @@ gsize
return g_atomic_pointer_xor ((volatile gpointer *) atomic, val);
}
-#elif defined (G_PLATFORM_WIN32)
+#elif defined (G_OS_WIN32)
#include <windows.h>
#if !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64) && !(defined _MSC_VER && _MSC_VER <= 1200)
--- a/glib/glib/gcharset.c 2013-08-04 20:21:20.925729300 -0500
+++ b/glib/glib/gcharset.c 2013-08-04 18:11:14.000000000 -0500
@@ -496,7 +496,7 @@ guess_category_value (const gchar *categ
if ((retval != NULL) && (retval[0] != '\0'))
return retval;
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
/* g_win32_getlocale() first checks for LC_ALL, LC_MESSAGES and
* LANG, which we already did above. Oh well. The main point of
* calling g_win32_getlocale() is to get the thread's locale as used
--- a/glib/glib/gconvert.c 2013-08-04 20:21:20.933729800 -0500
+++ b/glib/glib/gconvert.c 2013-08-04 18:11:14.000000000 -0500
@@ -33,9 +33,6 @@
#ifdef G_OS_WIN32
#include "win_iconv.c"
-#endif
-
-#ifdef G_PLATFORM_WIN32
#define STRICT
#include <windows.h>
#undef STRICT
@@ -1258,7 +1255,7 @@ g_locale_from_utf8 (const gchar *utf8str
charset, "UTF-8", bytes_read, bytes_written, error);
}
-#ifndef G_PLATFORM_WIN32
+#ifndef G_OS_WIN32
typedef struct _GFilenameCharsetCache GFilenameCharsetCache;
@@ -1374,7 +1371,7 @@ g_get_filename_charsets (const gchar ***
return cache->is_utf8;
}
-#else /* G_PLATFORM_WIN32 */
+#else /* G_OS_WIN32 */
gboolean
g_get_filename_charsets (const gchar ***filename_charsets)
@@ -1403,7 +1400,7 @@ g_get_filename_charsets (const gchar ***
#endif
}
-#endif /* G_PLATFORM_WIN32 */
+#endif /* G_OS_WIN32 */
static gboolean
get_filename_charset (const gchar **filename_charset)
--- a/glib/glib/gfileutils.c 2013-08-04 20:21:20.942730300 -0500
+++ b/glib/glib/gfileutils.c 2013-08-04 18:11:14.000000000 -0500
@@ -2153,7 +2153,7 @@ g_path_skip_root (const gchar *file_name
{
g_return_val_if_fail (file_name != NULL, NULL);
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
/* Skip \\server\share or //server/share */
if (G_IS_DIR_SEPARATOR (file_name[0]) &&
G_IS_DIR_SEPARATOR (file_name[1]) &&
@@ -2163,7 +2163,6 @@ g_path_skip_root (const gchar *file_name
gchar *p;
p = strchr (file_name + 2, G_DIR_SEPARATOR);
-#ifdef G_OS_WIN32
{
gchar *q;
@@ -2171,7 +2170,6 @@ g_path_skip_root (const gchar *file_name
if (p == NULL || (q != NULL && q < p))
p = q;
}
-#endif
if (p && p > file_name + 2 && p[1])
{
--- a/glib/glib/glib.h 2013-08-04 20:21:20.949730700 -0500
+++ b/glib/glib/glib.h 2013-08-04 18:11:14.000000000 -0500
@@ -96,7 +96,7 @@
#include <glib/gvariant.h>
#include <glib/gversion.h>
#include <glib/gversionmacros.h>
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
#include <glib/gwin32.h>
#endif
--- a/glib/glib/gutf8.c 2013-08-04 20:21:20.984732700 -0500
+++ b/glib/glib/gutf8.c 2013-08-04 18:11:14.000000000 -0500
@@ -27,7 +27,7 @@
#endif
#include <string.h>
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
#include <stdio.h>
#define STRICT
#include <windows.h>
--- a/glib/glib/gutils.c 2013-08-04 20:21:21.015734500 -0500
+++ b/glib/glib/gutils.c 2013-08-04 18:11:14.000000000 -0500
@@ -72,7 +72,7 @@
#include "garray.h"
#include "glibintl.h"
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
#include "gconvert.h"
#include "gwin32.h"
#endif
@@ -86,16 +86,13 @@
* These are portable utility functions.
*/
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
# include <windows.h>
# ifndef GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
# define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2
# define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 4
# endif
# include <lmcons.h> /* For UNLEN */
-#endif /* G_PLATFORM_WIN32 */
-
-#ifdef G_OS_WIN32
# include <direct.h>
# include <shlobj.h>
/* older SDK (e.g. msvc 5.0) does not have these*/
@@ -131,7 +128,7 @@
#include <langinfo.h>
#endif
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
gchar *
_glib_get_dll_directory (void)
--- a/glib/glib/gutils.h 2013-08-04 20:21:21.067737500 -0500
+++ b/glib/glib/gutils.h 2013-08-04 18:11:14.000000000 -0500
@@ -350,7 +350,7 @@ g_bit_storage (gulong number)
* On non-Windows platforms, expands to nothing.
*/
-#ifndef G_PLATFORM_WIN32
+#ifndef G_OS_WIN32
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
#else
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) \
@@ -378,7 +378,7 @@ DllMain (HINSTANCE hinstDLL, \
#endif /* !G_DISABLE_DEPRECATED */
-#endif /* G_PLATFORM_WIN32 */
+#endif /* G_OS_WIN32 */
G_END_DECLS
--- a/glib/glib/gwin32.h 2013-08-04 20:21:21.081738300 -0500
+++ b/glib/glib/gwin32.h 2013-08-04 18:11:14.000000000 -0500
@@ -33,7 +33,7 @@
#include <glib/gtypes.h>
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
G_BEGIN_DECLS
@@ -41,8 +41,6 @@ G_BEGIN_DECLS
#define MAXPATHLEN 1024
#endif
-#ifdef G_OS_WIN32
-
/*
* To get prototypes for the following POSIXish functions, you have to
* include the indicated non-POSIX headers. The functions are defined
@@ -68,7 +66,6 @@ G_BEGIN_DECLS
GLIB_AVAILABLE_IN_ALL
gint g_win32_ftruncate (gint f,
guint size);
-#endif /* G_OS_WIN32 */
/* The MS setlocale uses locale names of the form "English_United
* States.1252" etc. We want the Unixish standard form "en", "zh_TW"
@@ -112,7 +109,7 @@ gchar* g_win32_locale_filename_
G_END_DECLS
-#endif /* G_PLATFORM_WIN32 */
+#endif /* G_OS_WIN32 */
#ifdef G_OS_WIN32
#ifdef _WIN64
--- a/glib/glib/libcharset/localcharset.c 2013-08-04 20:21:21.095739100 -0500
+++ b/glib/glib/libcharset/localcharset.c 2013-08-04 18:11:14.000000000 -0500
@@ -46,10 +46,6 @@
# include <locale.h>
# endif
# endif
-# ifdef __CYGWIN__
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-# endif
#elif defined WIN32_NATIVE
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
@@ -111,7 +107,7 @@ _g_locale_get_charset_aliases (void)
cp = charset_aliases;
if (cp == NULL)
{
-#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
+#if !(defined VMS || defined WIN32_NATIVE)
FILE *fp;
const char *dir;
const char *base = "charset.alias";
@@ -237,7 +233,7 @@ _g_locale_get_charset_aliases (void)
"DECKOREAN" "\0" "EUC-KR" "\0";
# endif
-# if defined WIN32_NATIVE || defined __CYGWIN__
+# if defined WIN32_NATIVE
/* To avoid the troubles of installing a separate file in the same
directory as the DLL and of retrieving the DLL's directory at
runtime, simply inline the aliases here. */
@@ -292,53 +288,6 @@ _g_locale_charset_raw (void)
/* Most systems support nl_langinfo (CODESET) nowadays. */
codeset = nl_langinfo (CODESET);
-# ifdef __CYGWIN__
- /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always
- returns "US-ASCII". As long as this is not fixed, return the suffix
- of the locale name from the environment variables (if present) or
- the codepage as a number. */
- if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
- {
- const char *locale;
- static char buf[2 + 10 + 1];
-
- locale = getenv ("LC_ALL");
- if (locale == NULL || locale[0] == '\0')
- {
- locale = getenv ("LC_CTYPE");
- if (locale == NULL || locale[0] == '\0')
- locale = getenv ("LANG");
- }
- if (locale != NULL && locale[0] != '\0')
- {
- /* If the locale name contains an encoding after the dot, return
- it. */
- const char *dot = strchr (locale, '.');
-
- if (dot != NULL)
- {
- const char *modifier;
-
- dot++;
- /* Look for the possible @... trailer and remove it, if any. */
- modifier = strchr (dot, '@');
- if (modifier == NULL)
- return dot;
- if (modifier - dot < sizeof (buf))
- {
- memcpy (buf, dot, modifier - dot);
- buf [modifier - dot] = '\0';
- return buf;
- }
- }
- }
-
- /* Woe32 has a function returning the locale's codepage as a number. */
- sprintf (buf, "CP%u", GetACP ());
- codeset = buf;
- }
-# endif
-
# else
/* On old systems which lack it, use setlocale or getenv. */
diff --git a/glib/gtypes.h b/glib/gtypes.h
index c18e0bf..816685a 100644
--- a/glib/glib/gtypes.h
+++ b/glib/glib/gtypes.h
@@ -462,7 +462,7 @@ G_END_DECLS
* properly get exported in Windows DLLs.
*/
#ifndef GLIB_VAR
-# ifdef G_PLATFORM_WIN32
+# ifdef G_OS_WIN32
# ifdef GLIB_STATIC_COMPILATION
# define GLIB_VAR extern
# else /* !GLIB_STATIC_COMPILATION */

View file

@ -0,0 +1,51 @@
{ lib, stdenv, fetchurl, libiconv, vanilla ? false }:
with lib;
stdenv.mkDerivation rec {
pname = "pkg-config";
version = "0.29.2";
src = fetchurl {
url = "https://pkg-config.freedesktop.org/releases/${pname}-${version}.tar.gz";
sha256 = "14fmwzki1rlz8bs2p810lk6jqdxsk966d8drgsjmi54cd00rrikg";
};
outputs = [ "out" "man" "doc" ];
strictDeps = true;
# Process Requires.private properly, see
# http://bugs.freedesktop.org/show_bug.cgi?id=4738, migrated to
# https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/28
patches = optional (!vanilla) ./requires-private.patch
++ optional stdenv.isCygwin ./2.36.3-not-win32.patch;
# These three tests fail due to a (desired) behavior change from our ./requires-private.patch
postPatch = if vanilla then null else ''
rm -f check/check-requires-private check/check-gtk check/missing
'';
buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
configureFlags = [ "--with-internal-glib" ]
++ optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ]
# Can't run these tests while cross-compiling
++ optional (stdenv.hostPlatform != stdenv.buildPlatform)
[ "glib_cv_stack_grows=no"
"glib_cv_uscore=no"
"ac_cv_func_posix_getpwuid_r=yes"
"ac_cv_func_posix_getgrgid_r=yes"
];
enableParallelBuilding = true;
doCheck = true;
postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file
meta = {
description = "A tool that allows packages to find out information about other packages";
homepage = "http://pkg-config.freedesktop.org/wiki/";
platforms = platforms.all;
license = licenses.gpl2Plus;
};
}

View file

@ -0,0 +1,17 @@
diff --git a/main.c b/main.c
index b61ca34..5a420c2 100644
--- a/main.c
+++ b/main.c
@@ -602,10 +602,10 @@ main (int argc, char **argv)
else
disable_private_libs();
- /* honor Requires.private if any Cflags are requested or any static
+ /* honor Requires.private if any any static
* libs are requested */
- if (pkg_flags & CFLAGS_ANY || want_requires_private || want_exists ||
+ if (want_requires_private ||
(want_static_lib_list && (pkg_flags & LIBS_ANY)))
enable_requires_private();