From 14cbf5ec6c1235d7bb29283b95d955b8b0089af2 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 24 Nov 2013 13:33:33 -0800 Subject: [PATCH] Add package dlfcn-win32 Signed-off-by: Timothy Gu --- index.html | 3 +++ src/dlfcn-win32-1-configure-fixes.patch | 35 +++++++++++++++++++++++++ src/dlfcn-win32.mk | 28 ++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 src/dlfcn-win32-1-configure-fixes.patch create mode 100644 src/dlfcn-win32.mk diff --git a/index.html b/index.html index 1249ea0a..3aa404c2 100644 --- a/index.html +++ b/index.html @@ -1219,6 +1219,9 @@ local-pkg-list: $(LOCAL_PKG_LIST) devil DevIL + + dlfcn-win32 + POSIX dlfcn wrapper for Windows eigen eigen diff --git a/src/dlfcn-win32-1-configure-fixes.patch b/src/dlfcn-win32-1-configure-fixes.patch new file mode 100644 index 00000000..80832d46 --- /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 +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 +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 00000000..30e4163d --- /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