You are not logged in.

#1 2003-10-02 13:41:06

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

povray package is difficult to get work

Hi,

I try to get the package for povray to work. After reading this thread here
I rebuild the package without checking the PKGBUILD. It forces you to have
your abs in /usr/abs - I don't have. I tweaked the PKGBUILD an dropped
the additional install file to this.

pkgname=povray
pkgver=3.5
pkgrel=1
pkgdesc=" The Persistence of Vision Raytracer is a high-quality, totally free tool for creating stunning three-dimensional graphics"
source=(ftp://ftp.povray.org/pub/povray/Official/Linux/povlinux.tgz)
url="http://www.povray.org/"
md5sums=('a28537c2551de1f3f317c234660d9634')

build() {
    cd $startdir/src/$pkgname-$pkgver
    # create a new installscript with new pathes 
    # redirect from /usr/local to /usr
    sed -e 's|/usr/local/|'$startdir'/pkg/usr/|g' < install > install2
    # /usr doesn't exist in $startdir/pkg
    # this why mkdir commands need to be extended with -p option
    sed -i 's|then mkdir /|then mkdir -p /|g' install2
    chmod a+x install2
    # correct the library pathes in the ini-file /usr/local -> /usr
    sed -i 's|/usr/local/share|/usr/share|g' povray.ini
    # the install script doesn't create the /usr/bin and /usr/etc dirs correctly
    # prepare the directories fixes the issue
    mkdir -p $startdir/pkg/usr/bin
    mkdir -p $startdir/pkg/usr/etc
    ./install2
}

this works now - with one exception: the conf and the ini files are placed
in /usr/etc. I didn't get povray to look up there. One workaround is to place
the in ~/.povray.ini and ~/.povray.conf, but it doesn't help much. As soon
as you try to use include files from povray that beast will in /usr/local/share/povray3-5/include. I didn't get that redirected by the conf
or the ini file. ...grmpf...

there are two option now to get povray working on arch now:
1. q&d move it tu usr/local and violate the archer rules
2. we hire a wizard, who can compile that beast on arch ( I tried and failed at the second binary, I'm not a wizard, I know sad  )

any suggestions comments ideas?

bye neri

Offline

#2 2003-10-02 16:46:17

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 553

Re: povray package is difficult to get work

neri wrote:

any suggestions comments ideas?


Yes, indeed, I do have a suggestion to myself  _RTFM_ (Kamasutra so to say)
wink

There is a nice little section in the README which tells me to edit a *.h file.

And finally i got it working  big_smile
Here is the PKGBUILD to build it from the source.

# Contributor: Tobias Kieslich <tobias@justdreams.de>
#
pkgname=povray
pkgver=3.50c
pkgrel=1
pkgdesc="The Persistence of Vision Raytracer is a high-quality, totally free tool for creating stunning three-dimensional graphics"
depends=('glibc' 'xfree86' 'libpng' 'libtiff' 'libjpeg' 'zlib')
source=(ftp://ftp.povray.org/pub/povray/Official/Linux/povuni_s.tgz)
url="http://www.povray.org/"

build() {
    cd $startdir/src/$pkgname-$pkgver
    # tweak povray.ini to /usr - ./configure doesn't work here ...grmpf...
    sed -i "s|/usr/local/share|/usr/share|g" povray.ini
    
    # get rid of the error, which turns out to be a tricky disclaimer
    # this is described in the README
    cd $startdir/src/$pkgname-$pkgver/src
    head -48 optout.h > optout.x
    tail -45 optout.h >> optout.x
    mv -f optout.x optout.h
    sed -i "s|DISTRIBUTION_MESSAGE_2.*$|DISTRIBUTION_MESSAGE_2 "Archlinux -- official distribution package"|g" optout.h
    
    # configure it - I'm not sure about that x switch, my guess would be that it enables
    # a popup window where you can watch the progress
    cd ..
    ./configure --prefix=/usr --with-x
    
    # The ./configure file doesn't pay any attention to your flags and the used flags are
    # hardcoded to -O3 which fails from time to time
    # I tried to switch that to i686 architecture and -O2
    cd src
    sed -i "s|-O3|-O2|g" Makefile
    sed -i "s|-mcpu=i586|-mcpu=i686|g" Makefile
    sed -i "s|-march=i586|-march=i686|g" Makefile
    sed -i "s|-O2 -finline|-O2 -march=i686 -mcpu=i686 -finline|g" Makefile
    
    # ...and finally as always...
    cd ..
    make
    make DESTDIR=$startdir/pkg install
}

I'm not the the guru of compiler issues and Makefiles. If someone else could
revise that compiler-flag section would be helpful. Other remarks are in
the comments. Maybe also a "--sysconfdir=/etc" is better than move the
confs to /usr/etc - Do we have guidelines on this?

Hope you like it - for me it works better than the original package.

bye neri

PS. I won't upload it to incoming until:
1. Somone revised the compiler flags
2. I will have access to my laptop again, which is a "out of the box"
installation (no self-compiled libraries)

Offline

Board footer

Powered by FluxBB