gnu: mysql: Fix build.

MySQL demands boost@1.59.0, and lying about it no longer works:

sql/item_geofunc_internal.cc: In function ‘void handle_gis_exception(const char*)’:
sql/item_geofunc_internal.cc:37:81: error: expected unqualified-id before ‘&’ token
   catch (const boost::geometry::detail::self_get_turn_points::self_ip_exception &)
                                                                                 ^
[...]

* gnu/packages/databases.scm (boost-for-mysql): New variable.
(mysql)[inputs]: Use that instead of the regular boost.
[arguments]: Remove now-unnecessary ‘patch-boost-version’ phase.
This commit is contained in:
Tobias Geerinckx-Rice 2018-08-15 23:26:39 +02:00
parent 725449bd7a
commit 7cbf06d8c2
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -548,6 +548,22 @@ (define-public mongodb
;; Some parts are licensed under the Apache License ;; Some parts are licensed under the Apache License
license:asl2.0)))) license:asl2.0))))
(define boost-for-mysql
(package
(inherit boost)
(version "1.59.0")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://sourceforge/boost/boost/" version "/boost_"
(string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
".tar.bz2"))
(sha256
(base32
"1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj"))))))
;; XXX When updating, check whether boost-for-mysql is still needed.
;; It might suffice to patch cmake/boost.cmake as done in the past.
(define-public mysql (define-public mysql
(package (package
(name "mysql") (name "mysql")
@ -588,15 +604,6 @@ (define-public mysql
"-DINSTALL_MYSQLTESTDIR=" "-DINSTALL_MYSQLTESTDIR="
"-DINSTALL_SQLBENCHDIR=") "-DINSTALL_SQLBENCHDIR=")
#:phases (modify-phases %standard-phases #:phases (modify-phases %standard-phases
(add-after
'unpack 'patch-boost-version
(lambda _
;; Mysql wants boost-1.59.0 specifically
(substitute* "cmake/boost.cmake"
(("59")
,(match (string-split (package-version boost) #\.)
((_ minor . _) minor))))
#t))
(add-after (add-after
'install 'remove-extra-binaries 'install 'remove-extra-binaries
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
@ -611,7 +618,7 @@ (define-public mysql
`(("bison" ,bison) `(("bison" ,bison)
("perl" ,perl))) ("perl" ,perl)))
(inputs (inputs
`(("boost" ,boost) `(("boost" ,boost-for-mysql)
("libaio" ,libaio) ("libaio" ,libaio)
("ncurses" ,ncurses) ("ncurses" ,ncurses)
("openssl" ,openssl) ("openssl" ,openssl)