mcrypt/make.scm: Use (runtime crypto)'s mcrypt-link!.
authorMatt Birkholz <matt@birchwood-abbey.net>
Sat, 16 Feb 2019 19:31:20 +0000 (12:31 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Sat, 16 Feb 2019 23:05:56 +0000 (16:05 -0700)
This eliminates a redundant list of symbols and ensures consistency
with (runtime crypto)'s bindings.

Improved both mcrypt's and x11's forward compatibility by making the
backward compatibility links conditional.

src/mcrypt/make.scm
src/x11/make.scm

index c164cb9a97b9f4f1fdd90541b533a6283073ea4c..d7c0250c476be90fc75cea1206fc6858863481bb 100644 (file)
@@ -8,26 +8,5 @@
 
 (add-subsystem-identification! "mcrypt" '(1 0 2))
 
-;; "Export" these to the (runtime crypto) package bindings.
-(let ((crypto (->environment '(runtime crypto)))
-      (mcrypt (->environment '(mcrypt))))
-  (for-each
-    (lambda (name)
-      (environment-assign! crypto name (environment-lookup mcrypt name)))
-    '(mcrypt-algorithm-name
-      mcrypt-algorithm-names
-      mcrypt-block-algorithm-mode?
-      mcrypt-block-algorithm?
-      mcrypt-block-mode?
-      mcrypt-context?
-      mcrypt-encrypt
-      mcrypt-encrypt-port
-      mcrypt-end
-      mcrypt-init
-      mcrypt-init-vector-size
-      mcrypt-key-size
-      mcrypt-mode-name
-      mcrypt-mode-names
-      mcrypt-open-module
-      mcrypt-self-test
-      mcrypt-supported-key-sizes)))
\ No newline at end of file
+(if (name->package '(runtime crypto))
+    ((access mcrypt-link! (->environment '(runtime crypto)))))
\ No newline at end of file
index c8b6ce2788ab4efc5f6a29675f18e31211382ea6..278bd0e9258290bc7156e0e8068ae031b5904648 100644 (file)
@@ -5,6 +5,8 @@ Load the X11 option. |#
 (with-loader-base-uri (system-library-uri "x11/")
   (lambda ()
     (load-package-set "x11")))
+
 (add-subsystem-identification! "X11" '(1 3 1))
 
-((access link! (->environment '(runtime x-graphics))))
\ No newline at end of file
+(if (name->package '(runtime x-graphics))
+    ((access link! (->environment '(runtime x-graphics)))))
\ No newline at end of file