Ticket #7649: gammu.patch

File gammu.patch, 5.2 KB (added by x029ah@…, 6 years ago)
  • gammu/Makefile

    diff -Naur utils.orig/gammu/Makefile utils/gammu/Makefile
    old new  
     1# 
     2# Copyright (C) 2006-2009 OpenWrt.org 
     3# 
     4# This is free software, licensed under the GNU General Public License v2. 
     5# See /LICENSE for more information. 
     6# 
     7 
     8include $(TOPDIR)/rules.mk 
     9 
     10PKG_NAME:=gammu 
     11PKG_VERSION:=1.28.0 
     12PKG_RELEASE:=1 
     13 
     14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
     15PKG_SOURCE_URL:=http://dl.cihar.com/gammu/releases/ 
     16PKG_MD5SUM:=1cddf45348b0c8cebcc14c9e693c6c9a 
     17PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
     18PKG_CAT:=bzcat 
     19 
     20include $(INCLUDE_DIR)/package.mk 
     21$(call include_mk) 
     22 
     23define Package/gammu 
     24        SECTION:=utils 
     25        CATEGORY:=Utilities 
     26        TITLE:=Command line utility which you can use to control your cellphone 
     27        URL:=http://dl.cihar.com//gammu/releases/ 
     28        DEPENDS:=+libpthread 
     29endef 
     30 
     31define Build/Configure 
     32        (cd $(PKG_BUILD_DIR); \ 
     33                $(TARGET_CONFIGURE_OPTS) \ 
     34                CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \ 
     35                UNAME_S="Linux" \ 
     36                ./configure \ 
     37                        --prefix=/usr \ 
     38                        --enable-shared \ 
     39                        --disable-iconv \ 
     40        ); 
     41endef 
     42 
     43define Build/Compile 
     44        $(MAKE) -C $(PKG_BUILD_DIR) \ 
     45                $(TARGET_CONFIGURE_OPTS) \ 
     46                LDSHARED="$(TARGET_CROSS)ld -shared" \ 
     47                CFLAGS="$(TARGET_CFLAGS) $(FPIC)" 
     48        $(MAKE) -C $(PKG_BUILD_DIR) \ 
     49                DESTDIR="$(PKG_INSTALL_DIR)" \ 
     50                install 
     51endef 
     52 
     53define Build/InstallDev 
     54        mkdir -p $(1)/usr/include 
     55        $(CP) -r $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/ 
     56        mkdir -p $(1)/usr/lib 
     57        $(CP)    $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib/ 
     58endef 
     59 
     60define Package/gammu/install 
     61        $(INSTALL_DIR) $(1)/usr/bin 
     62        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin 
     63        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu-{config,smsd,smsd-inject,smsd-monitor} $(1)/usr/bin 
     64        $(INSTALL_DIR) $(1)/usr/lib 
     65        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib 
     66endef 
     67 
     68$(eval $(call BuildPackage,gammu)) 
  • gammu/patches/001-iconv-disabling-option.patch

    diff -Naur utils.orig/gammu/patches/001-iconv-disabling-option.patch utils/gammu/patches/001-iconv-disabling-option.patch
    old new  
     1diff -Naur gammu-1.28.0.orig/cmake/FindIconv.cmake gammu-1.28.0/cmake/FindIconv.cmake 
     2--- gammu-1.28.0.orig/cmake/FindIconv.cmake     2010-07-15 00:30:14.000000000 +0400 
     3+++ gammu-1.28.0/cmake/FindIconv.cmake  2010-07-15 00:36:58.000000000 +0400 
     4@@ -18,9 +18,9 @@ 
     5   
     6 FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c) 
     7   
     8-IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)  
     9+IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)  
     10    SET(ICONV_FOUND TRUE)  
     11-ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)  
     12+ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)  
     13  
     14 set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) 
     15 set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) 
     16diff -Naur gammu-1.28.0.orig/configure gammu-1.28.0/configure 
     17--- gammu-1.28.0.orig/configure 2010-07-15 00:30:14.000000000 +0400 
     18+++ gammu-1.28.0/configure      2010-07-15 00:32:08.000000000 +0400 
     19@@ -30,6 +30,7 @@ 
     20 --enable-backup     enable backup support 
     21 --enable-win32      enable mingw crosscomilation 
     22 --enable-protection enable compile time protections 
     23+--disable-iconv     disable iconv support 
     24 --with-python=<path> path to Python interpreter 
     25 --without-gnapplet  disable installation of gnapplet 
     26  
     27@@ -54,6 +55,7 @@ 
     28 CMAKE_PROTECTION= 
     29 CMAKE_PYTHON= 
     30 CMAKE_GNAP= 
     31+CMAKE_ICONV= 
     32  
     33 # process command line 
     34 while [ "$#" -gt 0 ] ; do 
     35@@ -91,6 +93,12 @@ 
     36         --disable-protection) 
     37             CMAKE_PROTECTION="-DENABLE_PROTECTION=OFF" 
     38             ;; 
     39+        --enable-iconv) 
     40+            CMAKE_ICONV="-DDISABLE_ICONV=OFF" 
     41+            ;; 
     42+        --disable-iconv) 
     43+            CMAKE_ICONV="-DDISABLE_ICONV=ON" 
     44+            ;; 
     45         --enable-debug) 
     46             CMAKE_DEBUG="-DCMAKE_BUILD_TYPE=Debug" 
     47             ;; 
     48@@ -136,4 +144,4 @@ 
     49 cd "$BUILD_DIR" 
     50  
     51 # invoke cmake to do configuration 
     52-cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP 
     53+cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_ICONV 
  • gammu/patches/002-no-fstack-protector.patch

    diff -Naur utils.orig/gammu/patches/002-no-fstack-protector.patch utils/gammu/patches/002-no-fstack-protector.patch
    old new  
     1diff -Naur gammu-1.28.0.orig/CMakeLists.txt gammu-1.28.0/CMakeLists.txt 
     2--- gammu-1.28.0.orig/CMakeLists.txt    2010-07-15 00:30:14.000000000 +0400 
     3+++ gammu-1.28.0/CMakeLists.txt 2010-07-15 00:39:22.000000000 +0400 
     4@@ -506,8 +506,6 @@ 
     5         #    MACRO_TUNE_LINKER("-pie") 
     6         # These do not work on Windows right now 
     7         if (NOT WIN32) 
     8-            # Stack protector 
     9-            MACRO_TUNE_COMPILER("-fstack-protector") 
     10             # Mark code read only 
     11             MACRO_TUNE_LINKER("-Wl,-zrelro") 
     12         endif (NOT WIN32)