[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to build the libs for the GTK fe



The two scripts in the wiki page are quick hacks; I created one unique dirty
hack which
can perform the two step compilation in "one shot" if invoked like

sh script.sh all

before publishing this in the wiki page I want to test it and make sure it
works.
* no sanity checks are implemented * (read comments for details)

I'd like to know if compilation works on other arches (besides i386)
ciao

Davide

----------------------------------------

#!/bin/bash
# -*-sh-*-
#
#     Copyright (C) 2004-2005 Davide Viti <zinosat@tiscali.it>
#
#     This program is free software; you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation; either version 2 of the License, or
#     (at your option) any later version.
#
#     This program is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
#
#     You should have received a copy of the GNU General Public
#     License along with this program; if not, write to the Free
#     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
#     MA 02111-1307 USA
#
#
# Quick and dirty script for rebuilding all the libraries necessary for the
GTK frontend
# It performs no checks at all; it gives for granted that all sources have
been downloaded
# and no actions are taken if compilation fails somewhere (both are *bad*)
#
# First step compilation installs everything inside "./d-i_build"
# second step compilation installs everything inside "./d-i_final"


export BUILDDIR=$(pwd)/d-i_build
export LD_LIBRARY_PATH=${BUILDDIR}/lib
export PKG_CONFIG_PATH=${BUILDDIR}/lib/pkgconfig

function pass() {
    step=$1
    HERE=$(pwd)
    for DIR in glib atk slim libpixregion libic cairodfb/libpixman cairodfb/cairo
pango DirectFB gtk+ ; do
	cd ${DIR}

	echo -n "${DIR} (Pass${step})... "

	if [ ${step} = 1 ] ; then
	    DEFAULT_OPTS="--prefix=${BUILDDIR}"
	    DESTINATION=""
	else
	    DEFAULT_OPTS="--prefix=/usr --sysconfdir=/etc"
	    DESTINATION="DESTDIR=${INSTALLDIR}"
	fi

	case ${DIR} in
	    "DirectFB")
		EXTRA_OPT="--with-inputdrivers=keyboard,linuxinput,ps2mouse,serialmouse"
		;;
	    "gtk+")
		EXTRA_OPT="--with-gdktarget=directfb"
		;;
	    *)
		EXTRA_OPT=""
		;;
	esac

	sh autogen.sh ${DEFAULT_OPTS} ${EXTRA_OPT} > pass${step}_autogen.log 2>&1
	make > pass${step}_make.log 2>&1
	make install ${DESTINATION} > pass${step}_make_install.log 2>&1

	echo "Done"
	echo ""
	cd ${HERE}
    done
}

case "$1" in
    pass1)
	export LDFLAGS=-L${BUILDDIR}/lib
	pass 1;
	;;
    pass2)
	export INSTALLDIR=$(pwd)/d-i_final
	pass 2;
	;;
    all)
	pass 1;
	pass 2;
	;;
    *)
	echo $"Usage: $0 {pass1 | pass2 | all}"
	echo ""
	echo $"pass1          pass1 compilation"
	echo $"pass2          pass2 compilation"
	echo $"all            pass1 and pass2 compilation"
	exit 1
esac


__________________________________________________________________
TISCALI ADSL
Solo con Tiscali Adsl navighi senza limiti e telefoni senza canone
Telecom a partire da 19,95 Euro/mese.
Attivala subito, I PRIMI DUE MESI SONO GRATIS! CLICCA QUI:
http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/





Reply to: