From d006f1a6573110f831f23f88cc077a940c002ee0 Mon Sep 17 00:00:00 2001
From: Pav Lucistnik <pav@FreeBSD.org>
Date: Tue, 28 Dec 2004 20:52:16 +0000
Subject: - Add optional knob for libical

PR:		ports/75442
Submitted by:	Guido Falsi <mad@madpilot.net> (maintainer)
Requested by:	Sven Berkvens-Matthijsse <sven@berkvens.net>
---
 comms/gnokii/Makefile              |  8 ++++++++
 comms/gnokii/files/patch-configure | 13 +++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

(limited to 'comms/gnokii')

diff --git a/comms/gnokii/Makefile b/comms/gnokii/Makefile
index 4421dbaee7c7..2025818b2a86 100644
--- a/comms/gnokii/Makefile
+++ b/comms/gnokii/Makefile
@@ -43,6 +43,14 @@ WANT_GNOME=	yes
 
 .include <bsd.port.pre.mk>
 
+.if exists(${LOCALBASE}/lib/libical.so.0)
+WITH_ICAL=	yes
+.endif
+
+.if defined(WITH_ICAL)
+LIB_DEPENDS+=	ical.0:${PORTSDIR}/devel/libical
+.endif
+
 # 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
diff --git a/comms/gnokii/files/patch-configure b/comms/gnokii/files/patch-configure
index b57945d1760e..38c867b9607d 100644
--- a/comms/gnokii/files/patch-configure
+++ b/comms/gnokii/files/patch-configure
@@ -1,5 +1,5 @@
---- configure.orig	Mon Jul  5 00:04:50 2004
-+++ configure	Tue Jul  6 12:56:33 2004
+--- configure.orig	Sun Oct 17 21:44:38 2004
++++ configure	Mon Dec 27 12:48:43 2004
 @@ -26348,13 +26348,15 @@
  # First of all, check if the user has set any of the PTHREAD_LIBS,
  # etcetera environment variables, and if threads linking works using
@@ -30,3 +30,12 @@
                  *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
          esac
          echo "$as_me:$LINENO: result: ${flag}" >&5
+@@ -27570,7 +27572,7 @@
+ USE_LIBICAL="no"
+ OLD_LIBS="$LIBS"
+ OLD_CFLAGS="$CFLAGS"
+-LIBS="$LIBS $ICAL_LIBS -lpthread -lical"
++LIBS="$LIBS $ICAL_LIBS -L/usr/local %%PTHREAD_LIBS%% -lical"
+ CFLAGS="$CFLAGS $ICAL_CFLAGS"
+ echo "$as_me:$LINENO: checking whether libical is installed" >&5
+ echo $ECHO_N "checking whether libical is installed... $ECHO_C" >&6
-- 
cgit v1.2.3