Last active
September 28, 2019 08:55
Build script for gEDA/gaf under Cygwin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Originally contributed by Mario Giovinazzo for lepton-eda: | |
# https://github.com/lepton-eda/lepton-eda/wiki/Lepton-EDA-and-Cygwin | |
# https://github.com/mario-giovinazzo | |
#START | |
#---------------------------------- | |
# Set up Your destination directory | |
# (it can be outside cygwin) | |
#---------------------------------- | |
DSTDIR=$HOME/geda | |
#---------------------------------- | |
#* Cleanup any existing SOURCE directory | |
#* Create a new one | |
#* Clone GIT | |
#---------------------------------- | |
if [ -d source ]; then | |
echo "Removing old source directory" | |
rm -Rf source | |
echo "done" | |
fi | |
#----------- | |
mkdir source | |
cd source | |
git clone git://git.geda-project.org/geda-gaf.git | |
cd geda-gaf | |
./autogen.sh | |
cd .. | |
cd .. | |
echo "autogen done" | |
#---------------------------------- | |
# Cleanup any existing BUILD directory | |
# Create a new one | |
#---------------------------------- | |
echo "Building gEDA/gaf and installing in $DSTDIR" | |
echo "Create a build directory" | |
if [ -d build ]; then | |
echo "Removing old build directory" | |
rm -Rf build | |
echo "done" | |
fi | |
#----------- | |
mkdir build | |
cd build | |
#---------------------------------- | |
# Build and install LEPTON-EDA | |
#---------------------------------- | |
mkdir geda-gaf | |
( | |
cd geda-gaf | |
#----------------- | |
# SET ENV.. | |
#----------------- | |
PATH=$DSTDIR/bin:$PATH | |
LD_LIBRARY_PATH=$DSTDIR/lib:$LD_LIBRARY_PATH | |
PKG_CONFIG_PATH=/usr/lib/pkgconfig:$DSTDIR/lib/pkgconfig:$PKG_CONFIG_PATH | |
#----------------- | |
# CONFIGURE | |
#----------------- | |
echo "Configuring geda-gaf (for details see build/geda-gaf-configure.log)" | |
../../source/geda-gaf/configure \ | |
--prefix=$DSTDIR \ | |
--build=x86_64-pc-cygwin \ | |
--host=x86_64-pc-cygwin \ | |
--target=x86_64-pc-cygwin \ | |
--disable-update-xdg-database \ | |
--enable-relocatable \ | |
--disable-nls \ | |
> ../geda-gaf-configure.log 2>&1 | |
#----------------- | |
# MAKE step 1 -> This will exit with error on undefined reference to libgeda but create | |
# $DSTDIR/bin/cyggeda-1.dll $DSTDIR/lib/libgeda.dll.a & libgeda.la | |
#----------------- | |
echo "STEP 1/2 Building geda-gaf (for details see build/geda-gaf-make-s1.log)" | |
make LDFLAGS="-no-undefined -lgio-2.0 -lgobject-2.0" > ../geda-gaf-make-s1.log 2>&1 | |
echo "Installing geda-gaf (for details see build/geda-gaf-install-s1.log)" | |
make LDFLAGS="-no-undefined" install > ../geda-gaf-install-s1.log 2>&1 | |
echo "done" | |
#----------------- | |
# MAKE step 2 -> let add -lgeda -lgedacairo and | |
# run make again to full build geda-gaf package | |
#----------------- | |
echo "STEP 2/2 Building geda-gaf (for details see build/geda-gaf-make-s2.log)" | |
make LDFLAGS="-no-undefined -lgeda -lgedacairo -lgio-2.0 -lgobject-2.0" > ../geda-gaf-make-s2.log 2>&1 | |
echo "Installing geda-gaf (for details see build/geda-gaf-install-s2.log)" | |
make LDFLAGS="-no-undefined" install > ../geda-gaf-install-s2.log 2>&1 | |
echo "done" | |
#----------------- | |
) | |
# Make /.local/share dir just because it requires privileges | |
mkdir $HOME/.local | |
mkdir $HOME/.local/share | |
#END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment