svn commit: r523930 - head/graphics/tesseract

Tobias Kortkamp tobik at freebsd.org
Sat Jan 25 12:05:38 UTC 2020


On Thu, Jan 23, 2020 at 01:14:43PM +0000, Piotr Kubaj wrote:
> Author: pkubaj
> Date: Thu Jan 23 13:14:43 2020
> New Revision: 523930
> URL: https://svnweb.freebsd.org/changeset/ports/523930
> 
> Log:
>   graphics/tesseract: use correct check for libomp
>   
>   FreeBSD 11.3 has libomp.
>   
>   Reported by:	sunpoet
> 
> Modified:
>   head/graphics/tesseract/Makefile
> 
> Modified: head/graphics/tesseract/Makefile
> ==============================================================================
> --- head/graphics/tesseract/Makefile	Thu Jan 23 13:09:37 2020	(r523929)
> +++ head/graphics/tesseract/Makefile	Thu Jan 23 13:14:43 2020	(r523930)
> @@ -51,7 +51,7 @@ TOOLS_USE=	GNOME=cairo,glib20,pango
>  
>  .include <bsd.port.pre.mk>
>  
> -.if ${OSVERSION} < 1201000
> +.if ${CHOSEN_COMPILER_TYPE} == clang && !exists(/usr/include/omp.h)
>  OPENMP_LIB_DEPENDS=libomp.so:devel/openmp
>  .endif
>  

This only fixes part of the problem.  Changing the condition does
not change the fact that options helper cannot be defined after
bsd.port.options.mk/bsd.port.pre.mk if you want them to do something.

The framework also warns about this (assuming the condition is
true):

$ make -C graphics/tesseract WITH=OPENMP check-sanity
/!\ tesseract-4.1.1: Makefile errors /!\

The following options helpers are incorrectly set after bsd.port.options.mk
and are ineffective: OPENMP_LIB_DEPENDS

$ make -C graphics/tesseract -V 'LIB_DEPENDS:Mlibomp*' WITH=OPENMP

$

You could do it like this:

Index: graphics/tesseract/Makefile
===================================================================
--- graphics/tesseract/Makefile	(revision 524015)
+++ graphics/tesseract/Makefile	(working copy)
@@ -51,8 +51,8 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${CHOSEN_COMPILER_TYPE} == clang && !exists(/usr/include/omp.h)
-OPENMP_LIB_DEPENDS=libomp.so:devel/openmp
+.if ${PORT_OPTIONS:MOPENMP} && ${CHOSEN_COMPILER_TYPE} == clang && !exists(/usr/include/omp.h)
+LIB_DEPENDS+=	libomp.so:devel/openmp
 .endif
 
 post-patch:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-head/attachments/20200125/4f492b79/attachment.sig>


More information about the svn-ports-head mailing list