ports/65344: USE_ macros for graphics libraries
Trevor Johnson
trevor at FreeBSD.org
Fri Apr 9 04:00:35 UTC 2004
>Number: 65344
>Category: ports
>Synopsis: USE_ macros for graphics libraries
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 08 21:00:34 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator: Trevor Johnson
>Release:
>Organization:
>Environment:
bsd.port.mk 1.486
>Description:
Add new macros USE_JPEG, USE_MNG, USE_PNG and USE_TIFF for more
conveniently listing and maintaining dependencies on graphics
libraries.
>How-To-Repeat:
N/A
>Fix:
also at <URL:http://people.freebsd.org/~trevor/ports/use-graphics.diff>
Index: Mk/bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.486
diff -u -r1.486 bsd.port.mk
--- Mk/bsd.port.mk 3 Apr 2004 23:59:50 -0000 1.486
+++ Mk/bsd.port.mk 9 Apr 2004 03:53:27 -0000
@@ -377,6 +377,10 @@
# NO_OPENMOTIF.
# USE_SDL - Says that the port uses the sdl libraries.
# See bsd.sdl.mk for more information.
+# USE_JPEG - Says that the port uses libjpeg.
+# USE_MNG - Says that the port uses libmng.
+# USE_PNG - Says that the port uses libpng.
+# USE_TIFF - Says that the port uses libtiff.
# USE_XPM - Says that the port uses the xpm graphics libraries.
##
# USE_OPENSSL - Says that the port relies on the OpenSSL package.
@@ -1731,6 +1735,22 @@
.if defined(USE_MESA)
LIB_DEPENDS+= glut.3:${PORTSDIR}/graphics/libglut
+.endif
+
+.if defined(USE_JPEG)
+LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg
+.endif
+
+.if defined(USE_MNG)
+LIB_DEPENDS+= mng.1:${PORTSDIR}/graphics/libmng
+.endif
+
+.if defined(USE_PNG)
+LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png
+.endif
+
+.if defined(USE_TIFF)
+LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff
.endif
.if defined(USE_BISON)
Index: graphics/jpeg/Makefile
===================================================================
RCS file: /home/ncvs/ports/graphics/jpeg/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- graphics/jpeg/Makefile 18 Mar 2004 14:53:46 -0000 1.39
+++ graphics/jpeg/Makefile 9 Apr 2004 03:37:52 -0000
@@ -37,6 +37,11 @@
MAN1= cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
+.ifdef USE_JPEG
+.error USE_JPEG is defined as an environment variable, or in the arguments \
+ to "make". Please unset it and restart the build.
+.endif
+
post-extract:
@${CP} ${DISTDIR}/jpegexiforient.c ${WRKSRC}/
@${CP} ${DISTDIR}/exifautotran.txt ${WRKSRC}/exifautotran
Index: graphics/libmng/Makefile
===================================================================
RCS file: /home/ncvs/ports/graphics/libmng/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- graphics/libmng/Makefile 3 Apr 2004 17:45:33 -0000 1.19
+++ graphics/libmng/Makefile 9 Apr 2004 03:38:14 -0000
@@ -26,6 +26,11 @@
MAN3= libmng.3
MAN5= mng.5 jng.5
+.ifdef USE_MNG
+.error USE_MNG is defined as an environment variable, or in the arguments \
+ to "make". Please unset it and restart the build.
+.endif
+
post-install:
cd ${WRKSRC}/doc/man && ${INSTALL_MAN} ${MAN3} ${PREFIX}/man/man3 \
&& ${INSTALL_MAN} ${MAN5} ${PREFIX}/man/man5
Index: graphics/png/Makefile
===================================================================
RCS file: /home/ncvs/ports/graphics/png/Makefile,v
retrieving revision 1.60
diff -u -r1.60 Makefile
--- graphics/png/Makefile 16 Mar 2004 20:08:06 -0000 1.60
+++ graphics/png/Makefile 9 Apr 2004 03:38:30 -0000
@@ -33,6 +33,11 @@
MAN5= png.5
MANCOMPRESSED= maybe
+.ifdef USE_PNG
+.error USE_PNG is defined as an environment variable, or in the arguments \
+ to "make". Please unset it and restart the build.
+.endif
+
.include <bsd.port.pre.mk>
post-extract:
Index: graphics/tiff/Makefile
===================================================================
RCS file: /home/ncvs/ports/graphics/tiff/Makefile,v
retrieving revision 1.43
diff -u -r1.43 Makefile
--- graphics/tiff/Makefile 8 Mar 2004 12:56:09 -0000 1.43
+++ graphics/tiff/Makefile 9 Apr 2004 03:39:16 -0000
@@ -113,4 +113,9 @@
TIFFtile.3t TIFFTileRowSize.3t \
TIFFtile.3t TIFFVTileSize.3t
+.ifdef USE_TIFF
+.error USE_TIFF is defined as an environment variable, or in the arguments \
+ to "make". Please unset it and restart the build.
+.endif
+
.include <bsd.port.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list