add freecad opencascade ports

This commit is contained in:
javier 2024-04-11 02:33:31 +00:00
parent f43ebf0318
commit 3fd3c89001
13 changed files with 413 additions and 1 deletions

View File

@ -1,2 +1,10 @@
* My personal Venom Linux Ports.
This repo contains my custom venom linux ports adapted to my main laptop.
This repo contains ports that I maintain in venomlinux.
** Ports:
- chezmoi.
- gopass.
- swaylock-effects.
* Working on:
- FreeCAD :: A 3D modeler.

1
chezmoi/.checksums Normal file
View File

@ -0,0 +1 @@
77b5e03ac4677b107ddd4fbcf9bb5eed00e3250b09f760624407304e8ce8edeb8f2fab88d359e7a53f20f0d36c3fdeb8bfd8a7cd8030d9d04524d527196cd6fa chezmoi-2.47.3.tar.gz

17
chezmoi/.pkgfiles Normal file
View File

@ -0,0 +1,17 @@
chezmoi-2.47.3-1
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/chezmoi
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/bash-completion/
drwxr-xr-x root/root usr/share/bash-completion/completions/
-rw-r--r-- root/root usr/share/bash-completion/completions/chezmoi
drwxr-xr-x root/root usr/share/fish/
drwxr-xr-x root/root usr/share/fish/vendor_completions.d/
-rw-r--r-- root/root usr/share/fish/vendor_completions.d/chezmoi.fish
drwxr-xr-x root/root usr/share/licenses/
drwxr-xr-x root/root usr/share/licenses/chezmoi/
-rw-r--r-- root/root usr/share/licenses/chezmoi/LICENSE
drwxr-xr-x root/root usr/share/zsh/
drwxr-xr-x root/root usr/share/zsh/site-functions/
-rw-r--r-- root/root usr/share/zsh/site-functions/_chezmoi

35
chezmoi/spkgbuild Normal file
View File

@ -0,0 +1,35 @@
# description : Manage your dotfiles across multiple machines
# homepage : https://www.chezmoi.io/
# depends : go git
name=chezmoi
version=2.47.3
release=1
source="$name-$version.tar.gz::https://github.com/twpayne/chezmoi/archive/v$version.tar.gz"
build() {
cd $name-$version
export CGO_LDFLAGS="$LDFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
go build \
-buildmode=pie \
-mod=readonly \
-tags noupgrade \
-ldflags "-compressdwarf=false \
-X github.com/twpayne/chezmoi/cmd.DocsDir=/usr/share/doc/$name \
-X main.version=$version \
-X main.date=$(date -u +'%Y-%m-%dT%H:%M:%SZ' --date=@$SOURCE_DATE_EPOCH) \
-extldflags \"$LDFLAGS\"" \
.
install -D "$name" "$PKG/usr/bin/$name"
install -Dm644 completions/chezmoi-completion.bash "$PKG/usr/share/bash-completion/completions/chezmoi"
install -Dm644 completions/chezmoi.fish "$PKG/usr/share/fish/vendor_completions.d/chezmoi.fish"
install -Dm644 completions/chezmoi.zsh "$PKG/usr/share/zsh/site-functions/_chezmoi"
install -Dm644 LICENSE "$PKG/usr/share/licenses/$name/LICENSE"
}

5
freecad/.checksums Normal file
View File

@ -0,0 +1,5 @@
bd7e9029b24d49ac0955797bcdbea1fd0826bdf9ab246135366dfc35b427004f103acccfc66d008e3ab3928f99e04200e335908a03166545554e2d3e969ae0f5 0.21.2.tar.gz
a1617514ec41fac9b6694ebc81c025cefdd0e35e05be09b0f860c1b6424007116aff153eac71bc16e4c53d9d510f07dda839addc5a90197933cf82eb986e0e6f 6043c904.patch
3f223c57db55b21c6fcbe63cef9b73fb17abd8d3bf8a5c5e08018f6e222e4e92bbf147efcfaa92b7867c9f30410aa941914d8425faf240f7d7f579b35f07b9f3 62c3836c.patch
29229fffd1a0491f420209ea9bc8d32117ae36be3c6aa123ccbd7c37c552d88357c65a2c96139e412a9fb91c8ef1cabcee80cc3b59def14e92188e808226564c freecad-vtk9.3.patch
e75d29f385050949690a052cf36755c5f25ebc650c3eb7fb4b18dd5f25e4cd6b70a626412afc08fe21c2665104d70242832d7643bfcfd6cc76ae517217fca471 pyside6.patch

83
freecad/62c3836c.patch Normal file
View File

@ -0,0 +1,83 @@
From 62c3836c97a56db24e3ef567a31eba2d0893b945 Mon Sep 17 00:00:00 2001
From: Ladislav Michl <ladis@linux-mips.org>
Date: Tue, 23 Jan 2024 12:46:32 +0100
Subject: [PATCH] Addon Manager: Qt6 fixes
---
src/Mod/AddonManager/addonmanager_utilities.py | 4 ++--
src/Mod/AddonManager/change_branch.py | 2 +-
src/Mod/AddonManager/package_details.py | 7 +++----
src/Mod/AddonManager/package_list.py | 7 +++----
4 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/Mod/AddonManager/addonmanager_utilities.py b/src/Mod/AddonManager/addonmanager_utilities.py
index 9ceabc2e9add..183a2047b086 100644
--- a/src/Mod/AddonManager/addonmanager_utilities.py
+++ b/src/Mod/AddonManager/addonmanager_utilities.py
@@ -36,7 +36,7 @@
from urllib.parse import urlparse
try:
- from PySide import QtCore, QtWidgets
+ from PySide import QtCore, QtGui, QtWidgets
except ImportError:
QtCore = None
QtWidgets = None
@@ -245,7 +245,7 @@ def get_readme_html_url(repo):
def is_darkmode() -> bool:
"""Heuristics to determine if we are in a darkmode stylesheet"""
pl = fci.FreeCADGui.getMainWindow().palette()
- return pl.color(pl.Background).lightness() < 128
+ return pl.color(QtGui.QPalette.Window).lightness() < 128
def warning_color_string() -> str:
diff --git a/src/Mod/AddonManager/change_branch.py b/src/Mod/AddonManager/change_branch.py
index 332795a22afc..ebe1819bc755 100644
--- a/src/Mod/AddonManager/change_branch.py
+++ b/src/Mod/AddonManager/change_branch.py
@@ -216,7 +216,7 @@ def data(self, index: QtCore.QModelIndex, role: int = QtCore.Qt.DisplayRole):
dd = self.display_data[row]
if column == 3 or column == 4:
if dd[column] is not None:
- qdate = QtCore.QDateTime.fromTime_t(dd[column])
+ qdate = QtCore.QDateTime.fromSecsSinceEpoch(dd[column])
return QtCore.QLocale().toString(qdate, QtCore.QLocale.ShortFormat)
elif column < len(dd):
return dd[column]
diff --git a/src/Mod/AddonManager/package_details.py b/src/Mod/AddonManager/package_details.py
index 93dfb8bee962..8310b5e90343 100644
--- a/src/Mod/AddonManager/package_details.py
+++ b/src/Mod/AddonManager/package_details.py
@@ -133,10 +133,9 @@ def display_repo_status(self, status):
date = ""
installed_version_string = "<h3>"
if repo.updated_timestamp:
- date = (
- QtCore.QDateTime.fromTime_t(repo.updated_timestamp)
- .date()
- .toString(QtCore.Qt.SystemLocaleShortDate)
+ date = QtCore.QLocale().toString(
+ QtCore.QDateTime.fromSecsSinceEpoch(int(round(repo.updated_timestamp, 0))),
+ QtCore.QLocale.ShortFormat,
)
if version and date:
installed_version_string += (
diff --git a/src/Mod/AddonManager/package_list.py b/src/Mod/AddonManager/package_list.py
index a9dd3dc59856..d26b4f5489c3 100644
--- a/src/Mod/AddonManager/package_list.py
+++ b/src/Mod/AddonManager/package_list.py
@@ -465,10 +465,9 @@ def get_expanded_update_string(repo: Addon) -> str:
installed_date_string = (
"<br/>" + translate("AddonsInstaller", "Installed on") + ": "
)
- installed_date_string += (
- QtCore.QDateTime.fromTime_t(repo.updated_timestamp)
- .date()
- .toString(QtCore.Qt.SystemLocaleShortDate)
+ installed_date_string += QtCore.QLocale().toString(
+ QtCore.QDateTime.fromSecsSinceEpoch(int(round(repo.updated_timestamp, 0))),
+ QtCore.QLocale.ShortFormat,
)
available_version_string = ""

View File

@ -0,0 +1,14 @@
diff --git a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
index 7e3de0070a..dc5249158d 100644
--- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
@@ -1026,7 +1026,8 @@ void SMDS_UnstructuredGrid::BuildLinks()
GetLinks()->Allocate(this->GetNumberOfPoints());
GetLinks()->Register(this);
//FIXME: vtk9
- GetLinks()->BuildLinks(this);
+ GetLinks()->SetDataSet(this);
+ GetLinks()->BuildLinks();
GetLinks()->Delete();
#else
this->Links = SMDS_CellLinks::New();

134
freecad/pyside6.patch Normal file
View File

@ -0,0 +1,134 @@
diff --git a/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake b/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake
index 0569c1fde9..f5e3d0931f 100644
--- a/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake
+++ b/cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake
@@ -165,6 +165,8 @@ macro(SetupShibokenAndPyside)
message(STATUS "PySide ${PySide_VERSION} Python module found at ${PRINT_OUTPUT}.\n")
endif()
+ set_target_properties(Shiboken6::libshiboken PROPERTIES INTERFACE_COMPILE_DEFINITIONS "")
+
endmacro(SetupShibokenAndPyside)
# Locate the include directory for a pip-installed package -- uses pip show to find the base pip
diff --git a/src/Mod/AddonManager/package_details.py b/src/Mod/AddonManager/package_details.py
index c9d1ae311a..9c0e040ea5 100644
--- a/src/Mod/AddonManager/package_details.py
+++ b/src/Mod/AddonManager/package_details.py
@@ -26,7 +26,7 @@
import os
from typing import Optional
-from PySide import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
import addonmanager_freecad_interface as fci
@@ -51,14 +51,14 @@ translate = fci.translate
show_javascript_console_output = False
try:
- from PySide import QtWebEngineWidgets
+ from PySide6 import QtWebEngineCore, QtWebEngineWidgets
HAS_QTWEBENGINE = True
except ImportError:
fci.Console.PrintWarning(
translate(
"AddonsInstaller",
- "Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only",
+ "Addon Manager Warning: Could not import QtWebEngineCore -- README data will display as text-only",
)
+ "\n"
)
@@ -715,14 +714,14 @@ class PackageDetails(QtWidgets.QWidget):
if HAS_QTWEBENGINE:
- class RestrictedWebPage(QtWebEngineWidgets.QWebEnginePage):
+ class RestrictedWebPage(QtWebEngineCore.QWebEnginePage):
"""A class that follows links to FreeCAD wiki pages, but opens all other
clicked links in the system web browser"""
def __init__(self, parent):
super().__init__(parent)
self.settings().setAttribute(
- QtWebEngineWidgets.QWebEngineSettings.ErrorPageEnabled, False
+ QtWebEngineCore.QWebEngineSettings.ErrorPageEnabled, False
)
self.stored_url = None
@@ -731,7 +730,7 @@ if HAS_QTWEBENGINE:
navigation requests to the FreeCAD Wiki (for translation purposes) --
anything else will open in a new window.
"""
- if _type == QtWebEngineWidgets.QWebEnginePage.NavigationTypeLinkClicked:
+ if _type == QtWebEngineCore.QWebEnginePage.NavigationTypeLinkClicked:
# See if the link is to a FreeCAD Wiki page -- if so, follow it,
# otherwise ask the OS to open it
if (
@@ -754,11 +753,11 @@ if HAS_QTWEBENGINE:
global show_javascript_console_output
if show_javascript_console_output:
tag = translate("AddonsInstaller", "Page JavaScript reported")
- if level == QtWebEngineWidgets.QWebEnginePage.InfoMessageLevel:
+ if level == QtWebEngineCore.QWebEnginePage.InfoMessageLevel:
fci.Console.PrintMessage(f"{tag} {lineNumber}: {message}\n")
- elif level == QtWebEngineWidgets.QWebEnginePage.WarningMessageLevel:
+ elif level == QtWebEngineCore.QWebEnginePage.WarningMessageLevel:
fci.Console.PrintWarning(f"{tag} {lineNumber}: {message}\n")
- elif level == QtWebEngineWidgets.QWebEnginePage.ErrorMessageLevel:
+ elif level == QtWebEngineCore.QWebEnginePage.ErrorMessageLevel:
fci.Console.PrintError(f"{tag} {lineNumber}: {message}\n")
def _reload_stored_url(self):
diff --git a/src/Mod/AddonManager/AddonManager.py b/src/Mod/AddonManager/AddonManager.py
index cb8bb63d8a..7445173537 100644
--- a/src/Mod/AddonManager/AddonManager.py
+++ b/src/Mod/AddonManager/AddonManager.py
@@ -427,15 +427,15 @@ class CommandAddonManager:
"You must restart FreeCAD for changes to take effect.",
)
)
- m.setIcon(m.Warning)
- m.setStandardButtons(m.Ok | m.Cancel)
- m.setDefaultButton(m.Cancel)
+ m.setIcon(m.Icon.Warning)
+ m.setStandardButtons(m.StandardButton.Ok | m.StandardButton.Cancel)
+ m.setDefaultButton(m.StandardButton.Cancel)
okBtn = m.button(QtWidgets.QMessageBox.StandardButton.Ok)
cancelBtn = m.button(QtWidgets.QMessageBox.StandardButton.Cancel)
okBtn.setText(translate("AddonsInstaller", "Restart now"))
cancelBtn.setText(translate("AddonsInstaller", "Restart later"))
ret = m.exec_()
- if ret == m.Ok:
+ if ret == m.StandardButton.Ok:
# restart FreeCAD after a delay to give time to this dialog to close
QtCore.QTimer.singleShot(1000, utils.restart_freecad)
diff --git a/src/Mod/Arch/importIFClegacy.py b/src/Mod/Arch/importIFClegacy.py
index 8935233f09..20c395ed9d 100644
--- a/src/Mod/Arch/importIFClegacy.py
+++ b/src/Mod/Arch/importIFClegacy.py
@@ -1800,7 +1800,7 @@ def explorer(filename,schema="IFC2X3_TC1.exp"):
tree.headerItem().setText(1, "")
tree.headerItem().setText(2, "Item and Properties")
bold = QtGui.QFont()
- bold.setWeight(75)
+ bold.setWeight(QtGui.QFont.Weight(75))
bold.setBold(True)
#print(ifc.Entities)
diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py
index b19101e9ca..b44425e012 100644
--- a/src/Mod/Draft/DraftGui.py
+++ b/src/Mod/Draft/DraftGui.py
@@ -406,7 +406,7 @@ class DraftToolBar:
self.promptlabel = self._label("promptlabel", self.layout, hide=task)
self.cmdlabel = self._label("cmdlabel", self.layout, hide=task)
boldtxt = QtGui.QFont()
- boldtxt.setWeight(75)
+ boldtxt.setWeight(QtGui.QFont.Weight(75))
boldtxt.setBold(True)
self.cmdlabel.setFont(boldtxt)

64
freecad/spkgbuild Normal file
View File

@ -0,0 +1,64 @@
# description : Feature based parametric 3D CAD modeler
# homepage : https://freecadweb.org/
# depends : cmake ninja boost-libs coin fmt glew jsoncpp libspnav med-openmpi netcdf opencascade openmpi pugixml pyside6 python-gitpython
# depends : python-markdown python-matplotlib python-pip python-pivy python-ply python-yaml qt6-svg qt6-tools qt6-webengine
# depends : xerces-c verdict
name=freecad
version=0.21.2
release=1
noextract=""
backup=""
source="https://github.com/FreeCAD/FreeCAD/archive/refs/tags/0.21.2.tar.gz
freecad-vtk9.3.patch
62c3836c.patch
pyside6.patch
https://github.com/FreeCAD/FreeCAD/commit/6043c904.patch"
build() {
patch -d FreeCAD-$version -Np1 -i $SRC/freecad-vtk9.3.patch
patch -d FreeCAD-$version -Np1 -i ../62c3836c.patch # Fix Qt6 issues in addons manager
patch -d FreeCAD-$version -Np1 -i ../pyside6.patch
patch -d FreeCAD-$version -Np1 -i ../6043c904.patch # Fix build with Python 3.12
# cd FreeCAD-$version
sed -e 's|Shiboken::Module::getTypes(requiredModule)|reinterpret_cast<PyTypeObject **>(Shiboken::Module::getTypes(requiredModule))|' \
-i FreeCAD-$version/src/Gui/PythonWrapper.cpp # Fix build with PySide 6.7
cmake \
-B build \
-DBUILD_ENABLE_CXX_STD=C++17 \
-DBUILD_FLAT_MESH=ON \
-DFREECAD_QT_VERSION=6 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects -fPIC -w" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -ffat-lto-objects -fPIC -w" \
-DCMAKE_INSTALL_BINDIR=/usr/lib/freecad/bin \
-DCMAKE_INSTALL_DATADIR=/usr/share/freecad \
-DCMAKE_INSTALL_DATAROOTDIR=/usr/share \
-DCMAKE_INSTALL_DOCDIR=/usr/share/freecad/doc \
-DCMAKE_INSTALL_LIBDIR=/usr/lib/freecad/lib \
-DCMAKE_INSTALL_PREFIX=/usr/lib/freecad \
-DFREECAD_USE_EXTERNAL_PIVY=ON \
-DFREECAD_USE_OCC_VARIANT='Official Version' \
-DFREECAD_USE_QT_FILEDIALOG=ON \
-DPYTHON_EXECUTABLE=/usr/bin/python \
-D INSTALL_TO_SITEPACKAGES=ON \
-G Ninja \
-S FreeCAD-$version \
-W no-dev
ninja -C build
DESTDIR="$PKG" ninja -C build install
install -Dm755 $name/src/Tools/{$name-thumbnailer,fcinfo} -t "$PKG/usr/bin/"
# symlinks
install -d "$PKG/usr/bin"
ln -sf /usr/lib/freecad/bin/FreeCAD "$PKG/usr/bin/freecad"
ln -sf /usr/lib/freecad/bin/FreeCAD "$PKG/usr/bin/FreeCAD"
ln -sf /usr/lib/freecad/bin/FreeCADCmd "$PKG/usr/bin/freecadcmd"
ln -sf /usr/lib/freecad/bin/FreeCADCmd "$PKG/usr/bin/FreeCADCmd"
}

View File

@ -0,0 +1 @@
001c6c64e9ca52b4a7453837448803c797cc746fac04ad15613aa20a6bb33c44b441c343dfa56f23fa195fc7216a6d6c00a88f13e39481a12654a3a1a6dbdd98 libinput-gestures-2.76.tar.gz

View File

@ -0,0 +1,19 @@
libinput-gestures-2.76-1
drwxr-xr-x root/root etc/
-rw-r--r-- root/root etc/libinput-gestures.conf
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/libinput-gestures
-rwxr-xr-x root/root usr/bin/libinput-gestures-setup
drwxr-xr-x root/root usr/lib/
drwxr-xr-x root/root usr/lib/systemd/
drwxr-xr-x root/root usr/lib/systemd/user/
-rw-r--r-- root/root usr/lib/systemd/user/libinput-gestures.service
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/applications/
-rw-r--r-- root/root usr/share/applications/libinput-gestures.desktop
drwxr-xr-x root/root usr/share/icons/
drwxr-xr-x root/root usr/share/icons/hicolor/
drwxr-xr-x root/root usr/share/icons/hicolor/128x128/
drwxr-xr-x root/root usr/share/icons/hicolor/128x128/apps/
-rw-r--r-- root/root usr/share/icons/hicolor/128x128/apps/libinput-gestures.svg

View File

@ -0,0 +1,14 @@
# description : Actions gestures on your touchpad using libinput
# homepage : https://github.com/bulletmark/libinput-gestures
# depends : python>=3.5 libinput hicolor-icon-theme
name=libinput-gestures
version=2.76
release=1
source="$name-$version.tar.gz::https://github.com/bulletmark/$name/archive/$version.tar.gz"
build() {
cd $name-$version
make DESTDIR="$PKG" install
}

17
opencascade/spkgbuild Normal file
View File

@ -0,0 +1,17 @@
# description :
# homepage :
# depends :
name=opencascade
version=
release=1
noextract=""
backup=""
source=""
build() {
cd $name-$version
./configure --prefix=/usr
make
make DESTDIR=$PKG install
}