Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
pkgname=opencascade
pkgver=6.3.0
pkgrel=10
pkgdesc="Software development platform including components for 3D surface and solid modeling, visualization, data exchange and rapid application development."
url="http://www.opencascade.org"
license="custom"
depends=('tk' 'mesa' 'java-runtime')
makedepends=('autoconf' 'patch' 'coreutils' 'sed' 'make' 'gcc' 'java-environment')
provides=()
conflicts=()
options=()
replaces=()
arch=('i686' 'x86_64')
backup=()
install=(opencascade.install)
source=('http://files.opencascade.com/OCC_6.3_release/OpenCASCADE_src.tgz' 'env.sh' 'opencascade-6.3.0sp9.diff' 'lib-release.patch' 'opencascade.sh' 'opencascade.conf')
# Installation dir
_installdir=/opt/opencascade
build() {
cd "${srcdir}/OpenCASCADE${pkgver}" || return 1
# Apply patch available on www.salome-platform.org for Service Pack 9
# applying this patch we should obtain something symilar to version 6.3.1
patch -Np1 -i "${srcdir}/opencascade-6.3.0sp9.diff" || return 1
# Apply a patch taken from debian site (thanks to debian maintainers)
# lib-release.patch - without this patch release number of the libraries is 0.0.0
patch -Np1 -i "${srcdir}/lib-release.patch" || return 1
cd "${srcdir}/OpenCASCADE${pkgver}/ros" || return 1
# Set variables necessary to compile th package
export CXXFLAGS=$CXXFLAGS" -ffriend-injection -fpermissive"
export CASROOT="\"${srcdir}/${pkgname}-${pkgver}/ros\""
rm env.csh env.ksh || return 1
source "${srcdir}/env.sh"
# Adjusts reference to X11 libraries and headers
for _FILE in `grep -R -l "/usr/X11R6/lib" src/*`
do
sed -e "s|/usr/X11R6/lib|/usr/lib/X11|g" -i $_FILE
done
for _FILE in `grep -R -l "/usr/X11R6/include" src/*`
do
sed -e "s|/usr/X11R6/include|/usr/include/X11|g" -i $_FILE
done
# Adjusts DESTDIR prefix in Makefile.am and reconfigures files
sed -e "s| \$(prefix)| \$(DESTDIR)\$(prefix)|g" -i Makefile.am
autoreconf -f -i
# And now we can build our libraries...
./configure --with-tcl=/usr/lib --with-tk=/usr/lib --disable-debug --enable-production --with-java-include=${JAVA_HOME}/include --prefix=${_installdir} || return 1
make || return 1
}
package(){
cd "${srcdir}/OpenCASCADE${pkgver}/ros" || return 1
make install DESTDIR="${pkgdir}" || return 1
# I prefer having a link to a more standard dir
ln -s ./inc "${pkgdir}${_installdir}/include" || return 1
# Install a file containing instruction necessary to link againt these libraries
install -D -m644 "${srcdir}/opencascade.conf" "${pkgdir}/etc/ld.so.conf.d/opencascade.conf" || return 1
my configure line is
./configure --with-tcl=/usr/lib64 --with-tk=/usr/lib64 --disable-debug --enable-production --prefix=/opt/opencascade
obviously i would
make DESTDIR=/some/path/openCascade-6.3.0-root install,
cd to my top dir, and run rpmbuild -bb -v with an opencacscade.spec without the build section... ( it would have been built already ) just to package it...
but i don't even get to build the thing... that's why i wish there was an rpm for x86_64 already packed...
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[alex@iskandhar ~]$
I'm using Scientific Linux 5.5 ( same as Rhel 5.5 or CentOS 5.5 ) with latest updates :
Quote:
[alex@iskandhar ~]$ su root
Password:
[root@iskandhar alex]# yum update
Loaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, filter-
: data, kernel-module, kmod, list-data, merge-conf, priorities, protect-
: packages, protectbase, refresh-updatesd, tsflags, upgrade-helper,
: versionlock
Loading mirror speeds from cached hostfile
* epel: ftp.gui.uva.es
* sl-base: ftp1.scientificlinux.org
* sl-security: ftp1.scientificlinux.org
Skipping filters plugin, no data
130 packages excluded due to repository priority protections
0 packages excluded due to repository protections
Reading version lock configuration
Setting up Update Process
No Packages marked for Update
[root@iskandhar alex]#
I will try to follow this pkgbuild thing by hand, patching, seding, etc, and run like this :
Quote:
Neal,
Looks like the libtool (version 1.4.3) used to build the distribution was broken. As such, the shared library extension (*.so) is not added to the output library names (hence libTKMath.0.0.0 instead of libTKMath.so.0.0.0).
I was able to get a successful installation using libtool 1.5.6 on my CentOS 4.6 x86_64 machine. Basically, you have to re-run `libtoolize --force` in the "ros" directory prior to running `configure`. Again, this must be done before running `configure`. For me this involved:
% cd OpenCASCADE6.3.0/ros
% libtoolize --force
% mkdir build
% cd build
% ../configure --prefix=/usr/local/pkgs/OpenCASCADE-6.3.0 --with-gl-include=/usr/include --with-gl-library=/usr/lib --x-libraries=/usr/X11R6/lib --with-xmu-include=/usr/X11R6/include/X11 --with-xmu-library=/usr/X11R6/lib --with-tcl=/usr/lib --with-tk=/usr/lib --with-java-include=/usr/java/default/include --disable-debug --enable-production --enable-draw --enable-wok CC="gcc -m32" CXX="g++ -m32"
% make
% make install
This resulted in an installation of the binaries, includes, and libraries in my "--prefix" path.
% ls /usr/local/pkgs/OpenCASCADE-6.3.0
bin config.h env_DRAW.sh inc lib lin Linux src
taking into account that this is a CentOS 5.5 like thing not a CentOS 4.6
... this is only 630 Mb of source code... takes a "while" to compile...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.