Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 May 2001 21:15:42 -0400 (EDT)
From:      marcus@marcuscom.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/27650: Update samba to adds CUPS support
Message-ID:  <200105260115.f4Q1FgG24278@shumai.marcuscom.com>

next in thread | raw e-mail | index | archive | help

>Number:         27650
>Category:       ports
>Synopsis:       Add CUPS support to Samba 2.0
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 25 18:20:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Joe "Marcus" Clarke
>Release:        FreeBSD 4.3-RELEASE i386
>Organization:
MarcusCom
>Environment:
System: FreeBSD shumai.marcuscom.com 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sun May 6 01:46:59 EDT 2001 root@shumai.marcuscom.com:/usr/src/sys/compile/SHUMAI i386


	
>Description:
	These patches will add optional CUPS printing support to Samba 2.0.

>How-To-Repeat:
	
>Fix:


--- Makefile.orig	Fri May 25 21:00:47 2001
+++ Makefile	Fri May 25 21:09:04 2001
@@ -18,6 +18,10 @@
 
 MAINTAINER=	dwcjr@inethouston.net
 
+.if defined(WITH_CUPS)
+LIB_DEPENDS=	cups.2:${PORTSDIR}/print/cups
+.endif
+
 # directories
 VARDIR=		/var
 SAMBA_SPOOL=	${VARDIR}/spool/samba
@@ -37,6 +41,11 @@
 
 .if defined(KRB5_HOME) && exists(${KRB5_HOME})
 CONFIGURE_ARGS+=--with-krb5=${KRB5_HOME}
+.endif
+
+.if defined(WITH_CUPS)
+# This enables CUPS printing support in Samba.
+CONFIGURE_ARGS+=--with-cups=${LOCALBASE}
 .endif
 
 WRKSRC=		${WRKDIR}/${DISTNAME}/source

--- configure.orig	Fri May 25 20:34:00 2001
+++ configure	Fri May 25 20:51:55 2001
@@ -61,6 +61,8 @@
   --with-netatalk     Include experimental Netatalk support
   --without-netatalk  Don't include experimental Netatalk support (default)"
 ac_help="$ac_help
+  --with-cups=DIR    Where the CUPS includes and libraries are located (defaults to /usr)"
+ac_help="$ac_help
   --with-quotas     Include experimental disk-quota support
   --without-quotas  Don't include experimental disk-quota support (default)"
 ac_help="$ac_help
@@ -3252,7 +3254,36 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lcups  $LIBS"
+  ac_save_CFLAGS="$CFLAGS"
+  ac_save_LDFLAGS="$LDFLAGS"
+  withval="/usr"
+  if test "${with_cups+set}" = set; then
+      withval="$with_cups";
+      case "$withval" in
+      yes|no)
+        echo "configure: warning: --with-cups called without argument - will use default" 1>&w
+	CFLAGS="-I/usr/include $CFLAGS"
+	LIBS="-lcups $LIBS"
+	LDFLAGS="-L/usr/lib $LDFLAGS"
+      ;;
+      * )
+        CFLAGS="-I${withval}/include $CFLAGS"
+	LIBS="-lcups $LIBS"
+	LDFLAGS="-L${withval}/lib $LDFLAGS"
+      ;;
+      esac
+
+  else
+        CFLAGS="-I/usr/include $CFLAGS"
+	LIBS="-lcups $LIBS"
+	LDFLAGS="-L/usr/lib $LDFLAGS"
+  fi
+
+  if test ! -d ${withval}; then
+    echo "configure: error: called with --with-cups, but cups base directory ${withval} does not exist or is not a directory.  Aborting config" 1>&2
+    exit 1
+  fi
+
 cat > conftest.$ac_ext <<EOF
 #line 3258 "configure"
 #include "confdefs.h"
@@ -3276,6 +3307,8 @@
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+LDFLAGS="$ac_save_LDFLAGS"
 
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
@@ -3286,7 +3319,9 @@
 #define $ac_tr_lib 1
 EOF
 
+  CFLAGS="-I${withval}/include $CFLAGS"
   LIBS="-lcups $LIBS"
+  LDFLAGS="-L${withval}/lib $LDFLAGS"
 
 else
   echo "$ac_t""no" 1>&6
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105260115.f4Q1FgG24278>