2008-07-27 20:25:00 +00:00
|
|
|
# New ports collection makefile for: gnokii
|
|
|
|
# Date created: 15 March 1999
|
|
|
|
# Whom: Staffan Ulfberg <staffanu@multivac.fatburen.org>
|
1999-04-02 00:45:54 +00:00
|
|
|
#
|
1999-08-25 05:28:01 +00:00
|
|
|
# $FreeBSD$
|
1999-04-02 00:45:54 +00:00
|
|
|
#
|
|
|
|
|
2000-04-08 23:24:42 +00:00
|
|
|
PORTNAME= gnokii
|
2008-06-12 14:45:25 +00:00
|
|
|
PORTVERSION= 0.6.26
|
2008-07-27 20:25:00 +00:00
|
|
|
PORTREVISION= 3
|
2001-10-15 15:43:58 +00:00
|
|
|
PORTEPOCH= 1
|
1999-04-02 00:45:54 +00:00
|
|
|
CATEGORIES= comms
|
2005-05-19 15:36:39 +00:00
|
|
|
MASTER_SITES= http://www.gnokii.org/download/gnokii/ \
|
2008-02-16 16:36:58 +00:00
|
|
|
ftp://ftp.gnokii.org/pub/gnokii/ \
|
|
|
|
http://www.gnokii.org/download/gnokii/0.6.x/
|
1999-04-02 00:45:54 +00:00
|
|
|
|
2004-02-13 19:13:27 +00:00
|
|
|
MAINTAINER= mad@madpilot.net
|
|
|
|
COMMENT= Tools to talk to GSM cellular phones
|
2001-05-03 01:13:00 +00:00
|
|
|
|
2008-07-07 13:43:28 +00:00
|
|
|
BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser
|
|
|
|
|
2003-12-04 22:00:20 +00:00
|
|
|
USE_BZIP2= yes
|
2008-07-27 20:25:00 +00:00
|
|
|
USE_GMAKE= yes
|
2008-07-14 07:42:04 +00:00
|
|
|
USE_GETTEXT= yes
|
2007-04-23 06:56:34 +00:00
|
|
|
USE_LDCONFIG= yes
|
2008-07-27 20:25:00 +00:00
|
|
|
WANT_GNOME= yes
|
2001-05-03 01:13:00 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2003-05-20 23:52:47 +00:00
|
|
|
CONFIGURE_ARGS+= --with-libintl-prefix=${LOCALBASE} --enable-security \
|
2001-05-03 01:13:00 +00:00
|
|
|
--with-xgnokiidir=${PREFIX}/share
|
2002-05-23 01:02:28 +00:00
|
|
|
CONFIGURE_ENV+= MSGFMT="${LOCALBASE}/bin/msgfmt" \
|
2003-05-20 23:52:47 +00:00
|
|
|
XGETTEXT="${LOCALBASE}/bin/xgettext" \
|
2004-01-31 00:35:33 +00:00
|
|
|
CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include -fPIC" \
|
2008-03-18 06:34:16 +00:00
|
|
|
LIBS="-L../common -L${LOCALBASE}/lib" \
|
|
|
|
PKG_CONFIG="${LOCALBASE}/bin/pkg-config"
|
2001-05-03 01:13:00 +00:00
|
|
|
|
2003-05-20 23:52:47 +00:00
|
|
|
PKGDEINSTALL= ${PKGINSTALL}
|
2008-07-27 20:25:00 +00:00
|
|
|
SUB_FILES+= pkg-message
|
|
|
|
PORTDOCS= *
|
2008-06-12 14:45:25 +00:00
|
|
|
MAN1= gnokii.1 sendsms.1
|
|
|
|
MAN8= gnokiid.8 mgnokiidev.8
|
2004-12-28 20:52:16 +00:00
|
|
|
|
2008-07-27 20:25:00 +00:00
|
|
|
OPTIONS= ICAL "Build with IETF iCal support" off \
|
|
|
|
USB "Build with libusb support" off \
|
|
|
|
PCSC "Build with PC/SC-Lite support" off \
|
|
|
|
SMSD "Enable smsd daemon" off \
|
|
|
|
MYSQL "Enable MySQL support for smsd" off \
|
|
|
|
PGSQL "Enable PostgreSQL support for smsd" off \
|
|
|
|
X11 "Build graphical version (xgnokii)" on
|
2007-12-11 21:15:48 +00:00
|
|
|
|
2008-07-27 20:25:00 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
2008-03-16 09:11:50 +00:00
|
|
|
|
2008-07-27 20:25:00 +00:00
|
|
|
.if exists(${LOCALBASE}/lib/libical.so) || defined(WITH_ICAL)
|
2008-03-16 09:11:50 +00:00
|
|
|
LIB_DEPENDS+= ical.27:${PORTSDIR}/devel/libical
|
2004-12-28 20:52:16 +00:00
|
|
|
.endif
|
|
|
|
|
2008-07-27 20:25:00 +00:00
|
|
|
.if exists(${LOCALBASE}/lib/libusb.so) || defined(WITH_USB)
|
|
|
|
LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb
|
2007-12-11 21:15:48 +00:00
|
|
|
.endif
|
|
|
|
|
2008-07-27 20:25:00 +00:00
|
|
|
.if exists(${LOCALBASE}/lib/libpcsclite.so) || defined(WITH_PCSC)
|
2008-03-16 09:11:50 +00:00
|
|
|
LIB_DEPENDS+= pcsclite.1:${PORTSDIR}/devel/pcsc-lite
|
|
|
|
.endif
|
|
|
|
|
2003-12-04 22:00:20 +00:00
|
|
|
.if !defined(WITH_SMSD)
|
2008-07-27 20:25:00 +00:00
|
|
|
PLIST_SUB+= SMSD='@comment ' MSM='@comment ' PGM='@comment '
|
2008-06-12 14:45:25 +00:00
|
|
|
CONFIGURE_ARGS+= --disable-smsd
|
2003-12-04 22:00:20 +00:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= SMSD=''
|
2008-07-14 07:42:04 +00:00
|
|
|
USE_GNOME+= glib20
|
2008-07-27 20:25:00 +00:00
|
|
|
MAN8+= smsd.8
|
2008-03-16 09:11:50 +00:00
|
|
|
.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so) && !defined(WITHOUT_MYSQL)
|
2003-12-04 22:00:20 +00:00
|
|
|
USE_MYSQL= yes
|
|
|
|
PLIST_SUB+= MSM=''
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MSM='@comment '
|
|
|
|
.endif
|
2008-03-16 09:11:50 +00:00
|
|
|
.if exists(${LOCALBASE}/bin/psql) && !defined(WITHOUT_PGSQL)
|
2005-01-31 00:35:55 +00:00
|
|
|
USE_PGSQL= yes
|
2003-12-04 22:00:20 +00:00
|
|
|
PLIST_SUB+= PGM=''
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PGM='@comment '
|
|
|
|
.endif
|
2004-10-26 01:35:09 +00:00
|
|
|
.endif
|
2003-12-04 22:00:20 +00:00
|
|
|
|
|
|
|
.if defined(WITHOUT_X11)
|
|
|
|
CONFIGURE_ARGS+= --without-x
|
|
|
|
PLIST_SUB+= X11='@comment '
|
|
|
|
.else
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 17:56:05 +00:00
|
|
|
USE_XORG= xpm
|
2008-07-27 20:25:00 +00:00
|
|
|
USE_GNOME+= gtk20
|
2003-12-04 22:00:20 +00:00
|
|
|
PLIST_SUB+= X11=''
|
2008-06-12 14:45:25 +00:00
|
|
|
MAN1+= xgnokii.1
|
|
|
|
.endif
|
2003-12-04 22:00:20 +00:00
|
|
|
|
2008-07-27 20:25:00 +00:00
|
|
|
FIXPREFIX= Docs/man/gnokiid.8 Docs/DataCalls-QuickStart Docs/README \
|
|
|
|
common/cfgreader.c po/et.po po/sl.po
|
2001-10-19 15:25:17 +00:00
|
|
|
post-patch:
|
|
|
|
.for f in ${FIXPREFIX}
|
2003-05-20 23:52:47 +00:00
|
|
|
@${REINPLACE_CMD} -e "s:/etc/gnokiirc:${PREFIX}/etc/gnokiirc:g" \
|
|
|
|
${WRKSRC}/${f}
|
|
|
|
.endfor
|
|
|
|
@${REINPLACE_CMD} -e "s:%%PTHREAD_LIBS%%:${PTHREAD_LIBS}:; \
|
|
|
|
s:%%PTHREAD_CFLAGS%%:${PTHREAD_CFLAGS}:" ${WRKSRC}/configure
|
|
|
|
.for f in common/data/virtmodem.c utils/mgnokiidev.c
|
|
|
|
@${REINPLACE_CMD} -E -e "s:^(#ifdef.*)__OpenBSD__:\1__FreeBSD__:" \
|
|
|
|
${WRKSRC}/${f}
|
2001-10-19 15:25:17 +00:00
|
|
|
.endfor
|
2008-07-27 20:25:00 +00:00
|
|
|
# fix test(1) conditions in configure script
|
2007-12-11 21:15:48 +00:00
|
|
|
@${REINPLACE_CMD} -E \
|
|
|
|
-e 's|([[:space:]]+test[[:space:]]+.+)==([[:space:]]+"yes")|\1=\2|' \
|
|
|
|
${WRKSRC}/${CONFIGURE_SCRIPT}
|
2008-06-12 14:45:25 +00:00
|
|
|
@${MV} ${WRKSRC}/Docs/man/xgnokii.1x ${WRKSRC}/Docs/man/xgnokii.1
|
2001-10-19 15:25:17 +00:00
|
|
|
|
2003-12-04 22:00:20 +00:00
|
|
|
post-build:
|
|
|
|
.if defined(WITH_SMSD)
|
|
|
|
.if defined(WITH_MYSQL)
|
2008-06-12 14:45:25 +00:00
|
|
|
@${REINPLACE_CMD} -e 's/^#libsmsd_mysql_la_SOURCES/libsmsd_mysql_la_SOURCES/' ${WRKSRC}/smsd/Makefile.in
|
|
|
|
@${REINPLACE_CMD} -e 's/^#libsmsd_mysql_la_LDFLAGS/libsmsd_mysql_la_LDFLAGS/' ${WRKSRC}/smsd/Makefile.in
|
|
|
|
@${REINPLACE_CMD} -e 's/^#libsmsd_mysql_la_LIBADD/libsmsd_mysql_la_LIBADD/' ${WRKSRC}/smsd/Makefile.in
|
2003-12-04 22:00:20 +00:00
|
|
|
.endif
|
|
|
|
.if defined(WITH_PGSQL)
|
2008-06-12 14:45:25 +00:00
|
|
|
@${REINPLACE_CMD} -e 's/^#libsmsd_pq_la_SOURCES/libsmsd_pq_la_SOURCES/' ${WRKSRC}/smsd/Makefile.in
|
|
|
|
@${REINPLACE_CMD} -e 's/^#libsmsd_pq_la_LDFLAGS/libsmsd_pq_la_LDFLAGS/' ${WRKSRC}/smsd/Makefile.in
|
|
|
|
@${REINPLACE_CMD} -e 's/^#libsmsd_pq_la_LIBADD/libsmsd_pq_la_LIBADD/' ${WRKSRC}/smsd/Makefile.in
|
2003-12-04 22:00:20 +00:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2001-05-03 01:13:00 +00:00
|
|
|
pre-install:
|
2003-05-20 23:52:47 +00:00
|
|
|
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
1999-04-02 00:45:54 +00:00
|
|
|
|
|
|
|
post-install:
|
2006-04-09 17:16:12 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/xgnokii/xgnokii.pc ${PREFIX}/libdata/pkgconfig
|
2003-05-20 23:52:47 +00:00
|
|
|
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
2003-12-04 22:00:20 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2008-07-27 20:25:00 +00:00
|
|
|
${GMAKE} install -C ${WRKSRC}/Docs
|
|
|
|
.else
|
|
|
|
${GMAKE} install -C ${WRKSRC}/Docs/man
|
2003-12-04 22:00:20 +00:00
|
|
|
.endif
|
2001-10-15 15:43:58 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/Docs/sample/gnokiirc \
|
2002-05-23 01:02:28 +00:00
|
|
|
${PREFIX}/etc/gnokiirc.sample
|
2003-12-04 22:00:20 +00:00
|
|
|
.if defined(WITH_SMSD)
|
2004-02-13 19:13:27 +00:00
|
|
|
@cd ${WRKSRC}/smsd && ${GMAKE} install
|
2003-12-04 22:00:20 +00:00
|
|
|
${MKDIR} ${PREFIX}/share/smsd
|
2008-07-27 20:25:00 +00:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/smsd/action ${PREFIX}/share/smsd
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/smsd/README ${PREFIX}/share/smsd
|
2003-12-04 22:00:20 +00:00
|
|
|
.if defined(WITH_MYSQL)
|
2008-07-27 20:25:00 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/smsd/sms.tables.mysql.sql ${PREFIX}/share/smsd
|
2003-12-04 22:00:20 +00:00
|
|
|
.endif
|
|
|
|
.if defined(WITH_PGSQL)
|
2008-07-27 20:25:00 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/smsd/sms.tables.pq.sql ${PREFIX}/share/smsd
|
2003-12-04 22:00:20 +00:00
|
|
|
.endif
|
|
|
|
.endif
|
2008-07-27 20:25:00 +00:00
|
|
|
@${ECHO_MSG}
|
2001-10-15 15:43:58 +00:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2008-07-27 20:25:00 +00:00
|
|
|
@${ECHO_MSG}
|
1999-04-02 00:45:54 +00:00
|
|
|
|
2003-12-04 22:00:20 +00:00
|
|
|
.include <bsd.port.post.mk>
|