Date: Thu, 9 May 2013 14:27:04 +0200 (CEST) From: Thierry Thomas <thierry@FreeBSD.org> To: FreeBSD-gnats-submit@freebsd.org Cc: gahr@FreeBSD.org Subject: ports/178450: graphics/freeimage: packaging freeimageplus Message-ID: <20130509122704.8BF4A42D258E@graf.pompo.net> Resent-Message-ID: <201305091230.r49CU0e5035476@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 178450 >Category: ports >Synopsis: graphics/freeimage: packaging freeimageplus >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: Thu May 09 12:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Thierry Thomas >Release: FreeBSD 9.1-STABLE i386 >Organization: Kabbale Eros >Environment: System: FreeBSD graf.pompo.net 9.1-STABLE FreeBSD 9.1-STABLE #0 r248682: Sun Mar 24 18:59:01 CET 2013 thierry@graf.pompo.net:/usr/obj/usr/src/sys/GRAF130324 i386 >Description: The new release of cad/opencascade could use FreeImage, but the C++ wrapper (freeimageplus) is required. This wrapper is included in the same tarball, so I think that a slave port is the best solution. The attached patch freeimage.diff transforms the original Makefile into a master port, and freeimageplus.shar produces the slave port. >How-To-Repeat: N/A. >Fix: Please apply the following patch and execute the shar file. --- freeimage.diff begins here --- diff -urN graphics/freeimage.orig/Makefile graphics/freeimage/Makefile --- graphics/freeimage.orig/Makefile 2013-03-01 17:56:51.000000000 +0100 +++ graphics/freeimage/Makefile 2013-05-09 12:53:38.000000000 +0200 @@ -5,24 +5,40 @@ PORTVERSION= 3.15.4 CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}/Source%20Distribution/${PORTVERSION} +.if defined(FIP) +PKGNAMESUFFIX=plus +.endif DISTNAME= FreeImage${PORTVERSION:S/.//g} MAINTAINER= gahr@FreeBSD.org -COMMENT= An open source graphics library +COMMENT?= An open source graphics library USE_ZIP= yes -USE_DOS2UNIX= Source/LibOpenJPEG/opj_malloc.h +USE_DOS2UNIX= Source/LibOpenJPEG/opj_malloc.h Makefile.fip USE_GMAKE= yes USE_LDCONFIG= yes WRKSRC= ${WRKDIR}/FreeImage -CFLAGS+= -fexceptions -fvisibility=hidden +CFLAGS+= -fexceptions -fvisibility=hidden + +SLAVEDIRS= graphics/freeimageplus +.if defined(FIP) +LIB_DEPENDS+= freeimage:${PORTSDIR}/graphics/freeimage +MAKEFILE= Makefile.fip +MAKE_ENV= DESTDIR=${DESTDIR} INCDIR=${PREFIX}/include INSTALLDIR=${PREFIX}/lib +PLIST_FILES= include/FreeImagePlus.h \ + lib/libfreeimageplus.a \ + lib/libfreeimageplus-${PORTVERSION}.so \ + lib/libfreeimageplus.so.3 \ + lib/libfreeimageplus.so +.else PLIST_FILES= include/FreeImage.h \ lib/libfreeimage.a \ lib/libfreeimage-${PORTVERSION}.so \ lib/libfreeimage.so.3 \ lib/libfreeimage.so +.endif .include <bsd.port.pre.mk> @@ -32,6 +48,6 @@ post-patch: @${REINPLACE_CMD} -e 's|/usr|${PREFIX}| ; s|-g root|-g wheel|' \ - ${WRKSRC}/Makefile.gnu + ${WRKSRC}/Makefile.gnu ${WRKSRC}/Makefile.fip .include <bsd.port.post.mk> diff -urN graphics/freeimage.orig/files/patch-Makefile.fip graphics/freeimage/files/patch-Makefile.fip --- graphics/freeimage.orig/files/patch-Makefile.fip 1970-01-01 01:00:00.000000000 +0100 +++ graphics/freeimage/files/patch-Makefile.fip 2013-05-09 12:55:08.000000000 +0200 @@ -0,0 +1,30 @@ +--- Makefile.fip.orig 2010-12-09 15:12:12.000000000 +0100 ++++ Makefile.fip 2013-05-09 11:44:43.000000000 +0200 +@@ -5,8 +5,8 @@ + + # General configuration variables: + DESTDIR ?= / +-INCDIR ?= $(DESTDIR)/usr/include +-INSTALLDIR ?= $(DESTDIR)/usr/lib ++INCDIR ?= $(DESTDIR)/usr/local/include ++INSTALLDIR ?= $(DESTDIR)/usr/local/lib + + # Converts cr/lf to just lf + DOS2UNIX = dos2unix +@@ -63,10 +63,12 @@ + + install: + install -d $(INCDIR) $(INSTALLDIR) +- install -m 644 -o root -g root $(HEADER) $(INCDIR) +- install -m 644 -o root -g root $(HEADERFIP) $(INCDIR) +- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) +- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) ++ #install -m 644 -o root -g wheel $(HEADER) $(INCDIR) ++ install -m 644 -o root -g wheel $(HEADERFIP) $(INCDIR) ++ install -m 644 -o root -g wheel $(STATICLIB) $(INSTALLDIR) ++ install -m 755 -o root -g wheel $(SHAREDLIB) $(INSTALLDIR) ++ ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) ++ ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) + + clean: + rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME) --- freeimage.diff ends here --- --- freeimageplus.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # graphics/freeimageplus # graphics/freeimageplus/Makefile # echo c - graphics/freeimageplus mkdir -p graphics/freeimageplus > /dev/null 2>&1 echo x - graphics/freeimageplus/Makefile sed 's/^X//' >graphics/freeimageplus/Makefile << 'f69ddd4d81de418c7dea4cbe042c460f' X# Created by: thierry@pompo.net X# $FreeBSD$ X XPORTNAME= freeimageplus X XCOMMENT= C++ wrapper for FreeImage X XMASTERDIR= ${.CURDIR}/../freeimage X XFIP= yes X X.include "${MASTERDIR}/Makefile" f69ddd4d81de418c7dea4cbe042c460f exit --- freeimageplus.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130509122704.8BF4A42D258E>