summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2019-07-05 21:44:23 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2019-07-05 21:44:23 +0200
commit8d2ccee163e1040bae535cbe3570303ff3e454ae (patch)
treec3e4e6bfe8025b678fdffed147056ebbe4fcd21a
parentmedia-gfx/freecad-9999 some fixes (diff)
downloadfordfrog-8d2ccee163e1040bae535cbe3570303ff3e454ae.tar.gz
fordfrog-8d2ccee163e1040bae535cbe3570303ff3e454ae.tar.bz2
fordfrog-8d2ccee163e1040bae535cbe3570303ff3e454ae.zip
media-gfx/freecad-9999 some fixes
1) added hack for some libraries not found on amd64 2) added doc use flag 3) added symlinks for executables 4) some other minor fixes Package-Manager: Portage-2.3.68, Repoman-2.3.16 RepoMan-Options: --force Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r--media-gfx/freecad/Manifest2
-rw-r--r--media-gfx/freecad/freecad-9999.ebuild31
2 files changed, 30 insertions, 3 deletions
diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
index 8bf790f25..f9eb64dc1 100644
--- a/media-gfx/freecad/Manifest
+++ b/media-gfx/freecad/Manifest
@@ -1,4 +1,4 @@
AUX freecad-9999-install-paths.patch 1195 BLAKE2B 4bb847fae9ab1e097423a8b0df2860cf9883ca5a4c7c4505cf532fc9c403098dd0d82e701a6488f5ea501fa7b03dceda3c53a966e3766f06ec40453453c45712 SHA512 81d81da9d6f00e2955e7861fcc481e6c9c452022cac081ff077ca274b8e2207ba6424ff9da3d7d2f4d92ea6a8fa547340ca2556bb7d575bf903a9c7608a8a7f6
AUX freecad.sharedmimeinfo 312 BLAKE2B 731f28f904bebac03c8a64778d5e36f9b26fa33c347fa0b67113752aea12568f5a19968e730a53da89a7c7d08db6f8d80f11ab30d011e6b4db973c8549f710bd SHA512 bb55cad8387032af0e06ce7f1b4cab4354a34a915b9f550de25e05bf24d4161d9ea152d5692d65df4b362622f76a11d78894deaf7fee60c7a3fc0bfec38fa10c
-EBUILD freecad-9999.ebuild 6137 BLAKE2B 9f314bb227a6ea0646ec88fc0d1240567c2dcf99810dd7b200e580f6f5c2f46295dfcd529e1c8a814919209a88e16b0c99a22508f6a83171d7dc0fe3cb47ca39 SHA512 c004b448612cd77a1e7ec56ac19df6da1efcfe273fb7bce01ce5672787ad572bd4fa639b2ddb5b7718779696bfc3754fb068df3f2238d99f9797ae8feb203ffc
+EBUILD freecad-9999.ebuild 7233 BLAKE2B c3e22746922bb3e3f2659705e795a97ad9447b5a5e7035956f073904a8d56da7064f5f18870429b34701c8912d1b882a6ad52cbc07b04df7556298059648f85a SHA512 2c1b1a82e57464c75be8414ab62f901e0bc55b089f716c4a0f9fd39c253b29a7aed257a49f498412e89fe899660d99a63d0a27e2b03061738ec82b8e1d068c25
MISC metadata.xml 3495 BLAKE2B 6d041650eaf96c51e60f720a8dfc97dd1d3867577f11e83300f9eb4340a46a43c6fbf165310e6522b0552487ebe41e504caeb27c381418ae17d1ec77613980aa SHA512 160d602c5640328e4d648ccbf8628873d1ed7abe86bddaf7d6b44bc17b22ffe6e67f7ab7491c89ff47ea4fa6181537c433eac4b59fcf157625c7e4368a27f3a3
diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
index 33cd71ee4..d47fa6024 100644
--- a/media-gfx/freecad/freecad-9999.ebuild
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -15,7 +15,8 @@ if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/FreeCAD/FreeCAD.git"
else
- SRC_URI="https://github.com/FreeCAD/FreeCAD/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI="https://github.com/FreeCAD/FreeCAD/archive/${PV}.tar.gz -> ${P}.tar.gz
+ doc? ( https://github.com/FreeCAD/FreeCAD/releases/download/0.18.1/FreeCAD.${MY_PV}.Quick.Reference.Guide.7z -> ${P}.Quick.Reference.Guide.7z )"
KEYWORDS="~amd64 ~x86"
fi
@@ -63,7 +64,7 @@ IUSE_FREECAD_MODULES="
+freecad_modules_test
+freecad_modules_tux
+freecad_modules_web"
-IUSE="eigen3 +freetype +qt5 swig ${IUSE_FREECAD_MODULES}"
+IUSE="doc eigen3 +freetype +qt5 swig ${IUSE_FREECAD_MODULES}"
# TODO:
# DEPEND and RDEPEND:
@@ -152,6 +153,7 @@ src_configure() {
-DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
-DCMAKE_INSTALL_INCLUDEDIR=/usr/include/${P}
-DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN}
+ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
-DFREECAD_USE_EXTERNAL_KDL="ON"
-DBUILD_QT5="$(usex qt5)"
-DBUILD_GUI="$(usex qt5)"
@@ -198,16 +200,33 @@ src_configure() {
cmake-utils_src_configure
einfo "${P} will be built against opencascade version ${CASROOT}"
+
+ # Fix paths on amd64 (temporary hack)
+ if use amd64; then
+ for lib in libSM.so libICE.so libX11.so libXext.so libGL.so libGLU.so libfreetype.so; do
+ count=0
+ for file in $(grep /usr/lib/${lib} ${BUILD_DIR}/* -rl); do
+ sed -i "s%/usr/lib/${lib}%/usr/lib64/${lib}%g" $file
+ count=$((count+1))
+ done
+ einfo "Fixed /usr/lib/${lib} to /usr/lib64/${lib} in ${count} affected file(s)"
+ done
+ fi
}
src_install() {
cmake-utils_src_install
+ dosym ../$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad
+ dosym ../$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd
+
make_desktop_entry FreeCAD "FreeCAD" "" "" "MimeType=application/x-extension-fcstd;"
# install mimetype for FreeCAD files
insinto /usr/share/mime/packages
newins "${FILESDIR}"/${PN}.sharedmimeinfo "${PN}.xml"
+ insinto /usr/share/pixmaps
+ newins "${S}"/src/Gui/Icons/${PN}.xpm "${PN}.xpm"
# install icons to correct place rather than /usr/share/freecad
pushd "${ED%/}"/usr/share/${P} || die
@@ -219,6 +238,14 @@ src_install() {
newicon -s 64 -c mimetypes freecad-doc.png application-x-extension-fcstd.png
popd || die
+ rm "${ED}"/usr/share/${PN}/data/${PN}-{doc,icon-{16,32,48,64}}.png || die
+ rm "${ED}"/usr/share/${PN}/data/${PN}.svg || die
+ rm "${ED}"/usr/share/${PN}/data/${PN}.xpm || die
+
+ if use doc; then
+ cp -r "${WORKDIR}/FreeCAD 0_18 Quick Reference Guide" "${ED}/usr/share/doc/${PF}" || die
+ fi
+
python_optimize "${ED%/}"/usr/{,share/${P}/}Mod/
}