summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/djvulibre-1-fixes.patch38
-rw-r--r--src/djvulibre.mk14
2 files changed, 39 insertions, 13 deletions
diff --git a/src/djvulibre-1-fixes.patch b/src/djvulibre-1-fixes.patch
index e8f3004..d62bd8a 100644
--- a/src/djvulibre-1-fixes.patch
+++ b/src/djvulibre-1-fixes.patch
@@ -1,6 +1,19 @@
+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 @@
+@@ -33,6 +33,8 @@ libdjvulibre_la_LIBADD = $(JPEG_LIBS) $(PTHREAD_LIBS)
libdjvulibre_la_LDFLAGS = -no-undefined -version-info $(version_info)
if HAVE_OS_WIN32
@@ -9,23 +22,30 @@
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
-@@ -383,14 +383,16 @@
+@@ -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")
- # else
- # pragma comment (linker, "/INCLUDE:tlscb")
- # endif
+@@ -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()
-+/* # pragma const_seg() */
+ # pragma const_seg()
++#endif /* !__GNUC__ */
#else
// No threads
diff --git a/src/djvulibre.mk b/src/djvulibre.mk
index c899469..5e3fc5b 100644
--- a/src/djvulibre.mk
+++ b/src/djvulibre.mk
@@ -15,13 +15,19 @@ define $(PKG)_UPDATE
head -1
endef
+# can't build a working static library for now
+# https://sourceforge.net/p/djvu/bugs/274/
define $(PKG)_BUILD_SHARED
- cd '$(1)' && automake
- cd '$(1)' && ./configure $(MXE_CONFIGURE_OPTS) --disable-desktopfiles
- $(MAKE) -C '$(1)' -j '$(JOBS)' install-strip
+ 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 \
- '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
+ '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`'$(TARGET)-pkg-config' ddjvuapi --cflags --libs`
endef