mbedtls: move source modification to patch
authorDavid Bauer <mail@david-bauer.net>
Wed, 18 Jan 2023 21:06:36 +0000 (22:06 +0100)
committerDavid Bauer <mail@david-bauer.net>
Wed, 18 Jan 2023 22:36:22 +0000 (23:36 +0100)
Patch the mbedtls source instead of modifying the compile-targets
in the prepare buildstep within OpenWrt.

Signed-off-by: David Bauer <mail@david-bauer.net>
package/libs/mbedtls/Makefile
package/libs/mbedtls/patches/101-remove-test.patch [new file with mode: 0644]

index b07f0477e45cf021a5f55d99d10ce215e871af31..2ae3fdbe2aef6ccef9f93f688ddf020872fc2c89 100644 (file)
@@ -130,13 +130,6 @@ CMAKE_OPTIONS += \
        -DENABLE_TESTING:Bool=OFF \
        -DENABLE_PROGRAMS:Bool=ON
 
-define Build/Configure
-       $(call Build/Configure/Default)
-
-       sed -i '/fuzz/d' $(PKG_BUILD_DIR)/programs/CMakeLists.txt
-       sed -i '/test/d' $(PKG_BUILD_DIR)/programs/CMakeLists.txt
-endef
-
 define Build/Prepare
        $(call Build/Prepare/Default)
 
diff --git a/package/libs/mbedtls/patches/101-remove-test.patch b/package/libs/mbedtls/patches/101-remove-test.patch
new file mode 100644 (file)
index 0000000..e43f875
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/programs/CMakeLists.txt
++++ b/programs/CMakeLists.txt
+@@ -1,12 +1,8 @@
+ add_subdirectory(aes)
+-if (NOT WIN32)
+-    add_subdirectory(fuzz)
+-endif()
+ add_subdirectory(hash)
+ add_subdirectory(pkey)
+ add_subdirectory(psa)
+ add_subdirectory(random)
+ add_subdirectory(ssl)
+-add_subdirectory(test)
+ add_subdirectory(util)
+ add_subdirectory(x509)