Browse Source

smstools3: Fix NLS build dependencies, improper CFLAGS overrides and LFLAGS added to MAKE_VARS

Signed-off-by: Ted Hess <thess@kitschensync.net>
Ted Hess 9 years ago
parent
commit
9357d094f3
2 changed files with 18 additions and 16 deletions
  1. 6
    12
      utils/smstools3/Makefile
  2. 12
    4
      utils/smstools3/patches/002-Makefile.patch

+ 6
- 12
utils/smstools3/Makefile View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=smstools3
11 11
 PKG_VERSION:=3.1.15
12
-PKG_RELEASE:=2
12
+PKG_RELEASE:=3
13 13
 
14 14
 PKG_MAINTAINER:=Gérald Kerma <dreagle@doukki.net>
15 15
 PKG_LICENSE:=GPL-2.0
@@ -22,15 +22,15 @@ PKG_SOURCE_URL:=http://smstools3.kekekasvi.com/packages/
22 22
 PKG_MD5SUM:=0241ef60e646fac1a06254a848e61ed7
23 23
 
24 24
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
25
-PKG_BUILD_DEPENDS:=libiconv-full iconv
26 25
 
27 26
 include $(INCLUDE_DIR)/package.mk
27
+include $(INCLUDE_DIR)/nls.mk
28 28
 
29 29
 define Package/smstools3
30 30
   SECTION:=utils
31 31
   CATEGORY:=Utilities
32 32
   TITLE:=SMS Server Tools 3
33
-  DEPENDS:=+libiconv-full +iconv
33
+  DEPENDS:=$(ICONV_DEPENDS)
34 34
   URL:=http://smstools3.kekekasvi.com/
35 35
 endef
36 36
 
@@ -39,23 +39,17 @@ define Package/smstools3/description
39 39
  short messages through GSM modems and mobile phones.
40 40
 endef
41 41
 
42
-TARGET_CFLAGS = -D NUMBER_OF_MODEMS=1
42
+TARGET_CFLAGS += -D NUMBER_OF_MODEMS=1
43 43
 TARGET_CFLAGS += -D USE_ICONV
44 44
 TARGET_CFLAGS += -D DISABLE_INET_SOCKET
45 45
 TARGET_CFLAGS += -W -Wall
46 46
 TARGET_CFLAGS += -D_FILE_OFFSET_BITS=64
47 47
 
48
-TARGET_LDFLAGS += -liconv
48
+MAKE_VARS += LFLAGS="$(TARGET_LDFLAGS) $(if $(ICONV_FULL),-liconv)"
49 49
 
50 50
 BINDIR=/usr/local/bin
51 51
 
52
-define Build/Compile
53
-	$(MAKE) -C "$(PKG_BUILD_DIR)/src" \
54
-		CC="$(TARGET_CC)" \
55
-		CFLAGS='$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS) \
56
-		-I"$(STAGING_DIR)/usr/lib/libiconv-full/include"' \
57
-		LFLAGS='$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS) -L"$(STAGING_DIR)/usr/lib/libiconv-full/lib"' \
58
-		all
52
+define Package/smstools3/configure
59 53
 endef
60 54
 
61 55
 define Package/smstools3/install

+ 12
- 4
utils/smstools3/patches/002-Makefile.patch View File

@@ -1,6 +1,15 @@
1
---- a/src/Makefile	2014-12-20 18:33:55.654252867 +0100
2
-+++ b/src/Makefile	2014-12-20 18:31:10.241359741 +0100
3
-@@ -43,7 +43,7 @@
1
+--- a/src/Makefile
2
++++ b/src/Makefile
3
+@@ -1,7 +1,7 @@
4
+ # In case of windows, use os_cygwin=yes setting in the configuration file (smsd.conf).
5
+ 
6
+ # Select your setup size:
7
+-CFLAGS = -D NUMBER_OF_MODEMS=64
8
++CFLAGS ?= -D NUMBER_OF_MODEMS=64
9
+ 
10
+ # Uncomment for Solaris
11
+ # CFLAGS += -D SOLARIS
12
+@@ -43,7 +43,7 @@ smsd: smsd.c extras.o locking.o cfgfile.
4 13
  
5 14
  ifneq (,$(findstring SOLARIS,$(CFLAGS)))
6 15
  ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS)))
@@ -9,4 +18,3 @@
9 18
  endif
10 19
  endif
11 20
  
12
-