Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 2009 17:05:55 +0200
From:      Marcin Wisnicki <mwisnicki+freebsd@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        ahze@FreeBSD.org
Subject:   ports/139888: [PATCH] print/cupsddk: allow to build without X11/FLTK
Message-ID:  <4ae317d5.0837560a.6506.5795@mx.google.com>
Resent-Message-ID: <200910241540.n9OFe4u6083399@freefall.freebsd.org>

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

>Number:         139888
>Category:       ports
>Synopsis:       [PATCH] print/cupsddk: allow to build without X11/FLTK
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 24 15:40:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Marcin Wisnicki
>Release:        FreeBSD 7.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD ghost.pnet.one.pl 7.2-STABLE FreeBSD 7.2-STABLE #3: Sat Oct 17 20:50:32 CEST 2009
>Description:
Add option to disable linking with FLTK.
Patch taken from Gentoo.

There seems to be no functional difference with FLTK enabled or disabled.
Actually, I couldn't find any reference to fltk in cupsddk sources, so maybe
the option should default to OFF.

Added file(s):
- files/patch-configure.in

Port maintainer (ahze@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- cupsddk-1.2.3_4.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/print/cupsddk.orig/Makefile /usr/ports/print/cupsddk/Makefile
--- /usr/ports/print/cupsddk.orig/Makefile	2009-08-03 00:13:40.000000000 +0200
+++ /usr/ports/print/cupsddk/Makefile	2009-10-23 18:16:33.000000000 +0200
@@ -7,7 +7,7 @@
 
 PORTNAME=	cupsddk
 PORTVERSION=	1.2.3
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	print devel
 MASTER_SITES=	EASYSW
 MASTER_SITE_SUBDIR=	${PORTNAME}/${DISTVERSION}
@@ -16,21 +16,30 @@
 MAINTAINER=	ahze@FreeBSD.org
 COMMENT=	CUPS Driver Development Kit
 
-LIB_DEPENDS=	fltk.1:${PORTSDIR}/x11-toolkits/fltk \
-		cupsimage.2:${PORTSDIR}/print/cups-image
+LIB_DEPENDS=	cupsimage.2:${PORTSDIR}/print/cups-image
 
 WRKSRC=	${WRKDIR}/${PORTNAME}-${DISTVERSION}
 GNU_CONFIGURE=	yes
+USE_AUTOTOOLS=	autoconf:262
 USE_GMAKE=	yes
 
+OPTIONS=	X11	"built with FLTK gui" on
+
 MAN1=	commandtoescpx.1 commandtopclx.1 cupsprofile.1 ppdc.1 ppdhtml.1 \
 	ppdi.1 ppdmerge.1 ppdpo.1 rastertoescpx.1 rastertopclx.1
 MAN5=	ppdcfile.5
 
+.include <bsd.port.pre.mk>
+
 .if defined(WITH_DEBUG)
 CONFIGURE_ARGS+=	--enable-debug
 .endif
 
+.if defined(WITH_X11)
+LIB_DEPENDS+=	fltk.1:${PORTSDIR}/x11-toolkits/fltk
+CONFIGURE_ARGS+=	--with-fltk
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|/cupsprofile.ppm|${DATADIR:S,${PREFIX}/share,,}/cupsprofile.ppm|' \
 		${WRKSRC}/cups/cupsprofile.c
@@ -40,4 +49,4 @@
 post-install:
 	@${INSTALL_DATA} ${WRKSRC}/cups/cupsprofile.ppm ${DATADIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/print/cupsddk.orig/files/patch-configure.in /usr/ports/print/cupsddk/files/patch-configure.in
--- /usr/ports/print/cupsddk.orig/files/patch-configure.in	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/print/cupsddk/files/patch-configure.in	2009-10-23 17:52:42.000000000 +0200
@@ -0,0 +1,27 @@
+diff -urN configure.in configure.in
+--- configure.in	2007-10-05 22:42:17.000000000 +0200
++++ configure.in	2007-10-14 20:19:40.000000000 +0200
+@@ -155,14 +155,16 @@
+ AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR(CUPS headers are not installed!))
+ 
+ dnl Check for FLTK...
+-AC_PATH_PROG(FLTKCONFIG,fltk-config)
++AC_ARG_WITH([fltk], AS_HELP_STRING([--with-fltk], [Build with fltk library GUI (default: disabled)]))
+ 
+-if test "x$FLTKCONFIG" = x; then
+-#	AC_MSG_ERROR([Sorry, the CUPS DDK requires FLTK 1.1.x.])
+-	GUILIBS=""
+-else
+-	CXXFLAGS="`$FLTKCONFIG --cflags` $CXXFLAGS"
+-	GUILIBS="`$FLTKCONFIG --use-images --ldstaticflags`"
++if test "x$with_fltk" == "xyes"; then
++	AC_PATH_PROG(FLTKCONFIG,fltk-config)
++	if test "x$FLTKCONFIG" = x; then
++		AC_MSG_ERROR([Sorry, the CUPS DDK GUI requires FLTK 1.1.x.])
++	else
++		CXXFLAGS="`$FLTKCONFIG --cflags` $CXXFLAGS"
++		GUILIBS="`$FLTKCONFIG --use-images --ldstaticflags`"
++	fi
+ fi
+ 
+ AC_SUBST(FLTKCONFIG)
diff -ruN --exclude=CVS /usr/ports/print/cupsddk.orig/pkg-plist /usr/ports/print/cupsddk/pkg-plist
--- /usr/ports/print/cupsddk.orig/pkg-plist	2009-06-09 16:25:44.000000000 +0200
+++ /usr/ports/print/cupsddk/pkg-plist	2009-10-23 18:12:49.000000000 +0200
@@ -57,6 +57,7 @@
 @dirrmtry share/cups/drv
 @dirrmtry share/cups
 @dirrmtry share/doc/cups/help
+@dirrmtry share/doc/cups/examples
 @dirrmtry share/doc/cups
 @dirrmtry libexec/cups/driver
 @dirrmtry libexec/cups
--- cupsddk-1.2.3_4.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ae317d5.0837560a.6506.5795>