pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/dcraw dcraw: Disable jp2 support by default



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ceb8eb0ca693
branches:  trunk
changeset: 336525:ceb8eb0ca693
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Jul 16 22:50:24 2019 +0000

description:
dcraw: Disable jp2 support by default

Re-enable it with the 'jasper' option.

Part of the process of trying to minimize the potential impact of a
vulnerable jasper.

Bump PKGREVISION

diffstat:

 graphics/dcraw/Makefile   |  10 +++++-----
 graphics/dcraw/options.mk |  13 ++++++++++---
 2 files changed, 15 insertions(+), 8 deletions(-)

diffs (69 lines):

diff -r eaa6bde64e19 -r ceb8eb0ca693 graphics/dcraw/Makefile
--- a/graphics/dcraw/Makefile   Tue Jul 16 22:45:42 2019 +0000
+++ b/graphics/dcraw/Makefile   Tue Jul 16 22:50:24 2019 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.45 2019/07/10 17:53:39 sevan Exp $
+# $NetBSD: Makefile,v 1.46 2019/07/16 22:50:24 nia Exp $
 #
 # Changes can be found in the RCS file at
 # http://www.cybercom.net/~dcoffin/dcraw/RCS/dcraw.c,v
 
 DISTNAME=      dcraw-9.27.0
+PKGREVISION=   1
 CATEGORIES=    graphics
 MASTER_SITES=  http://www.cybercom.net/~dcoffin/dcraw/archive/
 
@@ -18,8 +19,8 @@
 USE_TOOLS+=            msgfmt
 USE_FEATURES+=         strnlen
 
-LIBS+=         -lm -ljasper -ljpeg
-CFLAGS+=       -DLOCALEDIR=\"${PREFIX}/${PKGLOCALEDIR}/locale\"
+LIBS+=         -lm -ljpeg
+CPPFLAGS+=     -DLOCALEDIR=\"${PREFIX}/${PKGLOCALEDIR}/locale\"
 
 DCRAW_LOCALES=         ca cs da de eo es fr hu it ja nl pl pt ro ru sv zh_CN zh_TW
 
@@ -37,7 +38,7 @@
 
 do-build:
        set -e; cd ${WRKSRC};                                   \
-       ${CC} ${CFLAGS} dcraw.c -o dcraw ${LDFLAGS} ${LIBS};    \
+       ${CC} ${CFLAGS} ${CPPFLAGS} dcraw.c -o dcraw ${LDFLAGS} ${LIBS};        \
        for l in ${DCRAW_LOCALES}; do                           \
                msgfmt -o dcraw_$${l}.mo dcraw_$${l}.po;        \
        done;
@@ -55,6 +56,5 @@
 .endfor
 
 .include "../../devel/gettext-lib/buildlink3.mk"
-.include "../../graphics/jasper/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r eaa6bde64e19 -r ceb8eb0ca693 graphics/dcraw/options.mk
--- a/graphics/dcraw/options.mk Tue Jul 16 22:45:42 2019 +0000
+++ b/graphics/dcraw/options.mk Tue Jul 16 22:50:24 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: options.mk,v 1.1 2014/01/27 20:25:17 wiz Exp $
+# $NetBSD: options.mk,v 1.2 2019/07/16 22:50:24 nia Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.dcraw
-PKG_SUPPORTED_OPTIONS= lcms
+PKG_SUPPORTED_OPTIONS= lcms jasper
 PKG_SUGGESTED_OPTIONS= lcms
 
 .include "../../mk/bsd.options.mk"
@@ -10,5 +10,12 @@
 LIBS+=         -llcms2
 .include "../../graphics/lcms2/buildlink3.mk"
 .else
-CFLAGS+=       -DNO_LCMS
+CPPFLAGS+=     -DNO_LCMS
 .endif
+
+.if !empty(PKG_OPTIONS:Mjasper)
+LIBS+=         -ljasper
+.include "../../graphics/jasper/buildlink3.mk"
+.else
+CPPFLAGS+=     -DNO_JASPER
+.endif



Home | Main Index | Thread Index | Old Index