View | Details | Raw Unified | Return to bug 276204
Collapse All | Expand All

(-)b/graphics/libmng/Makefile (-10 / +5 lines)
Lines 1-26 Link Here
1
PORTNAME=	libmng
1
PORTNAME=	libmng
2
PORTVERSION=	1.0.10
2
PORTVERSION=	2.0.3
3
PORTREVISION=	4
4
CATEGORIES=	graphics
3
CATEGORIES=	graphics
5
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-devel/${PORTVERSION} \
4
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-devel/${PORTVERSION} \
6
		http://www.libmng.com/download/
5
		http://www.libmng.com/download/
7
6
8
MAINTAINER=	mi@aldan.algebra.com
7
MAINTAINER=	mi@aldan.algebra.com
9
COMMENT=	Multiple-image Network Graphics (MNG) reference library
8
COMMENT=	Multiple-image Network Graphics (MNG) reference library
10
WWW=		https://www.libmng.com/
9
WWW=		https://sourceforge.net/projects/libmng/
11
10
12
LIB_DEPENDS=	liblcms.so:graphics/lcms
11
LIB_DEPENDS=	liblcms2.so:graphics/lcms2
13
14
OPTIONS_DEFINE=	MNG_OPTIMIZE
15
MNG_OPTIMIZE_DESC=	Use vendor's new optimization flags
16
12
17
MAKEFILE=	${FILESDIR}/Makefile.bsd
13
MAKEFILE=	${FILESDIR}/Makefile.bsd
18
14
19
USES=		jpeg uidfix
15
USES=		jpeg uidfix tar:xz
20
USE_LDCONFIG=	yes
16
USE_LDCONFIG=	yes
21
17
22
MNG_OPTIMIZE_MAKE_ARGS=	WITH_MNG_OPTIMIZE=true
18
MAKE_ARGS+=	WITH_MNG_OPTIMIZE=true
23
MNG_OPTIMIZE_MAKE_ARGS_OFF=	WITH_MNG_OPTIMIZE=off
24
19
25
post-install:
20
post-install:
26
	cd ${WRKSRC}/doc/man && ${INSTALL_MAN} libmng.3 ${STAGEDIR}${PREFIX}/man/man3 \
21
	cd ${WRKSRC}/doc/man && ${INSTALL_MAN} libmng.3 ${STAGEDIR}${PREFIX}/man/man3 \
(-)b/graphics/libmng/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (libmng-1.0.10.tar.gz) = 03a79dac9b9316d37227057614a248a946f997c4d1a3437fb569e9a63897f911
1
TIMESTAMP = 1704254831
2
SIZE (libmng-1.0.10.tar.gz) = 1093337
2
SHA256 (libmng-2.0.3.tar.xz) = 4a462fdd48d4bc82c1d7a21106c8a18b62f8cc0042454323058e6da0dbb57dd3
3
SIZE (libmng-2.0.3.tar.xz) = 951808
(-)b/graphics/libmng/files/Makefile.bsd (-1 / +1 lines)
Lines 1-5 Link Here
1
LIB=	mng
1
LIB=	mng
2
LDADD=	-lm -L${LIBDIR} -lz -llcms -ljpeg
2
LDADD=	-lm -L${LIBDIR} -lz -llcms2 -ljpeg
3
3
4
MK_PROFILE=	no
4
MK_PROFILE=	no
5
SHLIB_MAJOR?=	1
5
SHLIB_MAJOR?=	1
(-)b/graphics/libmng/files/patch-chunk_descr.c (+9 lines)
Added Link Here
1
--- libmng_chunk_descr.c	2012-07-29 15:26:34.000000000 -0400
2
+++ libmng_chunk_descr.c	2024-01-08 14:32:15.916979000 -0500
3
@@ -2751,5 +2751,5 @@
4
       mng_get_chunkheader (MNG_UINT_sRGB, &chunk_srgb);
5
                                        /* pretend it's an sRGB chunk then ! */
6
-      iRetcode = mng_read_general (pData, &chunk_srgb, 1, (mng_ptr)"0", &pDummy);
7
+      iRetcode = mng_read_general (pData, &chunk_srgb, 1, (mng_ptr)"0", (void **)&pDummy);
8
       if (iRetcode)                    /* on error bail out */
9
         return iRetcode;
(-)a/graphics/libmng/files/patch-conf (-19 lines)
Removed Link Here
1
+++ libmng_conf.h	Tue Oct 18 00:23:11 2005
2
@@ -100,4 +100,8 @@
3
 #endif
4
 
5
+#ifdef PIC
6
+#	define MNG_BUILD_SO
7
+#endif
8
+
9
 #ifndef MNG_SUPPORT_IJG6B
10
 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL)
11
@@ -161,6 +165,6 @@
12
    select MNG_APP_CMS */
13
 
14
-#define MNG_GAMMA_ONLY
15
-/* #define MNG_FULL_CMS */
16
+/* #define MNG_GAMMA_ONLY */
17
+#define MNG_FULL_CMS
18
 /* #define MNG_APP_CMS */
19
  
(-)b/graphics/libmng/files/patch-filter.c (+13 lines)
Added Link Here
1
--- libmng_filter.c	2012-07-29 15:26:34.000000000 -0400
2
+++ libmng_filter.c	2024-01-08 14:25:01.379756000 -0500
3
@@ -207,7 +207,7 @@
4
     iC  = (mng_uint32)*pPriorx_prev;
5
     iP  = iA + iB - iC;
6
-    iPa = abs (iP - iA);
7
-    iPb = abs (iP - iB);
8
-    iPc = abs (iP - iC);
9
+    iPa = iP > iA ? iP - iA : iA - iP;
10
+    iPb = iP > iB ? iP - iB : iB - iP;
11
+    iPc = iP > iC ? iP - iC : iC - iP;
12
 
13
     if ((iPa <= iPb) && (iPa <= iPc))
(-)b/graphics/libmng/files/patch-pixels.c (+128 lines)
Added Link Here
1
This changes the behaviour to what appears to be the original intent...
2
3
	-mi
4
5
--- libmng_pixels.c	2012-07-29 15:26:34.000000000 -0400
6
+++ libmng_pixels.c	2024-01-08 14:21:18.664893000 -0500
7
@@ -14669,5 +14669,5 @@
8
 
9
     *pDstline     = (mng_uint8)(iW >> 8);
10
-    *(pDstline+1) = (mng_uint8)(iW && 0xFF);
11
+    *(pDstline+1) = (mng_uint8)(iW & 0xFF);
12
 
13
     pSrcline++;
14
@@ -14787,5 +14787,5 @@
15
 
16
     *pDstline     = (mng_uint8)(iW >> 8);
17
-    *(pDstline+1) = (mng_uint8)(iW && 0xFF);
18
+    *(pDstline+1) = (mng_uint8)(iW & 0xFF);
19
 
20
     pSrcline++;
21
@@ -14908,5 +14908,5 @@
22
     *(pDstline+2) = iB;
23
     *(pDstline+4) = iB;
24
-    iB            = (mng_uint8)(iW && 0xFF);
25
+    iB            = (mng_uint8)(iW & 0xFF);
26
     *(pDstline+1) = iB;
27
     *(pDstline+3) = iB;
28
@@ -15042,5 +15042,5 @@
29
     *(pDstline+2) = iB;
30
     *(pDstline+4) = iB;
31
-    iB            = (mng_uint8)(iW && 0xFF);
32
+    iB            = (mng_uint8)(iW & 0xFF);
33
     *(pDstline+1) = iB;
34
     *(pDstline+3) = iB;
35
@@ -15126,7 +15126,7 @@
36
 
37
     *pDstline     = (mng_uint8)(iW >> 8);
38
-    *(pDstline+1) = (mng_uint8)(iW && 0xFF);
39
+    *(pDstline+1) = (mng_uint8)(iW & 0xFF);
40
     *(pDstline+2) = (mng_uint8)(iA >> 8);
41
-    *(pDstline+3) = (mng_uint8)(iA && 0xFF);
42
+    *(pDstline+3) = (mng_uint8)(iA & 0xFF);
43
 
44
     pSrcline += 2;
45
@@ -15210,10 +15210,10 @@
46
     *(pDstline+2) = iB;
47
     *(pDstline+4) = iB;
48
-    iB            = (mng_uint8)(iW && 0xFF);
49
+    iB            = (mng_uint8)(iW & 0xFF);
50
     *(pDstline+1) = iB;
51
     *(pDstline+3) = iB;
52
     *(pDstline+5) = iB;
53
     *(pDstline+6) = (mng_uint8)(iA >> 8);
54
-    *(pDstline+7) = (mng_uint8)(iA && 0xFF);
55
+    *(pDstline+7) = (mng_uint8)(iA & 0xFF);
56
 
57
     pSrcline += 2;
58
@@ -15297,9 +15297,9 @@
59
 
60
     *pDstline     = (mng_uint8)(iR >> 8);
61
-    *(pDstline+1) = (mng_uint8)(iR && 0xFF);
62
+    *(pDstline+1) = (mng_uint8)(iR & 0xFF);
63
     *(pDstline+2) = (mng_uint8)(iG >> 8);
64
-    *(pDstline+3) = (mng_uint8)(iG && 0xFF);
65
+    *(pDstline+3) = (mng_uint8)(iG & 0xFF);
66
     *(pDstline+4) = (mng_uint8)(iB >> 8);
67
-    *(pDstline+5) = (mng_uint8)(iB && 0xFF);
68
+    *(pDstline+5) = (mng_uint8)(iB & 0xFF);
69
 
70
     pSrcline += 3;
71
@@ -15402,9 +15402,9 @@
72
 
73
     *pDstline     = (mng_uint8)(iRw >> 8);
74
-    *(pDstline+1) = (mng_uint8)(iRw && 0xFF);
75
+    *(pDstline+1) = (mng_uint8)(iRw & 0xFF);
76
     *(pDstline+2) = (mng_uint8)(iGw >> 8);
77
-    *(pDstline+3) = (mng_uint8)(iGw && 0xFF);
78
+    *(pDstline+3) = (mng_uint8)(iGw & 0xFF);
79
     *(pDstline+4) = (mng_uint8)(iBw >> 8);
80
-    *(pDstline+5) = (mng_uint8)(iBw && 0xFF);
81
+    *(pDstline+5) = (mng_uint8)(iBw & 0xFF);
82
 
83
     pSrcline += 3;
84
@@ -15539,9 +15539,9 @@
85
       iB              = ((mng_bitdepth_16)pData->fPromBitdepth) (pBuf->aPLTEentries [iN].iBlue);
86
       *pDstline       = (mng_uint8)(iR >> 8);
87
-      *(pDstline+1)   = (mng_uint8)(iR && 0xFF);
88
+      *(pDstline+1)   = (mng_uint8)(iR & 0xFF);
89
       *(pDstline+2)   = (mng_uint8)(iG >> 8);
90
-      *(pDstline+3)   = (mng_uint8)(iG && 0xFF);
91
+      *(pDstline+3)   = (mng_uint8)(iG & 0xFF);
92
       *(pDstline+4)   = (mng_uint8)(iB >> 8);
93
-      *(pDstline+5)   = (mng_uint8)(iB && 0xFF);
94
+      *(pDstline+5)   = (mng_uint8)(iB & 0xFF);
95
     }
96
 
97
@@ -15642,11 +15642,11 @@
98
 
99
       *pDstline     = (mng_uint8)(iR >> 8);
100
-      *(pDstline+1) = (mng_uint8)(iR && 0xFF);
101
+      *(pDstline+1) = (mng_uint8)(iR & 0xFF);
102
       *(pDstline+2) = (mng_uint8)(iG >> 8);
103
-      *(pDstline+3) = (mng_uint8)(iG && 0xFF);
104
+      *(pDstline+3) = (mng_uint8)(iG & 0xFF);
105
       *(pDstline+4) = (mng_uint8)(iB >> 8);
106
-      *(pDstline+5) = (mng_uint8)(iB && 0xFF);
107
+      *(pDstline+5) = (mng_uint8)(iB & 0xFF);
108
       *(pDstline+6) = (mng_uint8)(iA >> 8);
109
-      *(pDstline+7) = (mng_uint8)(iA && 0xFF);
110
+      *(pDstline+7) = (mng_uint8)(iA & 0xFF);
111
     }
112
 
113
@@ -15690,11 +15690,11 @@
114
 
115
     *pDstline     = (mng_uint8)(iR >> 8);
116
-    *(pDstline+1) = (mng_uint8)(iR && 0xFF);
117
+    *(pDstline+1) = (mng_uint8)(iR & 0xFF);
118
     *(pDstline+2) = (mng_uint8)(iG >> 8);
119
-    *(pDstline+3) = (mng_uint8)(iG && 0xFF);
120
+    *(pDstline+3) = (mng_uint8)(iG & 0xFF);
121
     *(pDstline+4) = (mng_uint8)(iB >> 8);
122
-    *(pDstline+5) = (mng_uint8)(iB && 0xFF);
123
+    *(pDstline+5) = (mng_uint8)(iB & 0xFF);
124
     *(pDstline+6) = (mng_uint8)(iA >> 8);
125
-    *(pDstline+7) = (mng_uint8)(iA && 0xFF);
126
+    *(pDstline+7) = (mng_uint8)(iA & 0xFF);
127
 
128
     pSrcline += 4;

Return to bug 276204