mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
cephes: update override to build with new version from quicklisp
embedded binaries are now removed from the source tree before build
This commit is contained in:
parent
fd3e88ed7f
commit
f6b9e011c5
@ -177,15 +177,23 @@ let
|
|||||||
asdf = "${asdfFasl}/asdf.${faslExt}";
|
asdf = "${asdfFasl}/asdf.${faslExt}";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
configurePhase = ''
|
||||||
|
runHook preConfigure
|
||||||
|
|
||||||
source ${./setup-hook.sh}
|
source ${./setup-hook.sh}
|
||||||
buildAsdfPath
|
buildAsdfPath
|
||||||
|
|
||||||
|
runHook postConfigure
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = optionalString (src != null) ''
|
buildPhase = optionalString (src != null) ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$src//
|
export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$src//
|
||||||
export ASDF_OUTPUT_TRANSLATIONS="$src:$(pwd):${storeDir}:${storeDir}"
|
export ASDF_OUTPUT_TRANSLATIONS="$src:$(pwd):${storeDir}:${storeDir}"
|
||||||
${pkg}/bin/${program} ${toString flags} < $buildScript
|
${pkg}/bin/${program} ${toString flags} < $buildScript
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Copy compiled files to store
|
# Copy compiled files to store
|
||||||
@ -200,6 +208,8 @@ let
|
|||||||
concatMapStringsSep "\\|" (replaceStrings ["." "+"] ["[.]" "[+]"]) systems;
|
concatMapStringsSep "\\|" (replaceStrings ["." "+"] ["[.]" "[+]"]) systems;
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -pv $out
|
mkdir -pv $out
|
||||||
cp -r * $out
|
cp -r * $out
|
||||||
|
|
||||||
@ -207,6 +217,8 @@ let
|
|||||||
find $out -name "*.asd" \
|
find $out -name "*.asd" \
|
||||||
| grep -v "/\(${mkSystemsRegex systems}\)\.asd$" \
|
| grep -v "/\(${mkSystemsRegex systems}\)\.asd$" \
|
||||||
| xargs rm -fv || true
|
| xargs rm -fv || true
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dontPatchShebangs = true;
|
dontPatchShebangs = true;
|
||||||
|
@ -28,20 +28,29 @@ let
|
|||||||
build = (build-asdf-system (args' // { version = args'.version + "-build"; }))
|
build = (build-asdf-system (args' // { version = args'.version + "-build"; }))
|
||||||
.overrideAttrs(o: {
|
.overrideAttrs(o: {
|
||||||
buildPhase = with builtins; ''
|
buildPhase = with builtins; ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
mkdir __fasls
|
mkdir __fasls
|
||||||
export ASDF_OUTPUT_TRANSLATIONS="$(pwd):$(pwd)/__fasls:${storeDir}:${storeDir}"
|
export ASDF_OUTPUT_TRANSLATIONS="$(pwd):$(pwd)/__fasls:${storeDir}:${storeDir}"
|
||||||
export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$(pwd)//
|
export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$(pwd)//
|
||||||
${o.pkg}/bin/${o.program} ${toString (o.flags or [])} < ${o.buildScript}
|
${o.pkg}/bin/${o.program} ${toString (o.flags or [])} < ${o.buildScript}
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -pv $out
|
mkdir -pv $out
|
||||||
rm -rf __fasls
|
rm -rf __fasls
|
||||||
cp -r * $out
|
cp -r * $out
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
in build-asdf-system (args' // {
|
in build-asdf-system (args' // {
|
||||||
# Patches are already applied in `build`
|
# Patches are already applied in `build`
|
||||||
patches = [];
|
patches = [];
|
||||||
|
postPatch = "";
|
||||||
src = build;
|
src = build;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -151,9 +160,15 @@ let
|
|||||||
cephes = build-with-compile-into-pwd {
|
cephes = build-with-compile-into-pwd {
|
||||||
inherit (super.cephes) pname version src lispLibs;
|
inherit (super.cephes) pname version src lispLibs;
|
||||||
patches = [ ./patches/cephes-make.patch ];
|
patches = [ ./patches/cephes-make.patch ];
|
||||||
|
postPatch = ''
|
||||||
|
find \( -name '*.dll' -o -name '*.dylib' -o -name '*.so' \) -delete
|
||||||
|
'';
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
substituteAllInPlace cephes.asd
|
substituteAllInPlace cephes.asd
|
||||||
'';
|
'';
|
||||||
|
postInstall = ''
|
||||||
|
find $out -name '*.o' -delete
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
clx-truetype = build-asdf-system {
|
clx-truetype = build-asdf-system {
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
--- a/cephes.asd
|
--- a/cephes.asd
|
||||||
+++ b/cephes.asd
|
+++ b/cephes.asd
|
||||||
@@ -5,7 +5,7 @@
|
@@ -16,7 +16,7 @@
|
||||||
(defclass makefile (source-file) ((type :initform "m")))
|
(defclass makefile (source-file) ((type :initform "m")))
|
||||||
(defmethod perform ((o load-op) (c makefile)) t)
|
(defmethod perform ((o load-op) (c makefile)) t)
|
||||||
(defmethod perform ((o compile-op) (c makefile))
|
(defmethod perform ((o compile-op) (c makefile))
|
||||||
- (let* ((lib-dir (system-relative-pathname "cephes" "scipy-cephes"))
|
- (let* ((lib-dir (system-relative-pathname "cephes" "scipy-cephes/"))
|
||||||
+ (let* ((lib-dir #P"@out@/scipy-cephes")
|
+ (let* ((lib-dir #P"@out@/scipy-cephes/")
|
||||||
(lib (make-pathname :directory `(:relative ,(namestring lib-dir))
|
(lib (make-pathname :directory (pathname-directory lib-dir)
|
||||||
:name "libmd"
|
:name #+(or (and unix (not darwin)) windows win32) "libmd"
|
||||||
:type #+darwin "dylib" #+(and unix (not darwin)) "so" #+(or windows win32) "dll"))
|
#+(and darwin arm64) "libmd-arm64"
|
||||||
@@ -14,7 +14,7 @@
|
@@ -30,7 +30,7 @@
|
||||||
(format *error-output* "Library ~S exists, skipping build" lib)
|
(format *error-output* "Library ~S exists, skipping build" lib)
|
||||||
(format *error-output* "Building ~S~%" lib))
|
(format *error-output* "Building ~S~%" lib))
|
||||||
(unless built
|
(unless built
|
||||||
- (chdir (native-namestring lib-dir))
|
- (chdir (native-namestring lib-dir))
|
||||||
+ (chdir "scipy-cephes")
|
+ (chdir "scipy-cephes")
|
||||||
(run-program "make" :output t))))
|
(run-program "make" :output t)))))
|
||||||
|
|
||||||
(defsystem "cephes"
|
(defsystem "cephes"
|
||||||
|
|
||||||
Diff finished. Thu Mar 28 08:13:30 2024
|
|
||||||
|
Loading…
Reference in New Issue
Block a user