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: initial ebuild, 2.1.0_beta
Package-Manager: portage-2.2.28 RepoMan-Options: --ignore-arches Closes: gentoo#1298 Signed-off-by: Ian Delaney <[email protected]>
- Loading branch information
Marshall Brewer (Gentoo Key)
authored and
Ian Delaney
committed
Apr 28, 2016
1 parent
0f5896d
commit 2b1dfc2
Showing
4 changed files
with
130 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
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,65 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI="6" | ||
|
||
PYTHON_COMPAT=( python3_4 python3_5 ) | ||
inherit cmake-utils fdo-mime gnome2-utils python-single-r1 | ||
|
||
MY_PN=Cura | ||
MY_PV=${PV/_beta} | ||
|
||
DESCRIPTION="A 3D model slicing application for 3D printing" | ||
HOMEPAGE="https://github.com/Ultimaker/Cura" | ||
SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" | ||
KEYWORDS="~amd64 ~x86" | ||
|
||
LICENSE="AGPL-3" | ||
SLOT="0" | ||
IUSE="+usb" | ||
|
||
RDEPEND="${PYTHON_DEPS} | ||
dev-libs/libarcus:=[${PYTHON_USEDEP}] | ||
dev-python/uranium[${PYTHON_USEDEP}] | ||
usb? ( dev-python/pyserial[${PYTHON_USEDEP}] ) | ||
~media-gfx/curaengine-${PV}" | ||
DEPEND="${RDEPEND} | ||
sys-devel/gettext" | ||
|
||
S="${WORKDIR}/${MY_PN}-${MY_PV}" | ||
PATCHES=( "${FILESDIR}/${P}-fix-install-paths.patch" ) | ||
DOCS=( README.md ) | ||
REQUIRED_USE="${PYTHON_REQUIRED_USE}" | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
-DPYTHON_SITE_PACKAGES_DIR="$(python_get_sitedir)" ) | ||
cmake-utils_src_configure | ||
} | ||
|
||
src_compile() { | ||
cmake-utils_src_compile | ||
} | ||
|
||
src_install() { | ||
cmake-utils_src_install | ||
doicon icons/*.png | ||
python_optimize "${D}${get_libdir}" | ||
} | ||
|
||
pkg_preinst() { | ||
gnome2_icon_savelist | ||
} | ||
|
||
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 | ||
} |
38 changes: 38 additions & 0 deletions
38
media-gfx/cura/files/cura-2.1.0_beta-fix-install-paths.patch
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,38 @@ | ||
diff -Naur a/CMakeLists.txt b/CMakeLists.txt | ||
--- a/CMakeLists.txt 2016-04-12 17:39:03.000000000 +0200 | ||
+++ b/CMakeLists.txt 2016-04-16 13:30:27.339900905 +0200 | ||
@@ -55,20 +55,31 @@ | ||
|
||
find_package(PythonInterp 3.4.0 REQUIRED) | ||
|
||
+if(NOT PYTHON_SITE_PACKAGES_DIR) | ||
+ if(APPLE OR WIN32) | ||
+ set(PYTHON_SITE_PACKAGES_DIR lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE | ||
+STRING "Directory to install Python bindings to") | ||
+ else() | ||
+ set(PYTHON_SITE_PACKAGES_DIR lib/python${PYTHON_VERSION_MAJOR}/dist-packages CACHE | ||
+STRING "Directory to install Python bindings to") | ||
+ endif() | ||
+endif() | ||
+ | ||
install(DIRECTORY resources | ||
DESTINATION ${CMAKE_INSTALL_DATADIR}/cura) | ||
install(DIRECTORY plugins | ||
- DESTINATION lib/cura) | ||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cura) | ||
+ | ||
if(NOT APPLE AND NOT WIN32) | ||
install(FILES cura_app.py | ||
DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE | ||
RENAME cura) | ||
install(DIRECTORY cura | ||
- DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages | ||
+ DESTINATION ${PYTHON_SITE_PACKAGES_DIR} | ||
FILES_MATCHING PATTERN *.py) | ||
install(FILES ${CMAKE_BINARY_DIR}/CuraVersion.py | ||
- DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages/cura) | ||
+ DESTINATION ${PYTHON_SITE_PACKAGES_DIR}/cura) | ||
install(FILES cura.desktop | ||
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) | ||
install(FILES cura.sharedmimeinfo |
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,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
<name>Matthew Brewer</name> | ||
</maintainer> | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
<name>Gentoo 3D Printer Project</name> | ||
</maintainer> | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
<name>Gentoo Proxy Maintainers Project</name> | ||
</maintainer> | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
<name>Gentoo Python Project</name> | ||
</maintainer> | ||
<use> | ||
<flag name="usb">Access 3D printers via USB</flag> | ||
</use> | ||
<upstream> | ||
<remote-id type="github">Ultimaker/Cura</remote-id> | ||
</upstream> | ||
</pkgmetadata> |