{"action":"created","issue":{"url":"https://api.github.com/repos/php-build/php-build/issues/333","labels_url":"https://api.github.com/repos/php-build/php-build/issues/333/labels{/name}","comments_url":"https://api.github.com/repos/php-build/php-build/issues/333/comments","events_url":"https://api.github.com/repos/php-build/php-build/issues/333/events","html_url":"https://github.com/php-build/php-build/pull/333","id":117491536,"number":333,"title":"Backport fix for new libxml","user":{"login":"hnw","id":27699,"avatar_url":"https://avatars.githubusercontent.com/u/27699?v=3","gravatar_id":"","url":"https://api.github.com/users/hnw","html_url":"https://github.com/hnw","followers_url":"https://api.github.com/users/hnw/followers","following_url":"https://api.github.com/users/hnw/following{/other_user}","gists_url":"https://api.github.com/users/hnw/gists{/gist_id}","starred_url":"https://api.github.com/users/hnw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hnw/subscriptions","organizations_url":"https://api.github.com/users/hnw/orgs","repos_url":"https://api.github.com/users/hnw/repos","events_url":"https://api.github.com/users/hnw/events{/privacy}","received_events_url":"https://api.github.com/users/hnw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-18T01:35:49Z","updated_at":"2015-11-20T02:48:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/php-build/php-build/pulls/333","html_url":"https://github.com/php-build/php-build/pull/333","diff_url":"https://github.com/php-build/php-build/pull/333.diff","patch_url":"https://github.com/php-build/php-build/pull/333.patch"},"body":"In libxml2 2.9.0, a new API was introduced. However, it's not compatible with the previous one. In this effect, the old PHPs can't be compiled with libxml2 2.9.0+.\r\n\r\nIn PHP 5.3.17/5.4.7, this problem was fixed. This pull request backports the fix to the old PHPs.\r\n\r\nThis pull request is related to #320, because the stock libxml2 in MacOSX CI environment is 2.9.0.\r\n\r\nSee also:\r\n- https://mail.gnome.org/archives/xml/2012-August/msg00028.html\r\n- https://github.com/php/php-src/commit/c4b26cc1b0b0521c75e653fffec2a9e3b4bf8cbb\r\n"},"comment":{"url":"https://api.github.com/repos/php-build/php-build/issues/comments/158263515","html_url":"https://github.com/php-build/php-build/pull/333#issuecomment-158263515","issue_url":"https://api.github.com/repos/php-build/php-build/issues/333","id":158263515,"user":{"login":"hnw","id":27699,"avatar_url":"https://avatars.githubusercontent.com/u/27699?v=3","gravatar_id":"","url":"https://api.github.com/users/hnw","html_url":"https://github.com/hnw","followers_url":"https://api.github.com/users/hnw/followers","following_url":"https://api.github.com/users/hnw/following{/other_user}","gists_url":"https://api.github.com/users/hnw/gists{/gist_id}","starred_url":"https://api.github.com/users/hnw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hnw/subscriptions","organizations_url":"https://api.github.com/users/hnw/orgs","repos_url":"https://api.github.com/users/hnw/repos","events_url":"https://api.github.com/users/hnw/events{/privacy}","received_events_url":"https://api.github.com/users/hnw/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T02:48:08Z","updated_at":"2015-11-20T02:48:08Z","body":"Hmm... What do you mean? \r\n\r\nYou suggested we should write to the definition file like this, didn't you?\r\n\r\n```\r\napply_patch_if_installed_xml290 \"php-5.4.6-libxml2-2.9.patch\"\r\ninstall_package \"php-5.4.6.tar.bz2\"\r\n```\r\n\r\nHowever,  I think there is no great difference from my patch.\r\n\r\n```\r\npatch_file \"php-5.4.6-libxml2-2.9.patch\" # delete this if you don't like\r\ninstall_package \"php-5.4.6.tar.bz2\"\r\n```\r\n\r\nIn addition, applying `php-5.4.6-libxml2-2.9.patch` never affect the compiled executable with `libxml2 < 2.9.0`, because each hunks of the patch are like that:\r\n\r\n```\r\n+ #ifdef LIBXML2_NEW_BUFFER\r\n+ \t\t\t/* code for libxml2 2.9.0+ */\r\n+ #else\r\n  \t\t\t/* original code */\r\n+ #endif\r\n```\r\n\r\nThe macro constant `LIBXML2_NEW_BUFFER` is defined from libxml2 2.9.0."}}