aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorvs <vs@FreeBSD.org>2004-05-05 05:35:25 +0800
committervs <vs@FreeBSD.org>2004-05-05 05:35:25 +0800
commit389778d034d341e29879c03f68859b32a2728368 (patch)
tree7d536a47c848df2fd5c40485da9a76eb8e7ebafa /graphics
parent8f8fe7a32d002909cfbb82f1d71b9e56322afe91 (diff)
downloadfreebsd-ports-gnome-389778d034d341e29879c03f68859b32a2728368.tar.gz
freebsd-ports-gnome-389778d034d341e29879c03f68859b32a2728368.tar.zst
freebsd-ports-gnome-389778d034d341e29879c03f68859b32a2728368.zip
- Solve ffs()-clash on -CURRENT [1]
- Fix build issue: 5.1 is OSVERSION 501000, not 510000 - Use OPTIONS - Make SNMP optional (suggested by: Anatoly Zaytman) - Make QT-dependency optional, off by default PR: ports/64945 [1] Submitted by: Marco Molteni Approved by: linimon (mentor)
Diffstat (limited to 'graphics')
-rw-r--r--graphics/hpoj/Makefile55
-rw-r--r--graphics/hpoj/files/patch-mlcd-ParPort.h13
2 files changed, 40 insertions, 28 deletions
diff --git a/graphics/hpoj/Makefile b/graphics/hpoj/Makefile
index 817e3c286916..3f1a409760f0 100644
--- a/graphics/hpoj/Makefile
+++ b/graphics/hpoj/Makefile
@@ -18,46 +18,50 @@ MAINTAINER= vs@FreeBSD.org
COMMENT= "HP OfficeJet Linux driver; printing, scanning, and photo-card access"
LIB_DEPENDS= sane.1:${PORTSDIR}/graphics/sane-backends \
- snmp.4:${PORTSDIR}/net-mgmt/net-snmp4 \
usb:${PORTSDIR}/devel/libusb
RUN_DEPENDS= bash:${PORTSDIR}/shells/bash2
+OPTIONS= CUPS "CUPS support" on \
+ SNMP "SNMP support (required for JetDirect)" on
+
+.if defined(WITH_X11)
+USE_QT_VER= 3
+USE_XLIB= yes
+PLIST_SUB+= X11=""
+.endif
+
+.include <bsd.port.pre.mk>
+
.if !defined(WITHOUT_CUPS)
WITH_CUPS= yes
.endif
+.if !defined(WITHOUT_SNMP)
+WITH_SNMP= yes
+.endif
+
.if defined(WITH_CUPS)
LIB_DEPENDS+= cups.2:${PORTSDIR}/print/cups-base
CONFIGURE_ARGS+=--with-cups-backend=${LOCALBASE}/libexec/cups/backend
PLIST_SUB+= CUPS=""
.else
+CONFIGURE_ARGS+=--without-cups
PLIST_SUB+= CUPS="@comment "
.endif
+.if defined(WITH_SNMP)
+LIB_DEPENDS+= snmp.4:${PORTSDIR}/net-mgmt/net-snmp4
+CONFIGURE_ARGS+=--with-snmp=${LOCALBASE}/include/ucd-snmp
+.else
+CONFIGURE_ARGS+=--without-snmp
+.endif
+
INSTALLS_SHLIB= yes
USE_REINPLACE= yes
USE_GMAKE= yes
USE_PERL5= yes
-.ifndef(WITHOUT_X11)
-USE_QT_VER= 3
-USE_XLIB= yes
-PLIST_SUB+= X11=""
-.else
-PLIST_SUB+= X11="@comment "
-.endif
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "i386" && ${OSVERSION} > 500000
-BROKEN= "ffs() clash, see i386/41930"
-.endif
-
-.if ${ARCH} != "i386"
-BROKEN= "Configure fails on !i386"
-.endif
-
.if ${ARCH} == "alpha"
EXTRA_PATCHES= ${FILESDIR}/extra-patch-mlcd-Makefile.in \
${FILESDIR}/extra-patch-mlcd-ParPort.h
@@ -65,22 +69,17 @@ EXTRA_PATCHES= ${FILESDIR}/extra-patch-mlcd-Makefile.in \
GNU_CONFIGURE= yes
# Necessary hacks to find libsnmp:
-.if ${OSVERSION} < 510000
+.if ${OSVERSION} < 501000
EXTRALDFLAGS= -lcipher
.endif
CONFIGURE_ENV= CFLAGS="${CFLAGS} -L${LOCALBASE}/lib ${PTHREAD_CFLAGS}"
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS} ${EXTRALDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}"
-CONFIGURE_ARGS+= --with-snmp=${LOCALBASE}/include/ucd-snmp
-.ifdef(WITHOUT_X11)
-CONFIGURE_ARGS+= --without-qt
+pre-everything::
+.if !defined(WITH_X11)
+ @${ECHO} "You can enable building of xojpanel (QT) through -DWITH_X11"
.endif
-pre-fetch:
- @${ECHO} You can disable building \'xojpanel\' and avoid the dependency on X11 and QT3 \
- by restarting the build with WITHOUT_X11
- @${ECHO} You can disable CUPS support with WITHOUT_CUPS
-
post-patch:
.for f in doc/info-devname.html doc/libptal.html doc/ptal-init.html doc/setup-photo-details.html \
doc/setup-print-details.html lib/ptal/ptal.c scripts/ptal-init.in
diff --git a/graphics/hpoj/files/patch-mlcd-ParPort.h b/graphics/hpoj/files/patch-mlcd-ParPort.h
new file mode 100644
index 000000000000..8d6eb41a4ce0
--- /dev/null
+++ b/graphics/hpoj/files/patch-mlcd-ParPort.h
@@ -0,0 +1,13 @@
+--- mlcd/ParPort.h.orig Tue Mar 30 18:42:02 2004
++++ mlcd/ParPort.h Tue Mar 30 18:51:23 2004
+@@ -32,6 +32,10 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ extern "C" {
++ #undef fls
++ #define fls iamdirtybutloved
++ #undef ffs__ParPort
++ #define ffs__ParPort iamdirtybutfancied
+ #include <machine/cpufunc.h>
+ }
+ #else