Use a minimal PATH when building packages, and restore it afterwards.

Add a pkg-config-0.23 template.

--HG--
extra : convert_revision : c2788d660db625a50bb0b177633600aa4d076dda
This commit is contained in:
Juan RP 2008-09-27 00:19:02 +02:00
parent 5b2e16e859
commit e8944276b1
2 changed files with 65 additions and 1 deletions

View File

@ -1,5 +1,10 @@
#!/bin/sh
#
# pkgfs - Packages from source distribution files.
#
# A GNU's Stow alike approach, with some ideas from Gobolinux'
# Compile and maybe others.
#
#-
# Copyright (c) 2008 Juan Romero Pardines.
# All rights reserved.
@ -27,8 +32,10 @@
#
# TODO
# Multiple distfiles in a package.
# Multiple URLs to download source distribution files.
# Support GNU/BSD-makefile style source distribution files.
# Actually do the symlink dance (stow/unstow).
# Fix PKGFS_{C,CXX}FLAGS, aren't passed to the make environment.
#
#
# Default path to configuration file, can be overriden
@ -306,7 +313,7 @@ build_pkg()
fi
/usr/bin/env CFLAGS="$PKGFS_CFLAGS" CXXFLAGS="$PKGFS_CXXFLAGS" \
$MAKE_CMD ${make_build_args}
${MAKE_CMD} ${make_build_args}
if [ "$?" -ne 0 ]; then
echo "*** ERROR building (make stage) $pkgname ***"
exit 1
@ -325,10 +332,16 @@ build_pkg()
build_pkg_from_source()
{
save_path="$PATH"
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
check_build_dirs
check_build_vars
fetch_source_distfiles
build_pkg
export PATH="${_save_path}"
}
#

51
templates/pkg-config-0.23.tmpl Executable file
View File

@ -0,0 +1,51 @@
# ----*---- ----*-----
# Template build file for 'pkg-config-0.23'
# ----*---- ----*-----
#
# Name of the package, sometimes you need a different name than
# the one used in the source distribution file.
pkgname=pkg-config-0.23
# Suffix extraction, only supported: zip and tar/tar+(gz|bzip2).
extract_sufx=".tar.gz"
# Use this if pkgname doesn't match or if there are multiple
# source distribution files.
#distfiles=""
# URL to fetch
url=http://pkgconfig.freedesktop.org/releases/
# Arguments passed to configure if $build_style = {,gnu_}configure.
#configure_args=""
# Arguments passed to configure through the environment
#configure_env=""
# Build style: gnu_configure, bsd-makefile, gnu-makefile, configure.
build_style=gnu_configure
# Passed flags to the 'make' command before building the package.
#make_build_args=""
# Passed flags to the 'make' command before installing the package.
#make_install_args=""
# Short description, max 1 line of 72 chars.
short_desc="System for managing library compile/link flags"
# Maintainer of this pkg: name <email>.
maintainer="Juan RP <xtraeme@gmail.com>"
# Checksum of file with rmd160.
checksum=0aa5565430d609319917ac2c8ffeaa5e4a509489
# Long description. Preferibly first line should be left blank
# and use a whitespace while starting lines.
#
# Please also respect 72 chars per line if possible (max 80).
#
long_desc="
pkg-config is a system for managing library compile/link flags that
works with automake and autoconf. It replaces the ubiquitous
*-config scripts you may have seen with a single tool."