Re: build of libharfbuzz0-shlibs-2.6.8-2 failed

Hanspeter Niederstrasser <[email protected]> Fri, 11 Oct 2024 21:28:14 -0500
Newsgroups gmane.os.apple.fink.general
Organization Snaggled Works
Message-ID <[email protected]>
On 10/10/24 7:42 AM, Derek Homeier wrote:
> On 10 Oct 2024, at 2:38 AM, Hanspeter Niederstrasser <[email protected]> wrote:
>>
>> Another option might be to skip all the patching and just turn off making -Wcast-function-type-script an error.
>>
> Yes, that's probably better than removing some code without fully understanding its functionality.
> Builds an passes tests with the same single failure that way.
> 

Try these. I removed all the attempts to fix the casting and just told 
it to ignore that error instead.

Hanspeter

-- 
Treason is a charge used by winners as an excuse for hanging the losers.
   --Benjamin Franklin

_______________________________________________
Fink-users mailing list
[email protected]
List archive:
https://sourceforge.net/p/fink/mailman/fink-users/
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users
libharfbuzz0-shlibs.patch (text/plain, 1.6 KB)
diff -ruN harfbuzz-2.7.0-orig/src/hb-subset-cff1.cc harfbuzz-2.7.0/src/hb-subset-cff1.cc
--- harfbuzz-2.7.0-orig/src/hb-subset-cff1.cc	2020-07-25 03:10:57.000000000 -0500
+++ harfbuzz-2.7.0/src/hb-subset-cff1.cc	2023-01-16 05:04:07.000000000 -0600
@@ -402,12 +402,11 @@
   void plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan)
   {
     const Encoding *encoding = acc.encoding;
-    unsigned int  size0, size1, supp_size;
+    unsigned int  size0, size1;
     hb_codepoint_t  code, last_code = CFF_UNDEF_CODE;
     hb_vector_t<hb_codepoint_t> supp_codes;
 
     subset_enc_code_ranges.resize (0);
-    supp_size = 0;
     supp_codes.init ();
 
     subset_enc_num_codes = plan->num_output_glyphs () - 1;
@@ -443,7 +442,6 @@
 	  code_pair_t pair = { supp_codes[i], sid };
 	  subset_enc_supp_codes.push (pair);
 	}
-	supp_size += SuppEncoding::static_size * supp_codes.length;
       }
     }
     supp_codes.fini ();
diff -ruN harfbuzz-2.6.8-orig/src/hb.hh harfbuzz-2.6.8/src/hb.hh
--- harfbuzz-2.6.8-orig/src/hb.hh	2020-06-15 20:14:32.000000000 -0500
+++ harfbuzz-2.6.8/src/hb.hh	2024-10-11 21:10:04.000000000 -0500
@@ -121,6 +121,7 @@
 /* Ignored intentionally. */
 #ifndef HB_NO_PRAGMA_GCC_DIAGNOSTIC_IGNORED
 #pragma GCC diagnostic ignored "-Wclass-memaccess"
+#pragma GCC diagnostic ignored "-Wcast-function-type-strict" // https://github.com/harfbuzz/harfbuzz/pull/3859#issuecomment-1295409126
 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
 #pragma GCC diagnostic ignored "-Wformat-zero-length"
 #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
libharfbuzz0-shlibs.info (text/plain, 2.8 KB)
Package: libharfbuzz0-shlibs
# 2.7.x needs g_unicode_script_to_iso15924 NEWGLIB24
Version: 2.6.8
Revision: 2.4
Description: Text shaping engine/library
License: BSD
# Free to change, update, and take over
Maintainer: Hanspeter Niederstrasser <[email protected]>
Depends: <<
	freetype219-shlibs,
	glib2-shlibs,
	libgettext8-shlibs,
	libgraphite2-shlibs,
	libicu72-shlibs
<<
BuildDepends: <<
	fink (>= 0.32),
	cairo,
	fontconfig2-dev,
	freetype219,
	glib2-dev,
	libgraphite2-dev,
	libicu72-dev,
	ppkg-config
<<
GCC: 4.0
Source: https://github.com/harfbuzz/harfbuzz/releases/download/%v/harfbuzz-%v.tar.xz
Source-Checksum: SHA256(6648a571a27f186e47094121f0095e1b809e918b3037c630c7f38ffad86e3035)
PatchFile: %n.patch
PatchFile-MD5: 4291e331794fbd7302aa98400db18806
PatchScript: <<
	%{default_script}
	# cleanup -framework flags
	perl -pi -e 's/(-framework)\s+(\S+)/-Wl,\1,\2/g' configure
<<
ConfigureParams: <<
	--disable-static \
	--enable-dependency-tracking \
	--disable-silent-rules \
	--with-graphite2 \
	--with-coretext=yes \
	--enable-introspection=no \
	--with-gobject=no \
	PKG_CONFIG_PATH="%p/lib/glib-2.0/pkgconfig-strict:$PKG_CONFIG_PATH" \
	PKG_CONFIG="%p/bin/ppkg-config"
<<
CompileScript: <<
	%{default_script}
	fink-package-precedence --prohibit-bdep=libharfbuzz0-dev .
<<
# tests expect a python3 executable
#InfoTest: <<
#	TestScript: <<
#		make check || exit 2
#	<<
#<<
InstallScript: <<
	make install DESTDIR=%d
	# clean up docs, but don't rebuild, just patch URL
	perl -pi -e 's|/usr/share/gtk-doc|%p/share/gtk-doc|g' %i/share/gtk-doc/html/harfbuzz/*.html 
<<
DocFiles: COPYING
Shlibs: <<
	%p/lib/libharfbuzz.0.dylib 20601.0.0 %n (>= 2.6.8-1)
	%p/lib/libharfbuzz-icu.0.dylib 20601.0.0 %n (>= 2.6.8-1)
	%p/lib/libharfbuzz-subset.0.dylib 20601.0.0 %n (>= 2.6.8-1)
<<
SplitOff: <<
	Package: libharfbuzz0-dev
	Description: Text shaping engine/library (dev pkg)
	Files: <<
		include
		lib/cmake
		lib/pkgconfig
		lib/libharfbuzz.{dylib,la}
		lib/libharfbuzz-icu.{dylib,la}
		lib/libharfbuzz-subset.{dylib,la}
		share/gtk-doc
	<<
	Depends: %N (= %v-%r)
	Conflicts: libharfbuzz0-dev
	Replaces: libharfbuzz0-dev
	BuildDependsOnly: true
	DocFiles: AUTHORS COPYING NEWS README.md
<<
SplitOff2: <<
	Package: libharfbuzz-bin
	Description: Text shaping engine binaries
	Files: <<
		bin
	<<
	Depends: <<
		%N (>= %v-%r),
		cairo-shlibs,
		freetype219-shlibs,
		glib2-shlibs,
		libgettext8-shlibs,
		libgraphite2-shlibs
	<<
	DocFiles: AUTHORS COPYING NEWS README.md
<<
Homepage: https://github.com/harfbuzz/harfbuzz
DescDetail: <<
HarfBuzz is a text shaping engine. It primarily supports OpenType, but
also Apple Advanced Typography.
<<
DescPort: <<
* Remove unused supp_size
https://github.com/harfbuzz/harfbuzz/pull/2995
* Use upstream 60c6b7786d9f4651ae2803bfc4ff4435b38a5bc6 to ignore -Wcast-function-type-strict that are fatal with Xcode16 and not all fixable with our old %v.
<<