Initial commit (#890839)
This commit is contained in:
parent
53ebfe38d5
commit
7055433ef0
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/slic3r-0.9.8-7105243.tar.gz
|
15
slic3r-datadir.patch
Normal file
15
slic3r-datadir.patch
Normal file
@ -0,0 +1,15 @@
|
||||
Search for icons and such in /usr/share/slic3r.
|
||||
|
||||
diff -ru a/lib/Slic3r.pm c/lib/Slic3r.pm
|
||||
--- a/lib/Slic3r.pm 2013-01-17 15:50:45.000000000 +0100
|
||||
+++ c/lib/Slic3r.pm 2013-01-22 00:15:56.797243399 +0100
|
||||
@@ -24,8 +24,7 @@
|
||||
warn "Running Slic3r under Perl >= 5.16 is not supported nor recommended\n"
|
||||
if $^V >= v5.16;
|
||||
|
||||
-use FindBin;
|
||||
-our $var = "$FindBin::Bin/var";
|
||||
+our $var = "/usr/share/slic3r";
|
||||
|
||||
use Encode;
|
||||
use Encode::Locale;
|
35
slic3r-english-locale.patch
Normal file
35
slic3r-english-locale.patch
Normal file
@ -0,0 +1,35 @@
|
||||
Upstream constantly refuses to support Perl >= 5.16.
|
||||
They say it handles locales incorrectly, but it might be caused by bad code
|
||||
design. Running Slic3r with locales using other char than point as a decimal
|
||||
separator causes crashes. This patch removes the warning about unsupported
|
||||
Perl version (it is very annoying) and forces Slic3r to use English decimal
|
||||
separator by setting the LC_NUMERIC environment variable. Setting it in more
|
||||
Perl way doesn't work and is overwritten in some of imported modules.
|
||||
https://github.com/alexrj/Slic3r/issues/935
|
||||
https://github.com/alexrj/Slic3r/pull/936#issuecomment-12544383
|
||||
https://github.com/alexrj/Slic3r/issues/538#issuecomment-14560494
|
||||
|
||||
diff -ru a/lib/Slic3r.pm b/lib/Slic3r.pm
|
||||
--- a/lib/Slic3r.pm 2013-01-22 00:15:56.797243399 +0100
|
||||
+++ b/lib/Slic3r.pm 2013-01-22 00:29:55.519336602 +0100
|
||||
@@ -21,9 +21,6 @@
|
||||
$have_threads = $Config{useithreads} && eval "use threads; use Thread::Queue; 1";
|
||||
}
|
||||
|
||||
-warn "Running Slic3r under Perl >= 5.16 is not supported nor recommended\n"
|
||||
- if $^V >= v5.16;
|
||||
-
|
||||
our $var = "/usr/share/slic3r";
|
||||
|
||||
use Encode;
|
||||
diff -ru a/slic3r.pl b/slic3r.pl
|
||||
--- a/slic3r.pl 2013-01-17 15:50:45.000000000 +0100
|
||||
+++ b/slic3r.pl 2013-01-22 00:30:19.327252847 +0100
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
use Getopt::Long qw(:config no_auto_abbrev);
|
||||
use List::Util qw(first);
|
||||
+$ENV{LC_NUMERIC} = 'en_US.UTF-8';
|
||||
use Slic3r;
|
||||
$|++;
|
||||
|
8
slic3r.desktop
Normal file
8
slic3r.desktop
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
[Desktop Entry]
|
||||
Name=Slic3r
|
||||
Exec=slic3r
|
||||
Icon=/usr/share/pixmaps/slic3r.ico
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Graphics;
|
140
slic3r.spec
Normal file
140
slic3r.spec
Normal file
@ -0,0 +1,140 @@
|
||||
Name: slic3r
|
||||
Version: 0.9.8
|
||||
Release: 4%{?dist}
|
||||
Summary: G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
|
||||
License: AGPLv3 and CC-BY
|
||||
# Images are CC-BY, code is AGPLv3
|
||||
Group: Applications/Engineering
|
||||
URL: http://slic3r.org/
|
||||
%global commit 71052433de0ff1f3da04471ccbb572babafc3cae
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
Source0: https://github.com/alexrj/Slic3r/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
|
||||
|
||||
# Use /usr/share to store icons
|
||||
Patch0: %{name}-datadir.patch
|
||||
|
||||
# Use English decimal separator for numbers
|
||||
# Reasons are a bit complicated and are described in the patch
|
||||
Patch1: %{name}-english-locale.patch
|
||||
|
||||
Source1: %{name}.desktop
|
||||
BuildArch: noarch
|
||||
BuildRequires: perl(Module::Build)
|
||||
BuildRequires: perl(List::Util)
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(Math::Clipper) >= 1.17
|
||||
BuildRequires: perl(Moo) >= 0.091009
|
||||
BuildRequires: perl(File::Spec)
|
||||
BuildRequires: perl(Math::ConvexHull) >= 1.0.4
|
||||
BuildRequires: perl(Math::ConvexHull::MonotoneChain)
|
||||
BuildRequires: perl(XML::SAX)
|
||||
BuildRequires: perl(XML::SAX::ExpatXS)
|
||||
BuildRequires: perl(Math::PlanePath)
|
||||
BuildRequires: perl(Scalar::Util)
|
||||
BuildRequires: perl(SVG)
|
||||
BuildRequires: perl(parent)
|
||||
BuildRequires: perl(Wx)
|
||||
BuildRequires: perl(Boost::Geometry::Utils)
|
||||
BuildRequires: perl(Math::Geometry::Voronoi)
|
||||
BuildRequires: perl(Growl::GNTP)
|
||||
BuildRequires: perl(Net::DBus)
|
||||
BuildRequires: perl(IO::Scalar)
|
||||
BuildRequires: desktop-file-utils
|
||||
Requires: perl(XML::SAX)
|
||||
Requires: perl(Growl::GNTP)
|
||||
Requires: perl(Net::DBus)
|
||||
Requires: perl(Math::Clipper) >= 1.17
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
|
||||
%if 0%{?fedora} < 18
|
||||
# This is provided by XML::SAX (but not stated there)
|
||||
%filter_from_requires /perl(XML::SAX::PurePerl)/d
|
||||
%filter_setup
|
||||
%endif
|
||||
|
||||
%description
|
||||
Slic3r is a G-code generator for 3D printers. It's compatible with RepRaps,
|
||||
Makerbots, Ultimakers and many more machines.
|
||||
See the project homepage at slic3r.org and the documentation on the Slic3r wiki
|
||||
for more information.
|
||||
|
||||
%prep
|
||||
%setup -qn Slic3r-%{commit}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
perl Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
|
||||
./Build
|
||||
|
||||
%install
|
||||
./Build install destdir=%{buildroot} create_packlist=0
|
||||
find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/%{name}
|
||||
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
||||
|
||||
mv -f %{buildroot}%{_bindir}/%{name}.pl %{buildroot}%{_bindir}/%{name}
|
||||
cp -a var/* %{buildroot}%{_datadir}/%{name}
|
||||
ln -s ../%{name}/Slic3r.ico %{buildroot}%{_datadir}/pixmaps/%{name}.ico
|
||||
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
|
||||
|
||||
%{_fixperms} %{buildroot}/*
|
||||
|
||||
%check
|
||||
./Build test
|
||||
|
||||
%files
|
||||
%doc MANIFEST README.markdown
|
||||
%{_bindir}/%{name}
|
||||
%{perl_vendorlib}/Slic3r*
|
||||
%{_datadir}/pixmaps/%{name}.ico
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/%{name}
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Wed Mar 20 2013 Miro Hrončok <mhroncok@redhat.com> - 0.9.8-4
|
||||
- Comments added about patches
|
||||
|
||||
* Mon Mar 11 2013 Miro Hrončok <mhroncok@redhat.com> - 0.9.8-3
|
||||
- In-file justification provided for patches
|
||||
|
||||
* Mon Jan 21 2013 Miro Hrončok <mhroncok@redhat.com> - 0.9.8-2
|
||||
- Added patch to grab icons from %%{datadir}/%%{name}
|
||||
- Added patch to avoid bad locales behavior
|
||||
- Removed no longer needed filtering perl(Wx::Dialog) from Requires
|
||||
- Filter perl(XML::SAX::PurePerl) only in F17
|
||||
- Removed Perl default filter
|
||||
- Removed bash launcher
|
||||
- Renamed slic3r.pl to slic3r
|
||||
|
||||
* Thu Jan 17 2013 Miro Hrončok <mhroncok@redhat.com> - 0.9.8-1
|
||||
- New version
|
||||
- (Build)Requires Math::Clipper 1.17
|
||||
|
||||
* Thu Jan 17 2013 Miro Hrončok <mhroncok@redhat.com> - 0.9.7-3
|
||||
- Updated source to respect GitHub rule
|
||||
- Dropped mkdir, ln -s, cp, mv, perl macros
|
||||
- Reorganized %%install section a bit
|
||||
- Added version to Require perl(Math::Clipper)
|
||||
|
||||
* Sat Jan 05 2013 Miro Hrončok <miro@hroncok.cz> - 0.9.7-2
|
||||
- Added Require perl(Math::Clipper)
|
||||
|
||||
* Sun Dec 30 2012 Miro Hrončok <miro@hroncok.cz> - 0.9.7-1
|
||||
- New version
|
||||
- Do not download additional sources from GitHub
|
||||
- Removed deleting empty directories
|
||||
|
||||
* Fri Nov 16 2012 Miro Hrončok <miro@hroncok.cz> - 0.9.5-2
|
||||
- Removed BRs provided by perl package
|
||||
|
||||
* Wed Nov 14 2012 Miro Hrončok <miro@hroncok.cz> 0.9.5-1
|
||||
- New version
|
||||
- Requires perl(Math::Clipper) >= 1.14
|
||||
- Requires perl(Math::ConvexHull::MonotoneChain)
|
||||
- Requires perl(XML::SAX::ExpatXS)
|
||||
|
||||
* Thu Oct 04 2012 Miro Hrončok <miro@hroncok.cz> 0.9.3-1
|
||||
- New package
|
Loading…
x
Reference in New Issue
Block a user