Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fix Cygwin's "-no-undefined" patch for zeromq.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Pierre Flori committed Jan 12, 2015
1 parent 9e13c1b commit 740da8b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 50 deletions.
30 changes: 20 additions & 10 deletions build/pkgs/zeromq/patches/build_system/cygwin_sharedlib.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Pass -no-undefined to libtool on Cygwin.
--- zeromq-4.0.4.old/configure.ac 2013-11-13 09:57:50.000000000 -0800
+++ zeromq-4.0.4.new/configure.ac 2014-11-24 06:35:03.896022989 -0800
diff -druN zeromq-4.0.5.tmp/configure.ac zeromq-4.0.5.new/configure.ac
--- zeromq-4.0.5.tmp/configure.ac 2014-10-14 01:06:40.000000000 -0700
+++ zeromq-4.0.5.new/configure.ac 2015-01-12 05:14:03.273512789 -0800
@@ -248,6 +248,7 @@
if test "x$enable_static" = "xyes"; then
AC_MSG_ERROR([Building static libraries is not supported under Cygwin])
Expand All @@ -17,15 +18,24 @@ Pass -no-undefined to libtool on Cygwin.
AM_CONDITIONAL(ON_ANDROID, test "x$libzmq_on_android" = "xyes")
AM_CONDITIONAL(ON_LINUX, test "x$libzmq_on_linux" = "xyes")

--- zeromq-4.0.4.old/src/Makefile.am 2014-03-10 14:41:29.000000000 -0700
+++ zeromq-4.0.4.new/src/Makefile.am 2014-11-24 06:36:21.106125358 -0800
@@ -175,6 +175,9 @@
diff -druN zeromq-4.0.5.tmp/src/Makefile.am zeromq-4.0.5.new/src/Makefile.am
--- zeromq-4.0.5.tmp/src/Makefile.am 2014-03-10 14:41:29.000000000 -0700
+++ zeromq-4.0.5.new/src/Makefile.am 2015-01-12 05:21:31.464543871 -0800
@@ -170,6 +170,9 @@
if ON_MINGW
libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
else
if ON_LINUX
libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl,--version-script=$(srcdir)/libzmq.vers
+if ON_CYGWIN
+libzmq_la_LDFLAGS += -no-undefined
+endif
+libzmq_la_LDFLAGS = -no-undefined -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
+else
if ON_ANDROID
libzmq_la_LDFLAGS = -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
else
libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl
@@ -180,6 +183,7 @@
endif
endif
endif
+endif

EXTRA_DIST = libzmq.vers

72 changes: 32 additions & 40 deletions build/pkgs/zeromq/patches/cygwin_sharedlib.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pass -no-undefined to libtool on Cygwin.
This includes autogenerated changes due to autoreconfiguration of the build system.
diff -druN zeromq-4.0.5.tmp/configure.ac zeromq-4.0.5.new/configure.ac
--- zeromq-4.0.5.tmp/configure.ac 2014-10-14 01:06:40.000000000 -0700
+++ zeromq-4.0.5.new/configure.ac 2014-11-24 07:25:23.300189163 -0800
+++ zeromq-4.0.5.new/configure.ac 2015-01-12 05:14:03.273512789 -0800
@@ -248,6 +248,7 @@
if test "x$enable_static" = "xyes"; then
AC_MSG_ERROR([Building static libraries is not supported under Cygwin])
Expand All @@ -22,21 +22,29 @@ diff -druN zeromq-4.0.5.tmp/configure.ac zeromq-4.0.5.new/configure.ac

diff -druN zeromq-4.0.5.tmp/src/Makefile.am zeromq-4.0.5.new/src/Makefile.am
--- zeromq-4.0.5.tmp/src/Makefile.am 2014-03-10 14:41:29.000000000 -0700
+++ zeromq-4.0.5.new/src/Makefile.am 2014-11-24 07:25:23.320189193 -0800
@@ -175,6 +175,9 @@
+++ zeromq-4.0.5.new/src/Makefile.am 2015-01-12 05:21:31.464543871 -0800
@@ -170,6 +170,9 @@
if ON_MINGW
libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
else
if ON_LINUX
libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl,--version-script=$(srcdir)/libzmq.vers
+if ON_CYGWIN
+libzmq_la_LDFLAGS += -no-undefined
+endif
+libzmq_la_LDFLAGS = -no-undefined -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
+else
if ON_ANDROID
libzmq_la_LDFLAGS = -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
else
libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl
@@ -180,6 +183,7 @@
endif
endif
endif
+endif

EXTRA_DIST = libzmq.vers

diff -druN zeromq-4.0.5.tmp/configure zeromq-4.0.5.new/configure
--- zeromq-4.0.5.tmp/configure 2014-11-24 07:21:32.869855520 -0800
+++ zeromq-4.0.5.new/configure 2014-11-24 07:25:35.310206582 -0800
@@ -623,6 +623,8 @@
--- zeromq-4.0.5.tmp/configure 2015-01-12 05:12:02.923234026 -0800
+++ zeromq-4.0.5.new/configure 2015-01-12 05:23:19.884791717 -0800
@@ -643,6 +643,8 @@
ON_LINUX_TRUE
ON_ANDROID_FALSE
ON_ANDROID_TRUE
Expand All @@ -45,15 +53,15 @@ diff -druN zeromq-4.0.5.tmp/configure zeromq-4.0.5.new/configure
ON_MINGW_FALSE
ON_MINGW_TRUE
BUILD_PGM_FALSE
@@ -17579,6 +17581,7 @@
@@ -17641,6 +17643,7 @@
if test "x$enable_static" = "xyes"; then
as_fn_error $? "Building static libraries is not supported under Cygwin" "$LINENO" 5
fi
+ libzmq_on_cygwin="yes"
;;
*)
as_fn_error $? "unsupported system: ${host_os}." "$LINENO" 5
@@ -19405,6 +19408,14 @@
@@ -19853,6 +19856,14 @@
ON_MINGW_FALSE=
fi

Expand All @@ -68,7 +76,7 @@ diff -druN zeromq-4.0.5.tmp/configure zeromq-4.0.5.new/configure
if test "x$libzmq_on_android" = "xyes"; then
ON_ANDROID_TRUE=
ON_ANDROID_FALSE='#'
@@ -19879,6 +19890,10 @@
@@ -20335,6 +20346,10 @@
as_fn_error $? "conditional \"ON_MINGW\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
Expand All @@ -80,35 +88,19 @@ diff -druN zeromq-4.0.5.tmp/configure zeromq-4.0.5.new/configure
as_fn_error $? "conditional \"ON_ANDROID\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff -druN zeromq-4.0.5.tmp/src/Makefile.in zeromq-4.0.5.new/src/Makefile.in
--- zeromq-4.0.5.tmp/src/Makefile.in 2014-11-24 07:21:35.069858701 -0800
+++ zeromq-4.0.5.new/src/Makefile.in 2014-11-24 07:25:37.500209759 -0800
@@ -36,6 +36,7 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+@ON_ANDROID_FALSE@@ON_CYGWIN_TRUE@@ON_LINUX_TRUE@@ON_MINGW_FALSE@am__append_1 = -no-undefined
subdir = src
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/libzmq.pc.in \
@@ -468,9 +469,18 @@
--- zeromq-4.0.5.tmp/src/Makefile.in 2015-01-12 05:12:11.183253186 -0800
+++ zeromq-4.0.5.new/src/Makefile.in 2015-01-12 05:23:27.164808341 -0800
@@ -504,9 +504,10 @@
ypipe_conflate.hpp \
dbuffer.hpp

@ON_ANDROID_FALSE@@ON_LINUX_FALSE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl
-@ON_ANDROID_FALSE@@ON_LINUX_FALSE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl
-@ON_ANDROID_FALSE@@ON_LINUX_TRUE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl,--version-script=$(srcdir)/libzmq.vers
-@ON_ANDROID_TRUE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
-@ON_MINGW_TRUE@libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
+@ON_ANDROID_FALSE@@ON_LINUX_TRUE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -version-info \
+@ON_ANDROID_FALSE@@ON_LINUX_TRUE@@ON_MINGW_FALSE@ @LTVER@ \
+@ON_ANDROID_FALSE@@ON_LINUX_TRUE@@ON_MINGW_FALSE@ @LIBZMQ_EXTRA_LDFLAGS@ \
+@ON_ANDROID_FALSE@@ON_LINUX_TRUE@@ON_MINGW_FALSE@ -Wl,--version-script=$(srcdir)/libzmq.vers \
+@ON_ANDROID_FALSE@@ON_LINUX_TRUE@@ON_MINGW_FALSE@ $(am__append_1)
+@ON_ANDROID_TRUE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -avoid-version \
+@ON_ANDROID_TRUE@@ON_MINGW_FALSE@ -version-info @LTVER@ \
+@ON_ANDROID_TRUE@@ON_MINGW_FALSE@ @LIBZMQ_EXTRA_LDFLAGS@ \
+@ON_ANDROID_TRUE@@ON_MINGW_FALSE@ $(am__append_1)
+@ON_MINGW_TRUE@libzmq_la_LDFLAGS = -no-undefined -avoid-version \
+@ON_MINGW_TRUE@ -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ \
+@ON_MINGW_TRUE@ $(am__append_1)
+@ON_ANDROID_FALSE@@ON_CYGWIN_FALSE@@ON_LINUX_FALSE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl
+@ON_ANDROID_FALSE@@ON_CYGWIN_FALSE@@ON_LINUX_TRUE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl,--version-script=$(srcdir)/libzmq.vers
+@ON_ANDROID_TRUE@@ON_CYGWIN_FALSE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
+@ON_CYGWIN_TRUE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -no-undefined -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
@ON_MINGW_TRUE@libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@
EXTRA_DIST = libzmq.vers
libzmq_la_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@
@BUILD_PGM_TRUE@libzmq_la_CPPFLAGS = -I$(top_srcdir)/@pgm_srcdir@/include/

0 comments on commit 740da8b

Please sign in to comment.