ebuild cleanup and another patch for gcc 3.4
authorAndreas Proschofsky <suka@gentoo.org>
Mon, 17 Jan 2005 20:56:26 +0000 (20:56 +0000)
committerAndreas Proschofsky <suka@gentoo.org>
Mon, 17 Jan 2005 20:56:26 +0000 (20:56 +0000)
Package-Manager: portage-2.0.51-r13

app-office/openoffice/ChangeLog
app-office/openoffice/Manifest
app-office/openoffice/files/1.1.4/gcc34-sal-link-to-libsupc++.diff [new file with mode: 0644]
app-office/openoffice/openoffice-1.1.4.ebuild

index 1aac0e8036017c1c95f81af6c3651013d3c582e8..891556012e858a5ec391a2a52304687fe14a3cfc 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for app-office/openoffice
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice/ChangeLog,v 1.103 2005/01/17 15:05:25 suka Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice/ChangeLog,v 1.104 2005/01/17 20:56:26 suka Exp $
+
+  17 Jan 2005; Andreas Proschofsky <suka@gentoo.org>
+  +files/1.1.4/gcc34-sal-link-to-libsupc++.diff, openoffice-1.1.4.ebuild:
+  Cleanup and sync with openoffice-ximian, also add another patch for gcc 3.4
 
   17 Jan 2005; Andreas Proschofsky <suka@gentoo.org>
   openoffice-1.1.4.ebuild:
index b14fc9ac159ec0fb30ba3a021d36e96adfcc6aa0..46457b906a462bd8625a1359d21ee8910d8bc474 100644 (file)
@@ -1,6 +1,6 @@
-MD5 2a9593e8bc0c80215ac647c5096eb254 openoffice-1.1.4.ebuild 16721
+MD5 13ab9306fb9d531cdd4135f781187a37 openoffice-1.1.4.ebuild 16344
 MD5 db4fc1842f4f355e5c4c875ef6b61fdc openoffice-1.1.3.ebuild 15689
-MD5 c5845dc5ce59246aba9e77058fd4f4f9 ChangeLog 23109
+MD5 9129756327f4bda342ee5517f901acf8 ChangeLog 23315
 MD5 e3ec4a70395943b59adad7fc4f0538d7 metadata.xml 461
 MD5 fd065af92828cda546d797e6c86d102b files/digest-openoffice-1.1.3 73
 MD5 b2cb01ba0d5824f2892c150dce1d8771 files/digest-openoffice-1.1.4 325
@@ -18,5 +18,6 @@ MD5 a9cbc34e9462f6b64ca9e564c3b3a084 files/1.1.4/gcc34-nojava-fix.patch 329
 MD5 bf7df7ebe1373f6e2e5bd1e0425657bd files/1.1.4/gcc34-nptl-fix.patch 618
 MD5 fd1c64677627b46e5528f72564bcc8fd files/1.1.4/pthreadlink-fix.patch 1133
 MD5 cd0429c945d4f2e1fbbb9fd5322a6c2b files/1.1.4/freetype-217.patch 766
+MD5 f43ca2544f6cd797bed8e5aad1e50a29 files/1.1.4/gcc34-sal-link-to-libsupc++.diff 405
 MD5 6f7ff745a5659e605fb05206914ab344 files/1.1.4/STLport-vector.patch 1472
 MD5 a9233bc0091b925de38145108267b949 files/1.1.4/newstlportfix.patch 3638
diff --git a/app-office/openoffice/files/1.1.4/gcc34-sal-link-to-libsupc++.diff b/app-office/openoffice/files/1.1.4/gcc34-sal-link-to-libsupc++.diff
new file mode 100644 (file)
index 0000000..dd823ee
--- /dev/null
@@ -0,0 +1,13 @@
+--- sal/util/makefile.mk.foo   2004-12-21 14:38:37.314521336 -0500
++++ sal/util/makefile.mk       2004-12-21 14:46:52.495159848 -0500
+@@ -146,6 +146,10 @@
+ SHL1STDLIBS+=-init InitLibrary -term ExitLibrary
+ .ENDIF # MAC
+ 
++.IF "$(OS)"=="LINUX"
++SHL1STDLIBS+= -Wl,-Bstatic -lsupc++ -Wl,-Bdynamic -lgcc_s
++.ENDIF
++
+ .IF "$(GUI)"=="UNX"
+ .IF "$(OS)"=="SOLARIS"
+ # libposix4.so (SunOS 5.6) <-> librt.so (SunOS >= 5.7)
index 18840aa956dbb2792dd1f619499549d8d5668fee..4e6faf75d1b29702f2bf6a6a8e664b24b0fa6840 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice/openoffice-1.1.4.ebuild,v 1.10 2005/01/17 15:05:25 suka Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-office/openoffice/openoffice-1.1.4.ebuild,v 1.11 2005/01/17 20:56:26 suka Exp $
 
 # Notes:
 #
 #   Get support going for installing a custom language pack.  Also
 #   need to be able to install more than one language pack.
 
-inherit flag-o-matic eutils toolchain-funcs
+inherit eutils flag-o-matic toolchain-funcs
 
 IUSE="curl gnome hardened java kde nptl zlib"
 
-LOC="/opt"
-INSTDIR="${LOC}/OpenOffice.org"
+INSTDIR="/opt/OpenOffice.org"
 S="${WORKDIR}"
 DESCRIPTION="OpenOffice.org, a full office productivity suite."
+
 SRC_URI="mirror://openoffice/stable/${PV}/OOo_${PV}_source.tar.gz
                http://www.stlport.org/archive/STLport-4.6.2.tar.gz
                ppc? ( http://www.openoffice.org/files/documents/111/2112/LINUXGCCPinc.zip
@@ -45,20 +45,18 @@ SLOT="0"
 KEYWORDS="x86 ppc ~sparc"
 
 RDEPEND="!app-office/openoffice-bin
-       >=sys-libs/glibc-2.1
-       !=sys-libs/glibc-2.3.1*
+       virtual/x11
+       virtual/libc
+       virtual/lpr
        >=dev-lang/perl-5.0
        >=media-libs/libart_lgpl-2.3.13
        >=x11-libs/startup-notification-0.5
        >=media-libs/freetype-2.1.4
-       virtual/x11
        app-arch/zip
        app-arch/unzip
        dev-libs/expat
        java? ( >=virtual/jre-1.4.1 )
-       virtual/lpr
-       ppc? ( >=sys-libs/glibc-2.2.5-r7
-       >=sys-devel/gcc-3.2.1 )"
+       ppc? ( >=sys-devel/gcc-3.2.1 )"
 
 DEPEND="${RDEPEND}
        >=sys-apps/findutils-4.1.20-r1
@@ -86,10 +84,6 @@ pkg_setup() {
                fi
        fi
 
-       ewarn " This version should now also compile fine with gcc 3.4.x "
-       ewarn " If you encounter problems in relation to this, please report "
-       ewarn " them to http://bugs.gentoo.org "
-       ewarn ""
        ewarn " It is important to note that OpenOffice.org is a very fragile  "
        ewarn " build when it comes to CFLAGS.  A number of flags have already "
        ewarn " been filtered out.  If you experience difficulty merging this  "
@@ -227,10 +221,11 @@ src_unpack() {
        cp ${DISTDIR}/STLport-4.6.2.tar.gz ${S}/stlport/download || die
        epatch ${FILESDIR}/${PV}/newstlportfix.patch
 
-       epatch ${FILESDIR}/${PV}/openoffice-java.patch
-
        epatch ${FILESDIR}/${PV}/gcc-instlib.patch
 
+       #Another java problem
+       epatch ${FILESDIR}/${PV}/javafix.patch
+
        # Workaround for bug #73940, may break debug use flag on ppc
        if use ppc; then
                epatch ${FILESDIR}/${PV}/STLport-vector.patch
@@ -239,50 +234,27 @@ src_unpack() {
        #Fix for newer Freetype
        epatch ${FILESDIR}/${PV}/freetype-217.patch
 
-       #Another java problem
-       epatch ${FILESDIR}/${PV}/javafix.patch
-
-       #phtread-fix
-       epatch ${FILESDIR}/${PV}/pthreadlink-fix.patch
-
-       #Fix for hardened
-       if use hardened; then
-               epatch ${FILESDIR}/${PV}/hardened-link.patch
-       fi
+       epatch ${FILESDIR}/${PV}/openoffice-java.patch
 
        # GCC 3.4.x fixes
        if [ "$(gcc-version)" = "3.4" ]
        then
                epatch ${FILESDIR}/${PV}/gcc34.patch.bz2
+               epatch ${FILESDIR}/${PV}/gcc34-sal-link-to-libsupc++.diff
                use !java && epatch ${FILESDIR}/${PV}/gcc34-nojava-fix.patch
                use nptl && epatch ${FILESDIR}/${PV}/gcc34-nptl-fix.patch
        fi
 
-       # Compile problems with these ...
-       filter-flags "-funroll-loops"
-       filter-flags "-fomit-frame-pointer"
-       filter-flags "-fprefetch-loop-arrays"
-       filter-flags "-fno-default-inline"
-       filter-flags "-fstack-protector"
-       filter-flags "-ftracer"
-       append-flags "-fno-strict-aliasing"
-       replace-flags "-O3" "-O2"
-       replace-flags "-Os" "-O2"
+       #phtread-fix
+       epatch ${FILESDIR}/${PV}/pthreadlink-fix.patch
 
-       if [ "$(gcc-version)" == "3.2" ]; then
-               einfo "You use a buggy gcc, so replacing -march=pentium4 with -march=pentium3"
-               replace-flags "-march=pentium4" "-march=pentium3 -mcpu=pentium4"
+       #Fix for hardened
+       if use hardened; then
+               epatch ${FILESDIR}/${PV}/hardened-link.patch
        fi
 
-       # Now for our optimization flags ...
-       export CXXFLAGS="${CXXFLAGS} -fno-for-scope -fpermissive -fno-rtti"
-       perl -pi -e "s|^CFLAGSOPT=.*|CFLAGSOPT=${CFLAGS}|g" \
-               ${S}/solenv/inc/unxlngi4.mk
-       perl -pi -e "s|^CFLAGSCXX=.*|CFLAGSCXX=${CXXFLAGS}|g" \
-               ${S}/solenv/inc/unxlngi4.mk
-
        #Do our own branding by setting gentoo linux as the vendor
-       sed -i -e "s,\(//\)\(.*\)\(my company\),\2Gentoo Linux," ${S}/offmgr/source/offapp/intro/ooo.src
+       sed -i -e "s,\(//\)\(.*\)\(my company\),\2Gentoo Linux," ${S}/offmgr/source/offapp/intro/ooo.src || die
 }
 
 get_EnvSet() {
@@ -302,7 +274,6 @@ src_compile() {
 
        addpredict /bin
        addpredict /root/.gconfd
-       local buildcmd=""
        export MYCONF=""
 
        #Check if we use java
@@ -330,7 +301,7 @@ src_compile() {
        # compiled with 2.95.3, while OO is compiled with 3.x). (Az)
        einfo "Configuring OpenOffice.org with language support for ${LFULLNAME}..."
        cd ${S}/config_office
-       rm -f config.cache
+       rm -f config.cache || die
 
        if [ "LANGNAME" != "ENUS" ]; then
                LANGNAME="${LANGNAME},ENUS"
@@ -339,8 +310,8 @@ src_compile() {
        use sparc && MYCONF="${MYCONF} --disable-mozilla"
 
        MYCONF="${MYCONF} --enable-libart \
-               --with-lang=${LANGNAME} \
                --enable-libsn \
+               --with-lang=${LANGNAME} \
                --without-fonts \
                --with-system-freetype"
 
@@ -356,21 +327,53 @@ src_compile() {
                tar -xzf ${DISTDIR}/helpcontent_${LANGNO}_unix.tgz -C ${S}/solver/${SOLVER}/${SOLPATH}/pck
        fi
 
-       # Set $ECPUS to amount of processes multiprocessing build should use.
-       # NOTE:  Setting this too high might cause dmake to segfault!!
-       #        Setting this to anything but "1" on my pentium4 causes things
-       #        to segfault :(
-       [ -z "${ECPUS}" ] && export ECPUS="1"
+       # Build as minimal as possible
+       export BUILD_MINIMAL="${LANGNO}"
+
+       #Get info for parallel build
+       export JOBS=`echo "${MAKEOPTS}" | sed -e "s/.*-j\([0-9]\+\).*/\1/"`
 
-       # Should the build use multiprocessing?
-       # We use build.pl directly, as dmake tends to segfault. (Az)
-       if [ "${ECPUS}" -gt 1 ]
+       if [ "${JOBS}" -gt 10 ]
        then
-               buildcmd="${S}/solenv/bin/build.pl --all -P${ECPUS} product=full strip=true --dlv_switch link"
-       else
-               buildcmd="${S}/solenv/bin/build.pl --all product=full strip=true --dlv_switch link"
+               export JOBS="10"
+               einfo "dmake fails with too much parallel jobs, so limiting to 10"
+       fi
+
+       export buildcmd="${S}/solenv/bin/build.pl --all product=full strip=true --dlv_switch link"
+
+       # Should the build use multiprocessing? Not enabled by default, as it tends to break 
+       if [ "${WANT_DISTCC}" == "true" ]
+       then
+               if [ "${JOBS}" -gt 1 ]
+               then
+                       export buildcmd="${buildcmd} -P${JOBS}"
+                       einfo "Using distcc, Good Luck"
+               fi
+       fi
+
+       # Compile problems with these ...
+       filter-flags "-funroll-loops"
+       filter-flags "-fomit-frame-pointer"
+       filter-flags "-fprefetch-loop-arrays"
+       filter-flags "-fno-default-inline"
+       filter-flags "-fstack-protector"
+       filter-flags "-ftracer"
+       append-flags "-fno-strict-aliasing"
+       replace-flags "-O3" "-O2"
+       replace-flags "-Os" "-O2"
+
+       if [ "$(gcc-version)" == "3.2" ]; then
+               einfo "You use a buggy gcc, so replacing -march=pentium4 with -march=pentium3"
+               replace-flags "-march=pentium4" "-march=pentium3 -mcpu=pentium4"
        fi
 
+       # Now for our optimization flags ...
+       export CXXFLAGS="${CXXFLAGS} -fno-for-scope -fpermissive -fno-rtti"
+       perl -pi -e "s|^CFLAGSOPT=.*|CFLAGSOPT=${CFLAGS}|g" \
+               ${S}/solenv/inc/unxlngi4.mk
+       perl -pi -e "s|^CFLAGSCXX=.*|CFLAGSCXX=${CXXFLAGS}|g" \
+               ${S}/solenv/inc/unxlngi4.mk
+
        if [ -z "$(grep 'CCCOMP' ${S}/${LinuxEnvSet})" ]
        then
                # Set CCCOMP and CXXCOMP.  This is still needed for STLport
@@ -458,15 +461,6 @@ src_install() {
        find ${D}${INSTDIR}/ -type f -exec chmod a+r {} \;
        chmod a+x ${D}${INSTDIR}/share/config/webcast/*.pl
 
-       # Fix symlinks
-       for x in "soffice program/spadmin" \
-               "program/setup setup" \
-               "program/spadmin spadmin"
-       do
-               dosym $(echo ${x} | awk '{print $1}') \
-                       ${INSTDIR}/$(echo ${x} | awk '{print $2}')
-       done
-
        # Install user autoresponse file
        insinto /etc/openoffice
        sed -e "s|<pv>|${PV}|g" ${T}/rsfile-local > ${T}/autoresponse-${PV}.conf
@@ -527,6 +521,9 @@ src_install() {
                done
        fi
 
+       # Remove unneeded stuff
+       rm -rf ${D}${INSTDIR}/share/cde || die
+
        # Fix instdb.ins, to *not* install local copies of these
        for entry in Kdeapplnk Kdemimetext Kdeicons Gnome_Apps Gnome_Icons Gnome2_Apps; do
                perl -pi -e "/^File gid_File_Extra_$entry/ .. /^End/ and (\
@@ -538,9 +535,6 @@ src_install() {
                        ${D}${INSTDIR}/program/instdb.ins
        done
 
-       # Remove unneeded stuff
-       rm -rf ${D}${INSTDIR}/share/cde
-
        # Make sure these do not get nuked.
        keepdir ${INSTDIR}/user/registry/res/en-us/org/openoffice/{Office,ucb} ${INSTDIR}/user/psprint/{driver,fontmetric} ${INSTDIR}/user/{autocorr,backup,plugin,store,temp,template}
 }