Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jan 2002 22:54:19 -0500 (EST)
From:      Alan Eldridge <ports@geeksrus.net>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        dwcjr@freebsd.org
Subject:   ports/33803: Samba doesn't use Cups libs if configured to do so
Message-ID:  <200201120354.g0C3sJE43370@wwweasel.geeksrus.net>

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

>Number:         33803
>Category:       ports
>Synopsis:       Samba doesn't use Cups libs if configured to do so
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 11 20:00:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Alan Eldridge
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
Geeksrus.NET
>Environment:
System: FreeBSD wwweasel.geeksrus.net 4.4-STABLE FreeBSD 4.4-STABLE #0: Sun Dec 2 19:14:12 EST 2001 root@wwweasel.geeksrus.net:/usr/obj/usr/src/sys/WWWEASEL i386

>Description:

Samba contains code to use Cups directly without using command line
programs such as lpr.

This code is not activated due to being patched out in files/patch-ba.

This patch makes cups unconditionally linked in, but the default
printing system is not affected. Cups-lpr binaries are not required.

>How-To-Repeat:

>Fix:

Index: net/samba/Makefile
===================================================================
RCS file: /home/alane/cvsroot/ports/net/samba/Makefile,v
retrieving revision 1.67
diff -u -3 -r1.67 Makefile
--- net/samba/Makefile	11 Jan 2002 03:46:05 -0000	1.67
+++ net/samba/Makefile	12 Jan 2002 03:26:00 -0000
@@ -18,9 +18,7 @@
 
 MAINTAINER=	dwcjr@FreeBSD.org
 
-.if defined(WITH_CUPS)
 LIB_DEPENDS=	cups.2:${PORTSDIR}/print/cups-base
-.endif
 
 .if defined(WITH_RECYCLE)
 PATCH_SITES+=	http://www.amherst.edu/~bbstone/recycle_bin/2.2.2/
@@ -46,13 +44,12 @@
 
 .include <bsd.port.pre.mk>
 
+# to find CUPS libs, includes
+CONFIGURE_ENV+=	CPPFLAGS=-I${LOCALBASE}/include \
+		LDFLAGS=-L${LOCALBASE}/lib
+
 .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
 
 .if defined(WITH_ACL_SUPPORT)
Index: net/samba/files/patch-ba
===================================================================
RCS file: /home/alane/cvsroot/ports/net/samba/files/patch-ba,v
retrieving revision 1.3
diff -u -3 -r1.3 patch-ba
--- net/samba/files/patch-ba	16 Dec 2001 17:56:48 -0000	1.3
+++ net/samba/files/patch-ba	12 Jan 2002 03:23:10 -0000
@@ -1,27 +1,5 @@
---- configure.in.orig	Sat Oct 13 22:09:16 2001
-+++ configure.in	Tue Oct 16 17:21:21 2001
-@@ -406,21 +406,6 @@
- AC_CHECK_TYPE(ssize_t, int)
- AC_CHECK_TYPE(wchar_t, unsigned short)
- 
--############################################
--# for cups support we need libcups, and a handful of header files
--
--AC_CHECK_LIB(cups,httpConnect)
--
--# I wonder if there is a nicer way of doing this?
--
--if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
--        AC_CHECK_HEADERS(cups/cups.h cups/language.h)
--        if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
--                if test x"$ac_cv_header_cups_language_h" = x"yes"; then
--                        AC_DEFINE(HAVE_CUPS)
--                fi
--        fi
--fi
- 
- ############################################
- # we need libdl for PAM and the new VFS code
+--- configure.in.orig	Sat Oct 13 17:09:16 2001
++++ configure.in	Fri Jan 11 19:58:14 2002
 @@ -1622,7 +1607,7 @@
    yes)
      AC_MSG_RESULT(yes)
@@ -31,24 +9,3 @@
      CFLAGS="$CFLAGS -I$withval/include"
      LDFLAGS="$LDFLAGS -L$withval/lib"
      ;;
-@@ -1961,6 +1946,20 @@
-     ;;
-   esac ],
-   AC_MSG_RESULT(no)
-+)
-+
-+#################################################
-+# check for CUPS printing support
-+AC_MSG_CHECKING(whether to use CUPS printing)
-+AC_ARG_WITH(cups,
-+[  --with-cups=base-dir		Include CUPS printing support
-+   --without-cups		Don't include CUPS printing support (default)],
-+[  AC_MSG_RESULT(yes)
-+   LIBS="$LIBS -lcups"
-+   CFLAGS="$CFLAGS -I$withval/include"
-+   LDFLAGS="$LDFLAGS -L$withval/lib"
-+   AC_CHECK_LIB(cups,httpConnect)],
-+ AC_MSG_RESULT(no)
- )
- 
- 
Index: net/samba/files/patch-include-includes.h
===================================================================
RCS file: net/samba/files/patch-include-includes.h
diff -N net/samba/files/patch-include-includes.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/samba/files/patch-include-includes.h	12 Jan 2002 03:23:10 -0000
@@ -0,0 +1,14 @@
+--- include/includes.h.orig	Sat Oct 13 17:09:21 2001
++++ include/includes.h	Fri Jan 11 22:12:06 2002
+@@ -27,6 +27,11 @@
+ 
+ #include "local.h"
+ 
++#ifdef __FreeBSD__
++#define DEFAULT_PRINTING PRINT_BSD
++#define PRINTCAP_NAME "/etc/printcap"
++#endif /* __FreeBSD__ */
++
+ #ifdef AIX
+ #define DEFAULT_PRINTING PRINT_AIX
+ #define PRINTCAP_NAME "/etc/qconfig"
>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?200201120354.g0C3sJE43370>