git: ca17004b6d80 - main - comms/gnokii: Cleanup and modernize port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Jul 2022 20:31:00 UTC
The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/ports/commit/?id=ca17004b6d80a6dc5b2e4352bfd0f5a957ba4616 commit ca17004b6d80a6dc5b2e4352bfd0f5a957ba4616 Author: Guido Falsi <madpilot@FreeBSD.org> AuthorDate: 2022-07-27 20:25:33 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2022-07-27 20:30:53 +0000 comms/gnokii: Cleanup and modernize port - Remove pkg-install, all it was doing is now done from pkg-plist [1] - Fix sendsms script to work with sh - Use shebangfix in place of REINPLACE_CMD - Remove unneeded REINPLACE_CMDs - Remove bogus SMSDDB option, and use OPTIONS_GROUP in place of OPTIONS_MULTI - Remove duplicate "gnome" from X11_USES (already in global USES) - Add missing dependency on harfbuzz when X11 is enabled - Remove unneeded "-p" from ${MKDIR} - Delete an old, unused, patch file Reported by: bapt [1] --- comms/gnokii/Makefile | 30 +++++++++++-------------- comms/gnokii/files/patch-utils_sendsms | 26 +++++++++++++++++++++ comms/gnokii/files/smsd-Makefile-WITH_GLIB.diff | 21 ----------------- comms/gnokii/pkg-install | 19 ---------------- comms/gnokii/pkg-plist | 12 +++++----- 5 files changed, 45 insertions(+), 63 deletions(-) diff --git a/comms/gnokii/Makefile b/comms/gnokii/Makefile index cc032c802662..31426cf61834 100644 --- a/comms/gnokii/Makefile +++ b/comms/gnokii/Makefile @@ -1,6 +1,6 @@ PORTNAME= gnokii PORTVERSION= 0.6.31 -PORTREVISION= 12 +PORTREVISION= 13 PORTEPOCH= 1 CATEGORIES= comms MASTER_SITES= http://www.gnokii.org/download/gnokii/ \ @@ -16,24 +16,24 @@ BUILD_DEPENDS= p5-XML-Parser>=0:textproc/p5-XML-Parser GROUPS= ${PORTNAME} USES= gettext gmake gnome iconv libtool localbase pathfix pkgconfig \ - readline tar:bzip2 + readline shebangfix tar:bzip2 USE_LDCONFIG= yes USE_CSTD= gnu89 USE_GNOME= glib20 intltool GNU_CONFIGURE= yes CONFIGURE_ARGS+= --enable-security +SHEBANG_FILES= smsd/action utils/sendsms SUB_FILES+= pkg-message PORTDOCS= * CONFLICTS= smstools sendsms -FIXPREFIX= Docs/man/gnokiid.8 Docs/DataCalls-QuickStart Docs/README \ - common/cfgreader.c +FIXPREFIX= Docs/README common/cfgreader.c -OPTIONS_DEFINE= DOCS ICAL PCSC SMSD SMSDDB USB X11 -OPTIONS_MULTI= SMSDDB -OPTIONS_MULTI_SMSDDB= MYSQL PGSQL SQLITE +OPTIONS_DEFINE= DOCS ICAL PCSC SMSD USB X11 +OPTIONS_GROUP= SMSDDB +OPTIONS_GROUP_SMSDDB= MYSQL PGSQL SQLITE OPTIONS_DEFAULT= X11 ICAL_DESC= Build with IETF iCal support @@ -68,15 +68,15 @@ SQLITE_PLIST_SUB_OFF= SQLT='@comment ' SQLITE_CONFIGURE_OFF= --disable-sqlite X11_CONFIGURE_WITH= x X11_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ - libfreetype.so:print/freetype2 -X11_USES= gnome xorg + libfreetype.so:print/freetype2 \ + libharfbuzz.so:print/harfbuzz +X11_USES= xorg X11_USE= XORG=x11 XORG=xpm \ GNOME=cairo GNOME=gdkpixbuf2 GNOME=gtk20 X11_PLIST_SUB= X11='' X11_PLIST_SUB_OFF= X11='@comment ' post-patch: - @${REINPLACE_CMD} -e "s/bash/sh/" ${WRKSRC}/smsd/action .for f in ${FIXPREFIX} @${REINPLACE_CMD} -e "s:/etc/gnokiirc:${PREFIX}/etc/gnokiirc:g" \ ${WRKSRC}/${f} @@ -85,10 +85,6 @@ post-patch: @${REINPLACE_CMD} -E -e "s:^(#ifdef.*)__OpenBSD__:\1__FreeBSD__:" \ ${WRKSRC}/${f} .endfor -# fix test(1) conditions in configure script - @${REINPLACE_CMD} -E \ - -e 's|([[:space:]]+test[[:space:]]+.+)==([[:space:]]+"yes")|\1=\2|' \ - ${WRKSRC}/${CONFIGURE_SCRIPT} @${MV} ${WRKSRC}/Docs/man/xgnokii.1x ${WRKSRC}/Docs/man/xgnokii.1 post-install: @@ -104,18 +100,18 @@ post-install-DOCS-off: ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install -C ${WRKSRC}/Docs/man post-install-SMSD-on: - @${MKDIR} -p ${STAGEDIR}${PREFIX}/share/smsd + @${MKDIR} ${STAGEDIR}${PREFIX}/share/smsd @cd ${WRKSRC}/smsd && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install ${INSTALL_SCRIPT} ${WRKSRC}/smsd/action ${STAGEDIR}${PREFIX}/share/smsd ${INSTALL_DATA} ${WRKSRC}/smsd/README ${STAGEDIR}${PREFIX}/share/smsd ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/smsd/*.so post-install-MYSQL-on: - @${MKDIR} -p ${STAGEDIR}${PREFIX}/share/smsd + @${MKDIR} ${STAGEDIR}${PREFIX}/share/smsd ${INSTALL_DATA} ${WRKSRC}/smsd/sms.tables.mysql.sql ${STAGEDIR}${PREFIX}/share/smsd post-install-PGSQL-on: - @${MKDIR} -p ${STAGEDIR}${PREFIX}/share/smsd + @${MKDIR} ${STAGEDIR}${PREFIX}/share/smsd ${INSTALL_DATA} ${WRKSRC}/smsd/sms.tables.pq.sql ${STAGEDIR}${PREFIX}/share/smsd .include <bsd.port.mk> diff --git a/comms/gnokii/files/patch-utils_sendsms b/comms/gnokii/files/patch-utils_sendsms new file mode 100644 index 000000000000..60d568b48a74 --- /dev/null +++ b/comms/gnokii/files/patch-utils_sendsms @@ -0,0 +1,26 @@ +--- utils/sendsms.orig 2011-12-02 14:53:04 UTC ++++ utils/sendsms +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + ############################################################################### + # SENDSMS -- Script to send sms by 'gnokii' + # Author : Gabriele Zappi - Rimini <gzappi@inwind.it> +@@ -342,7 +342,7 @@ parse_stdin $* + # help + # fi + +-if ! type -all "dialog" >/dev/null 2>&1 ; then ++if ! type "dialog" >/dev/null 2>&1 ; then + echo + echo "${PROGNAME}: error:" + echo "Can't find 'dialog', i can't run without 'dialog' on your system." +@@ -354,7 +354,7 @@ if [ $SW_SKIPGNOKITST = no ] ; then + fi + + if [ $SW_SKIPGNOKITST = no ] ; then +- if ! type -all "$GNOKII" >/dev/null 2>&1 ; then ++ if ! type "$GNOKII" >/dev/null 2>&1 ; then + echo + echo "${PROGNAME}: error:" + echo "Can't find 'gnokii'. This script needs 'gnokii' in order to work." diff --git a/comms/gnokii/files/smsd-Makefile-WITH_GLIB.diff b/comms/gnokii/files/smsd-Makefile-WITH_GLIB.diff deleted file mode 100644 index b0fb1800643b..000000000000 --- a/comms/gnokii/files/smsd-Makefile-WITH_GLIB.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- smsd/Makefile.orig Sun Nov 13 16:00:45 2005 -+++ smsd/Makefile Sun Nov 13 16:00:54 2005 -@@ -7,14 +7,14 @@ - # $Id: Makefile,v 1.33 2005/08/10 07:33:43 ja Exp $ - # - --#GLIBCFLAGS = glib-config --cflags --#GLIBLDLIBS = glib-config --libs -+GLIBCFLAGS = glib-config --cflags -+GLIBLDLIBS = glib-config --libs - - # Comment out above lines and uncomment below lines if you want compile smsd - # with glib2 instead of glib1. - # --GLIBCFLAGS = pkg-config --cflags glib-2.0 --GLIBLDLIBS = pkg-config --libs glib-2.0 -+#GLIBCFLAGS = pkg-config --cflags glib-2.0 -+#GLIBLDLIBS = pkg-config --libs glib-2.0 - - TOPDIR=.. - include $(TOPDIR)/Makefile.global diff --git a/comms/gnokii/pkg-install b/comms/gnokii/pkg-install deleted file mode 100644 index a5434dd5022f..000000000000 --- a/comms/gnokii/pkg-install +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -PATH=/bin:/usr/bin:/usr/sbin - -SUIDBINS="${PKG_PREFIX}/sbin/gnokiid ${PKG_PREFIX}/sbin/mgnokiidev" -BINS="${PKG_PREFIX}/bin/gnokii ${SUIDBINS}" - -if [ -e ${PKG_PREFIX}/bin/xgnokii ]; then - BINS="$BINS ${PKG_PREFIX}/bin/xgnokii" -fi - -case "$2" in -"POST-INSTALL") - chgrp gnokii $BINS - chmod 750 ${BINS} - chmod u+s ${SUIDBINS} - ;; - -esac diff --git a/comms/gnokii/pkg-plist b/comms/gnokii/pkg-plist index 6e265fbc7577..a42ff19d3377 100644 --- a/comms/gnokii/pkg-plist +++ b/comms/gnokii/pkg-plist @@ -1,6 +1,6 @@ -bin/gnokii -bin/sendsms -%%X11%%bin/xgnokii +@(,gnokii,0750) bin/gnokii +@(,gnokii,0755) bin/sendsms +%%X11%%@(,gnokii,0750) bin/xgnokii etc/gnokiirc.sample include/gnokii.h include/gnokii/bitmaps.h @@ -29,9 +29,9 @@ man/man1/xgnokii.1.gz man/man8/gnokiid.8.gz man/man8/mgnokiidev.8.gz %%SMSD%%man/man8/smsd.8.gz -sbin/gnokiid -sbin/mgnokiidev -%%SMSD%%sbin/smsd +@(,gnokii,4750) sbin/gnokiid +@(,gnokii,4750) sbin/mgnokiidev +%%SMSD%%@(,gnokii,0750) sbin/smsd share/locale/de/LC_MESSAGES/gnokii.mo share/locale/fi/LC_MESSAGES/gnokii.mo share/locale/fr/LC_MESSAGES/gnokii.mo