Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Last active November 21, 2015 00:36
Show Gist options
  • Save tkuchiki/884b2a426c6c13253e56 to your computer and use it in GitHub Desktop.
Save tkuchiki/884b2a426c6c13253e56 to your computer and use it in GitHub Desktop.
php-build の libphp5.so を上書きしないようにする
#!/bin/bash
PHP_BUILD="${1}"
sed -i"" -e "$(grep -n 'configure_option "--with-apxs2"' $PHP_BUILD | cut -d ':' -f 1)a APXS_PATH=\"\$apxs\"" $PHP_BUILD
LINES=$(grep -n 'log "Compiling" "$source_path"' $PHP_BUILD | cut -d ':' -f 1)
sed -i"" -e "${LINES}a if [ -n \"\$APXS_PATH\" ]; then\n_LIBEXECDIR=\`\$APXS_PATH -q LIBEXECDIR\`\\nsed -i\"\" -e \"s|LIBEXECDIR='\\\\\$(INSTALL_ROOT)\$_LIBEXECDIR'|LIBEXECDIR=\$PREFIX/libexec|\" \"\$source_path/Makefile\"\nfi" $PHP_BUILD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment