~ubuntu-branches/ubuntu/trusty/3depict/trusty-proposed

« back to all changes in this revision

Viewing changes to packaging/mingw-debian-cross/patches/gettext-win32-prefix

  • Committer: Package Import Robot
  • Author(s): D Haley
  • Date: 2013-07-20 18:31:32 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20130720183132-5ak932y2x6pwo4fs
Tags: 0.0.14-1
* Update to upstream, 0.0.14
* Enable mathgl2.x configure option
* Modify build-depends, libmgl-dev >= 2.1.32

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -r 39dc3bef2ec7 gettext-runtime/configure.ac
 
2
--- a/gettext-runtime/configure.ac      Sun Feb 24 17:55:28 2013 +0100
 
3
+++ b/gettext-runtime/configure.ac      Sun Feb 24 17:57:12 2013 +0100
 
4
@@ -106,6 +106,35 @@
 
5
 #endif
 
6
 ])
 
7
 
 
8
+dnl Compilation on mingw and Cygwin needs special Makefile rules, because
 
9
+dnl 1. when we install a shared library, we must arrange to export
 
10
+dnl    auxiliary pointer variables for every exported variable,
 
11
+dnl 2. when we install a shared library and a static library simultaneously,
 
12
+dnl    the include file specifies __declspec(dllimport) and therefore we
 
13
+dnl    must arrange to define the auxiliary pointer variables for the
 
14
+dnl    exported variables _also_ in the static library.
 
15
+if test "$enable_shared" = yes; then
 
16
+  case "$host_os" in
 
17
+    mingw* | cygwin*) is_woe32dll=yes ;;
 
18
+    *) is_woe32dll=no ;;
 
19
+  esac
 
20
+else
 
21
+  is_woe32dll=no
 
22
+fi
 
23
+AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes])
 
24
+if test $is_woe32dll = yes; then
 
25
+  AC_DEFINE([WOE32DLL], [1],
 
26
+    [Define when --enable-shared is used on mingw or Cygwin.])
 
27
+fi
 
28
+
 
29
+INTL_EXPORTS_FLAGS=
 
30
+dnl 64-bit mingw does not prepend an underscore to C symbols.
 
31
+dnl USER_LABEL_PREFIX is set by gl_ASM_SYMBOL_PREFIX, inside gl_INIT.
 
32
+if test "$USER_LABEL_PREFIX" = _; then
 
33
+  INTL_EXPORTS_FLAGS="-DUSER_LABEL_PREFIX_UNDERSCORE $INTL_EXPORTS_FLAGS"
 
34
+fi
 
35
+AC_SUBST([INTL_EXPORTS_FLAGS])
 
36
+
 
37
 dnl Check for tools needed for formatting the documentation.
 
38
 ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
 
39
 AC_PATH_PROG([PERL], [perl], [$ac_aux_dir_abs/missing perl])
 
40
diff -r 39dc3bef2ec7 gettext-runtime/intl/intl-exports.c
 
41
--- a/gettext-runtime/intl/intl-exports.c       Sun Feb 24 17:55:28 2013 +0100
 
42
+++ b/gettext-runtime/intl/intl-exports.c       Sun Feb 24 17:57:12 2013 +0100
 
43
@@ -18,7 +18,11 @@
 
44
    USA.  */
 
45
 
 
46
  /* IMP(x) is a symbol that contains the address of x.  */
 
47
-#define IMP(x) _imp__##x
 
48
+#if USER_LABEL_PREFIX_UNDERSCORE
 
49
+# define IMP(x) _imp__##x
 
50
+#else
 
51
+# define IMP(x) __imp_##x
 
52
+#endif
 
53
 
 
54
  /* Ensure that the variable x is exported from the library, and that a
 
55
     pseudo-variable IMP(x) is available.  */
 
56
diff -r 39dc3bef2ec7 gnulib-local/modules/gettext-runtime-misc
 
57
--- a/gnulib-local/modules/gettext-runtime-misc Sun Feb 24 17:55:28 2013 +0100
 
58
+++ b/gnulib-local/modules/gettext-runtime-misc Sun Feb 24 17:57:12 2013 +0100
 
59
@@ -15,6 +15,11 @@
 
60
 # Parametrization of the 'relocatable' module.
 
61
 AM_CPPFLAGS += -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1
 
62
 
 
63
+# Tell the mingw or Cygwin linker which symbols to export.
 
64
+if WOE32DLL
 
65
+AM_CPPFLAGS += @INTL_EXPORTS_FLAGS@
 
66
+endif
 
67
+
 
68
 Include:
 
69
 
 
70
 License: