summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.html3
-rw-r--r--src/dlfcn-win32-1-configure-fixes.patch35
-rw-r--r--src/dlfcn-win32.mk28
3 files changed, 66 insertions, 0 deletions
diff --git a/index.html b/index.html
index 1249ea0..3aa404c 100644
--- a/index.html
+++ b/index.html
@@ -1220,6 +1220,9 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre>
<td class="website"><a href="http://openil.sourceforge.net/">DevIL</a></td>
</tr>
<tr>
+ <td class="package">dlfcn-win32</td>
+ <td class="website"><a href="https://code.google.com/p/dlfcn-win32/">POSIX dlfcn wrapper for Windows</a></td>
+ <tr>
<td class="package">eigen</td>
<td class="website"><a href="http://eigen.tuxfamily.org/">eigen</a></td>
</tr>
diff --git a/src/dlfcn-win32-1-configure-fixes.patch b/src/dlfcn-win32-1-configure-fixes.patch
new file mode 100644
index 0000000..80832d4
--- /dev/null
+++ b/src/dlfcn-win32-1-configure-fixes.patch
@@ -0,0 +1,35 @@
+This file is part of MXE.
+See index.html for further information.
+
+From: Timothy Gu <timothygu99@gmail.com>
+Subject: [PATCH 1/2] configure: make script return 0 if successfully executed
+
+diff -Naur dlfcn-win32-r19.orig/configure dlfcn-win32-r19/configure
+--- dlfcn-win32-r19.orig/configure 2009-01-11 13:31:27.000000000 -0800
++++ dlfcn-win32-r19/configure 2013-11-23 20:13:14.429342371 -0800
+@@ -186,7 +186,7 @@
+ echo "strip: $strip"
+ echo "static: $static"
+ echo "shared: $shared"
+-enabled shared && {
++if (enabled shared); then
+ echo "msvc: $msvc";
+ echo "strip: $stripping";
+-}
++fi
+
+From: Timothy Gu <timothygu99@gmail.com>
+Subject: [PATCH 2/2] configure: update $libdir and $incdir after parsing opts
+
+diff -Naur dlfcn-win32-r19.orig/configure dlfcn-win32-r19/configure
+--- dlfcn-win32-r19.orig/configure 2009-01-11 13:31:27.000000000 -0800
++++ dlfcn-win32-r19/configure 2013-11-23 20:15:43.777338541 -0800
+@@ -111,6 +111,8 @@
+ esac
+ done
+
++libdir="${PREFIX}/lib"
++incdir="${PREFIX}/include"
+ ar="${cross_prefix}${ar}"
+ cc_default="${cross_prefix}${cc_default}"
+ ranlib="${cross_prefix}${ranlib}"
diff --git a/src/dlfcn-win32.mk b/src/dlfcn-win32.mk
new file mode 100644
index 0000000..30e4163
--- /dev/null
+++ b/src/dlfcn-win32.mk
@@ -0,0 +1,28 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG := dlfcn-win32
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 19
+$(PKG)_CHECKSUM := a0033e37a547c52059d0bf8664a96ecdeeb66419
+$(PKG)_SUBDIR := $(PKG)-r$($(PKG)_VERSION)
+$(PKG)_FILE := $($(PKG)_SUBDIR).tar.bz2
+$(PKG)_URL := http://$(PKG).googlecode.com/files/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc
+
+define $(PKG)_UPDATE
+ $(WGET) -q -O- 'http://code.google.com/p/dlfcn-win32/downloads/list?sort=-uploaded' | \
+ $(SED) -n 's,.*dlfcn-win32-r\([0-9][^<]*\)\.tar.*,\1,p' | \
+ head -1
+endef
+
+define $(PKG)_BUILD
+ cd '$(1)' && ./configure \
+ --prefix='$(PREFIX)/$(TARGET)' \
+ --cross-prefix='$(TARGET)-' \
+ --disable-shared
+ $(MAKE) -C '$(1)' -j '$(JOBS)'
+ $(MAKE) -C '$(1)' -j 1 install
+
+ # No test avalable temprorarily because MXE doesn't support shared build yet
+endef