1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

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).
This commit is contained in:
Boris Samorodov 2011-02-11 05:34:20 +00:00
parent bb9ca859eb
commit 3809128869
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=268911
6 changed files with 324 additions and 50 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= gammu
PORTVERSION= 1.29.0
PORTREVISION= 1
CATEGORIES= comms
MASTER_SITES= http://dl.cihar.com/gammu/releases/ \
http://dl.cihar.com.nyud.net/gammu/releases/
@ -21,14 +22,9 @@ CONFLICTS= gammu-devel-[1-9]* gammu-python-[1-9]*
CMAKE_ARGS+= -DINSTALL_LIBDATA_DIR=${LOCALBASE}/libdata
USE_CMAKE= yes
USE_GNOME= pkgconfig
.if defined(WITH_PYTHON_GAMMU)
USE_PYTHON= YES
PLIST_SUB= WITH_PYTHON_GAMMU=""
.else
PLIST_SUB= WITH_PYTHON_GAMMU="@comment "
.endif
USE_PYTHON= yes
USE_GETTEXT= yes
USE_GNOME= glib20
PORTDOCS= *
@ -45,12 +41,10 @@ MAN7= gammu-smsd-files.7 gammu-smsd-mysql.7 gammu-smsd-pgsql.7 \
.endif
.if defined(WITH_PYTHON_GAMMU)
post-install:
.for opt in -Qold -O
${PYTHON_CMD} ${opt} -m compileall -l ${PYTHONPREFIX_SITELIBDIR}/gammu
.endfor
.endif
.include <bsd.port.pre.mk>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -36,27 +36,87 @@ lib/libGammu.a
lib/libgsmsd.a
libdata/pkgconfig/gammu.pc
libdata/pkgconfig/gammu-smsd.pc
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/__init__.py
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/__init__.pyc
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/__init__.pyo
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/_gammu.so
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Data.py
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Data.pyc
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Data.pyo
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Worker.py
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Worker.pyc
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/Worker.pyo
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/data.py
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/data.pyc
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/data.pyo
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/exception.py
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/exception.pyc
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/exception.pyo
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/smsd.py
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/smsd.pyc
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/smsd.pyo
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/worker.py
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/worker.pyc
%%WITH_PYTHON_GAMMU%%%%PYTHON_SITELIBDIR%%/gammu/worker.pyo
share/locale/af/LC_MESSAGES/gammu.mo
share/locale/af/LC_MESSAGES/libgammu.mo
share/locale/ar/LC_MESSAGES/gammu.mo
share/locale/ar/LC_MESSAGES/libgammu.mo
share/locale/bg/LC_MESSAGES/gammu.mo
share/locale/bg/LC_MESSAGES/libgammu.mo
share/locale/ca/LC_MESSAGES/gammu.mo
share/locale/ca/LC_MESSAGES/libgammu.mo
share/locale/cs/LC_MESSAGES/gammu.mo
share/locale/cs/LC_MESSAGES/libgammu.mo
share/locale/da/LC_MESSAGES/gammu.mo
share/locale/da/LC_MESSAGES/libgammu.mo
share/locale/de/LC_MESSAGES/gammu.mo
share/locale/de/LC_MESSAGES/libgammu.mo
share/locale/el/LC_MESSAGES/gammu.mo
share/locale/el/LC_MESSAGES/libgammu.mo
share/locale/en_GB/LC_MESSAGES/gammu.mo
share/locale/en_GB/LC_MESSAGES/libgammu.mo
share/locale/es/LC_MESSAGES/gammu.mo
share/locale/es/LC_MESSAGES/libgammu.mo
share/locale/et/LC_MESSAGES/gammu.mo
share/locale/et/LC_MESSAGES/libgammu.mo
share/locale/fi/LC_MESSAGES/gammu.mo
share/locale/fi/LC_MESSAGES/libgammu.mo
share/locale/fr/LC_MESSAGES/gammu.mo
share/locale/fr/LC_MESSAGES/libgammu.mo
share/locale/gl/LC_MESSAGES/gammu.mo
share/locale/gl/LC_MESSAGES/libgammu.mo
share/locale/he/LC_MESSAGES/gammu.mo
share/locale/he/LC_MESSAGES/libgammu.mo
share/locale/hu/LC_MESSAGES/gammu.mo
share/locale/hu/LC_MESSAGES/libgammu.mo
share/locale/id/LC_MESSAGES/gammu.mo
share/locale/id/LC_MESSAGES/libgammu.mo
share/locale/it/LC_MESSAGES/gammu.mo
share/locale/it/LC_MESSAGES/libgammu.mo
share/locale/ko/LC_MESSAGES/gammu.mo
share/locale/ko/LC_MESSAGES/libgammu.mo
share/locale/nl/LC_MESSAGES/gammu.mo
share/locale/nl/LC_MESSAGES/libgammu.mo
share/locale/pl/LC_MESSAGES/gammu.mo
share/locale/pl/LC_MESSAGES/libgammu.mo
share/locale/pt_BR/LC_MESSAGES/gammu.mo
share/locale/pt_BR/LC_MESSAGES/libgammu.mo
share/locale/ru/LC_MESSAGES/gammu.mo
share/locale/ru/LC_MESSAGES/libgammu.mo
share/locale/sk/LC_MESSAGES/gammu.mo
share/locale/sk/LC_MESSAGES/libgammu.mo
share/locale/sv/LC_MESSAGES/gammu.mo
share/locale/sv/LC_MESSAGES/libgammu.mo
share/locale/sw/LC_MESSAGES/gammu.mo
share/locale/sw/LC_MESSAGES/libgammu.mo
share/locale/tr/LC_MESSAGES/gammu.mo
share/locale/tr/LC_MESSAGES/libgammu.mo
share/locale/zh_CN/LC_MESSAGES/gammu.mo
share/locale/zh_CN/LC_MESSAGES/libgammu.mo
share/locale/zh_TW/LC_MESSAGES/gammu.mo
share/locale/zh_TW/LC_MESSAGES/libgammu.mo
%%PYTHON_SITELIBDIR%%/gammu/__init__.py
%%PYTHON_SITELIBDIR%%/gammu/__init__.pyc
%%PYTHON_SITELIBDIR%%/gammu/__init__.pyo
%%PYTHON_SITELIBDIR%%/gammu/_gammu.so
%%PYTHON_SITELIBDIR%%/gammu/Data.py
%%PYTHON_SITELIBDIR%%/gammu/Data.pyc
%%PYTHON_SITELIBDIR%%/gammu/Data.pyo
%%PYTHON_SITELIBDIR%%/gammu/Worker.py
%%PYTHON_SITELIBDIR%%/gammu/Worker.pyc
%%PYTHON_SITELIBDIR%%/gammu/Worker.pyo
%%PYTHON_SITELIBDIR%%/gammu/data.py
%%PYTHON_SITELIBDIR%%/gammu/data.pyc
%%PYTHON_SITELIBDIR%%/gammu/data.pyo
%%PYTHON_SITELIBDIR%%/gammu/exception.py
%%PYTHON_SITELIBDIR%%/gammu/exception.pyc
%%PYTHON_SITELIBDIR%%/gammu/exception.pyo
%%PYTHON_SITELIBDIR%%/gammu/smsd.py
%%PYTHON_SITELIBDIR%%/gammu/smsd.pyc
%%PYTHON_SITELIBDIR%%/gammu/smsd.pyo
%%PYTHON_SITELIBDIR%%/gammu/worker.py
%%PYTHON_SITELIBDIR%%/gammu/worker.pyc
%%PYTHON_SITELIBDIR%%/gammu/worker.pyo
@dirrmtry share/locale/sw/LC_MESSAGES
@dirrmtry share/locale/sw
@dirrm include/gammu
%%WITH_PYTHON_GAMMU%%@dirrm %%PYTHON_SITELIBDIR%%/gammu
@dirrm %%PYTHON_SITELIBDIR%%/gammu