[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: [patch] fix for compiling arts with Red Hat gcc 2.96
From:       Carsten Griwodz <griff () ifi ! uio ! no>
Date:       2001-04-12 6:43:02
[Download RAW message or body]

Hi,

I have to use an inofficial gcc snapshot. I figure that nobody would be
interested in fixes for my compiler bugs, so I keep the necessary patches
ready ("<pkg>.compilerbug.patch", "<pkg>.postconfigure.patch") and use a
modified kde-cvsbuild to apply them after cvsup and after configure.

Maybe that is an acceptable workaround for others as well?

Regards,
   Carsten

On Wed, 11 Apr 2001, Hetz Ben Hamo wrote:

> I've upgraded to gcc-2.96-80 which compiles now the arts/mcop dir (tested 
> yesterday).
> 
> You can't switch GCC just like that - I tried to move back to GCC 2.95 and 
> recompile the entire KDE with it - it fails in the configure script.
> 
> So that leaves us - the Redhat users - with a big problem. I cannot compile 
> KDE with kgcc, and you refuse to put patches for letting us compiling mcop.
> 
> Do you think we're alone at this? think again! Mandrake 8.0 will have the 
> EXACT gcc that Redhat 7.1 will have (gcc 2.96) - so add this into account 
> when you refuse to add support for gcc 2.96.
> 
> I wish the GCC team would move their butt and release 3.0 (they even created 
> a 3.1 branch) - but they're not doing this - this makes gcc development speed 
> makes Mozilla development fast as a rabbit!
> 
> Hetz
> 

["kde-cvsbuild.diff" (TEXT/PLAIN)]

--- kde-cvsbuild	Tue Mar 27 22:14:23 2001
+++ /usr/local/bin/kde-cvsbuild	Thu Apr  5 15:44:11 2001
@@ -274,7 +273,7 @@
     CLink qt-copy $srcdir $objdir
     FCD $QTDIR
     if [ -e $QTDIR/Makefile ]; then
-	DoCmd "Cleaning $QTDIR" "make clean" "make clean" "$thnline";
+	DoCmd "Cleaning $QTDIR" "$MAKE clean" "$MAKE clean" "$thnline";
     fi
     FCD $objdir
     LogFinish "Cleaning Qt"
@@ -317,21 +316,53 @@
     echo "QTDIR=$QTDIR, srcdir=$srcdir, qtpkg=$qtpkg"
     CLink "" $srcdir/$qtpkg $QTDIR
     cd $QTDIR
-    DoCmd "Making CVS $QTDIR" "make $mk -f Makefile.cvs" "make (cvs)" "$thnline"
+    DoCmd "Making CVS $QTDIR" "$MAKE $mk -f Makefile.cvs" "$MAKE (cvs)" "$thnline"
     echo "yes" > yes.txt # This hack is required to automatically accept the \
                licensing terms
     DoCmd "Configuring $QTDIR" "./configure $qtcfg < yes.txt" "configure" "$thnline"
     rm -f yes.txt
-#    DoCmd "Making $QTDIR" "make $mk all" "make (all)" "$thnline"
-    DoCmd "Making $QTDIR" "make $mk src-moc" "make (src-moc)" "$thnline"
-    DoCmd "Making $QTDIR" "make $mk src-mt" "make (src-mt)" "$thnline"
-    DoCmd "Making $QTDIR" "make $mk sub-src" "make (sub-src)" "$thnline"
-    DoCmd "Making $QTDIR" "make $mk sub-tools" "make (sub-tools)" "$thnline"
-    su -p -c ldconfig
+#    DoCmd "Making $QTDIR" "$MAKE $mk all" "$MAKE (all)" "$thnline"
+    DoCmd "Making $QTDIR" "$MAKE $mk src-moc" "$MAKE (src-moc)" "$thnline"
+    DoCmd "Making $QTDIR" "$MAKE $mk src-mt" "$MAKE (src-mt)" "$thnline"
+    DoCmd "Making $QTDIR" "$MAKE $mk sub-src" "$MAKE (sub-src)" "$thnline"
+    DoCmd "Making $QTDIR" "$MAKE $mk sub-tools" "$MAKE (sub-tools)" "$thnline"
+#    ldconfig
 #    cd $objdir
     LogFinish "Building Qt"
 }
 
 
+# Check whether patch files exist and if so, apply
+# Usage: FixKDEPkg pkgname
+# TODO: early error detection to skip tasks which can't be done.
+FixKDEPkg() {
+    n="$1"
+    LogStart "Fixing package $n" "$thkline"
+    FCD $srcdir
+    CEcho "Looking for patches in $dir"
+    if [ -f $n.patch ]; then
+      DoCmd "Applying package-specific patch file $n.patch" "$PATCH -p0 < $n.patch" \
"patch $n.patch" +    else
+      CEcho "No package-specific patch file $n.patch"
+    fi
+    if [ -f $n.compilerbug.patch ]; then
+      DoCmd "Applying compiler-specific patch $n.compilerbug.patch" "$PATCH -p0 < \
$n.compilerbug.patch" "patch $n.compilerbug.patch" +    else
+      CEcho "No compiler-specific patch file $n.compilerbug.patch"
+    fi
+    LogFinish "Fixing package $n"
+}
+
+FixConfiguredKDEPkg() {
+    n="$1"
+    LogStart "Applying post-configure patches for package $n" "$thkline"
+    if [ -f $n.postconfigure.patch ]; then
+      DoCmd "Applying package-specific patch $n.postconfigure.patch" "$PATCH -p0 < \
$srcdir/$n.postconfigure.patch" "patch $srcdir/$n.postconfigure.patch" +    else
+      CEcho "No post-configure patch file $n.postconfigure.patch"
+    fi
+    LogFinish "Applying post-configure patches for package $n"
+}
+
 # Does everything needed to build the given directory (= pkgname).
 # Usage: BuildKDEPkg pkgname
 # TODO: early error detection to skip tasks which can't be done.
@@ -343,14 +374,16 @@
     CLink admin $srcdir/kde-common $srcdir/$n
     RmList $srcdir/$n $rmlist
     FCD $srcdir/$n
-    DoCmd "Making CVS $n" "make $mk -f Makefile.cvs" "make (cvs)" "$thnline";
+    DoCmd "Making CVS $n" "$MAKE $mk -f Makefile.cvs" "$MAKE (cvs)" "$thnline";
     CLink configure $srcdir/$n $objdir/$n
     GetUniqueFileName $srcdir/$n/configure.in
     CLink $uniquefn $srcdir/$n $objdir/$n
     FCD $objdir/$n
-    DoCmd "Configuring $n" "./configure --srcdir=$srcdir/$n $cfgopts" "configure" \
                "$thnline"
-    DoCmd "Making $n" "make $mk" "make" "$thnline"
-    DoCmd "Installing $n" "su -p -c 'make $mk install'" "make install'" "$thnline"
+    DoCmd "Configuring $n" "CXXFLAGS=-mminimal-toc CFLAGS=-mminimal-toc ./configure \
--srcdir=$srcdir/$n $cfgopts" "configure" "$thnline" +    FixConfiguredKDEPkg $n
+    DoCmd "Making $n" "$MAKE $mk" "$MAKE" "$thnline"
+    # DoCmd "Installing $n" "su -c '$MAKE $mk install'" "$MAKE install'" "$thnline"
+    DoCmd "Installing $n" "$MAKE $mk install" "$MAKE install'" "$thnline"
     DoBeep
     LogFinish "Building package $n"
 }
@@ -358,14 +391,14 @@
 
 # Makes kde-i18n for a certain language.
 # Usage: BuildKDEi18n
-# Here we just need to configure, make and install
+# Here we just need to configure, $MAKE and install
 # since configure still exists ;-)
 BuildKDEi18n() {
     LogStart "Building language package $kdei18n" "$thkline"
     FCD $srcdir/$kdei18n
     DoCmd "Configuring $kdei18n" "./configure" "configure" "$thnline"
-    DoCmd "Making $kdei18n" "make $mk" "make" "$thnline"
-    DoCmd "Installing $kdei18n" "su -p -c 'make $mk install'" "make install" \
"$thnline" +    DoCmd "Making $kdei18n" "$MAKE $mk" "$MAKE" "$thnline"
+    DoCmd "Installing $kdei18n" "$MAKE $mk install" "$MAKE install" "$thnline"
     LogFinish "Building language package $kdei18n"
 }
 
@@ -561,10 +587,11 @@
 # Builds all given kde-packages with BuildKDEPkg
 # Usage: BuildPkgs
 BuildPkgs() {
+    echo "Fixing package: kde-common"
+    FixKDEPkg "kde-common"
     echo "Building the following packages: $@"
-
-    # Build Packages:
     for i in $@; do
+	FixKDEPkg "$i";
 	BuildKDEPkg "$i";
     done
 }
@@ -595,6 +615,8 @@
     LogFinish "kde-cvsbuild process"
 }
 
+MAKE=gmake
+PATCH=gpatch
 
 # Initialize script with defaults and command line options:
 Init $@
@@ -616,3 +638,4 @@
 if [ "$do_shutdown" == "yes" ]; then
     halt;
 fi
+


>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic