Changeset View
Changeset View
Standalone View
Standalone View
Makefile
# Created by: Choe, Cheng-Dae <whitekid@gmail.com> | # Created by: Choe, Cheng-Dae <whitekid@gmail.com> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= freeimage | PORTNAME= freeimage | ||||
PORTVERSION= 3.18.0 | PORTVERSION= 3.18.0 | ||||
PORTREVISION= 2 | PORTREVISION= 3 | ||||
CATEGORIES= graphics | CATEGORIES= graphics | ||||
MASTER_SITES= SF/${PORTNAME}/Source%20Distribution/${PORTVERSION} | MASTER_SITES= SF/${PORTNAME}/Source%20Distribution/${PORTVERSION} | ||||
DISTNAME= FreeImage${PORTVERSION:S/.//g} | DISTNAME= FreeImage${PORTVERSION:S/.//g} | ||||
MAINTAINER= ports@FreeBSD.org | MAINTAINER= eduardo@FreeBSD.org | ||||
COMMENT= Simple C/C++ bitmap graphics library | COMMENT= Simple C/C++ bitmap graphics library | ||||
LICENSE= FIPL GPLv2 GPLv3 | LICENSE= FIPL GPLv2 GPLv3 | ||||
LICENSE_COMB= multi | LICENSE_COMB= multi | ||||
LICENSE_NAME_FIPL= FreeImage Public License | LICENSE_NAME_FIPL= FreeImage Public License | ||||
LICENSE_FILE_FIPL= ${WRKSRC}/license-fi.txt | LICENSE_FILE_FIPL= ${WRKSRC}/license-fi.txt | ||||
LICENSE_FILE_GPLv2= ${WRKSRC}/license-gplv2.txt | LICENSE_FILE_GPLv2= ${WRKSRC}/license-gplv2.txt | ||||
LICENSE_FILE_GPLv3= ${WRKSRC}/license-gplv3.txt | LICENSE_FILE_GPLv3= ${WRKSRC}/license-gplv3.txt | ||||
LICENSE_PERMS_FIPL= dist-mirror pkg-mirror auto-accept | LICENSE_PERMS_FIPL= dist-mirror pkg-mirror auto-accept | ||||
BROKEN_mips= fails to compile: section referenced in discarded section | BROKEN_mips= fails to compile: section referenced in discarded section | ||||
BROKEN_mips64= fails to compile: opcode not supported on this processor: mips3 (mips3) 'madd $4,$5' | BROKEN_mips64= fails to compile: opcode not supported on this processor: mips3 (mips3) 'madd $4,$5' | ||||
USES= dos2unix gmake zip | USES= dos2unix gmake zip | ||||
USE_LDCONFIG= yes | |||||
DOS2UNIX_FILES= Source/LibOpenJPEG/opj_malloc.h \ | DOS2UNIX_FILES= Source/LibOpenJPEG/opj_malloc.h \ | ||||
Source/LibRawLite/dcraw/dcraw.c \ | Source/LibRawLite/dcraw/dcraw.c \ | ||||
Source/LibRawLite/internal/dcraw_common.cpp \ | Source/LibRawLite/internal/dcraw_common.cpp \ | ||||
Source/FreeImage/PluginBMP.cpp \ | Source/FreeImage/PluginBMP.cpp \ | ||||
Source/FreeImage/PluginDDS.cpp \ | Source/FreeImage/PluginDDS.cpp \ | ||||
Source/LibPNG/pngpriv.h | Source/LibPNG/pngpriv.h | ||||
USE_LDCONFIG= yes | |||||
WRKSRC= ${WRKDIR}/FreeImage | |||||
MAKE_ARGS= CC="${CC}" CPP="${CPP}" CXX="${CXX}" | MAKE_ARGS= CC="${CC}" CPP="${CPP}" CXX="${CXX}" | ||||
CFLAGS+= -DPNG_ARM_NEON_OPT=0 -fexceptions -fvisibility=hidden -fPIC | CFLAGS+= -DPNG_ARM_NEON_OPT=0 -fexceptions -fvisibility=hidden -fPIC | ||||
CXXFLAGS+= -DPNG_ARM_NEON_OPT=0 -fexceptions -fvisibility=hidden -fPIC | CXXFLAGS+= -DPNG_ARM_NEON_OPT=0 -fexceptions -fvisibility=hidden -fPIC | ||||
SUB_FILES= freeimage.pc | |||||
SUB_LIST= name="${PORTNAME}" \ | |||||
dbaio: `PREFIX` is added by the default here, you don't need this.
Check with
`$ make -V SUB_LIST` | |||||
Done Inline Actionswith prefix="${PREFIX}" line, make -V SUB_LIST gives: prefix="/usr/local" name="freeimage" description="Simple C/C++ bitmap graphics library" version="3.18.0" PREFIX=/usr/local LOCALBASE=/usr/local DATADIR=/usr/local/share/freeimage DOCSDIR=/usr/local/share/doc/freeimage EXAMPLESDIR=/usr/local/share/examples/freeimage WWWDIR=/usr/local/www/freeimage ETCDIR=/usr/local/etc/freeimage without prefix="${PREFIX}" line, make -V SUB_LIST gives: PREFIX=/usr/local LOCALBASE=/usr/local DATADIR=/usr/local/share/freeimage DOCSDIR=/usr/local/share/doc/freeimage EXAMPLESDIR=/usr/local/share/examples/freeimage WWWDIR=/usr/local/www/freeimage ETCDIR=/usr/local/etc/freeimage Are you sure that I can delete this line? eduardo: with prefix="${PREFIX}" line, make -V SUB_LIST gives:
```
prefix="/usr/local"… | |||||
Not Done Inline ActionsI was referring just the prefix variable. dbaio: I was referring just the prefix variable. | |||||
Done Inline ActionsOk, let me think: eduardo: Ok, let me think:
prefix="${PREFIX}"
And I should remove PREFIX?
prefix=
Is this correct… | |||||
description="${COMMENT}" \ | |||||
version="${PORTVERSION}" | |||||
WRKSRC= ${WRKDIR}/FreeImage | |||||
PLIST_FILES= include/FreeImage.h \ | PLIST_FILES= include/FreeImage.h \ | ||||
include/FreeImagePlus.h \ | include/FreeImagePlus.h \ | ||||
lib/libfreeimage.a \ | lib/libfreeimage.a \ | ||||
lib/libfreeimage-${PORTVERSION}.so \ | lib/libfreeimage-${PORTVERSION}.so \ | ||||
lib/libfreeimage.so.3 \ | lib/libfreeimage.so.3 \ | ||||
lib/libfreeimage.so \ | lib/libfreeimage.so \ | ||||
lib/libfreeimageplus.a \ | lib/libfreeimageplus.a \ | ||||
lib/libfreeimageplus-${PORTVERSION}.so \ | lib/libfreeimageplus-${PORTVERSION}.so \ | ||||
lib/libfreeimageplus.so.3 \ | lib/libfreeimageplus.so.3 \ | ||||
lib/libfreeimageplus.so | lib/libfreeimageplus.so \ | ||||
libdata/pkgconfig/freeimage.pc | |||||
Done Inline ActionsWhat about a blank line separating this? dbaio: What about a blank line separating this? | |||||
PKGCONFIGDIR?= ${PREFIX}/libdata/pkgconfig | |||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -e 's|/usr|${PREFIX}| ; s|-o root -g root || ; \ | @${REINPLACE_CMD} -e 's|/usr|${PREFIX}| ; s|-o root -g root || ; \ | ||||
/^-fPIC/d' ${WRKSRC}/Makefile.gnu ${WRKSRC}/Makefile.fip | /^-fPIC/d' ${WRKSRC}/Makefile.gnu ${WRKSRC}/Makefile.fip | ||||
post-build: | post-build: | ||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} -f Makefile.fip ${_MAKE_JOBS} \ | ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -f Makefile.fip ${_MAKE_JOBS} \ | ||||
${MAKE_ARGS} -C ${BUILD_WRKSRC} | ${MAKE_ARGS} -C ${BUILD_WRKSRC} | ||||
post-install: | post-install: | ||||
${SETENV} ${MAKE_ENV} ${MAKE_CMD} -f Makefile.fip ${MAKE_ARGS} \ | ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -f Makefile.fip ${MAKE_ARGS} \ | ||||
-C ${INSTALL_WRKSRC} ${INSTALL_TARGET} | -C ${INSTALL_WRKSRC} ${INSTALL_TARGET} | ||||
${LN} -sf libfreeimageplus.so.3 \ | ${LN} -sf libfreeimageplus.so.3 \ | ||||
${STAGEDIR}${PREFIX}/lib/libfreeimageplus.so | ${STAGEDIR}${PREFIX}/lib/libfreeimageplus.so | ||||
${LN} -sf libfreeimageplus-${PORTVERSION}.so \ | ${LN} -sf libfreeimageplus-${PORTVERSION}.so \ | ||||
${STAGEDIR}${PREFIX}/lib/libfreeimageplus.so.3 | ${STAGEDIR}${PREFIX}/lib/libfreeimageplus.so.3 | ||||
${INSTALL_DATA} ${WRKDIR}/freeimage.pc ${STAGEDIR}${PKGCONFIGDIR}/ | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
PREFIX is added by the default here, you don't need this.
Check with
$ make -V SUB_LIST