[packages_10.03.2] polarssl: merge r29331, r29336
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 4 Feb 2012 18:44:03 +0000 (18:44 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 4 Feb 2012 18:44:03 +0000 (18:44 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/packages_10.03.2@30059 3c298f89-4303-0410-b956-a3cf2f4a3e73

libs/polarssl/Makefile
libs/polarssl/patches/100-disable-testsuites.patch [new file with mode: 0644]
libs/polarssl/patches/100-shared.patch [deleted file]
libs/polarssl/patches/110-make.patch [deleted file]

index df132e0..80d1f2c 100644 (file)
@@ -1,5 +1,5 @@
-#
-# Copyright (C) 2006-2011 OpenWrt.org
+# 
+# Copyright (C) 2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,14 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=polarssl
-PKG_VERSION:=0.14.3
+PKG_VERSION:=1.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
 PKG_SOURCE_URL:=http://polarssl.org/code/releases
-PKG_MD5SUM:=f1b2fe9087ab64d7ea40a276a3628583
+PKG_MD5SUM:=9e0ef5090070ae95363f201851ca62f2
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/polarssl/Default
   SUBMENU:=SSL
@@ -55,27 +56,25 @@ endef
 
 PKG_INSTALL:=1
 
-define Build/Configure
-endef
-
-TARGET_CFLAGS += $(FPIC)
-MAKE_FLAGS += OFLAGS="$(TARGET_CFLAGS)"
+CMAKE_OPTIONS += \
+       -DCMAKE_BUILD_TYPE:String="Release" \
+       -DUSE_SHARED_POLARSSL_LIBRARY:Bool=ON \
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/include/polarssl $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/polarssl $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libpolarssl.{a,so} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so* $(1)/usr/lib/
 endef
 
 define Package/libpolarssl/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/libpolarssl.so $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so* $(1)/usr/lib/
 endef
 
 define Package/polarssl-progs/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/polarssl_* $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,libpolarssl))
diff --git a/libs/polarssl/patches/100-disable-testsuites.patch b/libs/polarssl/patches/100-disable-testsuites.patch
new file mode 100644 (file)
index 0000000..7754ee6
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -26,25 +26,3 @@ function(add_test_suite suite_name)
+ endfunction(add_test_suite)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -Wno-unused-value")
+-
+-add_test_suite(aes)
+-add_test_suite(arc4)
+-add_test_suite(base64)
+-add_test_suite(camellia)
+-add_test_suite(cipher cipher.aes)
+-add_test_suite(cipher cipher.camellia)
+-add_test_suite(cipher cipher.des)
+-add_test_suite(debug)
+-add_test_suite(des)
+-add_test_suite(dhm)
+-add_test_suite(error)
+-add_test_suite(hmac_shax)
+-add_test_suite(md)
+-add_test_suite(mdx)
+-add_test_suite(mpi)
+-add_test_suite(pkcs1_v21)
+-add_test_suite(shax)
+-add_test_suite(rsa)
+-add_test_suite(version)
+-add_test_suite(xtea)
+-add_test_suite(x509parse)
diff --git a/libs/polarssl/patches/100-shared.patch b/libs/polarssl/patches/100-shared.patch
deleted file mode 100644 (file)
index d74d882..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/library/Makefile
-+++ b/library/Makefile
-@@ -29,7 +29,7 @@ OBJS=        aes.o           arc4.o          base64.o        \
- .SILENT:
--all: static
-+all: static shared
- static: libpolarssl.a
diff --git a/libs/polarssl/patches/110-make.patch b/libs/polarssl/patches/110-make.patch
deleted file mode 100644 (file)
index 2137e0a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -7,7 +7,7 @@ PREFIX=polarssl_
- all:
-       cd library  && $(MAKE) all && cd ..
-       cd programs && $(MAKE) all && cd ..
--      cd tests && $(MAKE) all && cd ..
-+      #cd tests && $(MAKE) all && cd ..
- install:
-       mkdir -p $(DESTDIR)/include/polarssl
-@@ -28,7 +28,7 @@ install:
- clean:
-       cd library  && $(MAKE) clean && cd ..
-       cd programs && $(MAKE) clean && cd ..
--      cd tests && $(MAKE) clean && cd ..
-+      #cd tests && $(MAKE) clean && cd ..
- check:
-       ( cd tests && $(MAKE) check )