summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2003-06-26 17:49:39 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2003-06-26 17:49:39 +0000
commit327b7e5a8b218671de3408190841a004656182db (patch)
tree44837bd506de1748f7b581ee8fa97e64f15b6181 /print
parentAdd platero, an MLDonkey GUI for KDE (diff)
Conditionalize CUPS support to fix the make package on bento.
Reported by: bento via kris
Notes
Notes: svn path=/head/; revision=83687
Diffstat (limited to 'print')
-rw-r--r--print/libgnomeprint/Makefile20
-rw-r--r--print/libgnomeprint/pkg-plist6
2 files changed, 21 insertions, 5 deletions
diff --git a/print/libgnomeprint/Makefile b/print/libgnomeprint/Makefile
index b984a98196dc..e20d734538f3 100644
--- a/print/libgnomeprint/Makefile
+++ b/print/libgnomeprint/Makefile
@@ -7,6 +7,7 @@
PORTNAME= libgnomeprint
PORTVERSION= 2.2.1.3
+PORTREVISION= 1
CATEGORIES= print gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/2.2
@@ -23,10 +24,25 @@ USE_GNOME= gnomeprefix gnomehack gnomehier libbonobo libartlgpl2 gtk20
INSTALLS_SHLIB= yes
USE_LIBTOOL= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LIBS="-L${LOCALBASE}/lib"
+ LDFLAGS="-L${LOCALBASE}/lib"
PLIST_SUB= VERSION=${PORTVERSION}
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/lib/libcups.so)
+WITH_CUPS= yes
+.endif
+
+.if defined(WITH_CUPS) && !defined(WITHOUT_CUPS)
+CONFIGURE_ARGS+= --with-cups
+LIB_DEPENDS+= cups.2:${PORTSDIR}/print/cups-base
+PLIST_SUB+= CUPS:=""
+.else
+CONFIGURE_ARGS+= --without-cups
+PLIST_SUB+= CUPS:="@comment "
+.endif
+
post-patch:
@${FIND} ${WRKSRC} -name '*.[ch]' | ${XARGS} ${REINPLACE_CMD} -e \
's|<malloc[.]h>|<stdlib.h>|'
@@ -36,4 +52,4 @@ post-install:
@${MKDIR} ${PREFIX}/etc/gnome/libgnomeprint-2.0/fonts
@${TOUCH} ${PREFIX}/etc/gnome/libgnomeprint-2.0/fonts/gnome-print.fontmap
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/print/libgnomeprint/pkg-plist b/print/libgnomeprint/pkg-plist
index a3933c09ffec..1ce047e08b16 100644
--- a/print/libgnomeprint/pkg-plist
+++ b/print/libgnomeprint/pkg-plist
@@ -31,9 +31,9 @@ include/libgnomeprint-2.2/libgnomeprint/private/gpa-utils.h
lib/libgnomeprint-2-2.a
lib/libgnomeprint-2-2.so
lib/libgnomeprint-2-2.so.0
-lib/libgnomeprint/%%VERSION%%/modules/libgnomeprintcups.a
-lib/libgnomeprint/%%VERSION%%/modules/libgnomeprintcups.so
-lib/libgnomeprint/%%VERSION%%/modules/libgnomeprintcups.so.0
+%%CUPS:%%lib/libgnomeprint/%%VERSION%%/modules/libgnomeprintcups.a
+%%CUPS:%%lib/libgnomeprint/%%VERSION%%/modules/libgnomeprintcups.so
+%%CUPS:%%lib/libgnomeprint/%%VERSION%%/modules/libgnomeprintcups.so.0
lib/libgnomeprint/%%VERSION%%/modules/transports/libgnomeprint-custom.so
lib/libgnomeprint/%%VERSION%%/modules/transports/libgnomeprint-file.so
lib/libgnomeprint/%%VERSION%%/modules/transports/libgnomeprint-lpr.so