forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-gfx/cura: new version 0.15.04.4 (legacy)
based on the original ebuild by _AxS_ EROOT are replaced with EPREFIX by the committer Package-Manager: portage-2.2.28
- Loading branch information
Showing
3 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST cura-0.15.04.4.tar.gz 7265105 SHA256 9bce9cec7578792f7008a557930d16216ef97041a62071bb4e2b2a89638f1f54 SHA512 6d386c23731e2e02bc3b15d02aed1810622a57af2727325db29feb48eba8da0758925f3bc11fc6433a4b376706f66e6b00bfb3af2cac24cb184899848e11b1bd WHIRLPOOL cafd4bc3589214c3fc792c770eaa3f3590018f83ae82444c4f495245ab900748edabccb5a6518d9bd5b26295d7a953e3e60295b3baa90baf6abfe8a75012fbf2 | ||
DIST cura-2.1.0_beta.tar.gz 19784684 SHA256 b81f09307968475e33b03199aaf968e25d2b37fc7db9777b95c03053b1836f83 SHA512 9e4b4f0a93098f9cadf7d8969725e17ac549b6caced602a3d088e65068ab7fcda5a18e7e6f293434e7042360f0e37d87074d82d8884370bfbfc10e07a4212ce2 WHIRLPOOL 19ae138fa4b7c840ffc2d61779a08d48624bc6078fa83a6bec280d1a725e93bad6682d9f21a0cbe3ee4a4343a47a7e6f58d3fd559804f278241c7a5bb7d3cf89 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=6 | ||
|
||
PYTHON_COMPAT=( python2_7 ) | ||
inherit eutils fdo-mime gnome2-utils python-single-r1 | ||
|
||
MY_PV=${PV#0.} | ||
MY_PN=Cura | ||
SRC_URI="https://github.com/daid/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" | ||
KEYWORDS="~amd64 ~x86" | ||
DESCRIPTION="A mesh slicer written in python to produce gcode for 3D printers" | ||
HOMEPAGE="https://github.com/daid/Cura" | ||
LICENSE="AGPL-3" | ||
SLOT="0" | ||
IUSE="" | ||
|
||
RDEPEND="${PYTHON_DEPS} | ||
dev-python/wxpython:3.0[opengl,${PYTHON_USEDEP}] | ||
>=dev-python/numpy-1.6.2[${PYTHON_USEDEP}] | ||
>=dev-python/pyopengl-3.0.2[${PYTHON_USEDEP}] | ||
>=dev-python/pyserial-2.6[${PYTHON_USEDEP}] | ||
>=media-gfx/curaengine-${PV} | ||
" | ||
DEPEND="${RDEPEND} | ||
>=dev-python/setuptools-0.6.34[${PYTHON_USEDEP}]" | ||
|
||
REQUIRED_USE="${PYTHON_REQ_USE}" | ||
PATCHES=( "${FILESDIR}/${P}-nopower.patch" ) | ||
S="${WORKDIR}/${MY_PN}-${MY_PV}" | ||
|
||
src_prepare() { | ||
cat > "${T}"/cura <<- CURAEOF || die | ||
#!/bin/sh | ||
PYTHONPATH="\$PYTHONPATH:${EPREFIX}/usr/share/cura/" "${PYTHON}" "${EPREFIX}/usr/share/cura/cura.py" "\$@" | ||
CURAEOF | ||
|
||
eapply "${PATCHES[@]}" | ||
eapply_user | ||
} | ||
|
||
src_install() { | ||
insinto /usr/share/cura | ||
doins -r Cura resources plugins scripts/linux/cura.py | ||
newicon "${S}/resources/images/c.png" "cura.png" | ||
echo ${PV} > "${ED}"usr/share/cura/version || die | ||
dobin "${T}"/cura | ||
|
||
python_optimize $(find "${ED}" -name '*.py' -exec dirname \{\} + | sort -u) | ||
} | ||
|
||
pkg_preinst() { | ||
gnome2_icon_savelist | ||
|
||
make_desktop_entry cura \ | ||
Cura \ | ||
"${EPREFIX}/usr/share/pixmaps/cura.png" \ | ||
"Graphics;3DGraphics;Engineering;Development" | ||
} | ||
|
||
pkg_postinst() { | ||
fdo-mime_desktop_database_update | ||
fdo-mime_mime_database_update | ||
gnome2_icon_cache_update | ||
} | ||
|
||
pkg_postrm() { | ||
fdo-mime_desktop_database_update | ||
fdo-mime_mime_database_update | ||
gnome2_icon_cache_update | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
diff -Naur Cura-14.09/Cura/gui/printWindow.py Cura-14.09.new/Cura/gui/printWindow.py | ||
--- Cura-14.09/Cura/gui/printWindow.py 2014-09-19 05:44:21.000000000 -0400 | ||
+++ Cura-14.09.new/Cura/gui/printWindow.py 2014-12-08 16:36:18.410389600 -0500 | ||
@@ -1,7 +1,6 @@ | ||
__copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License" | ||
|
||
import wx | ||
-import power | ||
import time | ||
import sys | ||
import os | ||
@@ -319,18 +318,6 @@ | ||
self.sizer = wx.GridBagSizer(2, 2) | ||
self.panel.SetSizer(self.sizer) | ||
|
||
- self.powerWarningText = wx.StaticText(parent=self.panel, | ||
- id=-1, | ||
- label=_("Your computer is running on battery power.\nConnect your computer to AC power or your print might not finish."), | ||
- style=wx.ALIGN_CENTER) | ||
- self.powerWarningText.SetBackgroundColour('red') | ||
- self.powerWarningText.SetForegroundColour('white') | ||
- self.powerManagement = power.PowerManagement() | ||
- self.powerWarningTimer = wx.Timer(self) | ||
- self.Bind(wx.EVT_TIMER, self.OnPowerWarningChange, self.powerWarningTimer) | ||
- self.OnPowerWarningChange(None) | ||
- self.powerWarningTimer.Start(10000) | ||
- | ||
self.statsText = wx.StaticText(self.panel, -1, _("InfoLine from printer connection\nInfoLine from dialog\nExtra line\nMore lines for layout\nMore lines for layout\nMore lines for layout")) | ||
|
||
self.connectButton = wx.Button(self.panel, -1, _("Connect")) | ||
@@ -341,7 +328,6 @@ | ||
self.errorLogButton = wx.Button(self.panel, -1, _("Error log")) | ||
self.progress = wx.Gauge(self.panel, -1, range=1000) | ||
|
||
- self.sizer.Add(self.powerWarningText, pos=(0, 0), span=(1, 5), flag=wx.EXPAND|wx.BOTTOM, border=5) | ||
self.sizer.Add(self.statsText, pos=(1, 0), span=(1, 5), flag=wx.LEFT, border=5) | ||
self.sizer.Add(self.connectButton, pos=(2, 0)) | ||
#self.sizer.Add(self.loadButton, pos=(2,1)) | ||
@@ -373,21 +359,6 @@ | ||
self._printerConnection.openActiveConnection() | ||
preventComputerFromSleeping(True) | ||
|
||
- def OnPowerWarningChange(self, e): | ||
- type = self.powerManagement.get_providing_power_source_type() | ||
- if type == power.POWER_TYPE_AC and self.powerWarningText.IsShown(): | ||
- self.powerWarningText.Hide() | ||
- self.panel.Layout() | ||
- self.Layout() | ||
- self.Fit() | ||
- self.Refresh() | ||
- elif type != power.POWER_TYPE_AC and not self.powerWarningText.IsShown(): | ||
- self.powerWarningText.Show() | ||
- self.panel.Layout() | ||
- self.Layout() | ||
- self.Fit() | ||
- self.Refresh() | ||
- | ||
def OnClose(self, e): | ||
if self._printerConnection.hasActiveConnection(): | ||
if self._printerConnection.isPrinting(): | ||
diff -Naur Cura-14.09/scripts/linux/cura.py Cura-14.09.new/scripts/linux/cura.py | ||
--- Cura-14.09/scripts/linux/cura.py 2014-09-19 05:44:21.000000000 -0400 | ||
+++ Cura-14.09.new/scripts/linux/cura.py 2014-12-08 16:37:44.840391177 -0500 | ||
@@ -1,4 +1,4 @@ | ||
-#!/usr/bin/python | ||
+#!/usr/bin/python2 | ||
|
||
import os, sys | ||
|
||
@@ -9,7 +9,6 @@ | ||
import wx | ||
import serial | ||
import numpy | ||
- import power | ||
except ImportError as e: | ||
if e.message[0:16] == 'No module named ': | ||
module = e.message[16:] | ||
@@ -20,12 +19,6 @@ | ||
module = 'pyserial' | ||
print 'Requires ' + module | ||
|
||
- if module == 'power': | ||
- print "Install from: https://github.com/GreatFruitOmsk/Power" | ||
- else: | ||
- print "Try sudo easy_install " + module | ||
- print e.message | ||
- | ||
exit(1) | ||
|
||
|