port library: liblzma

Issue #2528
This commit is contained in:
Ben Larson 2017-11-07 17:46:03 -07:00 committed by Christian Helmuth
parent b34f70d312
commit dc246544de
7 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1 @@
INC_DIR += $(call select_from_ports,xz)/include/liblzma

View File

@ -0,0 +1,60 @@
LIBLZMA_PORT_DIR := $(call select_from_ports,xz)
LIBLZMA_DIR := $(LIBLZMA_PORT_DIR)/src/xz/src/liblzma
CC_DEF += -DHAVE_CONFIG_H
SRC_C = $(notdir $(wildcard $(LIBLZMA_DIR)/common/*.c))
SRC_C += $(notdir $(wildcard $(LIBLZMA_DIR)/delta/*.c))
SRC_C += $(notdir $(wildcard $(LIBLZMA_DIR)/lz/*.c))
SRC_C += $(notdir $(wildcard $(LIBLZMA_DIR)/simple/*.c))
# tuklib
SRC_C += tuklib_physmem.c \
tuklib_cpucores.c
# liblzma/check
SRC_C += check.c \
crc32_fast.c \
crc32_table.c \
crc64_fast.c \
crc64_table.c \
sha256.c
# liblzma/lzma
SRC_C += fastpos_table.c \
lzma_decoder.c \
lzma_encoder_optimum_fast.c \
lzma_encoder_optimum_normal.c \
lzma_encoder_presets.c \
lzma_encoder.c \
lzma2_decoder.c \
lzma2_encoder.c
# liblzma/rangecoder
SRC_C += price_table.c
vpath %.c $(LIBLZMA_DIR)/../common
vpath %.c $(LIBLZMA_DIR)/check
vpath %.c $(LIBLZMA_DIR)/common
vpath %.c $(LIBLZMA_DIR)/delta
vpath %.c $(LIBLZMA_DIR)/lz
vpath %.c $(LIBLZMA_DIR)/lzma
vpath %.c $(LIBLZMA_DIR)/rangecoder
vpath %.c $(LIBLZMA_DIR)/simple
# find 'config.h'
INC_DIR += $(REP_DIR)/src/lib/liblzma
INC_DIR += $(LIBLZMA_DIR)/../common \
$(LIBLZMA_DIR)/api \
$(LIBLZMA_DIR)/check \
$(LIBLZMA_DIR)/common \
$(LIBLZMA_DIR)/delta \
$(LIBLZMA_DIR)/lz \
$(LIBLZMA_DIR)/lzma \
$(LIBLZMA_DIR)/rangecoder \
$(LIBLZMA_DIR)/simple
LIBS += libc
SHARED_LIB = yes

View File

@ -0,0 +1 @@
99159500502f628b89fd4b87b37e5997c168515a

View File

@ -0,0 +1,11 @@
LICENSE := GPLv3
VERSION := 5.2.3
DOWNLOADS := xz.archive
URL(xz) := http://tukaani.org/xz/xz-$(VERSION).tar.xz
SHA(xz) := a2975d12e0905daec48ec87c0098602e0669d195
DIR(xz) := src/xz
DIRS := include/liblzma
DIR_CONTENT(include/liblzma) := src/xz/src/liblzma/api/lzma.h \
src/xz/src/liblzma/api/lzma

View File

@ -0,0 +1,24 @@
#define HAVE_DECODER_LZMA2 1
#define HAVE_DLFCN_H 1
#define HAVE_FCNTL_H 1
#define HAVE_GETOPT_H 1
#define HAVE_GETOPT_LONG 1
#define HAVE_INTTYPES_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MEMORY_H 1
#define HAVE_OPTRESET 1
#define HAVE_STDBOOL_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_ENDIAN_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UINTPTR_T 1
#define HAVE_UNISTD_H 1
#define STDC_HEADERS 1
#define MYTHREAD_POSIX 1

View File

@ -0,0 +1,5 @@
#include <lzma.h>
int main() {
return 0;
}

View File

@ -0,0 +1,3 @@
TARGET = test-lzma
LIBS = liblzma posix
SRC_C = main.c