diff options
author | Mark H Weaver <mhw@netris.org> | 2016-10-17 16:47:12 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2016-10-17 16:47:12 -0400 |
commit | dcaf70897a0bad38a4638a2905aaa3c46b1f1402 (patch) | |
tree | 439c42bf27972a628ebc0fef11a63b9130ca19a5 /gnu/packages/patches | |
parent | bf62b8ff79f9d60136996b8251b6475965cf4994 (diff) | |
parent | 040b6299d505c034b4960c335434a500ae2f8187 (diff) | |
download | guix-dcaf70897a0bad38a4638a2905aaa3c46b1f1402.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/artanis-fix-Makefile.in.patch | 70 | ||||
-rw-r--r-- | gnu/packages/patches/freeimage-CVE-2016-5684.patch | 34 | ||||
-rw-r--r-- | gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch | 206 | ||||
-rw-r--r-- | gnu/packages/patches/gcc-6-cross-environment-variables.patch | 65 | ||||
-rw-r--r-- | gnu/packages/patches/gd-CVE-2016-8670.patch | 38 | ||||
-rw-r--r-- | gnu/packages/patches/hdf4-architectures.patch | 579 | ||||
-rw-r--r-- | gnu/packages/patches/irrlicht-mesa-10.patch | 46 | ||||
-rw-r--r-- | gnu/packages/patches/node-9077.patch | 30 |
8 files changed, 1022 insertions, 46 deletions
diff --git a/gnu/packages/patches/artanis-fix-Makefile.in.patch b/gnu/packages/patches/artanis-fix-Makefile.in.patch new file mode 100644 index 0000000000..7e4800d364 --- /dev/null +++ b/gnu/packages/patches/artanis-fix-Makefile.in.patch @@ -0,0 +1,70 @@ +Applies until an Artanis release comes with the following patches +applied: +* <https://savannah.gnu.org/patch/?func=detailitem&item_id=9130> +* <https://savannah.gnu.org/patch/?func=detailitem&item_id=9131> +diff -ru artanis-0.1.2/Makefile.in artanis-0.1.2.1/Makefile.in +--- artanis-0.1.2/Makefile.in 2016-02-10 12:35:18.800490571 -0200 ++++ artanis-0.1.2.1/Makefile.in 2016-10-15 19:44:35.140907367 -0300 +@@ -19,9 +19,18 @@ + MOD_OBJ := $(OBJ)/artanis + BIN := bin + TEMP_LIB_PATH := $(OBJ) +-MOD_PATH := $(shell guile -c "(display (%site-dir))") + MOD_COMPILED_PATH := $(shell guile -c "(display (%site-ccache-dir))") ++ ++ifdef DESTDIR ++INFO_DIR := $(DESTDIR)/share/info/ ++MOD_PATH := $(DESTDIR)/$(shell guile -c "(display (%site-dir))") + MOD_TARGET_PATH := $(DESTDIR)/$(MOD_COMPILED_PATH) ++else ++INFO_DIR := $(PREFIX)/share/info/ ++MOD_PATH := $(shell guile -c "(display (%site-dir))") ++MOD_TARGET_PATH := $(MOD_COMPILED_PATH) ++endif ++ + GUILE_CFLAGS := -Wunsupported-warning -Wunbound-variable -Warity-mismatch -Wduplicate-case-datum -Wbad-case-datum -Wformat + GUILEC := GUILE_LOAD_COMPILED_PATH=$(TEMP_LIB_PATH) guild compile $(GUILE_CFLAGS) + ARTANIS_ETC := $(SRC)/etc/artanis +@@ -36,7 +45,6 @@ + GENDOCS :=$(BUILD_AUX)/gendocs.sh + CHK_TEXINFO := $(BUILD_AUX)/check_texinfo.scm + CP := cp -frd -P +-INFO_DIR := $(PREFIX)/share/info/ + TARBALL_NAME := artanis-$(VERSION) + TMP_DIR := $(shell mktemp -d) + ANN_GEN := $(BUILD_AUX)/announce-gen +@@ -124,18 +132,29 @@ + -rm -f config.{h,log} + + install: $(ALL_TARGETS) +- mkdir -p $(DESTDIR)/$(MOD_PATH) +- $(CP) $(MOD) $(DESTDIR)/$(MOD_PATH)/ ++ mkdir -p $(MOD_PATH) ++ $(CP) $(MOD) $(MOD_PATH)/ + mkdir -p $(MOD_TARGET_PATH)/ + $(CP) $(MOD_OBJ) $(MOD_TARGET_PATH)/ ++ ++ifdef DESTDIR + $(CP) $(ARTANIS_ETC) $(DESTDIR)/etc/ + $(CP) $(ARTANIS_PAGES) $(DESTDIR)/etc/artanis/ +- mkdir -p $(DESTDIR)/$(PREFIX)/bin/ +- $(CP) $(BIN)/art $(DESTDIR)/$(PREFIX)/bin/ ++ mkdir -p $(DESTDIR)/bin/ ++ $(CP) $(BIN)/art $(DESTDIR)/bin/ + mkdir -p $(DESTDIR)/etc/bash_completion.d/ + $(CP) $(CMDCOMP) $(DESTDIR)/etc/bash_completion.d/ ++else ++ $(CP) $(ARTANIS_ETC) $(PREFIX)/etc/ ++ $(CP) $(ARTANIS_PAGES) $(PREFIX)/etc/artanis/ ++ mkdir -p $(PREFIX)/bin/ ++ $(CP) $(BIN)/art $(PREFIX)/bin/ ++ mkdir -p $(PREFIX)/etc/bash_completion.d/ ++ $(CP) $(CMDCOMP) $(PREFIX)/etc/bash_completion.d/ ++endif ++ + if [ -e /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi +- if [ -e artanis.info ]; then mkdir -p $(DESTDIR)/$(INFO_DIR); $(CP) artanis.info $(DESTDIR)/$(INFO_DIR)/; fi ++ if [ -e artanis.info ]; then mkdir -p $(INFO_DIR); $(CP) artanis.info $(INFO_DIR)/; fi + + distclean: distclean-mk clean clean-config clean-tarball + -rm -f $(BIN)/art diff --git a/gnu/packages/patches/freeimage-CVE-2016-5684.patch b/gnu/packages/patches/freeimage-CVE-2016-5684.patch new file mode 100644 index 0000000000..2fc02d7b0d --- /dev/null +++ b/gnu/packages/patches/freeimage-CVE-2016-5684.patch @@ -0,0 +1,34 @@ +From: Debian Science Maintainers + <debian-science-maintainers@lists.alioth.debian.org> +Date: Mon, 10 Oct 2016 08:22:44 +0100 +Subject: CVE-2016-5684 + +--- + Source/FreeImage/PluginXPM.cpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Source/FreeImage/PluginXPM.cpp b/Source/FreeImage/PluginXPM.cpp +index a698321..cc7bd07 100644 +--- a/Source/FreeImage/PluginXPM.cpp ++++ b/Source/FreeImage/PluginXPM.cpp +@@ -181,6 +181,11 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { + } + free(str); + ++ // check info string ++ if((width <= 0) || (height <= 0) || (colors <= 0) || (cpp <= 0)) { ++ throw "Improperly formed info string"; ++ } ++ + if (colors > 256) { + dib = FreeImage_AllocateHeader(header_only, width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); + } else { +@@ -193,7 +198,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { + FILE_RGBA rgba; + + str = ReadString(io, handle); +- if(!str) ++ if(!str || (strlen(str) < (size_t)cpp)) + throw "Error reading color strings"; + + std::string chrs(str,cpp); //create a string for the color chars using the first cpp chars diff --git a/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch new file mode 100644 index 0000000000..5c3e21975b --- /dev/null +++ b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch @@ -0,0 +1,206 @@ +From Anatol Pomozov <anatol.pomozov@gmail.com> +Taken from Arch Linux arm-none-eabi-gcc package. + +Modified version of ARM patch https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00083/enable-with-multilib-list-for-arm.patch + +This patch enables the use of the "--with-multilib-list" flag, when +configuring GCC 6.2. It makes GCC 6 compatible with the configure flags used +in the "gcc-arm-none-eabi-4.9" package. + + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 4ab7405..6e1ea2c 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -535,6 +535,7 @@ lang_opt_files=@lang_opt_files@ $(srcdir)/c-family/c.opt $(srcdir)/common.opt + lang_specs_files=@lang_specs_files@ + lang_tree_files=@lang_tree_files@ + target_cpu_default=@target_cpu_default@ ++with_multilib_list=@with_multilib_list@ + OBJC_BOEHM_GC=@objc_boehm_gc@ + extra_modes_file=@extra_modes_file@ + extra_opt_files=@extra_opt_files@ +diff --git a/gcc/config.gcc b/gcc/config.gcc +index cb08a5c..7bded02 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1072,7 +1072,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*) + case ${target} in + arm*-*-eabi*) + tm_file="$tm_file newlib-stdint.h" +- tmake_file="${tmake_file} arm/t-bpabi" ++ tmake_file="${tmake_file} arm/t-bpabi arm/t-mlibs" + use_gcc_stdint=wrap + ;; + arm*-*-rtems*) +@@ -3684,42 +3684,6 @@ case "${target}" in + exit 1 + fi + +- # Add extra multilibs +- if test "x$with_multilib_list" != x; then +- arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ /g'` +- for arm_multilib in ${arm_multilibs}; do +- case ${arm_multilib} in +- aprofile) +- # Note that arm/t-aprofile is a +- # stand-alone make file fragment to be +- # used only with itself. We do not +- # specifically use the +- # TM_MULTILIB_OPTION framework because +- # this shorthand is more +- # pragmatic. Additionally it is only +- # designed to work without any +- # with-cpu, with-arch with-mode +- # with-fpu or with-float options. +- if test "x$with_arch" != x \ +- || test "x$with_cpu" != x \ +- || test "x$with_float" != x \ +- || test "x$with_fpu" != x \ +- || test "x$with_mode" != x ; then +- echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile" 1>&2 +- exit 1 +- fi +- tmake_file="${tmake_file} arm/t-aprofile" +- break +- ;; +- default) +- ;; +- *) +- echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2 +- exit 1 +- ;; +- esac +- done +- fi + ;; + + fr*-*-*linux*) +diff --git a/gcc/config/arm/t-mlibs b/gcc/config/arm/t-mlibs +new file mode 100644 +index 0000000..5720cf7 +--- /dev/null ++++ b/gcc/config/arm/t-mlibs +@@ -0,0 +1,89 @@ ++# A set of predefined MULTILIB which can be used for different ARM targets. ++# Via the configure option --with-multilib-list, user can customize the ++# final MULTILIB implementation. ++ ++comma := , ++space := ++space += ++ ++MULTILIB_OPTIONS = mthumb/marm ++MULTILIB_DIRNAMES = thumb arm ++MULTILIB_OPTIONS += march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7 ++MULTILIB_DIRNAMES += armv6-m armv7-m armv7e-m armv7-ar ++MULTILIB_OPTIONS += mfloat-abi=softfp/mfloat-abi=hard ++MULTILIB_DIRNAMES += softfp fpu ++MULTILIB_OPTIONS += mfpu=fpv4-sp-d16/mfpu=vfpv3-d16 ++MULTILIB_DIRNAMES += fpv4-sp-d16 vfpv3-d16 ++ ++MULTILIB_MATCHES = march?armv6s-m=mcpu?cortex-m0 ++MULTILIB_MATCHES += march?armv6s-m=mcpu?cortex-m0plus ++MULTILIB_MATCHES += march?armv6s-m=mcpu?cortex-m1 ++MULTILIB_MATCHES += march?armv6s-m=march?armv6-m ++MULTILIB_MATCHES += march?armv7-m=mcpu?cortex-m3 ++MULTILIB_MATCHES += march?armv7e-m=mcpu?cortex-m4 ++MULTILIB_MATCHES += march?armv7e-m=mcpu?cortex-m7 ++MULTILIB_MATCHES += march?armv7=march?armv7-r ++MULTILIB_MATCHES += march?armv7=march?armv7-a ++MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4 ++MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4f ++MULTILIB_MATCHES += march?armv7=mcpu?cortex-r5 ++MULTILIB_MATCHES += march?armv7=mcpu?cortex-r7 ++MULTILIB_MATCHES += march?armv7=mcpu?cortex-a5 ++MULTILIB_MATCHES += march?armv7=mcpu?cortex-a7 ++MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8 ++MULTILIB_MATCHES += march?armv7=mcpu?cortex-a9 ++MULTILIB_MATCHES += march?armv7=mcpu?cortex-a15 ++MULTILIB_MATCHES += mfpu?fpv4-sp-d16=mfpu?fpv5-sp-d16 ++MULTILIB_MATCHES += mfpu?fpv4-sp-d16=mfpu?fpv5-d16 ++MULTILIB_MATCHES += mfpu?vfpv3-d16=mfpu?vfpv3 ++MULTILIB_MATCHES += mfpu?vfpv3-d16=mfpu?vfpv3-fp16 ++MULTILIB_MATCHES += mfpu?vfpv3-d16=mfpu?vfpv3-d16-fp16 ++MULTILIB_MATCHES += mfpu?vfpv3-d16=mfpu?vfpv3xd ++MULTILIB_MATCHES += mfpu?vfpv3-d16=mfpu?vfpv3xd-fp16 ++MULTILIB_MATCHES += mfpu?vfpv3-d16=mfpu?vfpv4 ++MULTILIB_MATCHES += mfpu?vfpv3-d16=mfpu?vfpv4-d16 ++MULTILIB_MATCHES += mfpu?vfpv3-d16=mfpu?neon ++MULTILIB_MATCHES += mfpu?vfpv3-d16=mfpu?neon-fp16 ++MULTILIB_MATCHES += mfpu?vfpv3-d16=mfpu?neon-vfpv4 ++ ++MULTILIB_EXCEPTIONS = ++MULTILIB_REUSE = ++ ++MULTILIB_REQUIRED = mthumb ++MULTILIB_REQUIRED += marm ++MULTILIB_REQUIRED += mfloat-abi=hard ++ ++MULTILIB_OSDIRNAMES = mthumb=!thumb ++MULTILIB_OSDIRNAMES += marm=!arm ++MULTILIB_OSDIRNAMES += mfloat-abi.hard=!fpu ++ ++ifneq (,$(findstring armv6-m,$(subst $(comma),$(space),$(with_multilib_list)))) ++MULTILIB_REQUIRED += mthumb/march=armv6s-m ++MULTILIB_OSDIRNAMES += mthumb/march.armv6s-m=!armv6-m ++endif ++ ++ifneq (,$(findstring armv7-m,$(subst $(comma),$(space),$(with_multilib_list)))) ++MULTILIB_REQUIRED += mthumb/march=armv7-m ++MULTILIB_OSDIRNAMES += mthumb/march.armv7-m=!armv7-m ++endif ++ ++ifneq (,$(findstring armv7e-m,$(subst $(comma),$(space),$(with_multilib_list)))) ++MULTILIB_REQUIRED += mthumb/march=armv7e-m ++MULTILIB_REQUIRED += mthumb/march=armv7e-m/mfloat-abi=softfp/mfpu=fpv4-sp-d16 ++MULTILIB_REQUIRED += mthumb/march=armv7e-m/mfloat-abi=hard/mfpu=fpv4-sp-d16 ++MULTILIB_OSDIRNAMES += mthumb/march.armv7e-m=!armv7e-m ++MULTILIB_OSDIRNAMES += mthumb/march.armv7e-m/mfloat-abi.hard/mfpu.fpv4-sp-d16=!armv7e-m/fpu ++MULTILIB_OSDIRNAMES += mthumb/march.armv7e-m/mfloat-abi.softfp/mfpu.fpv4-sp-d16=!armv7e-m/softfp ++endif ++ ++ifneq (,$(filter armv7 armv7-r armv7-a,$(subst $(comma),$(space),$(with_multilib_list)))) ++MULTILIB_REQUIRED += mthumb/march=armv7 ++MULTILIB_REQUIRED += mthumb/march=armv7/mfloat-abi=softfp/mfpu=vfpv3-d16 ++MULTILIB_REQUIRED += mthumb/march=armv7/mfloat-abi=hard/mfpu=vfpv3-d16 ++MULTILIB_OSDIRNAMES += mthumb/march.armv7=!armv7-ar/thumb ++MULTILIB_OSDIRNAMES += mthumb/march.armv7/mfloat-abi.hard/mfpu.vfpv3-d16=!armv7-ar/thumb/fpu ++MULTILIB_OSDIRNAMES += mthumb/march.armv7/mfloat-abi.softfp/mfpu.vfpv3-d16=!armv7-ar/thumb/softfp ++MULTILIB_REUSE += mthumb/march.armv7=marm/march.armv7 ++MULTILIB_REUSE += mthumb/march.armv7/mfloat-abi.softfp/mfpu.vfpv3-d16=marm/march.armv7/mfloat-abi.softfp/mfpu.vfpv3-d16 ++MULTILIB_REUSE += mthumb/march.armv7/mfloat-abi.hard/mfpu.vfpv3-d16=marm/march.armv7/mfloat-abi.hard/mfpu.vfpv3-d16 ++endif +diff --git a/gcc/configure b/gcc/configure +index 9523773..24952e3 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -763,6 +763,7 @@ SET_MAKE + accel_dir_suffix + real_target_noncanonical + enable_as_accelerator ++with_multilib_list + REPORT_BUGS_TEXI + REPORT_BUGS_TO + PKGVERSION +@@ -7462,6 +7463,7 @@ else + fi + + ++ + # ------------------------- + # Checks for other programs + # ------------------------- +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 68b0ee8..f8a1097 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -925,6 +925,7 @@ AC_ARG_WITH(multilib-list, + [AS_HELP_STRING([--with-multilib-list], [select multilibs (AArch64, SH and x86-64 only)])], + :, + with_multilib_list=default) ++AC_SUBST(with_multilib_list) + + # ------------------------- + # Checks for other programs + diff --git a/gnu/packages/patches/gcc-6-cross-environment-variables.patch b/gnu/packages/patches/gcc-6-cross-environment-variables.patch new file mode 100644 index 0000000000..285e78f162 --- /dev/null +++ b/gnu/packages/patches/gcc-6-cross-environment-variables.patch @@ -0,0 +1,65 @@ +Search path environment variables for cross-compilers. See the discussion +at <http://gcc.gnu.org/ml/gcc/2013-02/msg00124.html>. + +Note: Touch 'C_INCLUDE_PATH' et al. rather than 'CPATH', as discussed +at <http://bugs.gnu.org/22186>. + +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -461,8 +461,8 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, + int stdinc, int cxx_stdinc, int verbose) + { + static const char *const lang_env_vars[] = +- { "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", +- "OBJC_INCLUDE_PATH", "OBJCPLUS_INCLUDE_PATH" }; ++ { "CROSS_C_INCLUDE_PATH", "CROSS_CPLUS_INCLUDE_PATH", ++ "CROSS_OBJC_INCLUDE_PATH", "CROSS_OBJCPLUS_INCLUDE_PATH" }; + cpp_options *cpp_opts = cpp_get_options (pfile); + size_t idx = (cpp_opts->objc ? 2: 0); + +@@ -473,7 +473,7 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, + + /* CPATH and language-dependent environment variables may add to the + include chain. */ +- add_env_var_paths ("CPATH", BRACKET); ++ add_env_var_paths ("CROSS_CPATH", BRACKET); + add_env_var_paths (lang_env_vars[idx], SYSTEM); + + target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc); +diff --git a/gcc/system.h b/gcc/system.h +index 42bc509..af3b9ad 100644 +--- a/gcc/system.h ++++ b/gcc/system.h +@@ -1063,4 +1063,6 @@ helper_const_non_const_cast (const char *p) + /* Get definitions of HOST_WIDE_INT and HOST_WIDEST_INT. */ + #include "hwint.h" + ++#define LIBRARY_PATH_ENV "CROSS_LIBRARY_PATH" ++ + #endif /* ! GCC_SYSTEM_H */ +diff --git a/gcc/tlink.c b/gcc/tlink.c +index bc358b8..ad6242f 100644 +--- a/gcc/tlink.c ++++ b/gcc/tlink.c +@@ -458,7 +458,7 @@ recompile_files (void) + file *f; + + putenv (xstrdup ("COMPILER_PATH=")); +- putenv (xstrdup ("LIBRARY_PATH=")); ++ putenv (xstrdup (LIBRARY_PATH_ENV "=")); + + while ((f = file_pop ()) != NULL) + { +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 0f042b0..c23fb0b 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -4264,7 +4264,7 @@ process_command (unsigned int decoded_options_count, + } + + temp = env.get (LIBRARY_PATH_ENV); +- if (temp && *cross_compile == '0') ++ if (temp) + { + const char *startp, *endp; + char *nstore = (char *) alloca (strlen (temp) + 3); diff --git a/gnu/packages/patches/gd-CVE-2016-8670.patch b/gnu/packages/patches/gd-CVE-2016-8670.patch new file mode 100644 index 0000000000..39ee99ac31 --- /dev/null +++ b/gnu/packages/patches/gd-CVE-2016-8670.patch @@ -0,0 +1,38 @@ +Fix CVE-2016-8670 (buffer overflow in dynamicGetbuf()): + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-8670 +http://seclists.org/oss-sec/2016/q4/138 + +Patch copied from upstream source repository: + +https://github.com/libgd/libgd/commit/53110871935244816bbb9d131da0bccff734bfe9 + +From 53110871935244816bbb9d131da0bccff734bfe9 Mon Sep 17 00:00:00 2001 +From: "Christoph M. Becker" <cmbecker69@gmx.de> +Date: Wed, 12 Oct 2016 11:15:32 +0200 +Subject: [PATCH] Avoid potentially dangerous signed to unsigned conversion + +We make sure to never pass a negative `rlen` as size to memcpy(). See +also <https://bugs.php.net/bug.php?id=73280>. + +Patch provided by Emmanuel Law. +--- + src/gd_io_dp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gd_io_dp.c b/src/gd_io_dp.c +index 135eda3..228bfa5 100644 +--- a/src/gd_io_dp.c ++++ b/src/gd_io_dp.c +@@ -276,7 +276,7 @@ static int dynamicGetbuf(gdIOCtxPtr ctx, void *buf, int len) + if(remain >= len) { + rlen = len; + } else { +- if(remain == 0) { ++ if(remain <= 0) { + /* 2.0.34: EOF is incorrect. We use 0 for + * errors and EOF, just like fileGetbuf, + * which is a simple fread() wrapper. +-- +2.10.1 + diff --git a/gnu/packages/patches/hdf4-architectures.patch b/gnu/packages/patches/hdf4-architectures.patch new file mode 100644 index 0000000000..5549f11277 --- /dev/null +++ b/gnu/packages/patches/hdf4-architectures.patch @@ -0,0 +1,579 @@ +Copied from Debian. + +Description: Support additional architectures. +Author: Francesco Paolo Lovergine <frankie@debian.org> + +--- a/hdf/src/hdfi.h ++++ b/hdf/src/hdfi.h +@@ -48,6 +48,7 @@ + /* 8 - Cray IEEE */ + /* (i.e. Big-Endian, all 64-bit architecture w/IEEE Floats) */ + /*--------------------------------------------------------------------------*/ ++#define DFMT_S390 0x1111 + #define DFMT_SUN 0x1111 + #define DFMT_SUN_INTEL 0x4441 + #define DFMT_ALLIANT 0x1111 +@@ -62,6 +63,7 @@ + #define DFMT_CTSS 0x3331 + #define DFMT_VAX 0x2221 + #define DFMT_MIPSEL 0x4441 ++#define DFMT_MIPSEB 0x1111 + #define DFMT_PC 0x4441 + #define DFMT_APPLE 0x1111 + #define DFMT_APPLE_INTEL 0x4441 +@@ -75,6 +77,12 @@ + #define DFMT_IA64 0x4441 + #define DFMT_LINUX64 0x4441 + #define DFMT_POWERPC64 0x1111 ++#define DFMT_POWERPC64LE 0x4441 ++#define DFMT_ARMV4L 0x4441 ++#define DFMT_AARCH64 0x4441 ++#define DFMT_X86_64 0x4441 ++#define DFMT_SH 0x4441 ++#define DFMT_SHEB 0x1111 + + /* I/O library constants */ + #define UNIXUNBUFIO 1 +@@ -288,7 +296,7 @@ typedef int hdf_pint_t; + + #endif /* IBM6000 */ + +-#if defined(HP9000) || (!defined(__convexc__) && (defined(hpux) || defined(__hpux))) ++#if defined(HP9000) || (!defined(__convexc__) && (defined(hpux) || defined(__hpux) || defined(__hppa__))) + + #ifndef HP9000 + #define HP9000 +@@ -347,6 +355,10 @@ typedef int hdf_pint_t; + /* what each does */ + #define JMEMSYS MEM_ANSI + ++#ifdef __linux__ ++#define FNAME_POST_UNDERSCORE ++#endif ++ + #endif /* HP9000 */ + + +@@ -666,6 +678,410 @@ typedef int hdf_pint_t; + #endif /* !(defined(__APPLE__)) */ + + /*-----------------------------------------------------*/ ++#if defined (__linux__) && defined (__mc68000__) ++ ++#ifdef GOT_MACHINE ++If you get an error on this line more than one machine type has been defined. ++Please check your Makefile. ++#endif ++#define GOT_MACHINE 1 ++ ++#include <fcntl.h> ++#include <sys/types.h> /* for unbuffered file I/O */ ++#include <sys/stat.h> ++#include <unistd.h> ++#include <ctype.h> /* for character macros */ ++ ++#define DF_MT DFMT_MOTOROLA ++ ++#ifndef VOID /* The stupid windows.h header file uses a #define instead of a typedef */ ++typedef void VOID; ++#endif /* end VOID */ ++typedef void * VOIDP; ++typedef char * _fcd; ++typedef char char8; ++typedef unsigned char uchar8; ++typedef char int8; ++typedef unsigned char uint8; ++typedef short int int16; ++typedef unsigned short int uint16; ++typedef long int int32; ++typedef unsigned long int uint32; ++typedef int intn; ++typedef unsigned int uintn; ++typedef float float32; ++typedef double float64; ++typedef long intf; /* size of INTEGERs in Fortran compiler */ ++typedef int hdf_pint_t; /* an integer the same size as a pointer */ ++#define FNAME_POST_UNDERSCORE ++#define _fcdtocp(desc) (desc) ++ ++#ifdef HAVE_FMPOOL ++#define FILELIB PAGEBUFIO /* enable page buffering */ ++#else ++#define FILELIB UNIXBUFIO ++#endif ++ ++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ ++ ++/* Determine the memory manager we are going to use. Valid values are: */ ++/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ ++/* what each does */ ++#define JMEMSYS MEM_ANSI ++#define HAVE_STDC ++#define INCLUDES_ARE_ANSI ++ ++#endif /* Linux/m68k */ ++ ++#if defined (__linux__) && defined (__sparc__) ++ ++#ifdef GOT_MACHINE ++If you get an error on this line more than one machine type has been defined. ++Please check your Makefile. ++#endif ++#define GOT_MACHINE 1 ++ ++#include <fcntl.h> ++#include <sys/types.h> /* for unbuffered file I/O */ ++#include <sys/stat.h> ++#include <unistd.h> ++#include <ctype.h> /* for character macros */ ++ ++#define DF_MT DFMT_SUN ++ ++#ifndef VOID /* The stupid windows.h header file uses a #define instead of a typedef */ ++typedef void VOID; ++#endif /* end VOID */ ++typedef void * VOIDP; ++typedef char * _fcd; ++typedef char char8; ++typedef unsigned char uchar8; ++typedef char int8; ++typedef unsigned char uint8; ++typedef short int int16; ++typedef unsigned short int uint16; ++#ifdef _LP64 /* 64-bit environment */ ++typedef int int32; ++typedef unsigned int uint32; ++#else /* 32-bit environment */ ++typedef long int int32; ++typedef unsigned long int uint32; ++#endif ++typedef int intn; ++typedef unsigned int uintn; ++typedef float float32; ++typedef double float64; ++typedef long intf; /* size of INTEGERs in Fortran compiler */ ++#ifdef _LP64 /* 64-bit environment */ ++typedef long hdf_pint_t; /* an integer the same size as a pointer */ ++#else /* 32-bit environment */ ++typedef int hdf_pint_t; /* an integer the same size as a pointer */ ++#endif ++#define FNAME_POST_UNDERSCORE ++#define _fcdtocp(desc) (desc) ++ ++#ifdef HAVE_FMPOOL ++#define FILELIB PAGEBUFIO /* enable page buffering */ ++#else ++#define FILELIB UNIXBUFIO ++#endif ++ ++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ ++ ++/* Determine the memory manager we are going to use. Valid values are: */ ++/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ ++/* what each does */ ++#define JMEMSYS MEM_ANSI ++#define HAVE_STDC ++#define INCLUDES_ARE_ANSI ++ ++#endif /* Linux/Sparc */ ++ ++#if defined (__linux__) && defined (__powerpc__) && !defined(__powerpc64__) ++ ++#ifdef GOT_MACHINE ++If you get an error on this line more than one machine type has been defined. ++Please check your Makefile. ++#endif ++#define GOT_MACHINE 1 ++ ++#include <fcntl.h> ++#include <sys/types.h> /* for unbuffered file I/O */ ++#include <sys/stat.h> ++#include <unistd.h> ++#include <ctype.h> /* for character macros */ ++ ++#define DF_MT DFMT_MOTOROLA ++ ++#ifndef VOID /* The stupid windows.h header file uses a #define instead of a typedef */ ++typedef void VOID; ++#endif /* end VOID */ ++typedef void * VOIDP; ++typedef char * _fcd; ++typedef char char8; ++typedef unsigned char uchar8; ++typedef signed char int8; ++typedef unsigned char uint8; ++typedef short int int16; ++typedef unsigned short int uint16; ++typedef long int int32; ++typedef unsigned long int uint32; ++typedef int intn; ++typedef unsigned int uintn; ++typedef float float32; ++typedef double float64; ++typedef long intf; /* size of INTEGERs in Fortran compiler */ ++typedef int hdf_pint_t; /* an integer the same size as a pointer */ ++#define FNAME_POST_UNDERSCORE ++#define _fcdtocp(desc) (desc) ++ ++#ifdef HAVE_FMPOOL ++#define FILELIB PAGEBUFIO /* enable page buffering */ ++#else ++#define FILELIB UNIXBUFIO ++#endif ++ ++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ ++ ++/* Determine the memory manager we are going to use. Valid values are: */ ++/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ ++/* what each does */ ++#define JMEMSYS MEM_ANSI ++#define HAVE_STDC ++#define INCLUDES_ARE_ANSI ++ ++#endif /* Linux/powerpc */ ++ ++#if defined (__linux__) && defined (__s390__) ++ ++#ifdef GOT_MACHINE ++If you get an error on this line more than one machine type has been defined. ++Please check your Makefile. ++#endif ++#define GOT_MACHINE 1 ++ ++#include <fcntl.h> ++#include <sys/types.h> /* for unbuffered file I/O */ ++#include <sys/stat.h> ++#include <unistd.h> ++#include <ctype.h> /* for character macros */ ++ ++#define DF_MT DFMT_S390 ++ ++#ifndef VOID /* The stupid windows.h header file uses a #define instead of a typedef */ ++typedef void VOID; ++#endif /* end VOID */ ++typedef void * VOIDP; ++typedef char * _fcd; ++typedef char char8; ++typedef unsigned char uchar8; ++typedef signed char int8; ++typedef unsigned char uint8; ++typedef short int int16; ++typedef unsigned short int uint16; ++#ifdef _LP64 /* 64-bit environment */ ++typedef int int32; ++typedef unsigned int uint32; ++#else /* 32-bit environment */ ++typedef long int int32; ++typedef unsigned long int uint32; ++#endif ++typedef int intn; ++typedef unsigned int uintn; ++typedef float float32; ++typedef double float64; ++typedef long intf; /* size of INTEGERs in Fortran compiler */ ++#ifdef _LP64 /* 64-bit environment */ ++typedef long hdf_pint_t; /* an integer the same size as a pointer */ ++#else /* 32-bit environment */ ++typedef int hdf_pint_t; /* an integer the same size as a pointer */ ++#endif ++#define FNAME_POST_UNDERSCORE ++#define _fcdtocp(desc) (desc) ++ ++#ifdef HAVE_FMPOOL ++#define FILELIB PAGEBUFIO /* enable page buffering */ ++#else ++#define FILELIB UNIXBUFIO ++#endif ++ ++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ ++ ++/* Determine the memory manager we are going to use. Valid values are: */ ++/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ ++/* what each does */ ++#define JMEMSYS MEM_ANSI ++#define HAVE_STDC ++#define INCLUDES_ARE_ANSI ++ ++#endif /* Linux/s390 */ ++ ++#if defined (__linux__) && (defined (__MIPSEB__) || defined(__MIPSEL__)) ++ ++#ifdef GOT_MACHINE ++If you get an error on this line more than one machine type has been defined. ++Please check your Makefile. ++#endif ++#define GOT_MACHINE 1 ++ ++#include <fcntl.h> ++#include <sys/types.h> /* for unbuffered file I/O */ ++#include <sys/stat.h> ++#include <unistd.h> ++#include <ctype.h> /* for character macros */ ++ ++#if defined (__MIPSEB__) ++#define DF_MT DFMT_MIPSEB ++#elif defined(__MIPSEL__) ++#define DF_MT DFMT_MIPSEL ++#endif ++ ++#ifndef VOID /* The stupid windows.h header file uses a #define instead of a typedef */ ++typedef void VOID; ++#endif /* end VOID */ ++typedef void * VOIDP; ++typedef char * _fcd; ++typedef char char8; ++typedef unsigned char uchar8; ++typedef signed char int8; ++typedef unsigned char uint8; ++typedef short int int16; ++typedef unsigned short int uint16; ++typedef int int32; ++typedef unsigned int uint32; ++typedef int intn; ++typedef unsigned int uintn; ++typedef float float32; ++typedef double float64; ++typedef long intf; /* size of INTEGERs in Fortran compiler */ ++typedef long int hdf_pint_t; /* an integer the same size as a pointer */ ++#define FNAME_POST_UNDERSCORE ++#define _fcdtocp(desc) (desc) ++ ++#ifdef HAVE_FMPOOL ++#define FILELIB PAGEBUFIO /* enable page buffering */ ++#else ++#define FILELIB UNIXBUFIO ++#endif ++ ++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ ++ ++/* Determine the memory manager we are going to use. Valid values are: */ ++/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ ++/* what each does */ ++#define JMEMSYS MEM_ANSI ++#define HAVE_STDC ++#define INCLUDES_ARE_ANSI ++ ++#endif /* Linux/mips */ ++ ++#if defined (__linux__) && defined (__arm__) ++ ++#ifdef GOT_MACHINE ++If you get an error on this line more than one machine type has been defined. ++Please check your Makefile. ++#endif ++#define GOT_MACHINE 1 ++ ++#include <fcntl.h> ++#include <sys/types.h> /* for unbuffered file I/O */ ++#include <sys/stat.h> ++#include <unistd.h> ++#include <ctype.h> /* for character macros */ ++ ++#define DF_MT DFMT_ARMV4L ++ ++#ifndef VOID /* The stupid windows.h header file uses a #define instead of a typedef */ ++typedef void VOID; ++#endif /* end VOID */ ++typedef void * VOIDP; ++typedef char * _fcd; ++typedef char char8; ++typedef unsigned char uchar8; ++typedef signed char int8; ++typedef unsigned char uint8; ++typedef short int int16; ++typedef unsigned short int uint16; ++typedef int int32; ++typedef unsigned int uint32; ++typedef int intn; ++typedef unsigned int uintn; ++typedef float float32; ++typedef double float64; ++typedef long intf; /* size of INTEGERs in Fortran compiler */ ++typedef long hdf_pint_t; /* an integer the same size as a pointer */ ++#define FNAME_POST_UNDERSCORE ++#define _fcdtocp(desc) (desc) ++ ++#ifdef HAVE_FMPOOL ++#define FILELIB PAGEBUFIO /* enable page buffering */ ++#else ++#define FILELIB UNIXBUFIO ++#endif ++ ++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ ++ ++/* Determine the memory manager we are going to use. Valid values are: */ ++/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ ++/* what each does */ ++#define JMEMSYS MEM_ANSI ++#define HAVE_STDC ++#define INCLUDES_ARE_ANSI ++ ++#endif /* Linux/arm */ ++ ++#if defined (__linux__) && defined (__aarch64__) ++ ++#ifdef GOT_MACHINE ++If you get an error on this line more than one machine type has been defined. ++Please check your Makefile. ++#endif ++#define GOT_MACHINE 1 ++ ++#include <fcntl.h> ++#include <sys/types.h> /* for unbuffered file I/O */ ++#include <sys/stat.h> ++#include <unistd.h> ++#include <ctype.h> /* for character macros */ ++ ++#define DF_MT DFMT_AARCH64 ++ ++typedef void VOID; ++typedef void * VOIDP; ++typedef char * _fcd; ++typedef char char8; ++typedef unsigned char uchar8; ++typedef signed char int8; ++typedef unsigned char uint8; ++typedef short int int16; ++typedef unsigned short int uint16; ++typedef int int32; ++typedef unsigned int uint32; ++typedef int intn; ++typedef unsigned int uintn; ++typedef float float32; ++typedef double float64; ++typedef int intf; /* size of INTEGERs in Fortran compiler */ ++typedef long hdf_pint_t; /* an integer the same size as a pointer */ ++#define FNAME_POST_UNDERSCORE ++#define _fcdtocp(desc) (desc) ++#define FILELIB UNIXBUFIO ++ ++#ifndef BIG_LONGS ++#define BIG_LONGS ++#endif ++ ++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ ++ ++/* Determine the memory manager we are going to use. Valid values are: */ ++/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ ++/* what each does */ ++#define JMEMSYS MEM_ANSI ++#define HAVE_STDC ++#define INCLUDES_ARE_ANSI ++ ++#endif /* Linux/aarch64 */ ++ + #if defined(NEXT) || defined(NeXT) + + #ifndef NEXT +@@ -928,7 +1344,11 @@ Please check your Makefile. + + #include <sys/file.h> /* for unbuffered i/o stuff */ + #include <sys/stat.h> +-#define DF_MT DFMT_POWERPC64 ++#ifdef __LITTLE_ENDIAN__ ++#define DF_MT DFMT_POWERPC64LE ++#else ++#define DF_MT DFMT_POWERPC64 ++#endif + typedef void VOID; + typedef void *VOIDP; + typedef char *_fcd; +@@ -952,6 +1372,11 @@ typedef long hdf_pint_t; + #define _fcdtocp(desc) (desc) + #define FILELIB UNIXBUFIO + ++#ifndef BIG_LONGS ++#define BIG_LONGS ++#endif ++ ++ + /* JPEG #define's - Look in the JPEG docs before changing - (Q) */ + + /* Determine the memory manager we are going to use. Valid values are: */ +@@ -1097,6 +1522,8 @@ typedef long hdf_pint_t; + #define _fcdtocp(desc) (desc) + #define FILELIB UNIXBUFIO + ++#define BIG_LONGS ++ + /* JPEG #define's - Look in the JPEG docs before changing - (Q) */ + + /* Determine the memory manager we are going to use. Valid values are: */ +@@ -1111,6 +1538,66 @@ typedef long hdf_pint_t; + + #endif /* IA64 */ + ++/* Renesas SuperH SH3(little/big)/SH4(little/big) */ ++#if defined (__linux__) && defined(__sh__) ++ ++#ifdef GOT_MACHINE ++If you get an error on this line more than one machine type has been defined. ++Please check your Makefile. ++#endif ++#define GOT_MACHINE 1 ++ ++#include <fcntl.h> ++#include <sys/types.h> /* for unbuffered file I/O */ ++#include <sys/stat.h> ++#include <unistd.h> ++#include <ctype.h> /* for character macros */ ++ ++#if defined (__LITTLE_ENDIAN__) ++#define DF_MT DFMT_SH ++#elif defined(__BIG_ENDIAN__) ++#define DF_MT DFMT_SHEB ++#endif ++ ++#ifndef VOID /* The stupid windows.h header file uses a #define instead of a typedef */ ++typedef void VOID; ++#endif /* end VOID */ ++ ++typedef void * VOIDP; ++typedef char * _fcd; ++typedef char char8; ++typedef unsigned char uchar8; ++typedef signed char int8; ++typedef unsigned char uint8; ++typedef short int int16; ++typedef unsigned short int uint16; ++typedef long int int32; ++typedef unsigned long int uint32; ++typedef int intn; ++typedef unsigned int uintn; ++typedef float float32; ++typedef double float64; ++typedef long intf; ++typedef int hdf_pint_t; ++#define FNAME_POST_UNDERSCORE ++#define _fcdtocp(desc) (desc) ++ ++#ifdef HAVE_FMPOOL ++#define FILELIB PAGEBUFIO /* enable page buffering */ ++#else ++#define FILELIB UNIXBUFIO ++#endif ++ ++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ ++/* Determine the memory manager we are going to use. Valid values are: */ ++/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ ++/* what each does */ ++#define JMEMSYS MEM_ANSI ++#define HAVE_STDC ++#define INCLUDES_ARE_ANSI ++ ++#endif /* Linux/sh */ ++ + #ifndef GOT_MACHINE + No machine type has been defined. Your Makefile needs to have someing like + -DSUN or -DUNICOS in order for the HDF internal structures to be defined +--- a/hdf/src/hconv.h ++++ b/hdf/src/hconv.h +@@ -59,7 +59,7 @@ + /* CONSTANT DEFINITIONS */ + /*****************************************************************************/ + /* Generally Big-Endian machines */ +-#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) ++#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) && !(defined(__powerpc__) && defined(__LITTLE_ENDIAN__)) && !defined(__aarch64__) && !defined(__ARM_EABI__) + # define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */ + # define UI8_OUT DFKnb1b + # define SI16_IN DFKnb2b /* S = Signed */ diff --git a/gnu/packages/patches/irrlicht-mesa-10.patch b/gnu/packages/patches/irrlicht-mesa-10.patch deleted file mode 100644 index b567c384a3..0000000000 --- a/gnu/packages/patches/irrlicht-mesa-10.patch +++ /dev/null @@ -1,46 +0,0 @@ -Patch to work around incompatibility between irrlicht-1.8.1 and mesa-10.x. -Upstream bug (fixed in trunk): http://sourceforge.net/p/irrlicht/bugs/429/ -Upstream fix: http://sourceforge.net/p/irrlicht/code/4810 -This patch copied from: -http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-games/irrlicht/files/irrlicht-1.8.1-mesa-10.x.patch?view=markup - -From 244d00280c1b082ca164f92337773e9e4e1a3898 Mon Sep 17 00:00:00 2001 -From: hiker <henrichsjoerg@mgail.com> -Date: Wed, 26 Feb 2014 11:13:03 +1100 -Subject: [PATCH] Applied patch from jpirie for fixing mesa 10 compilation - problems. - ---- irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.h -+++ irrlicht-1.8.1/source/Irrlicht/COpenGLExtensionHandler.h -@@ -21,6 +21,7 @@ - #endif - #include <GL/gl.h> - #if defined(_IRR_OPENGL_USE_EXTPOINTER_) -+ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); - #include "glext.h" - #endif - #include "wglext.h" -@@ -35,6 +36,7 @@ - #endif - #include <OpenGL/gl.h> - #if defined(_IRR_OPENGL_USE_EXTPOINTER_) -+ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); - #include "glext.h" - #endif - #elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_) -@@ -48,6 +50,7 @@ - #define NO_SDL_GLEXT - #include <SDL/SDL_video.h> - #include <SDL/SDL_opengl.h> -+ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); - #include "glext.h" - #else - #if defined(_IRR_OPENGL_USE_EXTPOINTER_) -@@ -60,6 +63,7 @@ - #include <GL/gl.h> - #include <GL/glx.h> - #if defined(_IRR_OPENGL_USE_EXTPOINTER_) -+ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); - #include "glext.h" - #undef GLX_ARB_get_proc_address // avoid problems with local glxext.h - #include "glxext.h" diff --git a/gnu/packages/patches/node-9077.patch b/gnu/packages/patches/node-9077.patch new file mode 100644 index 0000000000..e57f5caac7 --- /dev/null +++ b/gnu/packages/patches/node-9077.patch @@ -0,0 +1,30 @@ +From fc164acbbb700fd50ab9c04b47fc1b2687e9c0f4 Mon Sep 17 00:00:00 2001 +From: "Bradley T. Hughes" <bradleythughes@fastmail.fm> +Date: Thu, 13 Oct 2016 07:38:38 +0000 +Subject: [PATCH] build: add -DZLIB_CONST when building with --shared-zlib + +Commit 782620f added the define only when building with the bundled +zlib. Using a shared zlib results in build breakage: + +../src/inspector_agent.cc:179:16: error: assigning to 'Bytef *' (aka 'unsigned char *') from incompatible type + 'const uint8_t *' (aka 'const unsigned char *') + strm.next_in = PROTOCOL_JSON + 3; + ^ ~~~~~~~~~~~~~~~~~ +1 error generated. +--- + node.gyp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/node.gyp b/node.gyp +index fa98547..d799ba1 100644 +--- a/node.gyp ++++ b/node.gyp +@@ -480,6 +480,8 @@ + }], + [ 'node_shared_zlib=="false"', { + 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ], ++ }, { ++ 'defines': [ 'ZLIB_CONST' ], + }], + + [ 'node_shared_http_parser=="false"', { |