{"action":"created","issue":{"url":"https://api.github.com/repos/macports/macports-ports/issues/2712","repository_url":"https://api.github.com/repos/macports/macports-ports","labels_url":"https://api.github.com/repos/macports/macports-ports/issues/2712/labels{/name}","comments_url":"https://api.github.com/repos/macports/macports-ports/issues/2712/comments","events_url":"https://api.github.com/repos/macports/macports-ports/issues/2712/events","html_url":"https://github.com/macports/macports-ports/pull/2712","id":366898445,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNDYxNDY2","number":2712,"title":"http-parser: Use the right compiler and archs, add universal, fix Makefile","user":{"login":"ryandesign","id":429209,"node_id":"MDQ6VXNlcjQyOTIwOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/429209?v=4","gravatar_id":"","url":"https://api.github.com/users/ryandesign","html_url":"https://github.com/ryandesign","followers_url":"https://api.github.com/users/ryandesign/followers","following_url":"https://api.github.com/users/ryandesign/following{/other_user}","gists_url":"https://api.github.com/users/ryandesign/gists{/gist_id}","starred_url":"https://api.github.com/users/ryandesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryandesign/subscriptions","organizations_url":"https://api.github.com/users/ryandesign/orgs","repos_url":"https://api.github.com/users/ryandesign/repos","events_url":"https://api.github.com/users/ryandesign/events{/privacy}","received_events_url":"https://api.github.com/users/ryandesign/received_events","type":"User","site_admin":false},"labels":[{"id":656296790,"node_id":"MDU6TGFiZWw2NTYyOTY3OTA=","url":"https://api.github.com/repos/macports/macports-ports/labels/by:%20member","name":"by: member","color":"c5def5","default":false},{"id":615645858,"node_id":"MDU6TGFiZWw2MTU2NDU4NTg=","url":"https://api.github.com/repos/macports/macports-ports/labels/maintainer:%20open","name":"maintainer: open","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-04T17:43:14Z","updated_at":"2018-10-04T18:50:07Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/macports/macports-ports/pulls/2712","html_url":"https://github.com/macports/macports-ports/pull/2712","diff_url":"https://github.com/macports/macports-ports/pull/2712.diff","patch_url":"https://github.com/macports/macports-ports/pull/2712.patch"},"body":"#### Description\r\n\r\nUse the right compiler and `-arch` flags and add a universal variant.\r\n\r\nCloses https://trac.macports.org/ticket/57247\r\n\r\nOnly build the library in the build phase; don't run the tests.\r\n\r\nEnable the test phase so that the tests can be run if desired.\r\n\r\nFix the Makefile:\r\n\r\n* Don't use `-Werror`\r\n* Don't rebuild the library unless that's needed\r\n* Use `-dynamiclib` instead of `-shared` on macOS\r\n\r\n**Note:** The Makefile fixes should probably be reported to the developer.\r\n\r\n###### Type(s)\r\n<!-- update (title contains \": U(u)pdate to\"), submission (new Portfile) and CVE Identifiers are auto-detected, replace [ ] with [x] to select -->\r\n\r\n- [X] bugfix\r\n- [X] enhancement\r\n- [ ] security fix\r\n\r\n###### Tested on\r\nmacOS 10.13.6 17G65\r\nXcode 9.4.1 9F2000 \r\n\r\n###### Verification <!-- (delete not applicable items) -->\r\nHave you\r\n\r\n- [X] followed our [Commit Message Guidelines](https://trac.macports.org/wiki/CommitMessages)?\r\n- [X] squashed and [minimized your commits](https://guide.macports.org/#project.github)?\r\n- [X] checked that there aren't other open [pull requests](https://github.com/macports/macports-ports/pulls) for the same change?\r\n- [X] referenced existing tickets on [Trac](https://trac.macports.org/wiki/Tickets) with full URL?\r\n<!-- Please don't open a new Trac ticket if you are submitting a pull request. -->\r\n- [ ] checked your Portfile with `port lint`?\r\n- [ ] tried existing tests with `sudo port test`?\r\n- [X] tried a full install with `sudo port -vst install`?\r\n- [ ] tested basic functionality of all binary files?\r\n\r\n<!-- Use \"skip notification\" (surrounded with []) to avoid notifying maintainers -->\r\n"},"comment":{"url":"https://api.github.com/repos/macports/macports-ports/issues/comments/427129645","html_url":"https://github.com/macports/macports-ports/pull/2712#issuecomment-427129645","issue_url":"https://api.github.com/repos/macports/macports-ports/issues/2712","id":427129645,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzEyOTY0NQ==","user":{"login":"ryandesign","id":429209,"node_id":"MDQ6VXNlcjQyOTIwOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/429209?v=4","gravatar_id":"","url":"https://api.github.com/users/ryandesign","html_url":"https://github.com/ryandesign","followers_url":"https://api.github.com/users/ryandesign/followers","following_url":"https://api.github.com/users/ryandesign/following{/other_user}","gists_url":"https://api.github.com/users/ryandesign/gists{/gist_id}","starred_url":"https://api.github.com/users/ryandesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryandesign/subscriptions","organizations_url":"https://api.github.com/users/ryandesign/orgs","repos_url":"https://api.github.com/users/ryandesign/repos","events_url":"https://api.github.com/users/ryandesign/events{/privacy}","received_events_url":"https://api.github.com/users/ryandesign/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T18:50:07Z","updated_at":"2018-10-04T18:50:07Z","author_association":"CONTRIBUTOR","body":"Some more explanations:\r\n\r\n> Only build the library in the build phase; don't run the tests.\r\n> \r\n> Enable the test phase so that the tests can be run if desired.\r\n\r\nThe port previously cleared `build.target`, which causes `make` to use the first target in the Makefile, which happened to be the `test` target. Fixed by specifying the library target instead, and enabling the test phase so that a user can run it if desired with `sudo port test`, as with other ports.\r\n\r\n> Fix the Makefile:\r\n> \r\n> * Don't use `-Werror`\r\n\r\nThe port previously overrode the Makefile's `CFLAGS` by specifying them in `build.args.` Fixed by specifying them in `build.env` instead, except that we basically never want to use `-Werror` (and specifically in this case because it warns (thus errors) about `HTTP_PARSER_STRICT` being redefined (why do we need to redefine that?)) so I added the patch to remove that.\r\n\r\n> * Don't rebuild the library unless that's needed\r\n\r\nMost Makefile rules refer to files on disk, but the library target doesn't; in other words, it's phony. Phony targets are run every time they're invoked, which meant that the library was built for the right archs during the build phase, and then in the destroot phase it was being rebuilt for the wrong archs. The fix is to make the phony library target depend on a real target and to make that real target do the building. Real targets only get invoked when the files they refer to need to be rebuilt.\r\n\r\n> * Use `-dynamiclib` instead of `-shared` on macOS\r\n\r\nMost macOS versions we care about accept `-shared` as a synonym for `-dynamiclib`, but `-dynamiclib` is the correct flag to use on macOS."}}
{"actor":{"display_login":"ryandesign"}}