From f4231b856db21dd795b24469107c2b046d152ebf Mon Sep 17 00:00:00 2001 From: yopito Date: Sat, 14 May 2016 20:28:09 +0200 Subject: [PATCH] New package: freecad-0.16 --- srcpkgs/freecad/files/freecad.appdata.xml | 22 +++++++ srcpkgs/freecad/files/freecad.desktop | 18 ++++++ srcpkgs/freecad/files/freecad.xml | 9 +++ .../add-smds_memory_limit-utility.patch | 55 ++++++++++++++++ srcpkgs/freecad/template | 63 +++++++++++++++++++ 5 files changed, 167 insertions(+) create mode 100644 srcpkgs/freecad/files/freecad.appdata.xml create mode 100644 srcpkgs/freecad/files/freecad.desktop create mode 100644 srcpkgs/freecad/files/freecad.xml create mode 100644 srcpkgs/freecad/patches/add-smds_memory_limit-utility.patch create mode 100644 srcpkgs/freecad/template diff --git a/srcpkgs/freecad/files/freecad.appdata.xml b/srcpkgs/freecad/files/freecad.appdata.xml new file mode 100644 index 0000000000..980e79de5e --- /dev/null +++ b/srcpkgs/freecad/files/freecad.appdata.xml @@ -0,0 +1,22 @@ + + + + freecad.desktop + CC0 + FreeCAD + An open source parametric 3D CAD modeler + +

FreeCAD is a parametric 3D modeler. Parametric modeling + allows you to easily modify your design by going back into + your model history and changing its parameters. FreeCAD is + open source (LGPL license) and completely modular, allowing + for very advanced extension and customization.

+

FreeCAD is multiplatfom, and reads and writes many open + file formats such as STEP, IGES, STL and others.

+
+ + http://www.freecadweb.org/wiki/images/2/2d/FreeCAD011.png + + http://www.freecadweb.org + XXX +
diff --git a/srcpkgs/freecad/files/freecad.desktop b/srcpkgs/freecad/files/freecad.desktop new file mode 100644 index 0000000000..ac02cf7f04 --- /dev/null +++ b/srcpkgs/freecad/files/freecad.desktop @@ -0,0 +1,18 @@ +# stolen from http://pkgs.fedoraproject.org/cgit/rpms/freecad.git/plain/freecad.desktop +[Desktop Entry] +Version=1.0 +Name=FreeCAD +Name[de]=FreeCAD +Comment=Feature based Parametric Modeler +Comment[de]=Feature-basierter parametrischer Modellierer +GenericName=CAD Application +GenericName[de]=CAD-Anwendung +Exec=@_inst_prefix@/bin/FreeCAD %F +Path=@_inst_prefix@ +Terminal=false +Type=Application +Icon=freecad +Categories=Graphics;Science;Education;Engineering; +StartupNotify=true +GenericName[de_DE]=Feature-basierter parametrischer Modellierer +MimeType=application/x-extension-fcstd; diff --git a/srcpkgs/freecad/files/freecad.xml b/srcpkgs/freecad/files/freecad.xml new file mode 100644 index 0000000000..a582417ae4 --- /dev/null +++ b/srcpkgs/freecad/files/freecad.xml @@ -0,0 +1,9 @@ + + + + + + FreeCAD document files + + + diff --git a/srcpkgs/freecad/patches/add-smds_memory_limit-utility.patch b/srcpkgs/freecad/patches/add-smds_memory_limit-utility.patch new file mode 100644 index 0000000000..46d24ef188 --- /dev/null +++ b/srcpkgs/freecad/patches/add-smds_memory_limit-utility.patch @@ -0,0 +1,55 @@ +Build and install missing binary SMDS_MemoryLimit +Patch with the help of http://forum.freecadweb.org/viewtopic.php?t=4316&start=10#p47658 , change #3 + +--- src/3rdParty/salomesmesh/CMakeLists.txt.ORI 2016-04-07 03:39:34.000000000 +0200 ++++ src/3rdParty/salomesmesh/CMakeLists.txt 2016-05-31 10:20:54.115079806 +0200 +@@ -158,6 +158,33 @@ + endif(WIN32) + + ++############################ ++# SMDS_MemoryLimit Utility # ++############################ ++ ++SET(SMDS_MemoryLimit_SRCS ++ src/SMDS/SMDS_MemoryLimit.cpp ++ ) ++add_executable(SMDS_MemoryLimit ${SMDS_MemoryLimit_SRCS}) ++ ++# Note this is IDE specific, not necessarily platform specific ++if(MSVC) ++ set_target_properties(SMDS_MemoryLimit PROPERTIES OUTPUT_NAME "SMDS_MemoryLimit") ++ set_target_properties(SMDS_MemoryLimit PROPERTIES DEBUG_OUTPUT_NAME "SMDS_MemoryLimit") ++ # dirty hack to avoid Debug/Release subdirectory ++ set_target_properties(FreeCADMainCmd PROPERTIES PREFIX "../") ++ set_target_properties(FreeCADMainCmd PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) ++elseif(MINGW) ++ set_target_properties(SMDS_MemoryLimit PROPERTIES OUTPUT_NAME "SMDS_MemoryLimit") ++ set_target_properties(SMDS_MemoryLimit PROPERTIES DEBUG_OUTPUT_NAME "SMDS_MemoryLimit") ++ set_target_properties(FreeCADMainCmd PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) ++else(MSVC) ++ set_target_properties(SMDS_MemoryLimit PROPERTIES OUTPUT_NAME "SMDS_MemoryLimit") ++ set_target_properties(SMDS_MemoryLimit PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) ++ #set_target_properties(SMDS_MemoryLimit PROPERTIES INSTALL_RPATH ${INSTALL_RPATH}) ++endif(MSVC) ++ ++ + ########## + # Driver # + ########## +@@ -380,12 +407,13 @@ + + + if(WIN32) +- INSTALL(TARGETS SMDS Driver DriverSTL DriverDAT DriverUNV SMESHDS SMESH MEFISTO2 StdMeshers ++ INSTALL(TARGETS SMDS SMDS_MemoryLimit Driver DriverSTL DriverDAT DriverUNV SMESHDS SMESH MEFISTO2 StdMeshers + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ) + else(WIN32) +- INSTALL(TARGETS SMDS Driver DriverSTL DriverDAT DriverUNV SMESHDS SMESH MEFISTO2 StdMeshers ++ INSTALL(TARGETS SMDS SMDS_MemoryLimit Driver DriverSTL DriverDAT DriverUNV SMESHDS SMESH MEFISTO2 StdMeshers ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + endif(WIN32) diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template new file mode 100644 index 0000000000..1b5ff353fc --- /dev/null +++ b/srcpkgs/freecad/template @@ -0,0 +1,63 @@ +# Template file for 'freecad' +pkgname=freecad +version=0.16 +revision=1 +wrksrc="FreeCAD-${version}" +build_style=cmake + +_inst_prefix=usr/lib/${pkgname} + +# set CMAKE_INSTALL_LIBDIR to {CMAKE_INSTALL_PREFIX}/lib" or patch LibDir in src/App/FreeCADInit.py +configure_args=" + -DCMAKE_INSTALL_PREFIX=/${_inst_prefix} + -DCMAKE_INSTALL_DATADIR=/${_inst_prefix}/data + -DCMAKE_INSTALL_DOCDIR=/${_inst_prefix}/doc + -DCMAKE_INSTALL_INCLUDEDIR=/usr/include/${pkgname} + -DCMAKE_INSTALL_LIBDIR=/${_inst_prefix}/lib" + +hostmakedepends="python swig pkg-config doxygen graphviz" + +makedepends="python-devel oce-devel qt-devel coin3-devel eigen libxerces-c-devel + libspnav-devel libshiboken-python-devel libpyside-python-devel pyside-tools + python-matplotlib boost-python coin3-doc" + +# qt-devel-tools, qt-plugin-sqlite: Help uses qt/assistant, its data in SQLite format +depends="python-matplotlib python-pyside qt-devel-tools qt-plugin-sqlite python-pivy" + +python_versions="2.7" +pycompile_dirs="usr/lib/${pkgname}/Mod usr/lib/${pkgname}/data/Mod" +pycompile_dirs="${_inst_prefix}/Mod ${_inst_prefix}/data/Mod" + +short_desc="A general purpose 3D CAD modeler" +maintainer="yopito " +license="LGPL-2.1" +homepage="http://freecadweb.org/" +distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz" +checksum=6cc71ab4b0dc60b493d3aaa4b42f1ce1af9d4fcd539309ab0792804579e18e09 + +post_install() { + + # AppHomePath is computed with binary's realpath: + # do not move binaries but symlink them instead. + vmkdir usr/bin + for f in FreeCAD FreeCADCmd; do + ln -s /${_inst_prefix}/bin/${f} ${DESTDIR}/usr/bin/${f} + done + + # desktop integration + vmkdir usr/share/applications + vcopy ${FILESDIR}/freecad.desktop usr/share/applications + sed -i -e "s,@_inst_prefix@,/${_inst_prefix}," ${DESTDIR}/usr/share/applications/freecad.desktop + vmkdir usr/share/appdata + vcopy ${FILESDIR}/freecad.appdata.xml usr/share/appdata + vmkdir usr/share/mime/packages + vcopy ${FILESDIR}/freecad.xml usr/share/mime/packages + for s in 16 32 48 64; do + _dest_icon=usr/share/icons/hicolor/${s}x${s}/apps + vmkdir ${_dest_icon} + ln -s /${_inst_prefix}/data/freecad-icon-${s}.png ${DESTDIR}/${_dest_icon}/freecad.png + ln -s /${_inst_prefix}/data/freecad.xpm ${DESTDIR}/${_dest_icon}/freecad.xpm + done + vmkdir usr/share/icons/scalable/apps + ln -s /${_inst_prefix}/data/freecad.svg ${DESTDIR}/usr/share/icons/scalable/apps/freecad.svg +}