summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-07-19 14:21:13 +0200
committerTomas Chvatal <scarabeus@gentoo.org>2011-07-19 14:21:13 +0200
commit4815cda9917a2e597bca6de6b87891855886cd4f (patch)
tree44ae148912403d1dc8e15ee66dd74990ccd820b2
parent[app-text/mythes] Add dependency for the libreoffice, so we wont use bundled ... (diff)
downloadscarabeus-4815cda9917a2e597bca6de6b87891855886cd4f.tar.gz
scarabeus-4815cda9917a2e597bca6de6b87891855886cd4f.tar.bz2
scarabeus-4815cda9917a2e597bca6de6b87891855886cd4f.zip
[app-office/libreoffice] Pass the configure phase. Use system libs where possible.
-rw-r--r--app-office/libreoffice/Manifest3
-rw-r--r--app-office/libreoffice/files/libreoffice_options.txt123
-rw-r--r--app-office/libreoffice/libreoffice-3.4.2.1.ebuild376
3 files changed, 343 insertions, 159 deletions
diff --git a/app-office/libreoffice/Manifest b/app-office/libreoffice/Manifest
index f6e09fe..2d64994 100644
--- a/app-office/libreoffice/Manifest
+++ b/app-office/libreoffice/Manifest
@@ -10,6 +10,7 @@ AUX libreoffice-3.3.1-neon_remove_SSPI_support.diff 1081 RMD160 9c91936b136055a6
AUX libreoffice-3.3.2-bison25.diff 911 RMD160 b3335fe3728e97b69bde744dcd34dc27d4f3212c SHA1 857406c4735f9bcb0d1a7bd0b1dec3b444142ac6 SHA256 d16a9c2a41d2a5669208eac33212920e2d356da60d30e9dc5126ccd13319464b
AUX libreoffice-3.4.1-salfix.diff 668 RMD160 3764e664888b423d81f9e78def6c2a93e037a462 SHA1 10e0128da7ddebdae3b52983e91363940b151cf1 SHA256 3adf1eab52b80c34b3ef1f8ab26eb6171af4515c8e05a264dcf10bd7c45e20e7
AUX libreoffice-libdb5-fix-check.diff 1197 RMD160 dea8896745502035e899f9f685c662a1dbdfbbeb SHA1 07202400d8c17a12cb965331ddbef57c4438e7be SHA256 f8532c4ee3ebb8cb424cbb736abcb7b3c7027fd7c749f39571e76527808bd51a
+AUX libreoffice_options.txt 6251 RMD160 570a49fd590875388ac19b6b21c4d839e4266644 SHA1 b44a85a4676c2c01dc102c8b5893e3462f10c688 SHA256 d194118debf1c098a88b3396eca12dd7ea1a2eda76b3afd63599f2bdb1c39638
AUX scrap-pixmap-links.diff 1085 RMD160 29384dbf63fce1419e05ddd506915a73ef3459ab SHA1 44ad5198b7bc70813afd74b456a61081f18838cf SHA256 054b18ebe38c804082b66d763285f9c7af11da773486ba8e9f4255266efb7ac9
AUX sdext-presenter.diff 649 RMD160 1f302a949deaba5c0243b18c60037c3602dc45ed SHA1 e4b2b653390e4fc972cfe5afc57911ece1c30f39 SHA256 7abf056815e5faee5fddfd17b25df5d7afe88347472695cfcadc0617739ac93f
AUX wrapper.in 102 RMD160 e11e046dc57bed812ba28e549145fdc3605ede8d SHA1 2e8cf54755431070b2352621eb4a91179a7cc543 SHA256 0cd747062eb7d6d4ecabbf8943575c688c273c7f258b5793a5cff42254ecb432
@@ -91,4 +92,4 @@ DIST libreoffice-translations-3.4.2.1.tar.bz2 137254228 RMD160 c2db7ac14da37013e
DIST libreoffice-ure-3.4.2.1.tar.bz2 6211917 RMD160 0cbb1cc96fdf35d96f3340651d5426cd6f61c3a1 SHA1 b2bea4903545d70242aff28764c1fd1c51aee022 SHA256 429698ae0f71d07eff1cd0c8611e84ec944f0082c1c427f28e1a5cdbd8ded29d
DIST libreoffice-writer-3.4.2.1.tar.bz2 7295133 RMD160 e9f49fb4d64b9c7b54d34cd488d1923969842fc5 SHA1 73a784172c191df755ad47ad9fc040bfabe5d9f2 SHA256 98735be34c2ddbebed0411b776ac7480e0e458dc4253fb57a467846e7b2db131
DIST unowinreg.dll 6144 RMD160 9e2a2789a96842a2aec747a62dee3db3e8370761 SHA1 712720da502d36175cd7aa05cb1862ee0330638c SHA256 f563e522922133db9340b0306711c2d8767cc3481dd9e7d9b0d059906d12653c
-EBUILD libreoffice-3.4.2.1.ebuild 19096 RMD160 d5842ce8728df020a4e746ab5869278b1b54377c SHA1 8de5ee0c068c685b4662c877c511e3f0dff320f8 SHA256 41f5efa4be7e97399ac6ea06ebcf00ddc4fdd6bbfd1345f54f0465fa7884d020
+EBUILD libreoffice-3.4.2.1.ebuild 19585 RMD160 8c7ffc77e666bd574c424d775d15954ba76c3d6a SHA1 ecdeb6b0eda693ac6f29918b09e459c03ddd4d2c SHA256 651ff0c196cfa7f2bcc46b93726b37f5ab475c06064662020550d66bae8641a9
diff --git a/app-office/libreoffice/files/libreoffice_options.txt b/app-office/libreoffice/files/libreoffice_options.txt
new file mode 100644
index 0000000..2731e11
--- /dev/null
+++ b/app-office/libreoffice/files/libreoffice_options.txt
@@ -0,0 +1,123 @@
+ --enable-ext-barcode Enables the Barcode extension.
+ --enable-ext-diagram Enables the Diagram extension.
+ --enable-ext-google-docs
+ Download and enables the Google Documents extension.
+ --enable-ext-hunart Enables the Hungarian Cross-reference Toolbar
+ extension.
+ --enable-ext-lightproof Enables the Lightproof extension.
+ --enable-ext-nlpsolver Download and enables the NLPSolver extension.
+ --enable-ext-ct2n Enables the ConvertTextToNumber extension.
+ --enable-ext-numbertext Enables the Numbertext extension.
+ --enable-ext-oooblogger Download and enables the OOo Blogger extension.
+ --enable-ext-report-builder
+ Enables the build of the Report Builder extension.
+ --enable-ext-scripting-javascript
+ Enables support for scripts in JavaScript.
+ --enable-ext-typo Enables the Typography Toolbar extension.
+ --enable-ext-validator Enables the Validator extension.
+ --enable-ext-watch-window
+ Enables the Watch Window extension to Calc.
+ --enable-ext-wiki-publisher
+ Enables the Wiki Publisher extension.
+ --disable-vba Disables the vba compatibility feature.
+ --disable-activex-component
+ Remove support for ActiveX embedding of LibO.
+ --disable-mathmldtd Disable mathmldtd (useful for distributions that
+ want to avoid packaging it).
+ --enable-layout Enable the compilation and use of layout dialogs.
+ --disable-build-mozilla Use this option if you do not want to build the
+ mozilla components from the mozilla source code but
+ take precompiled zips.
+ --disable-nss-module Whether to use provided NSS module.
+ --enable-lomenubar Enable global menu support.
+
+Optional Packages:
+ --with-external-tar=<TARFILE PATH>
+ Specify path to tarfiles manually.
+ --with-mozilla-version Choose which version of mozilla to use while
+ building mozilla. (default=1.7.5) Note that not all
+ versions are supported.
+ --with-mozilla-toolkit Choose which GUI toolkit to use while building
+ mozilla components. (default=gtk2)
+ --with-lucene-core-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-lucene-analyzers-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-hsqldb-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-beanshell-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-commons-codec-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-commons-lang-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-commons-httpclient-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-commons-logging-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-servlet-api-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-system-jfreereport
+ Use JFreeReport already on system.
+ --with-sac-jar=JARFILE Specify path to jarfile manually.
+ --with-libxml-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-flute-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-jfreereport-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-liblayout-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-libloader-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-libformula-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-librepository-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-libfonts-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-libserializer-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-libbase-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-saxon-jar=JARFILE
+ Specify path to jarfile manually.
+ --with-external-libtextcat-data
+ Use libtextcat data already on system.
+ --with-jdk-home If you have installed JDK 1.3 or later on your
+ system please supply the path here. Note that this
+ is not the location of the Java binary but the
+ location of the entire distribution.
+
+ Usage: --with-jdk-home=<absolute path to JDK home>
+
+ --with-gxx-include-path If you want to override the autodetected g++ include
+ path.
+
+ Usage: --with-gxx-include-path=<absolute path to
+ g++ include dir>
+
+ --with-java-target-version
+ Generate class files that will work on JVMs with the
+ specified version. For example, use
+ --with-java-target-version=1.4 to make sure that the
+ application will work with JVM 1.4 even when
+ compiled with JDK 1.5.
+
+ This option is ignored when you compile with gcj/gij.
+
+ Usage: --with-java-target-version=<jvm version>
+
+ --with-jvm-path Use a specific JVM search path at runtime.
+
+ Usage: --with-jvm-path=<absolute path to parent of jvm home>
+
+ e. g.: --with-jvm-path=/usr/lib/
+ to find JRE/JDK in /usr/lib/jvm/
+
+ --with-ant-home If you have installed Jakarta Ant on your system,
+ please supply the path here. Note that this is not
+ the location of the Ant binary but the location of
+ the entire distribution.
+
+ Usage: --with-ant-home=<absolute path to Ant home>
diff --git a/app-office/libreoffice/libreoffice-3.4.2.1.ebuild b/app-office/libreoffice/libreoffice-3.4.2.1.ebuild
index fa2d273..c4cf965 100644
--- a/app-office/libreoffice/libreoffice-3.4.2.1.ebuild
+++ b/app-office/libreoffice/libreoffice-3.4.2.1.ebuild
@@ -28,7 +28,7 @@ SRC_URI+=" ${DEV_URI}/${PN}-bootstrap-${PV}.tar.bz2"
for mod in ${MODULES}; do
SRC_URI+=" ${DEV_URI}/${PN}-${mod}-${PV}.tar.bz2"
done
-unset mod MODULES2
+unset mod
# addons
ADDONS_SRC+=" ${ADDONS_URI}/48a9f787f43a09c0a9b7b00cd1fddbbf-hyphen-2.7.1.tar.gz"
@@ -118,7 +118,8 @@ unset EXT_URI
unset TDEPEND
unset ADDONS_SRC
-IUSE+=" binfilter cups custom-cflags dbus debug eds gnome gstreamer gtk kde ldap nsplugin odk offlinehelp opengl templates"
+IUSE+=" binfilter cups custom-cflags dbus debug eds gnome graphite gstreamer
+gtk kde ldap mysql nsplugin odk offlinehelp opengl pch python templates webdav"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
@@ -127,27 +128,29 @@ COMMON_DEPEND="
app-arch/zip
app-arch/unzip
>=app-text/hunspell-1.1.4-r1
+ app-text/mythes
app-text/libwpd:0.9[tools]
>=app-text/libwps-0.2.2
>=app-text/poppler-0.12.3-r3[xpdf-headers]
+ dev-db/unixODBC
dev-libs/expat
>=dev-libs/glib-2.18
>=dev-libs/icu-4.0
>=dev-lang/perl-5.0
- >=net-libs/neon-0.24.7
>=dev-libs/openssl-0.9.8g
dev-libs/redland[ssl]
- >=media-libs/freetype-2.1.10-r2
+ media-libs/freetype:2
>=media-libs/fontconfig-2.3.0
>=media-libs/vigra-1.4
media-libs/libpng
media-libs/libwpg:0.2
- >=sys-libs/db-4.3
+ >=sys-libs/db-4.8
virtual/jpeg
>=x11-libs/cairo-1.0.2
x11-libs/libXaw
x11-libs/libXinerama
x11-libs/libXrandr
+ x11-libs/libXrender
cups? ( net-print/cups )
dbus? ( >=dev-libs/dbus-glib-0.71 )
eds? ( >=gnome-extra/evolution-data-server-1.2 )
@@ -161,17 +164,21 @@ COMMON_DEPEND="
>=media-libs/gst-plugins-base-0.10
)
java? (
+ dev-db/hsqldb
>=dev-java/bsh-2.0_beta4
- dev-java/lucene:2.3
+ dev-java/lucene:3.0
dev-java/lucene-analyzers:2.3
+ dev-java/saxon
)
ldap? ( net-nds/openldap )
+ mysql? ( dev-db/mysql-connector-c++ )
nsplugin? (
net-libs/xulrunner:1.9
>=dev-libs/nspr-4.6.6
>=dev-libs/nss-3.11-r1
)
opengl? ( virtual/opengl )
+ webdav? ( net-libs/neon )
"
RDEPEND="${COMMON_DEPEND}
@@ -188,24 +195,27 @@ DEPEND="${COMMON_DEPEND}
dev-libs/libxslt
dev-perl/Archive-Zip
dev-util/cppunit
+ dev-util/dmake
>=dev-util/gperf-3
dev-util/intltool
dev-util/pkgconfig
+ media-gfx/sane-backends
>=net-misc/curl-7.12
>=sys-apps/findutils-4.1.20-r1
sys-devel/bison
sys-apps/coreutils
sys-devel/flex
sys-libs/zlib
- x11-libs/libXrender
x11-libs/libXtst
x11-proto/printproto
+ x11-proto/randrproto
x11-proto/xextproto
x11-proto/xineramaproto
x11-proto/xproto
java? (
- || ( =virtual/jdk-1.6* =virtual/jdk-1.5* )
+ =virtual/jdk-1.6*
>=dev-java/ant-core-1.7
+ dev-java/junit:4
)
"
@@ -217,44 +227,51 @@ PATCHES=(
)
# Uncoment me when updating to eapi4
-# REQUIRED_USE="gnome? ( gtk )"
+# REQUIRED_USE="
+# || ( gtk gnome kde )
+# gnome? ( gtk )
+#"
S="${WORKDIR}/${PN}-bootstrap-${PV}"
-CONFFILE=${S}/distro-configs/Gentoo.conf
pkg_setup() {
java-pkg-opt-2_pkg_setup
-
- # sys-libs/db version used
- local db_ver=$(db_findver '>=sys-libs/db-4.3')
-
kde4-base_pkg_setup
python_set_active_version 2
python_pkg_setup
if use custom-cflags; then
- ewarn " You are using custom CFLAGS, which is NOT supported and can cause "
- ewarn " all sorts of build and runtime errors. "
+ ewarn "You are using custom CFLAGS, which is NOT supported and can cause"
+ ewarn "all sorts of build and runtime errors."
ewarn
- ewarn " Before reporting a bug, please make sure you rebuild and try with "
- ewarn " basic CFLAGS, otherwise the bug will not be accepted. "
+ ewarn "Before reporting a bug, please make sure you rebuild and try with"
+ ewarn "basic CFLAGS, otherwise the bug will not be accepted."
ewarn
fi
if ! use java; then
- ewarn " You are building with java-support disabled, this results in some "
- ewarn " of the LibreOffice functionality being disabled. "
- ewarn " If something you need does not work for you, rebuild with "
- ewarn " java in your USE-flags. "
+ ewarn "You are building with java-support disabled, this results in some"
+ ewarn "of the LibreOffice functionality being disabled."
+ ewarn "If something you need does not work for you, rebuild with"
+ ewarn "java in your USE-flags."
+ ewarn
+ ewarn "Some system java libraries will be provided by libreoffice"
+ ewarn "during the build. You should really reconsider enabling java"
+ ewarn "useflag"
ewarn
fi
- if ! use gtk && ! use gnome; then
- ewarn " If you want the LibreOffice systray quickstarter to work "
- ewarn " activate either the 'gtk' or 'gnome' use flags. "
+ if ! use gtk; then
+ ewarn "If you want the LibreOffice systray quickstarter to work"
+ ewarn "activate the 'gtk' use flag."
ewarn
fi
+
+ # Check if we have enough RAM and free diskspace to build this beast
+ CHECKREQS_MEMORY="512"
+ use debug && CHECKREQS_DISK_BUILD="12288" || CHECKREQS_DISK_BUILD="7144"
+ check_reqs
}
src_unpack() {
@@ -267,6 +284,8 @@ src_unpack() {
for mod in ${MODULES}; do
unpack "${PN}-${mod}-${PV}.tar.bz2"
mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}"
+ # punt the empty dirs; it is annoying during debuging :)
+ rm -rf "${WORKDIR}/${PN}-${mod}-${PV}"
done
# don't forget the wrapper...
@@ -279,11 +298,11 @@ src_unpack() {
mkdir -p "${dest}"
for template in ${TDEPEND}; do
- if [[ ${template: -3:3} == oxt ]]; then
+ if [[ ${template} == *oxt ]]; then
tmplfile="${DISTDIR}/$(basename ${template})"
tmplname="$(echo "${template}" | \
cut -f 2- -s -d - | cut -f 1 -d _)"
- if [[ -f ${tmplname} && ! -f "${dest}/${tmplname}.oxt" ]]; then
+ if [[ -f ${tmplfile} && ! -f "${dest}/${tmplname}.oxt" ]]; then
cp -v "${tmplfile}" "${dest}/${tmplname}.oxt" || die
fi
fi
@@ -292,16 +311,6 @@ src_unpack() {
}
src_prepare() {
- ewarn
- ewarn " If you experience a build break, please make sure to retry "
- ewarn " with MAKEOPTS="-j1" before filing a bug. "
- ewarn
-
- # Check if we have enough RAM and free diskspace to build this beast
- CHECKREQS_MEMORY="512"
- use debug && CHECKREQS_DISK_BUILD="12288" || CHECKREQS_DISK_BUILD="7144"
- check_reqs
-
strip-linguas ${LANGUAGES}
# en_US is built by default, upstream needs us to use --with-lang="" in this case though, so strip it out
@@ -314,107 +323,9 @@ src_prepare() {
export LINGUAS_OOO="en-US ${LINGUAS_TEMP//_/-}"
fi
- base_src_prepare
- eautoreconf
-}
-
-src_configure() {
- if use java ; then
- echo "--with-ant-home=${ANT_HOME}" >> ${CONFFILE}
- echo "--with-jdk-home=$(java-config --jdk-home 2>/dev/null)" >> ${CONFFILE}
- echo "--with-java-target-version=$(java-pkg_get-target)" >> ${CONFFILE}
- echo "--with-jvm-path=/usr/$(get_libdir)/" >> ${CONFFILE}
- echo "--with-system-beanshell" >> ${CONFFILE}
- echo "--with-system-lucene" >> ${CONFFILE}
- echo "--with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)" >> ${CONFFILE}
- echo "--with-lucene-core-jar=$(java-pkg_getjar lucene-2.3 lucene-core.jar)" >> ${CONFFILE}
- echo "--with-lucene-analyzers-jar=$(java-pkg_getjar lucene-analyzers-2.3 lucene-analyzers.jar)" >> ${CONFFILE}
- fi
-
- echo $(use_enable nsplugin mozilla) >> ${CONFFILE}
- echo $(use_with nsplugin system-mozilla libxul) >> ${CONFFILE}
-
- echo $(use_enable binfilter) >> ${CONFFILE}
- echo $(use_enable cups) >> ${CONFFILE}
- echo $(use_enable dbus) >> ${CONFFILE}
- echo "--enable-cairo" >> ${CONFFILE}
- echo "--with-system-cairo" >> ${CONFFILE}
- echo $(use_enable eds evolution2) >> ${CONFFILE}
- echo $(use_enable gnome gconf) >> ${CONFFILE}
- echo $(use_enable gnome gio) >> ${CONFFILE}
- echo "--disable-gnome-vfs" >> ${CONFFILE}
- echo $(use_enable gnome lockdown) >> ${CONFFILE}
- echo $(use_enable gstreamer) >> ${CONFFILE}
- echo $(use_enable gtk systray) >> ${CONFFILE}
- echo "--disable-kde" >> ${CONFFILE}
- echo $(use_enable kde kde4) >> ${CONFFILE}
- echo $(use_enable ldap) >> ${CONFFILE}
- echo $(use_enable opengl) >> ${CONFFILE}
- echo $(use_with opengl system-mesa-headers) >> ${CONFFILE}
- echo $(use_with ldap openldap) >> ${CONFFILE}
- echo $(use_with offlinehelp helppack-integration) >> ${CONFFILE}
- echo $(use_with java) >> ${CONFFILE}
- echo $(use_with templates sun-templates) >> ${CONFFILE}
- echo $(use_enable debug crashdump) >> ${CONFFILE}
- echo $(use_enable !debug strip-solver) >> ${CONFFILE}
- echo $(use_enable odk) >> ${CONFFILE}
-
- echo "--with-extension-integration" >> ${CONFFILE}
- echo "--enable-ext-pdfimport" >> ${CONFFILE}
- echo "--enable-ext-presenter-console" >> ${CONFFILE}
- echo "--enable-ext-presenter-minimizer" >> ${CONFFILE}
-
- # Misc stuff
- echo "--prefix="${EPREFIX}"/usr" >> ${CONFFILE}
- echo "--sysconfdir="${EPREFIX}"/etc" >> ${CONFFILE}
- echo "--libdir="${EPREFIX}"/usr/$(get_libdir)" >> ${CONFFILE}
- echo "--mandir="${EPREFIX}"/usr/share/man" >> ${CONFFILE}
- echo "--docdir=${EPREFIX}/usr/share/doc/${PF}" >> ${CONFFILE}
- echo "--with-lang=${LINGUAS_OOO}" >> ${CONFFILE}
- echo "--with-external-dict-dir=/usr/share/myspell" >> ${CONFFILE}
- echo "--with-external-hyph-dir=/usr/share/myspell" >> ${CONFFILE}
- echo "--with-external-thes-dir=/usr/share/myspell" >> ${CONFFILE}
- echo "--disable-crashdump" >> ${CONFFILE}
- echo "--disable-epm" >> ${CONFFILE}
- echo "--disable-dependency-tracking" >> ${CONFFILE}
- echo "--disable-fetch-external" >> ${CONFFILE}
- echo "--disable-graphite" >> ${CONFFILE}
- echo "--disable-zenity" >> ${CONFFILE}
- echo "--enable-xrender-link" >> ${CONFFILE}
- echo "--with-external-tar=${DISTDIR}" >> ${CONFFILE}
- echo "--with-system-boost" >> ${CONFFILE}
- echo "--with-system-curl" >> ${CONFFILE}
- echo "--with-system-cppunit" >> ${CONFFILE}
- echo "--with-system-db" >> ${CONFFILE}
- echo "--with-system-dicts" >> ${CONFFILE}
- echo "--with-system-expat" >> ${CONFFILE}
- echo "--with-system-hunspell" >> ${CONFFILE}
- echo "--with-system-icu" >> ${CONFFILE}
- echo "--with-system-libwpd" >> ${CONFFILE}
- echo "--with-system-libwpg" >> ${CONFFILE}
- echo "--with-system-libwps" >> ${CONFFILE}
- echo "--with-system-libxslt" >> ${CONFFILE}
- echo "--with-system-neon" >> ${CONFFILE}
- echo "--with-system-openssl" >> ${CONFFILE}
- echo "--with-system-redland" >> ${CONFFILE}
- echo "--with-system-vigra" >> ${CONFFILE}
- echo "--with-system-xrender-headers" >> ${CONFFILE}
- echo "--with-system-zlib" >> ${CONFFILE}
- echo "--with-unix-wrapper=libreoffice" >> ${CONFFILE}
- echo "--with-vendor=Gentoo Foundation" >> ${CONFFILE}
- echo "--without-afms" >> ${CONFFILE}
- echo "--without-fonts" >> ${CONFFILE}
- echo "--without-junit" >> ${CONFFILE}
- echo "--without-myspell-dicts" >> ${CONFFILE}
- echo "--without-ppds" >> ${CONFFILE}
- echo "--without-stlport" >> ${CONFFILE}
-
- use kde && export KDE4DIR="${KDEDIR}"
- use kde && export QT4LIB="/usr/$(get_libdir)/qt4"
-
- # Use multiprocessing by default now, it gets tested by upstream
- export JOBS=$(echo "${MAKEOPTS}" | sed -e "s/.*-j\([0-9]\+\).*/\1/")
- echo "--with-num-cpus=${JOBS}" >> ${CONFFILE}
+ # Now for our optimization flags ...
+ export ARCH_FLAGS="${CXXFLAGS}"
+ use debug || export LINKFLAGSOPTIMIZE="${LDFLAGS}"
# compiler flags
use custom-cflags || strip-flags
@@ -428,15 +339,159 @@ src_configure() {
replace-flags "-fomit-frame-pointer" "-momit-leaf-frame-pointer"
fi
- # Now for our optimization flags ...
- export ARCH_FLAGS="${CXXFLAGS}"
- use debug || export LINKFLAGSOPTIMIZE="${LDFLAGS}"
+ base_src_prepare
+ eautoreconf
+}
- # Make sure gnome-users get gtk-support
- local GTKFLAG="--disable-gtk"
- { use gtk || use gnome; } && GTKFLAG="--enable-gtk"
+src_configure() {
+ local java_opts
+ local internal_libs
+ local extensions
+ local themes="default"
+ local jobs=$(echo "${MAKEOPTS}" | sed -e "s/.*-j\([0-9]\+\).*/\1/")
+
+ # ensure that qt4 and kdedir are properly located
+ if use kde; then
+ export KDE4DIR="${KDEDIR}"
+ export QT4LIB="${EPREFIX}/usr/$(get_libdir)/qt4"
+ fi
+
+ # expand themes we are going to build based on DE useflags
+ use gnome && themes+=" tango"
+ use kde && themes+=" oxygen"
+
+ # list the extensions we are going to build by default
+ extensions="
+ --enable-ext-pdfimport
+ --enable-ext-presenter-console
+ --enable-ext-presenter-minimizer
+ "
+
+ # Things that do not have gentoo packages
+ internal_libs+="
+ --without-system-altlinuxhyph
+ --without-system-lpsolve
+ --without-system-mdds
+ "
+
+ # When building without java some things needs to be done
+ # as internal libraries.
+ if ! use java; then
+ internal_libs+="
+ --without-system-lucene
+ --without-system-hsqldb
+ --without-system-beanshell
+ "
+ else
+ java_opts="
+ --with-ant-home=${ANT_HOME}
+ --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
+ --with-java-target-version=$(java-pkg_get-target)
+ --with-jvm-path=${EPREFIX}/usr/$(get_libdir)/
+ --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)
+ --with-lucene-core-jar=$(java-pkg_getjar lucene lucene-core.jar)
+ --with-lucene-analyzers-jar=$(java-pkg_getjar lucene-analyzers lucene-analyzers.jar)
+ "
+ fi
- econf $(cat ${CONFFILE} |tr '\n' ' ') ${GTKFLAG}
+ # TODO: create gentoo branding on the about/intro screens
+ # --with-about-bitmap="${FILESDIR}/gentoo-about.png"
+ # --with-intro-bitmap="${FILESDIR}/gentoo-intro.png"
+
+ # system headers/libs/...: enforce using system packages
+ # only expections are mozilla and odbc/sane/xrender-header(s).
+ # for jars the exception is db.jar controlled by --with-system-db
+ # --enable-unix-qstart-libpng: use libpng splashscreen that is faster
+ # --disable-broffice: do not use brazillian brand just be uniform
+ # --enable-cairo: ensure that cairo is always required
+ # --enable-graphite: use pretty font renderer (faster and nicer)
+ # --enable-*-link: link to the library rather than just dlopen on runtime
+ # --disable-fetch-external: prevent dowloading during compile phase
+ # --disable-gnome-vfs: old gnome virtual fs support
+ # --disable-kdeab: kde3 adressbook
+ # --disable-kde: kde3 support
+ # --disable-rpath: relative runtime path is not desired
+ # --disable-static-gtk: ensure that gtk is linked dynamically
+ # --disable-zenity: disable build icon
+ # --with-extension-integration: enable any extension integration support
+ # --with-{max-jobs,num-cpus}: ensuring parallel building
+ # --without-{afms,fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
+ # --without-stlport: disable deprecated extensions framework
+ econf \
+ --with-system-headers \
+ --with-system-libs \
+ --with-system-jars \
+ --with-system-db \
+ --with-system-dicts \
+ --enable-cairo \
+ --enable-fontconfig \
+ --enable-largefile \
+ --enable-randr \
+ --enable-randr-link \
+ --enable-unix-qstart-libpng \
+ --enable-Xaw \
+ --enable-xrender-link \
+ --disable-broffice \
+ --disable-crashdump \
+ --disable-dependency-tracking \
+ --disable-epm \
+ --disable-fetch-external \
+ --disable-gnome-vfs \
+ --disable-kdeab \
+ --disable-kde \
+ --disable-online-update \
+ --disable-rpath \
+ --disable-static-gtk \
+ --disable-zenity \
+ --with-alloc=system \
+ --with-build-version="Gentoo official package" \
+ --with-extension-integration \
+ --with-external-dict-dir="${EPREFIX}/usr/share/myspell" \
+ --with-external-hyph-dir="${EPREFIX}/usr/share/myspell" \
+ --with-external-thes-dir="${EPREFIX}/usr/share/myspell" \
+ --with-lang="${LINGUAS_OOO}" \
+ --with-max-jobs=${jobs} \
+ --with-num-cpus=${jobs} \
+ --with-theme="${themes}" \
+ --with-unix-wrapper=libreoffice \
+ --with-vendor="Gentoo Foundation" \
+ --with-x \
+ --without-afms \
+ --without-fonts \
+ --without-myspell-dicts \
+ --without-ppds \
+ --without-stlport \
+ $(use_enable binfilter) \
+ $(use_enable cups) \
+ $(use_enable dbus) \
+ $(use_enable eds evolution2) \
+ $(use_enable gnome gconf) \
+ $(use_enable gnome gio) \
+ $(use_enable gnome lockdown) \
+ $(use_enable graphite) \
+ $(use_enable gstreamer) \
+ $(use_enable gtk) \
+ $(use_enable gtk systray) \
+ $(use_enable java ext-scripting-beanshell) \
+ $(use_enable kde kde4) \
+ $(use_enable ldap) \
+ $(use_enable mysql ext-mysql-connector) \
+ $(use_enable nsplugin mozilla) \
+ $(use_enable odk) \
+ $(use_enable opengl) \
+ $(use_enable pch) \
+ $(use_enable python) \
+ $(use_enable python ext-scripting-python) \
+ $(use_enable webdav neon) \
+ $(use_with java) \
+ $(use_with java junit) \
+ $(use_with ldap openldap) \
+ $(use_with mysql system-mysql-cppconn) \
+ $(use_with nsplugin system-mozilla libxul) \
+ $(use_with offlinehelp helppack-integration) \
+ $(use_with templates sun-templates) \
+ ${internal_libs} \
+ ${java_opts}
}
src_compile() {
@@ -450,23 +505,23 @@ src_install() {
export PYTHONPATH=""
- einfo "Preparing Installation"
emake DESTDIR="${D}" install || die
# Fix the permissions for security reasons
- chown -RP root:0 "${ED}"
+ use prefix || chown -RP root:0 "${ED}"
# Desktop files
- cd "${ED}"/usr/$(get_libdir)/${PN}/share/xdg/
- for desk in base calc draw impress javafilter math qstart startcenter writer; do
- if [ "${desk}" = "javafilter" ] ; then
- use java || { rm javafilter.desktop; continue; }
- fi
- mv ${desk}.desktop ${PN}-${desk}.desktop
- sed -i -e s/libreoffice3.4/${PN}/g ${PN}-${desk}.desktop || die
- sed -i -e s/libreoffice34/${PN}/g ${PN}-${desk}.desktop || die
- domenu ${PN}-${desk}.desktop
+ for i in *; do
+ mv ${i}.desktop ${PN}-${i}.desktop
done
+ sed -i \
+ -e s/libreoffice3.4/${PN}/g \
+ -e s/libreoffice34/${PN}/g \
+ "${ED}"/usr/$(get_libdir)/${PN}/share/xdg/*.desktop || die111
+ use java || rm "${ED}"/usr/$(get_libdir)/${PN}/share/xdg/javafilter.desktop
+ pushd "${ED}"/usr/$(get_libdir)/${PN}/share/xdg/ > /dev/null
+ popd > /dev/null
+ domenu "${ED}"/usr/$(get_libdir)/${PN}/share/xdg/*.desktop
# install icons
insinto /usr/share/icons/
@@ -480,9 +535,14 @@ src_install() {
done
done
+ # install mime package
+ dodir /usr/share/mime/packages
+ cp sysui/*.pro/misc/${PN}/openoffice.org.xml \
+ "${ED}"/usr/share/mime/packages/${PN}.xml
+
# Install wrapper script
+ sed -i -e s/LIBDIR/$(get_libdir)/g "${T}/wrapper.in" || die
newbin "${T}/wrapper.in" ${PN} || die
- sed -i -e s/LIBDIR/$(get_libdir)/g "${ED}/usr/bin/${PN}" || die
# Cleanup after playing
rm "${ED}"/gid_Module_*
@@ -490,11 +550,11 @@ src_install() {
}
pkg_preinst() {
+ # Cache updates - all handled by kde eclass for all environments
kde4-base_pkg_preinst
}
pkg_postinst() {
- # Cache updates - all handled by kde eclass for all environments
kde4-base_pkg_postinst
pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin