Package Details: opencascade-cadquery 7.7.1-1

Git Clone URL: https://aur.archlinux.org/opencascade-cadquery.git (read-only, click to copy)
Package Base: opencascade-cadquery
Description: Opencascade for python-cadquery
Upstream URL: https://dev.opencascade.org/
Licenses: LGPL, custom:OCCTLGPLEXCEPTION
Submitter: greyltc
Maintainer: greyltc
Last Packager: greyltc
Votes: 2
Popularity: 0.036206
First Submitted: 2021-11-21 19:25 (UTC)
Last Updated: 2023-11-10 23:40 (UTC)

Latest Comments

greyltc commented on 2022-04-14 19:11 (UTC)

cool. thanks for that!

dack commented on 2022-03-15 23:38 (UTC)

For anyone else trying to build this, here's a PKGBUILD with the ffmpeg and dependency fixes.

# $Id$
# Maintainer: Grey Christoforo <first name at last name dot net>

pkgname=opencascade-cadquery
_pkgver="V7_6_0"
pkgver=$(echo ${_pkgver} | sed 's,^V,,g;s,_,.,g')
pkgrel=1
pkgdesc="Opencascade for python-cadquery"
arch=(x86_64)
url="https://dev.opencascade.org/"
license=('LGPL' 'custom:OCCTLGPLEXCEPTION')

depends=(
tk
vtk
gl2ps
"ffmpeg4.4"
freeimage
intel-tbb
openmpi
glew
)

makedepends=(
cmake
qt5-base
ninja
rapidjson
)

source=(
"${pkgname}-${pkgver}.tgz::https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_pkgver};sf=tgz"
cmake.patch
opencascade-tbb-2021.patch
)
sha256sums=('e7f989d52348c3b3acb7eb4ee001bb5c2eed5250cdcceaa6ae97edc294f2cabd'
            'b3a2583fd21576d454952894f92a2a9e710015051403a3759b4a2ccbfc78a048'
            'b0c4601fd9b2905e4b3bc3ed8af1493960c80bfe10332a0c562c59786efd57a2')

prepare() {
  cd occt-${_pkgver}

  patch -p1 -i ../cmake.patch
  #curl https://src.fedoraproject.org/rpms/opencascade/raw/rawhide/f/opencascade-cmake.patch | patch -p1

  # fix for tbb changes
  patch -p1 -i ../opencascade-tbb-2021.patch
  #curl https://raw.githubusercontent.com/archlinux/svntogit-community/packages/opencascade/trunk/opencascade-tbb-2021.patch | patch -p1

  # fix for trying to write into the system during build
  sed 's,if (EXISTS "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}"),if (0),g' -i CMakeLists.txt

  # fix for None type build
  sed '/OpenCASCADECompileDefinitionsAndFlags/d' -i CMakeLists.txt
}

build() {
  cd occt-${_pkgver}
  # prevents the build from trying to write into the system
  export DESTDIR="${srcdir}/garbage"
  rm -rf "${DESTDIR}"

  _install_prefix="/opt/opencascade-cadquery/usr"
  #_install_prefix="/usr"

  cmake -B build_dir -S . -W no-dev -G Ninja \
    -D CMAKE_BUILD_TYPE=None \
    -D CMAKE_INSTALL_PREFIX="${_install_prefix}" \
    -D INSTALL_DIR_CMAKE="${_install_prefix}/lib/cmake/opencascade" \
    -D INSTALL_TEST_CASES=OFF \
    -D BUILD_WITH_DEBUG=OFF \
    -D BUILD_RELEASE_DISABLE_EXCEPTIONS=OFF \
    -D USE_FFMPEG=ON \
    -D USE_FREEIMAGE=ON \
    -D USE_RAPIDJSON=ON \
    -D USE_TBB=ON \
    -D USE_GLES2=OFF \
    -D USE_VTK=ON \
    -D INSTALL_SAMPLES=OFF \
    -D INSTALL_DOC_Overview=OFF \
    -D BUILD_RESOURCES=ON \
    -D BUILD_SAMPLES_QT=OFF \
    -D BUILD_Inspector=OFF \
    -D 3RDPARTY_VTK_INCLUDE_DIR="/usr/include/vtk" \
    -D 3RDPARTY_FFMPEG_INCLUDE_DIR="/usr/include/ffmpeg4.4" \
    -D CMAKE_LIBRARY_PATH="/usr/lib/ffmpeg4.4"

  cmake --build build_dir
  rm -rf "${DESTDIR}"
}

check() {
  cd occt-${_pkgver}
  # prevent the current environment from skewing the testing
  unset "${!CSF@}"
  unset "${!DRAW@}"
  unset CASROOT

  # graphics testing does not seem to go well (some seem to stall forever)
  rm -rf tests/bugs/vis
  rm -rf tests/perf/vis
  rm -rf tests/v3d

  cd build_dir
  cp draw.sh check.sh
  sed 's,DRAWEXE,lin64/gcc/bin/DRAWEXE -b -f testgrid.tcl,g' -i check.sh  # possibly try with -v instead of -b
  echo testgrid > testgrid.tcl
  ./check.sh
}

package() {
  cd occt-${_pkgver}
  DESTDIR="${pkgdir}" cmake --install build_dir

  install -m644 -Dt "${pkgdir}"/usr/share/licenses/${pkgname} LICENSE_LGPL_21.txt
  install -m644 -Dt "${pkgdir}"/usr/share/licenses/${pkgname} OCCT_LGPL_EXCEPTION.txt
}

Lauch42 commented on 2022-02-21 10:25 (UTC) (edited on 2022-02-21 18:12 (UTC) by Lauch42)

Same failures for me. Build fails against ffmpeg5. I built it with ffmpeg4.4, that works (I set CMAKE_LIBRARY_PATH, although there may be more elegant methods. Using 3RD_PARTY_FFMPEG_LIBRARY_DIR did not work, neither did adding a PKG_CONFIG_PATH).

There are also some missing make dependencies, I think: glew, openmpi

dack commented on 2022-02-20 19:16 (UTC) (edited on 2022-02-20 19:16 (UTC) by dack)

Build fails for me - possible something ffmpeg related? Is anyone else seeing the same failure?

[2299/5820] Building CXX object src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o               
FAILED: src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o 
/usr/bin/c++ -DHAVE_FFMPEG -DHAVE_FREEIMAGE -DHAVE_FREETYPE -DHAVE_OPENGL_EXT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DTKService_EXPORTS -DVTK_OPENGL2_BACKEND -I/usr/include/freetype2 -I/usr/inc
lude/vtk -I/home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/build_dir/include/opencascade -std=c++0x -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security 
        -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fPIC -Wall -Wextra -fPIC -MD -MT src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o -MF src/TKService/CMakeFiles/TKService.dir
/__/Media/Media_FormatContext.cxx.o.d -o src/TKService/CMakeFiles/TKService.dir/__/Media/Media_FormatContext.cxx.o -c /home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.cxx
/home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.cxx: In member function ‘TCollection_AsciiString Media_FormatContext::StreamInfo(unsigned int, AVCodecContext*) const’:
/home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.cxx:413:25: error: ‘const AVStream’ {aka ‘const struct AVStream’} has no member named ‘codec’
  413 |     aCodecCtx = aStream.codec;
      |                         ^~~~~
/home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.cxx:418:3: error: ‘avcodec_string’ was not declared in this scope; did you mean ‘av_codec_iterate’?
  418 |   avcodec_string (aFrmtBuff, sizeof(aFrmtBuff), aCodecCtx, 0);
      |   ^~~~~~~~~~~~~~
      |   av_codec_iterate
/home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.cxx:446:18: error: invalid use of incomplete type ‘struct AVCodecContext’
  446 |     if (aCodecCtx->time_base.den != 0 && aCodecCtx->time_base.num != 0)
      |                  ^~
In file included from /home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/build_dir/include/opencascade/Media_FormatContext.hxx:1,
                 from /home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.cxx:20: 
/home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.hxx:22:8: note: forward declaration of ‘struct AVCodecContext’
   22 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
/home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.cxx:446:51: error: invalid use of incomplete type ‘struct AVCodecContext’
  446 |     if (aCodecCtx->time_base.den != 0 && aCodecCtx->time_base.num != 0)
      |                                                   ^~
In file included from /home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/build_dir/include/opencascade/Media_FormatContext.hxx:1,
                 from /home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.cxx:20: 
/home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.hxx:22:8: note: forward declaration of ‘struct AVCodecContext’
   22 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
/home/user/.cache/yay/opencascade-cadquery/src/occt-V7_6_0/src/Media/Media_FormatContext.cxx:448:85: error: invalid use of incomplete type ‘struct AVCodecContext’
  448 |       aStreamInfo += TCollection_AsciiString(", ") + formatFps(1 / av_q2d (aCodecCtx->time_base)) + " tbc";
      |                                                                                     ^~

greyltc commented on 2022-02-14 19:02 (UTC) (edited on 2022-02-14 19:02 (UTC) by greyltc)

Yeah, the checks can be annoying. Not sure if it's best to disable them or advise you to build with --nocheck

amstan commented on 2022-02-08 20:11 (UTC)

The Running tests (total 19476 test cases)... step has a tendency to crash my kwin window manager. Seems that every test makes X create a window (my active window flickers focus like crazy for each one of these tests, I guess 19000 of them). I would rather have them disabled.