On Wed, Jun 27, 2018 at 09:54:13AM +0100, Stuart Henderson wrote:
> I don't think there's all that much advantage to using BUILD_PACKAGES
> and the PSEUDO_FLAVORS=no_<whatever> mechanism at all for this port.
> If you wanted to build client without server the only extra dep is
> postgresql. If you wanted to build server without client there are a
> few more but they're not too huge to build, and available widely on
> the various arches.
>
> If you did want to do this, you would probably want something like:
>
> CONFIGURE_ENV += CXXFLAGS="-I${X11BASE}/include"
>
> .if ${BUILD_PACKAGES:M-client}
> CONFIGURE_ARGS+= -DBUILD_CLIENT=TRUE
> .else
> CONFIGURE_ARGS+= -DBUILD_CLIENT=FALSE
> .endif
>
> .if ${BUILD_PACKAGES:M-server}
> CONFIGURE_ARGS+= -DBUILD_SERVER=TRUE
> .else
> CONFIGURE_ARGS+= -DBUILD_SERVER=FALSE
> .endif
>
I was afraid of BUILD_PACKAGES matching both -main and -server, but now
as I see: if it matches -main, build only client, if it matches server,
build only server, if it matches both, build both, it will create the
needed packages in any case using PLIST-main and PLIST-server from fake
directory without any problem.
BUILD_SERVER is set to OFF by default and BUILD_CLIENT is set to ON, so
I don't think we need that extra .else part :)
Ok, I am going to testing. About databases in client and server:
ENABLE_LEVELDB - Build with LevelDB; Enables use of LevelDB
map backend
ENABLE_POSTGRESQL - Build with libpq; Enables use of PostgreSQL
map backend (PostgreSQL 9.5 or greater recommended)
ENABLE_REDIS - Build with libhiredis; Enables use of Redis
map backend
I hope it's ok if I send client and server using SQLite 3, LevelDB,
PostgreSQL and Hiredis. If not, I have to disable 3 of them explicitly.