2 # Copyright (C) 2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_BUILD_FLAGS
:=no-mips16
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=@GNU
/nettle
17 PKG_HASH
:=ccfeff981b0ca71bbd6fbcb054f407c60ffb644389a5be80d6716d5b550c6ce3
19 PKG_LICENSE
:=GPL-2.0
-or-later
20 PKG_LICENSE_FILES
:=COPYING
21 PKG_CPE_ID
:=cpe
:/a
:nettle_project
:nettle
24 PKG_CONFIG_DEPENDS
:= CONFIG_LIBNETTLE_MINI
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/libnettle
31 TITLE
:=GNU crypto library
32 URL
:=http
://www.lysator.liu.se
/~nisse
/nettle
/
33 DEPENDS
+= +!LIBNETTLE_MINI
:libgmp
37 define Package
/libnettle
/config
38 source
"$(SOURCE)/Config.in"
41 TARGET_CFLAGS
+= $(FPIC
)
47 --disable-documentation \
49 $(if
$(CONFIG_powerpc64
), $(if
$(CONFIG_USE_MUSL
),--disable-assembler
))
51 ifeq ($(CONFIG_LIBNETTLE_MINI
),y
)
52 CONFIGURE_ARGS
+= --enable-mini-gmp
55 ifeq ($(CONFIG_CPU_SUBTYPE
),neon
)
66 $(call Build
/Compile
/Default
, \
67 DESTDIR
="$(PKG_INSTALL_DIR)" \
69 libnettle.so libhogweed.so
70 +$(MAKE
) -i
$(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
71 DESTDIR
="$(PKG_INSTALL_DIR)" \
75 define Build
/InstallDev
76 $(INSTALL_DIR
) $(1)/usr
/include/nettle
77 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/nettle
/*.h
$(1)/usr
/include/nettle
/
78 $(INSTALL_DIR
) $(1)/usr
/lib
79 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnettle.
{a
,so
*} $(1)/usr
/lib
/
80 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libhogweed.
{a
,so
*} $(1)/usr
/lib
/
81 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
83 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/nettle.
pc \
84 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/hogweed.
pc \
85 $(1)/usr
/lib
/pkgconfig
/
88 define Package
/libnettle
/install
89 $(INSTALL_DIR
) $(1)/usr
/lib
90 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnettle.so.
* $(1)/usr
/lib
/
91 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libhogweed.so.
* $(1)/usr
/lib
/
94 $(eval
$(call BuildPackage
,libnettle
))