Bug 227368 - New port: graphics/phpsane: web-based frontend for SANE written in HTML/PHP so you can scan with your web-browser
Summary: New port: graphics/phpsane: web-based frontend for SANE written in HTML/PHP s...
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2018-04-08 12:12 UTC by Gerrit Beine
Modified: 2019-06-01 13:31 UTC (History)
0 users

See Also:


Attachments
The phpSANE port files (9.84 KB, text/plain)
2018-04-08 12:12 UTC, Gerrit Beine
no flags Details
Poudriere build log (36.60 KB, text/plain)
2018-04-08 12:13 UTC, Gerrit Beine
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerrit Beine 2018-04-08 12:12:28 UTC
Created attachment 192333 [details]
The phpSANE port files

This port adds phpSANE to FreeBSD.

phpSANE is a web-based frontend for SANE written in HTML/PHP so you can scan
with your web-browser. It also supports OCR.

WWW: http://phpsane.sourceforge.net/
Comment 1 Gerrit Beine 2018-04-08 12:13:53 UTC
Created attachment 192334 [details]
Poudriere build log
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2019-05-18 09:09:25 UTC
Hello,

is this still relevant?  I'm a little concerned that the last release
of phpSANE was in 2013.  Does it work correctly with PHP 7.x?

XMASTER_SITES=	SF/${PORTNAME}/${PORTSANE}/${PORTVERSION}

The distfile does not fetch.  What is ${PORTSANE} ?

XIMAGICK_RUN_DEPENDS=	convert:graphics/ImageMagick-nox11

graphics/ImageMagick-nox11 no longer exists.  You must pick either
of graphics/ImageMagick{6,7}-nox11.

XNO_ARCH=	yes
XNO_BUILD=	yes
XNO_WRKSUBDIR=	yes
X
XPLIST_SUB+=	PHPSANE_GROUP=${PHPSANE_GROUP} \
X		PHPSANE_TMPDIR=${PHPSANE_TMPDIR} \
X		PHPSANE_OUTPUTDIR=${PHPSANE_OUTPUTDIR} \
X		PHPSANE_SCANNERSDIR=${PHPSANE_SCANNERSDIR} \

These need to be before OPTIONS_DEFINE.  Also replace the += with
just =.

X	cd ${WRKSRC} ; \
X	    ${FIND} * -type d -exec ${MKDIR} "${STAGEDIR}${WWWDIR}/{}" \;
X	cd ${WRKSRC} ; \
X	    ${FIND} * ! -type d ! -name Thumbs.db ! -name '*.zip' \
X		! -name '*.orig' -exec ${INSTALL_DATA} "{}" \
X		"${STAGEDIR}${WWWDIR}/{}" \;

Please use ${COPYTREE_SHARE} instead.

X	${MKDIR} "${STAGEDIR}${PHPSANE_TMPDIR}"
X	${MKDIR} "${STAGEDIR}${PHPSANE_OUTPUTDIR}"
X	${MKDIR} "${STAGEDIR}${PHPSANE_SCANNERSDIR}"

No need for the "

X+$PNMTOJPEG = "/usr/local/bin/pnmtojpeg"; //netpbm pnm to jpeg conversion binary
X+$PNMTOTIFF = "/usr/local/bin/pnmtotiff"; //netpbm pnm to tiff conversion binary
X+$PNMTOBMP  = "/usr/local/bin/ppmtobmp";  //netpbm ppm to bmp conversion binary
X+$PNMTOPNG  = "/usr/local/bin/pnmtopng";  //netpbm pnm to png conversion binary
X+$CONVERT   = "/usr/local/bin/convert";   //ImageMagick convert binary
X+$IDENTIFY  = "/usr/local/bin/identify";  //ImageMagick binary used to test for PDF support
X if(!`ls $GOCR`) $do_format_txt = false; //disable OCR when not available

/usr/local is user settable via LOCALBASE, so hardcoding it like
this is probably wrong.  Maybe add an additional

post-patch:
	@${REINPLACE_CMD} 's,/usr/local,${LOCALBASE},' ${WRKSRC}/incl/config.php

or do it completely with REINPLACE_CMD instead.