Multiple bugfixes and improvements after building gtk+ from scratch.

- Fix a bug in unzip-extraction.sh that skipped the package that
  requested unzip and instead used the origin template.
- Pass CFLAGS, CXXFLAGS and CPPFLAGS through the environment and unset
  them once the package has been installed.
- Do not show the dependencies required for a pkg more than once time.

--HG--
extra : convert_revision : 731135558d29787ab5178b80df3578420872709d
This commit is contained in:
Juan RP 2008-10-03 14:32:26 +02:00
parent 6d6d456951
commit 902512dd96
10 changed files with 41 additions and 30 deletions

View File

@ -1,3 +1,4 @@
#
# This helper does the required steps to be able to build and install # This helper does the required steps to be able to build and install
# perl modules into the correct location. # perl modules into the correct location.
# #

View File

@ -1,4 +1,5 @@
# This script will transform the pkg-config files with correct #
# This helper will transform the pkg-config files with correct
# directories pointing at PKGFS_MASTERDIR specified in the config file. # directories pointing at PKGFS_MASTERDIR specified in the config file.
# #
pkgconfig_transform_file() pkgconfig_transform_file()

View File

@ -1,19 +1,26 @@
# Helper for templates using extract_sufx=".zip" that installs the unzip #
# package if it's not available in PKGFS_MASTERDIR. # This helper is used in templates using extract_sufx=".zip".
# This checks if unzip is installed and installs it if it's not
# and sets the unzip_cmd variable appropiately.
#
unzip_version="5.52" unzip_version="5.52"
# Save pkgname before installing unzip.
save_pkgname=$pkgname
# If unzip is already installed just return immediately. # If unzip is already installed just return immediately.
check_installed_tmpl unzip-$unzip_version check_installed_tmpl unzip-$unzip_version
if [ "$?" -ne 0 ]; then if [ "$?" -ne 0 ]; then
echo "=> unzip not installed, will install it." echo "=> unzip not installed, will install it."
install_tmpl unzip-$unzip_version install_tmpl unzip-$unzip_version
# #
# Continue with origin template that called us. # Continue with previous template that called us.
# #
reset_tmpl_vars reset_tmpl_vars
run_file ${origin_tmpl} run_file $PKGFS_TEMPLATESDIR/$save_pkgname.tmpl
check_tmpl_vars $save_pkgname
fi fi
unset save_pkgname
unset unzip_version unset unzip_version
unzip_cmd=$PKGFS_MASTERDIR/bin/unzip unzip_cmd=$PKGFS_MASTERDIR/bin/unzip

View File

@ -31,7 +31,6 @@
# TODO # TODO
# - Multiple distfiles in a package. # - Multiple distfiles in a package.
# - Multiple URLs to download source distribution files. # - Multiple URLs to download source distribution files.
# - Fix PKGFS_{C,CXX}FLAGS, aren't passed to the environment yet.
# - Support adding filters to templates to avoid creating useless links. # - Support adding filters to templates to avoid creating useless links.
# #
# Default path to configuration file, can be overriden # Default path to configuration file, can be overriden
@ -346,6 +345,7 @@ check_tmpl_vars()
check_rmd160_cksum() check_rmd160_cksum()
{ {
local file="$1" local file="$1"
local dfile=
[ -z "$file" ] && return 1 [ -z "$file" ] && return 1
@ -479,9 +479,13 @@ build_tmpl_sources()
echo "==> Building \`$pkgname' (be patient, may take a while)" echo "==> Building \`$pkgname' (be patient, may take a while)"
# #
# For now, just set LDFLAGS. # For now, just set them through the environment.
# #
export LDFLAGS="-L$PKGFS_MASTERDIR/lib -Wl,-R$PKGFS_MASTERDIR/lib $LDFLAGS" LDFLAGS="-L$PKGFS_MASTERDIR/lib -Wl,-R$PKGFS_MASTERDIR/lib $LDFLAGS"
export LDFLAGS="-L$PKGFS_DESTDIR/$pkgname/lib $LDFLAGS"
export CFLAGS="$CFLAGS $PKGFS_CFLAGS"
export CXXFLAGS="$CXXFLAGS $PKGFS_CXXFLAGS"
export CPPFLAGS="-I$PKGFS_MASTERDIR/include $CPPFLAGS"
export PKG_CONFIG="$PKGFS_MASTERDIR/bin/pkg-config" export PKG_CONFIG="$PKGFS_MASTERDIR/bin/pkg-config"
# Run stuff before configure. # Run stuff before configure.
@ -622,7 +626,7 @@ build_tmpl_sources()
pkgconfig_transform_file $tmpf pkgconfig_transform_file $tmpf
done done
unset LDFLAGS PKG_CONFIG unset LDFLAGS CFLAGS CXXFLAGS CPPFLAGS PKG_CONFIG
echo "==> Installed \`$pkgname' into $PKGFS_DESTDIR/$pkgname." echo "==> Installed \`$pkgname' into $PKGFS_DESTDIR/$pkgname."
@ -714,18 +718,26 @@ add_dependency_tolist()
# #
[ "$i" = "deps" ] && continue [ "$i" = "deps" ] && continue
echo -n " $i: " #
# origin_deps is used to only show the list of
# dependencies for the origin template once.
#
[ -n "$origin_deps" ] && \
echo -n " $i: "
# #
# Check if dep already installed. # Check if dep already installed.
# #
if [ -r "$reg_pkgdb" ]; then if [ -r "$reg_pkgdb" ]; then
check_installed_tmpl $i check_installed_tmpl $i
if [ "$?" -eq 0 ]; then if [ "$?" -eq 0 ]; then
echo "already installed." [ -n "$origin_deps" ] && \
echo "already installed."
continue continue
fi fi
echo "not installed."
# Added dep into list [ -n "$origin_deps" ] &&
echo "not installed."
deps_list="$i $deps_list" deps_list="$i $deps_list"
[ -n "$prev_depf" ] && unset prev_depf [ -n "$prev_depf" ] && unset prev_depf
# #
@ -733,6 +745,7 @@ add_dependency_tolist()
# #
depdbf="$PKGFS_DEPSDIR/$i-deps.db" depdbf="$PKGFS_DEPSDIR/$i-deps.db"
if [ -r "$PKGFS_DEPSDIR/$i-deps.db" ]; then if [ -r "$PKGFS_DEPSDIR/$i-deps.db" ]; then
unset origin_deps
add_dependency_tolist ${depdbf} add_dependency_tolist ${depdbf}
prev_depf="$depdbf" prev_depf="$depdbf"
fi fi
@ -746,6 +759,7 @@ install_dependency_tmpl()
local tmpdepf="$pkgdepf" local tmpdepf="$pkgdepf"
local tmppkgname= local tmppkgname=
deps_list= deps_list=
origin_deps=yes
[ -z "$pkgdepf" ] && return 1 [ -z "$pkgdepf" ] && return 1
@ -761,10 +775,11 @@ install_dependency_tmpl()
check_installed_tmpl $i check_installed_tmpl $i
[ "$?" -eq 0 ] && continue [ "$?" -eq 0 ] && continue
echo "=> Installing dependency: $i" echo "=> Installing dependency: $i"
install_tmpl "${i%-deps.db}" install_tmpl $i
done done
deps_list= unset deps_list
unset origin_deps
} }
install_xstow_tmpl() install_xstow_tmpl()
@ -773,7 +788,6 @@ install_xstow_tmpl()
reset_tmpl_vars reset_tmpl_vars
run_file "$PKGFS_TEMPLATESDIR/$xstow_version.tmpl" run_file "$PKGFS_TEMPLATESDIR/$xstow_version.tmpl"
cur_tmpl=$path_fixed
check_tmpl_vars ${xstow_version} check_tmpl_vars ${xstow_version}
fetch_tmpl_sources fetch_tmpl_sources
extract_tmpl_sources extract_tmpl_sources
@ -787,7 +801,6 @@ install_xstow_tmpl()
# Continue with origin package that called us. # Continue with origin package that called us.
# #
run_file ${origin_tmpl} run_file ${origin_tmpl}
cur_tmpl=${path_fixed}
} }
installed_tmpl_handler() installed_tmpl_handler()
@ -845,7 +858,6 @@ install_tmpl()
reset_tmpl_vars reset_tmpl_vars
run_file ${cur_tmpl} run_file ${cur_tmpl}
cur_tmpl=${path_fixed}
# #
# If we are the originator package save the path this template in # If we are the originator package save the path this template in

View File

@ -7,7 +7,6 @@ url=http://kent.dl.sourceforge.net/sourceforge/mesa3d
build_style=gnu_configure build_style=gnu_configure
make_build_args="MKDEP=mkdep" make_build_args="MKDEP=mkdep"
configure_args="--with-expat=$PKGFS_MASTERDIR" configure_args="--with-expat=$PKGFS_MASTERDIR"
configure_env="CPPFLAGS=-I$PKGFS_MASTERDIR/include"
make_cmd="$PKGFS_MASTERDIR/bin/gmake" make_cmd="$PKGFS_MASTERDIR/bin/gmake"
pkgconfig_override="gl.pc glu.pc glw.pc" pkgconfig_override="gl.pc glu.pc glw.pc"
short_desc="Graphics library similar to SGI's OpenGL" short_desc="Graphics library similar to SGI's OpenGL"

View File

@ -5,10 +5,6 @@ url=http://www.kernel.org/pub/software/scm/git
build_style=gnu_configure build_style=gnu_configure
configure_args="--with-shell=/bin/sh --with-perl=$PKGFS_MASTERDIR/bin/perl configure_args="--with-shell=/bin/sh --with-perl=$PKGFS_MASTERDIR/bin/perl
--with-curl --without-tcltk --with-expat" --with-curl --without-tcltk --with-expat"
# Looks like git is ignoring some stuff from autoconf, so pass our stuff
# directly to it through the environment.
export CPPFLAGS="-I$PKGFS_MASTERDIR/include"
export CURLDIR="$PKGFS_MASTERDIR"
make_cmd="$PKGFS_MASTERDIR/bin/gmake" make_cmd="$PKGFS_MASTERDIR/bin/gmake"
short_desc="GIT Tree History Storage Tool" short_desc="GIT Tree History Storage Tool"
maintainer="Daniel Horecki <morr@morr.pl>" maintainer="Daniel Horecki <morr@morr.pl>"

View File

@ -4,8 +4,6 @@ patch_files="$pkgname-tests-Makefile-in.diff"
extract_sufx=".tar.bz2" extract_sufx=".tar.bz2"
url=http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.14 url=http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.14
build_style=gnu_configure build_style=gnu_configure
LDFLAGS="-L$PKGFS_DESTDIR/$pkgname/lib"
configure_env="CPPFLAGS=-I$PKGFS_MASTERDIR/include"
configure_args="--disable-cups" configure_args="--disable-cups"
make_cmd="$PKGFS_MASTERDIR/bin/gmake" make_cmd="$PKGFS_MASTERDIR/bin/gmake"
pkgconfig_override="gail.pc gdk-2.0.pc gdk-pixbuf-2.0.pc gdk-pixbuf-xlib-2.0.pc pkgconfig_override="gail.pc gdk-2.0.pc gdk-pixbuf-2.0.pc gdk-pixbuf-xlib-2.0.pc

View File

@ -3,7 +3,6 @@ pkgname=jasper-1.900.1
extract_sufx=".zip" extract_sufx=".zip"
url=http://www.ece.uvic.ca/~mdadams/jasper/software url=http://www.ece.uvic.ca/~mdadams/jasper/software
build_style=gnu_configure build_style=gnu_configure
export CPPFLAGS="-I$PKGFS_MASTERDIR/include"
configure_args="--enable-shared --without-x --disable-opengl" configure_args="--enable-shared --without-x --disable-opengl"
short_desc="Software-based reference implementation of the JPEG-2000 codec" short_desc="Software-based reference implementation of the JPEG-2000 codec"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"

View File

@ -4,8 +4,6 @@ patch_files="$pkgname-docs-Makefile-in.diff"
extract_sufx=".tar.bz2" extract_sufx=".tar.bz2"
url=http://ftp.gnome.org/pub/GNOME/sources/pango/1.22 url=http://ftp.gnome.org/pub/GNOME/sources/pango/1.22
build_style=gnu_configure build_style=gnu_configure
configure_env="CPPFLAGS=-I$PKGFS_MASTERDIR/include"
LDFLAGS="-L$PKGFS_DESTDIR/$pkgname/lib"
make_cmd="$PKGFS_MASTERDIR/bin/gmake" make_cmd="$PKGFS_MASTERDIR/bin/gmake"
pkgconfig_override="pango.pc pangocairo.pc pangoft2.pc pangox.pc pangoxft.pc" pkgconfig_override="pango.pc pangocairo.pc pangoft2.pc pangox.pc pangoxft.pc"
short_desc="Library for layout and rendering of text" short_desc="Library for layout and rendering of text"

View File

@ -7,9 +7,9 @@ extract_sufx=".tgz"
url=ftp://ftp.info-zip.org/pub/infozip/src/ url=ftp://ftp.info-zip.org/pub/infozip/src/
build_style=gnu_makefile build_style=gnu_makefile
make_cmd="$PKGFS_MASTERDIR/bin/gmake" make_cmd="$PKGFS_MASTERDIR/bin/gmake"
CFLAGS="-I. -DUNIX -Dunix -DUSE_UNSHRINK"
make_build_args="-f unix/Makefile" make_build_args="-f unix/Makefile"
make_build_target="generic_zlib unzipsfx" make_build_target="generic_zlib unzipsfx"
export CFLAGS="-I. -DUNIX -Dunix -DUSE_UNSHRINK"
short_desc="List, test and extract compressed files in a ZIP archive" short_desc="List, test and extract compressed files in a ZIP archive"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"
checksum=b749b0923bc4cceaa6f937aef688e9713a84328c checksum=b749b0923bc4cceaa6f937aef688e9713a84328c