]> Pileus Git - ~andy/sunrise/commitdiff
app-office/openoffice-infra: Some cleanups to the 3.0.1 ebuild, also switching to...
authorYar Odin (yarodin) <yarodin@gmail.com>
Fri, 6 Mar 2009 17:03:16 +0000 (17:03 +0000)
committerYar Odin (yarodin) <yarodin@gmail.com>
Fri, 6 Mar 2009 17:03:16 +0000 (17:03 +0000)
svn path=/sunrise/; revision=8023

app-office/openoffice-infra/ChangeLog
app-office/openoffice-infra/Manifest
app-office/openoffice-infra/openoffice-infra-3.0.1.ebuild

index 4b198d74c754fc456fc8e331ebef0844e46aebf2..afa7cf01cf72e23fb60a98a15d1f8c4872816586 100644 (file)
@@ -2,6 +2,11 @@
 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  06 Mar 2009; Yar Odin (yarodin) <yarodin@gmail.com>
+  openoffice-infra-3.0.1.ebuild:
+  Some cleanups to the 3.0.1 ebuild, also switching to EAPI=2, mostly the work
+  of Peter Volkov <pva@gentoo.org> and Andreas Proschofsky <suka@gentoo.org>
+
   27 Feb 2009; Yar Odin (yarodin) <yarodin@gmail.com>
   -files/2.4.2/gentoo-gentooinfra.diff:
   delete useless patch for openoffice-infra 2.4.2
index 7d5a6351d474c01ca3dc35ba7875fd7e3a03c660..de346f0b7f898c29c6ef2b12ff8b7dad03138f17 100644 (file)
@@ -33,7 +33,7 @@ DIST OOo_2.4.2_src_core.tar.bz2 153673147 RMD160 d29ed7d23a7616b05d855c172e6f148
 DIST OOo_2.4.2_src_l10n.tar.bz2 81193726 RMD160 7a2bf7cbe404b7fe8cb61c670717f54046e1cab9 SHA1 c59fefaf9f7e3372fbeb2a1e468270613b7b1fa6 SHA256 0b1869f8c9fc56ee7c6830bd844f212f6e8587d9deb0c7c3105c1acf22da63e8
 DIST OOo_2.4.2_src_sdk.tar.bz2 38354 RMD160 6f1334b4609a372970c03b33d9d8b9fe1a582d69 SHA1 5129e3ebd4ca18b0772f9916a94c52933896c68f SHA256 46f3f832384dd17dd503bd6090277f8937483c74850dd6b2666feb82361bb653
 DIST OOo_2.4.2_src_system.tar.bz2 44071903 RMD160 172fcde006f5e81f3be526ab50dbb10a67d277b3 SHA1 67dd2af4c25a311c2e83a7dcd3a8229378ee1625 SHA256 28eb0c3f53be94d01e93821669c9652a135f61faebf77b8a131e9632d1e090e4
-DIST OOo_3.0.1_src_binfilter.tar.bz2 20331 RMD160 24bb1234c790c754d230edee7512fa52faf69d79 SHA1 8db21f4f9cad8b0ad2ca327ed849f31650b65e26 SHA256 353a4d4e39060ec950acf22a6a798a78dbb24262f2d69be90b7e85e6e56093f8
+DIST OOo_3.0.1_src_binfilter.tar.bz2 6595398 RMD160 c6859a376c55cd453be214dbfa2d56f1b845a32b SHA1 d84518159538ef736271177b7ebe4697fc4b811d SHA256 3c8920d97777d7e2c579c8ade5ef13c9184278aa6b6185b7f15e70a61ea0077b
 DIST OOo_3.0.1_src_core.tar.bz2 182573274 RMD160 9c4f18779a03cdabb0204d8eb1b661b4d9cc1369 SHA1 2da6b2cf0b75873477f22cc9d69a4f0c8b43b435 SHA256 00e3a4c634b3522b006b6ca5690a97c814be546be5a19b80edfa53638e3df339
 DIST OOo_3.0.1_src_extensions.tar.bz2 13941829 RMD160 e89c7594f642147a95e85612d5646bc3edc869db SHA1 c695982d166422a838560ef7b134a5665bc61198 SHA256 dfc70ba2ac28c0c5f6942499bfd9dfa2fb147695f96ee4ec12d44d4b5f45e5b6
 DIST OOo_3.0.1_src_l10n.tar.bz2 86008240 RMD160 a02e8c06c67ac7b2833afa4a54993d81674e8b9b SHA1 13f1bf0989a09c52c57dbc1d6cf1feaec369a085 SHA256 53f0e621d2b38b97742ab67ef18313a868dbde43924ef54f9133121f29d4d75b
@@ -42,6 +42,6 @@ DIST infra-ooo-files_2.4.2.tar.gz 16480053 RMD160 8b14a6b019c10d1ddb073d85a596ae
 DIST infra-ooo-files_3.0.1.tar.gz 20712561 RMD160 76be30a30f6cd859a2342018550fc48637518d06 SHA1 28a79a28769548d0bf39fdb8c1bfa2f14e97576b SHA256 2b4daca6b551f71a31c0746d5be63ce7a126b5d281041222f8c637b3b522d411
 DIST unowinreg.dll 6144 RMD160 9e2a2789a96842a2aec747a62dee3db3e8370761 SHA1 712720da502d36175cd7aa05cb1862ee0330638c SHA256 f563e522922133db9340b0306711c2d8767cc3481dd9e7d9b0d059906d12653c
 EBUILD openoffice-infra-2.4.2.ebuild 23901 RMD160 41fbfa75a8ad55bbb8c289960ed839c3b85c6556 SHA1 167c79bf59a3e353150b3ab135ef759fb6d4d796 SHA256 76f973c5bcadfe5c448fe96b0d6c9c0e6d1ff8a4c83dfe643f832b318c9be356
-EBUILD openoffice-infra-3.0.1.ebuild 24115 RMD160 7514a2480a73a99df73dcc290504b877a142aed3 SHA1 3c3155c125bbc3fdbd42a3c2324e78f83d313ae0 SHA256 5dc84dcdc0913fa9160374a681953965d813cdf6138a4882f44fe53290ed810b
-MISC ChangeLog 3719 RMD160 2c6e741f72a47273bbff2097b719f9c8bb4f1d7e SHA1 beec720fd65694dd636aefda76f5ea11e1b9246a SHA256 468ea858529208947e8aefa03a1b13f11df432ee4c7527592fcdba2d4a299dd2
+EBUILD openoffice-infra-3.0.1.ebuild 23566 RMD160 1f9f56ab387ee3d5e3b8c0814c20c6ff0bc2026a SHA1 1e27a7c834bad5b0e8b31f788b5919b21ccddb50 SHA256 a2e5197505e421c4d2304ac6954ed3cbea4e79f6052abdbf83d37854de623f9b
+MISC ChangeLog 3963 RMD160 3cd1cfeb000a6391d052fe7bc3fd2af67dd47369 SHA1 f1344c36576bc76ef0591376fb3bae6afce44c9a SHA256 de0cbe12443c8bc671105bce3ab4910393d140500b8f8e2377af31ea06be87d7
 MISC metadata.xml 786 RMD160 7ade4465c360cd6e056bb17ad84d734b0632bfa0 SHA1 02dc5171d3660ff4471d40eb9f344b1e7d195254 SHA256 cf87cefd0eca5cfdf69024e119d003b02d7cba4e18cf05a939dcc4766af4ed25
index ee0610218e65194a6b476a3cb63a851127f67c20..3e4321df7f6851ece3290232d672136fd35a80fc 100644 (file)
@@ -2,9 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-WANT_AUTOCONF="2.5"
 WANT_AUTOMAKE="1.9"
-EAPI="1"
+EAPI="2"
 
 inherit autotools check-reqs db-use eutils fdo-mime flag-o-matic java-pkg-opt-2 kde-functions mono multilib toolchain-funcs
 
@@ -15,9 +14,9 @@ MILESTONE="15"
 OOOTAG=${PATCHLEVEL}_m${MILESTONE}
 OOOBUILDTAG=ooo300-m${MILESTONE}
 
-SRC="OOo_${PV}_src"
-S="${WORKDIR}/infra-ooo-files_${PV}"
-WORKSRC="${WORKDIR}/${OOOTAG}"
+SRC=OOo_${PV}_src
+S=${WORKDIR}/infra-ooo-files_${PV}
+WORKSRC=${WORKDIR}/${OOOTAG}
 
 DESCRIPTION="OpenOffice-Infra, office suite with enhanced Russian support from Infra-Resource"
 
@@ -112,9 +111,10 @@ DEPEND="${COMMON_DEPEND}
        >=net-misc/curl-7.12
        sys-libs/zlib
        sys-apps/coreutils
-       pam? ( sys-libs/pam )
+       pam? ( sys-libs/pam
+               sys-apps/shadow[pam] )
        !dev-util/dmake
-       >=dev-lang/python-2.3.4
+       >=dev-lang/python-2.3.4[threads]
        java? ( || ( =virtual/jdk-1.6* =virtual/jdk-1.5* )
                >=dev-java/ant-core-1.7 )
        ldap? ( net-nds/openldap )
@@ -152,8 +152,7 @@ pkg_setup() {
                ewarn " LINGUAS variable(s). LINGUAS=ru for example. "
                ewarn
        else
-               export LINGUAS_OOO=`echo ${LINGUAS} | \
-                       sed -e 's/\ben\b/en_US/g' -e 's/_/-/g'`
+               export LINGUAS_OOO=$(echo ${LINGUAS} | sed -e 's/\ben\b/en_US/g;s/_/-/g')
        fi
 
        if use !java; then
@@ -182,15 +181,6 @@ pkg_setup() {
                die
        fi
 
-       if use pam; then
-               if ! built_with_use sys-apps/shadow pam; then
-                       eerror
-                       eerror " shadow needs to be built with pam-support. "
-                       eerror " rebuild it accordingly or remove the pam use-flag "
-                       die
-               fi
-       fi
-
        if use nsplugin; then
                if pkg-config --exists libxul; then
                        BRWS="libxul"
@@ -203,17 +193,10 @@ pkg_setup() {
                fi
        fi
 
-       # Check python
-       if ! built_with_use dev-lang/python threads
-       then
-           eerror "Python needs to be built with threads."
-           die
-       fi
-
        java-pkg-opt-2_pkg_setup
 
        # sys-libs/db version used
-       local db_ver="$(db_findver '>=sys-libs/db-4.3')"
+       local db_ver=$(db_findver '>=sys-libs/db-4.3')
 
 }
 
@@ -226,6 +209,10 @@ src_unpack() {
        unpack ${SRC}_extensions.tar.bz2
        unpack ${SRC}_system.tar.bz2
 
+}
+
+src_prepare() {
+
        if use odk && use java; then
            cp -f "${DISTDIR}"/unowinreg.dll "${WORKSRC}"/external/unowinreg/
        fi
@@ -243,14 +230,11 @@ src_unpack() {
 
        cd "${WORKSRC}"; tar xjf "${WORKDIR}/infra-ooo-files_${PV}/files/extras-templates.tar.bz2"
        cd "${WORKSRC}"; rm -rf "extras/source/autotext/lang/ru/*" ; tar xjf "${WORKDIR}/infra-ooo-files_${PV}/files/extras_ru.tar.bz2"
-       "${WORKDIR}"/infra-ooo-files_${PV}/bin/enable-dict ru_RU "${WORKDIR}"/infra-ooo-files_${PV}/files/dict_ru_RU.tar.bz2  ${WORKSRC}
-       "${WORKDIR}"/infra-ooo-files_${PV}/bin/enable-dict uk_UA "${WORKDIR}"/infra-ooo-files_${PV}/files/dict_uk_UA.tar.bz2  ${WORKSRC}
-
-       mkdir -p "${WORKSRC}"/libwps/download/
-       mkdir -p "${WORKSRC}"/libwpg/download/
-       mkdir -p "${WORKSRC}"/libwpd/download/
-       mkdir -p "${WORKSRC}"/libsvg/download/
+       "${WORKDIR}"/infra-ooo-files_${PV}/bin/enable-dict ru_RU "${WORKDIR}"/infra-ooo-files_${PV}/files/dict_ru_RU.tar.bz2 "${WORKSRC}"
+       "${WORKDIR}"/infra-ooo-files_${PV}/bin/enable-dict uk_UA "${WORKDIR}"/infra-ooo-files_${PV}/files/dict_uk_UA.tar.bz2 "${WORKSRC}"
 
+       # Infra branding
+       mkdir -p "${WORKSRC}"/{libwps,libwpg,libwpd,libsvg}/download/
        cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/libwps*.tar.gz   "${WORKSRC}"/libwps/download/
        cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/libwpg*.tar.gz   "${WORKSRC}"/libwpg/download/
        cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/libwpd*.tar.gz   "${WORKSRC}"/libwpd/download/
@@ -273,8 +257,8 @@ src_unpack() {
            patchconf="${patchconf} --distro=Binfilter"
        fi
 
-       "${WORKDIR}"/infra-ooo-files_${PV}/bin/apply.pl  "${WORKDIR}"/infra-ooo-files_${PV}/patches/dev300 ${WORKSRC} ${patchconf}
-       "${WORKDIR}"/infra-ooo-files_${PV}/bin/transform --apply "${WORKDIR}"/infra-ooo-files_${PV} ${WORKSRC}
+       "${WORKDIR}"/infra-ooo-files_${PV}/bin/apply.pl "${WORKDIR}"/infra-ooo-files_${PV}/patches/dev300 "${WORKSRC}" ${patchconf}
+       "${WORKDIR}"/infra-ooo-files_${PV}/bin/transform --apply "${WORKDIR}"/infra-ooo-files_${PV} "${WORKSRC}"
 
        if use postgres; then
            # fix using of pg lib
@@ -301,6 +285,14 @@ src_unpack() {
        # fix ru dict
        epatch "${FILESDIR}/${PV}/gentoo-ru_dict.diff"
 
+       cd "${WORKSRC}/config_office"
+
+       eautoreconf
+
+}
+
+src_configure() {
+
        # Use flag checks
        if use java; then
                CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-ant-home=${ANT_HOME}"
@@ -327,7 +319,7 @@ src_unpack() {
            local tempdict
            for i in ${LINGUAS_OOO}; do
                if [[ "${i}" != "en-US" ]]; then
-                   tempdict=`ls ${WORKSRC}/dictionaries/ | grep ${i} | sed -e 's/_//g' -e 's/\///g' | tr '[a-z]' '[A-Z]'`
+                   tempdict=$(ls ${WORKSRC}/dictionaries/ | grep ${i} | sed -e 's/_//g;s/\///g' | tr '[a-z]' '[A-Z]')
                    tempdicts="${tempdicts},${tempdict}"
                fi
            done
@@ -340,19 +332,19 @@ src_unpack() {
            CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-external-thes-dir=/usr/share/myspell"
        fi
 
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable binfilter`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable cups`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable dbus`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable eds evolution2`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable gnome gnome-vfs`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable gnome lockdown`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable gstreamer`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable gtk systray`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable ldap`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable opengl`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_with ldap openldap`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable debug crashdump`"
-       CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable debug strip-solver`"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable binfilter)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable cups)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable dbus)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable eds evolution2)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable gnome gnome-vfs)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable gnome lockdown)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable gstreamer)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable gtk systray)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable ldap)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable opengl)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_with ldap openldap)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable debug crashdump)"
+       CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable debug strip-solver)"
 
        # Extension stuff
        CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-extension-integration"
@@ -368,20 +360,8 @@ src_unpack() {
        # Original branding results in black splash screens for some, so forcing ours
        CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-intro-bitmaps=\\\"${WORKSRC}/ooo_custom_images/nologo/introabout/intro.bmp\\\""
 
-       export CONFIGURE_ARGS
-
-       cd "${WORKSRC}/config_office"
-       eautoreconf
-
-}
-
-src_compile() {
-
-       # Should the build use multiprocessing? Not enabled by default, as it tends to break
-       export JOBS="1"
-       if [[ "${WANT_MP}" == "true" ]]; then
-           export JOBS=`echo "${MAKEOPTS}" | sed -e "s/.*-j\([0-9]\+\).*/\1/"`
-       fi
+       # Use multiprocessing by default now, it gets tested by upstream
+       export JOBS=$(echo "${MAKEOPTS}" | sed -e "s/.*-j\([0-9]\+\).*/\1/")
 
        # Compile problems with these ...
        filter-flags "-funroll-loops"
@@ -409,7 +389,7 @@ src_compile() {
 
        # Make sure gnome-users get gtk-support
        local GTKFLAG="--disable-gtk --disable-cairo --without-system-cairo"
-       ( use gtk || use gnome ) && GTKFLAG="--enable-gtk --enable-cairo --with-system-cairo"
+       { use gtk || use gnome; } && GTKFLAG="--enable-gtk --enable-cairo --with-system-cairo"
 
        use kde && set-kdedir 3
 
@@ -418,17 +398,18 @@ src_compile() {
 
        cd "${WORKSRC}/config_office"
 
+       # distro-configs are not hooked in infra build, passing configure options as commandline arguments
        ./configure \
                --srcdir="${DISTDIR}" \
                --with-lang="${LINGUAS_OOO}" \
                --with-build-version="${OOOTAG}" \
                ${GTKFLAG} \
-               `use_enable mono` \
-               `use_enable kde` \
-               `use_enable debug symbols` \
-               `use_enable odk` \
-               `use_enable pam` \
-               `use_with java` \
+               $(use_enable mono) \
+               $(use_enable kde) \
+               $(use_enable debug symbols) \
+               $(use_enable odk) \
+               $(use_enable pam) \
+               $(use_with java) \
                --with-system-jpeg \
                --with-system-libxml \
                --with-system-libwpd \
@@ -464,7 +445,9 @@ src_compile() {
                ${CONFIGURE_ARGS} \
                || die "Configuration failed!"
 
-       einfo "Building OpenOffice-Infra..."
+}
+
+src_compile() {
 
        cd "${WORKSRC}"
 
@@ -499,9 +482,6 @@ src_compile() {
            dmake || die "Build failed"
        fi
 
-       unset PYTHONPATH
-       unset PYTHONHOME
-
 }
 
 src_install() {
@@ -523,13 +503,8 @@ src_install() {
        fi
 
        allcomponents="${basecomponents}"
-       if use cups; then
-           allcomponents="${allcomponents} printeradmin"
-       fi
-
-       if use gtk || use gnome; then
-           allcomponents="${allcomponents} qstart"
-       fi
+       use cups && allcomponents="${allcomponents} printeradmin"
+       { use gtk || use gnome; } && allcomponents="${allcomponents} qstart"
 
        dodir "${instdir}"
 
@@ -573,7 +548,7 @@ src_install() {
        # Icons
        insinto /usr/share/icons
        doins -r "${WORKSRC}"/sysui/desktop/icons/{hicolor,locolor}
-       find "${D}"/usr/share/icons -name 'CVS' | xargs rm -rf
+       ecvs_clean "${D}/usr/share/icons"
        for color in {hicolor,locolor}; do
            for sizes in "${D}"usr/share/icons/${color}/* ; do
                for i in ${allcomponents}; do
@@ -605,7 +580,7 @@ src_install() {
        doins "${WORKSRC}"/sysui/unxlng"${arch_var}"6.pro/misc/openoffice.org/openoffice.org.xml
 
        # Install wrapper script
-       newbin "${FILESDIR}"/wrapper.in ooffice
+       newbin "${FILESDIR}"/wrapper.in ooffice || die
        sed -i -e s/LIBDIR/$(get_libdir)/g "${D}"/usr/bin/ooffice || die "Wrapper script failed"
 
        # Install PostgreSQL SDBC extension
@@ -645,12 +620,6 @@ src_install() {
 
 }
 
-pkg_preinst() {
-
-       use java && java-pkg-2_pkg_preinst
-
-}
-
 pkg_postinst() {
 
        fdo-mime_desktop_database_update