From marcus@shumai.marcuscom.com  Fri May 25 18:15:29 2001
Return-Path: <marcus@shumai.marcuscom.com>
Received: from shumai.marcuscom.com (rdu26-228-058.nc.rr.com [66.26.228.58])
	by hub.freebsd.org (Postfix) with ESMTP id AB02B37B422
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 25 May 2001 18:15:28 -0700 (PDT)
	(envelope-from marcus@shumai.marcuscom.com)
Received: (from marcus@localhost)
	by shumai.marcuscom.com (8.11.3/8.11.3) id f4Q1FgG24278;
	Fri, 25 May 2001 21:15:42 -0400 (EDT)
	(envelope-from marcus)
Message-Id: <200105260115.f4Q1FgG24278@shumai.marcuscom.com>
Date: Fri, 25 May 2001 21:15:42 -0400 (EDT)
From: marcus@marcuscom.com
Reply-To: marcus@marcuscom.com
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Update samba to adds CUPS support
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         27650
>Category:       ports
>Synopsis:       Add CUPS support to Samba 2.0
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    greid
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 25 18:20:00 PDT 2001
>Closed-Date:    Thu Jun 7 12:19:34 PDT 2001
>Last-Modified:  Thu Jun 07 12:19:49 PDT 2001
>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:
Responsible-Changed-From-To: freebsd-ports->greid 
Responsible-Changed-By: greid 
Responsible-Changed-When: Fri May 25 18:26:12 PDT 2001 
Responsible-Changed-Why:  
I'll take a look at this 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27650 

From: "David W. Chapman Jr." <dwcjr@inethouston.net>
To: <FreeBSD-gnats-submit@freebsd.org>, <marcus@marcuscom.com>
Cc: "George Reid" <greid@FreeBSD.org>
Subject: Re: ports/27650: Add CUPS support to Samba 2.0
Date: Wed, 6 Jun 2001 20:21:31 -0500

 What's the latest on this?
 
 

From: Joe Clarke <marcus@marcuscom.com>
To: "David W. Chapman Jr." <dwcjr@inethouston.net>
Cc: <FreeBSD-gnats-submit@freebsd.org>,
	George Reid <greid@freebsd.org>
Subject: Re: ports/27650: Add CUPS support to Samba 2.0
Date: Wed, 6 Jun 2001 21:29:24 -0400 (EDT)

 Not sure, I submitted the PR with the patch.  It works fine for me.  All
 my users can print in beautiful, wonderful color without all the hassle of
 setting up lpd printer filters.
 
 Joe Clarke
 
 On Wed, 6 Jun 2001, David W. Chapman Jr. wrote:
 
 > What's the latest on this?
 >
 >
 >
 

From: "David W . Chapman Jr ." <dwcjr@inethouston.net>
To: Joe Clarke <marcus@marcuscom.com>
Cc: "David W. Chapman Jr." <dwcjr@inethouston.net>,
	FreeBSD-gnats-submit@freebsd.org, George Reid <greid@freebsd.org>
Subject: Re: ports/27650: Add CUPS support to Samba 2.0
Date: Wed, 6 Jun 2001 20:31:04 -0500

 On Wed, Jun 06, 2001 at 09:29:24PM -0400, Joe Clarke wrote:
 > Not sure, I submitted the PR with the patch.  It works fine for me.  All
 > my users can print in beautiful, wonderful color without all the hassle of
 > setting up lpd printer filters.
 > 
 If George doesn't commit it soon, I'll take care of it.
  
 -- 
 David W. Chapman Jr.
State-Changed-From-To: open->closed 
State-Changed-By: dwcjr 
State-Changed-When: Thu Jun 7 12:19:34 PDT 2001 
State-Changed-Why:  
Committed, thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27650 
>Unformatted:
