freecad: rebuild for Python 3.12
This commit is contained in:
parent
0189897f95
commit
ebe2601f15
@ -1,9 +1,10 @@
|
|||||||
# Template file for 'freecad'
|
# Template file for 'freecad'
|
||||||
pkgname=freecad
|
pkgname=freecad
|
||||||
version=0.20.2
|
version=0.20.2
|
||||||
revision=6
|
revision=7
|
||||||
|
build_wrksrc="FreeCAD-${version}"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
|
pycompile_dirs="usr/lib/${pkgname}/Mod"
|
||||||
_inst_prefix=/usr/lib/${pkgname}
|
_inst_prefix=/usr/lib/${pkgname}
|
||||||
configure_args="
|
configure_args="
|
||||||
-DPYTHON_EXECUTABLE=/usr/bin/python3
|
-DPYTHON_EXECUTABLE=/usr/bin/python3
|
||||||
@ -15,33 +16,43 @@ configure_args="
|
|||||||
-DCMAKE_INSTALL_DATADIR=/usr/share/${pkgname}
|
-DCMAKE_INSTALL_DATADIR=/usr/share/${pkgname}
|
||||||
-DMEDFILE_INCLUDE_DIRS=/usr/include/med
|
-DMEDFILE_INCLUDE_DIRS=/usr/include/med
|
||||||
-DPYSIDE2RCCBINARY=/usr/bin/rcc-qt5
|
-DPYSIDE2RCCBINARY=/usr/bin/rcc-qt5
|
||||||
-DPYSIDE2UICBINARY=/usr/bin/uic-qt5"
|
-DPYSIDE2UICBINARY=/usr/bin/uic-qt5
|
||||||
hostmakedepends="pkg-config swig doxygen graphviz"
|
"
|
||||||
|
hostmakedepends="pkg-config swig doxygen graphviz python3-setuptools"
|
||||||
makedepends="python3-devel boost-devel libxerces-c-devel zlib-devel occt-devel
|
makedepends="python3-devel boost-devel libxerces-c-devel zlib-devel occt-devel
|
||||||
vtk-devel hdf5-devel openmpi-devel libmed-devel eigen double-conversion-devel
|
vtk-devel hdf5-devel openmpi-devel libmed-devel eigen double-conversion-devel
|
||||||
coin3-devel libshiboken2-devel libspnav-devel pyside2-tools
|
coin3-devel libshiboken2-devel libspnav-devel pyside2-tools
|
||||||
liblz4-devel libpyside2-python3-devel python3-matplotlib netcdf-devel
|
liblz4-devel libpyside2-python3-devel python3-matplotlib netcdf-devel
|
||||||
jsoncpp-devel qt5-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel
|
jsoncpp-devel qt5-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel
|
||||||
qt5-xmlpatterns-devel coin3-doc glew-devel python3-pivy"
|
qt5-xmlpatterns-devel coin3-doc glew-devel python3-pivy"
|
||||||
|
|
||||||
depends="python3-matplotlib python3-pyside2-webengine python3-pivy"
|
depends="python3-matplotlib python3-pyside2-webengine python3-pivy"
|
||||||
|
|
||||||
python_version=3
|
|
||||||
pycompile_dirs="usr/lib/${pkgname}/Mod"
|
|
||||||
|
|
||||||
short_desc="General purpose 3D CAD modeler"
|
short_desc="General purpose 3D CAD modeler"
|
||||||
maintainer="yopito <pierre.bourgin@free.fr>"
|
maintainer="yopito <pierre.bourgin@free.fr>"
|
||||||
license="LGPL-2.0-or-later"
|
license="LGPL-2.0-or-later"
|
||||||
homepage="https://freecadweb.org/"
|
homepage="https://freecadweb.org/"
|
||||||
distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz"
|
_pycxxver=7.1.8
|
||||||
checksum=46922f3a477e742e1a89cd5346692d63aebb2b67af887b3e463e094a4ae055da
|
distfiles="
|
||||||
|
https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz
|
||||||
|
${SOURCEFORGE_SITE}/cxx/pycxx-${_pycxxver}.tar.gz
|
||||||
|
"
|
||||||
|
checksum="46922f3a477e742e1a89cd5346692d63aebb2b67af887b3e463e094a4ae055da
|
||||||
|
4b91e1e1141c23fbd5039df635c4bb6e75632168548f56b83ce177193c0c98c6"
|
||||||
|
python_version=3
|
||||||
|
patch_args="-Np1 -d ${build_wrksrc}"
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
||||||
makedepends+=" libexecinfo-devel"
|
makedepends+=" libexecinfo-devel"
|
||||||
LDFLAGS="-lexecinfo"
|
LDFLAGS="-lexecinfo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CXXFLAGS="-DPYCXX_PYTHON_2TO3"
|
||||||
|
|
||||||
post_extract() {
|
post_extract() {
|
||||||
|
rm -r "${build_wrksrc}/src/CXX"
|
||||||
|
ln -Tsr "./pycxx-${_pycxxver}/CXX" "${build_wrksrc}/src/CXX"
|
||||||
|
}
|
||||||
|
|
||||||
|
post_patch() {
|
||||||
# Report exact minor version
|
# Report exact minor version
|
||||||
# Freecad has a record of shipping mismatching version info
|
# Freecad has a record of shipping mismatching version info
|
||||||
vminor=${version#*.}
|
vminor=${version#*.}
|
||||||
@ -55,6 +66,11 @@ post_extract() {
|
|||||||
-i src/Build/Version.h.cmake
|
-i src/Build/Version.h.cmake
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
configure_args+=" -DPYCXX_INCLUDE_DIR=${wrksrc}/pycxx-${_pycxxver}"
|
||||||
|
configure_args+=" -DPYCXX_SOURCE_DIR=${wrksrc}/pycxx-${_pycxxver}/Src"
|
||||||
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
# AppHomePath is computed with binary's realpath:
|
# AppHomePath is computed with binary's realpath:
|
||||||
# do not move binaries but symlink them instead.
|
# do not move binaries but symlink them instead.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user