Opened 4 years ago
Last modified 4 years ago
#61155 assigned enhancement
php: cleanup the portfile, and variants
Reported by: | iefdev (Eric F) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.3 |
Keywords: | Cc: | ||
Port: | php |
Description
Ryan,
I think you commented a while ago (mailing list?) that the php
Portfile is quite a mess. And after doing the update yesterday, I see your point. :–) There are a few things that can be done there to make it better. So, I spent a few xtra hours last night looking at it, and to see what it would take. It wasn't that difficult - most are cleanups, and mainly just time consuming.
So, if you don't mind, I'd like to do a PR for that. It's quite big, but it's hard to avoid that when the file itself is that big.
And also, I've made this ticket for the PR, in case it's a better place to discuss some of the changes (I don't expect the size of changes will go without some additional adjustments/tuning), and things that later on could be improved. To not mess up the PR comments.
This might be a little redundant to the info in the PR…
I started last night cleaning up some:
- Misc cleaning and whitespace. There's a lot of whitespace on empty lines.
- Make sure the intendation is correct. I can see why some of it (the intendation) has been done in the way it is, but it's really not helping in a 2000+ line file. Only makes it hard to read, and you really don't know where you're at when you can't keep track of the intendation.
- Fixed a few long(er) lines.
- Reformat some of the variants to increase the readability.
- And I made 1 small change to the apache2handler so you can run different mpms &/or php versions on the same server. Which is kindof essential when coding locally.
Hope it was to the better. 🤞
For additional/future changes (not in PR)… Regarding all variants in some of the subports:
- All the
mysql
variants… I guess mysqld is an option, but for the variants, maybe it cuould be cleaned up a bit. See: #43431. Inp5-dbd-mysql
we keptmysql56
and addedmysql8
. And then mariadb… That's the MariaDB 5 series. Maybe add the current variants formariadb10_{1..5}
instead?
- The
postgresql
variants… They start at 8.4 now, and go up to 12. In the table of PostgreSQL “Releases” - 9.5 and up is currently supported. Perhaps we could go with 9.0 or 9.2 or something for some compat? …and skip the really old ones?
It's kind of hard to balance out what to use when the port itself is supporting down to php52
.
Those were my initial thoughts, after the cleanup was done.
—
My personal interest in this, is to replace my custom server install (ap24 + 3xPHP) with MacPorts. But, I want things to be in order first before I do that. And when done, I can prob get rid of my /usr/local
. :–)
Sorry, if it got a bit lenghty.
PR is here: https://github.com/macports/macports-ports/pull/8374