diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2016-07-26 08:56:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-26 08:56:33 (GMT) |
commit | 22db05376d24b5f65a6405508c10b2f5a035b17b (patch) | |
tree | d831ae4e129d69ddc5bf1014c4b93e08ce922943 /src | |
parent | 263bf8b84c3704839d7c8596e62d67f3d7368cf4 (diff) | |
parent | d4b2eebc27b991fc7acf8a41fab2ddbf2e1a09e8 (diff) | |
download | mxe-22db05376d24b5f65a6405508c10b2f5a035b17b.zip mxe-22db05376d24b5f65a6405508c10b2f5a035b17b.tar.gz mxe-22db05376d24b5f65a6405508c10b2f5a035b17b.tar.bz2 |
Merge pull request #1286 from darealshinji/djvulibre
add package djvulibre
Diffstat (limited to 'src')
-rw-r--r-- | src/djvulibre-1-fixes.patch | 51 | ||||
-rw-r--r-- | src/djvulibre-test.c | 17 | ||||
-rw-r--r-- | src/djvulibre.mk | 33 |
3 files changed, 101 insertions, 0 deletions
diff --git a/src/djvulibre-1-fixes.patch b/src/djvulibre-1-fixes.patch new file mode 100644 index 0000000..d62bd8a --- /dev/null +++ b/src/djvulibre-1-fixes.patch @@ -0,0 +1,51 @@ +This file is part of MXE. +See index.html for further information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: darealshinji <djcj@gmx.de> +Date: Sun, 24 Jul 2016 09:33:22 +0200 +Subject: [PATCH] define XXX_EXPORT symbols + + +diff --git a/libdjvu/Makefile.am b/libdjvu/Makefile.am +index 1111111..2222222 100644 +--- a/libdjvu/Makefile.am ++++ b/libdjvu/Makefile.am +@@ -33,6 +33,8 @@ libdjvulibre_la_LIBADD = $(JPEG_LIBS) $(PTHREAD_LIBS) + libdjvulibre_la_LDFLAGS = -no-undefined -version-info $(version_info) + + if HAVE_OS_WIN32 ++libdjvulibre_la_CPPFLAGS += -DDJVUAPI_EXPORT ++libdjvulibre_la_CPPFLAGS += -DDDJVUAPI_EXPORT -DMINILISPAPI_EXPORT + libdjvulibre_la_LDFLAGS += -Wl,--export-all-symbols + endif + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: darealshinji <djcj@gmx.de> +Date: Sun, 24 Jul 2016 09:36:49 +0200 +Subject: [PATCH] disable unknown pragma warnings + + +diff --git a/libdjvu/miniexp.cpp b/libdjvu/miniexp.cpp +index 1111111..2222222 100644 +--- a/libdjvu/miniexp.cpp ++++ b/libdjvu/miniexp.cpp +@@ -382,6 +382,7 @@ static void NTAPI gctls_cb(PVOID, DWORD dwReason, PVOID) { + {CSLOCK(r);TlsFree(tlsIndex);tlsIndex=TLS_OUT_OF_INDEXES;} + } + # endif ++#ifndef __GNUC__ + // -- Very black magic to clean tls variables. + # ifdef _M_IX86 + # pragma comment (linker, "/INCLUDE:_tlscb") +@@ -391,6 +392,7 @@ static void NTAPI gctls_cb(PVOID, DWORD dwReason, PVOID) { + # pragma const_seg(".CRT$XLB") + extern "C" PIMAGE_TLS_CALLBACK tlscb = gctls_cb; + # pragma const_seg() ++#endif /* !__GNUC__ */ + + #else + // No threads diff --git a/src/djvulibre-test.c b/src/djvulibre-test.c new file mode 100644 index 0000000..51889a2 --- /dev/null +++ b/src/djvulibre-test.c @@ -0,0 +1,17 @@ +/* + * This file is part of MXE. + * See index.html for further information. + */ + +#include <libdjvu/ddjvuapi.h> + +int main(int argc, char *argv[]) +{ + ddjvu_context_t *djvu_test; + (void)argc; + + djvu_test = ddjvu_context_create(argv[0]); + ddjvu_context_release(djvu_test); + + return 0; +} diff --git a/src/djvulibre.mk b/src/djvulibre.mk new file mode 100644 index 0000000..5e3fc5b --- /dev/null +++ b/src/djvulibre.mk @@ -0,0 +1,33 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := djvulibre +$(PKG)_VERSION := 3.5.27 +$(PKG)_CHECKSUM := e69668252565603875fb88500cde02bf93d12d48a3884e472696c896e81f505f +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/djvu/DjVuLibre/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc jpeg tiff zlib + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://sourceforge.net/projects/djvu/files/DjVuLibre/' | \ + $(SED) -n 's,.*/\([0-9][^A-Za-z"]*\)/".*,\1,p' | \ + head -1 +endef + +# can't build a working static library for now +# https://sourceforge.net/p/djvu/bugs/274/ +define $(PKG)_BUILD_SHARED + cd '$(SOURCE_DIR)' && autoreconf -fi + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-desktopfiles + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install-strip \ + $(MXE_DISABLE_CRUFT) dist_bin_SCRIPTS= + + '$(TARGET)-g++' \ + -W -Wall -Werror -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' ddjvuapi --cflags --libs` +endef |