diff options
Diffstat (limited to 'lang/crystal')
-rw-r--r-- | lang/crystal/Makefile | 9 | ||||
-rw-r--r-- | lang/crystal/files/extra-patch-src_openssl_lib__crypto.cr | 46 | ||||
-rw-r--r-- | lang/crystal/files/extra-patch-src_openssl_lib__ssl.cr | 42 |
3 files changed, 0 insertions, 97 deletions
diff --git a/lang/crystal/Makefile b/lang/crystal/Makefile index c30e77f3236f..5c2df7e0ad91 100644 --- a/lang/crystal/Makefile +++ b/lang/crystal/Makefile @@ -69,15 +69,6 @@ STATIC_MAKE_ARGS= static=1 IGNORE= not supported on anything but FreeBSD .endif -# crystal needs pkgconfig to determine SSL variants but these are not -# present in FreeBSD base. We splice in the correct info based on -# FreeBSD version and hope it doesn't change during minor releases. -# See post-patch for the substitutions of these patches. -.if ${SSL_DEFAULT} == "base" && ${OSREL:R} < 13 -EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_openssl_lib__crypto.cr \ - ${PATCHDIR}/extra-patch-src_openssl_lib__ssl.cr -.endif - post-extract: @${RLN} ${WRKDIR}/.build ${WRKSRC} @${RLN} x86_64-freebsd ${WRKSRC}/src/lib_c/aarch64-freebsd diff --git a/lang/crystal/files/extra-patch-src_openssl_lib__crypto.cr b/lang/crystal/files/extra-patch-src_openssl_lib__crypto.cr deleted file mode 100644 index 124851bf55fa..000000000000 --- a/lang/crystal/files/extra-patch-src_openssl_lib__crypto.cr +++ /dev/null @@ -1,46 +0,0 @@ ---- src/openssl/lib_crypto.cr.orig 2022-04-09 14:20:55.000000000 -0700 -+++ src/openssl/lib_crypto.cr 2022-04-09 14:15:51.000000000 -0700 -@@ -1,31 +1,7 @@ - {% begin %} - lib LibCrypto -- {% if flag?(:win32) %} -- {% from_libressl = false %} -- {% ssl_version = nil %} -- {% for dir in Crystal::LIBRARY_PATH.split(';') %} -- {% unless ssl_version %} -- {% config_path = "#{dir.id}\\openssl_VERSION" %} -- {% if config_version = read_file?(config_path) %} -- {% ssl_version = config_version.chomp %} -- {% end %} -- {% end %} -- {% end %} -- {% ssl_version ||= "0.0.0" %} -- {% else %} -- {% from_libressl = (`hash pkg-config 2> /dev/null || printf %s false` != "false") && -- (`test -f $(pkg-config --silence-errors --variable=includedir libcrypto)/openssl/opensslv.h || printf %s false` != "false") && -- (`printf "#include <openssl/opensslv.h>\nLIBRESSL_VERSION_NUMBER" | ${CC:-cc} $(pkg-config --cflags --silence-errors libcrypto || true) -E -`.chomp.split('\n').last != "LIBRESSL_VERSION_NUMBER") %} -- {% ssl_version = `hash pkg-config 2> /dev/null && pkg-config --silence-errors --modversion libcrypto || printf %s 0.0.0`.split.last.gsub(/[^0-9.]/, "") %} -- {% end %} -- -- {% if from_libressl %} -- LIBRESSL_VERSION = {{ ssl_version }} -- OPENSSL_VERSION = "0.0.0" -- {% else %} -- LIBRESSL_VERSION = "0.0.0" -- OPENSSL_VERSION = {{ ssl_version }} -- {% end %} -+ LIBRESSL_VERSION = "0.0.0" -+ OPENSSL_VERSION = "CRYSTAL_SSL_VERSION" - end - {% end %} - -@@ -34,7 +10,7 @@ - @[Link("crypt32")] # CertOpenStore, ... - @[Link("user32")] # GetProcessWindowStation, GetUserObjectInformationW, _MessageBoxW - {% else %} -- @[Link(ldflags: "`command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'`")] -+ @[Link(ldflags: "-LCRYSTAL_SSL_LDFLAGS -lcrypto")] - {% end %} - lib LibCrypto - alias Char = LibC::Char - diff --git a/lang/crystal/files/extra-patch-src_openssl_lib__ssl.cr b/lang/crystal/files/extra-patch-src_openssl_lib__ssl.cr deleted file mode 100644 index 20ec2243b192..000000000000 --- a/lang/crystal/files/extra-patch-src_openssl_lib__ssl.cr +++ /dev/null @@ -1,42 +0,0 @@ ---- src/openssl/lib_ssl.cr.orig 2022-04-09 14:24:40.000000000 -0700 -+++ src/openssl/lib_ssl.cr 2022-04-09 14:24:07.000000000 -0700 -@@ -6,32 +6,8 @@ - - {% begin %} - lib LibSSL -- {% if flag?(:win32) %} -- {% from_libressl = false %} -- {% ssl_version = nil %} -- {% for dir in Crystal::LIBRARY_PATH.split(';') %} -- {% unless ssl_version %} -- {% config_path = "#{dir.id}\\openssl_VERSION" %} -- {% if config_version = read_file?(config_path) %} -- {% ssl_version = config_version.chomp %} -- {% end %} -- {% end %} -- {% end %} -- {% ssl_version ||= "0.0.0" %} -- {% else %} -- {% from_libressl = (`hash pkg-config 2> /dev/null || printf %s false` != "false") && -- (`test -f $(pkg-config --silence-errors --variable=includedir libssl)/openssl/opensslv.h || printf %s false` != "false") && -- (`printf "#include <openssl/opensslv.h>\nLIBRESSL_VERSION_NUMBER" | ${CC:-cc} $(pkg-config --cflags --silence-errors libssl || true) -E -`.chomp.split('\n').last != "LIBRESSL_VERSION_NUMBER") %} -- {% ssl_version = `hash pkg-config 2> /dev/null && pkg-config --silence-errors --modversion libssl || printf %s 0.0.0`.split.last.gsub(/[^0-9.]/, "") %} -- {% end %} -- -- {% if from_libressl %} -- LIBRESSL_VERSION = {{ ssl_version }} -- OPENSSL_VERSION = "0.0.0" -- {% else %} -- LIBRESSL_VERSION = "0.0.0" -- OPENSSL_VERSION = {{ ssl_version }} -- {% end %} -+ LIBRESSL_VERSION = "0.0.0" -+ OPENSSL_VERSION = "CRYSTAL_SSL_VERSION" - end - {% end %} - --@[Link(ldflags: "`command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'`")] -+@[Link(ldflags: "-LCRYSTAL_SSL_LDFLAGS -lssl")] - lib LibSSL - alias Int = LibC::Int - alias Char = LibC::Char |