Date: Sat, 15 Apr 2017 05:39:51 +0000 (UTC) From: Mikhail Teterin <mi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r438575 - in head/graphics: . libjxr libjxr/files Message-ID: <201704150539.v3F5dpQG048927@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mi Date: Sat Apr 15 05:39:51 2017 New Revision: 438575 URL: https://svnweb.freebsd.org/changeset/ports/438575 Log: Add port of JPEG XR -- to be used by the upcoming update of graphics/freeimage. Obtained from: Debian, sort of Sponsored by: Unemployment Insurance Added: head/graphics/libjxr/ head/graphics/libjxr/Makefile (contents, props changed) head/graphics/libjxr/distinfo (contents, props changed) head/graphics/libjxr/files/ head/graphics/libjxr/files/BSDmakefile.JxrDecApp (contents, props changed) head/graphics/libjxr/files/BSDmakefile.JxrEncApp (contents, props changed) head/graphics/libjxr/files/BSDmakefile.jxrgluelib (contents, props changed) head/graphics/libjxr/files/BSDmakefile.libjpegxr (contents, props changed) head/graphics/libjxr/files/patch-bug748590 (contents, props changed) head/graphics/libjxr/files/patch-typos (contents, props changed) head/graphics/libjxr/files/test.sh (contents, props changed) head/graphics/libjxr/pkg-descr (contents, props changed) head/graphics/libjxr/pkg-plist (contents, props changed) Modified: head/graphics/Makefile Modified: head/graphics/Makefile ============================================================================== --- head/graphics/Makefile Sat Apr 15 03:24:23 2017 (r438574) +++ head/graphics/Makefile Sat Apr 15 05:39:51 2017 (r438575) @@ -503,6 +503,7 @@ SUBDIR += libimg SUBDIR += libiptcdata SUBDIR += libjpeg-turbo + SUBDIR += libjxr SUBDIR += libkdcraw-kde4 SUBDIR += libkexiv2-kde4 SUBDIR += libkface Added: head/graphics/libjxr/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/Makefile Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,36 @@ +# $FreeBSD$ + +PORTNAME= jxrlib +PORTVERSION= 1.1 +CATEGORIES= graphics devel +MASTER_SITES= ${MASTER_SITE_DEBIAN} +MASTER_SITE_SUBDIR=pool/main/j/jxrlib +DISTFILES= jxrlib_${PORTVERSION}.orig.tar.gz \ + jxrlib_${PORTVERSION}-6.debian.tar.xz + +MAINTAINER= mi@aldan.algebra.com +COMMENT= Library for JPEG XR, a.k.a. Windows MediaTM Photo + +LICENSE= BSD + +USES= dos2unix uidfix +USE_LDCONFIG= yes +MAKEFILE= BSDmakefile # created by do-configure +MAKE_ENV= WRKDIR="${WRKDIR}" + +do-configure: + ${RM} -f ${WRKSRC}/BSDmakefile +.for d in libjpegxr jxrgluelib JxrEncApp JxrDecApp + ${MKDIR} ${WRKSRC}/$d + ${LN} -sf ${FILESDIR}/BSDmakefile.$d ${WRKSRC}/$d/BSDmakefile + ${ECHO} "SUBDIR+=$d" >> ${WRKSRC}/BSDmakefile +.endfor + ${ECHO} '.include <bsd.subdir.mk>' >> ${WRKSRC}/BSDmakefile + +post-build: + ${MKDIR} ${STAGEDIR}${PREFIX}/include/jxrlib + +regression-test test check: build + ${SETENV} WRKSRC="${WRKSRC}" ${SH} -x ${FILESDIR}/test.sh + +.include <bsd.port.mk> Added: head/graphics/libjxr/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/distinfo Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,5 @@ +TIMESTAMP = 1492227072 +SHA256 (jxrlib_1.1.orig.tar.gz) = c7287b86780befa0914f2eeb8be2ac83e672ebd4bd16dc5574a36a59d9708303 +SIZE (jxrlib_1.1.orig.tar.gz) = 287517 +SHA256 (jxrlib_1.1-6.debian.tar.xz) = b8263001fbe8c871dbe3557926f29dfb25aa13dd578a9b4584fe21011a526d58 +SIZE (jxrlib_1.1-6.debian.tar.xz) = 24184 Added: head/graphics/libjxr/files/BSDmakefile.JxrDecApp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/files/BSDmakefile.JxrDecApp Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,15 @@ +PROG= JxrDecApp + +BINDIR= ${PREFIX}/bin +MANDIR= ${MANPREFIX}/man/man + +CFLAGS= -I${.CURDIR:H}/jxrgluelib -I${.CURDIR:H}/jxrtestlib +CFLAGS+=-I${.CURDIR:H}/image/sys -I${.CURDIR:H}/common/include +CFLAGS+=-Wno-extra-tokens -D__ANSI__ -DDISABLE_PERF_MEASUREMENT + +LDADD= -L${.CURDIR:H}/jxrgluelib -Wl,-rpath-link=${.CURDIR:H}/libjpegxr -ljxrglue + +.PATH: ${.CURDIR:H}/jxrencoderdecoder +.PATH: ${WRKDIR}/debian # man-pages are there + +.include <bsd.prog.mk> Added: head/graphics/libjxr/files/BSDmakefile.JxrEncApp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/files/BSDmakefile.JxrEncApp Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,15 @@ +PROG= JxrEncApp + +BINDIR= ${PREFIX}/bin +MANDIR= ${MANPREFIX}/man/man + +CFLAGS= -I${.CURDIR:H}/jxrgluelib -I${.CURDIR:H}/jxrtestlib +CFLAGS+=-I${.CURDIR:H}/image/sys -I${.CURDIR:H}/common/include +CFLAGS+=-Wno-extra-tokens -D__ANSI__ -DDISABLE_PERF_MEASUREMENT + +LDADD= -L${.CURDIR:H}/jxrgluelib -Wl,-rpath-link=${.CURDIR:H}/libjpegxr -ljxrglue + +.PATH: ${.CURDIR:H}/jxrencoderdecoder +.PATH: ${WRKDIR}/debian # man-pages are there + +.include <bsd.prog.mk> Added: head/graphics/libjxr/files/BSDmakefile.jxrgluelib ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/files/BSDmakefile.jxrgluelib Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,21 @@ +LIB= jxrglue +SHLIB_MAJOR= 1 +NO_PROFILE= nope +LIBDIR= ${PREFIX}/lib +INCLUDEDIR= ${PREFIX}/include/jxrlib +INCS= JXRGlue.h JXRMeta.h JXRTest.h + +SRCS= JXRGlue.c JXRMeta.c JXRGluePFC.c JXRGlueJxr.c +SRCS+= JXRTest.c JXRTestBmp.c JXRTestHdr.c JXRTestPnm.c \ + JXRTestTif.c JXRTestYUV.c + +.PATH: ${.CURDIR:H}/jxrtestlib + +CFLAGS+= -I. -I${.CURDIR:H}/common/include -I${.CURDIR:H}/image/sys +CFLAGS+= -I${.CURDIR:H}/jxrtestlib +CFLAGS+= -D__ANSI__ -DDISABLE_PERF_MEASUREMENT +CFLAGS+= -Wno-extra-tokens + +LDADD= -L${.CURDIR:H}/libjpegxr -ljpegxr -lm + +.include <bsd.lib.mk> Added: head/graphics/libjxr/files/BSDmakefile.libjpegxr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/files/BSDmakefile.libjpegxr Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,21 @@ +LIB= jpegxr +SHLIB_MAJOR= 1 +NO_PROFILE= nope +LIBDIR= ${PREFIX}/lib +INCLUDEDIR= ${PREFIX}/include/jxrlib +INCS= guiddef.h windowsmediaphoto.h wmsal.h wmspecstring.h \ + wmspecstrings_adt.h wmspecstrings_strict.h wmspecstrings_undef.h + +SRCS= encode.c segenc.c strenc.c strFwdTransform.c strPredQuantEnc.c \ + decode.c postprocess.c segdec.c strdec.c strInvTransform.c \ + strPredQuantDec.c JXRTranscode.c adapthuff.c image.c \ + strcodec.c strPredQuant.c strTransform.c perfTimerANSI.c + +.PATH: ${.CURDIR:H}/image/sys ${.CURDIR:H}/image/encode +.PATH: ${.CURDIR:H}/image/decode ${.CURDIR:H}/common/include + +CFLAGS+= -I. -I${.CURDIR:H}/common/include -I${.CURDIR:H}/image/sys +CFLAGS+= -D__ANSI__ -DDISABLE_PERF_MEASUREMENT +CFLAGS+= -Wno-extra-tokens + +.include <bsd.lib.mk> Added: head/graphics/libjxr/files/patch-bug748590 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/files/patch-bug748590 Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,16 @@ +Description: Fix function signature +Author: Mathieu Malaterre <malat@debian.org> +Origin: upstream, https://jxrlib.codeplex.com/SourceControl/changeset/04cf339385b8196f98025b43a366a0790deac994 +Bug-Debian: http://bugs.debian.org/748590 + +--- image/decode/JXRTranscode.c ++++ image/decode/JXRTranscode.c +@@ -47,7 +47,7 @@ EXTERN_C Void FreeCodingContextDec(CWMIm + EXTERN_C Int StrEncInit(CWMImageStrCodec *); + EXTERN_C Void StrIOEncTerm(CWMImageStrCodec *); + EXTERN_C Void FreeCodingContextEnc(CWMImageStrCodec *); +-EXTERN_C Void encodeMB(CWMImageStrCodec *, Int, Int); ++EXTERN_C Int encodeMB(CWMImageStrCodec *, Int, Int); + EXTERN_C Int writeIndexTableNull(CWMImageStrCodec *); + EXTERN_C Void writePacketHeader(BitIOInfo *, U8, U8); + Added: head/graphics/libjxr/files/patch-typos ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/files/patch-typos Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,27 @@ +Description: Fix typos and remove some warnings +Author: Mathieu Malaterre <malat@debian.org> + +Cleaned up for FreeBSD by mi + +--- jxrencoderdecoder/JxrEncApp.c ++++ jxrencoderdecoder/JxrEncApp.c +@@ -578,7 +578,7 @@ main(int argc, char* argv[]) + + //================================ + Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION)); +- Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, &pEncoder)); ++ Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, (void**)&pEncoder)); + + //---------------------------------------------------------------- + Call(PKCreateTestFactory(&pTestFactory, WMP_SDK_VERSION)); +--- jxrgluelib/JXRMeta.h ++++ jxrgluelib/JXRMeta.h +@@ -34,7 +34,7 @@ + + #ifndef UNREFERENCED_PARAMETER + #define UNREFERENCED_PARAMETER(P) { (P) = (P); } +-#endif UNREFERENCED_PARAMETER ++#endif /*UNREFERENCED_PARAMETER*/ + + //================================================================ + // Container Added: head/graphics/libjxr/files/test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/files/test.sh Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,27 @@ +#!/bin/sh + +# Quick smoke-test for the newly-built library and command-line utilities +# Copied from Brew: +# https://github.com/Homebrew/homebrew-core/blob/697d00453308186b31ecd22737f5b10cc105b162/Formula/jxrlib.rb + +b64decode -r << EOBMP > ${WRKSRC}/test.bmp +Qk06AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABgAAAAAAAQAAADCDgAAwg4AAAAAAAAAAAAA//// +AA== +EOBMP + +export LD_LIBRARY_PATH=${WRKSRC}/jxrgluelib:${WRKSRC}/libjpegxr + +${WRKSRC}/JxrEncApp/JxrEncApp -i ${WRKSRC}/test.bmp -o ${WRKSRC}/test.jxr +${WRKSRC}/JxrDecApp/JxrDecApp -i ${WRKSRC}/test.jxr -o ${WRKSRC}/result.bmp + +ls -l ${WRKSRC}/test.bmp ${WRKSRC}/test.jxr ${WRKSRC}/result.bmp + +if cmp -zs ${WRKSRC}/test.bmp ${WRKSRC}/result.bmp +then + echo Result matches expectations + exit 0 +else + echo Result is not the same as input, a problem + exit 1 +fi + Added: head/graphics/libjxr/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/pkg-descr Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,18 @@ +JPEG XR is an approved ISO/IEC International standard (its official +designation is ISO/IEC 29199-2). + +JPEG XR started its life in Microsoft Research. It publicly first appeared +as the HD Photo format in Windows Vista. + +For web developers, JPEG XR has a large number of interesting features, see +the table below. Some of these are big advantages over other image formats +like JPEG, PNG, OpenEXR, and TIFF. + - Better Compression (40% smaller than JPEG) + - Lossless Mode (better compression than PNG) + - Alpha Channel (compress color lossy and alpha losslessly) + - Extended Bitdepth (supports 8-, 16-, and 32-bit/channel) + - Progressive Decode + - Advanced Decoding Features (tile-based layout, for efficient + region-of-interest access.) + +WWW: https://jxrlib.codeplex.com/ Added: head/graphics/libjxr/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libjxr/pkg-plist Sat Apr 15 05:39:51 2017 (r438575) @@ -0,0 +1,20 @@ +bin/JxrDecApp +bin/JxrEncApp +include/jxrlib/JXRGlue.h +include/jxrlib/JXRMeta.h +include/jxrlib/JXRTest.h +include/jxrlib/guiddef.h +include/jxrlib/windowsmediaphoto.h +include/jxrlib/wmsal.h +include/jxrlib/wmspecstring.h +include/jxrlib/wmspecstrings_adt.h +include/jxrlib/wmspecstrings_strict.h +include/jxrlib/wmspecstrings_undef.h +lib/libjpegxr.a +lib/libjpegxr.so +lib/libjpegxr.so.1 +lib/libjxrglue.a +lib/libjxrglue.so +lib/libjxrglue.so.1 +man/man1/JxrDecApp.1.gz +man/man1/JxrEncApp.1.gz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704150539.v3F5dpQG048927>