Mega patch to improve how build dependencies are handled and

how packages are found.

First: I removed all these *-deps.db files and only a single file
is used now "build-depends.db"; it's smaller and will be easier
to handle in the future... when "run-depends.db" is added :-)

Second: there's no need to specify version of package anymore;
before you had to do:

	$ pkgfs.sh install git-1.6.0.2

now you only do:

	$ pkgfs.sh install git

This will read the variables located at PKGFS_TEMPLATESDIR/git.tmpl
and will the install the version that is there.

--HG--
extra : convert_revision : 9e3e5d70965a69c76f59e322b7c7b674d627af52
This commit is contained in:
Juan RP 2008-10-04 06:29:49 +02:00
parent 4cd4543c72
commit e9def74b60
175 changed files with 473 additions and 308 deletions

Binary file not shown.

Binary file not shown.

BIN
dependencies/build-depends.db vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -18,7 +18,7 @@
: ${perl_cmd:=$PKGFS_MASTERDIR/bin/perl}
: ${PERL_DESTDIR:=$PKGFS_MASTERDIR}
: ${PERL_PREFIX:=$PERL_DESTDIR}
: ${PERL_DPREFIX:=$PKGFS_DESTDIR/$pkgname}
: ${PERL_DPREFIX:=$PKGFS_DESTDIR/$pkgname-$version}
: ${PERL_VERSION:=5.10.0}
: ${PERL_LDDLFLAGS:=--whole-archive -shared -L$PKGFS_MASTERDIR/lib}
: ${PERL_SITELIBEXP:=$PERL_DPREFIX/lib/perl5/site_perl/$PERL_VERSION}

View file

@ -5,11 +5,12 @@
pkgconfig_transform_file()
{
local file="$1"
local pkg="$pkgname-$version"
[ -z "$file" ] && return 1
$sed_cmd \
-e "s|^exec_prefix=$PKGFS_DESTDIR/$pkgname.*$|exec_prefix=\${prefix}|" \
-e "s|^exec_prefix=$PKGFS_DESTDIR/$pkg.*$|exec_prefix=\${prefix}|" \
-e "s|-L\${libdir}|-L\${libdir} -Wl,-R\${libdir}|" \
$file > $file.in && \
$mv_cmd $file.in $file

View file

@ -12,7 +12,7 @@ save_pkgname=$pkgname
check_installed_tmpl unzip-$unzip_version
if [ "$?" -ne 0 ]; then
echo "=> unzip not installed, will install it."
install_tmpl unzip-$unzip_version
install_tmpl unzip
#
# Continue with previous template that called us.
#

264
pkgfs.sh
View file

@ -61,7 +61,6 @@
: ${db_cmd:=/usr/bin/db -q}
: ${chmod_cmd:=/bin/chmod}
: ${xstow_version:=xstow-0.6.1-unstable}
: ${xstow_args:=-ap}
: ${xstow_ignore_files:=perllocal.pod} # XXX For now ignore them.
@ -70,6 +69,7 @@ set_defvars()
# Directories
: ${PKGFS_TEMPLATESDIR:=$PKGFS_DISTRIBUTIONDIR/templates}
: ${PKGFS_DEPSDIR:=$PKGFS_DISTRIBUTIONDIR/dependencies}
: ${PKGFS_BUILD_DEPS_DB:=$PKGFS_DEPSDIR/build-depends.db}
: ${PKGFS_TMPLHELPDIR:=$PKGFS_DISTRIBUTIONDIR/helper-templates}
local DDIRS="PKGFS_DEPSDIR PKGFS_TEMPLATESDIR PKGFS_TMPLHELPDIR"
@ -160,6 +160,9 @@ merge_infodir_tmpl()
$PKGFS_MASTERDIR/share/info/dir
}
#
# Shows info about a template.
#
info_tmpl()
{
local tmpl="$1"
@ -169,7 +172,7 @@ info_tmpl()
exit 1
fi
run_file ${PKGFS_TEMPLATESDIR}/${tmpl}.tmpl
run_file $PKGFS_TEMPLATESDIR/$tmpl.tmpl
echo " pkgfs template definitions:"
echo
@ -184,17 +187,19 @@ info_tmpl()
echo " short_desc: $short_desc"
echo "$long_desc"
echo
if [ -r "$PKGFS_DEPSDIR/$pkgname-deps.db" ]; then
pkgdepf="$PKGFS_DEPSDIR/$pkgname-deps.db"
list="$($db_cmd btree $pkgdepf deps)"
check_build_depends_tmpl $pkgname
if [ "$?" -eq 0 ]; then
local list="$($db_cmd -V btree $PKGFS_BUILD_DEPS_DB $pkgname)"
echo " This package requires the following dependencies to be built:"
for i in ${list}; do
[ "$i" = "deps" ] && continue
echo " $i"
done
fi
}
#
# Applies to the build directory the patches specified by a template.
#
apply_tmpl_patches()
{
if [ -z "$PKGFS_TEMPLATESDIR" ]; then
@ -241,6 +246,10 @@ apply_tmpl_patches()
fi
}
#
# Checks that all required variables specified in the configuration
# file are properly working.
#
check_config_vars()
{
local cffound=
@ -288,6 +297,9 @@ check_config_vars()
done
}
#
# Resets all vars used by a template.
#
reset_tmpl_vars()
{
local TMPL_VARS="pkgname extract_sufx distfiles url configure_args \
@ -298,13 +310,16 @@ reset_tmpl_vars()
run_stuff_before_configure_file run_stuff_before_build_file \
run_stuff_before_install_file run_stuff_after_install \
make_build_target make_install_target \
postinstall_helpers"
postinstall_helpers version"
for i in ${TMPL_VARS}; do
eval unset "$i"
done
}
#
# Checks some vars used in templates and sets $extract_cmd.
#
check_tmpl_vars()
{
local pkg="$1"
@ -312,7 +327,7 @@ check_tmpl_vars()
[ -z "$pkg" ] && return 1
REQ_VARS="pkgname extract_sufx url build_style"
REQ_VARS="pkgname version extract_sufx url build_style"
# Check if required vars weren't set.
for i in ${REQ_VARS}; do
@ -325,7 +340,7 @@ check_tmpl_vars()
done
if [ -z "$distfiles" ]; then
dfile="$pkgname$extract_sufx"
dfile="$pkgname-$version$extract_sufx"
elif [ -n "${distfiles}" ]; then
dfile="$distfiles$extract_sufx"
else
@ -356,6 +371,9 @@ check_tmpl_vars()
esac
}
#
# Verifies that a checksum of a distfile is correct.
#
check_rmd160_cksum()
{
local file="$1"
@ -364,7 +382,7 @@ check_rmd160_cksum()
[ -z "$file" ] && return 1
if [ -z "${distfiles}" ]; then
dfile="$pkgname$extract_sufx"
dfile="$pkgname-$version$extract_sufx"
elif [ -n "${distfiles}" ]; then
dfile="$distfiles$extract_sufx"
else
@ -385,6 +403,9 @@ check_rmd160_cksum()
fi
}
#
# Downloads the distfiles for a template from $url.
#
fetch_tmpl_sources()
{
local file=""
@ -393,7 +414,7 @@ fetch_tmpl_sources()
[ -z "$pkgname" ] && return 1
if [ -z "$distfiles" ]; then
file="$pkgname"
file="$pkgname-$version"
else
file="$distfiles"
fi
@ -431,11 +452,15 @@ fetch_tmpl_sources()
done
}
#
# Extracts contents of a distfile specified in a template into
# the build directory.
#
extract_tmpl_sources()
{
[ -z "$pkgname" ] && return 1
echo "==> Extracting \`$pkgname' into $PKGFS_BUILDDIR."
echo "==> Extracting \`$pkgname-$version' into $PKGFS_BUILDDIR."
$extract_cmd
if [ "$?" -ne 0 ]; then
@ -468,14 +493,20 @@ fixup_tmpl_libtool()
fi
}
#
# Configures, builds and installs a package into the destination
# directory.
#
build_tmpl_sources()
{
[ -z "$pkgname" ] && return 1
local pkg="$pkgname-$version"
[ -z "$pkgname" -o -z "$version" ] && return 1
if [ -n "$distfiles" -a -z "$wrksrc" ]; then
wrksrc=$PKGFS_BUILDDIR/$distfiles
elif [ -z "$wrksrc" ]; then
wrksrc=$PKGFS_BUILDDIR/$pkgname
wrksrc=$PKGFS_BUILDDIR/$pkg
else
wrksrc=$PKGFS_BUILDDIR/$wrksrc
fi
@ -490,13 +521,13 @@ build_tmpl_sources()
# Apply patches if requested by template file
apply_tmpl_patches
echo "==> Building \`$pkgname' (be patient, may take a while)"
echo "==> Building \`$pkg' (be patient, may take a while)"
#
# For now, just set them through the environment.
#
LDFLAGS="-L$PKGFS_MASTERDIR/lib -Wl,-R$PKGFS_MASTERDIR/lib $LDFLAGS"
export LDFLAGS="-L$PKGFS_DESTDIR/$pkgname/lib $LDFLAGS"
export LDFLAGS="-L$PKGFS_DESTDIR/$pkg/lib $LDFLAGS"
export CFLAGS="$CFLAGS $PKGFS_CFLAGS"
export CXXFLAGS="$CXXFLAGS $PKGFS_CXXFLAGS"
export CPPFLAGS="-I$PKGFS_MASTERDIR/include $CPPFLAGS"
@ -523,8 +554,8 @@ build_tmpl_sources()
# surprises later.
#
./configure --prefix="$PKGFS_MASTERDIR" \
--mandir="$PKGFS_DESTDIR/$pkgname/man" \
--infodir="$PKGFS_DESTDIR/$pkgname/share/info" \
--mandir="$PKGFS_DESTDIR/$pkg/man" \
--infodir="$PKGFS_DESTDIR/$pkg/share/info" \
--sysconfdir="$PKGFS_SYSCONFDIR" \
${configure_args}
@ -563,7 +594,7 @@ build_tmpl_sources()
fi
if [ "$build_style" != "perl_module" -a "$?" -ne 0 ]; then
echo "*** ERROR building (configure state) \`$pkgname' ***"
echo "*** ERROR building (configure state) \`$pkg' ***"
exit 1
fi
@ -594,7 +625,7 @@ build_tmpl_sources()
#
${make_cmd} ${make_build_args} ${make_build_target}
if [ "$?" -ne 0 ]; then
echo "*** ERROR building (make stage) \`$pkgname' ***"
echo "*** ERROR building (make stage) \`$pkg' ***"
exit 1
fi
@ -614,9 +645,9 @@ build_tmpl_sources()
# Install package via make.
#
${make_cmd} ${make_install_args} ${make_install_target} \
prefix="$PKGFS_DESTDIR/$pkgname"
prefix="$PKGFS_DESTDIR/$pkg"
if [ "$?" -ne 0 ]; then
echo "*** ERROR instaling \`$pkgname' ***"
echo "*** ERROR instaling \`$pkg' ***"
exit 1
fi
@ -634,7 +665,7 @@ build_tmpl_sources()
# Transform pkg-config files if requested by template.
#
for i in ${pkgconfig_override}; do
local tmpf="$PKGFS_DESTDIR/$pkgname/lib/pkgconfig/$i"
local tmpf="$PKGFS_DESTDIR/$pkg/lib/pkgconfig/$i"
[ -f "$tmpf" ] && \
[ -f $PKGFS_TMPLHELPDIR/pkg-config-transform.sh ] && \
. $PKGFS_TMPLHELPDIR/pkg-config-transform.sh
@ -642,7 +673,7 @@ build_tmpl_sources()
done
echo "==> Installed \`$pkgname' into $PKGFS_DESTDIR/$pkgname."
echo "==> Installed \`$pkg' into $PKGFS_DESTDIR/$pkg."
#
# Once all work has been done, unset compilation vars.
@ -655,12 +686,16 @@ build_tmpl_sources()
if [ -d "$wrksrc" -a -z "$dontrm_builddir" ]; then
$rm_cmd -rf $wrksrc
[ "$?" -eq 0 ] && \
echo "=> Removed \`$pkgname' build directory."
echo "=> Removed \`$pkg' build directory."
fi
cd $PKGFS_BUILDDIR
}
#
# Stows a currently installed package, i.e creates the links
# on the master directory.
#
stow_tmpl()
{
local pkg="$1"
@ -670,11 +705,18 @@ stow_tmpl()
[ -z "$pkg" ] && return 2
if [ -r "$PKGFS_DESTDIR/$pkg/$infodir_pkg" ]; then
merge_infodir_tmpl ${pkg}
if [ -n "$stow_flag" ]; then
pkg=$PKGFS_TEMPLATESDIR/$pkg.tmpl
run_file $pkg
pkg=$pkgname-$version
fi
if [ -r "$PKGFS_DESTDIR/$pkg/$infodir_pkg" -a -r "$infodir_master" ]; then
if [ -r "$PKGFS_DESTDIR/$pkg/$infodir_pkg" ]; then
merge_infodir_tmpl $pkg
fi
if [ -r "$PKGFS_DESTDIR/$pkg/$infodir_pkg" \
-a -r "$infodir_master" ]; then
xstow_args="$xstow_args -i-file-in-dir $infodir_pkg"
fi
@ -696,8 +738,8 @@ stow_tmpl()
#
# Run template postinstall helpers if requested.
#
if [ "$pkgname" != "$pkg" ]; then
run_file $PKGFS_TEMPLATESDIR/$pkg.tmpl
if [ "$pkgname" != "${pkg%%-$version}" ]; then
run_file $PKGFS_TEMPLATESDIR/${pkg%%-$version}.tmpl
fi
for i in ${postinstall_helpers}; do
@ -706,6 +748,10 @@ stow_tmpl()
done
}
#
# Unstows a currently stowned package, i.e removes its links
# from the master directory.
#
unstow_tmpl()
{
local pkg="$1"
@ -715,39 +761,39 @@ unstow_tmpl()
exit 1
fi
local tmppkg="${pkg%-[0-9]*}"
if [ "$tmppkg" = "xstow" ]; then
echo "*** INFO: You aren't allowed to unstow \`$xstow_version'."
if [ "$pkg" = "xstow" ]; then
echo "*** INFO: You aren't allowed to unstow \`$pkg'."
exit 1
fi
run_file $PKGFS_TEMPLATESDIR/$pkg.tmpl
$PKGFS_XSTOW_CMD -dir $PKGFS_DESTDIR -target $PKGFS_MASTERDIR \
-D -i-file-in-dir share/info/dir -ignore ${xstow_ignore_files} \
$PKGFS_DESTDIR/$pkg
$PKGFS_DESTDIR/$pkgname-$version
if [ "$?" -ne 0 ]; then
exit 1
else
$rm_cmd -f $PKGFS_DESTDIR/$pkg/share/info/dir
$rm_cmd -f $PKGFS_DESTDIR/$pkgname-$version/share/info/dir
echo "==> Removed \`$pkg' symlinks from master directory."
fi
installed_tmpl_handler unregister $pkg
installed_tmpl_handler unregister $pkgname-$version
}
#
# Recursive function that founds dependencies in all required
# packages.
#
add_dependency_tolist()
{
local pkgdepf="$1"
local reg_pkgdb="${PKGFS_DESTDIR}/${PKGFS_REGISTERED_PKG_DB}"
local curpkg="$1"
local reg_pkgdb="$PKGFS_DESTDIR/$PKGFS_REGISTERED_PKG_DB"
[ -z "$pkgdepf" ] && return 1
[ -n "$prev_depf" ] && pkgdepf=${prev_depf}
for i in $($db_cmd btree $pkgdepf deps); do
#
# Skip key
#
[ "$i" = "deps" ] && continue
[ -z "$curpkg" ] && return 1
[ -n "$prev_pkg" ] && curpkg=$prev_pkg
for i in $($db_cmd -V btree $PKGFS_BUILD_DEPS_DB ${curpkg%-[0-9]*}); do
#
# origin_deps is used to only show the list of
# dependencies for the origin template once.
@ -769,85 +815,81 @@ add_dependency_tolist()
echo "not installed."
deps_list="$i $deps_list"
[ -n "$prev_depf" ] && unset prev_depf
[ -n "$prev_pkg" ] && unset prev_pkg
#
# Check if dependency needs more deps.
#
depdbf="$PKGFS_DEPSDIR/$i-deps.db"
if [ -r "$PKGFS_DEPSDIR/$i-deps.db" ]; then
check_build_depends_tmpl $i
if [ "$?" -eq 0 ]; then
unset origin_deps
add_dependency_tolist ${depdbf}
prev_depf="$depdbf"
add_dependency_tolist $i
prev_pkg="$i"
fi
fi
done
}
#
# Installs all dependencies required by a package.
#
install_dependency_tmpl()
{
local pkgdepf="$1"
local tmpdepf="$pkgdepf"
local tmppkgname=
local pkg="$1"
deps_list=
origin_deps=yes
[ -z "$pkgdepf" ] && return 1
[ -z "$pkg" ] && return 1
doing_deps=true
tmp_pkgn=${pkgdepf%%-deps.db}
echo "==> Required dependencies for $(basename $tmp_pkgn):"
echo "==> Required dependencies for $(basename $pkg):"
add_dependency_tolist $pkgdepf
add_dependency_tolist $pkg
for i in ${deps_list}; do
# skip dup deps
check_installed_tmpl $i
[ "$?" -eq 0 ] && continue
echo "=> Installing dependency: $i"
install_tmpl $i
install_tmpl ${i%-[0-9]*}
done
unset deps_list
unset origin_deps
}
#
# Installs and stows the "xstow" package.
#
install_xstow_tmpl()
{
[ -x "$PKGFS_XSTOW_CMD" ] && return 0
reset_tmpl_vars
run_file "$PKGFS_TEMPLATESDIR/$xstow_version.tmpl"
check_tmpl_vars ${xstow_version}
run_file "$PKGFS_TEMPLATESDIR/xstow.tmpl"
check_tmpl_vars $pkgname-$version
fetch_tmpl_sources
extract_tmpl_sources
build_tmpl_sources
PKGFS_XSTOW_CMD="$PKGFS_DESTDIR/$xstow_version/bin/xstow"
stow_tmpl $xstow_version
$sed_cmd -e "s|PKGFS_XSTOW_.*|PKGFS_XSTOW_CMD=$PKGFS_MASTERDIR/bin/xstow|" \
$path_fixed > $path_fixed.in && \
$mv_cmd $path_fixed.in $path_fixed
PKGFS_XSTOW_CMD="$PKGFS_DESTDIR/$pkgname-$version/bin/xstow"
stow_tmpl $pkgname-$version
#
# Continue with origin package that called us.
#
run_file ${origin_tmpl}
run_file $origin_tmpl
}
#
# Registers or unregisters a package from the db file.
#
installed_tmpl_handler()
{
local action="$1"
local pkg="$2"
[ -z "$action" -o -z "$pkg" ] && return 1
#
# This function is called every time a package has been stowned
# or unstowned.
# There's a db(3) btree database file in
# PKGFS_DESTDIR/PKGFS_REGISTER_PKG_DB that stores which package
# is installed and stowned.
#
if [ "$action" = "register" ]; then
$db_cmd -w btree ${PKGFS_DESTDIR}/${PKGFS_REGISTERED_PKG_DB} \
$db_cmd -w btree $PKGFS_DESTDIR/$PKGFS_REGISTERED_PKG_DB \
$pkg stowned
if [ "$?" -ne 0 ]; then
echo -n "*** ERROR: couldn't register stowned \`$pkg'"
@ -855,7 +897,7 @@ installed_tmpl_handler()
exit 1
fi
elif [ "$action" = "unregister" ]; then
$db_cmd -d btree ${PKGFS_DESTDIR}/${PKGFS_REGISTERED_PKG_DB} $pkg
$db_cmd -d btree $PKGFS_DESTDIR/$PKGFS_REGISTERED_PKG_DB $pkg
if [ "$?" -ne 0 ]; then
echo -n "*** ERROR: \`$pkg' stowned not registered "
echo "in db file? ***"
@ -866,10 +908,14 @@ installed_tmpl_handler()
fi
}
#
# Checks the registered pkgs db file and returns 0 if pkg is installed,
# otherwise returns 1.
#
check_installed_tmpl()
{
local pkg="$1"
local db_file="${PKGFS_DESTDIR}/${PKGFS_REGISTERED_PKG_DB}"
local db_file="$PKGFS_DESTDIR/$PKGFS_REGISTERED_PKG_DB"
[ -z "$pkg" ] && return 1
@ -877,8 +923,27 @@ check_installed_tmpl()
return $?
}
#
# Checks the build depends db file and returns 0 if pkg has dependencies,
# otherwise returns 1.
#
check_build_depends_tmpl()
{
local pkg="$1"
[ -z $pkg ] && return 1
[ ! -r $PKGFS_BUILD_DEPS_DB ] && return 1
$db_cmd -V btree $PKGFS_BUILD_DEPS_DB ${pkg%-[0-9]*} 2>&1 >/dev/null
return $?
}
#
# Installs a pkg by reading its build template file.
#
install_tmpl()
{
local pkg=
cur_tmpl="$PKGFS_TEMPLATESDIR/$1.tmpl"
if [ -z "$cur_tmpl" -o ! -f "$cur_tmpl" ]; then
echo -n "*** ERROR: invalid template file '$cur_tmpl',"
@ -887,14 +952,15 @@ install_tmpl()
fi
reset_tmpl_vars
run_file ${cur_tmpl}
run_file $cur_tmpl
pkg="$1-$version"
#
# If we are the originator package save the path this template in
# other var for future use.
#
if [ -z "$origin_tmpl" ]; then
origin_tmpl=${path_fixed}
origin_tmpl=$path_fixed
fi
#
@ -905,23 +971,22 @@ install_tmpl()
#
# Check vars for current template.
#
check_tmpl_vars ${pkgname}
check_tmpl_vars $pkg
#
# Handle required dependency for this template iff it
# is not installed and if we are being invoked by a dependency.
# Install dependencies required by this package.
#
local pkgdepf="$PKGFS_DEPSDIR/$pkgname-deps.db"
if [ -r "$pkgdepf" -a -z "$doing_deps" ]; then
install_dependency_tmpl ${pkgdepf}
check_build_depends_tmpl $pkg
if [ "$?" -eq 0 -a -z "$doing_deps" ]; then
install_dependency_tmpl $pkg
#
# At this point all required deps are installed, and
# only remaining is the origin template; install it.
#
unset doing_deps
reset_tmpl_vars
run_file ${origin_tmpl}
check_tmpl_vars ${pkgname}
run_file $origin_tmpl
check_tmpl_vars $pkgname-$version
fi
if [ -n "$only_build" ]; then
@ -939,10 +1004,12 @@ install_tmpl()
#
# Do not stow the pkg if requested.
#
[ -z "$only_install" ] && stow_tmpl ${pkgname}
[ -z "$only_install" ] && stow_tmpl $pkg
}
#
# Lists all currently installed packages.
#
list_tmpls()
{
local reg_pkgdb="$PKGFS_DESTDIR/$PKGFS_REGISTERED_PKG_DB"
@ -956,12 +1023,15 @@ list_tmpls()
# Skip stowned value
[ "$i" = "stowned" ] && continue
# Run file to get short_desc and print something useful
run_file ${PKGFS_TEMPLATESDIR}/$i.tmpl
run_file ${PKGFS_TEMPLATESDIR}/${i%-[0-9]*}.tmpl
echo "$i $short_desc"
reset_tmpl_vars
done
}
#
# Removes a currently installed package (unstow + removed from destdir).
#
remove_tmpl()
{
local pkg="$1"
@ -971,13 +1041,20 @@ remove_tmpl()
exit 1
fi
if [ ! -d "$PKGFS_DESTDIR/$pkg" ]; then
if [ ! -f "$PKGFS_TEMPLATESDIR/$pkg.tmpl" ]; then
echo "*** ERROR: cannot find template file ***"
exit 1
fi
run_file $PKGFS_TEMPLATESDIR/$pkg.tmpl
if [ ! -d "$PKGFS_DESTDIR/$pkg-$version" ]; then
echo "*** ERROR: cannot find package on $PKGFS_DESTDIR ***"
exit 1
fi
unstow_tmpl ${pkg}
$rm_cmd -rf $PKGFS_DESTDIR/$pkg
unstow_tmpl $pkg-$version
$rm_cmd -rf $PKGFS_DESTDIR/$pkg-$version
return "$?"
}
@ -1047,6 +1124,7 @@ remove)
remove_tmpl "$2"
;;
stow)
stow_flag=yes
stow_tmpl "$2"
;;
unstow)

View file

@ -1,7 +1,8 @@
# Template build file for 'MesaLib-7.2'.
pkgname=MesaLib-7.2
# Template build file for 'MesaLib'.
pkgname=MesaLib
version=7.2
patch_files="$pkgname-fix-dri-build.diff"
wrksrc=Mesa-7.2
wrksrc=Mesa-$version
extract_sufx=".tar.bz2"
url=http://kent.dl.sourceforge.net/sourceforge/mesa3d
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'atk-1.24.0'.
pkgname=atk-1.24.0
# Template build file for 'atk'.
pkgname=atk
version=1.24.0
extract_sufx=".tar.bz2"
url=http://ftp.gnome.org/pub/GNOME/sources/atk/1.24
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template file for 'bigreqsproto-1.0.2'
pkgname=bigreqsproto-1.0.2
# Template file for 'bigreqsproto'
pkgname=bigreqsproto
version=1.0.2
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'cairo-1.7.6'.
pkgname=cairo-1.7.6
# Template build file for 'cairo'.
pkgname=cairo
version=1.7.6
patch_files="$pkgname-doc-public-Makefile-in.diff"
extract_sufx=".tar.gz"
url=http://cairographics.org/snapshots

View file

@ -1,5 +1,6 @@
# Template build file for 'compositeproto-0.4'.
pkgname=compositeproto-0.4
# Template build file for 'compositeproto'.
pkgname=compositeproto
version=0.4
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template file for 'curl-7.18.0'
pkgname=curl-7.18.0
# Template file for 'curl'
pkgname=curl
version=7.18.0
extract_sufx=".tar.bz2"
url=http://curl.haxx.se/download/
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'damageproto-1.1.0'.
pkgname=damageproto-1.1.0
# Template build file for 'damageproto'.
pkgname=damageproto
version=1.1.0
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'dmxproto-2.2.2'.
pkgname=dmxproto-2.2.2
# Template build file for 'dmxproto'.
pkgname=dmxproto
version=2.2.2
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'evieext-1.0.2'.
pkgname=evieext-1.0.2
# Template build file for 'evieext'.
pkgname=evieext
version=1.0.2
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template file for 'expat-2.0.1'
pkgname=expat-2.0.1
# Template file for 'expat'
pkgname=expat
version=2.0.1
extract_sufx=".tar.gz"
url=http://kent.dl.sourceforge.net/sourceforge/expat
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'fixesproto-4.0'.
pkgname=fixesproto-4.0
# Template build file for 'fixesproto'.
pkgname=fixesproto
version=4.0
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'fontcacheproto-0.1.2'.
pkgname=fontcacheproto-0.1.2
# Template build file for 'fontcacheproto'.
pkgname=fontcacheproto
version=0.1.2
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'fontconfig-2.6.0'.
pkgname=fontconfig-2.6.0
# Template build file for 'fontconfig'.
pkgname=fontconfig
version=2.6.0
patch_files="$pkgname-Makefile-fc-cache.diff"
extract_sufx=".tar.gz"
url=http://www.fontconfig.org/release

View file

@ -1,5 +1,6 @@
# Template build file for 'fontsproto-2.0.2'.
pkgname=fontsproto-2.0.2
# Template build file for 'fontsproto'.
pkgname=fontsproto
version=2.0.2
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,9 +1,8 @@
# Template build file for 'freetype2-2.3.7'.
freetype2_version="2.3.7"
pkgname=freetype2-$freetype2_version
# Template build file for 'freetype2'.
pkgname=freetype2
version=2.3.7
extract_sufx=".tar.bz2"
distfiles="freetype-$freetype2_version"
distfiles="freetype-$version"
url=http://download.savannah.gnu.org/releases/freetype
build_style=gnu_configure
make_cmd="$PKGFS_MASTERDIR/bin/gmake"

View file

@ -1,5 +1,6 @@
# Template build file for 'git-1.6.0.2".
pkgname=git-1.6.0.2
# Template build file for 'git".
pkgname=git
version=1.6.0.2
extract_sufx=".tar.bz2"
url=http://www.kernel.org/pub/software/scm/git
build_style=gnu_configure

View file

@ -1,7 +1,8 @@
# Template build file for 'glib-2.18.1'
pkgname=glib-2.18.1
# Template build file for 'glib'
pkgname=glib
version=2.18.1
extract_sufx=".tar.bz2"
patch_files="glib-2.18.1-fix-statfs-netbsd.diff"
patch_files="glib-fix-statfs-netbsd.diff"
url=http://ftp.gnome.org/pub/gnome/sources/glib/2.18
make_cmd="$PKGFS_MASTERDIR/bin/gmake"
# Disable FAM for now and use the installed pcre package instead

View file

@ -1,5 +1,6 @@
# Template build file for 'glitz-0.5.6'.
pkgname=glitz-0.5.6
# Template build file for 'glitz'.
pkgname=glitz
version=0.5.6
extract_sufx=".tar.gz"
url=http://cairographics.org/snapshots
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'glproto-1.4.9'.
pkgname=glproto-1.4.9
# Template build file for 'glproto'.
pkgname=glproto
version=1.4.9
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,7 +1,8 @@
# Template build file for 'gmake-3.81'
pkgname=gmake-3.81
# Template build file for 'gmake'
pkgname=gmake
version=3.81
extract_sufx=".tar.bz2"
distfiles="make-3.81"
distfiles="make-$version"
url=http://ftp.gnu.org/pub/gnu/make
configure_args="--program-prefix=g"
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'gtk+-2.14.3'.
pkgname=gtk+-2.14.3
# Template build file for 'gtk+'.
pkgname=gtk+
version=2.14.3
patch_files="$pkgname-tests-Makefile-in.diff"
extract_sufx=".tar.bz2"
url=http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.14

View file

@ -1,5 +1,6 @@
# Template file for 'inputproto-1.4.4'
pkgname=inputproto-1.4.4
# Template file for 'inputproto'
pkgname=inputproto
version=1.4.4
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'intltool-0.40.4'.
pkgname=intltool-0.40.4
# Template build file for 'intltool'.
pkgname=intltool
version=0.40.4
extract_sufx=".tar.bz2"
url=http://ftp.gnome.org/pub/GNOME/sources/intltool/0.40
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'irssi-0.8.12'
pkgname=irssi-0.8.12
# Template build file for 'irssi'
pkgname=irssi
version=0.8.12
extract_sufx=".tar.bz2"
url=http://www.irssi.org/files
# We need this to get some perl paths.

View file

@ -1,5 +1,6 @@
# Template build file for 'jasper-1.900.1'.
pkgname=jasper-1.900.1
# Template build file for 'jasper'.
pkgname=jasper
version=1.900.1
extract_sufx=".zip"
url=http://www.ece.uvic.ca/~mdadams/jasper/software
build_style=gnu_configure

View file

@ -1,7 +1,8 @@
# Template build file for 'jpeg-6b'.
pkgname=jpeg-6b
# Template build file for 'jpeg'.
pkgname=jpeg
version=6b
wrksrc=$pkgname-$version
patch_files="$pkgname-makefile-cfg.diff"
wrksrc="$pkgname"
distfiles="jpegsrc.v6b"
extract_sufx=".tar.gz"
url=ftp://ftp.fu-berlin.de/unix/graphics/jpeg

View file

@ -1,5 +1,6 @@
# Template file for 'kbproto-1.0.3'
pkgname=kbproto-1.0.3
# Template file for 'kbproto'
pkgname=kbproto
version=1.0.3
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/proto
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'libICE-1.0.4'.
pkgname=libICE-1.0.4
# Template build file for 'libICE'.
pkgname=libICE
version=1.0.4
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/lib
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template build file for 'libSM-1.1.0'.
pkgname=libSM-1.1.0
# Template build file for 'libSM'.
pkgname=libSM
version=1.1.0
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/lib
build_style=gnu_configure

View file

@ -1,5 +1,6 @@
# Template file for 'libX11-1.1.5'
pkgname=libX11-1.1.5
# Template file for 'libX11'
pkgname=libX11
version=1.1.5
extract_sufx=".tar.bz2"
url=http://xorg.freedesktop.org/releases/individual/lib
build_style=gnu_configure

Some files were not shown because too many files have changed in this diff Show more