mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
Merge pull request #40137 from Mic92/mbedtls
mbedtls: remove darwin patch
This commit is contained in:
commit
08db5514e3
@ -1,28 +0,0 @@
|
||||
diff --git a/library/Makefile b/library/Makefile
|
||||
index 28f9231..ad9cc32 100644
|
||||
--- a/library/Makefile
|
||||
+++ b/library/Makefile
|
||||
@@ -103,9 +103,9 @@ libmbedtls.so: libmbedtls.$(SOEXT_TLS)
|
||||
echo " LN $@ -> $<"
|
||||
ln -sf $< $@
|
||||
|
||||
-libmbedtls.dylib: $(OBJS_TLS)
|
||||
+libmbedtls.dylib: $(OBJS_TLS) libmbedx509.dylib
|
||||
echo " LD $@"
|
||||
- $(CC) -dynamiclib $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_TLS)
|
||||
+ $(CC) -dynamiclib -L. -lmbedcrypto -lmbedx509 $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_TLS)
|
||||
|
||||
libmbedtls.dll: $(OBJS_TLS) libmbedx509.dll
|
||||
echo " LD $@"
|
||||
@@ -126,9 +126,9 @@ libmbedx509.so: libmbedx509.$(SOEXT_X509)
|
||||
echo " LN $@ -> $<"
|
||||
ln -sf $< $@
|
||||
|
||||
-libmbedx509.dylib: $(OBJS_X509)
|
||||
+libmbedx509.dylib: $(OBJS_X509) libmbedcrypto.dylib
|
||||
echo " LD $@"
|
||||
- $(CC) -dynamiclib $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_X509)
|
||||
+ $(CC) -dynamiclib -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_X509)
|
||||
|
||||
libmbedx509.dll: $(OBJS_X509) libmbedcrypto.dll
|
||||
echo " LD $@"
|
@ -12,8 +12,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin_dylib.patch ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
@ -34,15 +32,17 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
install_name_tool -change libmbedcrypto.dylib $out/lib/libmbedcrypto.dylib $out/lib/libmbedtls.dylib
|
||||
install_name_tool -change libmbedcrypto.dylib $out/lib/libmbedcrypto.dylib $out/lib/libmbedx509.dylib
|
||||
install_name_tool -change libmbedx509.dylib $out/lib/libmbedx509.dylib $out/lib/libmbedtls.dylib
|
||||
install_name_tool -change libmbedcrypto.dylib $out/lib/libmbedcrypto.dylib $out/lib/libmbedtls.dylib
|
||||
install_name_tool -change libmbedcrypto.dylib $out/lib/libmbedcrypto.dylib $out/lib/libmbedx509.dylib
|
||||
install_name_tool -change libmbedx509.dylib $out/lib/libmbedx509.dylib $out/lib/libmbedtls.dylib
|
||||
|
||||
for exe in $out/bin/*; do
|
||||
install_name_tool -change libmbedtls.dylib $out/lib/libmbedtls.dylib $exe
|
||||
install_name_tool -change libmbedx509.dylib $out/lib/libmbedx509.dylib $exe
|
||||
install_name_tool -change libmbedcrypto.dylib $out/lib/libmbedcrypto.dylib $exe
|
||||
done
|
||||
for exe in $out/bin/*; do
|
||||
if [[ $exe != *.sh ]]; then
|
||||
install_name_tool -change libmbedtls.dylib $out/lib/libmbedtls.dylib $exe
|
||||
install_name_tool -change libmbedx509.dylib $out/lib/libmbedx509.dylib $exe
|
||||
install_name_tool -change libmbedcrypto.dylib $out/lib/libmbedcrypto.dylib $exe
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
Loading…
Reference in New Issue
Block a user