From: Lemures Lemniscati <lemures.lemniscati@gmail.com>
To: cygwin-apps@cygwin.com
Subject: Re: g-ir-scanner fails with python-3.8
Date: Sun, 23 May 2021 14:04:01 +0900 [thread overview]
Message-ID: <20210523140358.9877.50F79699@gmail.com> (raw)
In-Reply-To: <502c9e35-4e14-818b-1d65-cd8632aa93d5@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]
On Sun, 23 May 2021 06:01:43 +0200, Marco Atzeri via Cygwin-apps
> On 23.05.2021 05:51, Marco Atzeri wrote:
> > On 23.05.2021 01:44, Lemures Lemniscati via Cygwin-apps wrote:
> >> On Wed, 19 May 2021 22:09:59 +0100, Jon Turney
> >>> On 19/05/2021 20:32, Ken Brown via Cygwin-apps wrote:
>
> >>
> >> Here are patches...
> >>
> >> * 0002-gobject-introspection-1.54.1-4.patch:
> >> python3.8 is used explicitly.
> >> Shebangs of g-ir-doc-tool and g-ir-scanner are '/usr/bin/env
> >> python3.8'
> >> _giscanner.dll is linked with libpython3.8.dll
> >>
> >> * 0001-Fix-a-patch-for-giscanner-shlibs.py-to-pass-a-pep8-c.patch:
> >> This has no effect while building.
> >> But needed in order to avoid an error in a test
> >> cygport gobject-introspection.cygport test
> >>
>
> I notice now that they are patch of patch,
> but it seems we are not starting on the same base
>
> $ patch -p1 -i 0002-gobject-introspection-1.54.1-4.patch
> patching file gobject-introspection.cygport
> Hunk #1 FAILED at 1.
> Hunk #2 FAILED at 16.
> Hunk #3 succeeded at 45 (offset -2 lines).
> 2 out of 3 hunks FAILED -- saving rejects to file gobject-introspection.cygport.rej
>
> can you send the all the raw files ?
These patches are the last two commit from here for the time being:
https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/playground.git;a=commitdiff;h=1f435122b29fdc5a7c3f71f6da0cb28bbb843847
which forked from the gobject-introspection 1.54.1-3
https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/gobject-introspection.git;a=commit;h=cd7b82d762911316ae43708b30941fea4d7f718d
Atattched files are modified files based on 1.54.1-3.
gobject-introdpection.cygport: modified.
1.54.1-2-cygwin.patch: removed a trailing space.
Regards,
Lem
[-- Attachment #2: gobject-introspection.cygport --]
[-- Type: application/octet-stream, Size: 2415 bytes --]
inherit gnome2 python3
NAME="gobject-introspection"
VERSION=1.54.1
RELEASE=4
CATEGORY="Libs"
SUMMARY="GObject Introspection tools"
DESCRIPTION="The goal of the project is to describe GObject APIs and collect
them in a uniform, machine readable format."
HOMEPAGE="https://gi.readthedocs.io/en/latest/"
PATCH_URI="
1.42.0-exeext.patch
1.36.0-tests-expected.patch
1.36.0-python-libs.patch
1.54.1-2-cygwin.patch
"
PYTHON3=python3.8
CYGCONF_ARGS="--with-python=${PYTHON3}"
PKG_NAMES="${NAME} libgirepository1.0_1 libgirepository1.0-devel libgirepository1.0-doc"
gobject_introspection_CATEGORY="Devel"
gobject_introspection_SUMMARY="GObject Introspection tools"
gobject_introspection_REQUIRES="libgirepository1.0-devel"
gobject_introspection_CONTENTS="--exclude=gir-1.0 --exclude=gtk-doc
usr/bin/g-ir-* usr/lib/${NAME}/ usr/share/"
libgirepository1_0_1_SUMMARY="GObject Introspection library (runtime)"
libgirepository1_0_1_CONTENTS="usr/bin/cyggirepository-1.0-1.dll"
libgirepository1_0_devel_REQUIRES="girepository-GIRepository2.0"
libgirepository1_0_devel_SUMMARY="GObject Introspection library (development)"
libgirepository1_0_devel_CONTENTS="usr/include/ usr/lib/libgirepository-1.0.*
usr/lib/pkgconfig/"
libgirepository1_0_doc_CATEGORY="Doc"
libgirepository1_0_doc_SUMMARY="GObject Introspection library (API docs)"
libgirepository1_0_doc_CONTENTS="usr/share/gtk-doc/"
PKG_NAMES+=" girepository-cairo1.0 girepository-GIRepository2.0
girepository-GLib2.0 girepository-x11"
girepository_cairo1_0_SUMMARY="GObject Introspection data for libcairo"
girepository_cairo1_0_CONTENTS="usr/*/gir*/cairo-1.0.*"
girepository_GIRepository2_0_SUMMARY="GObject Introspection library (GObject Introspection data)"
girepository_GIRepository2_0_CONTENTS="usr/*/gir*/GIRepository-2.0.*"
girepository_GLib2_0_SUMMARY="GLib GObjectIntrospection data"
girepository_GLib2_0_CONTENTS="--exclude=GIR* --exclude=GL-* usr/*/gir*/G*-2.0.*"
girepository_x11_SUMMARY="GObject Introspection data for X11 libraries"
girepository_x11_CONTENTS="--exclude=cairo-1.0.* --exclude=G*-2.0.* usr/*/gir*/"
DIFF_EXCLUDES="config.py *.pc gi.types"
gobject_introspection_REQUIRES="libgirepository1.0-devel python38-mako"
BUILD_REQUIRES=" \
flex \
gnome-common \
gtk-doc \
libcairo-devel \
libffi-devel \
libglib2.0-devel \
python38-devel \
python38-mako \
"
[-- Attachment #3: 1.54.1-2-cygwin.patch --]
[-- Type: application/octet-stream, Size: 5958 bytes --]
--- 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 <windows.h>
--- 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 = "(?<![A-Za-z0-9_-])(lib*%s[^A-Za-z0-9_-][^\s\(\)]*)"
if platform.system() == 'Darwin':
pattern = "([^\s]*lib*%s[^A-Za-z0-9_-][^\s\(\)]*)"
+ elif platform.platform().startswith('CYGWIN'):
+ pattern = "([^\s]*cyg%s[-.0-9]*\.[^\s\(\)]*)"
return re.compile(pattern % re.escape(library_name))
--- origsrc/gobject-introspection-1.54.1/giscanner/utils.py 2017-06-20 17:10:33.000000000 -0400
+++ src/gobject-introspection-1.54.1/giscanner/utils.py 2020-08-04 09:49:26.104703700 -0400
@@ -80,7 +80,7 @@ def to_underscores_noprefix(name):
return name
-_libtool_pat = re.compile("dlname='([A-z0-9\.\-\+]+)'\n")
+_libtool_pat = re.compile("dlname='([A-z0-9/\.\-\+]+)'\n")
def _extract_dlname_field(la_file):
--- origsrc/gobject-introspection-1.54.1/tests/Makefile.am 2014-09-04 03:24:07.000000000 -0400
+++ src/gobject-introspection-1.54.1/tests/Makefile.am 2020-08-04 09:49:26.110683300 -0400
@@ -20,7 +20,12 @@ tests_DATA = \
EXTRA_LTLIBRARIES = libeverything-1.0.la libgimarshallingtests-1.0.la
libeverything_1_0_la_SOURCES = everything.c
+libeverything_1_0_la_LDFLAGS = -no-undefined
+libeverything_1_0_la_LIBADD = $(GOBJECT_LIBS)
+
libgimarshallingtests_1_0_la_SOURCES = gimarshallingtests.c
+libgimarshallingtests_1_0_la_LDFLAGS = -no-undefined
+libgimarshallingtests_1_0_la_LIBADD = $(GOBJECT_LIBS)
EXTRA_DIST += \
gimarshallingtests.h \
--- origsrc/gobject-introspection-1.54.1/tests/offsets/Makefile.am 2015-07-01 03:23:55.000000000 -0400
+++ src/gobject-introspection-1.54.1/tests/offsets/Makefile.am 2020-08-04 09:49:26.116698000 -0400
@@ -18,7 +18,7 @@ liboffsets_la_SOURCES = \
offsets.c
liboffsets_la_CPPFLAGS = $(GIREPO_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) -I$(top_srcdir)/tests
# dummy rpath to get built dynamically (huh?)
-liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir)
+liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir) -no-undefined
Offsets-1.0.gir: liboffsets.la offsets.h
Offsets_1_0_gir_INCLUDES = GObject-2.0
--- origsrc/gobject-introspection-1.54.1/tests/scanner/Makefile.am 2020-08-04 09:48:05.413104600 -0400
+++ src/gobject-introspection-1.54.1/tests/scanner/Makefile.am 2020-08-04 09:49:26.122659100 -0400
@@ -68,7 +68,7 @@ endif
libregress_la_LDFLAGS = $(AM_LDFLAGS)
-if OS_WIN32
+if PLATFORM_WIN32
AM_LDFLAGS += -no-undefined
endif
@@ -155,7 +155,7 @@ barapp_SOURCES = $(srcdir)/barapp.c $(sr
barapp_LDADD = $(top_builddir)/libgirepository-1.0.la
barapp_LDFLAGS = -export-dynamic
-Bar-1.0.gir: barapp
+Bar-1.0.gir: barapp$(EXEEXT)
Bar_1_0_gir_PACKAGES = gobject-2.0
Bar_1_0_gir_PROGRAM = ./barapp$(EXEEXT)
Bar_1_0_gir_CFLAGS = $(GI_SCANNER_CFLAGS)
next prev parent reply other threads:[~2021-05-23 5:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 19:32 Ken Brown
2021-05-19 21:09 ` Jon Turney
2021-05-22 23:44 ` Lemures Lemniscati
2021-05-23 3:51 ` Marco Atzeri
2021-05-23 4:01 ` Marco Atzeri
2021-05-23 4:45 ` Marco Atzeri
2021-05-23 5:04 ` Lemures Lemniscati [this message]
2023-01-12 19:50 ` Jon Turney
2021-05-23 6:00 ` Brian Inglis
2021-05-23 11:50 ` Lemures Lemniscati
2021-05-23 18:17 ` Jon Turney
2021-05-23 18:13 ` Jon Turney
2021-05-19 21:21 ` Marco Atzeri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210523140358.9877.50F79699@gmail.com \
--to=lemures.lemniscati@gmail.com \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).