pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/graphics/jxrlib
Module Name: pkgsrc
Committed By: nros
Date: Mon Nov 25 21:07:19 UTC 2019
Modified Files:
pkgsrc/graphics/jxrlib: Makefile buildlink3.mk distinfo
Added Files:
pkgsrc/graphics/jxrlib/patches: patch-Makefile
patch-image_sys_strcodec.c patch-image_sys_strcodec.h
patch-jxrencoderdecoder_JxrDecApp.c
patch-jxrencoderdecoder_JxrEncApp.c patch-jxrgluelib_JXRGlueJxr.c
patch-jxrgluelib_JXRMeta.h patch-jxrtestlib_JXRTest.c
patch-jxrtestlib_JXRTestHdr.c patch-jxrtestlib_JXRTestPnm.c
patch-jxrtestlib_JXRTestTif.c
Log Message:
Fix libjxr on big endian systems and fix warnings
Add patches from FreeBSD ports that fix build warnings.
For the patches to apply correctly, add conversion to unix style linebreaks.
Define _BIG__ENDIAN_ on big endian systems to make the package behave
correctly when running on them. As pointed out in jxrlibs makefile.
Bump pkgrevision and abi depends due to the big endian change.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/graphics/jxrlib/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/graphics/jxrlib/buildlink3.mk \
pkgsrc/graphics/jxrlib/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/jxrlib/patches/patch-Makefile \
pkgsrc/graphics/jxrlib/patches/patch-image_sys_strcodec.c \
pkgsrc/graphics/jxrlib/patches/patch-image_sys_strcodec.h \
pkgsrc/graphics/jxrlib/patches/patch-jxrencoderdecoder_JxrDecApp.c \
pkgsrc/graphics/jxrlib/patches/patch-jxrencoderdecoder_JxrEncApp.c \
pkgsrc/graphics/jxrlib/patches/patch-jxrgluelib_JXRGlueJxr.c \
pkgsrc/graphics/jxrlib/patches/patch-jxrgluelib_JXRMeta.h \
pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTest.c \
pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestHdr.c \
pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestPnm.c \
pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestTif.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/jxrlib/Makefile
diff -u pkgsrc/graphics/jxrlib/Makefile:1.2 pkgsrc/graphics/jxrlib/Makefile:1.3
--- pkgsrc/graphics/jxrlib/Makefile:1.2 Sun Sep 3 09:22:57 2017
+++ pkgsrc/graphics/jxrlib/Makefile Mon Nov 25 21:07:18 2019
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2017/09/03 09:22:57 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2019/11/25 21:07:18 nros Exp $
DISTNAME= jxrlib_1_1
PKGNAME= jxrlib-1.1
+PKGREVISION= 1
CATEGORIES= graphics
MASTER_SITES= # javascript link
@@ -10,8 +11,15 @@ HOMEPAGE= https://github.com/curasystems
COMMENT= JPEG XR library
LICENSE= 2-clause-bsd
+TOOL_DEPENDS+= dos2unix-[0-9]*:../../converters/dos2unix
+
WRKSRC= ${WRKDIR}/jxrlib
+.include "../../mk/endian.mk"
+.if ${MACHINE_ENDIAN} == "big"
+CFLAGS+=-D_BIG__ENDIAN_
+.endif
+
INSTALLATION_DIRS= bin lib
INSTALLATION_DIRS+= include/jxrlib/common/include
INSTALLATION_DIRS+= include/jxrlib/image/sys
@@ -21,6 +29,11 @@ INSTALLATION_DIRS+= include/jxrlib/image
INSTALLATION_DIRS+= include/jxrgluelib
INSTALLATION_DIRS+= share/doc/jxrlib
+pre-patch:
+ dos2unix ${WRKSRC}/Makefile
+ find ${WRKSRC} -name '*.c' -print0 | xargs -0 dos2unix
+ find ${WRKSRC} -name '*.h' -print0 | xargs -0 dos2unix
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/JxrEncApp ${DESTDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/JxrDecApp ${DESTDIR}${PREFIX}/bin
Index: pkgsrc/graphics/jxrlib/buildlink3.mk
diff -u pkgsrc/graphics/jxrlib/buildlink3.mk:1.1 pkgsrc/graphics/jxrlib/buildlink3.mk:1.2
--- pkgsrc/graphics/jxrlib/buildlink3.mk:1.1 Tue Apr 4 13:07:07 2017
+++ pkgsrc/graphics/jxrlib/buildlink3.mk Mon Nov 25 21:07:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.1 2017/04/04 13:07:07 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2019/11/25 21:07:18 nros Exp $
BUILDLINK_TREE+= jxrlib
@@ -6,6 +6,7 @@ BUILDLINK_TREE+= jxrlib
JXRLIB_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.jxrlib+= jxrlib>=1.1
+BUILDLINK_ABI_DEPENDS.jxrlib+= jxrlib>=1.1nb1
BUILDLINK_PKGSRCDIR.jxrlib?= ../../graphics/jxrlib
BUILDLINK_DEPMETHOD.jxrlib?= build
.endif # JXRLIB_BUILDLINK3_MK
Index: pkgsrc/graphics/jxrlib/distinfo
diff -u pkgsrc/graphics/jxrlib/distinfo:1.1 pkgsrc/graphics/jxrlib/distinfo:1.2
--- pkgsrc/graphics/jxrlib/distinfo:1.1 Tue Apr 4 13:07:07 2017
+++ pkgsrc/graphics/jxrlib/distinfo Mon Nov 25 21:07:18 2019
@@ -1,6 +1,17 @@
-$NetBSD: distinfo,v 1.1 2017/04/04 13:07:07 wiz Exp $
+$NetBSD: distinfo,v 1.2 2019/11/25 21:07:18 nros Exp $
SHA1 (jxrlib_1_1.tar.gz) = bf6cfa00087a67491a6ba55d6d96d74e94560430
RMD160 (jxrlib_1_1.tar.gz) = 31b378cd0de3ce2c1d19fae3927c67046471d07b
SHA512 (jxrlib_1_1.tar.gz) = c7d87647601e08b2dc18bda26faea80ad5b09c6e8412769cd203ce9e221b2b58425e9d59a506ae8bf61030195bccb51a9d1e893bf2d18e596b0687918b39e2df
Size (jxrlib_1_1.tar.gz) = 338240 bytes
+SHA1 (patch-Makefile) = 581bdfdfee20fd1f6d0a2a3d1cf8ce877eb0629b
+SHA1 (patch-image_sys_strcodec.c) = 3cf7e93704c5849dcbb3ff435743f87fe8ebf042
+SHA1 (patch-image_sys_strcodec.h) = ef060597735fbc9529bd25cb3431eafaf3284ddc
+SHA1 (patch-jxrencoderdecoder_JxrDecApp.c) = ae71490d95c3f15cd65115872d2463468cda3a97
+SHA1 (patch-jxrencoderdecoder_JxrEncApp.c) = ff66c068348260291d51d21f8caf6059a63fac65
+SHA1 (patch-jxrgluelib_JXRGlueJxr.c) = adce3e44d470c62817ef83a3b0723818d8ecb810
+SHA1 (patch-jxrgluelib_JXRMeta.h) = b14f26ab80b1050879eac404283a11a795326444
+SHA1 (patch-jxrtestlib_JXRTest.c) = 2dcb7f4f953c129db1e7db4741439f1c5eb19e27
+SHA1 (patch-jxrtestlib_JXRTestHdr.c) = 8f5562dfe3d0dd1ddfb6b591facd51c45cd3d068
+SHA1 (patch-jxrtestlib_JXRTestPnm.c) = ea94a288d76d9e9c316716f07226640570136460
+SHA1 (patch-jxrtestlib_JXRTestTif.c) = f4c36e487a808e80ff75cd99fd693c555902d758
Added files:
Index: pkgsrc/graphics/jxrlib/patches/patch-Makefile
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-Makefile:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-Makefile Mon Nov 25 21:07:19 2019
@@ -0,0 +1,13 @@
+$NetBSD: patch-Makefile,v 1.1 2019/11/25 21:07:19 nros Exp $
+* take in CFLAGS from the environment so that _BIG__ENDIAN_ can be added
+--- Makefile.orig 2019-11-25 19:14:40.081612047 +0000
++++ Makefile
+@@ -39,7 +39,7 @@ DIR_GLUE=jxrgluelib
+ DIR_TEST=jxrtestlib
+ DIR_EXEC=jxrencoderdecoder
+
+-CFLAGS=-I. -Icommon/include -I$(DIR_SYS) -D__ANSI__ -DDISABLE_PERF_MEASUREMENT -w -O
++CFLAGS+=-I. -Icommon/include -I$(DIR_SYS) -D__ANSI__ -DDISABLE_PERF_MEASUREMENT -w -O
+ ##
+ ## Add following flag to CFLAGS above if target is a big endian machine
+ ## -D_BIG__ENDIAN_
Index: pkgsrc/graphics/jxrlib/patches/patch-image_sys_strcodec.c
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-image_sys_strcodec.c:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-image_sys_strcodec.c Mon Nov 25 21:07:19 2019
@@ -0,0 +1,15 @@
+$NetBSD: patch-image_sys_strcodec.c,v 1.1 2019/11/25 21:07:19 nros Exp $
+* defines in .h file, fromm FreeBSD ports
+--- image/sys/strcodec.c.orig 2013-03-20 18:16:21.000000000 +0000
++++ image/sys/strcodec.c
+@@ -668,9 +668,7 @@ ERR detach_SB(SimpleBitIO* pSB)
+ // WinCE ARM and Desktop x86
+ #else
+ // other platform
+-#ifdef _BIG__ENDIAN_
+-#define _byteswap_ulong(x) (x)
+-#else // _BIG__ENDIAN_
++#ifndef _BIG__ENDIAN_
+ U32 _byteswap_ulong(U32 bits)
+ {
+ U32 r = (bits & 0xffu) << 24;
Index: pkgsrc/graphics/jxrlib/patches/patch-image_sys_strcodec.h
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-image_sys_strcodec.h:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-image_sys_strcodec.h Mon Nov 25 21:07:19 2019
@@ -0,0 +1,30 @@
+$NetBSD: patch-image_sys_strcodec.h,v 1.1 2019/11/25 21:07:19 nros Exp $
+* fix warning
+* define and declaration of byteswap in .h file
+* from FreeBSD ports
+--- image/sys/strcodec.h.orig 2013-03-21 18:22:34.000000000 +0000
++++ image/sys/strcodec.h
+@@ -64,7 +64,7 @@
+
+ #ifndef UNREFERENCED_PARAMETER
+ #define UNREFERENCED_PARAMETER(P) { (P) = (P); }
+-#endif UNREFERENCED_PARAMETER
++#endif
+
+ #ifdef UNDER_CE
+ #define PLATFORM_WCE
+@@ -676,3 +676,14 @@ void flushToByte(BitIOInfo* pIO);
+ // pIO->uiAccumulator = LOAD16(pIO->pbCurrent) & ((U32)(-1) >> pIO->cBitsUsed);\
+
+ void OutputPerfTimerReport(CWMImageStrCodec *pState);
++
++#if (defined(WIN32) && !defined(UNDER_CE)) || (defined(UNDER_CE) && defined(_ARM_))
++// WinCE ARM and Desktop x86
++#else
++// other platform
++#ifdef _BIG__ENDIAN_
++#define _byteswap_ulong(x) (x)
++#else // _BIG__ENDIAN_
++U32 _byteswap_ulong(U32 bits);
++#endif // _BIG__ENDIAN_
++#endif
Index: pkgsrc/graphics/jxrlib/patches/patch-jxrencoderdecoder_JxrDecApp.c
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-jxrencoderdecoder_JxrDecApp.c:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-jxrencoderdecoder_JxrDecApp.c Mon Nov 25 21:07:19 2019
@@ -0,0 +1,13 @@
+$NetBSD: patch-jxrencoderdecoder_JxrDecApp.c,v 1.1 2019/11/25 21:07:19 nros Exp $
+* fix warnings, from FreeBSD ports
+--- jxrencoderdecoder/JxrDecApp.c.orig 2019-11-25 19:14:26.881820454 +0000
++++ jxrencoderdecoder/JxrDecApp.c
+@@ -423,7 +423,7 @@ ERR WmpDecAppCreateEncoderFromExt(
+ Call(GetTestEncodeIID(szExt, &pIID));
+
+ // Create encoder
+- Call(PKTestFactory_CreateCodec(pIID, ppIE));
++ Call(PKTestFactory_CreateCodec(pIID, (void**)ppIE));
+
+ Cleanup:
+ return err;
Index: pkgsrc/graphics/jxrlib/patches/patch-jxrencoderdecoder_JxrEncApp.c
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-jxrencoderdecoder_JxrEncApp.c:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-jxrencoderdecoder_JxrEncApp.c Mon Nov 25 21:07:19 2019
@@ -0,0 +1,13 @@
+$NetBSD: patch-jxrencoderdecoder_JxrEncApp.c,v 1.1 2019/11/25 21:07:19 nros Exp $
+* Fix warnings, from FreeBSD ports
+--- jxrencoderdecoder/JxrEncApp.c.orig 2019-11-16 13:13:44.454384643 +0000
++++ 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));
Index: pkgsrc/graphics/jxrlib/patches/patch-jxrgluelib_JXRGlueJxr.c
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-jxrgluelib_JXRGlueJxr.c:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-jxrgluelib_JXRGlueJxr.c Mon Nov 25 21:07:19 2019
@@ -0,0 +1,12 @@
+$NetBSD: patch-jxrgluelib_JXRGlueJxr.c,v 1.1 2019/11/25 21:07:19 nros Exp $
+* fix missing declaration of wcslen
+--- jxrgluelib/JXRGlueJxr.c.orig 2013-03-20 19:01:13.000000000 +0000
++++ jxrgluelib/JXRGlueJxr.c
+@@ -27,6 +27,7 @@
+ //
+ //*@@@---@@@@******************************************************************
+ #include <limits.h>
++#include <wchar.h>
+ #include <JXRGlue.h>
+
+
Index: pkgsrc/graphics/jxrlib/patches/patch-jxrgluelib_JXRMeta.h
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-jxrgluelib_JXRMeta.h:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-jxrgluelib_JXRMeta.h Mon Nov 25 21:07:19 2019
@@ -0,0 +1,13 @@
+$NetBSD: patch-jxrgluelib_JXRMeta.h,v 1.1 2019/11/25 21:07:19 nros Exp $
+* Fix warning
+--- jxrgluelib/JXRMeta.h.orig 2019-11-16 11:24:33.138807563 +0000
++++ jxrgluelib/JXRMeta.h
+@@ -34,7 +34,7 @@
+
+ #ifndef UNREFERENCED_PARAMETER
+ #define UNREFERENCED_PARAMETER(P) { (P) = (P); }
+-#endif UNREFERENCED_PARAMETER
++#endif
+
+ //================================================================
+ // Container
Index: pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTest.c
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTest.c:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTest.c Mon Nov 25 21:07:19 2019
@@ -0,0 +1,49 @@
+$NetBSD: patch-jxrtestlib_JXRTest.c,v 1.1 2019/11/25 21:07:19 nros Exp $
+* fix warnings, from FreeBSD ports
+--- jxrtestlib/JXRTest.c.orig 2013-03-19 19:06:18.000000000 +0000
++++ jxrtestlib/JXRTest.c
+@@ -198,7 +198,7 @@ ERR PKTestFactory_CreateDecoderFromFile(
+ ERR err = WMP_errSuccess;
+
+ char *pExt = NULL;
+- PKIID* pIID = NULL;
++ const PKIID* pIID = NULL;
+
+ struct WMPStream* pStream = NULL;
+ PKImageDecode* pDecoder = NULL;
+@@ -214,7 +214,7 @@ ERR PKTestFactory_CreateDecoderFromFile(
+ Call(CreateWS_File(&pStream, szFilename, "rb"));
+
+ // Create decoder
+- Call(PKTestFactory_CreateCodec(pIID, ppDecoder));
++ Call(PKTestFactory_CreateCodec(pIID,(void**)ppDecoder));
+ pDecoder = *ppDecoder;
+
+ // attach stream to decoder
+@@ -232,7 +232,7 @@ ERR PKCreateTestFactory(PKCodecFactory**
+
+ UNREFERENCED_PARAMETER( uVersion );
+
+- Call(PKAlloc(ppCFactory, sizeof(**ppCFactory)));
++ Call(PKAlloc((void**)ppCFactory, sizeof(**ppCFactory)));
+ pCFactory = *ppCFactory;
+
+ pCFactory->CreateCodec = PKTestFactory_CreateCodec;
+@@ -287,7 +287,7 @@ ERR PKTestDecode_Release(
+
+ pID->fStreamOwner && pID->pStream->Close(&pID->pStream);
+
+- return PKFree(ppID);
++ return PKFree((void**)ppID);
+ }
+
+ ERR PKTestDecode_Create(
+@@ -296,7 +296,7 @@ ERR PKTestDecode_Create(
+ ERR err = WMP_errSuccess;
+ PKTestDecode* pID = NULL;
+
+- Call(PKAlloc(ppID, sizeof(**ppID)));
++ Call(PKAlloc((void**)ppID, sizeof(**ppID)));
+
+ pID = *ppID;
+ pID->Initialize = PKTestDecode_Initialize;
Index: pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestHdr.c
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestHdr.c:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestHdr.c Mon Nov 25 21:07:19 2019
@@ -0,0 +1,13 @@
+$NetBSD: patch-jxrtestlib_JXRTestHdr.c,v 1.1 2019/11/25 21:07:19 nros Exp $
+* fix warning
+--- jxrtestlib/JXRTestHdr.c.orig 2013-03-20 16:40:08.000000000 +0000
++++ jxrtestlib/JXRTestHdr.c
+@@ -27,7 +27,7 @@
+ //*@@@---@@@@******************************************************************
+ #ifndef ANSI
+ #define _CRT_SECURE_NO_WARNINGS
+-#endif ANSI
++#endif
+
+ #include <stdlib.h>
+ #include <string.h>
Index: pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestPnm.c
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestPnm.c:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestPnm.c Mon Nov 25 21:07:19 2019
@@ -0,0 +1,13 @@
+$NetBSD: patch-jxrtestlib_JXRTestPnm.c,v 1.1 2019/11/25 21:07:19 nros Exp $
+* fix warning
+--- jxrtestlib/JXRTestPnm.c.orig 2019-11-16 13:10:49.180538241 +0000
++++ jxrtestlib/JXRTestPnm.c
+@@ -27,7 +27,7 @@
+ //*@@@---@@@@******************************************************************
+ #ifndef ANSI
+ #define _CRT_SECURE_NO_WARNINGS
+-#endif ANSI
++#endif
+
+ #include <stdlib.h>
+
Index: pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestTif.c
diff -u /dev/null pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestTif.c:1.1
--- /dev/null Mon Nov 25 21:07:19 2019
+++ pkgsrc/graphics/jxrlib/patches/patch-jxrtestlib_JXRTestTif.c Mon Nov 25 21:07:19 2019
@@ -0,0 +1,15 @@
+$NetBSD: patch-jxrtestlib_JXRTestTif.c,v 1.1 2019/11/25 21:07:19 nros Exp $
+* Fix warnings, from FreeBSD ports
+--- jxrtestlib/JXRTestTif.c.orig 2013-03-19 19:17:12.000000000 +0000
++++ jxrtestlib/JXRTestTif.c
+@@ -909,8 +909,8 @@ ERR PKImageDecode_Release_TIF(PKTestDeco
+
+ PKTestDecode *pID = *ppID;
+
+- Call(WMPFree(&pID->EXT.TIF.uStripOffsets));
+- Call(WMPFree(&pID->EXT.TIF.uStripByteCounts));
++ Call(WMPFree((void**)&pID->EXT.TIF.uStripOffsets));
++ Call(WMPFree((void**)&pID->EXT.TIF.uStripByteCounts));
+
+ Call(PKTestDecode_Release(ppID));
+
Home |
Main Index |
Thread Index |
Old Index