Last active
June 3, 2020 06:48
-
-
Save sogaiu/04ff0e1ff86ac1a4ba6d3c307ea6052b to your computer and use it in GitHub Desktop.
draft expat for hermes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use ../prelude) | |
(import ../core) | |
(use ./cmake) | |
(use ./patchelf) | |
(defsrc expat-src | |
:url | |
"https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.lz" | |
:hash | |
"sha256:a1e85abcd97c2aa71005190d24a7c46dcf7bd29c097c31e917cda1b400c38a49") | |
(defpkg expat | |
:builder | |
(fn [] | |
(os/setenv "PATH" | |
(string "/bin:" | |
(join-pkg-paths ":" "/bin" | |
[cmake | |
core/gcc | |
core/make | |
patchelf]))) | |
(os/setenv "CFLAGS" *default-cflags*) | |
(os/setenv "LDFLAGS" | |
(string *default-ldflags* | |
" " | |
# XXX: does cmake strip RUNPATH? | |
"-Wl,--enable-new-dtags")) | |
(unpack-src expat-src) | |
(core/link-/bin/sh) | |
(sh/$ cmake | |
-B build-cmake | |
-S . | |
-DCMAKE_BUILD_TYPE=Release | |
-DCMAKE_INSTALL_PREFIX= ^ (dyn :pkg-out)) | |
(sh/$ cmake | |
--build build-cmake | |
-j (dyn :parallelism)) | |
(sh/$ cmake | |
--build build-cmake | |
--target install) | |
# XXX: does cmake strip rpath info? | |
(sh/$ patchelf --set-rpath | |
# XXX: note this is lib64 | |
(string (dyn :pkg-out) "/lib64") | |
(string (dyn :pkg-out) "/bin/xmlwf")) | |
#(sh/$ patchelf --set-rpath | |
# # XXX: note this is lib64 | |
# (string (dyn :pkg-out) "/lib64") | |
# (string (dyn :pkg-out) "/lib64/libexpat.so")) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment