summaryrefslogtreecommitdiffstats
path: root/src/postgresql-1-fixes.patch
blob: 54082c97af18acb2e58e81ec62e60c6fe75ce0a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
This file is part of MXE.
See index.html for further information.

Contains ad hoc patches for cross building.

From a92f8ef8826f38edfe010752badc5c280f5b9605 Mon Sep 17 00:00:00 2001
From: "a@a.org" <a@a.org>
Date: Mon, 24 Oct 2011 14:02:33 +0200
Subject: [PATCH 1/4] use unix style names for openssl on mingw-cross-env


diff --git a/configure.in b/configure.in
index 2f8bb3d..441b42b 100644
--- a/configure.in
+++ b/configure.in
@@ -926,13 +926,8 @@ fi
 
 if test "$with_openssl" = yes ; then
   dnl Order matters!
-  if test "$PORTNAME" != "win32"; then
-     AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])
-     AC_CHECK_LIB(ssl,    SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])
-  else
-     AC_SEARCH_LIBS(CRYPTO_new_ex_data, eay32 crypto, [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])])
-     AC_SEARCH_LIBS(SSL_library_init, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])])
-  fi
+  AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])
+  AC_CHECK_LIB(ssl,    SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])
 fi
 
 if test "$with_pam" = yes ; then
-- 
1.9.1


From 6bbf26ce1f6c0bbd6fc53db1152b1132795b2850 Mon Sep 17 00:00:00 2001
From: "a@a.org" <a@a.org>
Date: Mon, 24 Oct 2011 14:09:38 +0200
Subject: [PATCH 2/4] do not check autoconf version


diff --git a/configure.in b/configure.in
index 441b42b..1257071 100644
--- a/configure.in
+++ b/configure.in
@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
 
 AC_INIT([PostgreSQL], [9.2.4], [pgsql-bugs@postgresql.org])
 
-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.63], [], [m4_fatal([Autoconf version 2.63 is required.
-Untested combinations of 'autoconf' and PostgreSQL versions are not
-recommended.  You can remove the check from 'configure.in' but it is then
-your responsibility whether the result works or not.])])
 AC_COPYRIGHT([Copyright (c) 1996-2012, PostgreSQL Global Development Group])
 AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
 AC_CONFIG_AUX_DIR(config)
-- 
1.9.1


From e7cdd570742aa958d5b45c6971253d9a0ac8ecf4 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Tue, 1 Jul 2014 14:27:21 -0700
Subject: [PATCH 3/4] Fix shared lib install location

Signed-off-by: Timothy Gu <timothygu99@gmail.com>

diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 294d10f..3acdd81 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -293,6 +293,7 @@ endif
 ifeq ($(PORTNAME), win32)
   ifdef SO_MAJOR_VERSION
     shlib		= lib$(NAME)$(DLSUFFIX)
+    stlib		= lib$(NAME)$(DLSUFFIX).a
   endif
   haslibarule   = yes
 endif
@@ -447,14 +448,16 @@ ifeq ($(PORTNAME), darwin)
 endif
 
 ifeq ($(enable_shared), yes)
-install-lib-shared: $(shlib) installdirs-lib
+install-lib-shared: $(shlib)
+ifeq (, $(filter $(PORTNAME), win32 cygwin))
+install-lib-shared: installdirs-lib
+endif # not win32 or cygwin
 ifdef soname
 # we don't install $(shlib) on AIX
 # (see http://archives.postgresql.org/message-id/52EF20B2E3209443BC37736D00C3C1380A6E79FE@EXADV1.host.magwien.gv.at)
 ifneq ($(PORTNAME), aix)
+ifeq (, $(filter $(PORTNAME), win32 cygwin))
 	$(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)'
-ifneq ($(PORTNAME), cygwin)
-ifneq ($(PORTNAME), win32)
 ifneq ($(shlib), $(shlib_major))
 	cd '$(DESTDIR)$(libdir)' && \
 	rm -f $(shlib_major) && \
@@ -465,8 +468,9 @@ ifneq ($(shlib), $(shlib_bare))
 	rm -f $(shlib_bare) && \
 	$(LN_S) $(shlib) $(shlib_bare)
 endif
-endif # not win32
-endif # not cygwin
+else  # win32 or cygwin
+	$(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)'
+endif # not win32 or cygwin
 endif # not aix
 else # no soname
 	$(INSTALL_SHLIB) $< '$(DESTDIR)$(pkglibdir)/$(shlib)'
-- 
1.9.1


From 49f1ebdd0a4523f77b889b7dfbd5d34c2e11dab1 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Tue, 1 Jul 2014 14:41:44 -0700
Subject: [PATCH 4/4] Don't build shared lib on win32 if --disable-shared is
 set

Signed-off-by: Timothy Gu <timothygu99@gmail.com>

diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 3acdd81..68084cd 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -291,11 +291,15 @@ ifeq ($(PORTNAME), cygwin)
 endif
 
 ifeq ($(PORTNAME), win32)
-  ifdef SO_MAJOR_VERSION
-    shlib		= lib$(NAME)$(DLSUFFIX)
-    stlib		= lib$(NAME)$(DLSUFFIX).a
+  ifeq ($(enable_shared), yes)
+    ifdef SO_MAJOR_VERSION
+      shlib		= lib$(NAME)$(DLSUFFIX)
+      stlib		= lib$(NAME)$(DLSUFFIX).a
+    endif
+    haslibarule   = yes
+  else
+    shlib		=
   endif
-  haslibarule   = yes
 endif
 
 
-- 
1.9.1