[new-package] Imath 3.1.5

This commit is contained in:
Biswapriyo Nath
2022-02-26 18:25:01 +05:30
committed by مهدي شينون (Mehdi Chinoune)
parent f443849c43
commit 7c2b16a300
3 changed files with 114 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
--- a/config/Imath.pc.in
+++ b/config/Imath.pc.in
@@ -13,5 +13,5 @@
Version: @IMATH_VERSION@
Requires:
Conflicts:
-Libs: -L${libdir} -lImath${libsuffix}
+Libs: -L${libdir} -lImath
Cflags: -I${includedir} -I${includedir}/Imath
--- a/config/LibraryDefine.cmake
+++ b/config/LibraryDefine.cmake
@@ -79,7 +79,9 @@
endif()
set_target_properties(${libname} PROPERTIES
- OUTPUT_NAME "${libname}${IMATH_LIB_SUFFIX}"
+ OUTPUT_NAME "${libname}"
+ RUNTIME_OUTPUT_NAME "${libname}${IMATH_LIB_SUFFIX}"
+ ARCHIVE_OUTPUT_NAME "${libname}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
add_library(${PROJECT_NAME}::${libname} ALIAS ${libname})

View File

@@ -0,0 +1,20 @@
--- a/src/Imath/ImathVec.h
+++ b/src/Imath/ImathVec.h
@@ -873,7 +873,7 @@
//----------------------------------------------------------------------------
/// @cond Doxygen_Suppress
-
+/*
// Vec2<short>
template <> IMATH_HOSTDEVICE short Vec2<short>::length() const IMATH_NOEXCEPT = delete;
template <> IMATH_HOSTDEVICE const Vec2<short>& Vec2<short>::normalize() IMATH_NOEXCEPT = delete;
@@ -954,7 +954,7 @@
template <> IMATH_HOSTDEVICE Vec4<int64_t> Vec4<int64_t>::normalized() const IMATH_NOEXCEPT = delete;
template <> Vec4<int64_t> Vec4<int64_t>::normalizedExc() const = delete;
template <> IMATH_HOSTDEVICE Vec4<int64_t> Vec4<int64_t>::normalizedNonNull() const IMATH_NOEXCEPT = delete;
-
+*/
/// @endcond Doxygen_Suppress
//------------------------

72
mingw-w64-imath/PKGBUILD Normal file
View File

@@ -0,0 +1,72 @@
# Maintainer: Biswapriyo Nath <nathbappai@gmail.com>
_realname=imath
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=3.1.5
pkgrel=1
pkgdesc='A C++ and python library of 2D and 3D vector, matrix, and math operations for computer graphics (mingw-w64)'
url='https://www.openexr.com/'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
license=('BSD')
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
makedepends=("${MINGW_PACKAGE_PREFIX}-boost"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-numpy")
optdepends=("${MINGW_PACKAGE_PREFIX}-python: python bindings"
"${MINGW_PACKAGE_PREFIX}-boost: python bindings")
source=("https://github.com/AcademySoftwareFoundation/Imath/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz"
0001-cmake-libs-name.patch
0002-fix-openexr-clang-build.patch)
sha256sums=('1e9c7c94797cf7b7e61908aed1f80a331088cc7d8873318f70376e4aed5f25fb'
'2dc2de52e2475cc9d725ff443466d3ac247a405018f1d9b0caeb03a9d5116d9b'
'0eea3c7b57d5b59887f963d696c2afdcfb1976a3913f161995e19b13d6a65086')
prepare() {
cd "Imath-${pkgver}"
patch -p1 -i "${srcdir}/0001-cmake-libs-name.patch"
if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then
patch -p1 -i "${srcdir}/0002-fix-openexr-clang-build.patch"
fi
}
build() {
[[ -d "${srcdir}/build-${MSYSTEM}" ]] && rm -rf "${srcdir}/build-${MSYSTEM}"
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
declare -a _extra_config
if check_option "debug" "n"; then
_extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
_extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
# ld.lld: error: too many exported symbols (max 65535)
if [[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]]; then
_extra_config+=("-DPYTHON=ON")
fi
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake.exe \
-G "Ninja" \
"${_extra_config[@]}" \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \
-DIMATH_INSTALL_PKG_CONFIG=ON \
../Imath-${pkgver}
${MINGW_PREFIX}/bin/cmake.exe --build .
}
package() {
cd "${srcdir}/build-${MSYSTEM}"
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake.exe --install ./
install -Dm644 "${srcdir}/Imath-${pkgver}/LICENSE.md" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.md"
}