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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Mar 31 20:17:21 2015 UTC (5 years, 3 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Update dependency after package move of eselect modules to app-eselect.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!)

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.8.0.ebuild,v 1.2 2015/03/20 15:20:05 jlec 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-LGPL-2.1-Exception-1.0 LGPL-2.1 )"
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 # http://bugs.gentoo.org/show_bug.cgi?id=352435
35 # http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
36 RESTRICT="bindist mirror"
37
38 CHECKREQS_MEMORY="256M"
39 CHECKREQS_DISK_BUILD="3584M"
40
41 pkg_setup() {
42 check-reqs_pkg_setup
43 java-pkg-opt-2_pkg_setup
44 }
45
46 src_prepare() {
47 java-pkg-opt-2_src_prepare
48
49 epatch \
50 "${FILESDIR}"/${P}-fixed-DESTDIR.patch
51
52 # Feed environment variables used by Opencascade compilation
53 my_install_dir=${EROOT}usr/$(get_libdir)/${P}/ros
54 local my_env_install="#!/bin/sh -f
55 if [ -z \"\$PATH\" ]; then
56 export PATH=VAR_CASROOT/Linux/bin
57 else
58 export PATH=VAR_CASROOT/Linux/bin:\$PATH
59 fi
60 if [ -z \"\$LD_LIBRARY_PATH\" ]; then
61 export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib
62 else
63 export LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:\$LD_LIBRARY_PATH
64 fi"
65 local my_sys_lib=${EROOT}usr/$(get_libdir)
66 local my_env="CASROOT=VAR_CASROOT
67 CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
68 CSF_LANGUAGE=us
69 MMGT_CLEAR=1
70 CSF_EXCEPTION_PROMPT=1
71 CSF_SHMessage=VAR_CASROOT/src/SHMessage
72 CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
73 CSF_XSMessage=VAR_CASROOT/src/XSMessage
74 CSF_StandardDefaults=VAR_CASROOT/src/StdResource
75 CSF_PluginDefaults=VAR_CASROOT/src/StdResource
76 CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
77 CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
78 CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
79 CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
80 CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
81 CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
82 CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
83 CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
84 CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
85 TCLHOME=${EROOT}usr/bin
86 TCLLIBPATH=${my_sys_lib}
87 ITK_LIBRARY=${my_sys_lib}/itk$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
88 ITCL_LIBRARY=${my_sys_lib}/itcl$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
89 TIX_LIBRARY=${my_sys_lib}/tix$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
90 TK_LIBRARY=${my_sys_lib}/tk$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
91 TCL_LIBRARY=${my_sys_lib}/tcl$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')"
92
93 ( echo "${my_env_install}"
94 echo "${my_env}" | sed -e "s:^:export :" ) \
95 | sed -e "s:VAR_CASROOT:${S}:g" > env.sh || die
96 source env.sh
97
98 ( echo "PATH=${my_install_dir}/lin/bin"
99 echo "LDPATH=${my_install_dir}/lin/$(get_libdir)"
100 echo "${my_env}" | sed \
101 -e "s:VAR_CASROOT:${my_install_dir}/lin:g" \
102 -e "s:/Linux/lib/:/$(get_libdir)/:g" || die
103 ) > 50${PN}
104
105 append-cxxflags "-fpermissive"
106
107 sed -e "/^AM_C_PROTOTYPES$/d" \
108 -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
109 -e "s:\$qt/include:\$qt/include/qt4:g"\
110 -e "s:\$qt/lib:\$qt/$(get_libdir)/qt4:g"\
111 -i configure.ac || die
112 eautoreconf
113 }
114
115 src_configure() {
116 econf \
117 --prefix=${my_install_dir}/lin --exec-prefix=${my_install_dir}/lin \
118 --with-tcl="${EROOT}usr/$(get_libdir)" --with-tk="${EROOT}usr/$(get_libdir)" \
119 --with-freetype="${EROOT}usr" \
120 --with-ftgl="${EROOT}usr" \
121 $(usex freeimage "--with-freeimage=${EROOT}usr" "") \
122 $(usex gl2ps "--with-gl2ps=${EROOT}usr" "") \
123 $(usex qt4 "--with-qt=${EROOT}usr" "") \
124 $(usex tbb "--with-tbb-include=${EROOT}usr" "") \
125 $(usex tbb "--with-tbb-library=${EROOT}usr" "") \
126 $(use java && echo "--with-java-include=$(java-config -O)/include" || echo "--without-java-include") \
127 $(use_enable debug) \
128 $(use_enable !debug production)
129 }
130
131 src_install() {
132 emake DESTDIR="${D}" install
133
134 prune_libtool_files
135
136 # Symlinks for keeping original OpenCascade folder structure and
137 # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
138 if [ "$(get_libdir)" != "lib" ]; then
139 dosym "$(get_libdir)" "${my_install_dir}/lin/lib"
140 fi
141
142 insinto /etc/env.d/${PN}
143 newins 50${PN} ${PV}
144
145 if use examples ; then
146 insinto /usr/share/doc/${PF}/examples
147 doins -r data
148 doins -r samples
149 fi
150 if use doc; then
151 insinto /usr/share/doc/${PF}
152 doins -r doc/{overview,pdf,refman}
153 fi
154 }
155
156 pkg_postinst() {
157 eselect ${PN} set ${PV}
158 einfo
159 elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
160 elog "You get a list by running \"equery depends sci-libs/opencascade\""
161 elog "revdep-rebuild does NOT suffice."
162 einfo
163 }

  ViewVC Help
Powered by ViewVC 1.1.20