Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/opencascade/files/, sci-libs/opencascade/
Date: Tue, 03 Dec 2013 14:53:12
Message-Id: 1386055545.dbfbbbbf67d8d846bb2d039185c0d7544a1a4d21.jlec@gentoo
1 commit: dbfbbbbf67d8d846bb2d039185c0d7544a1a4d21
2 Author: Christophe Paccolat <chr.paccolat <AT> mycable <DOT> ch>
3 AuthorDate: Mon Dec 3 15:13:57 2012 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 3 07:25:45 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=dbfbbbbf
7
8 sci-libs/opencascade: Verion bump
9
10 ---
11 sci-libs/opencascade/ChangeLog | 43 +++++
12 sci-libs/opencascade/files/env.sh.template | 40 +++++
13 .../files/opencascade-6.5.4-fixed-DESTDIR.patch | 47 ++++++
14 sci-libs/opencascade/metadata.xml | 10 ++
15 sci-libs/opencascade/opencascade-6.5.4.ebuild | 184 +++++++++++++++++++++
16 5 files changed, 324 insertions(+)
17
18 diff --git a/sci-libs/opencascade/ChangeLog b/sci-libs/opencascade/ChangeLog
19 new file mode 100644
20 index 0000000..bf0a048
21 --- /dev/null
22 +++ b/sci-libs/opencascade/ChangeLog
23 @@ -0,0 +1,43 @@
24 +# ChangeLog for sci-libs/opencascade
25 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
26 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/opencascade/ChangeLog,v 1.8 2012/09/16 10:18:52 pacho Exp $
27 +
28 + 16 Sep 2012; Pacho Ramos <pacho@g.o> opencascade-6.5.ebuild:
29 + Add missing virtual/glu dependency, bug #434438 by Andreas Sturmlechner.
30 +
31 + 24 Aug 2012; Andreas K. Huettel <dilfridge@g.o> metadata.xml:
32 + Drop maintainership
33 +
34 + 22 Jun 2012; Justin Lecher <jlec@g.o> opencascade-6.5.ebuild,
35 + metadata.xml:
36 + Fix for automake-1.12, #422115; fix type in check-reqs_pkg_setup
37 +
38 + 07 Jan 2012; Andreas K. Huettel <dilfridge@g.o>
39 + -opencascade-6.3-r3.ebuild, -files/opencascade-6.3-fixed-DESTDIR.patch,
40 + -files/opencascade-6.3-missing-mode.patch,
41 + -files/opencascade-6.3-underlinking.patch, -files/env.ksh.template:
42 + Remove old
43 +
44 +*opencascade-6.5 (13 Nov 2011)
45 +
46 + 13 Nov 2011; Andreas K. Huettel <dilfridge@g.o>
47 + +opencascade-6.5.ebuild, +files/opencascade-6.5-fixed-DESTDIR.patch,
48 + +files/opencascade-6.5-ftgl.patch, +files/env.sh.template:
49 + Version bump, thanks to Oliver Borm
50 +
51 + 21 Aug 2011; Andreas K. Huettel <dilfridge@g.o>
52 + opencascade-6.3-r3.ebuild, +files/opencascade-6.3-underlinking.patch:
53 + Fix underlinking, bug 371883
54 +
55 + 07 Mar 2011; Andreas K. Huettel <dilfridge@g.o>
56 + opencascade-6.3-r3.ebuild:
57 + Go back to EAPI=3 on user request
58 +
59 +*opencascade-6.3-r3 (03 Mar 2011)
60 +
61 + 03 Mar 2011; Andreas K. Huettel <dilfridge@g.o>
62 + +opencascade-6.3-r3.ebuild, +files/opencascade-6.3-fixed-DESTDIR.patch,
63 + +files/opencascade-6.3-missing-mode.patch, +files/env.ksh.template,
64 + +metadata.xml:
65 + New library, bug 118656. Imported with cleanups from the sci overlay.
66 + Thanks to all contributors from the bugzilla report.
67
68 diff --git a/sci-libs/opencascade/files/env.sh.template b/sci-libs/opencascade/files/env.sh.template
69 new file mode 100644
70 index 0000000..146c86b
71 --- /dev/null
72 +++ b/sci-libs/opencascade/files/env.sh.template
73 @@ -0,0 +1,40 @@
74 +#!/bin/sh -f
75 +
76 +export CASROOT=VAR_CASROOT
77 +
78 +if [ -z "PATH" ];
79 +then PATH=VAR_CASROOT/Linux/bin;
80 +else PATH=VAR_CASROOT/Linux/bin:$PATH;
81 +fi
82 +export PATH
83 +if [ -z "LD_LIBRARY_PATH" ];
84 +then LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib;
85 +else LD_LIBRARY_PATH=VAR_CASROOT/Linux/lib:$LD_LIBRARY_PATH;
86 +fi
87 +export LD_LIBRARY_PATH
88 +export CSF_MDTVFontDirectory=VAR_CASROOT/src/FontMFT
89 +export CSF_LANGUAGE=us
90 +export MMGT_CLEAR=1
91 +export CSF_EXCEPTION_PROMPT=1
92 +export CSF_SHMessage=VAR_CASROOT/src/SHMessage
93 +export CSF_MDTVTexturesDirectory=VAR_CASROOT/src/Textures
94 +export CSF_XSMessage=VAR_CASROOT/src/XSMessage
95 +export CSF_StandardDefaults=VAR_CASROOT/src/StdResource
96 +export CSF_PluginDefaults=VAR_CASROOT/src/StdResource
97 +export CSF_XCAFDefaults=VAR_CASROOT/src/StdResource
98 +export CSF_StandardLiteDefaults=VAR_CASROOT/src/StdResource
99 +export CSF_GraphicShr=VAR_CASROOT/Linux/lib/libTKOpenGl.so
100 +export CSF_UnitsLexicon=VAR_CASROOT/src/UnitsAPI/Lexi_Expr.dat
101 +export CSF_UnitsDefinition=VAR_CASROOT/src/UnitsAPI/Units.dat
102 +export CSF_IGESDefaults=VAR_CASROOT/src/XSTEPResource
103 +export CSF_STEPDefaults=VAR_CASROOT/src/XSTEPResource
104 +export CSF_XmlOcafResource=VAR_CASROOT/src/XmlOcafResource
105 +export CSF_MIGRATION_TYPES=VAR_CASROOT/src/StdResource/MigrationSheet.txt
106 +
107 +export TCLHOME=VAR_SYS_BIN
108 +export TCLLIBPATH=VAR_SYS_LIB
109 +export ITK_LIBRARY=VAR_SYS_LIB/VAR_ITK
110 +export ITCL_LIBRARY=VAR_SYS_LIB/VAR_ITCL
111 +export TIX_LIBRARY=VAR_SYS_LIB/VAR_TIX
112 +export TK_LIBRARY=VAR_SYS_LIB/VAR_TK
113 +export TCL_LIBRARY=VAR_SYS_LIB/VAR_TCL
114
115 diff --git a/sci-libs/opencascade/files/opencascade-6.5.4-fixed-DESTDIR.patch b/sci-libs/opencascade/files/opencascade-6.5.4-fixed-DESTDIR.patch
116 new file mode 100644
117 index 0000000..16b7909
118 --- /dev/null
119 +++ b/sci-libs/opencascade/files/opencascade-6.5.4-fixed-DESTDIR.patch
120 @@ -0,0 +1,47 @@
121 +--- ros/Makefile.am.old 2012-11-14 16:41:30.421527346 +0100
122 ++++ ros/Makefile.am 2012-11-14 16:42:01.977540655 +0100
123 +@@ -82,27 +82,27 @@
124 + cd $(top_builddir)/adm/make && $(MAKE) $(AM_MAKEFLAGS) Draw
125 +
126 + install-exec-local:
127 +- $(INSTALL) -d $(prefix)/$(platform)
128 +- if [ -e $(prefix)/bin -a ! -e $(prefix)/$(platform)/bin ]; then \
129 +- cd $(prefix)/$(platform) && ln -s ../bin bin; \
130 ++ $(INSTALL) -d $(DESTDIR)$(prefix)/$(platform)
131 ++ if [ -e $(DESTDIR)$(prefix)/bin -a ! -e $(DESTDIR)$(prefix)/$(platform)/bin ]; then \
132 ++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../bin bin; \
133 + fi
134 +- if [ -e $(prefix)/lib -a ! -e $(prefix)/$(platform)/lib ]; then \
135 +- cd $(prefix)/$(platform) && ln -s ../lib lib; \
136 ++ if [ -e $(DESTDIR)$(prefix)/lib -a ! -e $(DESTDIR)$(prefix)/$(platform)/lib ]; then \
137 ++ cd $(DESTDIR)$(prefix)/$(platform) && ln -s ../lib lib; \
138 + fi
139 +- buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(prefix); installd=`pwd`; cd $$buildd; \
140 ++ buildd=`pwd`; cd $(top_srcdir); sourced=`pwd`; cd $(DESTDIR)$(prefix); installd=`pwd`; cd $$buildd; \
141 + if [ "$$installd" != "$$sourced" ]; then \
142 +- $(INSTALL) -d $(prefix)/inc; \
143 +- cp -frL $(top_srcdir)/inc $(prefix); \
144 +- cp -frL $$buildd/config.h $(prefix); \
145 ++ $(INSTALL) -d $(DESTDIR)$(prefix)/inc; \
146 ++ cp -frL $(top_srcdir)/inc $(DESTDIR)$(prefix); \
147 ++ cp -frL $$buildd/config.h $(DESTDIR)$(prefix); \
148 + for d in $(FoundationClasses_DIRS) $(ModelingData_DIRS) $(ModelingAlgorithms_DIRS) $(Visualization_DIRS) $(ApplicationFramework_DIRS) $(DataExchange_DIRS) $(Draw_DIRS); do \
149 +- $(INSTALL) -d $(prefix)/src/$$d; \
150 +- cp -frL $(top_srcdir)/src/$$d $(prefix)/src; \
151 ++ $(INSTALL) -d $(DESTDIR)$(prefix)/src/$$d; \
152 ++ cp -frL $(top_srcdir)/src/$$d $(DESTDIR)$(prefix)/src; \
153 + done; \
154 + fi
155 +- if [ -e $(prefix)/inc/config.h ]; then \
156 +- unlink $(prefix)/inc/config.h; \
157 ++ if [ -e $(DESTDIR)$(prefix)/inc/config.h ]; then \
158 ++ unlink $(DESTDIR)$(prefix)/inc/config.h; \
159 + fi
160 +- cd $(prefix)/inc && ln -s ../config.h config.h
161 +- cd $(top_srcdir) && cp *.sh $(prefix)
162 ++ cd $(DESTDIR)$(prefix)/inc && ln -s ../config.h config.h
163 ++ cd $(top_srcdir) && cp *.sh $(DESTDIR)$(prefix)
164 +
165 +-.PHONY: FoundationClasses ModelingData ModelingAlgorithms Visualization ApplicationFramework DataExchange Draw
166 +\ No newline at end of file
167 ++.PHONY: FoundationClasses ModelingData ModelingAlgorithms Visualization ApplicationFramework DataExchange Draw
168
169 diff --git a/sci-libs/opencascade/metadata.xml b/sci-libs/opencascade/metadata.xml
170 new file mode 100644
171 index 0000000..8e8fd49
172 --- /dev/null
173 +++ b/sci-libs/opencascade/metadata.xml
174 @@ -0,0 +1,10 @@
175 +<?xml version="1.0" encoding="UTF-8"?>
176 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
177 +<pkgmetadata>
178 + <maintainer>
179 + <email>maintainer-needed@g.o</email>
180 + </maintainer>
181 + <use>
182 + <flag name="gl2ps">Use gl2ps PostScript printing library</flag>
183 + </use>
184 +</pkgmetadata>
185
186 diff --git a/sci-libs/opencascade/opencascade-6.5.4.ebuild b/sci-libs/opencascade/opencascade-6.5.4.ebuild
187 new file mode 100644
188 index 0000000..711e3b4
189 --- /dev/null
190 +++ b/sci-libs/opencascade/opencascade-6.5.4.ebuild
191 @@ -0,0 +1,184 @@
192 +# Copyright 1999-2012 Gentoo Foundation
193 +# Distributed under the terms of the GNU General Public License v2
194 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/opencascade/opencascade-6.5.ebuild,v 1.3 2012/09/16 10:18:52 pacho Exp $
195 +
196 +EAPI=4
197 +inherit autotools eutils check-reqs multilib java-pkg-opt-2 flag-o-matic versionator
198 +
199 +MY_PV=$(delete_all_version_separators)
200 +
201 +DESCRIPTION="Software development platform for CAD/CAE, 3D surface/solid modeling and data exchange"
202 +HOMEPAGE="http://www.opencascade.org/"
203 +SRC_URI="http://files.opencascade.com/OCCT/OCC_${PV}_release/OpenCASCADE${MY_PV}.tar.gz"
204 +
205 +LICENSE="Open-CASCADE-Technology-Public-License-6.5"
206 +SLOT="0"
207 +KEYWORDS="~amd64 ~x86"
208 +IUSE="debug doc examples gl2ps java"
209 +
210 +DEPEND="
211 + media-libs/ftgl
212 + virtual/glu
213 + virtual/opengl
214 + x11-libs/libXmu
215 + >=dev-lang/tcl-8.4
216 + >=dev-lang/tk-8.4
217 + >=dev-tcltk/itcl-3.2
218 + >=dev-tcltk/itk-3.2
219 + >=dev-tcltk/tix-8.4.2
220 + gl2ps? ( x11-libs/gl2ps )
221 +"
222 +RDEPEND=${DEPEND}
223 +
224 +S=${WORKDIR}/ros
225 +
226 +RESTRICT="bindist mirror"
227 +# http://bugs.gentoo.org/show_bug.cgi?id=352435
228 +# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
229 +
230 +CHECKREQS_MEMORY="256M"
231 +CHECKREQS_DISK_BUILD="3584M"
232 +
233 +pkg_setup() {
234 + check-reqs_pkg_setup
235 + java-pkg-opt-2_pkg_setup
236 +
237 + # Determine itk, itcl, tix, tk and tcl versions
238 + itk_version=$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/')
239 + itcl_version=$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/')
240 + tix_version=$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
241 + tk_version=$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
242 + tcl_version=$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')
243 +
244 + INSTALL_DIR=/usr/$(get_libdir)/${P}/ros
245 +
246 + ewarn " Please note that building OpenCascade takes a lot of time and "
247 + ewarn " hardware ressources: 3.5-4 GB free diskspace and 256 MB RAM are "
248 + ewarn " the minimum requirements. "
249 +}
250 +
251 +src_prepare() {
252 + java-pkg-opt-2_src_prepare
253 +
254 + sed \
255 + -e '/AM_C_PROTOTYPES/d' \
256 + -i configure.* || die
257 +
258 + # Substitute with our ready-made env.sh script
259 + cp -f "${FILESDIR}"/env.sh.template env.sh || die
260 +
261 + # Feed environment variables used by Opencascade compilation
262 + sed -i \
263 + -e "s:VAR_CASROOT:${S}:g" \
264 + -e 's:VAR_SYS_BIN:/usr/bin:g' \
265 + -e "s:VAR_SYS_LIB:/usr/$(get_libdir):g" env.sh \
266 + || die "Environment variables feed in env.sh failed!"
267 +
268 + # Tweak itk, itcl, tix, tk and tcl versions
269 + sed -i \
270 + -e "s:VAR_ITK:itk${itk_version}:g" \
271 + -e "s:VAR_ITCL:itcl${itcl_version}:g" \
272 + -e "s:VAR_TIX:tix${tix_version}:g" \
273 + -e "s:VAR_TK:tk${tk_version}:g" \
274 + -e "s:VAR_TCL:tcl${tcl_version}:g" env.sh \
275 + || die "itk, itcl, tix, tk and tcl version tweaking failed!"
276 +
277 + epatch "${FILESDIR}"/${PN}-${MY_PV}-fixed-DESTDIR.patch
278 +
279 + source env.sh
280 +
281 + append-cxxflags "-fpermissive"
282 +
283 + eautoreconf
284 +}
285 +
286 +src_configure() {
287 + # Add the configure options
288 + local confargs="--prefix=${INSTALL_DIR}/lin --exec-prefix=${INSTALL_DIR}/lin --with-tcl=/usr/$(get_libdir) --with-tk=/usr/$(get_libdir)"
289 +
290 + confargs+=" --with-freetype=/usr"
291 + confargs+=" --with-ftgl=/usr"
292 +
293 + use gl2ps && confargs+=" --with-gl2ps=/usr"
294 +
295 + if use java ; then
296 + confargs+=" --with-java-include=$(java-config -O)/include"
297 + else
298 + confargs+=" --without-java-include"
299 + fi
300 +
301 + econf ${confargs} \
302 + $(use_enable debug ) $(use_enable !debug production ) \
303 + || die "Configuration failed"
304 +}
305 +
306 +src_install() {
307 + emake DESTDIR="${D}" install
308 +
309 + # .la files kill cute little kittens
310 + find "${D}" -name '*.la' -exec rm {} +
311 +
312 + # Symlinks for keeping original OpenCascade folder structure and
313 + # add a link lib to $(get_libdir) if we are e.g. on amd64 multilib
314 + if [ "$(get_libdir)" != "lib" ]; then
315 + dosym "$(get_libdir)" "${INSTALL_DIR}/lin/lib"
316 + fi
317 +
318 + # Tweak the environment variables script again with new destination
319 + cp "${FILESDIR}"/env.sh.template env.sh
320 + sed -i "s:VAR_CASROOT:${INSTALL_DIR}/lin:g" env.sh || die
321 +
322 + # Build the env.d environment variables
323 + cp "${FILESDIR}"/env.sh.template 50${PN} || die
324 + sed -i \
325 + -e 's:export ::g' \
326 + -e "s:VAR_CASROOT:${INSTALL_DIR}/lin:g" \
327 + -e '1,2d' \
328 + -e '4,14d' \
329 + -e "s:/Linux/lib/:/$(get_libdir)/:g" ./50${PN} \
330 + || die "Creation of the /etc/env.d/50opencascade failed!"
331 +
332 + sed -i "2i\PATH=${INSTALL_DIR}/lin/bin\nLDPATH=${INSTALL_DIR}/lin/$(get_libdir)" ./50${PN} \
333 + || die "Creation of the /etc/env.d/50opencascade failed!"
334 +
335 + # Update both env.d and script with the libraries variables
336 + sed -i \
337 + -e 's:VAR_SYS_BIN:/usr/bin:g' \
338 + -e "s:VAR_SYS_LIB:/usr/$(get_libdir):g" \
339 + -e "s:VAR_ITK:itk${itk_version}:g" \
340 + -e "s:VAR_ITCL:itcl${itcl_version}:g" \
341 + -e "s:VAR_TIX:tix${tix_version}:g" \
342 + -e "s:VAR_TK:tk${tk_version}:g" \
343 + -e "s:VAR_TCL:tcl${tcl_version}:g" env.sh 50${PN} \
344 + || die "Tweaking of the Tcl/Tk libraries location in env.sh and 50opencascade failed!"
345 +
346 + # Install the env.d variables file
347 + doenvd 50${PN}
348 +
349 + cd "${S}"/../ || die
350 +
351 + if use examples; then
352 + insinto /usr/share/doc/${PF}/examples
353 + doins -r data
354 +
355 + insinto /usr/share/doc/${PF}/examples
356 + doins -r samples
357 + fi
358 +
359 + cd "${S}"/../doc || die
360 + dodoc *.pdf
361 +
362 + # Install the documentation
363 + if use doc; then
364 + insinto /usr/share/doc/${PF}
365 + doins -r {overview,ReferenceDocumentation}
366 + fi
367 +}
368 +
369 +pkg_postinst() {
370 + einfo
371 + elog "After upgrading OpenCASCADE you may have to rebuild packages depending on it."
372 + elog "You get a list by running \"equery depends sci-libs/opencascade\""
373 + elog "revdep-rebuild does NOT suffice."
374 + einfo
375 +}