aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2022-03-02 21:21:58 +0000
committerThierry Thomas <thierry@FreeBSD.org>2022-03-26 09:24:38 +0000
commitec88d485c32bfc7e9c10fc00873e437ba5eb57fc (patch)
tree33c78703a327d2d25f8ee6bbf054578f6fcc874b
parent8a56a24e868fd924c4f5fb511b31dcdcfbe7aec2 (diff)
downloadports-ec88d485c32bfc7e9c10fc00873e437ba5eb57fc.tar.gz
ports-ec88d485c32bfc7e9c10fc00873e437ba5eb57fc.zip
devel/libsigrokdecode: support Python-3.9
PR: 262305 Approved by: maintainer’s time-out
-rw-r--r--devel/libsigrokdecode/Makefile4
-rw-r--r--devel/libsigrokdecode/files/patch-configure44
2 files changed, 47 insertions, 1 deletions
diff --git a/devel/libsigrokdecode/Makefile b/devel/libsigrokdecode/Makefile
index dc1b8159163e..9319575e4b5f 100644
--- a/devel/libsigrokdecode/Makefile
+++ b/devel/libsigrokdecode/Makefile
@@ -11,9 +11,11 @@ COMMENT= Framework for hardware logic analyzers, protocol decoders library
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING
-GNU_CONFIGURE= yes
USES= gnome libtool pathfix pkgconfig python:3.4+
USE_GNOME= glib20
+
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= PYTHON3=${PYTHON_CMD}
MAKE_JOBS_UNSAFE= yes
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
diff --git a/devel/libsigrokdecode/files/patch-configure b/devel/libsigrokdecode/files/patch-configure
new file mode 100644
index 000000000000..8793549374da
--- /dev/null
+++ b/devel/libsigrokdecode/files/patch-configure
@@ -0,0 +1,44 @@
+--- configure.orig 2019-12-11 21:37:52 UTC
++++ configure
+@@ -13200,6 +13200,30 @@ sr_pkg_check_summary_append() {
+ # first, since usually only that variant will add "-lpython3.8".
+ # https://docs.python.org/3/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build
+ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.9-embed\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "python-3.9-embed") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ sr_have_python3=yes
++ SRD_PKGLIBS=${SRD_PKGLIBS}${SRD_PKGLIBS:+' '}"python-3.9-embed"
++ sr_python3_version=`$PKG_CONFIG --modversion "python-3.9-embed" 2>&5`
++ sr_pkg_check_summary_append "python-3.9-embed" "$sr_python3_version"
++else
++ sr_pkg_check_summary_append "python-3.9-embed" no
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.9 >= 3.9\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "python-3.9 >= 3.9") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ sr_have_python3=yes
++ SRD_PKGLIBS=${SRD_PKGLIBS}${SRD_PKGLIBS:+' '}"python-3.9 >= 3.9"
++ sr_python3_version=`$PKG_CONFIG --modversion "python-3.9 >= 3.9" 2>&5`
++ sr_pkg_check_summary_append "python-3.9 >= 3.9" "$sr_python3_version"
++else
++ sr_pkg_check_summary_append "python-3.9 >= 3.8" no
++ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.8-embed\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.8-embed") 2>&5
+ ac_status=$?
+@@ -13308,6 +13332,10 @@ else
+ else
+ sr_pkg_check_summary_append "python3 >= 3.2" no
+ sr_have_python3=no sr_python3_version=
++fi
++
++fi
++
+ fi
+
+ fi