1 # Created by: Choe, Cheng-Dae <whitekid@gmail.com>
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!
11 MASTER_SITES= SF/${PORTNAME}/Source%20Distribution/${PORTVERSION}
12 DISTNAME= FreeImage${PORTVERSION:S/.//g}
14 MAINTAINER= ports@FreeBSD.org
15 COMMENT= Simple C/C++ bitmap graphics library
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
22 WRKSRC= ${WRKDIR}/FreeImage
23 MAKE_ARGS= CC="${CC}" CPP="${CPP}" CXX="${CXX}"
25 CFLAGS+= -fexceptions -fvisibility=hidden
29 PLIST_FILES= include/FreeImage.h \
30 include/FreeImagePlus.h \
32 lib/libfreeimage-${PORTVERSION}.so \
33 lib/libfreeimage.so.3 \
35 lib/libfreeimageplus.a \
36 lib/libfreeimageplus-${PORTVERSION}.so \
37 lib/libfreeimageplus.so.3 \
38 lib/libfreeimageplus.so
40 .include <bsd.port.options.mk>
42 .if ${ARCH} == x86_64 || ${ARCH} == powerpc
47 @${REINPLACE_CMD} -e 's|/usr|${PREFIX}| ; s|-o root -g root ||' \
48 ${WRKSRC}/Makefile.gnu ${WRKSRC}/Makefile.fip
51 ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -f Makefile.fip ${_MAKE_JOBS} \
52 ${MAKE_ARGS} -C ${BUILD_WRKSRC}
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
62 .include <bsd.port.mk>