Skip to content

Commit

Permalink
Add native/libtomcrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
vitkabele committed Jul 24, 2023
1 parent 69f5cd7 commit 2bb0d38
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
40 changes: 40 additions & 0 deletions native/libtomcrypt/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
PKG_NAME = libtomcrypt
PKG_VERS = 1.18.2
PKG_EXT = zip
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/libtom/libtomcrypt/archive/refs/tags/
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

# libtomcrypt builds using libtool
DEPENDS = native/libtool native/libtommath

HOMEPAGE = https://www.libtom.net/LibTomCrypt/
COMMENT = LibTomCrypt is a fairly comprehensive, modular and portable cryptographic toolkit.
LICENSE = The LibTom license
MAINTAINER = vitkabele

CONFIGURE_TARGET = nop

# Path to the libtool installed in the cross/libtool DEPENDS target
LIBTOOL_BIN = $(WORK_DIR)/../../libtool/work-native/install/usr/local/bin/libtool

# We must use the cross-built libtool, because it uses its own linker
MAKEFILE_FLAGS = -f makefile.shared LIBTOOL=$(LIBTOOL_BIN)

COMPILE_MAKE_OPTIONS = $(MAKEFILE_FLAGS)

POST_INSTALL_TARGET = libtomcrypt_post_install

include ../../mk/spksrc.native-cc.mk

NATIVE_LIBTOMMATH_DIR := $(WORK_DIR)/../../libtommath/work-native/install/usr/local

ENV= CC=gcc CFLAGS="-DUSE_LTM -DLTM_DESC -I$(NATIVE_LIBTOMMATH_DIR)/include" EXTRALIBS=$(NATIVE_LIBTOMMATH_DIR)/lib/libtommath.la

# The framework supplies only prefix=, but our makefile wants PREFIX=
INSTALL_MAKE_OPTIONS += $(MAKEFILE_FLAGS) PREFIX=$(INSTALL_PREFIX)

.PHONY: libtomcrypt_post_install
libtomcrypt_post_install:
$(RUN) $(LIBTOOL_BIN) --finish $(INSTALL_DIR)/$(INSTALL_PREFIX)/lib/
3 changes: 3 additions & 0 deletions native/libtomcrypt/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
libtomcrypt-1.18.2.zip SHA1 7979765fc91102c40e8848cb7158931cd7fb6310
libtomcrypt-1.18.2.zip SHA256 a2c01943a26043305a8a8a2315e7f9ce9c78e069ed4e8069aef6ec1357013c04
libtomcrypt-1.18.2.zip MD5 d078af073577b027a10feb627849c121

0 comments on commit 2bb0d38

Please sign in to comment.