aboutsummaryrefslogtreecommitdiffstats
path: root/print/libgnomeprint
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-06-27 01:49:39 +0800
committermarcus <marcus@FreeBSD.org>2003-06-27 01:49:39 +0800
commit8fdad312464a580fadce0dda02109efe6734757c (patch)
tree1376abf6035e14f1810dd801856afa7afffda941 /print/libgnomeprint
parentc14f6421f49b3673ce5b0d85e0cd696ad9452cd8 (diff)
downloadfreebsd-ports-gnome-8fdad312464a580fadce0dda02109efe6734757c.tar.gz
freebsd-ports-gnome-8fdad312464a580fadce0dda02109efe6734757c.tar.zst
freebsd-ports-gnome-8fdad312464a580fadce0dda02109efe6734757c.zip
Conditionalize CUPS support to fix the make package on bento.
Reported by: bento via kris
Diffstat (limited to 'print/libgnomeprint')
-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