[packages/openscad] - initial; based on FC; TODO: fix locales

arekm arekm at pld-linux.org
Thu Apr 30 17:05:56 CEST 2015


commit a4cd6760933e7ad82c7b760bc873b7825970d1f4
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Apr 30 17:05:41 2015 +0200

    - initial; based on FC; TODO: fix locales

 openscad-polyclipping.patch |  55 +++++++++++++++
 openscad.spec               | 165 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 220 insertions(+)
---
diff --git a/openscad.spec b/openscad.spec
new file mode 100644
index 0000000..2447a8a
--- /dev/null
+++ b/openscad.spec
@@ -0,0 +1,165 @@
+%bcond_with	tests
+Name:		openscad
+Version:	2015.03.1
+%global upversion 2015.03-1
+Summary:	The Programmers Solid 3D CAD Modeller
+Release:	0.1
+# COPYING contains a linking exception for CGAL
+# Appdata file is CC0
+# Examples are CC0
+License:	GPLv2 with exceptions and CC0
+Group:		Applications/Engineering
+URL:		http://www.openscad.org/
+Source0:	http://files.openscad.org/%{name}-%{upversion}.src.tar.gz
+# Source0-md5:	c5994220078f5f5c13984da304e4a2fe
+Patch0:		%{name}-polyclipping.patch
+BuildRequires:	CGAL-devel >= 3.6
+BuildRequires:	ImageMagick
+BuildRequires:	Mesa-dri-driver-swrast
+BuildRequires:	bison >= 2.4
+BuildRequires:	boost-devel >= 1.35
+BuildRequires:	desktop-file-utils
+BuildRequires:	eigen3
+BuildRequires:	flex >= 2.5.35
+BuildRequires:	fontconfig-devel >= 2.10
+BuildRequires:	freetype-devel >= 2.4
+BuildRequires:	gettext
+BuildRequires:	glew-devel >= 1.6
+BuildRequires:	glib2-devel
+BuildRequires:	gmp-devel >= 5.0.0
+BuildRequires:	harfbuzz-devel >= 0.9.19
+BuildRequires:	mpfr-devel >= 3.0.0
+BuildRequires:	opencsg-devel >= 1.3.2
+BuildRequires:	polyclipping-devel >= 6.1.3
+BuildRequires:	procps
+BuildRequires:	python
+BuildRequires:	qscintilla2-devel
+BuildRequires:	qt4-build >= 4.4
+BuildRequires:	xorg-xserver-Xvfb
+Requires:	font(liberationmono)
+Requires:	font(liberationsans)
+Requires:	font(liberationserif)
+
+%description
+OpenSCAD is a software for creating solid 3D CAD objects. Unlike most
+free software for creating 3D models (such as the famous application
+Blender) it does not focus on the artistic aspects of 3D modeling but
+instead on the CAD aspects. Thus it might be the application you are
+looking for when you are planning to create 3D models of machine parts
+but pretty sure is not what you are looking for when you are more
+interested in creating computer-animated movies.
+
+
+###############################################
+%package        MCAD
+Summary:	OpenSCAD Parametric CAD Library
+License:	LGPLv2+ and LGPLv2 and LGPLv3+ and (GPLv3 or LGPLv2) and (GPLv3+ or LGPLv2) and (CC-BY-SA or LGPLv2+) and (CC-BY-SA or LGPLv2) and CC-BY and BSD and MIT and Public Domain
+URL:		https://www.github.com/openscad/MCAD
+Requires:	%{name} = %{version}-%{release}
+BuildArch:	noarch
+
+%description    MCAD
+This library contains components commonly used in designing and
+moching up mechanical designs. It is currently unfinished and you can
+expect some API changes, however many things are already working.
+
+### LICENSES:
+
+## LGPLv2+: # 2Dshapes.scad # 3d_triangle.scad # fonts.scad #
+gridbeam.scad # hardware.scad # libtriangles.scad # multiply.scad #
+shapes.scad # screw.scad
+
+## LGPLv2: # gears.scad # involute_gears.scad # servos.scad #
+transformations.scad # triangles.scad # unregular_shapes.scad #
+bitmap/letter_necklace.scad
+
+## LGPLv3+: # teardrop.scad
+
+## GPLv3 or LGPLv2: # motors.scad # nuts_and_bolts.scad
+
+
+## GPLv3+ or LGPLv2: # metric_fastners.scad # regular_shapes.scad
+
+## CC-BY-SA or LGPLv2+: # bearing.scad # materials.scad # stepper.scad
+# utilities.scad
+
+## CC-BY-SA or LGPLv2: # units.scad
+
+## CC-BY: # polyholes.scad # bitmap/alphabet_block.scad #
+bitmap/bitmap.scad # bitmap/height_map.scad # bitmap/name_tag.scad
+
+## BSD # boxes.scad
+
+## MIT # constants.scad # curves.scad # math.scad
+
+## Public Domain # lego_compatibility.scad # trochoids.scad
+
+###############################################
+
+%prep
+%setup -qn %{name}-%{upversion}
+%patch0 -p1
+
+rm -rf src/polyclipping
+
+%build
+qmake-qt4 \
+	PREFIX=%{_prefix}
+%{__make}
+
+# tests
+cd tests
+install -d build
+cd build
+%{__cmake} ..
+%{__make}
+cd ../..
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -j1 install \
+	INSTALL_ROOT=$RPM_BUILD_ROOT
+
+rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts
+
+:> %{name}.lang
+# TODO: fix this to find the files
+#%find_lang %{name}
+
+rm $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/lgpl-2.1.txt
+rm $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/README.markdown
+rm $RPM_BUILD_ROOT%{_datadir}/%{name}/libraries/MCAD/TODO
+
+%if %{with tests}
+cd tests
+ctest
+cd ..
+%endif
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc README.md RELEASE_NOTES
+%attr(755,root,root) %{_bindir}/%{name}
+%{_datadir}/appdata/*.xml
+%{_desktopdir}/%{name}.desktop
+%{_pixmapsdir}/%{name}.png
+%{_datadir}/mime/packages/%{name}.xml
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/examples
+%{_datadir}/%{name}/color-schemes
+%dir %{_datadir}/%{name}/locale
+# drop when find_lang is fixed
+%{_datadir}/%{name}/locale/*
+%dir %{_datadir}/%{name}/libraries
+%{_mandir}/man1/*
+
+%files MCAD
+%defattr(644,root,root,755)
+%doc libraries/MCAD/README.markdown libraries/MCAD/TODO
+%{_datadir}/%{name}/libraries/MCAD
+
+%changelog
+
+%clean
+rm -rf $RPM_BUILD_ROOT
diff --git a/openscad-polyclipping.patch b/openscad-polyclipping.patch
new file mode 100644
index 0000000..e876dba
--- /dev/null
+++ b/openscad-polyclipping.patch
@@ -0,0 +1,55 @@
+diff --git a/openscad.pro b/openscad.pro
+index a2eefe6..20b1864 100644
+--- a/openscad.pro
++++ b/openscad.pro
+@@ -440,8 +440,7 @@ SOURCES += src/version_check.cc \
+            src/LibraryInfoDialog.cc
+ 
+ # ClipperLib
+-SOURCES += src/polyclipping/clipper.cpp
+-HEADERS += src/polyclipping/clipper.hpp
++LIBS += -lpolyclipping
+ 
+ # libtess2
+ INCLUDEPATH += src/libtess2/Include
+diff --git a/src/clipper-utils.h b/src/clipper-utils.h
+index 0dc7cd0..c98cda0 100644
+--- a/src/clipper-utils.h
++++ b/src/clipper-utils.h
+@@ -1,6 +1,6 @@
+ #pragma once
+ 
+-#include "polyclipping/clipper.hpp"
++#include <polyclipping/clipper.hpp>
+ #include "Polygon2d.h"
+ 
+ namespace ClipperUtils {
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 93658a0..a852ef6 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -705,7 +705,6 @@ set(COMMON_SOURCES
+   ../src/GeometryCache.cc 
+   ../src/clipper-utils.cc 
+   ../src/Tree.cc
+-  ../src/polyclipping/clipper.cpp
+   ../src/libtess2/Source/bucketalloc.c
+   ../src/libtess2/Source/dict.c
+   ../src/libtess2/Source/geom.c
+@@ -786,14 +785,14 @@ target_link_libraries(csgtexttest tests-nocgal ${GLEW_LIBRARY} ${OPENCSG_LIBRARY
+ #
+ add_executable(cgalcachetest cgalcachetest.cc)
+ set_target_properties(cgalcachetest PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}")
+-target_link_libraries(cgalcachetest tests-cgal ${GLEW_LIBRARY} ${OPENCSG_LIBRARY} ${APP_SERVICES_LIBRARY})
++target_link_libraries(cgalcachetest tests-cgal -lpolyclipping ${GLEW_LIBRARY} ${OPENCSG_LIBRARY} ${APP_SERVICES_LIBRARY})
+ 
+ #
+ # openscad no-qt
+ #
+ add_executable(openscad_nogui ../src/openscad.cc)
+ set_target_properties(openscad_nogui PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -DEIGEN_DONT_ALIGN ${ENABLE_OPENCSG_FLAG} -DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}")
+-target_link_libraries(openscad_nogui tests-offscreen tests-cgal ${GLEW_LIBRARY} ${OPENCSG_LIBRARY} ${APP_SERVICES_LIBRARY})
++target_link_libraries(openscad_nogui tests-offscreen tests-cgal -lX11 -lpolyclipping ${GLEW_LIBRARY} ${OPENCSG_LIBRARY} ${APP_SERVICES_LIBRARY})
+ 
+ # also run translation compilation to verify the files are without syntax errors
+ add_custom_target(locale_files ALL COMMAND ${CMAKE_SOURCE_DIR}/../scripts/translation-make.sh)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openscad.git/commitdiff/a4cd6760933e7ad82c7b760bc873b7825970d1f4



More information about the pld-cvs-commit mailing list