summaryrefslogtreecommitdiff
path: root/media-gfx
diff options
context:
space:
mode:
authorMatthew Brewer <tomboy64@sina.cn>2016-04-01 20:38:26 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2016-04-03 23:23:43 +0200
commit0d28159a18a25c100b207b86056c604a75675bb2 (patch)
treee4e66b0f649098add2d43ff0ad89cbebd7fa4562 /media-gfx
parent0ce6a1fe206c370b256d55b217a2c64783ecf9e5 (diff)
downloadgentoo-0d28159a18a25c100b207b86056c604a75675bb2.tar.gz
gentoo-0d28159a18a25c100b207b86056c604a75675bb2.tar.xz
media-gfx/slic3r: Add git version 9999
Package-Manager: portage-2.2.28 RepoMan-Options: --ignore-arches
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/slic3r/files/slic3r-9999-adjust_var_path.patch11
-rw-r--r--media-gfx/slic3r/slic3r-9999.ebuild111
2 files changed, 122 insertions, 0 deletions
diff --git a/media-gfx/slic3r/files/slic3r-9999-adjust_var_path.patch b/media-gfx/slic3r/files/slic3r-9999-adjust_var_path.patch
new file mode 100644
index 00000000000..9dc93a52dde
--- /dev/null
+++ b/media-gfx/slic3r/files/slic3r-9999-adjust_var_path.patch
@@ -0,0 +1,11 @@
+--- a/lib/Slic3r.pm 2015-06-17 04:38:28.000000000 -0400
++++ b/lib/Slic3r.pm 2015-06-19 11:56:07.005873299 -0400
+@@ -30,7 +30,7 @@
+ if $^V == v5.16;
+
+ use FindBin;
+-our $var = decode_path($FindBin::Bin) . "/var";
++our $var = decode_path($FindBin::RealBin) . "/var";
+
+ use Moo 1.003001;
+
diff --git a/media-gfx/slic3r/slic3r-9999.ebuild b/media-gfx/slic3r/slic3r-9999.ebuild
new file mode 100644
index 00000000000..98aa4f9df45
--- /dev/null
+++ b/media-gfx/slic3r/slic3r-9999.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils git-r3 perl-module
+
+DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
+HOMEPAGE="http://slic3r.org"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/alexrj/Slic3r.git"
+
+LICENSE="AGPL-3 CC-BY-3.0"
+SLOT="0"
+KEYWORDS=""
+IUSE="+gui test"
+
+# check Build.PL for dependencies
+RDEPEND="!=dev-lang/perl-5.16*
+ >=dev-libs/boost-1.55[threads]
+ dev-perl/Class-XSAccessor
+ dev-perl/Devel-Size
+ >=dev-perl/Encode-Locale-1.50.0
+ dev-perl/IO-stringy
+ >=dev-perl/Math-PlanePath-53.0.0
+ >=dev-perl/Moo-1.3.1
+ dev-perl/XML-SAX-ExpatXS
+ virtual/perl-Carp
+ virtual/perl-Encode
+ virtual/perl-File-Spec
+ virtual/perl-Getopt-Long
+ virtual/perl-parent
+ virtual/perl-Scalar-List-Utils
+ virtual/perl-Test-Simple
+ virtual/perl-Thread-Semaphore
+ >=virtual/perl-threads-1.960.0
+ virtual/perl-Time-HiRes
+ virtual/perl-Unicode-Normalize
+ virtual/perl-XSLoader
+ gui? ( dev-perl/Class-Accessor
+ dev-perl/Growl-GNTP
+ dev-perl/libwww-perl
+ dev-perl/Module-Pluggable
+ dev-perl/Net-Bonjour
+ dev-perl/Net-DBus
+ dev-perl/OpenGL
+ >=dev-perl/Wx-0.991.800
+ dev-perl/Wx-GLCanvas
+ >=media-libs/freeglut-3
+ virtual/perl-Math-Complex
+ >=virtual/perl-Socket-2.16.0
+ x11-libs/libXmu
+ )"
+DEPEND="${RDEPEND}
+ dev-perl/Devel-CheckLib
+ >=dev-perl/ExtUtils-CppGuess-0.70.0
+ >=dev-perl/ExtUtils-Typemaps-Default-1.50.0
+ >=dev-perl/ExtUtils-XSpp-0.170.0
+ >=dev-perl/Module-Build-0.380.0
+ >=dev-perl/Module-Build-WithXSpp-0.140.0
+ >=virtual/perl-ExtUtils-MakeMaker-6.800.0
+ >=virtual/perl-ExtUtils-ParseXS-3.220.0
+ test? ( virtual/perl-Test-Harness
+ virtual/perl-Test-Simple )"
+
+S="${WORKDIR}/slic3r-${PV}/xs"
+
+src_unpack() {
+ git-r3_src_unpack
+}
+
+src_prepare() {
+ pushd "${WORKDIR}/slic3r-${PV}" || die
+ eapply "${FILESDIR}/${P}-adjust_var_path.patch"
+ eapply_user
+ popd || die
+}
+
+src_configure() {
+ SLIC3R_NO_AUTO=1 perl-module_src_configure
+}
+
+src_test() {
+ perl-module_src_test
+ pushd .. || die
+ prove -Ixs/blib/arch -Ixs/blib/lib/ t/ || die "Tests failed"
+ popd || die
+}
+
+src_install() {
+ perl-module_src_install
+
+ pushd .. || die
+ insinto "${VENDOR_LIB}"
+ doins -r lib/Slic3r.pm lib/Slic3r
+
+ insinto "${VENDOR_LIB}"/Slic3r
+ doins -r var
+
+ exeinto "${VENDOR_LIB}"/Slic3r
+ doexe slic3r.pl
+
+ dosym "${VENDOR_LIB}"/Slic3r/slic3r.pl /usr/bin/slic3r.pl
+
+ make_desktop_entry slic3r.pl \
+ Slic3r \
+ "${VENDOR_LIB}/Slic3r/var/Slic3r_128px.png" \
+ "Graphics;3DGraphics;Engineering;Development"
+ popd || die
+}