All pastes #243452 Raw Edit

Something

public text v1 · immutable
·published 2006-11-08 14:22 UTC
rendered paste body
# Maintainer: Hussam Al-Tayeb <ht990332>

pkgname=openoffice-base
pkgver=2.0.4
OO_milestone=OOD680_m5
pkgrel=3
pkgdesc="OpenOffice.org - a free office suite"
url="http://www.openoffice.org"

depends=('boost' 'cups' 'curl' 'desktop-file-utils' 'expat' 'fontconfig' 'freetype2' 'gtk2' 'hunspell' 'imagemagick' 'libxaw' 'libxml2' 'libart-lgpl' 'libsnd
file' 'libstdc++5' 'libpng' 'neon' 'nss' 'perl' 'perl-archive-zip' 'python' 'sane' 'unzip' 'libwpd' 'xmlsec' 'xorg-server' 'xulrunner' 'zip')

makedepends=('apache-ant' 'bison' 'ccache' 'cairo' 'curl' 'findutils' 'flex' 'gawk' 'gcc' 'pam' 'perl-archive-zip' 'pkgconfig' 'tcsh' 'libidl2')

replaces=('openoffice-base' 'openoffice-cvs')
conflicts=('openoffice-base' 'openoffice-cvs')
provides=('openoffice-base' 'openoffice-cvs')

source=(http://ftp-1.gwdg.de/pub/openoffice/stable/$pkgver/OOo_${pkgver}_src.tar.gz intros-config_office.diff intro.bmp system-xmlsec.diff readlicense_oo-xml
-apis.diff nomozplug.diff session-management.diff leak-sal-file.diff gui-insensitive.diff check-buttons-rendering-fix.diff fontconfig-substitute.diff  vcl-gn
ome-screensaver-poke.diff default-no-registration.diff framework-layered-accelerators.diff fpicker-common-scp2.diff fpicker-kde-dialog.diff about-build-ver-r
eadability.diff default-system-fpicker.diff soffice-detect-mozilla-certificates.diff size-vcl-fontcfg.diff sc-default-color-modify.diff)

build()
{

# Some workarounds
unset LS_COLORS
#unset MAKEFLAGS ## Temp workaround
export MAKEFLAGS="-j 1"
[ -r /etc/profile.d/qt.sh ] && . /etc/profile.d/qt.sh ## Workaround for people with Qt3 and Qt4 installed. We need to use Qt3 by default if we are going to b
uild with --enable -kde

cd $startdir/src
mv $OO_milestone OOo2
#mv hunspell OOo2
cd OOo2
chmod +wX -R ./svx

# Apply patches
patch -p0 < ../intros-config_office.diff || return 1
patch -p0 < ../system-xmlsec.diff || return 1
patch -p0 < ../readlicense_oo-xml-apis.diff || return 1
patch -p0 < ../nomozplug.diff || return 1
patch -p0 < ../session-management.diff || return 1
patch -p0 < ../leak-sal-file.diff || return 1 # remove this patch in 2.1.0
patch -p0 < ../gui-insensitive.diff || return 1
patch -p0 < ../check-buttons-rendering-fix.diff || return 1
patch -p0 < ../fontconfig-substitute.diff || return 1
patch -p0 < ../vcl-gnome-screensaver-poke.diff || return 1
patch -p0 < ../default-no-registration.diff || return 1
patch -p0 < ../framework-layered-accelerators.diff || return 1
patch -p0 < ../fpicker-common-scp2.diff || return 1
patch -p0 < ../fpicker-kde-dialog.diff || return 1
patch -p0 < ../about-build-ver-readability.diff || return 1
patch -p0 < ../default-system-fpicker.diff || return 1
patch -p0 < ../soffice-detect-mozilla-certificates.diff || return 1
patch -p0 < ../size-vcl-fontcfg.diff || return 1
patch -p0 < ../sc-default-color-modify.diff || return 1
 # Enter config dir
 cd config_office/

 # Need to recreate the configure script because of patches
 autoconf

 # ccache
 export CCACHE_HARDLINK=1
 export CC="ccache gcc"
 export CXX="ccache g++"
 export CPP="ccache cpp"

 # Configuring
 ./configure --disable-gnome-vfs \
        --with-system-fonts \
        --with-system-neon  \
        --with-system-python \
        --with-system-xrender-headers \
        --with-system-curl \
        --without-docdir \
        --with-arch="x86_64" \
        --with-system-sane-header \
        --disable-mono \
        --with-package-format=native \
        --without-nas \
        --with-system-freetype \
        --with-system-jpeg \
        --with-system-zlib \
        --with-system-libxml \
        --with-system-expat \
        --with-system-sndfile \
        --with-vendor="Archlinux Community" \
        --disable-qadevooo \
        --with-system-stdlibs \
        --disable-odk \
        --with-system-libwpd \
        --with-system-xmlsec \
        --without-myspell-dicts \
        --with-build-version="2.0.4 Archlinux build-3" \
        --enable-cairo --with-system-cairo --enable-evolution2 --disable-canvas \
        --with-system-boost --with-gcc-speedup=ccache --with-system-mozilla --with-xulrunner \
        --with-java=gij \

#       --with-java=no \

#       --with-jdk-home=/opt/j2sdk1.4.2 \
#       --with-java-home=/opt/j2re1.4.2 \


 # NOTES
 # 1. We need java bindings for db if we are to use --with-system-db so we don't.

 # Compiling
 cd ..
 ./bootstrap || return 1
 source LinuxX86-64Env.Set.sh
 export EXTERNAL_WARNINGS_NOT_ERRORS=TRUE
 dmake || return 1

 # install binaries
 cp -R instsetoo_native/unxlngx6.pro/OpenOffice/native/install/en-US/linux-2.6-x86_64/buildroot/* $startdir/pkg/
 cd $startdir/pkg/opt
 mv openoffice.org2.0 openoffice

 # replace original splash intro screen with one provided by shastry
 rm -rf $startdir/pkg/opt/openoffice/program/intro.bmp
 install -D -m644 cp $startdir/src/intro.bmp $startdir/pkg/opt/openoffice/program/

 # prepare filesystem entries
 mkdir -p $startdir/pkg/usr/{bin,share/applications}
 mkdir -p $startdir/pkg/usr/share/icons/{HighContrast,hicolor,locolor}

 # make symlinks
 cd $startdir/pkg/usr/bin
 ln -s ../../opt/openoffice/program/soffice soffice
 ln -s ../../opt/openoffice/program/spadmin spadmin

 # install shortcuts
 cp $startdir/pkg/opt/openoffice/share/xdg/*.desktop  $startdir/pkg/usr/share/applications
 cd $startdir/pkg/usr/share/applications
 sed -i -e 's|Exec=openoffice.org-2.0|Exec=/opt/openoffice/program/soffice|g' *.desktop
 sed -i -e 's|Exec=/opt/openoffice/program/soffice-printeradmin|Exec=/opt/openoffice/program/spadmin|g' printeradmin.desktop

 # fix icons in shortcuts
 sed -i -e 's|Icon=openofficeorg-20-base|Icon=base|g' *.desktop
 sed -i -e 's|Icon=openofficeorg-20-calc|Icon=ooocalc|g' *.desktop
 sed -i -e 's|Icon=openofficeorg-20-draw|Icon=draw|g' *.desktop
 sed -i -e 's|Icon=openofficeorg-20-impress|Icon=impress|g' *.desktop
 sed -i -e 's|Icon=openofficeorg-20-math|Icon=math|g' *.desktop
 sed -i -e 's|Icon=openofficeorg-20-writer|Icon=writer|g' *.desktop
 sed -i -e 's|Icon=openofficeorg-20-printeradmin.png|Icon=printeradmin|g' *.desktop

 # install icons
 cd $startdir/src/OOo2/sysui/desktop/icons
 cp -a -v HighContrast/*x* $startdir/pkg/usr/share/icons/HighContrast
 cp -a -v hicolor/*x* $startdir/pkg/usr/share/icons/hicolor
 cp -a -v locolor/*x* $startdir/pkg/usr/share/icons/locolor
 rm -rf $startdir/pkg/usr/share/icons/*/*/CVS
 rm -rf $startdir/pkg/usr/share/icons/*/*/*/CVS

 ## just in case icon calc is used by calculator :)
 find $startdir/pkg/usr/share/icons -type d -name apps  -exec mv \{}/calc.png  \{}/ooocalc.png \;

 # fix ownership and permissions
 chown root.root -R $startdir/pkg/
 chmod +rX -R $startdir/pkg/usr
 }