diff options
author | pav <pav@FreeBSD.org> | 2003-12-05 06:00:20 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2003-12-05 06:00:20 +0800 |
commit | 793de59abd78a8ac50ee7310eb1281687b154873 (patch) | |
tree | 2c2429d63deebd0fa40447a4040976862f2a0468 /comms/gnokii | |
parent | 4e82680de65e37f0a773afa7f27319c61e7c21a3 (diff) | |
download | freebsd-ports-gnome-793de59abd78a8ac50ee7310eb1281687b154873.tar.gz freebsd-ports-gnome-793de59abd78a8ac50ee7310eb1281687b154873.tar.zst freebsd-ports-gnome-793de59abd78a8ac50ee7310eb1281687b154873.zip |
- Update to 0.5.6
- Add WITH_SMSD knob to enable build of SMS messaging daemon
with optional MySQL or Postgresql backend
PR: ports/54498
Submitted by: Guido Falsi <mad@madpilot.net>
Approved by: adamw (mentor)
Diffstat (limited to 'comms/gnokii')
-rw-r--r-- | comms/gnokii/Makefile | 107 | ||||
-rw-r--r-- | comms/gnokii/distinfo | 2 | ||||
-rw-r--r-- | comms/gnokii/files/patch-Docs-Makefile | 14 | ||||
-rw-r--r-- | comms/gnokii/files/patch-Makefile.global.in | 11 | ||||
-rw-r--r-- | comms/gnokii/files/patch-common-Makefile | 29 | ||||
-rw-r--r-- | comms/gnokii/files/patch-common-gsm-encoding.c | 21 | ||||
-rw-r--r-- | comms/gnokii/files/patch-smsd-Makefile | 50 | ||||
-rw-r--r-- | comms/gnokii/pkg-message | 7 | ||||
-rw-r--r-- | comms/gnokii/pkg-plist | 13 |
9 files changed, 208 insertions, 46 deletions
diff --git a/comms/gnokii/Makefile b/comms/gnokii/Makefile index 902b2f55c960..da0073237b46 100644 --- a/comms/gnokii/Makefile +++ b/comms/gnokii/Makefile @@ -6,13 +6,12 @@ # PORTNAME= gnokii -PORTVERSION= 0.5.0 -PORTREVISION= 1 +PORTVERSION= 0.5.6 PORTEPOCH= 1 CATEGORIES= comms -MASTER_SITES= ftp://ftp.nuug.no/pub/anders/distfiles/ \ - http://freesoftware.fsf.org/download/gnokii/ \ +MASTER_SITES= ${MASTER_SITE_SAVANNAH} \ ftp://ftp.gnokii.org/pub/gnokii/ +MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= ports@FreeBSD.org COMMENT= Tools to talk to Nokia cellular phones @@ -21,39 +20,75 @@ LIB_DEPENDS= intl.5:${PORTSDIR}/devel/gettext USE_REINPLACE= yes USE_GMAKE= yes -.if !defined(WITHOUT_X11) -USE_XPM= yes -USE_GNOME= gtk12 -.endif +USE_BZIP2= yes INSTALLS_SHLIB= yes - GNU_CONFIGURE= yes - CONFIGURE_ARGS+= --with-libintl-prefix=${LOCALBASE} --enable-security \ --with-xgnokiidir=${PREFIX}/share -.if defined(WITHOUT_X11) -CONFIGURE_ARGS+= --without-x -PLIST_SUB+= X11='@comment ' -.else -PLIST_SUB+= X11='' -.endif CONFIGURE_ENV+= MSGFMT="${LOCALBASE}/bin/msgfmt" \ XGETTEXT="${LOCALBASE}/bin/xgettext" \ CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ LIBS="-L${LOCALBASE}/lib" -MAN1= gnokii.1 todologo.1 -.if !defined(WITHOUT_X11) -MAN1+= xgnokii.1 -.endif +MAN1= gnokii.1 todologo.1 ppm2nokia.1 sendsms.1 MAN8= gnokiid.8 mgnokiidev.8 INSTALL_TARGET= install-suid PKGDEINSTALL= ${PKGINSTALL} +PKGMESSAGE= ${WRKDIR}/pkg-message FIXPREFIX= Docs/man/gnokiid.8 Docs/DataCalls-QuickStart Docs/README \ common/cfgreader.c po/et.po po/sl.po +.include <bsd.port.pre.mk> + +# If smsd is enabled check if MySQL or PostgreSQL are installed and +# build the modules, no switches to make this port build those, if +# you want them, just install them before this port. The port will +# then activate a dependency. +.if !defined(WITH_SMSD) +PLIST_SUB+= SMSD='@comment ' +PLIST_SUB+= PGM='@comment ' +PLIST_SUB+= MSM='@comment ' +USE_GNOME+= glib12 +.else +PLIST_SUB+= SMSD='' +.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so) +USE_MYSQL= yes +PLIST_SUB+= MSM='' +WITH_MYSQL= yes +.else +PLIST_SUB+= MSM='@comment ' +.endif +.if exists(${LOCALBASE}/lib/libpq.so) +LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT} +PLIST_SUB+= PGM='' +WITH_PGSQL= yes +.else +PLIST_SUB+= PGM='@comment ' +.endif +.endif + +.if defined(WITHOUT_X11) +CONFIGURE_ARGS+= --without-x +PLIST_SUB+= X11='@comment ' +.else +USE_XPM= yes +USE_GNOME+= gtk12 +PLIST_SUB+= X11='' +MAN1+= xgnokii.1 +.endif + +pre-fetch: + @${ECHO} + @${ECHO} "If you plan using the smsd daemon for automatically receiving," + @${ECHO} "managing and sending SMSes define WITH_SMSD=yes." + @${ECHO} "smsd has support for normal file system operations, MySQL and" + @${ECHO} "PostgreSQL. If any of these 2 database systems are installed support" + @${ECHO} "will be automatically compiled in. Normal file systems support is" + @${ECHO} "always compiled in." + @${ECHO} + post-patch: .for f in ${FIXPREFIX} @${REINPLACE_CMD} -e "s:/etc/gnokiirc:${PREFIX}/etc/gnokiirc:g" \ @@ -66,14 +101,44 @@ post-patch: ${WRKSRC}/${f} .endfor +post-build: +.if defined(WITH_SMSD) + @cd ${WRKSRC}/smsd && ${GMAKE} all + @cd ${WRKSRC}/smsd && ${GMAKE} libfile.so LOCALBASE=${LOCALBASE} +.if defined(WITH_MYSQL) + @cd ${WRKSRC}/smsd && ${GMAKE} libmysql.so LOCALBASE=${LOCALBASE} +.endif +.if defined(WITH_PGSQL) + @cd ${WRKSRC}/smsd && ${GMAKE} libpq.so LOCALBASE=${LOCALBASE} +.endif +.endif + @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' pkg-message > ${PKGMESSAGE} + pre-install: @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL +.if !defined(NOPORTDOCS) @(cd ${WRKSRC} && ${GMAKE} install-docs) +.endif ${INSTALL_DATA} ${WRKSRC}/Docs/sample/gnokiirc \ ${PREFIX}/etc/gnokiirc.sample +.if defined(WITH_SMSD) + ${MKDIR} ${PREFIX}/share/smsd + ${INSTALL_PROGRAM} ${WRKSRC}/smsd/smsd ${PREFIX}/sbin/smsd + ${INSTALL_SCRIPT} ${WRKSRC}/smsd/action ${PREFIX}/share/smsd/action + ${INSTALL_DATA} ${WRKSRC}/smsd/README ${PREFIX}/share/smsd/README + ${INSTALL_PROGRAM} ${WRKSRC}/smsd/libfile.so ${PREFIX}/share/smsd/libfile.so +.if defined(WITH_MYSQL) + ${INSTALL_PROGRAM} ${WRKSRC}/smsd/libmysql.so ${PREFIX}/share/smsd/libmysql.so + ${INSTALL_DATA} ${WRKSRC}/smsd/sms.tables.mysql.sql ${PREFIX}/share/smsd/sms.tables.mysql.sql +.endif +.if defined(WITH_PGSQL) + ${INSTALL_PROGRAM} ${WRKSRC}/smsd/libpq.so ${PREFIX}/share/smsd/libpq.so + ${INSTALL_DATA} ${WRKSRC}/smsd/sms.tables.pq.sql ${PREFIX}/share/smsd/sms.tables.pq.sql +.endif +.endif @${CAT} ${PKGMESSAGE} -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/comms/gnokii/distinfo b/comms/gnokii/distinfo index 2ee145429d50..5619e29f68f2 100644 --- a/comms/gnokii/distinfo +++ b/comms/gnokii/distinfo @@ -1 +1 @@ -MD5 (gnokii-0.5.0.tar.gz) = 30c8f3e2c6ef684578500cba088006df +MD5 (gnokii-0.5.6.tar.bz2) = 98b3cd228aa2843f5e29af39887ec419 diff --git a/comms/gnokii/files/patch-Docs-Makefile b/comms/gnokii/files/patch-Docs-Makefile index a7ff5cc2849b..bb0fcc36c7e6 100644 --- a/comms/gnokii/files/patch-Docs-Makefile +++ b/comms/gnokii/files/patch-Docs-Makefile @@ -1,6 +1,6 @@ ---- Docs/Makefile.orig Tue May 20 20:53:33 2003 -+++ Docs/Makefile Tue May 20 20:54:25 2003 -@@ -62,6 +62,7 @@ +--- Docs/Makefile.orig Tue Jul 8 23:23:28 2003 ++++ Docs/Makefile Tue Jul 8 23:24:48 2003 +@@ -63,6 +63,7 @@ @echo install: @@ -8,12 +8,12 @@ $(INSTALL) -d $(DESTDIR)$(docdir) $(INSTALL) -d $(DESTDIR)$(docdir)/sample/logo $(INSTALL) -d $(DESTDIR)$(docdir)/sample/ringtone -@@ -78,10 +79,10 @@ - $(INSTALL) $(GNOKII1_MAN) $(DESTDIR)$(man1dir) - $(INSTALL) $(GNOKII8_MAN) $(DESTDIR)$(man8dir) +@@ -79,10 +80,10 @@ + $(INSTALL_DATA) $(GNOKII1_MAN) $(DESTDIR)$(man1dir) + $(INSTALL_DATA) $(GNOKII8_MAN) $(DESTDIR)$(man8dir) if [ "x$(HAVE_XGNOKII)" = "xyes" ]; then \ - $(INSTALL) -d $(DESTDIR)$(xmandir); \ -- $(INSTALL) $(XGNOKII_MAN) $(DESTDIR)$(xmandir); \ +- $(INSTALL_DATA) $(XGNOKII_MAN) $(DESTDIR)$(xmandir); \ + $(INSTALL) $(XGNOKII_MAN) $(DESTDIR)/$(xmandir)/xgnokii.1; \ fi @echo "done" diff --git a/comms/gnokii/files/patch-Makefile.global.in b/comms/gnokii/files/patch-Makefile.global.in index 008f1472e53f..787cca46e5cd 100644 --- a/comms/gnokii/files/patch-Makefile.global.in +++ b/comms/gnokii/files/patch-Makefile.global.in @@ -1,6 +1,6 @@ ---- Makefile.global.in.orig Tue May 20 20:34:17 2003 -+++ Makefile.global.in Tue May 20 20:37:15 2003 -@@ -22,14 +22,14 @@ +--- Makefile.global.in.orig Tue Jul 8 23:33:22 2003 ++++ Makefile.global.in Tue Jul 8 23:33:03 2003 +@@ -22,15 +22,15 @@ bindir = @bindir@ sbindir = @sbindir@ @@ -10,8 +10,9 @@ -xgnokii_libdir = @XGNOKIIDIR@/share/@XPACKAGE@ +xgnokii_libdir = ${prefix}/share/@XPACKAGE@ includedir = @includedir@ - man1dir = @mandir@/man1/ - man8dir = @mandir@/man8/ + mandir = @mandir@ + man1dir = ${mandir}/man1/ + man8dir = ${mandir}/man8/ -xmandir = @XGNOKIIDIR@/man/man1/ -docdir = ${prefix}/doc/${PACKAGE} +xmandir = ${man1dir} diff --git a/comms/gnokii/files/patch-common-Makefile b/comms/gnokii/files/patch-common-Makefile index cae242f53a05..cb3429e49f99 100644 --- a/comms/gnokii/files/patch-common-Makefile +++ b/comms/gnokii/files/patch-common-Makefile @@ -1,24 +1,30 @@ ---- common/Makefile.orig Tue May 20 21:04:08 2003 -+++ common/Makefile Tue May 20 21:21:55 2003 -@@ -41,15 +41,12 @@ - misc.o \ +--- common/Makefile.orig Sat Nov 8 12:15:34 2003 ++++ common/Makefile Wed Dec 3 21:35:14 2003 +@@ -44,13 +44,10 @@ snprintf.o + ifndef WIN32_CROSS -ifdef NO_SHARED -GNOKII_LIB=libgnokii.a -else -+GNOKII_LIBNOSHARED =libgnokii.a ++GNOKII_LIBNOSHARED=libgnokii.a GNOKII_LIB =libgnokii.so GNOKII_LIBM =$(GNOKII_LIB).$(MAJOR_NUMBER) GNOKII_LIBMM=$(GNOKII_LIBM).$(MINOR_NUMBER) -endif + else + ifdef NO_SHARED + GNOKII_LIB=gnokii.lib +@@ -59,7 +56,7 @@ + endif + endif -all: $(GNOKII_LIB) +all: $(GNOKII_LIB) $(GNOKII_LIBNOSHARED) phones/PHONES.o: $(MAKE) -C phones PHONES.o -@@ -64,8 +61,7 @@ +@@ -74,8 +71,7 @@ $(CC) -o gnokii-debug $(OBJS) phones/PHONES.o links/LINKS.o devices/DEVICES.o ../gnokii/gnokii.o libgnokii.so: $(OBJS) phones/PHONES.o links/LINKS.o devices/DEVICES.o @@ -28,7 +34,7 @@ ln -sf $(GNOKII_LIBM) $(GNOKII_LIB) libgnokii.a: $(OBJS) phones/PHONES.o links/LINKS.o devices/DEVICES.o -@@ -84,8 +80,8 @@ +@@ -102,11 +98,11 @@ install: $(INSTALL) -d $(DESTDIR)$(libdir) @@ -37,5 +43,10 @@ + $(INSTALL) $(GNOKII_LIBM) $(DESTDIR)$(libdir) + $(INSTALL) $(GNOKII_LIBNOSHARED) $(DESTDIR)$(libdir) cd $(DESTDIR)$(libdir) && ln -sf $(GNOKII_LIBM) $(GNOKII_LIB) - $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig - $(INSTALL) gnokii.pc $(DESTDIR)$(libdir)/pkgconfig +- $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig +- $(INSTALL_DATA) gnokii.pc $(DESTDIR)$(libdir)/pkgconfig ++ $(INSTALL) -d $(DESTDIR)$(prefix)/libdata/pkgconfig ++ $(INSTALL_DATA) gnokii.pc $(DESTDIR)$(prefix)/libdata/pkgconfig + @echo + + install-strip: install diff --git a/comms/gnokii/files/patch-common-gsm-encoding.c b/comms/gnokii/files/patch-common-gsm-encoding.c new file mode 100644 index 000000000000..8fbb347230fb --- /dev/null +++ b/comms/gnokii/files/patch-common-gsm-encoding.c @@ -0,0 +1,21 @@ +--- common/gsm-encoding.c.orig Sat Nov 8 12:15:34 2003 ++++ common/gsm-encoding.c Wed Dec 3 22:09:31 2003 +@@ -591,14 +591,16 @@ + size_t outleft, inleft, nconv; + char *pin, *pout; + ++#if defined(HAVE_ICONV) && defined(HAVE_LANGINFO_CODESET) ++ iconv_t cd; ++#endif ++ + outleft = outlen; + inleft = inlen; + pin = (char *)instring; + pout = outstring; + + #if defined(HAVE_ICONV) && defined(HAVE_LANGINFO_CODESET) +- iconv_t cd; +- + cd = iconv_open("UTF-8", nl_langinfo(CODESET)); + + nconv = iconv(cd, &pin, &inleft, &pout, &outleft); diff --git a/comms/gnokii/files/patch-smsd-Makefile b/comms/gnokii/files/patch-smsd-Makefile new file mode 100644 index 000000000000..6972f77a5f89 --- /dev/null +++ b/comms/gnokii/files/patch-smsd-Makefile @@ -0,0 +1,50 @@ +--- smsd/Makefile.orig Fri Oct 10 22:38:59 2003 ++++ smsd/Makefile Fri Oct 10 22:41:33 2003 +@@ -21,14 +21,14 @@ + SMSD_MAN=man/smsd.8 + + CFLAGS += -DMODULES_DIR=\"${libdir}/smsd\" $(PTHREAD_CFLAGS) \ +- $(shell $(GLIBCFLAGS)) ++ $(shell $(GLIBCFLAGS)) -I$(LOCALBASE)/include `glib-config --cflags` + + LDLIBS += $(PTHREAD_LIBS) \ + $(shell $(GLIBLDLIBS)) + +-LDLIBS += -s -rdynamic -L$(TOPDIR)/common -lgnokii -ldl ++# LDLIBS += -s -rdynamic -L$(TOPDIR)/common -lgnokii -ldl + # Some systems, eg. FreeBSD don't have libdl. Use this: +-# LDLIBS += -s -rdynamic -L$(TOPDIR)/common -lgnokii ++LDLIBS += -s -rdynamic -L$(TOPDIR)/common -lgnokii + + ifdef XPM_LIBS + LDLIBS +=$(XPM_LIBS) +@@ -41,7 +41,7 @@ + + + smsd: $(OBJS) $(TOPDIR)/common/libgnokii.so +- gcc $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@ ++ $(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@ + + + ### DB Modules +@@ -50,17 +50,17 @@ + + # PostgreSQL support + libpq.so: smsd.h pq.c +- gcc -s -shared -o libpq.so $(CFLAGS) -I../include \ ++ $(CC) -s -shared -o libpq.so $(CFLAGS) -I../include \ + -I/usr/include/pgsql pq.c $(shell $(GLIBLDLIBS)) -lpq + + # MySQL support + libmysql.so: smsd.h mysql.c +- gcc -s -shared -o libmysql.so $(CFLAGS) -I../include \ ++ $(CC) -s -shared -o libmysql.so $(CFLAGS) -I../include \ + $(shell mysql_config --cflags) mysql.c $(shell $(GLIBLDLIBS)) $(shell mysql_config --libs) + + # File support + libfile.so: smsd.h file.c +- gcc -s -shared -o libfile.so $(CFLAGS) -I../include \ ++ $(CC) -s -shared -o libfile.so $(CFLAGS) -I../include \ + file.c $(shell $(GLIBLDLIBS)) + + ### End of DB Modules diff --git a/comms/gnokii/pkg-message b/comms/gnokii/pkg-message index e25b4034603e..ec818f44ff0f 100644 --- a/comms/gnokii/pkg-message +++ b/comms/gnokii/pkg-message @@ -1,10 +1,13 @@ ================================================================================ -The default config is installed in ${PREFIX}/etc/gnokiirc.sample, and is +The default config is installed in %%PREFIX%%/etc/gnokiirc.sample, and is configured for Nokia 6210 phones connected on COM1. Have a look at the documentation/manpages for more information. You'll need to copy -gnokiirc.sample to ${PREFIX}/etc/gnokiirc or $HOME/.gnokiirc for gnokii/ +gnokiirc.sample to %%PREFIX%%/etc/gnokiirc or $HOME/.gnokiirc for gnokii/ xgnokii to use it. Add the users that shall be authorized to run gnokii programs to the gnokii group. + +NOTE: if you have enabled and plan using the smsd program check +%%PREFIX%%/share/smsd/README ================================================================================ diff --git a/comms/gnokii/pkg-plist b/comms/gnokii/pkg-plist index ab77886b4f5f..2ab006fd32d1 100644 --- a/comms/gnokii/pkg-plist +++ b/comms/gnokii/pkg-plist @@ -21,12 +21,14 @@ include/gnokii/virtmodem.h lib/libgnokii.a lib/libgnokii.so lib/libgnokii.so.1 -lib/pkgconfig/gnokii.pc +libdata/pkgconfig/gnokii.pc sbin/gnokiid sbin/mgnokiidev +%%SMSD%%sbin/smsd %%PORTDOCS%%%%DOCSDIR%%/Bugs %%PORTDOCS%%%%DOCSDIR%%/CREDITS %%PORTDOCS%%%%DOCSDIR%%/DataCalls-QuickStart +%%PORTDOCS%%%%DOCSDIR%%/gnokii.nol %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/README-2110 %%PORTDOCS%%%%DOCSDIR%%/README-3810 @@ -77,11 +79,20 @@ share/locale/cs/LC_MESSAGES/gnokii.mo share/locale/de/LC_MESSAGES/gnokii.mo share/locale/et/LC_MESSAGES/gnokii.mo share/locale/fi/LC_MESSAGES/gnokii.mo +share/locale/fr/LC_MESSAGES/gnokii.mo share/locale/it/LC_MESSAGES/gnokii.mo share/locale/nl/LC_MESSAGES/gnokii.mo share/locale/pl/LC_MESSAGES/gnokii.mo share/locale/sk/LC_MESSAGES/gnokii.mo share/locale/sl/LC_MESSAGES/gnokii.mo +%%SMSD%%share/smsd/action +%%SMSD%%share/smsd/README +%%SMSD%%share/smsd/libfile.so +%%MSM%%share/smsd/libmysql.so +%%MSM%%share/smsd/sms.tables.mysql.sql +%%PGM%%share/smsd/libpq.so +%%PGM%%share/smsd/sms.tables.pq.sql +%%SMSD%%@dirrm share/smsd %%X11%%share/xgnokii/help/C %%X11%%share/xgnokii/help/POSIX %%X11%%share/xgnokii/help/en_US/COPYING |