# HG changeset patch # User John Donoghue # Date 1388759912 18000 # Node ID 4c7ad30fe8a9278811a0be2a3bd81e8b696245c1 # Parent 58b5ed5a0247040cf6749a2a863d8258c55e9da8 of-sockets: update winsock patch * dist-files.mk: change name from mingw-of-sockets-1-winsock.patch to of-sockets-1-fixes.patch. * src/of-sockets-1-fixes.patch: moved mingw-of-sockets-1-winsock.patch to of-sockets-1-fixes.patch. diff -r 58b5ed5a0247 -r 4c7ad30fe8a9 dist-files.mk --- a/dist-files.mk Fri Jan 03 08:04:26 2014 -0500 +++ b/dist-files.mk Fri Jan 03 09:38:32 2014 -0500 @@ -282,7 +282,6 @@ mingw-glib-1-fixes.patch \ mingw-glib-2-fixes.patch \ mingw-hdf5-1.patch \ - mingw-of-sockets-1-winsock.patch \ mingw-pango-1-fixes.patch \ mingw-utils-1-portability-fix.patch \ mingw-units-1-fixes.patch \ @@ -395,6 +394,7 @@ of-optim.mk \ of-signal.mk \ of-sockets.mk \ + of-sockets-1-fixes.patch \ of-specfun.mk \ of-statistics.mk \ of-struct.mk \ diff -r 58b5ed5a0247 -r 4c7ad30fe8a9 src/mingw-of-sockets-1-winsock.patch --- a/src/mingw-of-sockets-1-winsock.patch Fri Jan 03 08:04:26 2014 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -diff -ur sockets.orig/src/Makefile sockets/src/Makefile ---- sockets.orig/src/Makefile 2013-12-31 22:17:49.000000000 -0500 -+++ sockets/src/Makefile 2013-12-31 22:25:31.000000000 -0500 -@@ -14,7 +14,7 @@ - all: $(OCT) - - %.oct: %.cc -- mkoctfile $(VFLAGS) -s $< -+ mkoctfile $(VFLAGS) -s $< -lws2_32 - - test: $(OCT) - test_octave_sockets diff -r 58b5ed5a0247 -r 4c7ad30fe8a9 src/of-sockets-1-fixes.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/of-sockets-1-fixes.patch Fri Jan 03 09:38:32 2014 -0500 @@ -0,0 +1,24 @@ +diff -ur sockets.orig/src/Makefile sockets/src/Makefile +--- sockets.orig/src/Makefile 2014-01-03 08:34:47.000000000 -0500 ++++ sockets/src/Makefile 2014-01-03 09:18:19.000000000 -0500 +@@ -1,6 +1,11 @@ + OCT = sockets.oct + SRC := $(OCT:.oct=.cc) + ++EXTRALIBS = ++ifeq ($(OS),Windows_NT) ++ EXTRALIBS = -lws2_32 ++endif ++ + #See which octave version we run by querying mkoctfile for its version + #string. (Is there a better way to do this? This looks horrible.) + majorversion := $(shell mkoctfile --version 2>&1 | sed -e 's/[ .+]/\n/g' |sed -n '3p') +@@ -14,7 +19,7 @@ + all: $(OCT) + + %.oct: %.cc +- mkoctfile $(VFLAGS) -s $< ++ mkoctfile $(VFLAGS) -s $< $(EXTRALIBS) + + test: $(OCT) + test_octave_sockets