[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: NOTES
User: ahvezda
Date: 06/12/10 16:48:09
Modified: . NOTES buildgeda.sh
Log:
Various refractoring, updates, bug fixes. Now should work on ancient Linux distributions (again).
Revision Changes Path
1.3 +7 -2 eda/geda/buildgeda/NOTES
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NOTES
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/buildgeda/NOTES,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- NOTES 6 Dec 2006 13:40:47 -0000 1.2
+++ NOTES 10 Dec 2006 21:48:09 -0000 1.3
@@ -1,5 +1,10 @@
-Need to install libtool as well for libltdl
-Need to install gmp
+
+For guile 1.8.x:
+ Need to install libtool as well for libltdl
+ Need to install gmp
+
+For verilog-0.8.3:
+ Might need to install gperf
tar cvfz /tmp/blah.tgz -T$HOME/gedabuild/tarball.bom
1.6 +123 -45 eda/geda/buildgeda/buildgeda.sh
(In the diff below, changes in quantity of whitespace are not shown.)
Index: buildgeda.sh
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/buildgeda/buildgeda.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- buildgeda.sh 10 Dec 2006 02:50:09 -0000 1.5
+++ buildgeda.sh 10 Dec 2006 21:48:09 -0000 1.6
@@ -1,5 +1,7 @@
#!/bin/sh
+date
+
# Set the version of this binary build
export VERSION=20061209
@@ -7,12 +9,20 @@
export GAFVERSION=20061020
# Set the directory where things will be installed to
-#export INSTALLDIR=/usr/local/geda-$VERSION
export INSTALLDIR=$HOME/geda-$VERSION
# Set log filename
-export LOGFILE=/tmp/buildgeda.log
+export LOGFILE=`pwd`/logbuildgeda$$.txt
+# Figure out if we are doing work on an old version of RH since
+# we have to do special things due to the age of the distribution.
+issue_info=`cat /etc/issue | grep -i Enigma`
+if [ "$issue_info" != "" ]
+then
+ export OLD_DISTRIBUTION=1
+else
+ unset OLD_DISTRIBUTION
+fi
########################################################################
# Nothing below is configurable (yes, that means leave it alone)
@@ -131,59 +141,83 @@
extract_package $tarpath $tarflags
}
-# $1 is the location, $2 name of package and created subdirectory
-configure_build_install()
+# $1 is the package (without tar.gz or tar.bz2)
+configure_package()
{
- get_package_and_extract $1 $2
-
- cpwd=`pwd`
-
# CD into the package directory
- cd $SRCDIR/$2
+ cd $SRCDIR/$1
status=$?
if [ $status != 0 ]
then
- echo $2: failed to cd into $SRCDIR/$2
+ echo $1: failed to cd into $SRCDIR/$1
exit 4
fi
- echo Configuring: $2 $EXTRA_CONFIGURE_FLAGS
+ echo Configuring: $1 $EXTRA_CONFIGURE_FLAGS
./configure --prefix=$INSTALLDIR $EXTRA_CONFIGURE_FLAGS >> $LOGFILE 2>&1
status=$?
if [ $status != 0 ]
then
- echo $2: failed to configure
+ echo $1: failed to configure
exit 5
fi
+}
- echo Building: $2
+# $1 is the package (without tar.gz or tar.bz2)
+build_package()
+{
+ echo Building: $1
$MAKE >> $LOGFILE 2>&1
status=$?
if [ $status != 0 ]
then
- echo $2: failed to $MAKE
+ echo $1: failed to $MAKE
exit 6
fi
+}
- echo Installing: $2
+# $1 is the package (without tar.gz or tar.bz2)
+install_package()
+{
+ echo Installing: $1
$MAKE install >> $LOGFILE 2>&1
status=$?
if [ $status != 0 ]
then
- echo $2: failed to $MAKE install
+ echo $1: failed to $MAKE install
exit 7
fi
+}
+# $1 is the package (without tar.gz or tar.bz2)
+cleanup_package()
+{
cd ..
- echo Removing $2 source tree
- rm -rf $2
+ echo Removing $1 source tree
+ rm -rf $1
status=$?
if [ $status != 0 ]
then
- echo $2: failed to rm source tree
+ echo $1: failed to rm source tree
exit 8
fi
+}
+
+# $1 is the location, $2 name of package and created subdirectory
+configure_build_install()
+{
+ location=$1
+ package=$2
+ get_package_and_extract $location $package
+
+ cpwd=`pwd`
+
+ configure_package $package
+ build_package $package
+ install_package $package
+ cleanup_package $package
+
cd $cpwd
}
@@ -236,13 +270,6 @@
CREATEDDOCBOOK2PDF=1
fi
- # Grab and setup the special apbuild scripts
- # no longer needed, should be nuked from this script.
- #get_package_and_extract http://www.geda.seul.org/dist geda-apbuild-cvs-20051119
- #export CC=${SRCDIR}/apbuild/apgcc
- #export CXX=${SRCDIR}/apbuild/apg++
- #export APBUILD_STATIC_LIBGCC=1
- #export APBUILD_STATIC="stdc++"
export CC=gcc
export CXX=g++
}
@@ -346,10 +373,10 @@
build_gcc()
{
- package=gcc-4.1.1
+ package=gcc-4.0.3
cpwd=`pwd`
- #get_package_and_extract http://www.geda.seul.org/dist $package
+ get_package_and_extract http://www.geda.seul.org/dist $package
cd $SRCDIR/$package
@@ -397,11 +424,48 @@
cd $cpwd
}
+build_glib()
+{
+ # ftp://ftp.gtk.org/pub/glib/2.12/
+ location=http://www.geda.seul.org/dist
+ package=glib-2.12.4
+
+ get_package_and_extract $location $package
+
+ cpwd=`pwd`
+
+ configure_package $package
+
+ # Fix up config error if we are building on the old distribution
+ # Basically HAVE_CLOCK_GETTIME is getting set and it should be.
+ # Need to undo the damage caused by this in the config.h and
+ # Makefiles
+ if [ "$OLD_DISTRIBUTION" = 1 ]
+ then
+ mv config.h config.h.orig
+ cat config.h.orig | \
+ sed "s^#define HAVE_CLOCK_GETTIME 1^/* #undef HAVE_CLOCK_GETTIME */^" > config.h
+
+ allMakefiles=`find $SRCDIR/$package -name Makefile -print`
+ for i in $allMakefiles
+ do
+ mv $i $i.orig
+ cat $i.orig | sed "s/-lrt//g" > $i
+ done
+ fi
+
+ build_package $package
+ install_package $package
+ cleanup_package $package
+
+ cd $cpwd
+}
+
build_dependencies()
{
- build_bzip2
+ #build_bzip2
- gccver=`gcc --version | grep 4.1`
+ gccver=`gcc --version | grep 4.0`
if [ "$gccver" = "" ]
then
configure_build_install http://www.geda.seul.org/dist binutils-2.17
@@ -469,8 +533,7 @@
# http://cairographics.org/snapshots/
configure_build_install http://www.geda.seul.org/dist cairo-1.2.4
- # ftp://ftp.gtk.org/pub/glib/2.12/
- configure_build_install http://www.geda.seul.org/dist glib-2.12.4
+ build_glib
# ftp://ftp.gtk.org/pub/gtk/v2.10/dependencies
configure_build_install http://www.geda.seul.org/dist atk-1.10.1
@@ -479,9 +542,7 @@
configure_build_install http://www.geda.seul.org/dist pango-1.14.7
# ftp://ftp.gtk.org/pub/gtk/v2.10/
- #export EXTRA_CONFIGURE_FLAGS="--without-libtiff --without-libjpeg"
configure_build_install http://www.geda.seul.org/dist gtk+-2.10.6
- #export EXTRA_CONFIGURE_FLAGS=
# http://ftp.gnu.org/pub/gnu/guile/
configure_build_install http://www.geda.seul.org/dist guile-1.6.8
@@ -513,8 +574,9 @@
# Fix up Makefile with prefix and various options
mv Makefile Makefile.orig
- cat Makefile.orig | sed "s%prefix=\$(HOME)/geda%prefix=$INSTALLDIR%" \
- | sed "s%opts=%opts=--disable-gdgeda%" > $SRCDIR/Makefile
+ cat Makefile.orig | \
+ sed "s%prefix?=\$(HOME)/geda%prefix?=$INSTALLDIR%" | \
+ sed "s%opts=%opts=--disable-gdgeda%" > $SRCDIR/Makefile
rm -f Makefile.orig
cpwd=`pwd`
@@ -530,12 +592,28 @@
echo Extracing gEDA/gaf version $GAFVERSION
$MAKE open >> $LOGFILE 2>&1
+ status=$?
+ if [ $status != 0 ]
+ then
+ echo gaf: failed to $MAKE open
+ exit 7
+ fi
echo Building gEDA/gaf version $GAFVERSION
$MAKE install >> $LOGFILE 2>&1
+ status=$?
+ if [ $status != 0 ]
+ then
+ echo gaf: failed to $MAKE install
+ exit 7
+ fi
+ echo Cleaning up old gEDA/gaf source tree
+ rm -rf geda-*$GAFVERSION > /dev/null 2>&1
+ rm -rf libgeda-$GAFVERSION > /dev/null 2>&1
rm -f geda-*$GAFVERSION.tar.gz > /dev/null 2>&1
rm -f libgeda-$GAFVERSION.tar.gz > /dev/null 2>&1
+ rm -f Makefile
cd $cpwd
}
@@ -640,22 +718,19 @@
# Fix up hardcoded path to something the install script can fixup
#
- # Eventually change all /usr/local/geda-$VERSION to $INSTALLDIR
- # TBD
- #
cd $DISTDIR
# Ignore all: .so, .la, all files in bin
files=`find . -name \* -print | grep -v \.so | grep -v \.la | grep -v /bin/`
fixedupfiles=
for i in $files
do
- workneeded=`grep "/usr/local/geda-$VERSION" $i`
+ workneeded=`grep "$INSTALLDIR" $i`
if [ "$workneeded" != "" ]
then
echo Fixing up $i
fixedupfiles="$fixedupfiles $i"
mv $i $i.old
- cat $i.old | sed "s^/usr/local/geda-$VERSION^%INSTALLDIR%^g" > $i
+ cat $i.old | sed "s^$INSTALLDIR^%INSTALLDIR%^g" > $i
rm -f $i.old
fi
done
@@ -738,13 +813,16 @@
$i
done
-
-
# TBD
#build_gnucap
-
+#build_pcb
+#build_gwave
+#build_gtkwave
+#build_ngspice
+#build_gerbv
+#build_wcalc
cleanup
+date
echo done!
-
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs