diff options
author | Michael Weber <xmw@gentoo.org> | 2015-08-11 11:01:49 +0200 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2015-08-11 11:02:05 +0200 |
commit | 122ef11195655fc578f5df41ff608df3fb8b4004 (patch) | |
tree | 8e3b61d158b5c5e2eba2e806378fa8a29771034a /media-gfx/freecad | |
parent | dev-java/jflex: raise {jre/jdk} reqs to 1.6 so that source/target flags get (diff) | |
download | gentoo-122ef11195655fc578f5df41ff608df3fb8b4004.tar.gz gentoo-122ef11195655fc578f5df41ff608df3fb8b4004.tar.bz2 gentoo-122ef11195655fc578f5df41ff608df3fb8b4004.zip |
media-gfx/freecad: install the proper icons and file associations (bug 551872, thanks Fat-Zer).
Package-Manager: portage-2.2.20
Diffstat (limited to 'media-gfx/freecad')
-rw-r--r-- | media-gfx/freecad/files/freecad.sharedmimeinfo | 8 | ||||
-rw-r--r-- | media-gfx/freecad/freecad-0.14.3702-r1.ebuild | 26 | ||||
-rw-r--r-- | media-gfx/freecad/freecad-0.15.4671.ebuild | 28 | ||||
-rw-r--r-- | media-gfx/freecad/freecad-9999.ebuild | 27 |
4 files changed, 78 insertions, 11 deletions
diff --git a/media-gfx/freecad/files/freecad.sharedmimeinfo b/media-gfx/freecad/files/freecad.sharedmimeinfo new file mode 100644 index 000000000000..6d5e93e7d13c --- /dev/null +++ b/media-gfx/freecad/files/freecad.sharedmimeinfo @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> + <mime-type type="application/x-extension-fcstd"> + <!-- <sub-class-of type="application/zip"/> --> + <comment>FreeCAD document files</comment> + <glob pattern="*.fcstd"/> + </mime-type> +</mime-info> diff --git a/media-gfx/freecad/freecad-0.14.3702-r1.ebuild b/media-gfx/freecad/freecad-0.14.3702-r1.ebuild index 30df418e8e48..c1158cb385b6 100644 --- a/media-gfx/freecad/freecad-0.14.3702-r1.ebuild +++ b/media-gfx/freecad/freecad-0.14.3702-r1.ebuild @@ -6,7 +6,7 @@ EAPI=5 PYTHON_COMPAT=( python2_7 ) -inherit cmake-utils eutils fortran-2 multilib python-single-r1 +inherit cmake-utils eutils fortran-2 multilib python-single-r1 fdo-mime DESCRIPTION="QT based Computer Aided Design application" HOMEPAGE="http://www.freecadweb.org/" @@ -123,14 +123,34 @@ src_install() { "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCADCmd \ "" "${EROOT}"usr/$(get_libdir)/${P}/lib - newicon src/Main/icon.ico ${PN}.ico - make_desktop_entry FreeCAD + make_desktop_entry FreeCAD "FreeCAD" "" "" "MimeType=application/x-extension-fcstd;" dodoc README.Linux ChangeLog.txt + # install mimetype for FreeCAD files + insinto /usr/share/mime/packages + newins "${FILESDIR}"/${PN}.sharedmimeinfo "${PN}.xml" + + # install icons to correct place rather than /usr/share/freecad + pushd "${ED}/usr/share/${P}" + for size in 16 32 48 64; do + newicon -s ${size} freecad-icon-${size}.png freecad.png + done + doicon -s scalable freecad.svg + newicon -s 64 -c mimetypes freecad-doc.png application-x-extension-fcstd.png + popd + # disable compression of QT assistant help files >> "${ED}"usr/share/doc/${P}/freecad.qhc.ecompress.skip >> "${ED}"usr/share/doc/${P}/freecad.qch.ecompress.skip python_optimize "${ED}"usr/{$(get_libdir),share}/${P}/Mod/ } + +pkg_postinst() { + fdo-mime_mime_database_update +} + +pkg_postrm() { + fdo-mime_mime_database_update +} diff --git a/media-gfx/freecad/freecad-0.15.4671.ebuild b/media-gfx/freecad/freecad-0.15.4671.ebuild index 63375fb695b5..a0b49547df4f 100644 --- a/media-gfx/freecad/freecad-0.15.4671.ebuild +++ b/media-gfx/freecad/freecad-0.15.4671.ebuild @@ -6,7 +6,7 @@ EAPI=5 PYTHON_COMPAT=( python2_7 ) -inherit cmake-utils eutils fortran-2 multilib python-single-r1 +inherit cmake-utils eutils fortran-2 multilib python-single-r1 fdo-mime DESCRIPTION="QT based Computer Aided Design application" HOMEPAGE="http://www.freecadweb.org/" @@ -111,10 +111,22 @@ src_install() { "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCADCmd \ "" "${EROOT}"usr/$(get_libdir)/${P}/lib - newicon src/Main/icon.ico ${PN}.ico - make_desktop_entry FreeCAD + make_desktop_entry FreeCAD "FreeCAD" "" "" "MimeType=application/x-extension-fcstd;" - dodoc README.Linux ChangeLog.txt + dodoc README.linux ChangeLog.txt + + # install mimetype for FreeCAD files + insinto /usr/share/mime/packages + newins "${FILESDIR}"/${PN}.sharedmimeinfo "${PN}.xml" + + # install icons to correct place rather than /usr/share/freecad + pushd "${ED}/usr/share/${P}" + for size in 16 32 48 64; do + newicon -s ${size} freecad-icon-${size}.png freecad.png + done + doicon -s scalable freecad.svg + newicon -s 64 -c mimetypes freecad-doc.png application-x-extension-fcstd.png + popd # disable compression of QT assistant help files >> "${ED}"usr/share/doc/${P}/freecad.qhc.ecompress.skip @@ -122,3 +134,11 @@ src_install() { python_optimize "${ED}"usr/{$(get_libdir),share}/${P}/Mod/ } + +pkg_postinst() { + fdo-mime_mime_database_update +} + +pkg_postrm() { + fdo-mime_mime_database_update +} diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild index 6b494f999928..5001cf3a2408 100644 --- a/media-gfx/freecad/freecad-9999.ebuild +++ b/media-gfx/freecad/freecad-9999.ebuild @@ -6,7 +6,7 @@ EAPI=5 PYTHON_COMPAT=( python2_7 ) -inherit cmake-utils eutils git-r3 fortran-2 multilib python-single-r1 +inherit cmake-utils eutils git-r3 fortran-2 multilib python-single-r1 fdo-mime DESCRIPTION="QT based Computer Aided Design application" HOMEPAGE="http://www.freecadweb.org/" @@ -17,7 +17,6 @@ SLOT="0" KEYWORDS="" IUSE="" -# sci-libs/opencascade ok: failed: 6.9.0 COMMON_DEPEND="dev-cpp/eigen:3 dev-libs/boost dev-libs/xerces-c[icu] @@ -112,14 +111,34 @@ src_install() { "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCADCmd \ "" "${EROOT}"usr/$(get_libdir)/${P}/lib - newicon src/Main/icon.ico ${PN}.ico - make_desktop_entry FreeCAD + make_desktop_entry FreeCAD "FreeCAD" "" "" "MimeType=application/x-extension-fcstd;" dodoc README.md ChangeLog.txt + # install mimetype for FreeCAD files + insinto /usr/share/mime/packages + newins "${FILESDIR}"/${PN}.sharedmimeinfo "${PN}.xml" + + # install icons to correct place rather than /usr/share/freecad + pushd "${ED}/usr/share/${P}" + for size in 16 32 48 64; do + newicon -s ${size} freecad-icon-${size}.png freecad.png + done + doicon -s scalable freecad.svg + newicon -s 64 -c mimetypes freecad-doc.png application-x-extension-fcstd.png + popd + # disable compression of QT assistant help files >> "${ED}"usr/share/doc/${P}/freecad.qhc.ecompress.skip >> "${ED}"usr/share/doc/${P}/freecad.qch.ecompress.skip python_optimize "${ED}"usr/{$(get_libdir),share}/${P}/Mod/ } + +pkg_postinst() { + fdo-mime_mime_database_update +} + +pkg_postrm() { + fdo-mime_mime_database_update +} |