summaryrefslogtreecommitdiff
path: root/graphics/freeimage/Makefile.common
blob: d9a620d23687b65f080973631e8c977c2c665c4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# $NetBSD: Makefile.common,v 1.1 2020/05/25 12:24:37 nia Exp $
# used by graphics/freeimage/Makefile
# used by graphics/freeimageplus/Makefile

# Remember to bump both PKGNAMEs when you change this.
DISTNAME=	FreeImage3180
CATEGORIES=	graphics
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=freeimage/}
EXTRACT_SUFX=	.zip

HOMEPAGE=	https://freeimage.sf.net/
LICENSE=	gnu-gpl-v2 OR gnu-gpl-v3 OR mpl-1.0

USE_LANGUAGES+=	c c++11
USE_TOOLS+=	gmake pkg-config

WRKSRC=		${WRKDIR}/FreeImage

MAKE_FLAGS+=	INCDIR=${DESTDIR}/${PREFIX}/include
MAKE_FLAGS+=	INSTALLDIR=${DESTDIR}/${PREFIX}/lib

PATCHDIR=	${.CURDIR}/../../graphics/freeimage/patches
DISTINFO_FILE=	${.CURDIR}/../../graphics/freeimage/distinfo

INSTALLATION_DIRS+=	include lib share/doc/${PKGBASE}

pre-configure:
	# G3 and JPEGTransform can't be built,
	# due to using private headers in bundled libs
	cd ${WRKSRC} && ${RM} -r Source/Lib* \
	    Source/ZLib \
	    Source/OpenEXR \
	    Source/FreeImage/PluginG3.cpp \
	    Source/FreeImage/PluginJXR.cpp \
	    Source/FreeImageToolkit/JPEGTransform.cpp
	cd ${WRKSRC} && ${SH} gensrclist.sh
	cd ${WRKSRC} && ${SH} genfipsrclist.sh
	${SED} \
	    -e 's| \./Source/FreeImage/PluginG3\.cpp||g' \
	    -e 's| \./Source/FreeImage/PluginJXR\.cpp||g' \
	    -e 's| \./Source/FreeImageToolkit/JPEGTransform\.cpp||g' \
	    ${WRKSRC}/Makefile.srcs > ${WRKSRC}/Makefile.srcs.new
	${MV} ${WRKSRC}/Makefile.srcs.new ${WRKSRC}/Makefile.srcs

PLIST_SUBST+=	PKGVERSION_NOREV=${PKGVERSION_NOREV}

NOT_FOR_PLATFORM=	Darwin-*-*

.include "../../graphics/libraw/buildlink3.mk"
.include "../../graphics/libwebp/buildlink3.mk"
.include "../../graphics/openexr/buildlink3.mk"
.include "../../graphics/openjpeg/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"