Pārlūkot izejas kodu

Merge pull request #1695 from plntyk/fix_postgresql_various

Fix various postgresql issues
Jo-Philipp Wich 9 gadus atpakaļ
vecāks
revīzija
a137be6d8b
1 mainītis faili ar 18 papildinājumiem un 2 dzēšanām
  1. 18
    2
      libs/postgresql/Makefile

+ 18
- 2
libs/postgresql/Makefile Parādīt failu

42
 define Package/pgsql-cli
42
 define Package/pgsql-cli
43
   SECTION:=utils
43
   SECTION:=utils
44
   CATEGORY:=Utilities
44
   CATEGORY:=Utilities
45
-  DEPENDS:=+libpq
45
+  DEPENDS:=+libpq @USE_UCLIBC:+librt
46
   TITLE:=Command Line Interface (CLI) to PostgreSQL databases
46
   TITLE:=Command Line Interface (CLI) to PostgreSQL databases
47
   URL:=http://www.postgresql.org/
47
   URL:=http://www.postgresql.org/
48
   SUBMENU:=database
48
   SUBMENU:=database
55
 define Package/pgsql-server
55
 define Package/pgsql-server
56
   SECTION:=utils
56
   SECTION:=utils
57
   CATEGORY:=Utilities
57
   CATEGORY:=Utilities
58
-  DEPENDS:=+libpq
58
+  DEPENDS:=+libpq @USE_UCLIBC:+librt
59
   TITLE:=PostgreSQL databases Server
59
   TITLE:=PostgreSQL databases Server
60
   URL:=http://www.postgresql.org/
60
   URL:=http://www.postgresql.org/
61
   SUBMENU:=database
61
   SUBMENU:=database
66
 PostgreSQL databases Server.
66
 PostgreSQL databases Server.
67
 endef
67
 endef
68
 
68
 
69
+PGSQL_CONFIG_VARS:= \
70
+	pgac_cv_snprintf_long_long_int_format="%lld" \
71
+	pgac_cv_snprintf_size_t_support=yes
72
+
73
+ifeq ($(CONFIG_USE_UCLIBC),y)
74
+# PostgreSQL does not build against uClibc with locales
75
+# enabled, due to an uClibc bug, see
76
+# http://lists.uclibc.org/pipermail/uclibc/2014-April/048326.html
77
+# so overwrite automatic detection and disable locale support
78
+PGSQL_CONFIG_VARS+= \
79
+		pgac_cv_type_locale_t=no
80
+endif
81
+
82
+TARGET_CONFIGURE_OPTS+=$(PGSQL_CONFIG_VARS)
83
+
69
 # Need a native ecpg ,pg_config, and zic for build
84
 # Need a native ecpg ,pg_config, and zic for build
70
 define Build/Configure
85
 define Build/Configure
71
 	(cd $(PKG_BUILD_DIR); rm -f config.cache; \
86
 	(cd $(PKG_BUILD_DIR); rm -f config.cache; \
87
+		$(PGSQL_CONFIG_VARS) \
72
 		./configure \
88
 		./configure \
73
 			--prefix=/usr \
89
 			--prefix=/usr \
74
 			--exec-prefix=/usr \
90
 			--exec-prefix=/usr \