pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

zbar: Re-enable Python for tests



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Tue Dec 3 16:59:00 2019 +0100
Changeset:	0973d09ba793d9ddf858f859f34ca90011ba56dc

Modified Files:
	zbar/Makefile
	zbar/TODO
	zbar/distinfo
	zbar/patches/patch-configure

Log Message:
zbar: Re-enable Python for tests

Patch configure script to ignore possible PYTHON environment variable that could
be passed via CONFIGURE_ENV and only honor the `--with-python' configure
argument.

This is probably worth to be shared upstream, honoring PYTHON
environment variable IMHO violates POLA.

Remove corresponding TODO item.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0973d09ba793d9ddf858f859f34ca90011ba56dc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 zbar/Makefile                | 10 ++++------
 zbar/TODO                    |  2 --
 zbar/distinfo                |  2 +-
 zbar/patches/patch-configure | 39 ++++++++++++++++++++++++++-------------
 4 files changed, 31 insertions(+), 22 deletions(-)

diffs:
diff --git a/zbar/Makefile b/zbar/Makefile
index 594a988aa1..622e970af2 100644
--- a/zbar/Makefile
+++ b/zbar/Makefile
@@ -28,12 +28,10 @@ PKGCONFIG_OVERRIDE+=	zbar.pc.in
 
 TEST_TARGET=	check
 
-# Examples and tests require python
-# XXX: use big hammer to forcely disable python
-#REPLACE_PYTHON+=		test/barcodetest.py examples/upcrpc.py
-#PYTHON_FOR_BUILD_ONLY=		test
-#PYTHON_VERSIONS_ACCEPTED=	27	# tests not ported to Python 3?
-#.include "../../lang/python/application.mk"
+REPLACE_PYTHON+=		test/barcodetest.py examples/upcrpc.py
+PYTHON_FOR_BUILD_ONLY=		test
+PYTHON_VERSIONS_ACCEPTED=	27	# XXX: double-check me!
+.include "../../lang/python/application.mk"
 
 .include "options.mk"
 
diff --git a/zbar/TODO b/zbar/TODO
index 2719fbefc8..8545f0038f 100644
--- a/zbar/TODO
+++ b/zbar/TODO
@@ -13,5 +13,3 @@
    | ld: test/test_decode-test_decode.o: in function `main':
    | test_decode.c:(.text.startup+0x17): undefined reference to `argp_parse'
    | ld: test_decode.c:(.text.startup+0x2f5): undefined reference to `argp_help'
-
-* python2 is (probably) accidentally picked up
diff --git a/zbar/distinfo b/zbar/distinfo
index fc4a286dbb..dde23bf9e8 100644
--- a/zbar/distinfo
+++ b/zbar/distinfo
@@ -4,5 +4,5 @@ SHA1 (zbar-0.23.tar.bz2) = 11a1d3f1aa8ef905fe16d88347a191909705d7ab
 RMD160 (zbar-0.23.tar.bz2) = 59ecd5c78fa91f6951a129377b4fa477307676bb
 SHA512 (zbar-0.23.tar.bz2) = 7eef2ee99760edd693ecc12a36e04b71a156b93b4c1977ca4f6da103a955284cf640b55adb185477e1d4cc65345bb01608ed9528f6518abb514ccbc58e5d350b
 Size (zbar-0.23.tar.bz2) = 1168183 bytes
-SHA1 (patch-configure) = 66dea87487c7daec3a95e4787a8d10cd061543bb
+SHA1 (patch-configure) = 7cbc332aae614096b4dcc76af0dd831284639fcc
 SHA1 (patch-gtk_Makefile.in) = bf32ac312d0d00ed7ac152ddd849dae0fc681e74
diff --git a/zbar/patches/patch-configure b/zbar/patches/patch-configure
index 54838130b1..0b8239ad65 100644
--- a/zbar/patches/patch-configure
+++ b/zbar/patches/patch-configure
@@ -1,7 +1,10 @@
 # $NetBSD$
 
-Avoid unportable `==' test(1) operator and a
-`${parameter/pattern/string}' bash-ism.
+- Avoid unportable `==' test(1) operator
+- Avoid `${parameter/pattern/string}' bash-ism
+- Only honor `--with-python' configure argument and completely ignore
+  possible PYTHON environment variable that could be passed via
+  CONFIGURE_ENV by pkgsrc
 
 `==' unportable test(1) operator commited upstream as
 f326730fff1cb3ea7c98d30f67fc94481468d468.
@@ -26,16 +29,18 @@ f326730fff1cb3ea7c98d30f67fc94481468d468.
  
  pkg_failed=no
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2" >&5
-@@ -21845,7 +21845,7 @@ fi
+@@ -21844,8 +21844,9 @@ fi
  
  
+ 
++if false; then
  if test -z "$PYTHON"; then :
 -  if test "x$with_python" == "xauto"; then :
 +  if test "x$with_python" = "xauto"; then :
    for ac_prog in python3 python2 python
  do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -21893,7 +21893,7 @@ done
+@@ -21893,7 +21894,7 @@ done
  test -n "$PYTHON" || PYTHON=":"
  
  else
@@ -44,7 +49,7 @@ f326730fff1cb3ea7c98d30f67fc94481468d468.
    for ac_prog in python3 python
  do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -21941,7 +21941,7 @@ done
+@@ -21941,7 +21942,7 @@ done
  test -n "$PYTHON" || PYTHON=":"
  
  else
@@ -53,7 +58,15 @@ f326730fff1cb3ea7c98d30f67fc94481468d468.
    for ac_prog in python2 python
  do
    # Extract the first word of "$ac_prog", so it can be a program name with args.
-@@ -22450,7 +22450,7 @@ fi
+@@ -22000,6 +22001,7 @@ else
+   with_python="auto"
+ 
+ fi
++fi
+ 
+ if test "x$with_python" != "xno"; then :
+ 
+@@ -22450,7 +22452,7 @@ fi
  
  
  
@@ -62,7 +75,7 @@ f326730fff1cb3ea7c98d30f67fc94481468d468.
  
  
  
-@@ -23002,7 +23002,7 @@ else
+@@ -23002,7 +23004,7 @@ else
  fi
  
  
@@ -71,7 +84,7 @@ f326730fff1cb3ea7c98d30f67fc94481468d468.
  
  # Javah was obsoleted on Java 8 and removed on Java 11. So, we need to
  # look strictly at the $JAVA_HOME in order to avoid mixing different versions
-@@ -23110,7 +23110,7 @@ fi
+@@ -23110,7 +23112,7 @@ fi
  done
  test -n "$JAR" || JAR=":"
  
@@ -80,7 +93,7 @@ f326730fff1cb3ea7c98d30f67fc94481468d468.
    have_java="no"
  fi
  
-@@ -23163,7 +23163,7 @@ test -n "$JAVA" || JAVA="/bin/false"
+@@ -23163,7 +23165,7 @@ test -n "$JAVA" || JAVA="/bin/false"
  
  
  
@@ -89,7 +102,7 @@ f326730fff1cb3ea7c98d30f67fc94481468d468.
    CLASSPATH="."
  fi
  
-@@ -26981,7 +26981,7 @@ echo "GTK                    --with-gtk=
+@@ -26981,7 +26985,7 @@ echo "GTK                    --with-gtk=
  echo "GObject introspection  --with-gir=$with_gir"
  echo "Qt                     --with-qt=$with_qt            Qt${QT_VERSION}"
  echo "Java                   --with-java=$with_java"
@@ -98,7 +111,7 @@ f326730fff1cb3ea7c98d30f67fc94481468d468.
    echo "Dbus                   --with-dbus=$with_dbus"
  fi
  if test "x$have_GM" = "xyes"; then :
-@@ -27012,7 +27012,7 @@ fi
+@@ -27012,7 +27016,7 @@ fi
  if test "x$have_GM" = "xyes"; then :
    echo "        => ImageMagick is preferred, as GraphicsMagick doesn't support https"
  fi
@@ -107,7 +120,7 @@ f326730fff1cb3ea7c98d30f67fc94481468d468.
    echo "        => GTK support will *NOT* be built"
  fi
  if test "x$with_pygtk2" != "xyes" && test "xPYTHON_VERSION_MAJOR" = "x2"; then :
-@@ -27021,7 +27021,7 @@ fi
+@@ -27021,7 +27025,7 @@ fi
  if test "x$with_qt" != "xyes"; then :
    echo "        => the Qt widget will *NOT* be built"
  fi
@@ -116,7 +129,7 @@ f326730fff1cb3ea7c98d30f67fc94481468d468.
    echo "        => Building a static Qt library"
  fi
  if test "x$with_java" != "xyes"; then :
-@@ -27033,6 +27033,6 @@ fi
+@@ -27033,6 +27037,6 @@ fi
  #echo "NPAPI Plugin     --with-npapi=$with_npapi"
  #AS_IF([test "x$with_mozilla" != "xyes"],
  #  [echo "       => the Mozilla/Firefox/OpenOffice plugin will *NOT* be built"])


Home | Main Index | Thread Index | Old Index