- 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)
This commit is contained in:
parent
a6de9bdd90
commit
4d6d4458d9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=108407
2 changed files with 40 additions and 28 deletions
|
@ -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
|
||||
|
|
13
graphics/hpoj/files/patch-mlcd-ParPort.h
Normal file
13
graphics/hpoj/files/patch-mlcd-ParPort.h
Normal file
|
@ -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
|
Loading…
Reference in a new issue