Package: jskeus / 1.2.6+dfsg-1

reproducible-build.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Last-Update: 2020-07-24

--- jskeus-1.2.4+dfsg.orig/irteus/Makefile
+++ jskeus-1.2.4+dfsg/irteus/Makefile
@@ -177,10 +177,10 @@ MKDIR:
 
 .PHONY: defun.h
 defun.h:
-	echo '#include "eus.h"\n#undef defun\npointer TEST();\nvoid test(void) {register context *ctx; pointer mod; defun(ctx,"TEST",mod,TEST,NULL);}' > test.c
-	echo "// redefine defun for update defun() API () https://github.com/euslisp/EusLisp/pull/116" > defun.h
-	echo "#undef defun" >> defun.h
-	$(CC) $(CFLAGS) $(WFLAGS) -c test.c $(OBJOPT) test.o || echo "#define defun(a, b, c, d, e) defun(a, b, c, d) // for EusLisp < 9.24" >> defun.h
+	printf '#include "eus.h"\n#undef defun\npointer TEST();\nvoid test(void) {register context *ctx; pointer mod; defun(ctx,"TEST",mod,TEST,NULL);}\n' > test.c
+	printf "// redefine defun for update defun() API () https://github.com/euslisp/EusLisp/pull/116" > defun.h
+	printf "#undef defun" >> defun.h
+	$(CC) $(CFLAGS) $(WFLAGS) -c test.c $(OBJOPT) test.o || printf "#define defun(a, b, c, d, e) defun(a, b, c, d) // for EusLisp < 9.24" >> defun.h
 	cat defun.h
 
 $(LIBIRTEUS): $(IRTEUSOBJS) $(IRTCOBJECTS) $(LIBNR) $(NROBJECTS)
diff --git a/irteus/compile_irt.l b/irteus/compile_irt.l
index 6641426..bcad6cc 100644
--- a/irteus/compile_irt.l
+++ b/irteus/compile_irt.l
@@ -58,11 +58,12 @@
   (if (eq (unix:access (format nil "~A/lib/llib/" *eusdir*) unix::O_RDWR) t)
       (comp:compile-file-if-src-newer (format nil "~A/lib/llib/~A" *eusdir* fname) *objdir*)
     (progn
-      (unix::mkdir (format nil "/tmp/~A" (unix::getpid)))
-      (unix::system (format nil "cp ~A/lib/llib/~A /tmp/~A/~A" *eusdir* fname (unix::getpid) fname))
-      (unix::link (format nil "~A/lib/llib/~A" *eusdir* fname) (format nil "/tmp/~A/pgsql.l" (unix::getpid)))
-      (comp:compile-file-if-src-newer (format nil "/tmp/~A/~A" (unix::getpid) fname) *objdir*)
-      (unix::unlink (format nil "/tmp/~A" (unix::getpid)))
+      (unix::system (format nil "cp ~A/lib/llib/~A /~A/~A" *eusdir* fname *objdir* fname))
+      (unix::link (format nil "~A/lib/llib/~A" *eusdir* fname) (format nil "/~A/pgsql.l" *objdir*))
+      (comp:compile-file-if-src-newer (format nil "/~A/~A" *objdir* fname) *objdir*)
+      (unix::unlink (format nil "/~A/~A" user::*objdir* fname))
+      (unix::unlink (format nil "/~A/~A.c" user::*objdir* (pathname-name fname)))
+      (unix::unlink (format nil "/~A/~A.h" user::*objdir* (pathname-name fname)))
       ))
   )
 (comp::compile-llib-file-if-src-newer "time.l")
diff --git a/irteus/compile_irtimg.l b/irteus/compile_irtimg.l
index 6cda149..e9facd6 100644
--- a/irteus/compile_irtimg.l
+++ b/irteus/compile_irtimg.l
@@ -51,11 +51,12 @@
 (if (eq (unix:access (format nil "~A/lisp/image/jpeg/" *eusdir*) unix::O_RDWR) t)
     (comp:compile-file-if-src-newer (format nil "~A/lisp/image/jpeg/eusjpeg.l" *eusdir*) user::*objdir*)
   (progn
-    (unix::mkdir (format nil "/tmp/~A" (unix::getpid)))
-    (unix::system (format nil "cp ~A/lisp/image/jpeg/eusjpeg.l /tmp/~A/eusjpeg.l" user::*eusdir* (unix::getpid)))
-    (unix::link (format nil "~A/lisp/image/jpeg/eusjpeg.l" *eusdir*) (format nil "/tmp/~A/eusjpeg.l" (unix::getpid)))
-    (comp:compile-file-if-src-newer (format nil "/tmp/~A/eusjpeg.l" (unix::getpid)) user::*objdir*)
-    (unix::unlink (format nil "/tmp/~A" (unix::getpid)))
+    (unix::system (format nil "cp ~A/lisp/image/jpeg/eusjpeg.l /~A/eusjpeg.l" user::*eusdir* user::*objdir*))
+    (unix::link (format nil "~A/lisp/image/jpeg/eusjpeg.l" *eusdir*) (format nil "/~A/eusjpeg.l" user::*objdir*))
+    (comp:compile-file-if-src-newer (format nil "/~A/eusjpeg.l" user::*objdir*) user::*objdir*)
+    (unix::unlink (format nil "/~A/eusjpeg.l" user::*objdir*))
+    (unix::unlink (format nil "/~A/eusjpeg.c" user::*objdir*))
+    (unix::unlink (format nil "/~A/eusjpeg.h" user::*objdir*))
     ))
 (comp:compile-file-if-src-newer (format nil "png.l" *eusdir*) user::*objdir*)
 (comp:compile-file-if-src-newer (format nil "irtimage.l" *eusdir*) user::*objdir*)