When I install the postgis24 package, it removes the postgresql10 pkg, and installs postgresql95.
Is there a way to run postgis24 with postgresql10?
Would building the port on a machine with pg10 work?
Or does changing the postgis pkg/port require a non-trivial effort to change the postgis source/build-system?
Thanks in advance for any tips/pointers/advice.
Yes, normally, it will be possible with this USE
postgis is setup with USES=pgsql - this means is uses whatever postgresql version is set as default.
If you are installing the postgis pkg from the public pkg repo, then it will have been built to use postgresql 9.5 which is the system default version, leading to it wanting to replace your existing PG10 install. To use postgis with another version you will need to compile it yourself, building the port should prefer an installed version over the default settings.
If you were setting up your own pkg repo you would need to adjust your default version by adding DEFAULT_VERSIONS= pgsql=10 to the make.conf. You can also do that if you build all your own ports.
You will get the same issue with other ports that depend on the postgresql client libraries.
I am having a similar problem. I am building using synth, on FreeBSD 11.1.
My /etc/make.conf contains a line to add DEFAULT_VERSIONS+=pgsql=10
I have cleared down the whole environment, so that I am building everything from scratch. First I build postgresql10-server, -client, -contrib, to make sure that they are all there. If I then try to build postgis24, something in the dependency tree causes postgresql95-server to be pulled in.
I stripped it right back and found that graphics/gdal pulls in 17 dependencies, and this results in postgresql95-server being built again. I edited the Makefile for graphics/gdal to include 'pgsql' in the USES directive, but this didn't solve the problem. Looking at the dependencies, it wasn't clear to me what was causing this - I thought that it might be something to do with graphics/libgeotiff, but I couldn't find anything definitive (and, to be honest, I don't really know what I am looking for).
I edited /usr/ports/Mk/bsd.default-versions.mk and set PGSQL_DEFAULT?= 10 - this allowed graphics/gdal to build, and so then I tried databases/postgis24 which pulled in a further 168 dependencies, and everything built cleanly (hurrah! finally some progress after two days). The remaining 728 packages are building now, so I am hopeful that they will complete without postgresql95 being pulled in again.
Clearly what I have done is a bit of a hack, and I risk the bsd.default-versions.mk file being overwritten at some point when I refresh the ports, but hopefully it will help to narrow down the source of the problem.
With https://reviews.freebsd.org/D17320 only the latest stable postgis version will be available.
I updated postgis. To install postgis24 you must do it manually since the pkg is still available with the default version of postgresql version 9.5 to date
you can first install postgresql10 and then compile the postgis24 port by doing
make -C /usr/ports/databases/postgis24
For information postgis25 is available in ports.
could it be closed?
More than a year no answer from reporter, I close with feedback timeout!