code:
Fix multi-line string formatting in fortran test programs (reported upstream).

diff --git a/samples/appendfield.f b/samples/appendfield.f
index 42c4b6b..58257f7 100644
--- a/samples/appendfield.f
+++ b/samples/appendfield.f
@@ -22,8 +22,8 @@ c
          inarray(i) = i
       enddo

-      swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer_o
-     1f_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+      swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
       swid = swattach(swfid, "Swath1")

diff --git a/samples/definefields.f b/samples/definefields.f
index 89859e4..f3b3497 100644
--- a/samples/definefields.f
+++ b/samples/definefields.f
@@ -24,8 +24,8 @@ c	DFACC_RDWR accesscode in the open statement.  The SWopen
 c	routine returns the swath fileid, swfid, which is used to
 c	identify the file in subsequent routines.

-	swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
-     1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 c
diff --git a/samples/definegdflds.f b/samples/definegdflds.f
index 177422e..1b7fcf6 100644
--- a/samples/definegdflds.f
+++ b/samples/definegdflds.f
@@ -21,8 +21,8 @@
 	fillval1=-7.0
 	fillval2=-9999.0

-	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
-     1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 	gdid1 = gdattach(gdfid, "UTMGrid")
diff --git a/samples/definelevels.f b/samples/definelevels.f
index 2496d5f..64b2842 100644
--- a/samples/definelevels.f
+++ b/samples/definelevels.f
@@ -32,8 +32,8 @@ c	DFACC_RDWR access code in the open statement.  The ptopen
 c	routine returns the point fileid, ptfid, which is used to
 c	identify the file in subsequent routines.

-	ptfid = ptopen("PointFile_created_with_hadeos_sample_file_writer
-     1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	ptfid = ptopen("PointFile_created_with_hadeos_sample_file_write"//
+     1  "r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 c
diff --git a/samples/inquiregrid.f b/samples/inquiregrid.f
index 8110461..8ce71e4 100644
--- a/samples/inquiregrid.f
+++ b/samples/inquiregrid.f
@@ -18,8 +18,8 @@

-	gdfid = gdopen('GridFile_created_with_hadeos_sample_file_writer_
-     1of_HDFEOS2_version_219_or_higher_release.hdf', DFACC_READ)
+	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)

 	if (gdfid .ne. -1) then
diff --git a/samples/inquireswath.f b/samples/inquireswath.f
index 899ee59..78c292b 100644
--- a/samples/inquireswath.f
+++ b/samples/inquireswath.f
@@ -24,8 +24,8 @@ c
 c	Open the Swath File for read only access
 c

-	swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
-     1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+	swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)

 	if (swfid .NE. -1) then
diff --git a/samples/readdimscalegrid.f b/samples/readdimscalegrid.f
index fed5540..a0bb48a 100644
--- a/samples/readdimscalegrid.f
+++ b/samples/readdimscalegrid.f
@@ -34,8 +34,8 @@
 !     * id, gdfid, which is used to identify the file in subsequent routines.
 !     */

-	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
-     1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 !    /*
 !     * If the grid file cannot be found, gdopen will return -1 for the file
diff --git a/samples/readdimscaleswath.f b/samples/readdimscaleswath.f
index 97b6264..1b61624 100644
--- a/samples/readdimscaleswath.f
+++ b/samples/readdimscaleswath.f
@@ -33,8 +33,8 @@
 !     * id, swfid, which is used to identify the file in subsequent routines.
 !     */

-	swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
-     1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 !    /*
 !     * If the swath file cannot be found, swopen will return -1 for the file
diff --git a/samples/readfields.f b/samples/readfields.f
index 873b30a..29d42f0 100644
--- a/samples/readfields.f
+++ b/samples/readfields.f
@@ -21,8 +21,8 @@ c
 c     Open the HDF swath file, "SwathFile.hdf"
 c

-	swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
-     1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+	swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)

 	if (swfid .NE. -1) then
diff --git a/samples/readgdflds.f b/samples/readgdflds.f
index e5fe85f..ff2bd86 100644
--- a/samples/readgdflds.f
+++ b/samples/readgdflds.f
@@ -9,8 +9,8 @@
 	integer DFNT_FLOAT32
 	parameter (DFNT_FLOAT32=5)

-	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
-     1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 	if (gdfid .ne. -1) then

diff --git a/samples/readlevels.f b/samples/readlevels.f
index a7fd033..f349398 100644
--- a/samples/readlevels.f
+++ b/samples/readlevels.f
@@ -36,8 +36,8 @@ c
 c     Open the HDF swath file, "PointFile.hdf".
 c

-	ptfid = ptopen("PointFile_created_with_hadeos_sample_file_writer
-     1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+	ptfid = ptopen("PointFile_created_with_hadeos_sample_file_write"//
+     +  "r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)

 c
 c    Read Simple Point
@@ -47,6 +47,8 @@ c
 	status = ptlevinfo(ptid, 0, fldlist, fldtype, fldorder)
 	n = ptnrecs(ptid, 0)

+	write(*,*) n
+
 	do 5 i=1,n
 	   recs(i) = i - 1
  5	continue
diff --git a/samples/setupgrid.f b/samples/setupgrid.f
index be5408c..cf4bd04 100644
--- a/samples/setupgrid.f
+++ b/samples/setupgrid.f
@@ -34,8 +34,8 @@ c      code in the open statement.  The GDopen routine returns the grid
 c      file id, gdfid, which is used to identify the file in subsequent
 c      routines in the library.
 c
-      gdfid = gdopen('GridFile_created_with_hadeos_sample_file_writer_of
-     1_HDFEOS2_version_219_or_higher_release.hdf',DFACC_CREATE)
+      gdfid = gdopen('GridFile_created_with_hadeos_sample_file_writer_"//
+     1"of_HDFEOS2_version_219_or_higher_release.hdf',DFACC_CREATE)

 c
 c     Create UTM Grid
diff --git a/samples/setupswath.f b/samples/setupswath.f
index d0289d6..fbaa0bb 100644
--- a/samples/setupswath.f
+++ b/samples/setupswath.f
@@ -22,8 +22,8 @@ c      code in the open statement.  The SWopen routine returns the swath
 c      file id, swfid, which is used to identify the file in subsequent
 c      routines in the library.
 c
-      swfid = swopen('SwathFile_created_with_hadeos_sample_file_writer_o
-     1f_HDFEOS2_version_219_or_higher_release.hdf',DFACC_CREATE)
+      swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf",DFACC_CREATE)

 c
 c     The first of these, SWcreate, creates the swath, "Swath1", within the
diff --git a/samples/subsetgrid.f b/samples/subsetgrid.f
index c57e541..087e5b1 100644
--- a/samples/subsetgrid.f
+++ b/samples/subsetgrid.f
@@ -22,8 +22,8 @@ c
 c     Open the HDF grid file, "GridFile.hdf"
 c

-	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
-     1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)

 	if (gdfid .NE. -1) then

diff --git a/samples/subsetpoint.f b/samples/subsetpoint.f
index 9e72c5f..2e76d7d 100644
--- a/samples/subsetpoint.f
+++ b/samples/subsetpoint.f
@@ -21,8 +21,8 @@ c
 c     Open the HDF point file, "PointFile.hdf"
 c

-	ptfid = ptopen("PointFile_created_with_hadeos_sample_file_writer
-     1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+	ptfid = ptopen("PointFile_created_with_hadeos_sample_file_write"//
+     1  "r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)

 	if (ptfid .NE. -1) then

diff --git a/samples/subsetswath.f b/samples/subsetswath.f
index dcee609..9af8a46 100644
--- a/samples/subsetswath.f
+++ b/samples/subsetswath.f
@@ -28,8 +28,8 @@ c
 c     Open the HDF swath file, "SwathFile.hdf"
 c

-	swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
-     1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+	swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)

 	if (swfid .NE. -1) then

diff --git a/samples/writedimscalegrid.f b/samples/writedimscalegrid.f
index 09688d8..42013fe 100644
--- a/samples/writedimscalegrid.f
+++ b/samples/writedimscalegrid.f
@@ -29,8 +29,8 @@
 !     * id, gdfid, which is used to identify the file in subsequent routines.
 !     */

-	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
-     1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 !    /*
 !     * If the grid file cannot be found, gdopen will return -1 for the file
diff --git a/samples/writedimscaleswath.f b/samples/writedimscaleswath.f
index 1151671..1a911a6 100644
--- a/samples/writedimscaleswath.f
+++ b/samples/writedimscaleswath.f
@@ -31,8 +31,8 @@
 !     * id, swfid, which is used to identify the file in subsequent routines.
 !     */

-	swfid = swopen("SwathFile_created_with_hadeos_sample_file_write
-     1r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 !    /*
 !     * If the swath file cannot be found, swopen will return -1 for the file
diff --git a/samples/writefields.f b/samples/writefields.f
index a743661..862b96c 100644
--- a/samples/writefields.f
+++ b/samples/writefields.f
@@ -31,8 +31,8 @@ c
 c     Open the HDF swath file, "SwathFile.hdf"
 c

-	swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
-     1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 	if (swfid .NE. -1) then
diff --git a/samples/writegdflds.f b/samples/writegdflds.f
index d1540b3..81aef75 100644
--- a/samples/writegdflds.f
+++ b/samples/writegdflds.f
@@ -23,8 +23,8 @@
 	enddo

-	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
-     1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
+     1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 	if (gdfid .ne. -1) then

diff --git a/samples/writelevels.f b/samples/writelevels.f
index 88e7780..cb40c9e 100644
--- a/samples/writelevels.f
+++ b/samples/writelevels.f
@@ -32,8 +32,8 @@ c
 c     Open the HDF point file, "PointFile.hdf".
 c

-	ptfid = ptopen("PointFile_created_with_hadeos_sample_file_writer
-     1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+	ptfid = ptopen("PointFile_created_with_hadeos_sample_file_write"//
+     +  "r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)

 c
--
2.10.0


code:
Don't build the GCTP bundled with the source and link with the
system's -lgctp instead.  We also remove references to the
"testdrivers" directory, which is not distributed together with the
source, causing autoreconf to fail.

diff --git a/Makefile.in b/Makefile.in
index d468af2..90428a7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -206,7 +206,7 @@ LIBGCTP = $(top_builddir)/gctp/src/libGctp.la
 @TESTDRIVERS_CONDITIONAL_TRUE@TESTDRIVERS = testdrivers
 @INSTALL_INCLUDE_CONDITIONAL_FALSE@INCLUDE =
 @INSTALL_INCLUDE_CONDITIONAL_TRUE@INCLUDE = include
-SUBDIRS = gctp src $(INCLUDE) samples $(TESTDRIVERS)
+SUBDIRS = src $(INCLUDE) samples $(TESTDRIVERS)
 all: all-recursive

 .SUFFIXES:
diff --git a/include/Makefile.in b/include/Makefile.in
index 9938b23..afb7f40 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -190,7 +190,7 @@ LIBGCTP = $(top_builddir)/gctp/src/libGctp.la
 # Boilerplate include

 # Headers to install
-include_HEADERS = HE2_config.h HdfEosDef.h HDFEOSVersion.h cfortHdf.h ease.h
+include_HEADERS = HdfEosDef.h HDFEOSVersion.h cfortHdf.h ease.h
 all: HE2_config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-am

diff --git a/samples/Makefile.in b/samples/Makefile.in
index 9da6e28..6a6186c 100644
--- a/samples/Makefile.in
+++ b/samples/Makefile.in
@@ -108,7 +108,6 @@ AppendField_SOURCES = AppendField.c
 AppendField_OBJECTS = AppendField.$(OBJEXT)
 AppendField_LDADD = $(LDADD)
 am__DEPENDENCIES_1 = $(top_builddir)/src/libhdfeos.la
-am__DEPENDENCIES_2 = $(top_builddir)/gctp/src/libGctp.la
 AppendField_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
 DefineFields_SOURCES = DefineFields.c
 DefineFields_OBJECTS = DefineFields.$(OBJEXT)
@@ -481,7 +480,7 @@ sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 LIBHDFEOS2 = $(top_builddir)/src/libhdfeos.la
-LIBGCTP = $(top_builddir)/gctp/src/libGctp.la
+LIBGCTP =

 # Boilerplate definitions file

--
2.10.0

license: mit


code:
Make shared library linking work.
---
 src/Makefile.in | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/Makefile.in b/src/Makefile.in
index 86880e5..24efffe 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -72,7 +72,7 @@ LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
 	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
 	$(AM_CFLAGS) $(CFLAGS) -DH5_USE_16_API
 CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = HDF5_USE_SHLIB=yes $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = $(libhe5_hdfeos_la_SOURCES)
 DIST_SOURCES = $(libhe5_hdfeos_la_SOURCES)
@@ -124,9 +124,6 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@

-# Set LDFLAGS to allow the HDF-EOS library to use extern variables from
-# HDF5
-LDFLAGS = -Wl,-single_module
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
--
2.10.0


code:
Ill-placed #endif causes missing symbol errors when compiling without
szip.  Reported to upstream maintainer.
---
 src/EHapi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/EHapi.c b/src/EHapi.c
index 46a9b5c..208f447 100755
--- a/src/EHapi.c
+++ b/src/EHapi.c
@@ -11379,6 +11379,7 @@ int HE5_szip_can_encode(void )
   return(-1);
 }

+#endif /* H5_HAVE_FILTER_SZIP */

 /*----------------------------------------------------------------------------|
@@ -11509,8 +11510,6 @@ HE5_EHHEisHE5(char *filename)
     }
 }

-#endif /* H5_HAVE_FILTER_SZIP */
-

 #ifndef __cplusplus

--
2.10.0


code:
Fix fortran line length/indentation issues in Fortran test programs.
Reported to upstream maintainer.

diff --git a/samples/he5_gd_writedataF_32.f b/samples/he5_gd_writedataF_32.f
index 515edf9..9c86299 100755
--- a/samples/he5_gd_writedataF_32.f
+++ b/samples/he5_gd_writedataF_32.f
@@ -77,26 +77,26 @@ c           ------------------------------

 		attr4 = "ABCDEFGH"
 		count(1) = 8
-		status = he5_gdwrattr(gdid,"GLOBAL_CHAR_ATTR",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+		status = he5_gdwrattr(gdid,"GLOBAL_CHAR_ATTR"
+     &               ,HE5T_NATIVE_CHAR,count,attr4)
 	write(*,*) 'Status returned by he5_gdwrattr():  ',status

 		attr4 = "111"
 		count(1) = 3
-		status = he5_gdwrgattr(gdid,"GLOBAL_CHAR_ATTR_1",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+		status = he5_gdwrgattr(gdid,"GLOBAL_CHAR_ATTR_1"
+     &               ,HE5T_NATIVE_CHAR,count,attr4)
 	write(*,*) 'Status returned by he5_gdwrgattr():  ',status

 		attr4 = "222222"
 		count(1) = 6
-		status = he5_ehwrglatt(gdfid,"GLOBAL_CHAR_ATTR_2",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+		status = he5_ehwrglatt(gdfid,"GLOBAL_CHAR_ATTR_2"
+     &               ,HE5T_NATIVE_CHAR,count,attr4)
 	write(*,*) 'Status returned by he5_ehwrglatt():  ',status

 		attr5 = "abcdefgh111111111111"
 		count(1) = 20
-		status = he5_gdwrlattr(gdid,"Vegetation","LocalAttribute_0",
-	1	HE5T_NATIVE_CHAR,count,attr5)
+		status = he5_gdwrlattr(gdid,"Vegetation"
+     &               ,"LocalAttribute_0",HE5T_NATIVE_CHAR,count,attr5)
 	write(*,*) 'Status returned by he5_gdwrlattr():  ',status

 		 endif
diff --git a/samples/he5_gd_writedataF_64.f b/samples/he5_gd_writedataF_64.f
index eff04f5..62a7398 100755
--- a/samples/he5_gd_writedataF_64.f
+++ b/samples/he5_gd_writedataF_64.f
@@ -77,26 +77,26 @@ c           ------------------------------

 		attr4 = "ABCDEFGH"
 		count(1) = 8
-		status = he5_gdwrattr(gdid,"GLOBAL_CHAR_ATTR",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+		status = he5_gdwrattr(gdid,"GLOBAL_CHAR_ATTR"
+     &               ,HE5T_NATIVE_CHAR,count,attr4)
 	write(*,*) 'Status returned by he5_gdwrattr():  ',status

 		attr4 = "111"
 		count(1) = 3
-		status = he5_gdwrgattr(gdid,"GLOBAL_CHAR_ATTR_1",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+		status = he5_gdwrgattr(gdid,"GLOBAL_CHAR_ATTR_1"
+     &               ,HE5T_NATIVE_CHAR,count,attr4)
 	write(*,*) 'Status returned by he5_gdwrgattr():  ',status

 		attr4 = "222222"
 		count(1) = 6
-		status = he5_ehwrglatt(gdfid,"GLOBAL_CHAR_ATTR_2",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+		status = he5_ehwrglatt(gdfid,"GLOBAL_CHAR_ATTR_2"
+     &               ,HE5T_NATIVE_CHAR,count,attr4)
 	write(*,*) 'Status returned by he5_ehwrglatt():  ',status

 		attr5 = "abcdefgh111111111111"
 		count(1) = 20
-		status = he5_gdwrlattr(gdid,"Vegetation","LocalAttribute_0",
-	1	HE5T_NATIVE_CHAR,count,attr5)
+		status = he5_gdwrlattr(gdid,"Vegetation"
+     &               ,"LocalAttribute_0",HE5T_NATIVE_CHAR,count,attr5)
 	write(*,*) 'Status returned by he5_gdwrlattr():  ',status

 		 endif
diff --git a/samples/he5_sw_writedataF_32.f b/samples/he5_sw_writedataF_32.f
index 7abab9b..fedd49a 100755
--- a/samples/he5_sw_writedataF_32.f
+++ b/samples/he5_sw_writedataF_32.f
@@ -173,20 +173,21 @@ c     Write Global Attribute
 c     ----------------------
 			attr4 = "ABCDEFGH"
 			count(1) = 8
-			status = he5_swwrattr(swid,"GLOBAL_CHAR_ATTR",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+			status = he5_swwrattr(swid,"GLOBAL_CHAR_ATTR"
+     &                       ,HE5T_NATIVE_CHAR,count,attr4)
 	write(*,*) 'Status returned by he5_swwrattr():  ',status

 			attr4 = "111"
 			count(1) = 3
-			status = he5_swwrgattr(swid,"GLOBAL_CHAR_ATTR_1",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+			status = he5_swwrgattr(swid,"GLOBAL_CHAR_ATTR_1"
+     &                       ,HE5T_NATIVE_CHAR,count,attr4)
 	write(*,*) 'Status returned by he5_swwrgattr():  ',status

 			attr4 = "222222"
 			count(1) = 6
-			status = he5_ehwrglatt(swfid,"GLOBAL_CHAR_ATTR_2",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+			status = he5_ehwrglatt(swfid
+     &                       ,"GLOBAL_CHAR_ATTR_2",HE5T_NATIVE_CHAR
+     &                       ,count,attr4)
 	write(*,*) 'Status returned by he5_ehwrglatt():  ',status

 c     Write Local Attribute
diff --git a/samples/he5_sw_writedataF_64.f b/samples/he5_sw_writedataF_64.f
index 79e34bd..e5d74cb 100755
--- a/samples/he5_sw_writedataF_64.f
+++ b/samples/he5_sw_writedataF_64.f
@@ -162,25 +162,27 @@ c     Write Global Attribute
 c     ----------------------
 			attr4 = "ABCDEFGH"
 			count(1) = 8
-			status = he5_swwrattr(swid,"GLOBAL_CHAR_ATTR",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+			status = he5_swwrattr(swid,"GLOBAL_CHAR_ATTR"
+     &                       ,HE5T_NATIVE_CHAR,count,attr4)

 			attr4 = "111"
 			count(1) = 3
-			status = he5_swwrgattr(swid,"GLOBAL_CHAR_ATTR_1",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+			status = he5_swwrgattr(swid,"GLOBAL_CHAR_ATTR_1"
+     &                       ,HE5T_NATIVE_CHAR,count,attr4)

 			attr4 = "222222"
 			count(1) = 6
-			status = he5_ehwrglatt(swfid,"GLOBAL_CHAR_ATTR_2",HE5T_NATIVE_CHAR,
-	1	count,attr4)
+			status = he5_ehwrglatt(swfid
+     &                       ,"GLOBAL_CHAR_ATTR_2",HE5T_NATIVE_CHAR
+     &                       ,count,attr4)

 c     Write Local Attribute
 c     ---------------------
 			attr5 = "abababababababababab"
 			count(1) = 20
-			status = he5_swwrlattr(swid,"Density","LocalAttribute_0",
-	1	HE5T_NATIVE_CHAR,count,attr5)
+			status = he5_swwrlattr(swid,"Density"
+     &                       ,"LocalAttribute_0",HE5T_NATIVE_CHAR,count
+     &                       ,attr5)

 		 endif
--
2.10.0


code:
Don't build/install/use bundled gctp code/headers.

* cproj.h, proj.h: part of GCTP, therefore already present.
* HE5_config.h, tutils.h: used for library building and testing.

diff --git a/Makefile.in b/Makefile.in
index f160d0d..367b537 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -206,7 +206,7 @@ LIBGCTP = $(top_builddir)/gctp/src/libGctp.la
 @TESTDRIVERS_CONDITIONAL_TRUE@TESTDRIVERS = testdrivers
 @INSTALL_INCLUDE_CONDITIONAL_FALSE@INCLUDE =
 @INSTALL_INCLUDE_CONDITIONAL_TRUE@INCLUDE = include
-SUBDIRS = gctp src $(INCLUDE) samples $(TESTDRIVERS)
+SUBDIRS = src $(INCLUDE) samples $(TESTDRIVERS)
 all: all-recursive

 .SUFFIXES:
diff --git a/samples/Makefile.in b/samples/Makefile.in
index 59331dd..64fda89 100644
--- a/samples/Makefile.in
+++ b/samples/Makefile.in
@@ -206,7 +206,6 @@ he5_gd_datainfo_SOURCES = he5_gd_datainfo.c
 he5_gd_datainfo_OBJECTS = he5_gd_datainfo.$(OBJEXT)
 he5_gd_datainfo_LDADD = $(LDADD)
 am__DEPENDENCIES_1 = $(top_builddir)/src/libhe5_hdfeos.la
-am__DEPENDENCIES_2 = $(top_builddir)/gctp/src/libGctp.la
 he5_gd_datainfo_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_2)
 he5_gd_defexternalfld_SOURCES = he5_gd_defexternalfld.c
@@ -1093,7 +1092,7 @@ sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 LIBHDFEOS5 = $(top_builddir)/src/libhe5_hdfeos.la
-LIBGCTP = $(top_builddir)/gctp/src/libGctp.la
+LIBGCTP =

 # Boilerplate definitions file

diff --git a/include/Makefile.in b/include/Makefile.in
index a572128..64dabb5 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -190,8 +190,7 @@ LIBGCTP = $(top_builddir)/gctp/src/libGctp.la
 # Boilerplate include

 # Headers to install
-include_HEADERS = HE5_GctpFunc.h HE5_HdfEosDef.h HE5_config.h cproj.h ease.h \
-                  isin.h proj.h tutils.h cfortHdf.h
+include_HEADERS = HE5_GctpFunc.h HE5_HdfEosDef.h ease.h isin.h cfortHdf.h

 all: HE5_config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-am
--
2.10.0


code:
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 */


code:
Remove/patch unreproducible config data.

diff --git a/configure b/configure
index eb9f346..ebab94d 100755
--- a/configure
+++ b/configure
@@ -23163,7 +23163,7 @@ H4_VERSION="`cut -d' ' -f3 $srcdir/README.txt | head -1`"

 ## Configuration date
- CONFIG_DATE="`date`"
+CONFIG_DATE=`date -u -d "@$SOURCE_DATE_EPOCH"`

 ## User doing the configuration
  CONFIG_USER="`whoami`@`hostname`"
diff --git a/libhdf4.settings.in b/libhdf4.settings.in
index 1d9bbb9..4180d72 100644
--- a/libhdf4.settings.in
+++ b/libhdf4.settings.in
@@ -5,10 +5,10 @@ General Information:
 -------------------
 		   HDF4 Version: @H4_VERSION@
 		  Configured on: @CONFIG_DATE@
-		  Configured by: @CONFIG_USER@
+		  Configured by: guix
 		 Configure mode: @CONFIG_MODE@
-		    Host system: @host_cpu@-@host_vendor@-@host_os@
-              Uname information: @UNAME_INFO@
+		    Host system: guix
+              Uname information: guix
 		      Libraries: @STATIC_SHARED@
 	     Installation point: @prefix@

--
2.10.0


code:
Allow building a shared library with Fortran.
---
 configure | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/configure b/configure
index f37d2fa..eb9f346 100755
--- a/configure
+++ b/configure
@@ -6141,12 +6141,6 @@ if test "X${enable_shared}" != "Xyes"; then
     enable_shared="no"
 fi

-if test "X${enable_shared}" = "Xyes"; then
-    if test "X${BUILD_FORTRAN}" = "Xyes"; then
-        as_fn_error $? "Cannot build shared fortran libraries. Please configure with --disable-fortran flag." "$LINENO" 5
-    fi
-fi
-

 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
 $as_echo_n "checking whether ln -s works... " >&6; }
--
2.10.0


code:
Build with libtirpc on all architectures because glibc no longer provides
SunRPC support.

diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -23635,10 +23635,13 @@
   *-pc-cygwin*)
     LIBS="$LIBS -ltirpc"
     CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc"  ;;
+  *-linux-gnu)
+    LIBS="$LIBS -ltirpc"
+    CPPFLAGS="$CPPFLAGS"  ;;
   *) ;;
 esac

-if test "X$BUILD_XDR" != "Xyes"; then
+if test "X$BUILD_XDR" = "Xyes"; then
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */

@@ -23693,9 +23696,9 @@
   ## but we need to make sure that it is present on the system. Do that here,
   ## The SunRPC of the glibc has been replaced by a TI-RPC (Transport Independent RPC) library for IPv6 support
   case "$host" in
-    *-pc-cygwin*)
+    *)
       HAVE_RPC="yes"
-      ac_fn_c_check_header_mongrel "$LINENO" "rpc.h" "ac_cv_header_rpc_h" "$ac_includes_default"
+      ac_fn_c_check_header_mongrel "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_h" "$ac_includes_default"
 if test "x$ac_cv_header_rpc_h" = xyes; then :
   :
 else


code:
--- a/src/H5.c
+++ b/src/H5.c
@@ -138,7 +138,7 @@
         if (mpi_initialized && !mpi_finalized) {
             int key_val;

-            if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_NULL_COPY_FN,
+            if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN,
                                                                  (MPI_Comm_delete_attr_function *)H5_mpi_delete_cb,
                                                                  &key_val, NULL)))
                 HMPI_GOTO_ERROR(FAIL, "MPI_Comm_create_keyval failed", mpi_code)
--- hdf5-1.8.19/testpar/t_cache.c
+++ hdf5-1.8.19/testpar/t_cache.c
@@ -1187,20 +1187,20 @@
     struct mssg_t sample; /* used to compute displacements */

     /* setup the displacements array */
-    if ( ( MPI_SUCCESS != MPI_Address(&sample.req, &displs[0]) ) ||
-         ( MPI_SUCCESS != MPI_Address(&sample.src, &displs[1]) ) ||
-         ( MPI_SUCCESS != MPI_Address(&sample.dest, &displs[2]) ) ||
-         ( MPI_SUCCESS != MPI_Address(&sample.mssg_num, &displs[3]) ) ||
-         ( MPI_SUCCESS != MPI_Address(&sample.base_addr, &displs[4]) ) ||
-         ( MPI_SUCCESS != MPI_Address(&sample.len, &displs[5]) ) ||
-         ( MPI_SUCCESS != MPI_Address(&sample.ver, &displs[6]) ) ||
-         ( MPI_SUCCESS != MPI_Address(&sample.count, &displs[7]) ) ||
-         ( MPI_SUCCESS != MPI_Address(&sample.magic, &displs[8]) ) ) {
+    if ( ( MPI_SUCCESS != MPI_Get_address(&sample.req, &displs[0]) ) ||
+         ( MPI_SUCCESS != MPI_Get_address(&sample.src, &displs[1]) ) ||
+         ( MPI_SUCCESS != MPI_Get_address(&sample.dest, &displs[2]) ) ||
+         ( MPI_SUCCESS != MPI_Get_address(&sample.mssg_num, &displs[3]) ) ||
+         ( MPI_SUCCESS != MPI_Get_address(&sample.base_addr, &displs[4]) ) ||
+         ( MPI_SUCCESS != MPI_Get_address(&sample.len, &displs[5]) ) ||
+         ( MPI_SUCCESS != MPI_Get_address(&sample.ver, &displs[6]) ) ||
+         ( MPI_SUCCESS != MPI_Get_address(&sample.count, &displs[7]) ) ||
+         ( MPI_SUCCESS != MPI_Get_address(&sample.magic, &displs[8]) ) ) {

         nerrors++;
         success = FALSE;
         if ( verbose ) {
-            HDfprintf(stdout, "%d:%s: MPI_Address() call failed.\n",
+            HDfprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n",
                       world_mpi_rank, fcn_name);
         }

@@ -1215,14 +1215,14 @@

     if ( success ) {

-        result = MPI_Type_struct(9, block_len, displs, mpi_types, &mpi_mssg_t);
+        result = MPI_Type_create_struct(9, block_len, displs, mpi_types, &mpi_mssg_t);

         if ( result != MPI_SUCCESS ) {

             nerrors++;
             success = FALSE;
             if ( verbose ) {
-                HDfprintf(stdout, "%d:%s: MPI_Type_struct() call failed.\n",
+                HDfprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n",
                           world_mpi_rank, fcn_name);
             }
         }
--- hdf5-1.8.19/testpar/t_mpi.c
+++ hdf5-1.8.19/testpar/t_mpi.c
@@ -279,7 +279,7 @@
 	printf("Skipped GB file range test "
 		"because MPI_Offset cannot support it\n");
     }else{
-	buf = HDmalloc(MB);
+	buf = (char *)HDmalloc(MB);
 	VRFY((buf!=NULL), "malloc succeed");

 	/* open a new file. Remove it first in case it exists. */
@@ -624,7 +624,7 @@
 and this platform.

 1. Details for the test:
-1) Create two derived datatypes with MPI_Type_hindexed:
+1) Create two derived datatypes with MPI_Type_create_hindexed:
         datatype1:
 	count = 1, blocklens = 1, offsets = 0,
 	base type = MPI_BYTE(essentially a char)
@@ -633,7 +633,7 @@
 	base type = MPI_BYTE

 2) Using these two derived datatypes,
-   Build another derived datatype with MPI_Type_struct:
+   Build another derived datatype with MPI_Type_create_struct:
         advtype: derived from datatype1 and datatype2
         advtype:
 	count = 2, blocklens[0] = 1, blocklens[1]=1,
@@ -676,10 +676,9 @@
     int  mpi_err_strlen;
     int  mpi_err;
     int  i;
-    int  nerrors = 0;		/* number of errors */
     MPI_Datatype  etype,filetype;
     MPI_Datatype  adv_filetype,bas_filetype[2];
-    MPI_Datatype  etypenew, filetypenew;
+    MPI_Datatype  filetypenew;
     MPI_Offset    disp;
     MPI_Status    Status;
     MPI_Aint      adv_disp[2];
@@ -715,7 +714,7 @@
     blocklens[0] = 1;
     offsets[0]   = 0;

-    if((mpi_err= MPI_Type_hindexed(count,blocklens,offsets,MPI_BYTE,&filetype))
+    if((mpi_err= MPI_Type_create_hindexed(count,blocklens,offsets,MPI_BYTE,&filetype))
        != MPI_SUCCESS){
       	MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
 	printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
@@ -731,7 +730,7 @@
     count = 1;
     blocklens[0]=1;
     offsets[0] = 1;
-    if((mpi_err= MPI_Type_hindexed(count,blocklens,offsets,MPI_BYTE,&filetypenew))
+    if((mpi_err= MPI_Type_create_hindexed(count,blocklens,offsets,MPI_BYTE,&filetypenew))
        != MPI_SUCCESS){
       	MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
 	printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
@@ -752,10 +751,10 @@
     bas_filetype[0]  = filetype;
     bas_filetype[1]  = filetypenew;

-    if((mpi_err= MPI_Type_struct(outcount,adv_blocklens,adv_disp,bas_filetype,&adv_filetype))
+    if((mpi_err= MPI_Type_create_struct(outcount,adv_blocklens,adv_disp,bas_filetype,&adv_filetype))
        != MPI_SUCCESS){
       	MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
-	printf("MPI_Type_struct failed (%s)\n", mpi_err_str);
+	printf("MPI_Type_create_struct failed (%s)\n", mpi_err_str);
 	return 1;
     }
     if((mpi_err=MPI_Type_commit(&adv_filetype))!=MPI_SUCCESS){
@@ -842,7 +841,7 @@
 processes are needed.

 1. Details for the test:
-1) Create one derived datatype with MPI_Type_hindexed:
+1) Create one derived datatype with MPI_Type_create_hindexed:

 2) Choosing at least two processes to contribute none for IO with
    the buf size inside MPI_Write_at_all to 0.
@@ -898,7 +897,7 @@
     offsets[1] = (mpi_size+mpi_rank)*count;

     if(count !=0) {
-        if((mpi_err = MPI_Type_hindexed(2,
+        if((mpi_err = MPI_Type_create_hindexed(2,
                                         blocklens,
                                         offsets,
                                         etype,
@@ -914,7 +913,7 @@
             return 1;
         } /* end if */

-        if((mpi_err = MPI_Type_hindexed(2,
+        if((mpi_err = MPI_Type_create_hindexed(2,
                                         blocklens,
                                         offsets,
                                         etype,
@@ -1098,7 +1097,7 @@
      * calls.  By then, MPI calls may not work.
      */
     if (H5dont_atexit() < 0){
-	printf("Failed to turn off atexit processing. Continue.\n", mpi_rank);
+	printf("Failed to turn off atexit processing. Continue.\n");
     };
     H5open();
     if (parse_options(argc, argv) != 0){


code:
Honor SOURCE_DATE_EPOCH when exporting configuration date.
Autoconf-level patch submitted upstream on Wed Apr 13 17:03:23 UTC 2016

--- a/configure
+++ b/configure
@@ -27737,7 +28573,14 @@

 ## Configuration date
- CONFIG_DATE="`date`"
+ CONFIG_DATE="`date -u`"
+if test -n "$SOURCE_DATE_EPOCH"; then
+  CONFIG_DATE=`date -u -d "@$SOURCE_DATE_EPOCH" 2>/dev/null \
+               || date -u -r "$SOURCE_DATE_EPOCH" 2>/dev/null`
+  if test -z "$CONFIG_DATE"; then
+    as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
+  fi
+fi

 ## User doing the configuration
  CONFIG_USER="`whoami`@`hostname`"


code:
This patch is based heavily on the Debian patch.

https://salsa.debian.org/printing-team/hplip/raw/debian/3.18.10+dfsg0-1/debian/patches/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch

---
 Makefile.am                  | 22 +++-------------------
 Makefile.in                  | 33 +++++----------------------------
 prnt/hpcups/HPCupsFilter.cpp | 21 ---------------------
 3 files changed, 8 insertions(+), 68 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ef6480f..ecada5c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -166,7 +166,7 @@ if !HPLIP_CLASS_DRIVER
 dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
 endif #HPLIP_CLASS_DRIVER

-dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so
+dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
 dist_noinst_SCRIPTS += dat2drv.py install.py  hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv

 if !HPLIP_CLASS_DRIVER
@@ -590,11 +590,10 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
 	prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \
 	prnt/hpcups/genPCLm.h \
 	common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \
-	prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \
-	prnt/hpcups/ImageProcessor.h
+	prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp

 hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
+hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
 #else
 #hpcupsdir = $(cupsfilterdir)
 #hpcups_PROGRAMS = hpcups
@@ -679,21 +678,10 @@ printpluginsdir=$(cupsfilterdir)

 dist_filter_DATA = hpcups hpps dat2drv
-dist_printplugins_DATA = prnt/plugins/hbpl1-arm32.so prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so prnt/plugins/lj-x86_64.so
 endif #HPLIP_CLASS_DRIVER

 install-data-hook:
 if HPLIP_BUILD
-	if [ \( "$(UNAME)" = "x86_64" -a  -d "$(libdir)/" \) ]; then \
-		cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \
-		chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \
-		ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \
-	fi; \
-	if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \
-		cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \
-		chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
-		ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
-	fi
 if !HPLIP_CLASS_DRIVER
 #	   If scanner build, add hpaio entry to sane dll.conf.
 	if [ "$(scan_build)" = "yes" ]; then \
@@ -874,10 +862,6 @@ if HPLIP_CLASS_DRIVER
 	rm -rf $(distdir)/setup.py
 	rm -rf $(distdir)/systray.py
 	rm -rf $(distdir)/timedate.py
-	rm -rf $(distdir)/prnt/plugins/lj-arm32.so
-	rm -rf $(distdir)/prnt/plugins/lj-arm64.so
-	rm -rf $(distdir)/prnt/plugins/lj-x86_32.so
-	rm -rf $(distdir)/prnt/plugins/lj-x86_64.so
 	rm -rf $(distdir)/hpijs-drv
 	rm -rf $(distdir)/prnt/hpcups/
 	rm -rf $(distdir)/prnt/ps/
diff --git a/Makefile.in b/Makefile.in
index 910a268..cd44203 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -103,7 +103,7 @@ DIST_COMMON = $(am__configure_deps) \

 # ip library
 @HPLIP_BUILD_TRUE@am__append_12 = libhpip.la
-@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_13 = prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so
+@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_13 = prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_14 = dat2drv.py install.py  hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@am__append_15 = scan/sane/hpaio.desc \
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@	installer/text_install.py \
@@ -500,8 +500,7 @@ am__hpcups_SOURCES_DIST = prnt/hpcups/HPCupsFilter.cpp \
 	prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \
 	prnt/hpcups/genPCLm.h common/utils.c common/utils.h \
 	prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \
-	prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \
-	prnt/hpcups/ImageProcessor.h
+	prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp
 @HPCUPS_INSTALL_TRUE@am_hpcups_OBJECTS =  \
 @HPCUPS_INSTALL_TRUE@	hpcups-HPCupsFilter.$(OBJEXT) \
 @HPCUPS_INSTALL_TRUE@	hpcups-dbuscomm.$(OBJEXT) \
@@ -723,8 +722,7 @@ am__dist_locatedriver_DATA_DIST = locatedriver
 am__dist_models_DATA_DIST = data/models/models.dat
 am__dist_noinst_DATA_DIST = prnt/drv/hpijs.drv.in.template \
 	prnt/drv/hpcups.drv.in.template \
-	prnt/hpcups/libImageProcessor-x86_64.so \
-	prnt/hpcups/libImageProcessor-x86_32.so scan/sane/hpaio.desc \
+	scan/sane/hpaio.desc \
 	installer/text_install.py data/localization/hplip_de.ts \
 	data/localization/hplip_es.ts data/localization/hplip_fr.ts \
 	data/localization/hplip_it.ts data/localization/hplip_pt.ts \
@@ -1932,11 +1930,6 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-designjet_z6810ps_42in-ps.ppd.gz \
 	ppd/classppd/ps/hp-postscript-inkjet.ppd.gz \
 	ppd/classppd/ps/hp-postscript-laserjet-pro.ppd.gz \
 	ppd/classppd/ps/hp-postscript-laserjet.ppd.gz
-am__dist_printplugins_DATA_DIST = prnt/plugins/hbpl1-arm32.so \
-	prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so \
-	prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so \
-	prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so \
-	prnt/plugins/lj-x86_64.so
 am__dist_prnt_DATA_DIST = prnt/cups.py prnt/__init__.py prnt/ldl.py \
 	prnt/pcl.py prnt/colorcal.py
 am__dist_rules_DATA_DIST = data/rules/56-hpmud.rules \
@@ -4665,11 +4658,10 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpijs
 @HPCUPS_INSTALL_TRUE@	prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \
 @HPCUPS_INSTALL_TRUE@	prnt/hpcups/genPCLm.h \
 @HPCUPS_INSTALL_TRUE@	common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \
-@HPCUPS_INSTALL_TRUE@	prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \
-@HPCUPS_INSTALL_TRUE@	prnt/hpcups/ImageProcessor.h
+@HPCUPS_INSTALL_TRUE@	prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp

 @HPCUPS_INSTALL_TRUE@hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
-@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
+@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
 #else
 #hpcupsdir = $(cupsfilterdir)
 #hpcups_PROGRAMS = hpcups
@@ -4717,7 +4709,6 @@ ppddir = $(hpppddir)
 @HPLIP_CLASS_DRIVER_TRUE@filterdir = $(cupsfilterdir)
 @HPLIP_CLASS_DRIVER_TRUE@printpluginsdir = $(cupsfilterdir)
 @HPLIP_CLASS_DRIVER_TRUE@dist_filter_DATA = hpcups hpps dat2drv
-@HPLIP_CLASS_DRIVER_TRUE@dist_printplugins_DATA = prnt/plugins/hbpl1-arm32.so prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so prnt/plugins/lj-x86_64.so
 all: all-am

 .SUFFIXES:
@@ -9380,16 +9371,6 @@ uninstall-am: uninstall-apparmor_abstractionDATA \

 install-data-hook:
-@HPLIP_BUILD_TRUE@	if [ \( "$(UNAME)" = "x86_64" -a  -d "$(libdir)/" \) ]; then \
-@HPLIP_BUILD_TRUE@		cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \
-@HPLIP_BUILD_TRUE@		chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \
-@HPLIP_BUILD_TRUE@		ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \
-@HPLIP_BUILD_TRUE@	fi; \
-@HPLIP_BUILD_TRUE@	if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \
-@HPLIP_BUILD_TRUE@		cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \
-@HPLIP_BUILD_TRUE@		chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
-@HPLIP_BUILD_TRUE@		ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
-@HPLIP_BUILD_TRUE@	fi
 #	   If scanner build, add hpaio entry to sane dll.conf.
 @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@	if [ "$(scan_build)" = "yes" ]; then \
 @HPLIP_BUILD_TRUE@@HPLIP_CLASS_DRIVER_FALSE@	   $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \
@@ -9556,10 +9537,6 @@ dist-hook:
 @HPLIP_CLASS_DRIVER_TRUE@	rm -rf $(distdir)/setup.py
 @HPLIP_CLASS_DRIVER_TRUE@	rm -rf $(distdir)/systray.py
 @HPLIP_CLASS_DRIVER_TRUE@	rm -rf $(distdir)/timedate.py
-@HPLIP_CLASS_DRIVER_TRUE@	rm -rf $(distdir)/prnt/plugins/lj-arm32.so
-@HPLIP_CLASS_DRIVER_TRUE@	rm -rf $(distdir)/prnt/plugins/lj-arm64.so
-@HPLIP_CLASS_DRIVER_TRUE@	rm -rf $(distdir)/prnt/plugins/lj-x86_32.so
-@HPLIP_CLASS_DRIVER_TRUE@	rm -rf $(distdir)/prnt/plugins/lj-x86_64.so
 @HPLIP_CLASS_DRIVER_TRUE@	rm -rf $(distdir)/hpijs-drv
 @HPLIP_CLASS_DRIVER_TRUE@	rm -rf $(distdir)/prnt/hpcups/
 @HPLIP_CLASS_DRIVER_TRUE@	rm -rf $(distdir)/prnt/ps/
diff --git a/prnt/hpcups/HPCupsFilter.cpp b/prnt/hpcups/HPCupsFilter.cpp
index 5b282d8..0bacfaf 100644
--- a/prnt/hpcups/HPCupsFilter.cpp
+++ b/prnt/hpcups/HPCupsFilter.cpp
@@ -31,7 +31,6 @@
 \*****************************************************************************/

 #include "HPCupsFilter.h"
-#include "ImageProcessor.h"

 #include <signal.h>
 #include <sys/wait.h>
@@ -637,16 +636,10 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)

     sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
-    image_processor_t* imageProcessor = imageProcessorCreate();

     while (cupsRasterReadHeader2(cups_raster, &cups_header))
     {

-        IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header);
-        if (result != IPE_SUCCESS){
-            dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
-        }
-
         current_page_number++;

         if (current_page_number == 1) {
@@ -745,12 +738,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
             color_raster = rgbRaster;
             black_raster = kRaster;

-            result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
-            if (result != IPE_SUCCESS){
-                dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
-            }
-
-
             if ((y == 0) && !is_ljmono) {
                 //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer
                 //may not skip blank lines before actual data
@@ -780,12 +767,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
             }
         }  // for() loop end

-        result = imageProcessorEndPage(imageProcessor);
-        if (result != IPE_SUCCESS){
-                dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
-        }
-
-
         m_Job.NewPage();
         if (err != NO_ERROR) {
             break;
@@ -800,8 +781,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
         rgbRaster = NULL;
     }

-    imageProcessorDestroy(imageProcessor);
-
     unlink(hpPreProcessedRasterFile);
     return ret_status;
 }
--
2.19.1


code:
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Wed, 20 May 2020 19:17:13 +0200
Subject: [PATCH] gnu: http-client: Fix assertion on armhf-linux.

Copied verbatim from [0] to fix guix pull[1] on ARM systems.

[0]: https://github.com/nodejs/http-parser/pull/510
[1]: https://issues.guix.gnu.org/40604

From 0e5868aebb9eb92b078d27bb2774c2154dc167e2 Mon Sep 17 00:00:00 2001
From: Ben Noordhuis <info@bnoordhuis.nl>
Date: Thu, 30 Apr 2020 11:22:50 +0200
Subject: [PATCH] Fix sizeof(http_parser) assert

The result should be 32 on both 32 bits and 64 bits architectures
because of struct padding.

Fixes: https://github.com/nodejs/http-parser/issues/507
---
 test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test.c b/test.c
index 7983424..f60a84f 100644
--- a/test.c
+++ b/test.c
@@ -4220,8 +4220,11 @@ main (void)
   patch = version & 255;
   printf("http_parser v%u.%u.%u (0x%06lx)\n", major, minor, patch, version);

+  /* Should be 32 on both 32 bits and 64 bits architectures because of
+   * struct padding, see https://github.com/nodejs/http-parser/issues/507.
+   */
   printf("sizeof(http_parser) = %u\n", (unsigned int)sizeof(http_parser));
-  assert(sizeof(http_parser) == 4 + 4 + 8 + 2 + 2 + 4 + sizeof(void *));
+  assert(sizeof(http_parser) == 32);

   //// API
   test_preserve_data();


code:
Traverse the entities hash's keys in sorted order to ensure reproducibility.

--- libhubbub-0.3.3/build/make-entities.pl
+++ libhubbub-0.3.3/build/make-entities.pl
@@ -86,7 +86,7 @@

 my $trie;

-foreach my $key (keys %entities) {
+foreach my $key (sort keys %entities) {
    $trie = insert_node($trie, $key, $entities{$key});
 }


code:
This fixes linking libfstest/test-fcntl (and others).

As discussed with upstream: https://lists.gnu.org/archive/html/bug-hurd/2020-03/msg00018.html

From 96a9f67a8685e713f25259c18306797d54cc27a5 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Sat, 14 Mar 2020 11:28:31 +0100
Subject: [PATCH] build: Fix cross build on Guix.

As discussed in https://lists.gnu.org/archive/html/bug-hurd/2020-03/msg00018.html.

* Makeconf (lpath): Add -Wl,-rpath-link=<dir> next to -L<dir>.
---
 Makeconf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makeconf b/Makeconf
index 67f7ab1c..f68ff6e3 100644
--- a/Makeconf
+++ b/Makeconf
@@ -325,7 +325,8 @@ _libsubst=${libsubst$(patsubst %,-override,${libsubst-override})}

 # Direct the linker where to find shared objects specified in the
 # dependencies of other shared objects it encounters.
-lpath := -L. $(patsubst %,-L%,$(dir $(wildcard ../lib*/lib*.so)))
+lib_dirs := $(dir $(wildcard ../lib*/lib*.so))
+lpath := -L. $(lib_dirs:%=-L%) $(lib_dirs:%=-Wl,-rpath-link=%)

 # Main rule to link executables
 #
--
2.24.0


code:
From 75cb948c575fca3962c4cce115d31dd178bc389f Mon Sep 17 00:00:00 2001
From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
Date: Tue, 12 May 2020 07:39:59 +0200
Subject: [PATCH] ext2fs: Update to upstream Hurd-reserved xattr index for
 "gnu.*".

See
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3980bd3b406addb327d858aebd19e229ea340b9a

This supports setting (and reading) of passive trasnlators from
GNU/Linux, e.g.

    dd if=/dev/zero of=file bs=1k count=1000
    losetup /dev/loop0 file
    mke2fs -t ext2 -o hurd -O ext_attr /dev/loop0
    mount -t ext2 -o x-xattr-translator-records /dev/loop0 /mnt
    mkdir -p /mnt/servers/socket
    touch /mnt/servers/socket/1
    setfattr --name=gnu.translator --value='/hurd/pflocal\0' /mnt/servers/socket/1
    getfattr --name=gnu.translator /mnt/servers/socket/1
    # file: 1
    gnu.translator="/hurd/pflocal"

* ext2fs/xattr.c (struct _xattr_prefix): For "gnu.*", use index for
the Hurd (10).
---
 ext2fs/xattr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ext2fs/xattr.c b/ext2fs/xattr.c
index f6ea0f39..78458214 100644
--- a/ext2fs/xattr.c
+++ b/ext2fs/xattr.c
@@ -1,6 +1,6 @@
  /* Ext2 support for extended attributes

-   Copyright (C) 2006, 2016 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2016, 2020 Free Software Foundation, Inc.

    Written by Thadeu Lima de Souza Cascardo <cascardo@dcc.ufmg.br>
    and Shengyu Zhang <lastavengers@outlook.com>
@@ -39,7 +39,7 @@ xattr_prefixes[] =
   {
   1, "user.", sizeof "user." - 1},
   {
-  7, "gnu.", sizeof "gnu." - 1},
+  10, "gnu.", sizeof "gnu." - 1},
   {
   0, NULL, 0}
 };
--
2.26.0


code:
--- hydra-20150407.4c0e3e4/tests/evaluation-tests.pl	2015-04-15 12:00:19.000000000 -0500
+++ hydra-20150407.4c0e3e4/tests/evaluation-tests.pl	2015-04-17 08:53:04.940301471 -0500
@@ -7,7 +7,7 @@

 my $db = Hydra::Model::DB->new;

-use Test::Simple tests => 72;
+use Test::Simple tests => 68;

 hydra_setup($db);

@@ -103,13 +103,6 @@
         uri => "$jobsBaseUri/hg-repo",
         update => getcwd . "/jobs/hg-update.sh"
     },
-    {
-        name => "darcs",
-        nixexpr => "darcs-input.nix",
-        type => "darcs",
-        uri => "$jobsBaseUri/darcs-repo",
-        update => getcwd . "/jobs/darcs-update.sh"
-    }
 );

 foreach my $scm ( @scminputs ) {


code:
Fixes needed when avoiding bundled libraries.

--- icecat-60.5.0/xpcom/build/moz.build.orig	2018-09-13 17:46:49.000000000 -0400
+++ icecat-60.5.0/xpcom/build/moz.build	2018-09-22 04:26:50.659564554 -0400
@@ -99,10 +99,5 @@
     '/docshell/base',
 ]

-if CONFIG['MOZ_VPX']:
-    LOCAL_INCLUDES += [
-        '/media/libvpx',
-    ]
-
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     CXXFLAGS += CONFIG['TK_CFLAGS']
--- icecat-60.5.0/storage/moz.build.orig	2018-09-13 17:51:11.000000000 -0400
+++ icecat-60.5.0/storage/moz.build	2018-09-22 04:26:50.659564554 -0400
@@ -117,7 +117,6 @@
     DEFINES['MOZ_MEMORY_TEMP_STORE_PRAGMA'] = True

 LOCAL_INCLUDES += [
-    '/db/sqlite3/src',
     '/dom/base',
 ]

--- icecat-60.5.0/dom/indexedDB/moz.build.orig	2018-09-13 17:49:42.000000000 -0400
+++ icecat-60.5.0/dom/indexedDB/moz.build	2018-09-22 04:26:50.663564574 -0400
@@ -102,7 +102,6 @@
     CXXFLAGS += ['-Wno-error=shadow']

 LOCAL_INCLUDES += [
-    '/db/sqlite3/src',
     '/dom/base',
     '/dom/storage',
     '/ipc/glue',
--- icecat-60.5.0/media/webrtc/trunk/webrtc/base/rtc_task_queue_gn/moz.build.orig	2018-09-13 17:40:54.000000000 -0400
+++ icecat-60.5.0/media/webrtc/trunk/webrtc/base/rtc_task_queue_gn/moz.build	2018-09-23 21:33:12.319975105 -0400
@@ -130,11 +130,6 @@
     DEFINES["WEBRTC_POSIX"] = True
     DEFINES["_FILE_OFFSET_BITS"] = "64"

-    LOCAL_INCLUDES += [
-        "/ipc/chromium/src/third_party/libevent/include/",
-        "/ipc/chromium/src/third_party/libevent/linux/"
-    ]
-
     UNIFIED_SOURCES += [
         "/media/webrtc/trunk/webrtc/base/task_queue_libevent.cc",
         "/media/webrtc/trunk/webrtc/base/task_queue_posix.cc"


code:
Make some of the changes needed to the 'makeicecat' script, to allow it to run
in a snippet without network access.  After this patch is applied, some
additional changes will be made using 'substitute*'.

diff --git a/makeicecat b/makeicecat
index 8be2362..48716f2 100755
--- a/makeicecat
+++ b/makeicecat
@@ -31,55 +31,55 @@ SOURCEDIR=icecat-$FFVERSION

 DATA="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/data

-mkdir -p output
-cd output
+# mkdir -p output
+# cd output

 ###############################################################################
 # Retrieve FF source code
 ###############################################################################

-rm mozilla-esr${FFMAJOR} $SOURCEDIR -rf
-
-wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz
-wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc
-gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353
-gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc
-echo -n ae692bf2a15908cacbb9d4c7ccf78525a87410ff3f13befedc1926f849bc27cc firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c -
-
-echo Extracting Firefox tarball
-tar -xf firefox-${FFVERSION}esr.source.tar.xz
-
-mv firefox-${FFVERSION} $SOURCEDIR
+# rm mozilla-esr${FFMAJOR} $SOURCEDIR -rf
+#
+# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz
+# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc
+# gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353
+# gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc
+# echo -n ae692bf2a15908cacbb9d4c7ccf78525a87410ff3f13befedc1926f849bc27cc firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c -
+#
+# echo Extracting Firefox tarball
+# tar -xf firefox-${FFVERSION}esr.source.tar.xz
+#
+# mv firefox-${FFVERSION} $SOURCEDIR

 ###############################################################################
 # Retrieve l10n
 ###############################################################################

-mkdir l10n
-cd l10n
-while read line;do
-    line=$(echo $line |cut -d' ' -f1)
-    #[ $line = "es-ES" ] || continue # To speed up testing
-    [ $line = "en-US" ] && continue
-    hg clone https://hg.mozilla.org/l10n-central/$line
-    mkdir -p $line/browser/chrome/browser/preferences
-    touch $line/browser/chrome/browser/preferences/advanced-scripts.dtd
-    rm -rf $line/.hg*
-done < ../$SOURCEDIR/browser/locales/shipped-locales
-cd ..
-
-mv l10n $SOURCEDIR
-
-hg clone http://hg.mozilla.org/l10n/compare-locales/
-cd compare-locales/
-hg checkout RELEASE_3_3_0
-cd ..
-rm compare-locales/.hg* compare-locales/.git* -rf
-mv compare-locales $SOURCEDIR/l10n
+# mkdir l10n
+# cd l10n
+# while read line;do
+#     line=$(echo $line |cut -d' ' -f1)
+#     #[ $line = "es-ES" ] || continue # To speed up testing
+#     [ $line = "en-US" ] && continue
+#     hg clone https://hg.mozilla.org/l10n-central/$line
+#     mkdir -p $line/browser/chrome/browser/preferences
+#     touch $line/browser/chrome/browser/preferences/advanced-scripts.dtd
+#     rm -rf $line/.hg*
+# done < ../$SOURCEDIR/browser/locales/shipped-locales
+# cd ..
+#
+# mv l10n $SOURCEDIR
+#
+# hg clone http://hg.mozilla.org/l10n/compare-locales/
+# cd compare-locales/
+# hg checkout RELEASE_3_3_0
+# cd ..
+# rm compare-locales/.hg* compare-locales/.git* -rf
+# mv compare-locales $SOURCEDIR/l10n

 #######################################################

-cd $SOURCEDIR
+# cd $SOURCEDIR

 shopt -s nullglob
 for patch in $DATA/patches/*.patch; do
@@ -603,6 +603,6 @@ sed 's/777/755/;' -i toolkit/crashreporter/google-breakpad/Makefile.in
 # Fix CVE-2012-3386
 /bin/sed 's/chmod a+w/chmod u+w/' -i ./js/src/ctypes/libffi/Makefile.in ./toolkit/crashreporter/google-breakpad/Makefile.in ./toolkit/crashreporter/google-breakpad/src/third_party/glog/Makefile.in || true

-cd ..
-echo Packaging tarball
-tar cfj icecat-$ICECATVERSION.tar.bz2 $SOURCEDIR
+# cd ..
+# echo Packaging tarball
+# tar cfj icecat-$ICECATVERSION.tar.bz2 $SOURCEDIR


code:
From 2e8618d22568b6e00892a17303d437dd700eca98 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Tue, 5 May 2020 21:27:41 -0400
Subject: [PATCH] Revert "Update Reveal hidden HTML."

I prefer the user interface of the old version.

This reverts commit f6e3adb6b2344ee2c7bb453a305fd2d6fb4c194c.
---
 .../passive_improve_css.js                    | 23 ++++++++++++++-----
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/data/extensions/SubmitMe@0xbeef.coffee/passive_improve_css.js b/data/extensions/SubmitMe@0xbeef.coffee/passive_improve_css.js
index 7692990..ca57982 100644
--- a/data/extensions/SubmitMe@0xbeef.coffee/passive_improve_css.js
+++ b/data/extensions/SubmitMe@0xbeef.coffee/passive_improve_css.js
@@ -10,6 +10,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 */

+var bad = [];
+
 function escapeHTML (unsafe_str) {
     return unsafe_str
       .replace(/&/g, '&')
@@ -20,9 +22,14 @@ function escapeHTML (unsafe_str) {
       .replace(/\//g, '/')
 }

+function dounhide(){
+        for(var i = 0; i < bad.length; i++){
+                        bad[i].remove();
+                }
+}
+
 console.log("passive_improve_css.js");
 function reveal_css(){
-	var bad = [];

 	var elements = document.getElementsByTagName("style");
 	for(var i = 0; i < elements.length; i++){
@@ -41,16 +48,20 @@ function reveal_css(){

 		}
 	}
-	if(bad.length > 0 && window.confirm("Hidden HTML detected, would you like to reveal it?")){
-		for(var i = 0; i < bad.length; i++){
-			bad[i].remove();
-		}
+	if(bad.length > 0){
+		const insertedDiv = document.createElement('div');
+		insertedDiv.innerHTML= '
' +
+	                'Reveal hidden elements' +
+			'';
+		insertedDiv.style="position:fixed; bottom:1em; right:1em; opacity:0.8; z-index: 2147483647 !important; border-radius: 3px !important; background-color: #fff !important; padding: 0.5em !important;   box-shadow: 0 0 3px grey !important; font-color:#bbb!important; cursor: pointer!important;";
+		insertedDiv.addEventListener("click", dounhide, false);
+		document.body.insertBefore(insertedDiv, document.body.firstChild);
 	}
 }

 reveal_css();

-
 /*
 var a = document.getElementsByTagName("style")[2];
 var btn = document.createElement("style");        // Create a <button> element
--
2.26.2


code:
Allow building against system-wide graphite2/harfbuzz.
See <https://bugzilla.mozilla.org/show_bug.cgi?id=847568>
Based on:
  https://svnweb.freebsd.org/ports/head/www/firefox-esr/files/patch-bug847568?revision=472833&view=co
Modified for use with patch -p1, and to apply cleanly to GNU IceCat.

--- icecat-60.5.0/config/system-headers.mozbuild
+++ icecat-60.5.0/config/system-headers.mozbuild
@@ -1311,6 +1311,19 @@
         'pixman.h',
     ]

+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
+    system_headers += [
+        'graphite2/Font.h',
+        'graphite2/Segment.h',
+    ]
+
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+    system_headers += [
+        'harfbuzz/hb-glib.h',
+        'harfbuzz/hb-ot.h',
+        'harfbuzz/hb.h',
+    ]
+
 if CONFIG['MOZ_SYSTEM_LIBVPX']:
     system_headers += [
         'vpx_mem/vpx_mem.h',
--- icecat-60.5.0/dom/base/moz.build
+++ icecat-60.5.0/dom/base/moz.build
@@ -474,6 +474,9 @@
 if CONFIG['MOZ_X11']:
     CXXFLAGS += CONFIG['TK_CFLAGS']

+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
 GENERATED_FILES += [
     'PropertyUseCounterMap.inc',
     'UseCounterList.h',
--- icecat-60.5.0/gfx/graphite2/moz-gr-update.sh
+++ icecat-60.5.0/gfx/graphite2/moz-gr-update.sh
@@ -1,6 +1,7 @@
 #!/bin/bash

 # Script used to update the Graphite2 library in the mozilla source tree
+# and bump version for --with-system-graphite2

 # This script lives in gfx/graphite2, along with the library source,
 # but must be run from the top level of the mozilla-central tree.
@@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
 #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
 #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;

+# chase version for --with-system-graphite2
+perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
+  if /GR2_VERSION_REQUIRE/" old-configure.in
+
 # summarize what's been touched
 echo Updated to $RELEASE.
 echo Here is what changed in the gfx/graphite2 directory:
 echo

-hg stat gfx/graphite2
+hg stat old-configure.in gfx/graphite2

 echo
 echo If gfx/graphite2/src/files.mk has changed, please make corresponding
--- icecat-60.5.0/gfx/moz.build
+++ icecat-60.5.0/gfx/moz.build
@@ -10,6 +10,12 @@ with Files('**'):
 if CONFIG['MOZ_TREE_CAIRO']:
     DIRS += ['cairo']

+if not CONFIG['MOZ_SYSTEM_GRAPHITE2']:
+    DIRS += ['graphite2/src' ]
+
+if not CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+    DIRS += ['harfbuzz/src']
+
 DIRS += [
     '2d',
     'ycbcr',
@@ -18,8 +24,6 @@ DIRS += [
     'qcms',
     'gl',
     'layers',
-    'graphite2/src',
-    'harfbuzz/src',
     'ots/src',
     'thebes',
     'ipc',
--- icecat-60.5.0/gfx/skia/generate_mozbuild.py
+++ icecat-60.5.0/gfx/skia/generate_mozbuild.py
@@ -148,6 +148,9 @@
         '-Wno-unused-private-field',
     ]

+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
--- icecat-60.5.0/gfx/skia/moz.build
+++ icecat-60.5.0/gfx/skia/moz.build
@@ -822,6 +822,9 @@
         '-Wno-unused-private-field',
     ]

+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
--- icecat-60.5.0/gfx/thebes/moz.build
+++ icecat-60.5.0/gfx/thebes/moz.build
@@ -272,7 +272,13 @@

 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']

-DEFINES['GRAPHITE2_STATIC'] = True
+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
+    CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
+else:
+    DEFINES['GRAPHITE2_STATIC'] = True
+
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']

 if CONFIG['CC_TYPE'] == 'clang':
     # Suppress warnings from Skia header files.
--- icecat-60.5.0/intl/unicharutil/util/moz.build
+++ icecat-60.5.0/intl/unicharutil/util/moz.build
@@ -25,4 +25,7 @@ UNIFIED_SOURCES += [
     'nsUnicodeProperties.cpp',
 ]

+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
 FINAL_LIBRARY = 'xul'
--- icecat-60.5.0/netwerk/dns/moz.build
+++ icecat-60.5.0/netwerk/dns/moz.build
@@ -76,3 +76,6 @@

 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
+
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
--- icecat-60.5.0/old-configure.in
+++ icecat-60.5.0/old-configure.in
@@ -3971,6 +3971,27 @@
 AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR)

 dnl ========================================================
+dnl Check for graphite2
+dnl ========================================================
+if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
+    dnl graphite2.pc has bogus version, check manually
+    _SAVE_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
+    AC_TRY_COMPILE([ #include <graphite2/Font.h>
+                     #define GR2_VERSION_REQUIRE(major,minor,bugfix)  \
+                             ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
+                               * 100 + GR2_VERSION_BUGFIX >= \
+                               (major) * 10000 + (minor) * 100 + (bugfix) )
+                   ], [
+                     #if !GR2_VERSION_REQUIRE(1,3,10)
+                     #error "Insufficient graphite2 version."
+                     #endif
+                   ], [],
+                   [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
+    CFLAGS=$_SAVE_CFLAGS
+fi
+
+dnl ========================================================
 dnl Check for pixman and cairo
 dnl ========================================================

--- icecat-60.5.0/toolkit/library/moz.build
+++ icecat-60.5.0/toolkit/library/moz.build
@@ -235,6 +235,12 @@
 if CONFIG['MOZ_SYSTEM_PNG']:
     OS_LIBS += CONFIG['MOZ_PNG_LIBS']

+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
+    OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
+
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
+    OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
+
 if CONFIG['MOZ_SYSTEM_HUNSPELL']:
     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']

--- icecat-60.5.0/toolkit/moz.configure
+++ icecat-60.5.0/toolkit/moz.configure
@@ -1051,6 +1051,26 @@
 add_old_configure_assignment('FT2_CFLAGS',
                              ft2_info.cflags)

+# Graphite2
+# ==============================================================
+option('--with-system-graphite2',
+       help="Use system graphite2 (located with pkgconfig)")
+
+system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2',
+                                     when='--with-system-graphite2')
+
+set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True))
+
+# HarfBuzz
+# ==============================================================
+option('--with-system-harfbuzz',
+       help="Use system harfbuzz (located with pkgconfig)")
+
+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.7.4',
+                                    when='--with-system-harfbuzz')
+
+set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True))
+
 # Mortar
 # ==============================================================
 option('--enable-mortar', help='Enable mortar extension')


code:
Support building with system media libraries.
See <https://bugzilla.mozilla.org/show_bug.cgi?id=517422>

Based on:
  https://svnweb.freebsd.org/ports/head/www/firefox-esr/files/patch-z-bug517422?revision=472833&view=markup

Changes to files within the bundled libraries are omitted, since those files
are removed from Guix sources.  Modified for use with patch -p1, and to apply
cleanly to GNU IceCat.

--- icecat-60.5.0/build/moz.configure/old.configure
+++ icecat-60.5.0/build/moz.configure/old.configure
@@ -273,7 +273,12 @@
     '--with-system-libvpx',
     '--with-system-nspr',
     '--with-system-nss',
+    '--with-system-ogg',
     '--with-system-png',
+    '--with-system-soundtouch',
+    '--with-system-theora',
+    '--with-system-tremor',
+    '--with-system-vorbis',
     '--with-system-zlib',
     '--with-thumb',
     '--with-thumb-interwork',
--- icecat-60.5.0/config/external/moz.build
+++ icecat-60.5.0/config/external/moz.build
@@ -23,12 +23,21 @@

 external_dirs += ['modules/xz-embedded']

-if CONFIG['MOZ_VORBIS']:
+if not CONFIG['MOZ_SYSTEM_OGG']:
+    external_dirs += ['media/libogg']
+
+if CONFIG['MOZ_VORBIS'] and not CONFIG['MOZ_SYSTEM_VORBIS']:
     external_dirs += ['media/libvorbis']

-if CONFIG['MOZ_TREMOR']:
+if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_SYSTEM_TREMOR']:
     external_dirs += ['media/libtremor']

+if not CONFIG['MOZ_SYSTEM_THEORA']:
+    external_dirs += ['media/libtheora']
+
+if not CONFIG['MOZ_SYSTEM_SOUNDTOUCH']:
+    external_dirs += ['media/libsoundtouch']
+
 if CONFIG['MOZ_WEBM_ENCODER']:
     external_dirs += ['media/libmkv']

@@ -51,11 +60,8 @@
     'media/kiss_fft',
     'media/libcubeb',
     'media/libnestegg',
-    'media/libogg',
     'media/libopus',
-    'media/libtheora',
     'media/libspeex_resampler',
-    'media/libsoundtouch',
     'media/mp4parse-rust',
     'media/psshparser'
 ]
--- icecat-60.5.0/config/system-headers.mozbuild
+++ icecat-60.5.0/config/system-headers.mozbuild
@@ -1324,6 +1324,28 @@
         'harfbuzz/hb.h',
     ]

+if CONFIG['MOZ_SYSTEM_OGG']:
+    system_headers += [
+        'ogg/ogg.h',
+        'ogg/os_types.h',
+    ]
+
+if CONFIG['MOZ_SYSTEM_THEORA']:
+    system_headers += [
+        'theora/theoradec.h',
+    ]
+
+if CONFIG['MOZ_SYSTEM_VORBIS']:
+    system_headers += [
+        'vorbis/codec.h',
+        'vorbis/vorbisenc.h',
+    ]
+
+if CONFIG['MOZ_SYSTEM_TREMOR']:
+    system_headers += [
+        'tremor/ivorbiscodec.h',
+    ]
+
 if CONFIG['MOZ_SYSTEM_LIBVPX']:
     system_headers += [
         'vpx_mem/vpx_mem.h',
--- icecat-60.5.0/dom/media/AudioStream.cpp
+++ icecat-60.5.0/dom/media/AudioStream.cpp
@@ -128,7 +128,9 @@
     : mMonitor("AudioStream"),
       mChannels(0),
       mOutChannels(0),
+#ifndef MOZ_SYSTEM_SOUNDTOUCH
       mTimeStretcher(nullptr),
+#endif
       mDumpFile(nullptr),
       mState(INITIALIZED),
       mDataSource(aSource),
@@ -147,9 +149,11 @@
   if (mDumpFile) {
     fclose(mDumpFile);
   }
+#ifndef MOZ_SYSTEM_SOUNDTOUCH
   if (mTimeStretcher) {
     soundtouch::destroySoundTouchObj(mTimeStretcher);
   }
+#endif
 #if defined(XP_WIN)
   if (XRE_IsContentProcess()) {
     audio::AudioNotificationReceiver::Unregister(this);
@@ -170,7 +174,11 @@
 nsresult AudioStream::EnsureTimeStretcherInitializedUnlocked() {
   mMonitor.AssertCurrentThreadOwns();
   if (!mTimeStretcher) {
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
+    mTimeStretcher = new soundtouch::SoundTouch();
+#else
     mTimeStretcher = soundtouch::createSoundTouchObj();
+#endif
     mTimeStretcher->setSampleRate(mAudioClock.GetInputRate());
     mTimeStretcher->setChannels(mOutChannels);
     mTimeStretcher->setPitch(1.0);
--- icecat-60.5.0/dom/media/AudioStream.h
+++ icecat-60.5.0/dom/media/AudioStream.h
@@ -15,7 +15,11 @@
 #include "mozilla/TimeStamp.h"
 #include "mozilla/UniquePtr.h"
 #include "CubebUtils.h"
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
+#include "soundtouch/SoundTouch.h"
+#else
 #include "soundtouch/SoundTouchFactory.h"
+#endif

 #if defined(XP_WIN)
 #include "mozilla/audio/AudioNotificationReceiver.h"
@@ -293,7 +297,11 @@
   uint32_t mChannels;
   uint32_t mOutChannels;
   AudioClock mAudioClock;
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
+  nsAutoPtr<soundtouch::SoundTouch> mTimeStretcher;
+#else
   soundtouch::SoundTouch* mTimeStretcher;
+#endif

   // Output file for dumping audio
   FILE* mDumpFile;
--- icecat-60.5.0/dom/media/moz.build
+++ icecat-60.5.0/dom/media/moz.build
@@ -327,6 +327,21 @@

 DEFINES['MOZILLA_INTERNAL_API'] = True

+if CONFIG['MOZ_SYSTEM_OGG']:
+    CXXFLAGS += CONFIG['MOZ_OGG_CFLAGS']
+
+if CONFIG['MOZ_SYSTEM_THEORA']:
+    CXXFLAGS += CONFIG['MOZ_THEORA_CFLAGS']
+
+if CONFIG['MOZ_SYSTEM_VORBIS']:
+    CXXFLAGS += CONFIG['MOZ_VORBIS_CFLAGS']
+
+if CONFIG['MOZ_SYSTEM_TREMOR']:
+    CXXFLAGS += CONFIG['MOZ_TREMOR_CFLAGS']
+
+if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']:
+    CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS']
+
 if CONFIG['MOZ_ANDROID_HLS_SUPPORT']:
     DEFINES['MOZ_ANDROID_HLS_SUPPORT'] = True

--- icecat-60.5.0/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
+++ icecat-60.5.0/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
@@ -15,9 +15,13 @@
 #include <windows.h>
 #endif

+#ifdef MOZ_SYSTEM_SOUNDTOUCH
+#include "nsXPCOMPrivate.h" // for XUL_DLL
+#else
 // We use a known symbol located in lgpllibs to determine its location.
 // soundtouch happens to be always included in lgpllibs
 #include "soundtouch/SoundTouch.h"
+#endif

 namespace mozilla {

@@ -60,6 +64,12 @@

   sLinkStatus = LinkStatus_FAILED;

+#ifdef MOZ_SYSTEM_SOUNDTOUCH
+  // We retrieve the path of the XUL library as this is where mozavcodec and
+  // mozavutil libs are located.
+  char* path =
+    PR_GetLibraryFilePathname(XUL_DLL, (PRFuncPtr)&FFVPXRuntimeLinker::Init);
+#else
   // We retrieve the path of the lgpllibs library as this is where mozavcodec
   // and mozavutil libs are located.
   PathString lgpllibsname = GetLibraryName(nullptr, "lgpllibs");
@@ -68,6 +78,7 @@
   }
   PathString path = GetLibraryFilePathname(
       lgpllibsname.get(), (PRFuncPtr)&soundtouch::SoundTouch::getVersionId);
+#endif
   if (path.IsEmpty()) {
     return false;
   }
--- icecat-60.5.0/old-configure.in
+++ icecat-60.5.0/old-configure.in
@@ -2417,6 +2417,111 @@
 fi
 fi # COMPILE_ENVIRONMENT

+dnl ========================================================
+dnl Check for libogg
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-ogg,
+[  --with-system-ogg       Use system libogg (located with pkgconfig)],
+MOZ_SYSTEM_OGG=1,
+MOZ_SYSTEM_OGG=)
+
+if test -n "$MOZ_SYSTEM_OGG"; then
+    PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.3.3)
+
+    _SAVE_LIBS=$LIBS
+    LIBS="$LIBS $MOZ_OGG_LIBS"
+    AC_CHECK_FUNC(ogg_set_mem_functions, [],
+      [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)])
+    LIBS=$_SAVE_LIBS
+fi
+
+AC_SUBST(MOZ_SYSTEM_OGG)
+
+dnl ========================================================
+dnl Check for libvorbis
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-vorbis,
+[  --with-system-vorbis    Use system libvorbis (located with pkgconfig)],
+MOZ_SYSTEM_VORBIS=1,
+MOZ_SYSTEM_VORBIS=)
+
+if test -n "$MOZ_SYSTEM_VORBIS"; then
+    PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.6)
+fi
+
+AC_SUBST(MOZ_SYSTEM_VORBIS)
+
+dnl ========================================================
+dnl Check for integer-only libvorbis aka tremor
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-tremor,
+[  --with-system-tremor    Use system libtremor (located with pkgconfig)],
+MOZ_SYSTEM_TREMOR=1,
+MOZ_SYSTEM_TREMOR=)
+
+if test -n "$MOZ_SYSTEM_TREMOR"; then
+    PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1)
+fi
+
+AC_SUBST(MOZ_SYSTEM_TREMOR)
+
+dnl ========================================================
+dnl Check for libtheora
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-theora,
+[  --with-system-theora    Use system libtheora (located with pkgconfig)],
+MOZ_SYSTEM_THEORA=1,
+MOZ_SYSTEM_THEORA=)
+
+if test -n "$MOZ_SYSTEM_THEORA"; then
+    PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2)
+fi
+
+AC_SUBST(MOZ_SYSTEM_THEORA)
+
+dnl ========================================================
+dnl Check for libSoundTouch
+dnl ========================================================
+
+MOZ_ARG_WITH_BOOL(system-soundtouch,
+[  --with-system-soundtouch Use system libSoundTouch (located with pkgconfig)],
+MOZ_SYSTEM_SOUNDTOUCH=1,
+MOZ_SYSTEM_SOUNDTOUCH=)
+
+if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then
+    PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.9.0)
+
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    _SAVE_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS"
+    AC_CACHE_CHECK(for soundtouch sample type,
+                   ac_cv_soundtouch_sample_type,
+                   [AC_TRY_COMPILE([#include <SoundTouch.h>
+                                    #ifndef SOUNDTOUCH_INTEGER_SAMPLES
+                                    #error soundtouch expects float samples
+                                    #endif],
+                                   [],
+                                   [ac_cv_soundtouch_sample_type=short],
+                                   [ac_cv_soundtouch_sample_type=float])])
+    CXXFLAGS=$_SAVE_CXXFLAGS
+    AC_LANG_RESTORE
+
+    if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \
+         -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then
+        AC_MSG_ERROR([SoundTouch library is built with incompatible sample type. Either rebuild the library with/without --enable-integer-samples, chase default Mozilla sample type or remove --with-system-soundtouch.])
+    fi
+fi
+
+if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then
+    AC_DEFINE(MOZ_SYSTEM_SOUNDTOUCH)
+fi
+AC_SUBST(MOZ_SYSTEM_SOUNDTOUCH)
+
 dnl system libvpx Support
 dnl ========================================================
 MOZ_ARG_WITH_BOOL(system-libvpx,
--- icecat-60.5.0/toolkit/library/moz.build
+++ icecat-60.5.0/toolkit/library/moz.build
@@ -244,6 +244,21 @@
 if CONFIG['MOZ_SYSTEM_HUNSPELL']:
     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']

+if CONFIG['MOZ_SYSTEM_OGG']:
+    OS_LIBS += CONFIG['MOZ_OGG_LIBS']
+
+if CONFIG['MOZ_SYSTEM_THEORA']:
+    OS_LIBS += CONFIG['MOZ_THEORA_LIBS']
+
+if CONFIG['MOZ_SYSTEM_VORBIS']:
+    OS_LIBS += CONFIG['MOZ_VORBIS_LIBS']
+
+if CONFIG['MOZ_SYSTEM_TREMOR']:
+    OS_LIBS += CONFIG['MOZ_TREMOR_LIBS']
+
+if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']:
+    OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS']
+
 if CONFIG['MOZ_SYSTEM_LIBEVENT']:
     OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']

--- icecat-60.5.0/xpcom/build/XPCOMInit.cpp
+++ icecat-60.5.0/xpcom/build/XPCOMInit.cpp
@@ -139,7 +139,9 @@

 #include "mozilla/ipc/GeckoChildProcessHost.h"

+#ifndef MOZ_OGG_NO_MEM_REPORTING
 #include "ogg/ogg.h"
+#endif
 #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
 #if defined(HAVE_STDINT_H)
 // mozilla-config.h defines HAVE_STDINT_H, and then it's defined *again* in
@@ -635,10 +637,12 @@
   // this oddness.
   mozilla::SetICUMemoryFunctions();

+#ifndef MOZ_OGG_NO_MEM_REPORTING
   // Do the same for libogg.
   ogg_set_mem_functions(
       OggReporter::CountingMalloc, OggReporter::CountingCalloc,
       OggReporter::CountingRealloc, OggReporter::CountingFree);
+#endif

 #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
   // And for VPX.


code:
# HG changeset patch
# User Gábor Boskovits <boskovits@gmail.com>
# Date 1530519413 -7200
#      Mon Jul 02 10:16:53 2018 +0200
# Node ID 77e5bc9e238a28d17e097647badc04ed67a6a452
# Parent  1ae05a34e052d1672b4a7894ddf5fc2f662eb861
Fix gcc segfault.

diff -r 1ae05a34e052 -r 77e5bc9e238a src/share/vm/opto/output.cpp
--- a/src/share/vm/opto/output.cpp	Sun Dec 25 23:52:13 2016 +0000
+++ b/src/share/vm/opto/output.cpp	Mon Jul 02 10:16:53 2018 +0200
@@ -1758,6 +1758,8 @@

 // Initializer for class Scheduling

+volatile const void *eePointer = Pipeline_Use::elaborated_elements;
+
 Scheduling::Scheduling(Arena *arena, Compile &compile)
   : _arena(arena),
     _cfg(compile.cfg()),
@@ -1802,8 +1804,8 @@

   // Clear the bundling information
   memcpy(_bundle_use_elements,
-    Pipeline_Use::elaborated_elements,
-    sizeof(Pipeline_Use::elaborated_elements));
+	 (void *)eePointer,
+    11*sizeof(Pipeline_Use_Element));

   // Get the last node
   Block *bb = _cfg->_blocks[_cfg->_blocks.size()-1];
@@ -1854,8 +1856,8 @@
   _bundle_use.reset();

   memcpy(_bundle_use_elements,
-    Pipeline_Use::elaborated_elements,
-    sizeof(Pipeline_Use::elaborated_elements));
+	 (void *)eePointer,
+    11*sizeof(Pipeline_Use_Element));
 }

 //------------------------------ScheduleAndBundle------------------------------


code:
From 2f0ef2c69e99e1096a2a72c7a29025a736b044b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com>
Date: Mon, 2 Jul 2018 23:37:25 +0200
Subject: [PATCH] Fix gcc segfault.

---
 src/share/vm/opto/output.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/share/vm/opto/output.cpp b/src/share/vm/opto/output.cpp
index d46cb87..0eb9eda 100644
--- a/src/share/vm/opto/output.cpp
+++ b/src/share/vm/opto/output.cpp
@@ -1787,6 +1787,8 @@ uint Scheduling::_total_instructions_per_bundle[Pipeline::_max_instrs_per_cycle+

 // Initializer for class Scheduling

+volatile const void *eePointer = Pipeline_Use::elaborated_elements;
+
 Scheduling::Scheduling(Arena *arena, Compile &compile)
   : _arena(arena),
     _cfg(compile.cfg()),
@@ -1829,7 +1831,7 @@ Scheduling::Scheduling(Arena *arena, Compile &compile)
   memset(_current_latency,    0, node_max * sizeof(unsigned short));

   // Clear the bundling information
-  memcpy(_bundle_use_elements, Pipeline_Use::elaborated_elements, sizeof(Pipeline_Use::elaborated_elements));
+  memcpy(_bundle_use_elements, (void *)eePointer, 11*sizeof(Pipeline_Use_Element));

   // Get the last node
   Block* block = _cfg->get_block(_cfg->number_of_blocks() - 1);
@@ -1880,8 +1882,8 @@ void Scheduling::step_and_clear() {
   _bundle_use.reset();

   memcpy(_bundle_use_elements,
-    Pipeline_Use::elaborated_elements,
-    sizeof(Pipeline_Use::elaborated_elements));
+	 (void *)eePointer,
+    11*sizeof(Pipeline_Use_Element));
 }

 // Perform instruction scheduling and bundling over the sequence of
--
2.18.0