From 7e231efd245996b886b501dad780761205ecf376 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Fri, 7 Jun 2013 17:52:20 +1000 Subject: packages libiconv glib: fix for removed gets() and apply patches in glib build --- src/glib.mk | 2 ++ src/libiconv-1-fixes.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 src/libiconv-1-fixes.patch diff --git a/src/glib.mk b/src/glib.mk index e3aaabe..fb748c2 100644 --- a/src/glib.mk +++ b/src/glib.mk @@ -23,6 +23,8 @@ define $(PKG)_BUILD # native build of libiconv (used by glib-genmarshal) cd '$(1).native' && $(call UNPACK_PKG_ARCHIVE,libiconv) + $(foreach PKG_PATCH,$(sort $(wildcard $(TOP_DIR)/src/libiconv-*.patch)), + (cd '$(1).native/$(libiconv_SUBDIR)' && $(PATCH) -p1 -u) < $(PKG_PATCH)) cd '$(1).native/$(libiconv_SUBDIR)' && ./configure \ --disable-shared \ --disable-nls diff --git a/src/libiconv-1-fixes.patch b/src/libiconv-1-fixes.patch new file mode 100644 index 0000000..cf3fef5 --- /dev/null +++ b/src/libiconv-1-fixes.patch @@ -0,0 +1,46 @@ +This file is part of MXE. +See index.html for further information. + +Contains ad hoc patches for cross building. + +From 47345f5dcfb91da8afed7c4e6c29faa2056db447 Mon Sep 17 00:00:00 2001 +From: MXE +Date: Fri, 7 Jun 2013 17:44:24 +1000 +Subject: [PATCH] remove gets since c++11 removed it + https://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00186.html + + +diff --git a/srclib/stdio.in.h b/srclib/stdio.in.h +index 473c84c..dfb59eb 100644 +--- a/srclib/stdio.in.h ++++ b/srclib/stdio.in.h +@@ -679,22 +679,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " + # endif + #endif + +-#if @GNULIB_GETS@ +-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +-# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +-# undef gets +-# define gets rpl_gets +-# endif +-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1))); +-_GL_CXXALIAS_RPL (gets, char *, (char *s)); +-# else +-_GL_CXXALIAS_SYS (gets, char *, (char *s)); +-# undef gets +-# endif +-_GL_CXXALIASWARN (gets); + /* It is very rare that the developer ever has full control of stdin, +- so any use of gets warrants an unconditional warning. Assume it is +- always declared, since it is required by C89. */ ++ so any use of gets warrants an unconditional warning; besides, C11 ++ removed it. */ ++#undef gets ++#if HAVE_RAW_DECL_GETS + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif + +-- +1.8.2.3 + -- cgit v0.12 From c88ab7c3728f9afe2864b97111c6a88def4e6634 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Sun, 12 Aug 2012 12:47:22 +0200 Subject: package nsis: fixed build failure Thanks to --- src/nsis-1-explicit-mingw-cross-prefix.patch | 39 --------------- src/nsis-1-fixes.patch | 71 ++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 39 deletions(-) delete mode 100644 src/nsis-1-explicit-mingw-cross-prefix.patch create mode 100644 src/nsis-1-fixes.patch diff --git a/src/nsis-1-explicit-mingw-cross-prefix.patch b/src/nsis-1-explicit-mingw-cross-prefix.patch deleted file mode 100644 index af10791..0000000 --- a/src/nsis-1-explicit-mingw-cross-prefix.patch +++ /dev/null @@ -1,39 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -This patch has been taken from: -http://sourceforge.net/tracker/index.php?func=detail&aid=3305366&group_id=22049&atid=373085 - ---- a/SCons/Tools/crossmingw.py -+++ b/SCons/Tools/crossmingw.py -@@ -61,6 +61,9 @@ prefixes = SCons.Util.Split(""" - """) - - def find(env): -+ if env.has_key('MINGW_CROSS_PREFIX'): -+ return env['MINGW_CROSS_PREFIX'] -+ - for prefix in prefixes: - # First search in the SCons path and then the OS path: - if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'): -diff --git a/SConstruct b/SConstruct -index 80872bc..4f113dd 100755 ---- a/SConstruct -+++ b/SConstruct -@@ -59,6 +59,7 @@ doc = [ - - path = ARGUMENTS.get('PATH', '') - toolset = ARGUMENTS.get('TOOLSET', '') -+mingw_cross_prefix = ARGUMENTS.get('MINGW_CROSS_PREFIX', '') - - if toolset and path: - defenv = Environment(ENV = {'PATH' : path}, TOOLS = toolset.split(',') + ['zip']) -@@ -69,6 +70,8 @@ else: - defenv = Environment(TOOLS = toolset.split(',') + ['zip']) - if not toolset and not path: - defenv = Environment() -+if mingw_cross_prefix: -+ defenv['MINGW_CROSS_PREFIX'] = mingw_cross_prefix - - Export('defenv') - diff --git a/src/nsis-1-fixes.patch b/src/nsis-1-fixes.patch new file mode 100644 index 0000000..b967082 --- /dev/null +++ b/src/nsis-1-fixes.patch @@ -0,0 +1,71 @@ +This file is part of MXE. +See index.html for further information. + +From 1cc3dd0dfd47bab82e06be916f9e57ef783406f9 Mon Sep 17 00:00:00 2001 +From: Mark Brand +Date: Sun, 12 Aug 2012 12:33:26 +0200 +Subject: [PATCH 1/2] explicit mingw cross prefix + +This patch has been taken from: +http://sourceforge.net/tracker/index.php?func=detail&aid=3305366&group_id=22049&atid=373085 + +diff --git a/SCons/Tools/crossmingw.py b/SCons/Tools/crossmingw.py +index d27e01c..fef9150 100755 +--- a/SCons/Tools/crossmingw.py ++++ b/SCons/Tools/crossmingw.py +@@ -61,6 +61,9 @@ prefixes = SCons.Util.Split(""" + """) + + def find(env): ++ if env.has_key('MINGW_CROSS_PREFIX'): ++ return env['MINGW_CROSS_PREFIX'] ++ + for prefix in prefixes: + # First search in the SCons path and then the OS path: + if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'): +diff --git a/SConstruct b/SConstruct +index 80872bc..4f113dd 100755 +--- a/SConstruct ++++ b/SConstruct +@@ -59,6 +59,7 @@ doc = [ + + path = ARGUMENTS.get('PATH', '') + toolset = ARGUMENTS.get('TOOLSET', '') ++mingw_cross_prefix = ARGUMENTS.get('MINGW_CROSS_PREFIX', '') + + if toolset and path: + defenv = Environment(ENV = {'PATH' : path}, TOOLS = toolset.split(',') + ['zip']) +@@ -69,6 +70,8 @@ else: + defenv = Environment(TOOLS = toolset.split(',') + ['zip']) + if not toolset and not path: + defenv = Environment() ++if mingw_cross_prefix: ++ defenv['MINGW_CROSS_PREFIX'] = mingw_cross_prefix + + Export('defenv') + +-- +1.7.10.4 + + +From 7df0fa80a65279ee7d99da8ec6abdddff7e040b0 Mon Sep 17 00:00:00 2001 +From: freeman +Date: Sun, 12 Aug 2012 12:36:39 +0200 +Subject: [PATCH 2/2] add missing header + + +diff --git a/Source/util.h b/Source/util.h +index 4259a6a..664923e 100755 +--- a/Source/util.h ++++ b/Source/util.h +@@ -25,6 +25,7 @@ + #ifndef _WIN32 + # include + # include ++# include + #endif + + +-- +1.7.10.4 + -- cgit v0.12