diff options
author | danieltourde <danieltourde@32389bae-6d03-0410-99cf-db05cde120eb> | 2008-05-12 17:38:36 +0000 |
---|---|---|
committer | danieltourde <danieltourde@32389bae-6d03-0410-99cf-db05cde120eb> | 2008-05-12 17:38:36 +0000 |
commit | 2dc58c2cf03202d6824c47c7a76f343a43ad4c71 (patch) | |
tree | ff398550746d8e0f0f297844e76bfb136336411c /sci-libs/opencascade | |
parent | OpenCascade belongs to sci-libs, not sci-misc. OpenCascade being fundamentall... (diff) | |
download | sci-2dc58c2cf03202d6824c47c7a76f343a43ad4c71.tar.gz sci-2dc58c2cf03202d6824c47c7a76f343a43ad4c71.tar.bz2 sci-2dc58c2cf03202d6824c47c7a76f343a43ad4c71.zip |
Bump to opencascade-6.2-r1
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1052 32389bae-6d03-0410-99cf-db05cde120eb
Diffstat (limited to 'sci-libs/opencascade')
-rw-r--r-- | sci-libs/opencascade/ChangeLog | 6 | ||||
-rw-r--r-- | sci-libs/opencascade/Manifest | 3 | ||||
-rw-r--r-- | sci-libs/opencascade/opencascade-6.2-r1.ebuild | 232 |
3 files changed, 239 insertions, 2 deletions
diff --git a/sci-libs/opencascade/ChangeLog b/sci-libs/opencascade/ChangeLog index ae23ab708..90d92d562 100644 --- a/sci-libs/opencascade/ChangeLog +++ b/sci-libs/opencascade/ChangeLog @@ -1,6 +1,10 @@ -# ChangeLog for sci-misc/opencascade +# ChangeLog for sci-libs/opencascade # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 12 May 2008; Daniel Tourde <daniel.tourde@caelae.se> + +opencascade-6.2-r1.ebuild + General improvement of the ebuild, better amd64 support, removal of the wok and draw-harness flags (They had no effects). Many thanks to Dewald Pieterse and Álvaro Castro Castilla. + See bug #118656 for anything relating the building process. 15 Jan 2008; Sébastien Fabbro <bicatali@gentoo.org> +files/opencascade-6.2-gcc4.patch, +files/opencascade-6.2-malloc.patch, diff --git a/sci-libs/opencascade/Manifest b/sci-libs/opencascade/Manifest index d52e55c47..a710e9ab0 100644 --- a/sci-libs/opencascade/Manifest +++ b/sci-libs/opencascade/Manifest @@ -5,6 +5,7 @@ DIST opencascade-6.2.tar.bz2 48068224 RMD160 750d80fec0a3c4d9c26613f93ed819a649b DIST opencascade-samples-java-6.2.tar.bz2 538012 RMD160 2b570eee63c9eff2f370b7973e1d12bb9718332c SHA1 9bd8d7596e882a6608781d4967453cc002efdd8d SHA256 636dbda1a0584e00aca243546a3e14b8891ffebeca7d3e3dc940b4f0f6c6a30a DIST opencascade-samples-qt-6.2.tar.bz2 42553 RMD160 3cec392ef9973ab74c1cd404bdc35d5a4e652807 SHA1 46515926973f09dcf3e2347cecfe025ee8621735 SHA256 45b8ab70f06377196a6f3f3170cafcabb8520d091030400346006a0c2521dc1d DIST opencascade-tutorial-6.2.tar.bz2 40245 RMD160 638c86493a67aeea97870ca1d38a91d403eb0661 SHA1 c2cc31fafcdaecda60c51b351339de9910fe2b7e SHA256 d5d7dae21a61f0944af7ff4987b5274c48308a670e94350d2477c499720d1784 +EBUILD opencascade-6.2-r1.ebuild 7675 RMD160 d68f44be9e599bf5d7f3a0c7a2734d251bf9462c SHA1 70c752dae98e9db56a6c102f0ca694ed10220a50 SHA256 b9aa7dc3987917f4680b006853b9b516202d30f08455deb5cb9d55b7b078ede8 EBUILD opencascade-6.2.ebuild 8014 RMD160 a124ebc1ed45f3a0ff4d13406667917a1904ae69 SHA1 f3a3ad72eca7a278a06e89769aee0cdcfb968878 SHA256 95c2dcc377648c22cc05b8640f3cdbe399f175f2d92e3e07add5b35102a5d66a -MISC ChangeLog 492 RMD160 f538b2ac0bb79a483613b199136958087e54cdd5 SHA1 1b84978052daeee95190dca92408667ecbbd2b96 SHA256 ae297d798ce6018bb1ab096ee143cfe0b37b204b4e9ee1f2d863f8c8a807b4e4 +MISC ChangeLog 822 RMD160 df96cf3f1fd7c6cd26becf768b6261286167756e SHA1 14eba7b19d402d183671bdc4974c1e5a17164786 SHA256 0d7f402c06f7d059adc17a5e3ec34b0824d2b5fdaf0fbe41b9cadd8fbea16c58 MISC metadata.xml 157 RMD160 ed43b99e7bf8bbf62cf4e46152138ab42d3a88c5 SHA1 2182a6de0b10959aad51af2990f1a6c69e34dd97 SHA256 750cb9e46ac2b77e1adf73de43c186a8c2d2234a9c6a89d9358d0969dc5cf8ac diff --git a/sci-libs/opencascade/opencascade-6.2-r1.ebuild b/sci-libs/opencascade/opencascade-6.2-r1.ebuild new file mode 100644 index 000000000..2828894e8 --- /dev/null +++ b/sci-libs/opencascade/opencascade-6.2-r1.ebuild @@ -0,0 +1,232 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit autotools eutils flag-o-matic qt3 check-reqs multilib toolchain-funcs versionator + +DESCRIPTION="Software development platform for CAD/CAE, 3D surface/solid modeling and data exchange." +HOMEPAGE="http://www.opencascade.org" +SRC_URI="ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/thierry/${P}.tar.bz2 + ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/thierry/${PN}-tutorial-${PV}.tar.bz2 + java? (ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/thierry/${PN}-samples-java-${PV}.tar.bz2) + qt3? (ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/thierry/${PN}-samples-qt-${PV}.tar.bz2)" + +# NOTES +# The source code here is not in the same form than the one distributed on www.opencascade.org +# The source available on www.opencascade.org requires a Java installation procedure that does not +# always work on Gentoo. The source code can however be extracted 'by hand' using +# 'java -cp ./Linux/setup.jar' +# and removing 'by hand' all the existing Linux binaries. The source code extracted using this +# method is currently available on the FreeBSD ftp server. +# It could be possible to download the Salome binary for linux (500Mb...) and to extract the source from there. + + +LICENSE="Open-CASCADE-Technology-Public-License" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="debug doc java opengl qt3 stlport X" +DEPEND="java? ( virtual/jdk ) + opengl? ( virtual/opengl + virtual/glu) + X? ( x11-libs/libXmu + app-text/dgs ) + >=dev-lang/tcl-8.4 + >=dev-lang/tk-8.4 + >=dev-tcltk/itcl-3.2 + >=dev-tcltk/itk-3.2 + x86? ( >=dev-tcltk/tix-8.1 ) + amd64? ( >=dev-tcltk/tix-8.4.2 ) + qt3? ( x11-libs/qt:3 ) + stlport? ( dev-libs/STLport )" + +# Determine itk, itcl, tix, tk and tcl versions + itk_version=$(grep ITK_VER /usr/include/itk.h | sed 's/^.*"\(.*\)".*/\1/') + itcl_version=$(grep ITCL_VER /usr/include/itcl.h | sed 's/^.*"\(.*\)".*/\1/') + tix_version=$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/') + tk_version=$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/') + tcl_version=$(grep TCL_VER /usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/') + + +pkg_setup() { + ewarn + ewarn " It is important to note that OpenCascade is a very large package. " + ewarn " Please note that building OpenCascade takes a lot of time and " + ewarn " hardware ressources: 3.5-4 GB free diskspace and 256 MB RAM are " + ewarn " the minimum requirements. " + ewarn + + # Check if we have enough RAM and free diskspace to build this beast + CHECKREQS_MEMORY="256" + CHECKREQS_DISK_BUILD="3584" + check_reqs +} + + +src_unpack() { + unpack ${A} + + # Substitute with our ready-made env.ksh script + cp -f "${FILESDIR}"/env.ksh.template "${S}"/ros/env.ksh + + # Feed environment variables used by Opencascade compilation + cd "${S}"/ros + sed -i \ + -e "s:VAR_CASROOT:${S}/ros:g" \ + -e 's:VAR_SYS_BIN:/usr/bin:g' \ + -e "s:VAR_SYS_LIB:/usr/$(get_libdir):g" env.ksh \ + || die "Environment variables feed in env.ksh failed!" + + # Tweak itk, itcl, tix, tk and tcl versions + sed -i \ + -e "s:VAR_ITK:itk${itk_version}:g" \ + -e "s:VAR_ITCL:itcl${itcl_version}:g" \ + -e "s:VAR_TIX:tix${tix_version}:g" \ + -e "s:VAR_TK:tk${tk_version}:g" \ + -e "s:VAR_TCL:tcl${tcl_version}:g" env.ksh \ + || die "itk, itcl, tix, tk and tcl version tweaking failed!" + + # Patches + if [ $(gcc-major-version) -qt "4" ] ; then + elog "You have gcc4 -> GCC 4.x patch is applied" + epatch "${FILESDIR}"/opencascade-6.2-gcc4.patch + fi + elog "Stdlib malloc patch is applied" + epatch "${FILESDIR}"/opencascade-6.2-malloc.patch + chmod u+x configure + + # Autotools version update + source env.ksh + eaclocal || die "eaclocal failed" + eautoheader || die "eautoheader failed" + eautomake -a -c -f + _elibtoolize --force --copy || die "elibtoolize failed" + eautoconf || die "eautoconf failed" +} + +src_compile() { + cd "${S}"/ros + + # Add the configure options + local confargs="--prefix=/opt/${P}/ros/lin --with-tcl=/usr/$(get_libdir) --with-tk=/usr/$(get_libdir)" + + if use X ; then + if use !opengl; then + ewarn "Activate OpenGL if you want to be able to visualize geometry. Set "opengl" USE flag." + fi + else + if use opengl; then + die "OpenGL imply X support! Add "X" USE flag." + else + ewarn "Activate X and OpenGL if you want to be able to visualize geometry. Set "X" and "opengl" USE flags." + fi + fi + + if use java ; then + local java_path + java_path=`java-config -O` + else + ewarn "Java wrapping is not going to be compiled. USE flag: "java"" + fi + + # Compiler and linker flags + if use amd64 ; then + append-flags -m64 + fi + append-ldflags -lpthread + +# NOTES: To clearly state --with-stlport-include and --with-stlport-library cause troubles. I don't know why.... +# So, these are not defined in the following econf command. + + econf ${confargs} \ + $(use_with X x ) \ + $(use_with X xmu ) \ + $(use_with X xmu-include /usr/include) \ + $(use_with X xmu-library /usr/$(get_libdir)) \ + $(use_with X dps-include /usr/include) \ + $(use_with X dps-library /usr/$(get_libdir)) \ + $(use_with opengl gl ) \ + $(use_with opengl gl-include /usr/include ) \ + $(use_with opengl gl-library /usr/$(get_libdir)) \ + $(use_enable java jcas) \ + $(use_with java java-include ${java_path}/include/linux) \ + $(use_enable debug ) \ + $(use_enable !debug production ) \ + $(use_with stlport stlport-libname stlport_gcc) \ + || die "Configuration failed" + + emake || die "Compilation failed" +} + + +src_install() { + cd "${S}"/ros + rm *~ + emake install DESTDIR="${D}" || die "Installation failed" + + # Symlinks for keeping original OpenCascade folder structure and + # add a link lib to lib64 in ros/Linux if we are on amd64 + dosym /opt/${P}/ros/lin /opt/${P}/ros/Linux + if use amd64 ; then + dosym /opt/${P}/ros/lin/lib64 /opt/${P}/ros/lin/lib + fi + + # Tweak the environment variables script + cp "${FILESDIR}"/env.ksh.template env.ksh + sed -i "s:VAR_CASROOT:/opt/${P}/ros:g" env.ksh + + # Build the env.d environment variables + cp "${FILESDIR}"/env.ksh.template 50${PN} + sed -i \ + -e 's:export ::g' \ + -e "s:VAR_CASROOT:/opt/${P}/ros:g" \ + -e '1,2d' \ + -e '4,14d' \ + -e "s:ros/Linux/lib/:ros/Linux/$(get_libdir)/:g" ./50${PN} \ + || die "Creation of the /etc/env.d/50opencascade failed!" + sed -i "2i\PATH=/opt/${P}/ros/Linux/bin/\nLDPATH=/opt/${P}/ros/Linux/$(get_libdir)" ./50${PN} \ + || die "Creation of the /etc/env.d/50opencascade failed!" + + # Update both env.d and script with the libraries variables + sed -i \ + -e 's:VAR_SYS_BIN:/usr/bin:g' \ + -e "s:VAR_SYS_LIB:/usr/$(get_libdir):g" \ + -e "s:VAR_ITK:itk${itk_version}:g" \ + -e "s:VAR_ITCL:itcl${itcl_version}:g" \ + -e "s:VAR_TIX:tix${tix_version}:g" \ + -e "s:VAR_TK:tk${tk_version}:g" \ + -e "s:VAR_TCL:tcl${tcl_version}:g" env.ksh 50${PN} \ + || die "Tweaking of the Tcl/Tk libraries location in env.ksh and 50opencascade failed!" + + # Install the env.d variables file + doenvd 50${PN} + rm 50${PN} env.csh + + # Clean before copying everything + cd "${S}"/ros + emake clean || die "emake clean failed" + + # Install folders + cd "${S}" + insinto /opt/${P} + doins -r data ros tools wok + insinto /opt/${P}/samples + doins -r samples/tutorial + if use java ; then + insinto /opt/${P}/samples/standard + doins -r samples/standard/java + fi + if use qt3 ; then + insinto /opt/${P}/samples/standard + doins -r samples/standard/qt + fi + + # Install the documentation + if use doc ; then + cd "${S}"/doc + dodoc *.pdf ../LICENSE || die "dodoc failed" + fi +} + +pkg_postinst() { + einfo "Open CASCADE ebuild needs further development. Please inform any problems or improvements in http://bugs.gentoo.org/show_bug.cgi?id=118656" +} |