Update x11-drivers/xf86-input-wacom to version 0.34.0_1
[dports.git] / graphics / freeimage / Makefile
1 # Created by: Choe, Cheng-Dae <whitekid@gmail.com>
2 # $FreeBSD$
3
4 PORTNAME=       freeimage
5 PORTVERSION=    3.16.0
6 PORTREVISION=   1
7 # Version 3.17.0 is available, but does not build on i386 (and probably
8 # other 32-bit arches) without some not-quite-trivial patching.  If one
9 # decides to update the port, please make sure 32-bit builds are tested!
10 CATEGORIES=     graphics
11 MASTER_SITES=   SF/${PORTNAME}/Source%20Distribution/${PORTVERSION}
12 DISTNAME=       FreeImage${PORTVERSION:S/.//g}
13
14 MAINTAINER=     ports@FreeBSD.org
15 COMMENT=        Simple C/C++ bitmap graphics library
16
17 USES=           dos2unix gmake zip
18 DOS2UNIX_FILES= Source/LibOpenJPEG/opj_malloc.h \
19                 Source/LibRawLite/dcraw/dcraw.c \
20                 Source/LibRawLite/internal/dcraw_common.cpp
21 USE_LDCONFIG=   yes
22 WRKSRC=         ${WRKDIR}/FreeImage
23 MAKE_ARGS=      CC="${CC}" CPP="${CPP}" CXX="${CXX}"
24
25 CFLAGS+=        -fexceptions -fvisibility=hidden
26 CFLAGS_aarch64= -fPIC
27 CFLAGS_x86_64=  -fPIC
28
29 PLIST_FILES=    include/FreeImage.h \
30                 include/FreeImagePlus.h \
31                 lib/libfreeimage.a \
32                 lib/libfreeimage-${PORTVERSION}.so \
33                 lib/libfreeimage.so.3 \
34                 lib/libfreeimage.so \
35                 lib/libfreeimageplus.a \
36                 lib/libfreeimageplus-${PORTVERSION}.so \
37                 lib/libfreeimageplus.so.3 \
38                 lib/libfreeimageplus.so
39
40 .include <bsd.port.options.mk>
41
42 .if ${ARCH} == x86_64 || ${ARCH} == powerpc
43 USES+=          compiler:c++0x
44 .endif
45
46 post-patch:
47         @${REINPLACE_CMD} -e 's|/usr|${PREFIX}| ; s|-o root -g root ||' \
48                 ${WRKSRC}/Makefile.gnu ${WRKSRC}/Makefile.fip
49
50 post-build:
51         ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -f Makefile.fip ${_MAKE_JOBS} \
52                 ${MAKE_ARGS} -C ${BUILD_WRKSRC}
53
54 post-install:
55         ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -f Makefile.fip ${MAKE_ARGS} \
56                 -C ${INSTALL_WRKSRC} ${INSTALL_TARGET}
57         ${LN} -sf libfreeimageplus.so.3 \
58                 ${STAGEDIR}${PREFIX}/lib/libfreeimageplus.so
59         ${LN} -sf libfreeimageplus-${PORTVERSION}.so \
60                 ${STAGEDIR}${PREFIX}/lib/libfreeimageplus.so.3
61
62 .include <bsd.port.mk>