Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jul 2019 10:14:38 +0000 (UTC)
From:      Kai Knoblich <kai@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r506655 - head/textproc/py-ocrmypdf
Message-ID:  <201907151014.x6FAEctv055473@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kai
Date: Mon Jul 15 10:14:38 2019
New Revision: 506655
URL: https://svnweb.freebsd.org/changeset/ports/506655

Log:
  textproc/py-ocrmypdf: Use defined locale in whole build process
  
  * Set the locale globally for {CONFIGURE,MAKE}_ENV so that the locale
    doesn't need to be set explicitly for the do-test target.
  
  * Use ECHO_CMD instead of ECHO as the latter one is already defined in
    /usr/share/mk/sys.mk, which can either be "echo" or "true" if the make
    flag -s is given.
  
  Suggested by:	sunpoet

Modified:
  head/textproc/py-ocrmypdf/Makefile

Modified: head/textproc/py-ocrmypdf/Makefile
==============================================================================
--- head/textproc/py-ocrmypdf/Makefile	Mon Jul 15 10:11:37 2019	(r506654)
+++ head/textproc/py-ocrmypdf/Makefile	Mon Jul 15 10:14:38 2019	(r506655)
@@ -52,7 +52,7 @@ SHEBANG_FILES=	src/ocrmypdf/__main__.py \
 		tests/spoof/gs_raster_failure.py \
 		tests/spoof/tesseract_crash.py
 
-MAKE_ENV=	LC_ALL=en_US.UTF-8
+USE_LOCALE=	en_US.UTF-8
 
 NO_ARCH=	yes
 
@@ -63,14 +63,14 @@ NO_ARCH=	yes
 # See here for a related issue from another port (audio/py-sounddevice):
 # https://github.com/spatialaudio/python-sounddevice/issues/116
 post-install:
-	${ECHO} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/__pycache__/_leptonica.cpython-${PYTHON_SUFFIX}.opt-1.pyc" >> ${_PYTHONPKGLIST}
-	${ECHO} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/__pycache__/_leptonica.cpython-${PYTHON_SUFFIX}.pyc" >> ${_PYTHONPKGLIST}
-	${ECHO} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/_leptonica.py" >> ${_PYTHONPKGLIST}
+	${ECHO_CMD} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/__pycache__/_leptonica.cpython-${PYTHON_SUFFIX}.opt-1.pyc" >> ${_PYTHONPKGLIST}
+	${ECHO_CMD} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/__pycache__/_leptonica.cpython-${PYTHON_SUFFIX}.pyc" >> ${_PYTHONPKGLIST}
+	${ECHO_CMD} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/_leptonica.py" >> ${_PYTHONPKGLIST}
 
 # Some unittests use a custom marker (= "slow") which is also used here, so
 # that the overall test doesn't finish with a warning.
 do-test:
-	@cd ${WRKSRC} && ${SETENV} LC_ALL=en_US.UTF-8 ${PYTHON_CMD} -m pytest -rs -v \
+	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} -m pytest -rs -v \
 	       	-n ${MAKE_JOBS_NUMBER} -o 'markers=slow' -o 'addopts="--runslow"' -k ' \
 		not test_dev_null and \
 		not test_mono_not_inverted'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907151014.x6FAEctv055473>