Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37901606
en ru br
ALT Linux repos
S:8.994-alt2.20220203

Group :: Engineering
RPM: flatcam

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: flatcam-alt.patch
Download


diff --git a/camlib.py b/camlib.py
index 434a5122..a608e070 100644
--- a/camlib.py
+++ b/camlib.py
@@ -40,8 +40,10 @@ from descartes.patch import PolygonPatch
 
 from collections import Iterable
 
-import rasterio
-from rasterio.features import shapes
+# Commented for ALT. Fix:
+# ImportError: /usr/lib64/libstdc++.so.6: cannot allocate memory in static TLS block
+#import rasterio
+#from rasterio.features import shapes
 import ezdxf
 
 from appCommon.Common import GracefulException as grace
@@ -53,9 +55,10 @@ from appCommon.Common import GracefulException as grace
 from appParsers.ParseSVG import *
 from appParsers.ParseDXF import *
 
-if platform.architecture()[0] == '64bit':
-    from ortools.constraint_solver import pywrapcp
-    from ortools.constraint_solver import routing_enums_pb2
+# Commented for ALT. Not worked import
+#if platform.architecture()[0] == '64bit':
+#    from ortools.constraint_solver import pywrapcp
+#    from ortools.constraint_solver import routing_enums_pb2
 
 import logging
 
diff --git a/Makefile b/Makefile
index 7bda1647..3a36e95c 100644
--- a/Makefile
+++ b/Makefile
@@ -7,11 +7,11 @@ install_dependencies:
 
 USER_ID = $(shell id -u)
 
-LOCAL_PATH = $(shell pwd)
+LOCAL_PATH = $(shell pwd)/*
 LOCAL_APPS_PATH = ~/.local/share/applications
 ASSEST_PATH = assets/linux
 
-INSTALL_PATH = /usr/share/flatcam-beta
+INSTALL_PATH = /usr/share/flatcam
 APPS_PATH = /usr/share/applications
 
 MIN_PY3_MINOR_VERSION := 5
@@ -23,20 +23,18 @@ ifneq ($(MIN_PY3_MINOR_VERSION), $(firstword $(sort $(PY3_MINOR_VERSION) $(MIN_P
 endif
 
 install:
-ifeq ($(USER_ID), 0)
 	@ echo "Installing it system-wide"
-	cp -rf $(LOCAL_PATH) $(INSTALL_PATH)
-	@ sed -i "s|python_script_path=.*|python_script_path=$(INSTALL_PATH)|g" $(INSTALL_PATH)/assets/linux/flatcam-beta
-	ln -sf $(INSTALL_PATH)/assets/linux/flatcam-beta /usr/local/bin
-	cp -f $(ASSEST_PATH)/flatcam-beta.desktop $(APPS_PATH)
-	@ sed -i "s|Exec=.*|Exec=$(INSTALL_PATH)/$(ASSEST_PATH)/flatcam-beta|g" $(APPS_PATH)/flatcam-beta.desktop
-	@ sed -i "s|Icon=.*|Icon=$(INSTALL_PATH)/$(ASSEST_PATH)/icon.png|g" $(APPS_PATH)/flatcam-beta.desktop
-else
-	@ echo "Installing locally for $(USER) only"
-	cp -f $(ASSEST_PATH)/flatcam-beta.desktop $(LOCAL_APPS_PATH)
-	@ sed -i "s|Exec=.*|Exec=$(LOCAL_PATH)/$(ASSEST_PATH)/flatcam-beta|g" $(LOCAL_APPS_PATH)/flatcam-beta.desktop
-	@ sed -i "s|Icon=.*|Icon=$(LOCAL_PATH)/$(ASSEST_PATH)/icon.png|g" $(LOCAL_APPS_PATH)/flatcam-beta.desktop
-endif
+	mkdir -p $(DESTDIR)$(INSTALL_PATH)
+	mkdir -p $(DESTDIR)$(APPS_PATH)
+	cp -rf $(LOCAL_PATH) $(DESTDIR)$(INSTALL_PATH)
+	@ sed -i "s|python_script_path=.*|python_script_path=$(INSTALL_PATH)|g" $(DESTDIR)$(INSTALL_PATH)/assets/linux/flatcam-beta.desktop
+	mkdir -p $(DESTDIR)/usr/bin
+	ln -sf $(INSTALL_PATH)/assets/linux/flatcam-beta $(DESTDIR)/usr/bin/flatcam
+	cp $(ASSEST_PATH)/flatcam-beta.desktop $(DESTDIR)$(APPS_PATH)/flatcam.desktop
+	rm $(DESTDIR)$(INSTALL_PATH)/setup_ubuntu.sh
+	rm -r $(DESTDIR)$(INSTALL_PATH)/tests/
+	@ sed -i "s|Exec=.*|Exec=/usr/bin/flatcam|g" $(DESTDIR)$(APPS_PATH)/flatcam.desktop
+	@ sed -i "s|Icon=.*|Icon=$(INSTALL_PATH)/$(ASSEST_PATH)/icon.png|g" $(DESTDIR)$(APPS_PATH)/flatcam.desktop
 
 remove:
 ifeq ($(USER_ID), 0)
diff --git a/assets/linux/flatcam-beta.desktop b/assets/linux/flatcam-beta.desktop
index 0b729b4f..c8b43126 100755
--- a/assets/linux/flatcam-beta.desktop
+++ b/assets/linux/flatcam-beta.desktop
@@ -5,3 +5,4 @@ Type=Application
 StartupNotify=true
 Icon=./assets/icon.png
 Comment=G-Code from GERBERS
+Categories=Graphics;3DGraphics;Engineering;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin