/[gentoo-x86]/sci-libs/opencascade/opencascade-6.5.5.ebuild
Gentoo

Contents of /sci-libs/opencascade/opencascade-6.5.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Wed Jul 22 12:48:53 2015 UTC (4 years, 11 months ago) by xmw
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +2 -1 lines
Version bump and backport mesa fix (bug 533412).

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/opencascade/opencascade-6.5.5.ebuild,v 1.6 2015/03/31 20:17:21 ulm Exp $
4
5 EAPI=5
6
7 inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic
8
9 DESCRIPTION="Software development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
10 HOMEPAGE="http://www.opencascade.org/"
11 SRC_URI="http://files.opencascade.com/OCCT/OCC_${PV}_release/OpenCASCADE${PV//\./}.tgz"
12
13 LICENSE="Open-CASCADE-Technology-Public-License-6.5"
14 SLOT="${PV}"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="debug doc examples freeimage gl2ps java qt4 +tbb"
17
18 DEPEND="app-eselect/eselect-opencascade
19 dev-lang/tcl:0=
20 dev-lang/tk:0=
21 dev-tcltk/itcl
22 dev-tcltk/itk
23 dev-tcltk/tix
24 media-libs/ftgl
25 virtual/glu
26 virtual/opengl
27 x11-libs/libXmu
28 freeimage? ( media-libs/freeimage )
29 gl2ps? ( x11-libs/gl2ps )
30 java? ( virtual/jdk:= )
31 tbb? ( dev-cpp/tbb )"
32 RDEPEND="${DEPEND}"
33
34 S=${WORKDIR}/ros
35
36 # http://bugs.gentoo.org/show_bug.cgi?id=352435
37 # http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
38 RESTRICT="bindist mirror"
39
40 CHECKREQS_MEMORY="256M"
41 CHECKREQS_DISK_BUILD="3584M"
42
43 pkg_setup() {
44 check-reqs_pkg_setup
45 java-pkg-opt-2_pkg_setup
46 }
47
48 src_prepare() {
49 java-pkg-opt-2_src_prepare
50
51 epatch \
52 "${FILESDIR}"/${P}-deprecated-glx-api.patch \
53 "${FILESDIR}"/${PN}-6.5.4-fixed-DESTDIR.patch \
54 "${FILESDIR}"/${PN}-6.5.4-tcl8.6.patch \
55 "${FILESDIR}"/${PN}-6.5.4-fixed-tbb-VERSION.patch
56
57 # Feed environment variables used by Opencascade compilation
58 my_install_dir=${EROOT}usr/$(get_libdir)/${P}/ros
59 local my_env_install="#!/bin/sh -f
60 if [ -z \"\$PATH\" ]; then
61 export PATH=VAR_CASROOT/Linux/bin
62 else
63 export PATH=VAR_CASROOT/Linux/bin:\$PATH
64 fi
65 if [ -z \"\$LD_LIBRARY_PATH\" ]; then
66 export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib
67 else
68 export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:\$LD_LIBRARY_PATH
69 fi"
70 local my_sys_lib=${EROOT}usr/$(get_libdir)
71 local my_env="CASROOT=VAR_CASROOT
72 CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
73 CSF_LANGUAGE=us
74 MMGT_CLEAR=1
75 CSF_EXCEPTION_PROMPT=1
76 CSF_SHMessage=VAR_CASROOT/src/SHMessage
77 CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
78 CSF_XSMessage=VAR_CASROOT/src/XSMessage
79 CSF_StandardDefaults=VAR_CASROOT/src/StdResource
80 CSF_PluginDefaults=VAR_CASROOT/src/StdResource
81 CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
82 CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
83 CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
84 CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
85 CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
86 CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
87 CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
88 CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
89 CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
90 TCLHOME=${EROOT}usr/bin
91 TCLLIBPATH=${my_sys_lib}
92 ITK_LIBRARY=${my_sys_lib}/itk$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
93 ITCL_LIBRARY=${my_sys_lib}/itcl$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
94 TIX_LIBRARY=${my_sys_lib}/tix$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
95 TK_LIBRARY=${my_sys_lib}/tk$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
96 TCL_LIBRARY=${my_sys_lib}/tcl$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')"
97
98 ( echo "${my_env_install}"
99 echo "${my_env}" | sed -e "s:^:export :" ) \
100 | sed -e "s:VAR_CASROOT:${S}:g" > env.sh || die
101 source env.sh
102
103 ( echo "PATH=${my_install_dir}/lin/bin"
104 echo "LDPATH=${my_install_dir}/lin/$(get_libdir)"
105 echo "${my_env}" | sed \
106 -e "s:VAR_CASROOT:${my_install_dir}/lin:g" \
107 -e "s:/Linux/lib/:/$(get_libdir)/:g" || die
108 ) > 50${PN}
109
110 append-cxxflags "-fpermissive"
111
112 sed -e "/^AM_C_PROTOTYPES$/d" \
113 -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
114 -e "s:\$qt/include:\$qt/include/qt4:g"\
115 -e "s:\$qt/lib:\$qt/$(get_libdir)/qt4:g"\
116 -i configure.* || die
117 eautoreconf
118 }
119
120 src_configure() {
121 econf \
122 --prefix=${my_install_dir}/lin --exec-prefix=${my_install_dir}/lin \
123 --with-tcl="${EROOT}usr/$(get_libdir)" --with-tk="${EROOT}usr/$(get_libdir)" \
124 --with-freetype="${EROOT}usr" \
125 --with-ftgl="${EROOT}usr" \
126 $(usex freeimage "--with-freeimage=${EROOT}usr" "") \
127 $(usex gl2ps "--with-gl2ps=${EROOT}usr" "") \
128 $(usex qt4 "--with-qt=${EROOT}usr" "") \
129 $(usex tbb "--with-tbb-include=${EROOT}usr" "") \
130 $(usex tbb "--with-tbb-library=${EROOT}usr" "") \
131 $(use java && echo "--with-java-include=$(java-config -O)/include" || echo "--without-java-include") \
132 $(use_enable debug) \
133 $(use_enable !debug production)
134 #$(use_with freeimage) \
135 }
136
137 src_install() {
138 emake DESTDIR="${D}" install
139
140 prune_libtool_files
141
142 # Symlinks for keeping original OpenCascade folder structure and
143 # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
144 if [ "$(get_libdir)" != "lib" ]; then
145 dosym "$(get_libdir)" "${my_install_dir}/lin/lib"
146 fi
147
148 insinto /etc/env.d/${PN}
149 newins 50${PN} ${PV}
150
151 cd "${WORKDIR}"
152 if use examples ; then
153 insinto /usr/share/doc/${PF}/examples
154 doins -r data
155 doins -r samples
156 fi
157 dodoc doc/*.pdf
158 if use doc; then
159 insinto /usr/share/doc/${PF}
160 doins -r doc/{overview,ReferenceDocumentation}
161 fi
162 }
163
164 pkg_postinst() {
165 eselect ${PN} set ${PV}
166 einfo
167 elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
168 elog "You get a list by running \"equery depends sci-libs/opencascade\""
169 elog "revdep-rebuild does NOT suffice."
170 einfo
171 }

  ViewVC Help
Powered by ViewVC 1.1.20