Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jan 2020 13:05:34 +0100
From:      Tobias Kortkamp <tobik@freebsd.org>
To:        Piotr Kubaj <pkubaj@freebsd.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r523930 - head/graphics/tesseract
Message-ID:  <20200125120534.GA83740@urd.tobik.me>
In-Reply-To: <202001231314.00NDEhSi060339@repo.freebsd.org>
References:  <202001231314.00NDEhSi060339@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
>=20
> Log:
>   graphics/tesseract: use correct check for libomp
>  =20
>   FreeBSD 11.3 has libomp.
>  =20
>   Reported by:	sunpoet
>=20
> Modified:
>   head/graphics/tesseract/Makefile
>=20
> Modified: head/graphics/tesseract/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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=3D	GNOME=3Dcairo,glib20,pango
> =20
>  .include <bsd.port.pre.mk>
> =20
> -.if ${OSVERSION} < 1201000
> +.if ${CHOSEN_COMPILER_TYPE} =3D=3D clang && !exists(/usr/include/omp.h)
>  OPENMP_LIB_DEPENDS=3Dlibomp.so:devel/openmp
>  .endif
> =20

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=3DOPENMP 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=3DOPENMP

$

You could do it like this:

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



--a8Wt8u1KmwUX3Y2C
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGTBAEBCgB9FiEElXvTEJc6ePgdQuobpPCftzzFH2EFAl4sLwtfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk1
N0JEMzEwOTczQTc4RjgxRDQyRUExQkE0RjA5RkI3M0NDNTFGNjEACgkQpPCftzzF
H2HZTAf/ej/NDIIiDzrY2Jz+Ywdrzm+bEm/+dxOV6I7bTGiYjxdDzo/8rUHn+0Bk
4FRJaepZVu8Ereu5of7DQHPRdG/7ciS58uAHrV5Dfl6m4QWyjI1uKA9ppWJuCOrO
AopsUbClFF9vxSBFDK7CmSU5xPyw/0e2CcV8tROZH5OXXFbXd4GJFlOXwzlzmULd
XFTyvClNTGtHj5MsISx1ac+7IKkq8AvsEL4928GYbq/yRdCOXZB3OqLbGA4dwxIN
CHnDmOoE9jQ29qOn4Fb50nkwkfDboJvXEjP+pXSHhLRColcHZFsXu3vjyYtjkfZP
B0MO2g4WU2r5/NqfrwAIlyiDVQ+Hmg==
=3SyO
-----END PGP SIGNATURE-----

--a8Wt8u1KmwUX3Y2C--



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