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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (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.4: +3 -2 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.6.0.ebuild,v 1.4 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 versionator
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$(delete_all_version_separators).tgz"
12
13 LICENSE="Open-CASCADE-Technology-Public-License-6.6"
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}"/${P}-fixed-DESTDIR.patch \
54 "${FILESDIR}"/${PN}-6.5.4-fixed-tbb-VERSION.patch
55
56 # Feed environment variables used by Opencascade compilation
57 my_install_dir=${EROOT}usr/$(get_libdir)/${P}/ros
58 local my_env_install="#!/bin/sh -f
59 if [ -z \"\$PATH\" ]; then
60 export PATH=VAR_CASROOT/Linux/bin
61 else
62 export PATH=VAR_CASROOT/Linux/bin:\$PATH
63 fi
64 if [ -z \"\$LD_LIBRARY_PATH\" ]; then
65 export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib
66 else
67 export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:\$LD_LIBRARY_PATH
68 fi"
69 local my_sys_lib=${EROOT}usr/$(get_libdir)
70 local my_env="CASROOT=VAR_CASROOT
71 CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
72 CSF_LANGUAGE=us
73 MMGT_CLEAR=1
74 CSF_EXCEPTION_PROMPT=1
75 CSF_SHMessage=VAR_CASROOT/src/SHMessage
76 CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
77 CSF_XSMessage=VAR_CASROOT/src/XSMessage
78 CSF_StandardDefaults=VAR_CASROOT/src/StdResource
79 CSF_PluginDefaults=VAR_CASROOT/src/StdResource
80 CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
81 CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
82 CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
83 CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
84 CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
85 CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
86 CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
87 CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
88 CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
89 TCLHOME=${EROOT}usr/bin
90 TCLLIBPATH=${my_sys_lib}
91 ITK_LIBRARY=${my_sys_lib}/itk$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
92 ITCL_LIBRARY=${my_sys_lib}/itcl$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
93 TIX_LIBRARY=${my_sys_lib}/tix$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
94 TK_LIBRARY=${my_sys_lib}/tk$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
95 TCL_LIBRARY=${my_sys_lib}/tcl$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')"
96
97 ( echo "${my_env_install}"
98 echo "${my_env}" | sed -e "s:^:export :" ) \
99 | sed -e "s:VAR_CASROOT:${S}:g" > env.sh || die
100 source env.sh
101
102 ( echo "PATH=${my_install_dir}/lin/bin"
103 echo "LDPATH=${my_install_dir}/lin/$(get_libdir)"
104 echo "${my_env}" | sed \
105 -e "s:VAR_CASROOT:${my_install_dir}/lin:g" \
106 -e "s:/Linux/lib/:/$(get_libdir)/:g" || die
107 ) > 50${PN}
108
109 append-cxxflags "-fpermissive"
110
111 sed -e "/^AM_C_PROTOTYPES$/d" \
112 -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
113 -e "s:\$qt/include:\$qt/include/qt4:g"\
114 -e "s:\$qt/lib:\$qt/$(get_libdir)/qt4:g"\
115 -i configure.* || die
116 eautoreconf
117 }
118
119 src_configure() {
120 econf \
121 --prefix=${my_install_dir}/lin --exec-prefix=${my_install_dir}/lin \
122 --with-tcl="${EROOT}usr/$(get_libdir)" --with-tk="${EROOT}usr/$(get_libdir)" \
123 --with-freetype="${EROOT}usr" \
124 --with-ftgl="${EROOT}usr" \
125 $(usex freeimage "--with-freeimage=${EROOT}usr" "") \
126 $(usex gl2ps "--with-gl2ps=${EROOT}usr" "") \
127 $(usex qt4 "--with-qt=${EROOT}usr" "") \
128 $(usex tbb "--with-tbb-include=${EROOT}usr" "") \
129 $(usex tbb "--with-tbb-library=${EROOT}usr" "") \
130 $(use java && echo "--with-java-include=$(java-config -O)/include" || echo "--without-java-include") \
131 $(use_enable debug) \
132 $(use_enable !debug production)
133 #$(use_with freeimage) \
134 }
135
136 src_install() {
137 emake DESTDIR="${D}" install
138
139 prune_libtool_files
140
141 # Symlinks for keeping original OpenCascade folder structure and
142 # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
143 if [ "$(get_libdir)" != "lib" ]; then
144 dosym "$(get_libdir)" "${my_install_dir}/lin/lib"
145 fi
146
147 insinto /etc/env.d/${PN}
148 newins 50${PN} ${PV}
149
150 if use examples ; then
151 insinto /usr/share/doc/${PF}/examples
152 doins -r data
153 doins -r samples
154 fi
155 dodoc doc/*.pdf
156 if use doc; then
157 insinto /usr/share/doc/${PF}
158 doins -r doc/{overview,ReferenceDocumentation}
159 fi
160 }
161
162 pkg_postinst() {
163 eselect ${PN} set ${PV}
164 einfo
165 elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
166 elog "You get a list by running \"equery depends sci-libs/opencascade\""
167 elog "revdep-rebuild does NOT suffice."
168 einfo
169 }

  ViewVC Help
Powered by ViewVC 1.1.20