summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Brewer (Gentoo Key) <tomboy64@sina.cn>2016-04-16 00:14:07 +0200
committerIan Delaney <idella4@gentoo.org>2016-04-28 22:12:20 +0800
commit2b1dfc2fc7c4c6dbe9d2f48e831918d2cb50c629 (patch)
tree55b8a02b7d227e7415a3faafbf3d4a1fa9d67898 /media-gfx/cura
parentmedia-gfx/curaengine: initial ebuild, version 2.1.0_beta (diff)
downloadgentoo-2b1dfc2fc7c4c6dbe9d2f48e831918d2cb50c629.tar.gz
gentoo-2b1dfc2fc7c4c6dbe9d2f48e831918d2cb50c629.tar.bz2
gentoo-2b1dfc2fc7c4c6dbe9d2f48e831918d2cb50c629.zip
media-gfx/cura: initial ebuild, 2.1.0_beta
Package-Manager: portage-2.2.28 RepoMan-Options: --ignore-arches Closes: https://github.com/gentoo/gentoo/pull/1298 Signed-off-by: Ian Delaney <idella4@gentoo.org>
Diffstat (limited to 'media-gfx/cura')
-rw-r--r--media-gfx/cura/Manifest1
-rw-r--r--media-gfx/cura/cura-2.1.0_beta.ebuild65
-rw-r--r--media-gfx/cura/files/cura-2.1.0_beta-fix-install-paths.patch38
-rw-r--r--media-gfx/cura/metadata.xml26
4 files changed, 130 insertions, 0 deletions
diff --git a/media-gfx/cura/Manifest b/media-gfx/cura/Manifest
new file mode 100644
index 000000000000..7541caa28d18
--- /dev/null
+++ b/media-gfx/cura/Manifest
@@ -0,0 +1 @@
+DIST cura-2.1.0_beta.tar.gz 19784684 SHA256 b81f09307968475e33b03199aaf968e25d2b37fc7db9777b95c03053b1836f83 SHA512 9e4b4f0a93098f9cadf7d8969725e17ac549b6caced602a3d088e65068ab7fcda5a18e7e6f293434e7042360f0e37d87074d82d8884370bfbfc10e07a4212ce2 WHIRLPOOL 19ae138fa4b7c840ffc2d61779a08d48624bc6078fa83a6bec280d1a725e93bad6682d9f21a0cbe3ee4a4343a47a7e6f58d3fd559804f278241c7a5bb7d3cf89
diff --git a/media-gfx/cura/cura-2.1.0_beta.ebuild b/media-gfx/cura/cura-2.1.0_beta.ebuild
new file mode 100644
index 000000000000..5b991fa9c5ed
--- /dev/null
+++ b/media-gfx/cura/cura-2.1.0_beta.ebuild
@@ -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
+}
diff --git a/media-gfx/cura/files/cura-2.1.0_beta-fix-install-paths.patch b/media-gfx/cura/files/cura-2.1.0_beta-fix-install-paths.patch
new file mode 100644
index 000000000000..ec07c0014cce
--- /dev/null
+++ b/media-gfx/cura/files/cura-2.1.0_beta-fix-install-paths.patch
@@ -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
diff --git a/media-gfx/cura/metadata.xml b/media-gfx/cura/metadata.xml
new file mode 100644
index 000000000000..aafd66fb97d0
--- /dev/null
+++ b/media-gfx/cura/metadata.xml
@@ -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>tomboy64@sina.cn</email>
+ <name>Matthew Brewer</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>3dprint@gentoo.org</email>
+ <name>Gentoo 3D Printer Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Gentoo Proxy Maintainers Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</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>