diff --git a/math/imath/Makefile b/math/imath/Makefile new file mode 100644 index 00000000000..6b219c2beba --- /dev/null +++ b/math/imath/Makefile @@ -0,0 +1,54 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2021/08/31 07:28:13 ajacoutot Exp $ + +COMMENT= C++ and python library of 2D and 3D vector & matrix + +V= 3.1.2 +GH_ACCOUNT= AcademySoftwareFoundation +GH_PROJECT= Imath +GH_TAGNAME= v${V} + +MAINTAINER= Antoine Jacoutot + +# /!\ see symlinks creation in post-install (LIBImath-3_1_VERSION is used) +.for solib in Imath PyImath_Python3_8 +SHARED_LIBS += ${solib} 1.0 # 28 +SHARED_LIBS += ${solib}-3_1 1.0 # 28 +.endfor + +CATEGORIES= math graphics devel + +# BSD-3-Clause +PERMIT_PACKAGE= Yes + +WANTLIB += ${COMPILER_LIBCXX} ${MODPY_WANTLIB} +WANTLIB += boost_python${MODPY_VERSION:C/\.//g}-mt intl m util + +COMPILER= base-clang ports-gcc base-gcc + +MODULES= devel/cmake \ + lang/python + +BUILD_DEPENDS= math/py-numpy${MODPY_FLAVOR} + +LIB_DEPENDS= devel/boost + +.if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" +CXXFLAGS += -mxgot +.endif + +CONFIGURE_ARGS= -DCMAKE_EXE_LINKER_FLAGS="-L${LOCALBASE}/lib" \ + -DPYTHON:BOOL=ON + +DEBUG_PACKAGES= ${BUILD_PACKAGES} + +post-install: +# fix links target; symlinks are required for FindIlmbase.cmake etc. to find the +# corresponding libs (e.g. find_library(ILMBASE_IMATH_LIBRARY Imath)) + cd ${PREFIX}/lib && \ + for i in *.so; do \ + test -h $$i && lib=$${i#lib} && lib=$${lib%.so} && \ + ln -sf lib$${lib}-3_1.so.${LIBImath-3_1_VERSION} \ + $$i.${LIBImath-3_1_VERSION} && rm $$i ; \ + done + +.include diff --git a/math/imath/distinfo b/math/imath/distinfo new file mode 100644 index 00000000000..003c1466a8d --- /dev/null +++ b/math/imath/distinfo @@ -0,0 +1,2 @@ +SHA256 (Imath-3.1.2.tar.gz) = 8hNQ79zHY+I7/9Te2bv4IuYwwV7OawaX4vy0JzfAjC0= +SIZE (Imath-3.1.2.tar.gz) = 566098 diff --git a/math/imath/pkg/DESCR b/math/imath/pkg/DESCR new file mode 100644 index 00000000000..e5cc1ba78bb --- /dev/null +++ b/math/imath/pkg/DESCR @@ -0,0 +1,23 @@ +Imath is a basic, light-weight, and efficient C++ representation of 2D and 3D +vectors and matrices and other simple but useful mathematical objects, +functions, and data types common in computer graphics applications, including +the "half" 16-bit floating-point type. + +Imath also includes python bindings for all types and functions, including +optimized implementations of vector and matrix arrays. + +Features: +* half: 16-bit floating-point type +* Vector: V2s, V2i, V2i64, V2f, V2d, V3s, V3i, V4i64, V3f, V3d, V4s, V4i, V4i64, V4f, V4d +* Matrix: M22f, M22d, M33f, M33d, M44f, M44d +* Bounding box: Box2s, Box2i, Box2i64, Box2f, Box2d, Box3s, Box3i, Box3i64, Box3f, Box3d +* Color: C3h, C3f, C3c, C4f, C4h, C4c +* Euler angles: Eulerf, Eulerd +* Quaternion: Quatf, Quatd +* Viewing frustum: Frustrumf, Frustumd +* Interval: Intervals, Intervali, Intervalf, Intervald +* Line: Line3f, Line3d +* Plane: Plane3f, Plane3d +* Sphere: Sphere3f, Sphere3d +* Shear: Shear3f, Shear3d, Shear6f, Shear6 +* Miscellaneous math functions diff --git a/math/imath/pkg/PLIST b/math/imath/pkg/PLIST new file mode 100644 index 00000000000..c4d448b3add --- /dev/null +++ b/math/imath/pkg/PLIST @@ -0,0 +1,95 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2021/08/31 07:28:13 ajacoutot Exp $ +@conflict OpenEXR-<3 +include/Imath/ +include/Imath/ImathBox.h +include/Imath/ImathBoxAlgo.h +include/Imath/ImathColor.h +include/Imath/ImathColorAlgo.h +include/Imath/ImathConfig.h +include/Imath/ImathEuler.h +include/Imath/ImathExport.h +include/Imath/ImathForward.h +include/Imath/ImathFrame.h +include/Imath/ImathFrustum.h +include/Imath/ImathFrustumTest.h +include/Imath/ImathFun.h +include/Imath/ImathGL.h +include/Imath/ImathGLU.h +include/Imath/ImathInt64.h +include/Imath/ImathInterval.h +include/Imath/ImathLine.h +include/Imath/ImathLineAlgo.h +include/Imath/ImathMath.h +include/Imath/ImathMatrix.h +include/Imath/ImathMatrixAlgo.h +include/Imath/ImathNamespace.h +include/Imath/ImathPlane.h +include/Imath/ImathPlatform.h +include/Imath/ImathQuat.h +include/Imath/ImathRandom.h +include/Imath/ImathRoots.h +include/Imath/ImathShear.h +include/Imath/ImathSphere.h +include/Imath/ImathTypeTraits.h +include/Imath/ImathVec.h +include/Imath/ImathVecAlgo.h +include/Imath/PyImath.h +include/Imath/PyImathAPI.h +include/Imath/PyImathAutovectorize.h +include/Imath/PyImathBasicTypes.h +include/Imath/PyImathBox.h +include/Imath/PyImathBoxArrayImpl.h +include/Imath/PyImathBufferProtocol.h +include/Imath/PyImathColor.h +include/Imath/PyImathColor3ArrayImpl.h +include/Imath/PyImathColor4Array2DImpl.h +include/Imath/PyImathColor4ArrayImpl.h +include/Imath/PyImathDecorators.h +include/Imath/PyImathEuler.h +include/Imath/PyImathExport.h +include/Imath/PyImathFixedArray.h +include/Imath/PyImathFixedArray2D.h +include/Imath/PyImathFixedArrayTraits.h +include/Imath/PyImathFixedMatrix.h +include/Imath/PyImathFixedVArray.h +include/Imath/PyImathFrustum.h +include/Imath/PyImathFun.h +include/Imath/PyImathLine.h +include/Imath/PyImathM44Array.h +include/Imath/PyImathMathExc.h +include/Imath/PyImathMatrix.h +include/Imath/PyImathOperators.h +include/Imath/PyImathPlane.h +include/Imath/PyImathQuat.h +include/Imath/PyImathQuatOperators.h +include/Imath/PyImathRandom.h +include/Imath/PyImathShear.h +include/Imath/PyImathStringArray.h +include/Imath/PyImathStringArrayRegister.h +include/Imath/PyImathStringTable.h +include/Imath/PyImathTask.h +include/Imath/PyImathUtil.h +include/Imath/PyImathVec.h +include/Imath/PyImathVec2Impl.h +include/Imath/PyImathVec3ArrayImpl.h +include/Imath/PyImathVec3Impl.h +include/Imath/PyImathVec4ArrayImpl.h +include/Imath/PyImathVec4Impl.h +include/Imath/PyImathVecOperators.h +include/Imath/half.h +include/Imath/halfFunction.h +include/Imath/halfLimits.h +lib/cmake/ +lib/cmake/Imath/ +lib/cmake/Imath/ImathConfig${MODCMAKE_BUILD_SUFFIX} +lib/cmake/Imath/ImathConfig.cmake +lib/cmake/Imath/ImathConfigVersion.cmake +lib/cmake/Imath/ImathTargets${MODCMAKE_BUILD_SUFFIX} +lib/cmake/Imath/ImathTargets.cmake +@lib lib/libImath-3_1.so.${LIBImath-3_1_VERSION} +@lib lib/libImath.so.${LIBImath_VERSION} +@lib lib/libPyImath_Python3_8-3_1.so.${LIBPyImath_Python3_8-3_1_VERSION} +lib/pkgconfig/Imath.pc +lib/pkgconfig/PyImath.pc +@so lib/python${MODPY_VERSION}/site-packages/imath.so +@so lib/python${MODPY_VERSION}/site-packages/imathnumpy.so