[Midnightbsd-cvs] mports [24703] trunk/graphics: add libraw

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Nov 25 12:16:46 EST 2018


Revision: 24703
          http://svnweb.midnightbsd.org/mports/?rev=24703
Author:   laffer1
Date:     2018-11-25 12:16:46 -0500 (Sun, 25 Nov 2018)
Log Message:
-----------
add libraw

Modified Paths:
--------------
    trunk/graphics/Makefile

Added Paths:
-----------
    trunk/graphics/libraw/
    trunk/graphics/libraw/Makefile
    trunk/graphics/libraw/distinfo
    trunk/graphics/libraw/files/
    trunk/graphics/libraw/files/patch-Makefile.in
    trunk/graphics/libraw/files/patch-configure
    trunk/graphics/libraw/files/patch-internal_dcraw__common.cpp
    trunk/graphics/libraw/files/patch-internal_libraw__x3f.cpp
    trunk/graphics/libraw/pkg-descr
    trunk/graphics/libraw/pkg-plist

Modified: trunk/graphics/Makefile
===================================================================
--- trunk/graphics/Makefile	2018-11-25 17:15:09 UTC (rev 24702)
+++ trunk/graphics/Makefile	2018-11-25 17:16:46 UTC (rev 24703)
@@ -102,6 +102,7 @@
 SUBDIR += libopenraw
 SUBDIR += libpotrace
 SUBDIR += libqrencode
+SUBDIR += libraw
 SUBDIR += librsvg2
 SUBDIR += libspiro
 SUBDIR += libsvg

Added: trunk/graphics/libraw/Makefile
===================================================================
--- trunk/graphics/libraw/Makefile	                        (rev 0)
+++ trunk/graphics/libraw/Makefile	2018-11-25 17:16:46 UTC (rev 24703)
@@ -0,0 +1,75 @@
+# $MidnightBSD$
+
+PORTNAME=	libraw
+PORTVERSION=	0.18.13
+CATEGORIES=	graphics
+MASTER_SITES=	http://www.libraw.org/data/
+DISTNAME=	LibRaw-${PORTVERSION}
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Library for manipulating raw images
+
+LICENSE=	lgpl2.1 cddl
+LICENSE_COMB=	dual
+
+USE_LDCONFIG=	yes
+USES=		cpe libtool localbase pathfix pkgconfig
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--disable-examples
+INSTALL_TARGET=	install-strip
+
+PORTDOCS=	*
+PORTEXAMPLES=	*
+
+DEMOSAIC_PACK_VERSION=	0.18.8
+
+OPTIONS_DEFINE=		DEMOSAIC_PACK_GPL2 DEMOSAIC_PACK_GPL3 \
+			DOCS EXAMPLES JASPER JPEG LCMS2 OPENMP OPTIMIZED_CFLAGS
+OPTIONS_DEFAULT=	JPEG LCMS2
+
+DEMOSAIC_PACK_GPL2_DESC=		GPLv2 demosaic pack
+DEMOSAIC_PACK_GPL2_CONFIGURE_OFF=	--disable-demosaic-pack-gpl2
+DEMOSAIC_PACK_GPL2_CONFIGURE_ON=	--enable-demosaic-pack-gpl2=../LibRaw-demosaic-pack-GPL2-${DEMOSAIC_PACK_VERSION}
+DEMOSAIC_PACK_GPL2_DISTFILES=		LibRaw-demosaic-pack-GPL2-${DEMOSAIC_PACK_VERSION}.tar.gz
+DEMOSAIC_PACK_GPL2_VARS=		LICENSE=GPLv2+ \
+					LICENSE_COMB=single
+
+DEMOSAIC_PACK_GPL3_DESC=		GPLv3 demosaic pack
+DEMOSAIC_PACK_GPL3_CONFIGURE_OFF=	--disable-demosaic-pack-gpl3
+DEMOSAIC_PACK_GPL3_CONFIGURE_ON=	--enable-demosaic-pack-gpl3=../LibRaw-demosaic-pack-GPL3-${DEMOSAIC_PACK_VERSION}
+DEMOSAIC_PACK_GPL3_DISTFILES=		LibRaw-demosaic-pack-GPL3-${DEMOSAIC_PACK_VERSION}.tar.gz
+DEMOSAIC_PACK_GPL3_VARS=		LICENSE=GPLv3+ \
+					LICENSE_COMB=single
+
+JASPER_CONFIGURE_ENABLE=		jasper
+JASPER_LIB_DEPENDS=			libjasper.so:graphics/jasper
+
+JPEG_CONFIGURE_ENABLE=			jpeg
+JPEG_USES=				jpeg
+
+LCMS2_CONFIGURE_ENABLE=			lcms
+LCMS2_LIB_DEPENDS=			liblcms2.so:graphics/lcms2
+
+OPENMP_DESC=				OpenMP support (implies GCC)
+OPENMP_CONFIGURE_ENABLE=		openmp
+OPENMP_USES=				compiler:openmp
+
+OPTIMIZED_CFLAGS_CFLAGS=		-O3
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|-lstdc++||g' ${WRKSRC}/*.pc.in
+
+# Use "\*" instead of "." in COPYTREE_SHARE commands as "." has
+# the undesired effect of copying ".deps" directory
+post-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC}/doc && \
+		${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	cd ${WRKSRC}/samples && \
+		${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.mk>


Property changes on: trunk/graphics/libraw/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/libraw/distinfo
===================================================================
--- trunk/graphics/libraw/distinfo	                        (rev 0)
+++ trunk/graphics/libraw/distinfo	2018-11-25 17:16:46 UTC (rev 24703)
@@ -0,0 +1,7 @@
+TIMESTAMP = 1530409608
+SHA256 (LibRaw-0.18.13.tar.gz) = cb1f9d0d1fabc8967d501d95c05d2b53d97a2b917345c66553b1abbea06757ca
+SIZE (LibRaw-0.18.13.tar.gz) = 1287631
+SHA256 (LibRaw-demosaic-pack-GPL2-0.18.8.tar.gz) = 0b24bcf7bbb5d13fde58bb071f94dc9354be09bc44b2bba0698493065e99f8da
+SIZE (LibRaw-demosaic-pack-GPL2-0.18.8.tar.gz) = 30868
+SHA256 (LibRaw-demosaic-pack-GPL3-0.18.8.tar.gz) = ffd6916cd66c8101e4e6b589799f256c897748d2fd2486aa34c3705146dbc701
+SIZE (LibRaw-demosaic-pack-GPL3-0.18.8.tar.gz) = 39002


Property changes on: trunk/graphics/libraw/distinfo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/libraw/files/patch-Makefile.in
===================================================================
--- trunk/graphics/libraw/files/patch-Makefile.in	                        (rev 0)
+++ trunk/graphics/libraw/files/patch-Makefile.in	2018-11-25 17:16:46 UTC (rev 24703)
@@ -0,0 +1,14 @@
+--- Makefile.in.orig	2016-12-27 15:20:16 UTC
++++ Makefile.in
+@@ -474,10 +474,7 @@ nobase_include_HEADERS = libraw/libraw.h
+ 
+ 
+ # Docs
+-doc_DATA = COPYRIGHT \
+-			LICENSE.CDDL \
+-			LICENSE.LGPL \
+-			Changelog.txt
++doc_DATA = 
+ 
+ 
+ # pkg-config .pc files


Property changes on: trunk/graphics/libraw/files/patch-Makefile.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/libraw/files/patch-configure
===================================================================
--- trunk/graphics/libraw/files/patch-configure	                        (rev 0)
+++ trunk/graphics/libraw/files/patch-configure	2018-11-25 17:16:46 UTC (rev 24703)
@@ -0,0 +1,11 @@
+--- configure.orig	2016-12-27 15:20:15 UTC
++++ configure
+@@ -2763,7 +2763,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+ $as_echo "$MKDIR_P" >&6; }
+ 
+-for ac_prog in gawk mawk nawk awk
++for ac_prog in awk
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2


Property changes on: trunk/graphics/libraw/files/patch-configure
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/libraw/files/patch-internal_dcraw__common.cpp
===================================================================
--- trunk/graphics/libraw/files/patch-internal_dcraw__common.cpp	                        (rev 0)
+++ trunk/graphics/libraw/files/patch-internal_dcraw__common.cpp	2018-11-25 17:16:46 UTC (rev 24703)
@@ -0,0 +1,32 @@
+Use strnlen(3) and strcasestr(3) from FreeBSD's libc instead of the bundled
+versions. Patch has been applied upstream in master branch:
+https://github.com/LibRaw/LibRaw/commit/b1a2984
+
+--- internal/dcraw_common.cpp.orig	2017-09-22 06:35:16 UTC
++++ internal/dcraw_common.cpp
+@@ -51,6 +51,8 @@ int CLASS fcol (int row, int col)
+   if (filters == 9) return xtrans[(row+6) % 6][(col+6) % 6];
+   return FC(row,col);
+ }
++
++#if !defined(__FreeBSD__)
+ static size_t local_strnlen(const char *s, size_t n)
+ {
+   const char *p = (const char *)memchr(s, 0, n);
+@@ -58,6 +60,7 @@ static size_t local_strnlen(const char *
+ }
+ /* add OS X version check here ?? */
+ #define strnlen(a,b) local_strnlen(a,b)
++#endif
+ 
+ #ifdef LIBRAW_LIBRARY_BUILD
+ static int stread(char *buf, size_t len, LibRaw_abstract_datastream *fp)
+@@ -69,7 +72,7 @@ static int stread(char *buf, size_t len,
+ #define stmread(buf,maxlen,fp) stread(buf,MIN(maxlen,sizeof(buf)),fp)
+ #endif
+ 
+-#ifndef __GLIBC__
++#if !defined(__GLIBC__) && !defined(__FreeBSD__)
+ char *my_memmem (char *haystack, size_t haystacklen,
+ 	      char *needle, size_t needlelen)
+ {


Property changes on: trunk/graphics/libraw/files/patch-internal_dcraw__common.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/libraw/files/patch-internal_libraw__x3f.cpp
===================================================================
--- trunk/graphics/libraw/files/patch-internal_libraw__x3f.cpp	                        (rev 0)
+++ trunk/graphics/libraw/files/patch-internal_libraw__x3f.cpp	2018-11-25 17:16:46 UTC (rev 24703)
@@ -0,0 +1,39 @@
+In file included from src/libraw_cxx.cpp:5472:
+src/../internal/libraw_x3f.cpp:1404:19: error: non-constant-expression cannot be narrowed from type
+      'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing]
+  int16_t c[3] = {offset,offset,offset};
+                  ^~~~~~
+src/../internal/libraw_x3f.cpp:1404:19: note: insert an explicit cast to silence this issue
+  int16_t c[3] = {offset,offset,offset};
+                  ^~~~~~
+                  static_cast<int16_t>( )
+src/../internal/libraw_x3f.cpp:1404:26: error: non-constant-expression cannot be narrowed from type
+      'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing]
+  int16_t c[3] = {offset,offset,offset};
+                         ^~~~~~
+src/../internal/libraw_x3f.cpp:1404:26: note: insert an explicit cast to silence this issue
+  int16_t c[3] = {offset,offset,offset};
+                         ^~~~~~
+                         static_cast<int16_t>( )
+src/../internal/libraw_x3f.cpp:1404:33: error: non-constant-expression cannot be narrowed from type
+      'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing]
+  int16_t c[3] = {offset,offset,offset};
+                                ^~~~~~
+src/../internal/libraw_x3f.cpp:1404:33: note: insert an explicit cast to silence this issue
+  int16_t c[3] = {offset,offset,offset};
+                                ^~~~~~
+                                static_cast<int16_t>( )
+
+https://github.com/LibRaw/LibRaw/commit/6d4b3ea
+
+--- internal/libraw_x3f.cpp.orig	2017-09-22 06:23:54 UTC
++++ internal/libraw_x3f.cpp
+@@ -1401,7 +1401,7 @@ static void huffman_decode_row(x3f_info_t *I,
+   x3f_image_data_t *ID = &DEH->data_subsection.image_data;
+   x3f_huffman_t *HUF = ID->huffman;
+ 
+-  int16_t c[3] = {offset,offset,offset};
++  int16_t c[3] = {(int16_t)offset,(int16_t)offset,(int16_t)offset};
+   int col;
+   bit_state_t BS;
+ 


Property changes on: trunk/graphics/libraw/files/patch-internal_libraw__x3f.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/libraw/pkg-descr
===================================================================
--- trunk/graphics/libraw/pkg-descr	                        (rev 0)
+++ trunk/graphics/libraw/pkg-descr	2018-11-25 17:16:46 UTC (rev 24703)
@@ -0,0 +1,13 @@
+LibRaw is a library for reading RAW files obtained from digital photo
+cameras (CRW/CR2, NEF, RAF, DNG, and others).
+
+LibRaw is based on the source codes of the dcraw utility, where part of
+drawbacks have already been eliminated and part will be fixed in future.
+The users of the library are provided with API to be built into their
+software programs.
+
+LibRaw is intended to be used in any software that involves RAW file
+processing for a variety of purposes: RAW converters, data analyzers,
+panorama stitchers, noise suppressors, etc.
+
+WWW: http://www.libraw.org/


Property changes on: trunk/graphics/libraw/pkg-descr
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/graphics/libraw/pkg-plist
===================================================================
--- trunk/graphics/libraw/pkg-plist	                        (rev 0)
+++ trunk/graphics/libraw/pkg-plist	2018-11-25 17:16:46 UTC (rev 24703)
@@ -0,0 +1,17 @@
+include/libraw/libraw.h
+include/libraw/libraw_alloc.h
+include/libraw/libraw_const.h
+include/libraw/libraw_datastream.h
+include/libraw/libraw_internal.h
+include/libraw/libraw_types.h
+include/libraw/libraw_version.h
+lib/libraw.a
+lib/libraw.so
+lib/libraw.so.16
+lib/libraw.so.16.0.0
+lib/libraw_r.a
+lib/libraw_r.so
+lib/libraw_r.so.16
+lib/libraw_r.so.16.0.0
+libdata/pkgconfig/libraw.pc
+libdata/pkgconfig/libraw_r.pc


Property changes on: trunk/graphics/libraw/pkg-plist
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list