summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRashad <mohammedrashadkm@gmail.com>2015-06-06 16:46:37 (GMT)
committerRashad <mohammedrashadkm@gmail.com>2015-06-06 16:46:37 (GMT)
commite96091ea5391c1363ecfa3da09d35a9d9a785259 (patch)
tree40e7ae3c65e9e1074b821c749d62150a15a3a3db /src
parenta97c6bf0b42a7ec8bddf45253e9a236bd218954c (diff)
downloadmxe-e96091ea5391c1363ecfa3da09d35a9d9a785259.zip
mxe-e96091ea5391c1363ecfa3da09d35a9d9a785259.tar.gz
mxe-e96091ea5391c1363ecfa3da09d35a9d9a785259.tar.bz2
enable shared
Diffstat (limited to 'src')
-rw-r--r--src/armadillo.mk2
-rw-r--r--src/hdf4.mk25
-rw-r--r--src/netcdf.mk25
-rw-r--r--src/portablexdr-1-castfix.patch64
-rw-r--r--src/portablexdr.mk2
5 files changed, 88 insertions, 30 deletions
diff --git a/src/armadillo.mk b/src/armadillo.mk
index bff936b..6a8337a 100644
--- a/src/armadillo.mk
+++ b/src/armadillo.mk
@@ -31,5 +31,3 @@ define $(PKG)_BUILD
-larmadillo -llapack -lblas -lgfortran -lquadmath \
-lboost_serialization-mt -lboost_thread_win32-mt -lboost_system-mt
endef
-
-$(PKG)_BUILD_SHARED =
diff --git a/src/hdf4.mk b/src/hdf4.mk
index b987cbc..81ac277 100644
--- a/src/hdf4.mk
+++ b/src/hdf4.mk
@@ -21,19 +21,22 @@ define $(PKG)_BUILD
cd '$(1)' && $(LIBTOOLIZE) --force
cd '$(1)' && autoreconf --install
cd '$(1)' && ./configure \
- --host='$(TARGET)' \
- --build="`config.guess`" \
- --disable-shared \
+ $(MXE_CONFIGURE_OPTS) \
--disable-fortran \
--disable-netcdf \
- --prefix='$(PREFIX)/$(TARGET)' \
- CPPFLAGS="-DH4_F77_FUNC\(name,NAME\)=NAME -DH4_BUILT_AS_STATIC_LIB=1"
- $(MAKE) -C '$(1)'/hdf/src -j '$(JOBS)'
+ $(if $(BUILD_STATIC), \
+ CPPFLAGS="-DH4_F77_FUNC\(name,NAME\)=NAME -DH4_BUILT_AS_STATIC_LIB=1") \
+ AR='$(TARGET)-ar' \
+ $(if $(BUILD_SHARED), \
+ LIBS="-lportablexdr -lws2_32" CPPFLAGS="-DH4_F77_FUNC\(name,NAME\)=NAME -DH4_BUILT_AS_DYNAMIC_LIB=1 -DBIG_LONGS")
+ $(MAKE) -C '$(1)'/mfhdf/xdr -j '$(JOBS)' \
+ LDFLAGS=-no-undefined
+
+ $(MAKE) -C '$(1)'/hdf/src -j '$(JOBS)' \
+ LDFLAGS=-no-undefined
$(MAKE) -C '$(1)'/hdf/src -j 1 install
- $(MAKE) -C '$(1)'/mfhdf/libsrc -j '$(JOBS)'
+
+ $(MAKE) -C '$(1)'/mfhdf/libsrc -j '$(JOBS)' \
+ LDFLAGS="-no-undefined -ldf"
$(MAKE) -C '$(1)'/mfhdf/libsrc -j 1 install
endef
-
-$(PKG)_BUILD_x86_64-w64-mingw32 =
-
-$(PKG)_BUILD_SHARED =
diff --git a/src/netcdf.mk b/src/netcdf.mk
index 7a87fb2..360206c 100644
--- a/src/netcdf.mk
+++ b/src/netcdf.mk
@@ -26,20 +26,15 @@ define $(PKG)_BUILD
cd '$(1)' && \
$(SED) -i -e 's/#ifdef IGNORE/#if 0/' libsrc4/nc4hdf.c libsrc4/ncfunc.c libsrc/attr.c ncgen/cvt.c && \
./configure \
- --host='$(TARGET)' \
- --build="`config.guess`" \
- --disable-shared \
- --enable-netcdf-4 \
- --enable-hdf4 \
- --prefix='$(PREFIX)/$(TARGET)' \
- CPPFLAGS="-D_DLGS_H" \
- LIBS="-lmfhdf -ldf -lportablexdr -lws2_32"
- $(MAKE) -C '$(1)' -j '$(JOBS)'
- $(MAKE) -C '$(1)' -j 1 install
-endef
+ $(MXE_CONFIGURE_OPTS) \
+ --enable-netcdf-4 \
+ --enable-hdf4 \
+ --disable-testsets \
+ --disable-examples \
+ CPPFLAGS="-D_DLGS_H -DWIN32_LEAN_AND_MEAN" \
+ LIBS="-lmfhdf -ldf -lportablexdr -lws2_32"
-$(PKG)_BUILD_x86_64-w64-mingw32 =
-$(PKG)_BUILD_i686-w64-mingw32 = $(subst --enable-hdf4, --disable-hdf4,\
- $(subst -lmfhdf -ldf,,$($(PKG)_BUILD)))
+ $(MAKE) -C '$(1)' -j '$(JOBS)' LDFLAGS=-no-undefined
-$(PKG)_BUILD_SHARED =
+ $(MAKE) -C '$(1)' -j 1 install
+endef
diff --git a/src/portablexdr-1-castfix.patch b/src/portablexdr-1-castfix.patch
new file mode 100644
index 0000000..4015988
--- /dev/null
+++ b/src/portablexdr-1-castfix.patch
@@ -0,0 +1,64 @@
+diff -burN portablexdr-4.9.1.orig/xdr_mem.c portablexdr-4.9.1/xdr_mem.c
+--- portablexdr-4.9.1.orig/xdr_mem.c 2015-06-06 15:07:31.234026991 +0200
++++ portablexdr-4.9.1/xdr_mem.c 2015-06-06 15:08:03.713081033 +0200
+@@ -169,7 +169,7 @@
+ register caddr_t newaddr = xdrs->x_base + pos;
+ register caddr_t lastaddr = xdrs->x_private + xdrs->x_handy;
+
+- if ((long)newaddr > (long)lastaddr)
++ if ((intptr_t)newaddr > (intptr_t)lastaddr)
+ return (FALSE);
+ xdrs->x_private = newaddr;
+ xdrs->x_handy = lastaddr - newaddr;
+diff -burN portablexdr-4.9.1.orig/xdr_rec.c portablexdr-4.9.1/xdr_rec.c
+--- portablexdr-4.9.1.orig/xdr_rec.c 2015-06-06 15:07:31.239026999 +0200
++++ portablexdr-4.9.1/xdr_rec.c 2015-06-06 15:08:08.552089085 +0200
+@@ -173,7 +173,7 @@
+ return;
+ }
+ for (rstrm->out_base = rstrm->the_buffer;
+- (long) rstrm->out_base % BYTES_PER_XDR_UNIT != 0;
++ (intptr_t) rstrm->out_base % BYTES_PER_XDR_UNIT != 0;
+ rstrm->out_base++);
+ rstrm->in_base = rstrm->out_base + sendsize;
+ /*
+@@ -472,12 +472,12 @@
+ register u_long len; /* fragment length */
+
+ if (sendnow || rstrm->frag_sent ||
+- ((u_long)rstrm->out_finger + sizeof(u_long) >=
+- (u_long)rstrm->out_boundry)) {
++ ((uintptr_t)rstrm->out_finger + sizeof(u_long) >=
++ (uintptr_t)rstrm->out_boundry)) {
+ rstrm->frag_sent = FALSE;
+ return (flush_out(rstrm, TRUE));
+ }
+- len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->frag_header) -
++ len = (uintptr_t)(rstrm->out_finger) - (uintptr_t)(rstrm->frag_header) -
+ sizeof(u_long);
+ *(rstrm->frag_header) = htonl((u_long)len | LAST_FRAG);
+ rstrm->frag_header = (u_long *)rstrm->out_finger;
+@@ -495,11 +495,11 @@
+ bool_t eor;
+ {
+ register u_long eormask = (eor == TRUE) ? LAST_FRAG : 0;
+- register u_long len = (u_long)(rstrm->out_finger) -
+- (u_long)(rstrm->frag_header) - sizeof(u_long);
++ register u_long len = (uintptr_t)(rstrm->out_finger) -
++ (uintptr_t)(rstrm->frag_header) - sizeof(u_long);
+
+ *(rstrm->frag_header) = htonl(len | eormask);
+- len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->out_base);
++ len = (uintptr_t)(rstrm->out_finger) - (uintptr_t)(rstrm->out_base);
+ if ((*(rstrm->writeit))(rstrm->tcp_handle, rstrm->out_base, (int)len)
+ != (int)len)
+ return (FALSE);
+@@ -517,7 +517,7 @@
+ register int len;
+
+ where = rstrm->in_base;
+- i = (long) rstrm->in_boundry % BYTES_PER_XDR_UNIT;
++ i = (intptr_t) rstrm->in_boundry % BYTES_PER_XDR_UNIT;
+ where += i;
+ len = rstrm->in_size - i;
+ if ((len = (*(rstrm->readit))(rstrm->tcp_handle, where, len)) == -1)
diff --git a/src/portablexdr.mk b/src/portablexdr.mk
index e4e8222..5644a78 100644
--- a/src/portablexdr.mk
+++ b/src/portablexdr.mk
@@ -24,5 +24,3 @@ define $(PKG)_BUILD
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 install
endef
-
-$(PKG)_BUILD_x86_64-w64-mingw32 =