Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Didn't work out of the box on my system: header fields should be case-insensitive. #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you want usage detail, type `--help`.
```

When standalone, build php version is system default.
If you want use other php version, you can change `phpize` and `php-config` command by parameter.
If you want to use another php version, you can change `phpize` and `php-config` command by parameter.

```
$ bin/pecl-build <package_naem> -p /path/to/phpize -i /path/to/php-config
Expand All @@ -22,12 +22,12 @@ $ bin/pecl-build <package_naem> -p /path/to/phpize -i /path/to/php-config
### Use phpenv plugins

```
% git clone https://github.com/crocos/pecl-build.git $PHPENV_ROOT/plugins/pecl-build
% git clone https://github.com/berenddeboer/pecl-build.git $PHPENV_ROOT/plugins/pecl-build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please point origin repository here 😃

% phpenv pecl <package_name>
```

phpenv plugin follow php version for phpenv specified.
If you want specify build php version, you can set parameter.
phpenv plugin follows the php version installed by phpenv.
If you want to build for a specific php version, you can specify a parameter.

```
% phpenv pecl <package_name> -j <php version>
Expand All @@ -53,4 +53,3 @@ so created `.ini` config set `zend_extension`
* Initial Version

AUTHOR:: Daichi Kamemoto <[email protected]>

19 changes: 9 additions & 10 deletions bin/pecl-build
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ usage() {
echo " --dry dry run mode."
echo " -d, --base-dir specified build directory. (default: /tmp/pecl-build)"
echo " -p, --phpize absolute path for phpize. (default: environment dependent)"
echo " -i, --php-config aboslute path for php-config. (default: environment dependent)"
echo " -i, --php-config absolute path for php-config. (default: environment dependent)"
echo " -c, --configure-options additional configure options. (default: nothing)"
echo " -z, --zend-extension registerd zend_extensin at ini file generated."
echo " --skip-test skip make test."
Expand Down Expand Up @@ -57,13 +57,13 @@ main() {
debug "install package: $(green $package)"

# extension build base dir
if [ "x$base_dir" = "x" ];then
if [ -z $base_dir ];then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did you change to solve?

base_dir=/tmp/pecl-build
fi
debug "base_dir: $(green $base_dir)"

# phpize command path
if [ "x$phpize" = "x" ];then
if [ -z $phpize ];then
phpize=phpize
else
phpize=$(echo $phpize) # path expantion
Expand All @@ -75,12 +75,12 @@ main() {
debug "phpize command: $(green $phpize)"

# additional configure options
if [ "x$configure_options" = "x" ];then
if [ -z $configure_options ];then
configure_options=
fi

# php-config command path
if [ "x$phpconfig" = "x" ];then
if [ -z $phpconfig ];then
phpconfig=php-config
else
phpconfig=$(echo $phpconfig) #path expantion
Expand All @@ -96,11 +96,11 @@ main() {

### main ###

# crete build base
# create build base
pecl_url=http://pecl.php.net/get
url=$pecl_url/$package

tarball=$(curl -I $url 2>/dev/null |grep Content-disposition |cut -d'=' -f2 |tr -d \")
tarball=$(curl -I $url 2>/dev/null |grep -i Content-disposition |cut -d'=' -f2 |tr -d \")
package_name=${tarball%.*}
extension=${package_name%-*}
version=${package_name##*-}
Expand All @@ -113,10 +113,10 @@ main() {
debug "version: $(green $version)"
debug "build_dir: $(green $build_dir)"

info "create build directory: $(green $build_dir)"
info "creating build directory: $(green $build_dir)"
run mkdir -p $build_dir
if [ -e "$build_dir/$package_name" ];then
warn "already exist old dir. remove it."
warn "removing exist old dir $build_dir/$package_name."
run rm -rf $build_dir/$package_name
fi

Expand Down Expand Up @@ -208,4 +208,3 @@ debug() {

# call main.
main "$@"

3 changes: 1 addition & 2 deletions bin/phpenv-pecl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ _build_extension() {
fi

info "build $(green $package) on php-$(green $version)"
run pecl-build $package -p $php_dir/bin/phpize -i $php_dir/bin/php-config $options
run pecl-build $package -p $php_dir/bin/phpize -i $php_dir/bin/php-config --skip-test $options
fi
}

Expand Down Expand Up @@ -145,4 +145,3 @@ debug() {

# call main.
main "$@"