From 1678fe0d93e50e158710c463f5ec79df38d8e382 Mon Sep 17 00:00:00 2001
From: Veniamin Gvozdikov <g.veniamin@googlemail.com>
Date: Sat, 18 May 2013 11:33:08 +0400
Subject: [PATCH] fixed build with gettext [FreeBSD]: fixed static build
 [FreeBSD]: upgraded port [FreeBSD]: added iconv and intl only for freebsd

---
 FreeBSD/databases/tarantool/distinfo          |  4 +-
 .../files/patch-doc_man_CMakeLists.txt        | 12 -----
 .../databases/tarantool/files/pkg-message.in  |  7 ++-
 .../databases/tarantool/files/tarantool.in    |  2 +-
 FreeBSD/databases/tarantool/pkg-descr         |  2 +-
 FreeBSD/databases/tarantool/pkg-plist         | 53 ++++++++++---------
 src/CMakeLists.txt                            |  7 +++
 7 files changed, 43 insertions(+), 44 deletions(-)
 delete mode 100644 FreeBSD/databases/tarantool/files/patch-doc_man_CMakeLists.txt

diff --git a/FreeBSD/databases/tarantool/distinfo b/FreeBSD/databases/tarantool/distinfo
index 888da48635..4ff5f33476 100644
--- a/FreeBSD/databases/tarantool/distinfo
+++ b/FreeBSD/databases/tarantool/distinfo
@@ -1,2 +1,2 @@
-SHA256 (tarantool-1.4.7-32-ga313988-src.tar.gz) = 3ebbf896671da275f27b48d2ce968d310de7663dfb9780c70bab0b003debb88b
-SIZE (tarantool-1.4.7-32-ga313988-src.tar.gz) = 2168920
+SHA256 (tarantool-1.4.9-45-g2f7b3f9-src.tar.gz) = 45c37824c0f2cef8746523347ba727ced98e8c21eec17e11729d6ff38d1f7bbd
+SIZE (tarantool-1.4.9-45-g2f7b3f9-src.tar.gz) = 2772012
diff --git a/FreeBSD/databases/tarantool/files/patch-doc_man_CMakeLists.txt b/FreeBSD/databases/tarantool/files/patch-doc_man_CMakeLists.txt
deleted file mode 100644
index 6a1975aa12..0000000000
--- a/FreeBSD/databases/tarantool/files/patch-doc_man_CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
---- doc/man/CMakeLists.txt.orig	2012-07-27 19:39:47.550688521 +0400
-+++ doc/man/CMakeLists.txt	2012-07-27 19:39:59.834015592 +0400
-@@ -5,7 +5,7 @@ add_custom_target(man ALL
- 	    ${CMAKE_SOURCE_DIR}/doc/man/tarantool.pod > ${PROJECT_BINARY_DIR}/doc/man/tarantool.1
-     )
- 
--install(FILES ${PROJECT_BINARY_DIR}/doc/man/tarantool_box.1 DESTINATION "${CMAKE_MAN_DIR}")
-+install(FILES ${PROJECT_BINARY_DIR}/doc/man/tarantool_box.1 DESTINATION "${CMAKE_MAN_DIR}/man1")
- if (ENABLE_CLIENT)
--    install(FILES ${PROJECT_BINARY_DIR}/doc/man/tarantool.1 DESTINATION "${CMAKE_MAN_DIR}")
-+    install(FILES ${PROJECT_BINARY_DIR}/doc/man/tarantool.1 DESTINATION "${CMAKE_MAN_DIR}/man1")
- endif()
diff --git a/FreeBSD/databases/tarantool/files/pkg-message.in b/FreeBSD/databases/tarantool/files/pkg-message.in
index 19fb145981..fa50213a37 100644
--- a/FreeBSD/databases/tarantool/files/pkg-message.in
+++ b/FreeBSD/databases/tarantool/files/pkg-message.in
@@ -1,10 +1,13 @@
 #########################################################
 #
 #
-#        After install you'll need init storage:
+#        After install you'll need:
 #
+#    Edit example config:
+#    %%ETCDIR%%/tarantool.cfg.sample
+#    Init storage:
 #    %%PREFIX%%/bin/tarantool_box --init-storage \
-#    	-c %%ETCDIR%%/tarantool.cfg
+#      -c %%ETCDIR%%/tarantool.cfg
 #
 #
 #########################################################
diff --git a/FreeBSD/databases/tarantool/files/tarantool.in b/FreeBSD/databases/tarantool/files/tarantool.in
index 9aeea0936a..993869385d 100755
--- a/FreeBSD/databases/tarantool/files/tarantool.in
+++ b/FreeBSD/databases/tarantool/files/tarantool.in
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD: ports/databases/tarantool/files/tarantool.in,v 1.2 2012/01/14 08:55:33 dougb Exp $
+# $FreeBSD: databases/tarantool/files/tarantool.in 308708 2012-12-11 20:00:36Z rm $
 
 # PROVIDE: tarantool
 # REQUIRE: LOGIN
diff --git a/FreeBSD/databases/tarantool/pkg-descr b/FreeBSD/databases/tarantool/pkg-descr
index 720806dee1..5aa8eae509 100644
--- a/FreeBSD/databases/tarantool/pkg-descr
+++ b/FreeBSD/databases/tarantool/pkg-descr
@@ -2,4 +2,4 @@ Tarantool/Box, or simply Tarantool, is a high performance key/value
 storage server. The code is available for free under the terms of
 BSD license. Supported platforms are GNU/Linux and FreeBSD.
 
-WWW:	http://tarantool.org/
+WWW: http://tarantool.org/
diff --git a/FreeBSD/databases/tarantool/pkg-plist b/FreeBSD/databases/tarantool/pkg-plist
index b7a6d88c79..6ec1d5d2f1 100644
--- a/FreeBSD/databases/tarantool/pkg-plist
+++ b/FreeBSD/databases/tarantool/pkg-plist
@@ -1,33 +1,36 @@
-include/tarantool/tnt_queue.h
-include/tarantool/tnt_utf8.h
-include/tarantool/tnt_mem.h
-include/tarantool/tnt_tuple.h
-include/tarantool/tnt_update.h
-include/tarantool/tnt_insert.h
-include/tarantool/tnt_opt.h
-include/tarantool/tnt_call.h
-include/tarantool/tnt_xlog.h
-include/tarantool/tnt_iter.h
+bin/tarantool_box
+bin/tarantool_checksum
+%%CLIENT%%bin/tarantool
+etc/tarantool.cfg.sample
+include/tarantool/tnt.h
 include/tarantool/tnt_buf.h
+include/tarantool/tnt_call.h
+include/tarantool/tnt_delete.h
+include/tarantool/tnt_dir.h
+include/tarantool/tnt_enc.h
+include/tarantool/tnt_insert.h
 include/tarantool/tnt_io.h
+include/tarantool/tnt_iob.h
+include/tarantool/tnt_iter.h
 include/tarantool/tnt_lex.h
+include/tarantool/tnt_log.h
+include/tarantool/tnt_mem.h
 include/tarantool/tnt_net.h
-include/tarantool/tnt_select.h
-include/tarantool/tnt_proto.h
-include/tarantool/tnt_enc.h
-include/tarantool/tnt_delete.h
-include/tarantool/tnt_sql.h
+include/tarantool/tnt_opt.h
 include/tarantool/tnt_ping.h
-include/tarantool/tnt_stream.h
-include/tarantool/tnt_request.h
+include/tarantool/tnt_proto.h
+include/tarantool/tnt_queue.h
 include/tarantool/tnt_reply.h
+include/tarantool/tnt_request.h
 include/tarantool/tnt_rpl.h
-include/tarantool/tnt_iob.h
-include/tarantool/tnt.h
-var/lib/tarantool/00000000000000000001.snap
-etc/tarantool.cfg
-bin/tarantool_box
-%%CLIENT%%bin/tarantool
+include/tarantool/tnt_select.h
+include/tarantool/tnt_snapshot.h
+include/tarantool/tnt_sql.h
+include/tarantool/tnt_stream.h
+include/tarantool/tnt_tuple.h
+include/tarantool/tnt_update.h
+include/tarantool/tnt_utf8.h
+include/tarantool/tnt_xlog.h
 lib/libtarantoolnet.so.1.1
 lib/libtarantoolrpl.so.1
 lib/libtarantoolnet.a
@@ -44,10 +47,8 @@ lib/libtarantoolsql.so
 lib/libtarantool.so.1.1
 lib/libtarantoolrpl.a
 lib/libtarantool.so
-%%DOCSDIR%%/README
+%%DOCSDIR%%/README.md
 %%DOCSDIR%%/box-protocol.txt
 %%DOCSDIR%%/LICENSE
-@dirrm var/lib/tarantool
-@dirrm var/lib
 @dirrm %%DOCSDIR%%
 @dirrm include/tarantool
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9a3b886393..c15d59babb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -138,6 +138,10 @@ if (TARGET_OS_LINUX OR TARGET_OS_DEBIAN_FREEBSD)
     set (common_libraries ${common_libraries} dl)
 endif()
 
+if (TARGET_OS_FREEBSD)
+    set (common_libraries ${common_libraries} intl)
+endif()
+
 if (ENABLE_BACKTRACE AND HAVE_BFD)
     set (common_libraries ${common_libraries} bfd)
     if (NOT TARGET_OS_DARWIN)
@@ -147,6 +151,9 @@ if (ENABLE_BACKTRACE AND HAVE_BFD)
         include (FindZLIB)
         set (common_libraries ${common_libraries} ${ZLIB_LIBRARIES})
     endif()
+    if (TARGET_OS_FREEBSD)
+        set (common_libraries ${common_libraries} iconv)
+    endif()
 endif()
 
 set (common_libraries ${common_libraries} PARENT_SCOPE)
-- 
GitLab