--- origsrc/gobject-introspection-1.54.1/Makefile-giscanner.am 2016-03-14 06:49:00.000000000 -0400 +++ src/gobject-introspection-1.54.1/Makefile-giscanner.am 2020-08-04 09:49:26.065808000 -0400 @@ -117,7 +117,7 @@ _giscanner_la_LDFLAGS = \ -module -avoid-version \ -export-symbols-regex "init_giscanner|PyInit__giscanner" -if OS_WIN32 +if PLATFORM_WIN32 # Windows requires Python extension modules to be explicitly # linked to libpython. Extension modules are shared libaries # (.dll files), but need to be called .pyd for Python to load @@ -126,8 +126,12 @@ _giscanner_la_LIBADD += \ $(PYTHON_LIBS) _giscanner_la_LDFLAGS += \ - -no-undefined \ + -no-undefined +endif +if OS_WIN32 +_giscanner_la_LDFLAGS += \ -shrext ".pyd" endif + _giscanner_la_SOURCES = giscanner/giscannermodule.c --- origsrc/gobject-introspection-1.54.1/configure.ac 2017-10-02 08:21:36.000000000 -0400 +++ src/gobject-introspection-1.54.1/configure.ac 2020-08-04 09:49:26.073772000 -0400 @@ -29,13 +29,20 @@ AC_SUBST(GI_VERSION) # Check for Win32 AC_CANONICAL_HOST case "$host" in +*-*-cygwin*) + platform_win32=yes + os_win32=no + ;; *-*-mingw*) + platform_win32=yes os_win32=yes ;; *) + platform_win32=no os_win32=no ;; esac +AM_CONDITIONAL(PLATFORM_WIN32, [test "x$platform_win32" = "xyes"]) AM_CONDITIONAL(OS_WIN32, [test "x$os_win32" = "xyes"]) # Checks for programs. @@ -150,6 +157,9 @@ AS_IF([test x${with_cairo} != xno], [ AM_CONDITIONAL(HAVE_CAIRO, test x$have_cairo = xyes) case "$host" in + *-*-cygwin*) + CAIRO_SHARED_LIBRARY="cygcairo-gobject-2.dll" + ;; *-*-darwin*) CAIRO_SHARED_LIBRARY="libcairo-gobject.2.dylib" ;; @@ -274,7 +284,7 @@ case "$host" in ;; esac AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found])) -if test "x$os_win32" = "xyes"; then +if test "x$platform_win32" = "xyes"; then AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.])) fi --- origsrc/gobject-introspection-1.54.1/girepository/girepository.c 2016-05-08 11:09:09.000000000 -0400 +++ src/gobject-introspection-1.54.1/girepository/girepository.c 2020-08-04 09:49:26.081781100 -0400 @@ -57,7 +57,7 @@ struct _GIRepositoryPrivate G_DEFINE_TYPE (GIRepository, g_irepository, G_TYPE_OBJECT); -#ifdef G_PLATFORM_WIN32 +#ifdef G_OS_WIN32 #include --- origsrc/gobject-introspection-1.54.1/giscanner/ccompiler.py 2017-05-18 01:42:52.000000000 -0400 +++ src/gobject-introspection-1.54.1/giscanner/ccompiler.py 2020-08-04 09:49:26.089710500 -0400 @@ -118,6 +118,10 @@ class CCompiler(object): if self.check_is_msvc(): runtime_path_envvar = ['LIB', 'PATH'] + elif os.name == 'nt' or sys.platform == 'cygwin': + runtime_path_envvar = ['PATH'] + # Search the current directory first + args.append('-L.') else: runtime_path_envvar = ['LD_LIBRARY_PATH'] # Search the current directory first --- origsrc/gobject-introspection-1.54.1/giscanner/shlibs.py 2016-03-14 06:49:01.000000000 -0400 +++ src/gobject-introspection-1.54.1/giscanner/shlibs.py 2020-08-04 10:16:24.364844100 -0400 @@ -61,6 +61,8 @@ def _ldd_library_pattern(library_name): pattern = "(?