pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Update wip/smstools to 3.1.5, the last version released (in 2012) . Fix build, clean up etc.



Module Name:	pkgsrc-wip
Committed By:	Filip Hajny <filip%joyent.com@localhost>
Pushed By:	fhajny
Date:		Tue Apr 12 14:56:47 2016 +0000
Changeset:	6eddb345a5e9400aca4d10a63fd056361d611337

Modified Files:
	smstools/Makefile
	smstools/distinfo
Added Files:
	smstools/patches/patch-scripts_sendsms
	smstools/patches/patch-scripts_sms3
	smstools/patches/patch-src_Makefile
	smstools/patches/patch-src_extras.c
	smstools/patches/patch-src_smsd__cfg.c
	smstools/patches/patch-src_smsd__cfg.h
Removed Files:
	smstools/patches/patch-aa

Log Message:
Update wip/smstools to 3.1.5, the last version released (in 2012).
Fix build, clean up etc.

See changelog if needed:
  http://smstools3.kekekasvi.com/index.php?p=history3

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6eddb345a5e9400aca4d10a63fd056361d611337

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 smstools/Makefile                      | 26 ++++++++++++++++++-------
 smstools/distinfo                      | 14 ++++++++++----
 smstools/patches/patch-aa              | 22 ---------------------
 smstools/patches/patch-scripts_sendsms | 18 +++++++++++++++++
 smstools/patches/patch-scripts_sms3    | 16 ++++++++++++++++
 smstools/patches/patch-src_Makefile    | 35 ++++++++++++++++++++++++++++++++++
 smstools/patches/patch-src_extras.c    | 15 +++++++++++++++
 smstools/patches/patch-src_smsd__cfg.c | 22 +++++++++++++++++++++
 smstools/patches/patch-src_smsd__cfg.h | 20 +++++++++++++++++++
 9 files changed, 155 insertions(+), 33 deletions(-)

diffs:
diff --git a/smstools/Makefile b/smstools/Makefile
index 7d9c028..e493610 100644
--- a/smstools/Makefile
+++ b/smstools/Makefile
@@ -1,9 +1,8 @@
 # $NetBSD: Makefile,v 1.5 2013/02/02 13:20:14 shattered Exp $
 #
 
-DISTNAME=		smstools3-3.0.10
-PKGNAME=		smstools-3.0.10
-PKGREVISION=		1
+DISTNAME=		smstools3-3.1.15
+PKGNAME=		${DISTNAME:S/smstools3/smstools/}
 CATEGORIES=		comms
 MASTER_SITES=		http://smstools3.kekekasvi.com/packages/
 
@@ -13,16 +12,29 @@ COMMENT=		Send and receive short messages via GSM phones
 LICENSE=		gnu-gpl-v2
 
 USE_TOOLS+=		bash:run gmake
-CPPFLAGS+=		-DPKG_SYSCONFDIR="\"${PKG_SYSCONFDIR}\""
+
+WRKSRC=			${WRKDIR}/smstools3
+
 REPLACE_BASH=		scripts/sms2html scripts/sms2unicode scripts/regular_run scripts/unicode2sms
 
+BUILD_DEFS+=		VARBASE
+
+CPPFLAGS+=		-DPKG_SYSCONFDIR="\"${PKG_SYSCONFDIR}\""
+CPPFLAGS+=		-DSMS_DIR="\"${VARBASE}/spool/sms\""
+LDFLAGS.SunOS+=		-lnsl -lsocket
+
 EGDIR=			${PREFIX}/share/examples/smstools
 CONF_FILES=		${EGDIR}/smsd.conf ${PKG_SYSCONFDIR}/smsd.conf
-INSTALLATION_DIRS+=	bin sbin ${EGDIR}
-RCD_SCRIPTS=		smsd
 
-WRKSRC=			${WRKDIR}/smstools3
+OWN_DIRS+=		${VARBASE}/spool/sms
+OWN_DIRS+=		${VARBASE}/spool/sms/checked
+OWN_DIRS+=		${VARBASE}/spool/sms/incoming
+OWN_DIRS+=		${VARBASE}/spool/sms/outgoing
+
 BUILD_DIRS=		src
+INSTALLATION_DIRS+=	bin sbin ${EGDIR}
+
+RCD_SCRIPTS=		smsd
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/smsd ${DESTDIR}${PREFIX}/sbin
diff --git a/smstools/distinfo b/smstools/distinfo
index 27085f5..f2c4084 100644
--- a/smstools/distinfo
+++ b/smstools/distinfo
@@ -1,6 +1,12 @@
 $NetBSD: distinfo,v 1.1.1.1 2008/02/05 10:39:41 shattered Exp $
 
-SHA1 (smstools3-3.0.10.tar.gz) = 86a77b250dd4d1519161aa551a69146068f3ac31
-RMD160 (smstools3-3.0.10.tar.gz) = 04aef3ddf345038138b76dd1fd68c2b0d72e5cfe
-Size (smstools3-3.0.10.tar.gz) = 210913 bytes
-SHA1 (patch-aa) = d6fcad9fb3f1ba82165be8733fcaf0c51f69d649
+SHA1 (smstools3-3.1.15.tar.gz) = 41de2b80038d8bc1ba6db5fa16e7989c2edcae5c
+RMD160 (smstools3-3.1.15.tar.gz) = df81f66fc81dd564039f968355b53294c24ad32d
+SHA512 (smstools3-3.1.15.tar.gz) = 6a4cc852327fac27b00fc58def4bbc8caa395552586fe1b84f0f4a9f7f6b00008943b85c86de0821036629c58cf04840a189d711b4ac96f7ddaafd6b340b11fa
+Size (smstools3-3.1.15.tar.gz) = 300088 bytes
+SHA1 (patch-scripts_sendsms) = 948ad382fc1e03ff223b348d075dec74c7a806f4
+SHA1 (patch-scripts_sms3) = 38b3eeebdccc0340ebebf77828f2b6cd0b053f13
+SHA1 (patch-src_Makefile) = 68dc28d5388abe134cc4a6a511710c9492eb7d47
+SHA1 (patch-src_extras.c) = 73e45420e307a7e0d0f9e79561a70069f5e1a179
+SHA1 (patch-src_smsd__cfg.c) = 4f30d9dbcad62d2bfe9f31bd551e616cee2fd2da
+SHA1 (patch-src_smsd__cfg.h) = cff45ce08fdf539c2097cb11d810b5a43c5fb6cd
diff --git a/smstools/patches/patch-aa b/smstools/patches/patch-aa
deleted file mode 100644
index 3f99416..0000000
--- a/smstools/patches/patch-aa
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2008/02/05 10:39:41 shattered Exp $
-
---- src/smsd_cfg.c.orig	2007-07-08 12:45:30.000000000 +0000
-+++ src/smsd_cfg.c
-@@ -677,7 +677,7 @@ void help()
- #endif
-   printf("         -t  run smsd in terminal\n");
-   printf("         -V  print copyright and version\n\n");
--  printf("All other options are set by the file /etc/smsd.conf.\n\n");
-+  printf("All other options are set by the file " PKG_SYSCONFDIR "/smsd.conf.\n\n");
-   printf("Output is written to stdout, errors are written to stderr.\n\n");
-   exit(0);
- }
-@@ -685,7 +685,7 @@ void help()
- void parsearguments(int argc,char** argv)
- {
-   int result;
--  strcpy(configfile,"/etc/smsd.conf");
-+  strcpy(configfile,PKG_SYSCONFDIR "/smsd.conf");
-   printstatus=0;
-   terminal = 0;
-   arg_infofile[0] = 0;
diff --git a/smstools/patches/patch-scripts_sendsms b/smstools/patches/patch-scripts_sendsms
new file mode 100644
index 0000000..6e8cc3b
--- /dev/null
+++ b/smstools/patches/patch-scripts_sendsms
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Go back to Bash echo, SunOS platforms may not have /usr/ucb.
+
+--- scripts/sendsms.orig	2010-07-08 12:41:13.000000000 +0000
++++ scripts/sendsms
+@@ -22,11 +22,6 @@ smsd_user="smsd"
+ 
+ # Will need echo which accepts -n argument:
+ ECHO=echo
+-case `uname` in
+-  SunOS)
+-    ECHO=/usr/ucb/echo
+-    ;;
+-esac
+ 
+ if ! [ -z "$KEYS" ]; then
+   printf "Key: "
diff --git a/smstools/patches/patch-scripts_sms3 b/smstools/patches/patch-scripts_sms3
new file mode 100644
index 0000000..aaaa86f
--- /dev/null
+++ b/smstools/patches/patch-scripts_sms3
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Go back to Bash echo, SunOS platforms may not have /usr/ucb.
+
+--- scripts/sms3.orig	2010-05-04 09:21:44.000000000 +0000
++++ scripts/sms3
+@@ -34,9 +34,6 @@ case `uname` in
+   *BSD|Darwin)
+     PSOPT="axc"
+     ;;
+-  SunOS)
+-    ECHO=/usr/ucb/echo
+-    ;;
+ esac
+ 
+ # Maximum time to stop smsd, after that it gets killed hardly:
diff --git a/smstools/patches/patch-src_Makefile b/smstools/patches/patch-src_Makefile
new file mode 100644
index 0000000..ad046aa
--- /dev/null
+++ b/smstools/patches/patch-src_Makefile
@@ -0,0 +1,35 @@
+$NetBSD$
+
+Fix Makefile syntax and SunOS support..
+
+--- src/Makefile.orig	2010-09-21 11:29:14.000000000 +0000
++++ src/Makefile
+@@ -1,7 +1,7 @@
+ # In case of windows, use os_cygwin=yes setting in the configuration file (smsd.conf).
+ 
+ # Select your setup size:
+-CFLAGS = -D NUMBER_OF_MODEMS=64
++CFLAGS += -D NUMBER_OF_MODEMS=64
+ 
+ # Uncomment for Solaris
+ # CFLAGS += -D SOLARIS
+@@ -40,17 +40,10 @@ CFLAGS += -D_FILE_OFFSET_BITS=64
+ all: smsd 
+ 
+ smsd: smsd.c extras.o locking.o cfgfile.o logging.o alarm.o smsd_cfg.o charset.o stats.o blacklist.o whitelist.o modeminit.o pdu.o
+-
+-ifneq (,$(findstring SOLARIS,$(CFLAGS)))
+-ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS)))
+-override LFLAGS += -lsocket -lnsl
+-endif
+-endif
+-
+ ifneq (,$(findstring NOSTATS,$(CFLAGS)))
+-	$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
++	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+ else 
+-	$(CC) `mm-config --cflags` $(CFLAGS) -o $@ $^ `mm-config --ldflags --libs` $(LFLAGS)
++	$(CC) `mm-config --cflags` $(CFLAGS) -o $@ $^ `mm-config --ldflags --libs` $(LDFLAGS)
+ endif
+ 
+ clean:
diff --git a/smstools/patches/patch-src_extras.c b/smstools/patches/patch-src_extras.c
new file mode 100644
index 0000000..04e6a04
--- /dev/null
+++ b/smstools/patches/patch-src_extras.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+No NAME_MAX in POSIX.
+
+--- src/extras.c.orig	2010-09-21 09:15:45.000000000 +0000
++++ src/extras.c
+@@ -519,7 +519,7 @@ int getfile(int trust_directory, char *d
+   // 3.1.12: Collect filenames:
+   typedef struct
+   {
+-    char fname[NAME_MAX + 1];
++    char fname[FILENAME_MAX + 1];
+     time_t mtime;
+   } _candidate;
+ 
diff --git a/smstools/patches/patch-src_smsd__cfg.c b/smstools/patches/patch-src_smsd__cfg.c
new file mode 100644
index 0000000..04762f6
--- /dev/null
+++ b/smstools/patches/patch-src_smsd__cfg.c
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Make sure paths match.
+
+--- src/smsd_cfg.c.orig	2010-09-21 09:15:07.000000000 +0000
++++ src/smsd_cfg.c
+@@ -159,12 +159,12 @@ void initcfg()
+   log_unmodified = 0;
+   alarmlevel=LOG_WARNING;
+ 
+-  strcpy(d_spool,"/var/spool/sms/outgoing");
+-  strcpy(d_incoming,"/var/spool/sms/incoming");
++  strcpy(d_spool,SMS_DIR "/outgoing");
++  strcpy(d_incoming,SMS_DIR "/incoming");
+   *d_report = 0;
+   *d_phonecalls = 0;
+   *d_saved = 0;
+-  strcpy(d_checked,"/var/spool/sms/checked");
++  strcpy(d_checked,SMS_DIR "/checked");
+   d_failed[0]=0;
+   d_sent[0]=0;
+   d_stats[0]=0;
diff --git a/smstools/patches/patch-src_smsd__cfg.h b/smstools/patches/patch-src_smsd__cfg.h
new file mode 100644
index 0000000..c5a9ade
--- /dev/null
+++ b/smstools/patches/patch-src_smsd__cfg.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+Use proper PKG_SYSCONFDIR.
+
+--- src/smsd_cfg.h.orig	2010-09-20 11:11:26.000000000 +0000
++++ src/smsd_cfg.h
+@@ -20,12 +20,7 @@ Either version 2 of the License, or (at
+ #include <sys/types.h>
+ #include <time.h>
+ 
+-#ifndef __FreeBSD__
+-#define DEFAULT_CONFIGFILE "/etc/smsd.conf"
+-#else
+-#define DEFAULT_CONFIGFILE "%%PREFIX%%/etc/smsd.conf"
+-#endif
+-
++#define DEFAULT_CONFIGFILE PKG_SYSCONFDIR "/smsd.conf"
+ #define DATETIME_DEFAULT "%y-%m-%d %H:%M:%S"
+ #define LOGTIME_DEFAULT "%Y-%m-%d %H:%M:%S"
+ #define DATE_FILENAME_DEFAULT "%Y-%m-%d"


Home | Main Index | Thread Index | Old Index