diff options
author | obache <obache> | 2013-04-13 11:10:03 +0000 |
---|---|---|
committer | obache <obache> | 2013-04-13 11:10:03 +0000 |
commit | 12d16852a6a9a408d8635dc767dfdcec37d281e7 (patch) | |
tree | fa9336b5b4ff3c2af76dba7e90e5960a1ed82c1a /devel/pkg-config/patches | |
parent | 22503df12da39895c4ade8ccfbd190ffea2751dd (diff) | |
download | pkgsrc-12d16852a6a9a408d8635dc767dfdcec37d281e7.tar.gz |
Apply cygport glib2 2.32.1-not-win32.patch to fix build on Cygwin.
Diffstat (limited to 'devel/pkg-config/patches')
-rw-r--r-- | devel/pkg-config/patches/patch-glib_configure | 16 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_configure.ac | 16 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_glib_gatomic.c | 15 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_glib_gcharset.c | 15 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_glib_gconvert.c | 43 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_glib_gfileutils.c | 31 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_glib_glib.h | 15 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_glib_gutf8.c | 15 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_glib_gutils.c | 42 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_glib_gutils.h | 23 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_glib_gwin32.h | 40 | ||||
-rw-r--r-- | devel/pkg-config/patches/patch-glib_glib_libcharset_localcharset.c | 89 |
12 files changed, 360 insertions, 0 deletions
diff --git a/devel/pkg-config/patches/patch-glib_configure b/devel/pkg-config/patches/patch-glib_configure new file mode 100644 index 00000000000..bffd3fab5d7 --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_configure @@ -0,0 +1,16 @@ +$NetBSD: patch-glib_configure,v 1.1 2013/04/13 11:10:04 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/configure.orig 2013-01-22 13:13:56.000000000 +0000 ++++ glib/configure +@@ -25733,9 +25733,6 @@ $as_echo "$broken_poll" >&6; } + + + case $host in +- *-*-cygwin*) +- G_LIBS_EXTRA="-luser32 -lkernel32" +- ;; + *-*-mingw*) + G_LIBS_EXTRA="-lws2_32 -lole32 -lwinmm -lshlwapi" + ;; diff --git a/devel/pkg-config/patches/patch-glib_configure.ac b/devel/pkg-config/patches/patch-glib_configure.ac new file mode 100644 index 00000000000..206377c7fd0 --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_configure.ac @@ -0,0 +1,16 @@ +$NetBSD: patch-glib_configure.ac,v 1.1 2013/04/13 11:10:04 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/configure.ac.orig 2012-10-13 14:35:36.000000000 +0000 ++++ glib/configure.ac +@@ -2397,9 +2397,6 @@ dnl *** Win32 API libs *** + dnl ********************** + + case $host in +- *-*-cygwin*) +- G_LIBS_EXTRA="-luser32 -lkernel32" +- ;; + *-*-mingw*) + G_LIBS_EXTRA="-lws2_32 -lole32 -lwinmm -lshlwapi" + ;; diff --git a/devel/pkg-config/patches/patch-glib_glib_gatomic.c b/devel/pkg-config/patches/patch-glib_glib_gatomic.c new file mode 100644 index 00000000000..a95464c1206 --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_glib_gatomic.c @@ -0,0 +1,15 @@ +$NetBSD: patch-glib_glib_gatomic.c,v 1.1 2013/04/13 11:10:04 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/glib/gatomic.c.orig 2012-10-02 05:49:07.000000000 +0000 ++++ glib/glib/gatomic.c +@@ -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) diff --git a/devel/pkg-config/patches/patch-glib_glib_gcharset.c b/devel/pkg-config/patches/patch-glib_glib_gcharset.c new file mode 100644 index 00000000000..66c5314dc30 --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_glib_gcharset.c @@ -0,0 +1,15 @@ +$NetBSD: patch-glib_glib_gcharset.c,v 1.1 2013/04/13 11:10:04 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/glib/gcharset.c.orig 2012-10-02 05:49:07.000000000 +0000 ++++ glib/glib/gcharset.c +@@ -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 diff --git a/devel/pkg-config/patches/patch-glib_glib_gconvert.c b/devel/pkg-config/patches/patch-glib_glib_gconvert.c new file mode 100644 index 00000000000..3ab533fff37 --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_glib_gconvert.c @@ -0,0 +1,43 @@ +$NetBSD: patch-glib_glib_gconvert.c,v 1.1 2013/04/13 11:10:04 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/glib/gconvert.c.orig 2012-10-02 05:49:07.000000000 +0000 ++++ glib/glib/gconvert.c +@@ -33,9 +33,6 @@ + + #ifdef G_OS_WIN32 + #include "win_iconv.c" +-#endif +- +-#ifdef G_PLATFORM_WIN32 + #define STRICT + #include <windows.h> + #undef STRICT +@@ -1262,7 +1259,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; + +@@ -1378,7 +1375,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) +@@ -1407,7 +1404,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) diff --git a/devel/pkg-config/patches/patch-glib_glib_gfileutils.c b/devel/pkg-config/patches/patch-glib_glib_gfileutils.c new file mode 100644 index 00000000000..2d2dd6ad824 --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_glib_gfileutils.c @@ -0,0 +1,31 @@ +$NetBSD: patch-glib_glib_gfileutils.c,v 1.1 2013/04/13 11:10:04 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/glib/gfileutils.c.orig 2012-10-13 14:35:36.000000000 +0000 ++++ glib/glib/gfileutils.c +@@ -2175,7 +2175,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]) && +@@ -2185,7 +2185,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; + +@@ -2193,7 +2192,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]) + { diff --git a/devel/pkg-config/patches/patch-glib_glib_glib.h b/devel/pkg-config/patches/patch-glib_glib_glib.h new file mode 100644 index 00000000000..42becd6de30 --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_glib_glib.h @@ -0,0 +1,15 @@ +$NetBSD: patch-glib_glib_glib.h,v 1.1 2013/04/13 11:10:04 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/glib/glib.h.orig 2012-10-02 05:49:07.000000000 +0000 ++++ glib/glib/glib.h +@@ -95,7 +95,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 + diff --git a/devel/pkg-config/patches/patch-glib_glib_gutf8.c b/devel/pkg-config/patches/patch-glib_glib_gutf8.c new file mode 100644 index 00000000000..f5138a04cef --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_glib_gutf8.c @@ -0,0 +1,15 @@ +$NetBSD: patch-glib_glib_gutf8.c,v 1.1 2013/04/13 11:10:04 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/glib/gutf8.c.orig 2012-10-13 14:35:36.000000000 +0000 ++++ glib/glib/gutf8.c +@@ -27,7 +27,7 @@ + #endif + #include <string.h> + +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + #include <stdio.h> + #define STRICT + #include <windows.h> diff --git a/devel/pkg-config/patches/patch-glib_glib_gutils.c b/devel/pkg-config/patches/patch-glib_glib_gutils.c new file mode 100644 index 00000000000..4f11cb72cc0 --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_glib_gutils.c @@ -0,0 +1,42 @@ +$NetBSD: patch-glib_glib_gutils.c,v 1.1 2013/04/13 11:10:05 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/glib/gutils.c.orig 2012-10-13 14:35:36.000000000 +0000 ++++ glib/glib/gutils.c +@@ -71,7 +71,7 @@ + #include "garray.h" + #include "glibintl.h" + +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + #include "gconvert.h" + #include "gwin32.h" + #endif +@@ -85,16 +85,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*/ +@@ -130,7 +127,7 @@ + #include <langinfo.h> + #endif + +-#ifdef G_PLATFORM_WIN32 ++#ifdef G_OS_WIN32 + + gchar * + _glib_get_dll_directory (void) diff --git a/devel/pkg-config/patches/patch-glib_glib_gutils.h b/devel/pkg-config/patches/patch-glib_glib_gutils.h new file mode 100644 index 00000000000..ce21101b21d --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_glib_gutils.h @@ -0,0 +1,23 @@ +$NetBSD: patch-glib_glib_gutils.h,v 1.1 2013/04/13 11:10:05 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/glib/gutils.h.orig 2012-10-13 14:35:36.000000000 +0000 ++++ glib/glib/gutils.h +@@ -342,7 +342,7 @@ G_END_DECLS + * 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) \ +@@ -370,6 +370,6 @@ DllMain (HINSTANCE hinstDLL, \ + + #endif /* !G_DISABLE_DEPRECATED */ + +-#endif /* G_PLATFORM_WIN32 */ ++#endif /* G_OS_WIN32 */ + + #endif /* __G_UTILS_H__ */ diff --git a/devel/pkg-config/patches/patch-glib_glib_gwin32.h b/devel/pkg-config/patches/patch-glib_glib_gwin32.h new file mode 100644 index 00000000000..d29ab371d42 --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_glib_gwin32.h @@ -0,0 +1,40 @@ +$NetBSD: patch-glib_glib_gwin32.h,v 1.1 2013/04/13 11:10:05 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/glib/gwin32.h.orig 2012-10-02 05:49:07.000000000 +0000 ++++ glib/glib/gwin32.h +@@ -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 +@@ -67,7 +65,6 @@ G_BEGIN_DECLS + */ + 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" +@@ -113,6 +110,6 @@ gchar* g_win32_locale_filename_ + + G_END_DECLS + +-#endif /* G_PLATFORM_WIN32 */ ++#endif /* G_OS_WIN32 */ + + #endif /* __G_WIN32_H__ */ diff --git a/devel/pkg-config/patches/patch-glib_glib_libcharset_localcharset.c b/devel/pkg-config/patches/patch-glib_glib_libcharset_localcharset.c new file mode 100644 index 00000000000..0d663cc9c54 --- /dev/null +++ b/devel/pkg-config/patches/patch-glib_glib_libcharset_localcharset.c @@ -0,0 +1,89 @@ +$NetBSD: patch-glib_glib_libcharset_localcharset.c,v 1.1 2013/04/13 11:10:05 obache Exp $ + +* from glib2.0.cygport 2.32.1-not-win32.patch + +--- glib/glib/libcharset/localcharset.c.orig 2012-10-02 05:49:07.000000000 +0000 ++++ glib/glib/libcharset/localcharset.c +@@ -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. */ |