Openoffice da sorgenti

Postate qui se avete consigli per migliorare i pacchetti disponibili in questo sito o se avete problemi con installazione, funzionamento o altro.

Moderatore: Staff

Regole del forum
1) Citare in modo preciso il nome del pacchetto.
2) Specificare se discussione/suggerimento o richiesta d'aiuto.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Avatar utente
diego
Linux 2.x
Linux 2.x
Messaggi: 333
Iscritto il: ven 1 apr 2005, 0:00

Openoffice da sorgenti

Messaggio da diego »

Ciao a tutti,

Ho avuto la "malsana" idea di abbozzare uno slackbuild che mi
compilasse openoffice dai sorgenti.
E' da qualche mese che ci sto lavorando, a singhiozzo nelle pause pranzo.
Avevo inziato co go-oo poi e' uscita la 3.1 di oo e ho cambiato rotta.
Lo script ha l'unico pregio di prendere i sorgenti e compilarli, il make finale
genera gli rpm (in italiano) e da questi pacchettizzo il tgz.
Lo sto usando sul pc di lavoro da qualche settimana (12.1), veloce e non
crasha, neanche con varie estensioni installate come l'import pdf.
Ho un unico problema: i menu di Impression e Draw sono incompleti (e
solo quelli), mancano di alcune voci, o meglio le voci ci sono, si cliccano
ma non si vedono le scritte, errori di compilazione non ne ho visto.
Sono riuscito a provarlo anche su una slackware 12.2 nuova di zecca con
xfce ma il problema rimane.
Se a qualcuno puo' interessare e magari mi puo' dare una mano a capire il
problema piu' sotto trovate lo script.

Avverto che lo script si prende il suo tempo (nell'ordine delle ore)
anche su pc abbastanza recenti.
Le dipendenze piu' importanti sono il java jdk (in extra) e apache-ant.
Inoltre richiede i moduli perl:
Archive-Zip
Compress-Raw-Zlib
Compress-Zlib
IO-Compress-Base
IO-Compress-Zlib
(se volete ho anche gli SB di quest'ultimi)


# cat OOo.SlackBuild

Codice: Seleziona tutto

#!/bin/sh
# Copyright 2009 Loris Vincenzi (http://www.slacky.eu)
# All rights reserved.
#
# Heavily based on the Slackware 12.2 SlackBuild
# http://www.openoffice.org/
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

CWD=`pwd`
TMP=${TMP:-/tmp/tgz}
PKG=$TMP/package-ooo
NAME=OOo
VERSION=3.1.0
CHOST=i486
ARCH=${ARCH:-i486}
BUILD=1ld

SOURCES=$NAME-build-$VERSION
COMPONENT="binfilter core extensions l10n system testautomation"
URL=http://ooo.mirror.garr.it/mirrors/openoffice/stable/$VERSION/

SOURCES=""
for file in $COMPONENT
do
    SOURCES+="$NAME"_"$VERSION"_src_"$file".tar.bz2" "
done

for source in $SOURCES
do
    if [ ! -e $source ]; then
	wget -c $URL$source
	if [[ "$?" > "0" ]]
	then
	    echo -e "Sorgente $source non trovato\n"
	    exit
	fi
    fi
done

# Scarico i sorgenti di Mozilla
if [ ! -e mozilla-source-1.7.5.tar.bz2 ]; then
    wget http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.5/source/mozilla-source-1.7.5.tar.bz2
fi


if [ "$ARCH" = "i386" ]; then
  SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2"
fi

if [ ! -d $TMP ]; then
 mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
 mkdir -p $PKG
fi


cd $TMP
## Scarico i Sorgenti
for source in $SOURCES
do
    if [ -e $CWD/$source ]; then
	tar xjvf $CWD/$source
	if [[ "$?" > "0" ]]
	then
	    echo -e "Sorgente $source non e' un tar.bz2\n"
	    exit
	fi
    fi
done

SOURCETGZ=`find . -type d -maxdepth 1 | grep OOO`
cd $SOURCETGZ

(
    cd moz/download
    echo `pwd`
    if [ ! -e mozilla-source-1.7.5.tar.bz2 ]; then
	cp $CWD/mozilla-source-1.7.5.tar.bz2 .
    fi
)

## Sistemo i Permessi
find . \( -perm 777 -o -perm 775 -o -perm 711 \) -exec chmod 755 {} \;
find . \( -perm 700 -o -perm 555 -o -perm 511 \) -exec chmod 755 {} \;
find . \( -perm 666 -o -perm 664 -o -perm 600 \) -exec chmod 644 {} \;
find . \( -perm 444 -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
chown -R root:root .

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \

./configure --prefix=/usr \
--datarootdir=/usr/share \
--docdir=/usr/doc/$NAME-$VERSION \
--with-installed-ooo-dirname=openoffice.org \
--sysconfdir=/etc \
--mandir=/usr/man \
--disable-pam \
--disable-kde \
--disable-odk \
--disable-lockdown \
--disable-gconf \
--disable-cairo \
--disable-opengl \
--enable-dbus \
--disable-gio \
--disable-pam \
--disable-pam-link \
--disable-xrender-link \
--disable-gnome-vfs \
--with-mozilla-toolkit=gtk2 \
--without-system-lucene \
--without-system-hsqldb \
--without-system-beanshell \
--without-system-saxon \
--without-system-vigra \
--without-system-mozilla \
--with-java \
--with-lang="it" \
--with-dict=ENGB,ENUS,ITIT \
--with-unix-wrapper=ooffice \
--with-build-version="Built by Diego @ slacky.it" \
--with-x


make all || exit 1


( 
cd $PKG
mkdir tmp
cd tmp
find $TMP/$SOURCETGZ/instsetoo_native/unxlngi6.pro/OpenOffice/rpm/install/it/RPMS -iname "*.rpm" -maxdepth 1 -exec rpm2tgz {} \;
find $TMP/$SOURCETGZ/instsetoo_native/unxlngi6.pro/OpenOffice/rpm/install/it/RPMS/desktop-integration/ -iname "*freedesktop*.rpm" -maxdepth 1 -exec rpm2tgz {} \;
cp $TMP/$SOURCETGZ/instsetoo_native/unxlngi6.pro/OpenOffice/rpm/install/it/RPMS/desktop-integration/*freedesktop*.tgz .
cd ..
find tmp/  "*.tgz" -exec explodepkg {} \;
rm -rf tmp
)

# Sistemo alcuni link
( cd $PKG/usr/share/applications ; rm -rf openoffice.org3-startcenter.desktop )
( cd $PKG/usr/share/applications ; ln -sf /opt/openoffice.org3/share/xdg/qstart.desktop openoffice.org3-startcenter.desktop )
( cd $PKG/usr/bin ; rm -rf ooffice )
( cd $PKG/usr/bin ; ln -sf /usr/bin/openoffice.org3 ooffice )
( cd $PKG/usr/bin ; rm -rf ooffice-printeradmin )
( cd $PKG/usr/bin ; ln -sf /usr/bin/openoffice.org3-printeradmin ooffice-printeradmin )


cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
#find $PKG/usr/man -type f -exec gzip -9 {} \;

mkdir -p $PKG/usr/doc/$NAME-$VERSION
mkdir -p $PKG/install
echo "update-desktop-database -q /usr/share/applications" >> $PKG/install/doinst.sh
echo "update-mime-database /usr/share/mime" >> $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
requiredbuilder -v -y -s $CWD $PKG
makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz

if [ "$1" = "--cleanup" ]; then
  rm -rf $TMP
fi
# cat slack-desc

Codice: Seleziona tutto

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in.  You must make
# exactly 11 lines for the formatting to be correct.  It's also customary to
# leave one space after the ':'.

   |-----handy-ruler-------------------------------------------------------|
OOo: OpenOffice.org
OOo:
OOo: E' una suite per ufficio completa, rilasciata con una licenza libera
OOo: e Open Source che ne consente la distribuzione gratuita. Legge e 
OOo: scrive file nei formati utilizzati dai prodotti più diffusi sul 
OOo: mercato e, a garanzia della futura accessibilità dei dati, nel formato
OOo: OpenDocument, standard ISO. Consente inoltre l'esportazione in formato
OOo: PDF.
OOo: 
OOo: http://www.openoffice.org/
OOo: Packager: diego @ slacky.it
Grazie e Ciao
Diego

Avatar utente
twister
Staff
Staff
Messaggi: 1599
Iscritto il: mar 11 nov 2003, 0:00
Slackware: current
Località: Roma
Contatta:

Re: Openoffice da sorgenti

Messaggio da twister »

Capisco il fine didattico, ma c'è già lo script di submax82 (openoffice-autobuilder-multilang) che fa quel lavoro, magari chiedi a lui ;)

Avatar utente
ildiama
Linux 3.x
Linux 3.x
Messaggi: 536
Iscritto il: mar 27 dic 2005, 16:49
Slackware: mine
Kernel: 2.6.alto..
Desktop: KDE4
Località: Senigallia
Contatta:

Re: Openoffice da sorgenti

Messaggio da ildiama »

twister ha scritto:Capisco il fine didattico, ma c'è già lo script di submax82 (openoffice-autobuilder-multilang) che fa quel lavoro, magari chiedi a lui ;)
Non è per niente uguale! Questo script compila OOO da sorgenti, quello di submax82 e loris crea "solo" il .tgz a partire da binari precompilati.

Domande per Diego:
1) perchè disabilitare il supporto per kde, cairo e opengl? (gli ultimi due forse risolvono il tuo problema)
2) non si può evitare di creare gli rpm, visto che compili tutto tu?
3) non hai proprio un beep da fare nelle pause pranzo :D

Avatar utente
twister
Staff
Staff
Messaggi: 1599
Iscritto il: mar 11 nov 2003, 0:00
Slackware: current
Località: Roma
Contatta:

Re: Openoffice da sorgenti

Messaggio da twister »

Pardon mi son confuso, allora buon lavoro, anche te hai poco da fare nelle pause pranzo :D

Avatar utente
diego
Linux 2.x
Linux 2.x
Messaggi: 333
Iscritto il: ven 1 apr 2005, 0:00

Re: Openoffice da sorgenti

Messaggio da diego »

@ildiama
Domande per Diego:
1) perchè disabilitare il supporto per kde, cairo e opengl? (gli ultimi due forse risolvono il tuo problema)
L' unico motivo e' che non uso kde (ma bensi xfce) e non ho effetti 3D abilitati, e siccome il
core duo a 3GHz (al lavoro) impiegava molto tempo ho cercato di lasciare abilitato
lo stretto necessario che mi poteva servire sacrificando quello che credevo superfluo,
ma che forse superfluo non e' ... comunque mi hai dato una buona idea, ci riprovo
e spero di non incappare in altre dipendenze
2) non si può evitare di creare gli rpm, visto che compili tutto tu?
da quello che ho visto il make all di suo crea gli rpm
non ho visto la possibilita' di fare un make & make install $DESTDIR
3) non hai proprio un beep da fare nelle pause pranzo :D
eheh, devo buttar giu panza, quindi invece di mangiare faccio Slack-body-build :D
e Grazie per il suggerimento

@twister
Grazie

Avatar utente
ildiama
Linux 3.x
Linux 3.x
Messaggi: 536
Iscritto il: mar 27 dic 2005, 16:49
Slackware: mine
Kernel: 2.6.alto..
Desktop: KDE4
Località: Senigallia
Contatta:

Re: Openoffice da sorgenti

Messaggio da ildiama »

diego ha scritto: da quello che ho visto il make all di suo crea gli rpm
non ho visto la possibilita' di fare un make & make install $DESTDIR
Dai, magari risparmi due o tre minuti sulle sei ore di compilazione ;)
diego ha scritto: eheh, devo buttar giu panza, quindi invece di mangiare faccio Slack-body-build :D
:lol:

Avatar utente
IamSOMBER
Linux 2.x
Linux 2.x
Messaggi: 228
Iscritto il: mar 8 nov 2005, 15:49
Nome Cognome: Mirko
Slackware: Slackware64 current
Kernel: 3.16.7
Desktop: KDE 4.14.2
Località: Matelica (MC)
Contatta:

Re: Openoffice da sorgenti

Messaggio da IamSOMBER »

Ho un unico problema: i menu di Impression e Draw sono incompleti (e
solo quelli), mancano di alcune voci, o meglio le voci ci sono, si cliccano
ma non si vedono le scritte
Se il problema è questo prova a cambiare tema di kde. Io avevo un problema simile ed ha funzionato...fammi sapere.

Avatar utente
submax82
Staff
Staff
Messaggi: 3202
Iscritto il: mer 31 ago 2005, 0:00
Desktop: xfce
Distribuzione: SalixOS
Contatta:

Re: Openoffice da sorgenti

Messaggio da submax82 »

ha ragione, il mio builder è molto diverso, parte dagli rpm dei binari già compilati ufficialmente da openoffice.org e coverte tutto in un tgz bello pulito 8)

invece per lo slackbuild postato dovrete avere molta pazienza nell'attesa della compilazione :!: :!: :!:

comunque ottimo lavoro :thumbright:

per le voci devi forzare l'integrazione gnome, quella kde non è più sviluppata! si sta muovendo qualcosa per l'integrazione con kde4...

Avatar utente
diego
Linux 2.x
Linux 2.x
Messaggi: 333
Iscritto il: ven 1 apr 2005, 0:00

Re: Openoffice da sorgenti

Messaggio da diego »

... allora
ho provato ad abilitare cairo e opengl, non richiede ulteriori dipendenze,
purtroppo i menu ancora non si vedono.
Uso xfce e non ho installati ne kde ne gnome (ma vedro' di installarli per fare
uno script abbastanza generico che possa andar bene a tutti)
Ho provato a cambiare un paio di temi, ma ancora niente.
Ora installo gnome (almeno le dipendenze per lo script) e provo a forzare
l'integrazione come suggerito submax82, praticamente
--enable-lockdown
--enable-gconf
--enable-gnome-vfs
spero di aver capito bene, ci vorra' un po' di pazienza pero' ma vi terro' aggiornati
e ringrazio per i suggerimenti.

Ciao

Avatar utente
diego
Linux 2.x
Linux 2.x
Messaggi: 333
Iscritto il: ven 1 apr 2005, 0:00

Re: Openoffice da sorgenti

Messaggio da diego »

Vorrei una conferma (della serie dubbi prima di un esame):
nel configure ci sono opzioni come --enable-xyz e altre come --disable-xyz
significa che se c'e' --enable-xyz, di default l'opzione e' abilitata e quindi non serve indicarla nel configure?
Viceversa se c'e' --disable-xyz, di default l'opzione e' disabilitata?
Grazie

Avatar utente
submax82
Staff
Staff
Messaggi: 3202
Iscritto il: mer 31 ago 2005, 0:00
Desktop: xfce
Distribuzione: SalixOS
Contatta:

Re: Openoffice da sorgenti

Messaggio da submax82 »

ti consiglierei di basarti sugli ottimi pkgbuild di archlinux, che sono veramente lo stato dell'arte!

http://repos.archlinux.org/viewvc.cgi/o ... sion=41865

e se vuoi anche

http://repos.archlinux.org/viewvc.cgi/g ... sion=41859

per gnome non intendevo quello ma se usi xfce non dovresti avere problemi.

Avatar utente
diego
Linux 2.x
Linux 2.x
Messaggi: 333
Iscritto il: ven 1 apr 2005, 0:00

Re: Openoffice da sorgenti

Messaggio da diego »

submax82 ha scritto:ti consiglierei di basarti sugli ottimi pkgbuild di archlinux, che sono veramente lo stato dell'arte!
decisamente :oops:
vedo quanti danni riesco a combinare [-o<

Avatar utente
diego
Linux 2.x
Linux 2.x
Messaggi: 333
Iscritto il: ven 1 apr 2005, 0:00

Re: Openoffice da sorgenti

Messaggio da diego »

rieccomi,
ci sono sempre, e' solo che ogni singola prova porta via delle ore :?
sto provando ad integrare lo SB con lo script di archlinux, evitando,
se possibile, di passare per gli rpm, ma sono fermo qui:

Codice: Seleziona tutto

**************************************************
ERROR: ERROR: Could not register all components for file services.rdb (gid_Starregistry_Services_Rdb)!
in function: create_services_rdb
**************************************************

**************************************************
ERROR: Saved logfile: /tmp/tgz/OOO310_m11/instsetoo_native/unxlngi6.pro/OpenOffice/native/logging/en-US/log_OOO310_en-US.log
**************************************************
... cleaning the output tree ...
... removing directory /tmp/tgz/OOO310_m11/instsetoo_native/unxlngi6.pro/OpenOffice/native/zip/en-US ...
... removing directory /tmp/tgz/OOO310_m11/instsetoo_native/unxlngi6.pro/OpenOffice/native/gid_Starregistry_Services_Rdb_servicesrdb/en-US_witherror_1 ...
Mon Jun 29 08:57:33 2009 (00:42 min.)
dmake:  Error code 255, while making 'openoffice_en-US.native'

ERROR: Error 65280 occurred while making /tmp/tgz/OOO310_m11/instsetoo_native/util
rmdir /tmp/23974
dmake:  Error code 1, while making 'instsetoo_native/prj/build_instsetoo_native'
:-k

vi terro' aggiornati sugli sviluppi
Ciao

Avatar utente
diego
Linux 2.x
Linux 2.x
Messaggi: 333
Iscritto il: ven 1 apr 2005, 0:00

Re: Openoffice da sorgenti

Messaggio da diego »

Rieccomi come promesso, dopo ennnnnnnne compilazioni :)
a postare lo slackbuild di openoffice.org dai sorgenti.
E' una versione beta in quanto vorrei aggiungere alla versione
definitiva anche i plugin java come sullo slackbuild di archlinux.
Lo slackbuild funziona, e non c'e' piu' il problema di alcuni
menu che non si vedevano su draw o impression.
Tra le dipendenze ci sono alcuni tgz gia presenti in repository,
altri no, ma che postero' assieme allo slackbuild definitivo.
Ora vado un po' di fretta, quindi ecco la lista delle dipendenze

Codice: Seleziona tutto

Archive-Zip
Compress-Raw-Zlib
Compress-Zlib
IO-Compress-Base
IO-Compress-Zlib
agg
apache-ant
boost
icu
jdk
libmspack
raptor
rasqal
redland
e l' OOo.SlackBuild

Codice: Seleziona tutto

#!/bin/sh
# Copyright 2009 Loris Vincenzi (http://www.slacky.eu)
# All rights reserved.
#
# Heavily based on the Slackware 12.2 SlackBuild
# http://www.openoffice.org/
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

CWD=`pwd`
TMP=${TMP:-/tmp/tgz}
PKG=$TMP/package-ooo
NAME=OOo
VERSION=3.1.0
CHOST=i486
ARCH=${ARCH:-i486}
BUILD=1ld


SOURCES=$NAME-build-$VERSION
COMPONENT="binfilter core extensions l10n system testautomation"
URL=http://ooo.mirror.garr.it/mirrors/openoffice/stable/$VERSION/

#Speedup
export SMP="6"
export nodep=true
export NO_HIDS=true
		

SOURCES=""
for file in $COMPONENT
do
    SOURCES+="$NAME"_"$VERSION"_src_"$file".tar.bz2" "
done

for source in $SOURCES
do
    if [ ! -e $source ]; then
	wget -c $URL$source
	if [[ "$?" > "0" ]]
	then
	    echo -e "Sorgente $source non trovato\n"
	    exit
	fi
    fi
done

# Scarico i sorgenti di Mozilla
if [ ! -e mozilla-source-1.7.5.tar.bz2 ]; then
    wget http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.5/source/mozilla-source-1.7.5.tar.bz2
fi


if [ "$ARCH" = "i386" ]; then
  SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2"
fi

if [ ! -d $TMP ]; then
 mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
 mkdir -p $PKG
fi


cd $TMP
## Scarico i Sorgenti
for source in $SOURCES
do
    if [ -e $CWD/$source ]; then
	tar xjvf $CWD/$source
	if [[ "$?" > "0" ]]
	then
	    echo -e "Sorgente $source non e' un tar.bz2\n"
	    exit
	fi
    fi
done

SOURCETGZ=`find . -type d -maxdepth 1 -exec basename {} \; | grep OOO`
cd $SOURCETGZ

(
    cd moz/download
    #echo `pwd`
    if [ ! -e mozilla-source-1.7.5.tar.bz2 ]; then
	cp $CWD/mozilla-source-1.7.5.tar.bz2 .
    fi
)

## Sistemo i Permessi
find . \( -perm 777 -o -perm 775 -o -perm 711 \) -exec chmod 755 {} \;
find . \( -perm 700 -o -perm 555 -o -perm 511 \) -exec chmod 755 {} \;
find . \( -perm 666 -o -perm 664 -o -perm 600 \) -exec chmod 644 {} \;
find . \( -perm 444 -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
chown -R root:root .


if [ "$ARCH" = "x86_64" ]; then
    EXTRAOPTS="--without-stlport"
    # fix to build with SUN jdk/jre and OpenJDK
    # http://qa.openoffice.org/issues/show_bug.cgi?id=74749
    sed -i "s:lib64\/libjpeg.so:lib\/libjpeg.so:g" solenv/inc/libs.mk || exit 1
    else EXTRAOPTS="--with-stlport"
fi
                                        

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr \
--exec-prefix=/usr \
--datarootdir=/usr/share \
--docdir=/usr/doc/$NAME-$VERSION \
--sysconfdir=/etc \
--mandir=/usr/man \
--disable-binfilter \
--enable-cairo \
--enable-crashdump=no \
--enable-cups \
--enable-dbus \
--disable-dbgutil \
--disable-debug \
--disable-evolution2 \
--disable-gconf \
--enable-gcjaot \
--enable-gio  \
--disable-gnome-vfs \
--enable-gtk \
--disable-kde \
--enable-ldap \
--disable-lockdown \
--enable-minimizer \
--enable-neon \
--disable-odk \
--enable-ogltrans \
--enable-opengl \
--disable-pam \
--disable-pam-link \
--enable-pdfimport \
--enable-presenter-console \
--disable-qadevooo \
--enable-report-builder \
--disable-symbols \
--enable-vba \
--disable-xrender-link \
--disable-werror \
--enable-wiki-publisher \
--without-afms \
--with-agg \
--with-alloc=system \
--with-ant-home=/usr/lib/ant \
--with-build-version="$VERSION-$BUILD Slackware Built" \
--with-dict=ALL \
--with-fonts \
--without-gpc \
--with-installed-ooo-dirname=openoffice.org3 \
--with-java \
--with-jdk-home="/usr/lib/java" \
--with-lang="it" \
--with-mozilla-toolkit=gtk2 \
--without-myspell-dicts \
--without-nas \
--with-openldap \
--with-package-format=native \
--without-ppds \
--with-stlport \
--with-system-agg \
--with-system-cairo \
--with-system-curl \
--with-system-db \
--with-system-expat \
--with-system-freetype \
--with-system-icu \
--with-system-jpeg \
--with-system-libxml \
--with-system-libxslt \
--with-system-libwpd \
--with-system-mozilla=libxul \
--with-system-mspack \
--with-system-neon \
--with-system-openssl \
--with-system-poppler \
--with-system-python \
--with-system-redland \
--with-system-sane-header \
--with-system-sndfile \
--with-system-stdlibs \
--with-system-vigra \
--with-system-xrender-headers \
--with-system-zlib \
--with-unix-wrapper=soffice \
--with-use-shell=bash \
--with-vba-package-format="builtin" \
--with-vendor="Slacky.eu by Diego"\
--without-system-lucene \
--without-system-hsqldb \
--without-system-beanshell \
--without-system-saxon \
--without-system-vigra \
--without-system-mozilla \
--with-x \
$EXTRAOPTS || exit 1


(
# Setup environment for build
if [ "$ARCH" = "x86_64" ]; then
    source LinuxX86-64Env.Set.sh
else 
    source LinuxX86Env.Set.sh
fi

# Build dmake utility
./bootstrap || exit 1
dmake -P${SMP} all || exit 1
)

# Copia file
cd $PKG
cp -rf $TMP/$SOURCETGZ/instsetoo_native/unxlngi6.pro/OpenOffice/native/install/it/linux-2.6-intel/buildroot/opt . || exit 1
tar xzvf $TMP/$SOURCETGZ/sysui/unxlngi6.pro/bin/desktop-integration/openoffice*.tgz || exit 1

# Icone
(
 mkdir -p $PKG/usr/share/pixmaps
 cd $PKG/opt/kde/share/icons/hicolor/48x48/apps/
 ICONS=`find . -name "*.png"`
 cd $PKG/usr/share/pixmaps
 for file in $ICONS
 do 
	linc=`basename $file`
	ln -sf /opt/kde/share/icons/hicolor/48x48/apps/$linc  $linc 
 done
)

find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded --strip-debug 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded --strip-debug 2> /dev/null

mkdir -p $PKG/usr/doc/$NAME-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
requiredbuilder -v -y -s $CWD $PKG
makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz

if [ "$1" = "--cleanup" ]; then
  rm -rf $TMP
fi
Se qualcuno vuole cimentarsi nella compilazione rimango a disposizione,
spero di finir tutto prima di andare in ferie, altrimenti ci risentiamo a settembre.
Ciao

Avatar utente
gohanz
Staff
Staff
Messaggi: 5832
Iscritto il: mar 30 nov 2004, 0:00

Re: Openoffice da sorgenti

Messaggio da gohanz »

Quanto tempo occorre per la compilazione? :-k

Rispondi