diff options
author | bsam <bsam@FreeBSD.org> | 2011-02-11 13:34:20 +0800 |
---|---|---|
committer | bsam <bsam@FreeBSD.org> | 2011-02-11 13:34:20 +0800 |
commit | 6cdb17e269feb8ef370ae5addfe2163e2048d250 (patch) | |
tree | b04d31b480ae0677449e3d4f11d743ed2bcbc9c4 /comms/gammu/files | |
parent | 30759b2724243f74b8a30b719206c47204a42528 (diff) | |
download | freebsd-ports-gnome-6cdb17e269feb8ef370ae5addfe2163e2048d250.tar.gz freebsd-ports-gnome-6cdb17e269feb8ef370ae5addfe2163e2048d250.tar.zst freebsd-ports-gnome-6cdb17e269feb8ef370ae5addfe2163e2048d250.zip |
Add following meta-variables:
. USE_GNOME=glib20 (yea, it's needed now, *sigh*);
. USE_PYTHON=yes (so do python, comms/gammu-python is redundant now);
. USE_GETTEXT=yes.
Remove:
. USE_GNOME=pkgconfig (superseeded by USE_GNOME=glib20).
Diffstat (limited to 'comms/gammu/files')
-rw-r--r-- | comms/gammu/files/patch-daylight.diff | 86 | ||||
-rw-r--r-- | comms/gammu/files/patch-glibc-1.diff | 108 | ||||
-rw-r--r-- | comms/gammu/files/patch-glibc-2.diff | 43 | ||||
-rw-r--r-- | comms/gammu/files/patch-include_gammu-datetime.h | 17 |
4 files changed, 237 insertions, 17 deletions
diff --git a/comms/gammu/files/patch-daylight.diff b/comms/gammu/files/patch-daylight.diff new file mode 100644 index 000000000000..92edf91fd63e --- /dev/null +++ b/comms/gammu/files/patch-daylight.diff @@ -0,0 +1,86 @@ +From 3b18e8d86c2840df2c1d5b94760f7f9a98bacd6d Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Michal=20=C4=8Ciha=C5=99?= <mcihar@novell.com> +Date: Fri, 28 Jan 2011 13:51:21 +0100 +Subject: [PATCH] Check for daylight variable and use it only if available. + +--- + CMakeLists.txt | 10 ++++++++++ + cmake/templates/gammu-config.h.cmake | 7 +++++++ + libgammu/misc/misc.c | 4 ++++ + smsd/services/sql.c | 4 ++++ + 4 files changed, 25 insertions(+), 0 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3460c1c..899ad86 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -295,6 +295,16 @@ int main(void) { + " HAVE_STRUCT_TM_TM_ZONE) + + check_c_source_compiles (" ++#include <time.h> ++ ++int main(void) { ++ struct tm tm; ++ tm.tm_isdst = daylight; ++ return 0; ++} ++" HAVE_DAYLIGHT) ++ ++check_c_source_compiles (" + #include <stdio.h> + + int main(void) { +diff --git a/cmake/templates/gammu-config.h.cmake b/cmake/templates/gammu-config.h.cmake +index 7c106ab..9a91aa0 100644 +--- cmake/templates/gammu-config.h.cmake ++++ cmake/templates/gammu-config.h.cmake +@@ -325,6 +325,13 @@ + #endif + + /** ++ * daylight variable ++ */ ++#ifndef HAVE_DAYLIGHT ++#cmakedefine HAVE_DAYLIGHT ++#endif ++ ++/** + * __FUNC__ support + */ + #cmakedefine HAVE_MACRO_FUNC +diff --git a/libgammu/misc/misc.c b/libgammu/misc/misc.c +index 03d7687..9e1e96b 100644 +--- libgammu/misc/misc.c ++++ libgammu/misc/misc.c +@@ -194,7 +194,11 @@ time_t Fill_Time_T(GSM_DateTime DT) + + tzset(); + ++#ifdef HAVE_DAYLIGHT + tm_starttime.tm_isdst = daylight; ++#else ++ tm_starttime.tm_isdst = -1; ++#endif + #ifdef HAVE_STRUCT_TM_TM_ZONE + /* No time zone information */ + tm_starttime.tm_gmtoff = timezone; +diff --git a/smsd/services/sql.c b/smsd/services/sql.c +index f10cd14..909dc4d 100644 +--- smsd/services/sql.c ++++ smsd/services/sql.c +@@ -1186,7 +1186,11 @@ time_t SMSDSQL_ParseDate(GSM_SMSDConfig * Config, const char *date) + + tzset(); + ++#ifdef HAVE_DAYLIGHT + timestruct.tm_isdst = daylight; ++#else ++ timestruct.tm_isdst = -1; ++#endif + #ifdef HAVE_STRUCT_TM_TM_ZONE + /* No time zone information */ + timestruct.tm_gmtoff = timezone; +-- +1.6.1 + diff --git a/comms/gammu/files/patch-glibc-1.diff b/comms/gammu/files/patch-glibc-1.diff new file mode 100644 index 000000000000..bb828cf3b838 --- /dev/null +++ b/comms/gammu/files/patch-glibc-1.diff @@ -0,0 +1,108 @@ +From 4ab7023f615686f61d804bd5a90f5bb68b1b4fdc Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Michal=20=C4=8Ciha=C5=99?= <mcihar@novell.com> +Date: Fri, 28 Jan 2011 14:52:09 +0100 +Subject: [PATCH] Improve searching for glib/gobject. + +--- + cmake/FindGlib.cmake | 36 +++++++++++++++++++++++++++++++----- + cmake/FindGobject.cmake | 34 +++++++++++++++++++++++++++------- + 2 files changed, 58 insertions(+), 12 deletions(-) + +diff --git a/cmake/FindGlib.cmake b/cmake/FindGlib.cmake +index 1a75a93..9bdee14 100644 +--- cmake/FindGlib.cmake ++++ cmake/FindGlib.cmake +@@ -1,7 +1,24 @@ +-pkg_check_modules(GLIB glib-2.0) ++pkg_check_modules(GLIB_PKG glib-2.0) + +-# Find Glib even if pkg-config is not working (eg. cross compiling to Windows) +-if (NOT GLIB_FOUND) ++if (GLIB_PKG_FOUND) ++ find_path(GLIB_INCLUDE_DIR NAMES glib.h PATH_SUFFIXES glib-2.0 ++ PATHS ++ ${GLIB_PKG_INCLUDE_DIRS} ++ /usr/include/glib-2.0 ++ /usr/include ++ /usr/local/include ++ ) ++ find_path(GLIB_CONFIG_INCLUDE_DIR NAMES glibconfig.h PATHS ${GLIB_PKG_LIBDIR} PATH_SUFFIXES glib-2.0/include) ++ ++ find_library(GLIB_LIBRARIES NAMES glib-2.0 ++ PATHS ++ ${GLIB_PKG_LIBRARY_DIRS} ++ /usr/lib ++ /usr/local/lib ++ ) ++ ++else (GLIB_PKG_FOUND) ++ # Find Glib even if pkg-config is not working (eg. cross compiling to Windows) + find_library(GLIB_LIBRARIES NAMES glib-2.0) + string (REGEX REPLACE "/[^/]*$" "" GLIB_LIBRARIES_DIR ${GLIB_LIBRARIES}) + +@@ -9,7 +26,16 @@ if (NOT GLIB_FOUND) + find_path(GLIB_CONFIG_INCLUDE_DIR NAMES glibconfig.h PATHS ${GLIB_LIBRARIES_DIR} PATH_SUFFIXES glib-2.0/include) + + if (GLIB_INCLUDE_DIR AND GLIB_CONFIG_INCLUDE_DIR AND GLIB_LIBRARIES) +- set(GLIB_FOUND TRUE) + set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIB_CONFIG_INCLUDE_DIR}) + endif (GLIB_INCLUDE_DIR AND GLIB_CONFIG_INCLUDE_DIR AND GLIB_LIBRARIES) +-endif (NOT GLIB_FOUND) ++endif (GLIB_PKG_FOUND) ++ ++if(GLIB_INCLUDE_DIR AND GLIB_LIBRARIES) ++ set(GLIB_FOUND TRUE CACHE INTERNAL "glib-2.0 found") ++ message(STATUS "Found glib-2.0: ${GLIB_INCLUDE_DIR}, ${GLIB_LIBRARIES}") ++else(GLIB_INCLUDE_DIR AND GLIB_LIBRARIES) ++ set(GLIB_FOUND FALSE CACHE INTERNAL "glib-2.0 found") ++ message(STATUS "glib-2.0 not found.") ++endif(GLIB_INCLUDE_DIR AND GLIB_LIBRARIES) ++ ++mark_as_advanced(GLIB_INCLUDE_DIR GLIB_LIBRARIES) +diff --git a/cmake/FindGobject.cmake b/cmake/FindGobject.cmake +index 5312be7..586c8a2 100644 +--- cmake/FindGobject.cmake ++++ cmake/FindGobject.cmake +@@ -1,12 +1,32 @@ +-pkg_check_modules(GOBJECT gobject-2.0) ++pkg_check_modules(GOBJECT_PKG gobject-2.0) + +-# Find Gobject even if pkg-config is not working (eg. cross compiling to Windows) +-if (NOT GOBJECT_FOUND) ++if (GOBJECT_PKG_FOUND) ++ find_path(GOBJECT_INCLUDE_DIR NAMES glib-object.h PATH_SUFFIXES glib-2.0 ++ PATHS ++ ${GOBJECT_PKG_INCLUDE_DIRS} ++ /usr/include/glib-2.0 ++ /usr/include ++ /usr/local/include ++ ) ++ find_library(GOBJECT_LIBRARIES NAMES gobject-2.0 ++ PATHS ++ ${GOBJECT_PKG_LIBRARY_DIRS} ++ /usr/lib ++ /usr/local/lib ++ ) ++else (GOBJECT_PKG_FOUND) ++ # Find Gobject even if pkg-config is not working (eg. cross compiling to Windows) + find_path(GOBJECT_INCLUDE_DIRS NAMES glib-object.h PATH_SUFFIXES glib-2.0) + + find_library(GOBJECT_LIBRARIES NAMES gobject-2.0) +- if (GOBJECT_INCLUDE_DIRS AND GOBJECT_LIBRARIES) +- set(GOBJECT_FOUND TRUE) +- endif (GOBJECT_INCLUDE_DIRS AND GOBJECT_LIBRARIES) +-endif (NOT GOBJECT_FOUND) ++endif (GOBJECT_PKG_FOUND) + ++if(GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES) ++ set(GOBJECT_FOUND TRUE CACHE INTERNAL "gobject-2.0 found") ++ message(STATUS "Found gobject-2.0: ${GOBJECT_INCLUDE_DIR}, ${GOBJECT_LIBRARIES}") ++else(GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES) ++ set(GOBJECT_FOUND FALSE CACHE INTERNAL "gobject-2.0 found") ++ message(STATUS "gobject-2.0 not found.") ++endif(GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES) ++ ++mark_as_advanced(GOBJECT_INCLUDE_DIR GOBJECT_LIBRARIES) +-- +1.6.1 + diff --git a/comms/gammu/files/patch-glibc-2.diff b/comms/gammu/files/patch-glibc-2.diff new file mode 100644 index 000000000000..ac9357290d35 --- /dev/null +++ b/comms/gammu/files/patch-glibc-2.diff @@ -0,0 +1,43 @@ +From 9d71b23a73186aad73453973e05a94fb36e16f4f Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Michal=20=C4=8Ciha=C5=99?= <mcihar@novell.com> +Date: Fri, 28 Jan 2011 16:08:32 +0100 +Subject: [PATCH] Properly handle need for two include dirs for glib. + +The second use is used for glibconfig.h. +--- + cmake/FindGlib.cmake | 15 ++++++++------- + 1 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/cmake/FindGlib.cmake b/cmake/FindGlib.cmake +index 9bdee14..f1986c9 100644 +--- cmake/FindGlib.cmake ++++ cmake/FindGlib.cmake +@@ -25,17 +25,18 @@ else (GLIB_PKG_FOUND) + find_path(GLIB_INCLUDE_DIR NAMES glib.h PATH_SUFFIXES glib-2.0) + find_path(GLIB_CONFIG_INCLUDE_DIR NAMES glibconfig.h PATHS ${GLIB_LIBRARIES_DIR} PATH_SUFFIXES glib-2.0/include) + +- if (GLIB_INCLUDE_DIR AND GLIB_CONFIG_INCLUDE_DIR AND GLIB_LIBRARIES) +- set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIB_CONFIG_INCLUDE_DIR}) +- endif (GLIB_INCLUDE_DIR AND GLIB_CONFIG_INCLUDE_DIR AND GLIB_LIBRARIES) + endif (GLIB_PKG_FOUND) + +-if(GLIB_INCLUDE_DIR AND GLIB_LIBRARIES) ++if (GLIB_INCLUDE_DIR AND GLIB_CONFIG_INCLUDE_DIR AND GLIB_LIBRARIES) ++ set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIB_CONFIG_INCLUDE_DIR}) ++endif (GLIB_INCLUDE_DIR AND GLIB_CONFIG_INCLUDE_DIR AND GLIB_LIBRARIES) ++ ++if(GLIB_INCLUDE_DIRS AND GLIB_LIBRARIES) + set(GLIB_FOUND TRUE CACHE INTERNAL "glib-2.0 found") + message(STATUS "Found glib-2.0: ${GLIB_INCLUDE_DIR}, ${GLIB_LIBRARIES}") +-else(GLIB_INCLUDE_DIR AND GLIB_LIBRARIES) ++else(GLIB_INCLUDE_DIRS AND GLIB_LIBRARIES) + set(GLIB_FOUND FALSE CACHE INTERNAL "glib-2.0 found") + message(STATUS "glib-2.0 not found.") +-endif(GLIB_INCLUDE_DIR AND GLIB_LIBRARIES) ++endif(GLIB_INCLUDE_DIRS AND GLIB_LIBRARIES) + +-mark_as_advanced(GLIB_INCLUDE_DIR GLIB_LIBRARIES) ++mark_as_advanced(GLIB_INCLUDE_DIR GLIB_CONFIG_INCLUDE_DIR GLIB_INCLUDE_DIRS GLIB_LIBRARIES) +-- +1.6.1 + diff --git a/comms/gammu/files/patch-include_gammu-datetime.h b/comms/gammu/files/patch-include_gammu-datetime.h deleted file mode 100644 index 04ebe69ce8b5..000000000000 --- a/comms/gammu/files/patch-include_gammu-datetime.h +++ /dev/null @@ -1,17 +0,0 @@ ---- include/gammu-datetime.h.orig 2011-01-19 10:33:05.000000000 +0300 -+++ include/gammu-datetime.h 2011-01-28 14:00:45.206537651 +0300 -@@ -17,6 +17,14 @@ - #include <gammu-statemachine.h> - - /** -+ * Checkup if the XSI POSIX extension, daylight, is not -+ * declared in <time.h> -+ */ -+#ifndef daylight -+#define daylight 0 -+#endif -+ -+/** - * Structure used for saving date and time - * - * \ingroup DateTime |