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:
parent
6d6d456951
commit
902512dd96
10 changed files with 41 additions and 30 deletions
|
@ -1,3 +1,4 @@
|
|||
#
|
||||
# This helper does the required steps to be able to build and install
|
||||
# perl modules into the correct location.
|
||||
#
|
||||
|
|
|
@ -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.
|
||||
#
|
||||
pkgconfig_transform_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"
|
||||
|
||||
# Save pkgname before installing unzip.
|
||||
save_pkgname=$pkgname
|
||||
|
||||
# If unzip is already installed just return immediately.
|
||||
check_installed_tmpl unzip-$unzip_version
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "=> unzip not installed, will install it."
|
||||
install_tmpl unzip-$unzip_version
|
||||
#
|
||||
# Continue with origin template that called us.
|
||||
# Continue with previous template that called us.
|
||||
#
|
||||
reset_tmpl_vars
|
||||
run_file ${origin_tmpl}
|
||||
run_file $PKGFS_TEMPLATESDIR/$save_pkgname.tmpl
|
||||
check_tmpl_vars $save_pkgname
|
||||
fi
|
||||
|
||||
unset save_pkgname
|
||||
unset unzip_version
|
||||
unzip_cmd=$PKGFS_MASTERDIR/bin/unzip
|
||||
|
|
38
pkgfs.sh
38
pkgfs.sh
|
@ -31,7 +31,6 @@
|
|||
# TODO
|
||||
# - Multiple distfiles in a package.
|
||||
# - 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.
|
||||
#
|
||||
# Default path to configuration file, can be overriden
|
||||
|
@ -346,6 +345,7 @@ check_tmpl_vars()
|
|||
check_rmd160_cksum()
|
||||
{
|
||||
local file="$1"
|
||||
local dfile=
|
||||
|
||||
[ -z "$file" ] && return 1
|
||||
|
||||
|
@ -479,9 +479,13 @@ build_tmpl_sources()
|
|||
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"
|
||||
|
||||
# Run stuff before configure.
|
||||
|
@ -622,7 +626,7 @@ build_tmpl_sources()
|
|||
pkgconfig_transform_file $tmpf
|
||||
done
|
||||
|
||||
unset LDFLAGS PKG_CONFIG
|
||||
unset LDFLAGS CFLAGS CXXFLAGS CPPFLAGS PKG_CONFIG
|
||||
|
||||
echo "==> Installed \`$pkgname' into $PKGFS_DESTDIR/$pkgname."
|
||||
|
||||
|
@ -714,18 +718,26 @@ add_dependency_tolist()
|
|||
#
|
||||
[ "$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.
|
||||
#
|
||||
if [ -r "$reg_pkgdb" ]; then
|
||||
check_installed_tmpl $i
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "already installed."
|
||||
[ -n "$origin_deps" ] && \
|
||||
echo "already installed."
|
||||
continue
|
||||
fi
|
||||
echo "not installed."
|
||||
# Added dep into list
|
||||
|
||||
[ -n "$origin_deps" ] &&
|
||||
echo "not installed."
|
||||
|
||||
deps_list="$i $deps_list"
|
||||
[ -n "$prev_depf" ] && unset prev_depf
|
||||
#
|
||||
|
@ -733,6 +745,7 @@ add_dependency_tolist()
|
|||
#
|
||||
depdbf="$PKGFS_DEPSDIR/$i-deps.db"
|
||||
if [ -r "$PKGFS_DEPSDIR/$i-deps.db" ]; then
|
||||
unset origin_deps
|
||||
add_dependency_tolist ${depdbf}
|
||||
prev_depf="$depdbf"
|
||||
fi
|
||||
|
@ -746,6 +759,7 @@ install_dependency_tmpl()
|
|||
local tmpdepf="$pkgdepf"
|
||||
local tmppkgname=
|
||||
deps_list=
|
||||
origin_deps=yes
|
||||
|
||||
[ -z "$pkgdepf" ] && return 1
|
||||
|
||||
|
@ -761,10 +775,11 @@ install_dependency_tmpl()
|
|||
check_installed_tmpl $i
|
||||
[ "$?" -eq 0 ] && continue
|
||||
echo "=> Installing dependency: $i"
|
||||
install_tmpl "${i%-deps.db}"
|
||||
install_tmpl $i
|
||||
done
|
||||
|
||||
deps_list=
|
||||
unset deps_list
|
||||
unset origin_deps
|
||||
}
|
||||
|
||||
install_xstow_tmpl()
|
||||
|
@ -773,7 +788,6 @@ install_xstow_tmpl()
|
|||
|
||||
reset_tmpl_vars
|
||||
run_file "$PKGFS_TEMPLATESDIR/$xstow_version.tmpl"
|
||||
cur_tmpl=$path_fixed
|
||||
check_tmpl_vars ${xstow_version}
|
||||
fetch_tmpl_sources
|
||||
extract_tmpl_sources
|
||||
|
@ -787,7 +801,6 @@ install_xstow_tmpl()
|
|||
# Continue with origin package that called us.
|
||||
#
|
||||
run_file ${origin_tmpl}
|
||||
cur_tmpl=${path_fixed}
|
||||
}
|
||||
|
||||
installed_tmpl_handler()
|
||||
|
@ -845,7 +858,6 @@ install_tmpl()
|
|||
|
||||
reset_tmpl_vars
|
||||
run_file ${cur_tmpl}
|
||||
cur_tmpl=${path_fixed}
|
||||
|
||||
#
|
||||
# If we are the originator package save the path this template in
|
||||
|
|
|
@ -7,7 +7,6 @@ url=http://kent.dl.sourceforge.net/sourceforge/mesa3d
|
|||
build_style=gnu_configure
|
||||
make_build_args="MKDEP=mkdep"
|
||||
configure_args="--with-expat=$PKGFS_MASTERDIR"
|
||||
configure_env="CPPFLAGS=-I$PKGFS_MASTERDIR/include"
|
||||
make_cmd="$PKGFS_MASTERDIR/bin/gmake"
|
||||
pkgconfig_override="gl.pc glu.pc glw.pc"
|
||||
short_desc="Graphics library similar to SGI's OpenGL"
|
||||
|
|
|
@ -5,10 +5,6 @@ url=http://www.kernel.org/pub/software/scm/git
|
|||
build_style=gnu_configure
|
||||
configure_args="--with-shell=/bin/sh --with-perl=$PKGFS_MASTERDIR/bin/perl
|
||||
--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"
|
||||
short_desc="GIT Tree History Storage Tool"
|
||||
maintainer="Daniel Horecki <morr@morr.pl>"
|
||||
|
|
|
@ -4,8 +4,6 @@ patch_files="$pkgname-tests-Makefile-in.diff"
|
|||
extract_sufx=".tar.bz2"
|
||||
url=http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.14
|
||||
build_style=gnu_configure
|
||||
LDFLAGS="-L$PKGFS_DESTDIR/$pkgname/lib"
|
||||
configure_env="CPPFLAGS=-I$PKGFS_MASTERDIR/include"
|
||||
configure_args="--disable-cups"
|
||||
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
|
||||
|
|
|
@ -3,7 +3,6 @@ pkgname=jasper-1.900.1
|
|||
extract_sufx=".zip"
|
||||
url=http://www.ece.uvic.ca/~mdadams/jasper/software
|
||||
build_style=gnu_configure
|
||||
export CPPFLAGS="-I$PKGFS_MASTERDIR/include"
|
||||
configure_args="--enable-shared --without-x --disable-opengl"
|
||||
short_desc="Software-based reference implementation of the JPEG-2000 codec"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
|
|
|
@ -4,8 +4,6 @@ patch_files="$pkgname-docs-Makefile-in.diff"
|
|||
extract_sufx=".tar.bz2"
|
||||
url=http://ftp.gnome.org/pub/GNOME/sources/pango/1.22
|
||||
build_style=gnu_configure
|
||||
configure_env="CPPFLAGS=-I$PKGFS_MASTERDIR/include"
|
||||
LDFLAGS="-L$PKGFS_DESTDIR/$pkgname/lib"
|
||||
make_cmd="$PKGFS_MASTERDIR/bin/gmake"
|
||||
pkgconfig_override="pango.pc pangocairo.pc pangoft2.pc pangox.pc pangoxft.pc"
|
||||
short_desc="Library for layout and rendering of text"
|
||||
|
|
|
@ -7,9 +7,9 @@ extract_sufx=".tgz"
|
|||
url=ftp://ftp.info-zip.org/pub/infozip/src/
|
||||
build_style=gnu_makefile
|
||||
make_cmd="$PKGFS_MASTERDIR/bin/gmake"
|
||||
CFLAGS="-I. -DUNIX -Dunix -DUSE_UNSHRINK"
|
||||
make_build_args="-f unix/Makefile"
|
||||
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"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
checksum=b749b0923bc4cceaa6f937aef688e9713a84328c
|
||||
|
|
Loading…
Reference in a new issue