Skip to content

Instantly share code, notes, and snippets.

@mix3
Forked from nojimage/fixes-5.3.sh
Last active December 25, 2015 02:48
Show Gist options
  • Save mix3/6904829 to your computer and use it in GitHub Desktop.
Save mix3/6904829 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Fix the 64bit c++ patch for PHP5.3
# https://bugs.php.net/bug.php?id=48795
#
# install to {path_to_php-build}/share/php-build/before-install.d/
function version { echo "$@" | awk -F. '{ printf("%d.%d.%d\n", $1,$2,$3); }'; }
phpver=$(basename "`pwd`")
phpver=$(version $phpver)
if [[ $phpver > 5.3 && $phpver < 5.4 ]]; then
sed -ie '/EXTRA_LIBS = /s|$| -lstdc++|' Makefile
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment