Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Dec 2010 18:02:12 +0600 (NOVT)
From:      Alexey Dokuchaev <danfe@regency.nsu.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/153178: [patch] update and clean up graphics/freeimage
Message-ID:  <201012151202.oBFC2CT6047987@regency.nsu.ru>
Resent-Message-ID: <201012151210.oBFCABGq011751@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         153178
>Category:       ports
>Synopsis:       [patch] update and clean up graphics/freeimage
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 15 12:10:10 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Alexey Dokuchaev
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
>Environment:
>Description:
Please consider attached patch.  Proposed commit log:

- Update to version 3.14.1
- Stop hardcoding port version within the Makefile
- Reduce unneeded use of global scope modifier in REINPLACE_CMD regex  
- Reorder USE_ knobs so they firmly follow natural order or operations
  (extract/patch/build)
- Move PLIST_FILES closer to other metainformation
- Clean up Makefile and beautify pkg-descr
  
I did NOT check if any dependencies require port revision bumps, sorry,
ENOTIME for this.  (My port, which is consumer of freeimage, requires
this update, but links statically.)
>How-To-Repeat:
>Fix:
Index: Makefile
===================================================================
RCS file: /mnt/fbsd/development/FreeBSD-CVS/ports/graphics/freeimage/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- Makefile	22 Aug 2009 00:22:48 -0000	1.13
+++ Makefile	14 Dec 2010 08:42:30 -0000
@@ -1,12 +1,12 @@
-# New ports collection makefile for:	freeimage
-# Date created:		2005-09-01
-# Whom:			Choe, Cheng-Dae
+# New ports collection makefile for:	FreeImage
+# Date created:				2005-09-01
+# Whom:					Choe, Cheng-Dae <whitekid@gmail.com>
 #
 # $FreeBSD: ports/graphics/freeimage/Makefile,v 1.13 2009/08/22 00:22:48 amdmi3 Exp $
 #
 
 PORTNAME=	freeimage
-PORTVERSION=	3.12.0
+PORTVERSION=	3.14.1
 CATEGORIES=	graphics
 MASTER_SITES=	SF/${PORTNAME}/Source%20Distribution/${PORTVERSION}
 DISTNAME=	FreeImage${PORTVERSION:S/.//g}
@@ -14,12 +14,17 @@
 MAINTAINER=	gahr@FreeBSD.org
 COMMENT=	An open source graphics library
 
-WRKSRC=		${WRKDIR}/FreeImage
-USE_GMAKE=	yes
 USE_ZIP=	yes
-# convert CRLF to LF for gcc-2.95
-EXTRACT_BEFORE_ARGS=	-qoa
+USE_DOS2UNIX=	Source/LibOpenJPEG/opj_malloc.h
+USE_GMAKE=	yes
 USE_LDCONFIG=	yes
+WRKSRC=		${WRKDIR}/FreeImage
+
+PLIST_FILES=	include/FreeImage.h \
+		lib/libfreeimage.a \
+		lib/libfreeimage-${PORTVERSION}.so \
+		lib/libfreeimage.so.3 \
+		lib/libfreeimage.so
 
 .include <bsd.port.pre.mk>
 
@@ -27,16 +32,8 @@
 CFLAGS+=	-fPIC
 .endif
 
-PLIST_FILES=	include/FreeImage.h \
-		lib/libfreeimage.a \
-		lib/libfreeimage-3.12.0.so \
-		lib/libfreeimage.so.3
-
 post-patch:
-	${FIND} ${WRKSRC} -type f -print0 | ${XARGS} -0 ${REINPLACE_CMD} -e 's|<malloc\.h>|<stdlib.h>|g'
-	${REINPLACE_CMD} -e 's|/usr|${PREFIX}|g; s|-g root|-g wheel|g' ${WRKSRC}/Makefile.gnu
-
-post-install:
-	${LN} -f ${PREFIX}/lib/libfreeimage-3.12.0.so ${PREFIX}/lib/libfreeimage.so.3
+	@${REINPLACE_CMD} -e 's|/usr|${PREFIX}| ; s|-g root|-g wheel|' \
+		${WRKSRC}/Makefile.gnu
 
 .include <bsd.port.post.mk>
Index: distinfo
===================================================================
RCS file: /mnt/fbsd/development/FreeBSD-CVS/ports/graphics/freeimage/distinfo,v
retrieving revision 1.7
diff -u -r1.7 distinfo
--- distinfo	1 Jul 2009 20:24:50 -0000	1.7
+++ distinfo	14 Dec 2010 08:22:55 -0000
@@ -1,3 +1,2 @@
-MD5 (FreeImage3120.zip) = 47b259102f776a4bcd7affc00942f3b4
-SHA256 (FreeImage3120.zip) = a431fccbfd7c06fd32155b39361d520a710ee878440cca3e11706c0bd1ae6cc3
-SIZE (FreeImage3120.zip) = 4335135
+SHA256 (FreeImage3141.zip) = d5c5b5ea96897f4b81e79a37b1149a12bb396039002f22d32f9f98f6b96cff65
+SIZE (FreeImage3141.zip) = 10865165
Index: pkg-descr
===================================================================
RCS file: /mnt/fbsd/development/FreeBSD-CVS/ports/graphics/freeimage/pkg-descr,v
retrieving revision 1.1
diff -u -r1.1 pkg-descr
--- pkg-descr	4 Sep 2005 22:25:40 -0000	1.1
+++ pkg-descr	14 Dec 2010 08:22:55 -0000
@@ -1,7 +1,6 @@
-FreeImage is an Open Source library project for developers who would like to
-support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as
-needed by today's multimedia applications. FreeImage is easy to use, fast,
-multithreading safe, compatible with all 32-bit versions of Windows, and
-cross-platform (works both with Linux and Mac OS X).
+FreeImage is an open source library project for developers who would like to
+support popular graphics image formats like PNG, BMP, JPEG, TIFF and others
+as needed by today's multimedia applications.  FreeImage is easy to use,
+fast, multithreading safe, and cross-platform.
 
-WWW:	http://freeimage.sf.net
+WWW: http://freeimage.sourceforge.net/
Index: files/patch-Source-LibOpenJPEG_opj_malloc.h
===================================================================
RCS file: /mnt/fbsd/development/FreeBSD-CVS/ports/graphics/freeimage/files/patch-Source-LibOpenJPEG_opj_malloc.h,v
retrieving revision 1.1
diff -u -r1.1 patch-Source-LibOpenJPEG_opj_malloc.h
--- files/patch-Source-LibOpenJPEG_opj_malloc.h	3 Dec 2008 16:29:37 -0000	1.1
+++ files/patch-Source-LibOpenJPEG_opj_malloc.h	14 Dec 2010 08:22:55 -0000
@@ -1,12 +1,14 @@
---- Source/LibOpenJPEG/opj_malloc.h.orig	2008-12-03 16:48:35.000000000 +0100
-+++ Source/LibOpenJPEG/opj_malloc.h	2008-12-03 16:49:08.000000000 +0100
-@@ -77,7 +77,9 @@
+--- Source/LibOpenJPEG/opj_malloc.h.orig
++++ Source/LibOpenJPEG/opj_malloc.h
+@@ -85,8 +85,10 @@
  		#define HAVE_MEMALIGN
  	/* Linux x86_64 and OSX always align allocations to 16 bytes */
  	#elif !defined(__amd64__) && !defined(__APPLE__)	
 +	#ifndef __FreeBSD__
  		#define HAVE_MEMALIGN
+-		#include <malloc.h>			
 +	#endif
- 		#include <malloc.h>			
++		#include <stdlib.h>
  	#endif
  #endif
+ 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012151202.oBFC2CT6047987>