summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authoreduardo <eduardo@35697150-7ecd-e111-bb59-0022644237b5>2021-03-30 06:27:21 +0000
committereduardo <eduardo@35697150-7ecd-e111-bb59-0022644237b5>2021-03-30 06:27:21 +0000
commit7b0d7b60f880ffc5554adc71bad160e5b562d6ef (patch)
tree90c9fdc035f6025f34d3747cfefc28c33d694bc3 /graphics
parent9c5902a91c0c5c326a6b70941f2cf351220ff9de (diff)
downloadfreebsd-ports-7b0d7b60f880ffc5554adc71bad160e5b562d6ef.tar.gz
freebsd-ports-7b0d7b60f880ffc5554adc71bad160e5b562d6ef.tar.bz2
graphics/freeimage: Add pkgconf support
While here: - Take MAINTAINER'ship - reorder Makefile (portclippy) PR: 254340 Submitted by: Freddy DISSAUX <dsx@bsdsx.fr> Approved by: dbaio (mentor) Differential Revision: https://reviews.freebsd.org/D29311 git-svn-id: http://svn.freebsd.org/ports/head@569542 35697150-7ecd-e111-bb59-0022644237b5
Diffstat (limited to 'graphics')
-rw-r--r--graphics/freeimage/Makefile20
-rw-r--r--graphics/freeimage/files/freeimage.pc.in11
2 files changed, 26 insertions, 5 deletions
diff --git a/graphics/freeimage/Makefile b/graphics/freeimage/Makefile
index 28ae84bbecd5..4491e68d2643 100644
--- a/graphics/freeimage/Makefile
+++ b/graphics/freeimage/Makefile
@@ -3,12 +3,12 @@
PORTNAME= freeimage
PORTVERSION= 3.18.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= graphics
MASTER_SITES= SF/${PORTNAME}/Source%20Distribution/${PORTVERSION}
DISTNAME= FreeImage${PORTVERSION:S/.//g}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= eduardo@FreeBSD.org
COMMENT= Simple C/C++ bitmap graphics library
LICENSE= FIPL GPLv2 GPLv3
@@ -23,19 +23,25 @@ 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'
USES= dos2unix gmake zip
-USE_LDCONFIG= yes
DOS2UNIX_FILES= Source/LibOpenJPEG/opj_malloc.h \
Source/LibRawLite/dcraw/dcraw.c \
Source/LibRawLite/internal/dcraw_common.cpp \
Source/FreeImage/PluginBMP.cpp \
Source/FreeImage/PluginDDS.cpp \
Source/LibPNG/pngpriv.h
+USE_LDCONFIG= yes
-WRKSRC= ${WRKDIR}/FreeImage
MAKE_ARGS= CC="${CC}" CPP="${CPP}" CXX="${CXX}"
CFLAGS+= -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}" \
+ description="${COMMENT}" \
+ version="${PORTVERSION}"
+
+WRKSRC= ${WRKDIR}/FreeImage
+
PLIST_FILES= include/FreeImage.h \
include/FreeImagePlus.h \
lib/libfreeimage.a \
@@ -45,7 +51,10 @@ PLIST_FILES= include/FreeImage.h \
lib/libfreeimageplus.a \
lib/libfreeimageplus-${PORTVERSION}.so \
lib/libfreeimageplus.so.3 \
- lib/libfreeimageplus.so
+ lib/libfreeimageplus.so \
+ libdata/pkgconfig/freeimage.pc
+
+PKGCONFIGDIR?= ${PREFIX}/libdata/pkgconfig
post-patch:
@${REINPLACE_CMD} -e 's|/usr|${PREFIX}| ; s|-o root -g root || ; \
@@ -62,5 +71,6 @@ post-install:
${STAGEDIR}${PREFIX}/lib/libfreeimageplus.so
${LN} -sf libfreeimageplus-${PORTVERSION}.so \
${STAGEDIR}${PREFIX}/lib/libfreeimageplus.so.3
+ ${INSTALL_DATA} ${WRKDIR}/freeimage.pc ${STAGEDIR}${PKGCONFIGDIR}/
.include <bsd.port.mk>
diff --git a/graphics/freeimage/files/freeimage.pc.in b/graphics/freeimage/files/freeimage.pc.in
new file mode 100644
index 000000000000..5a174c626f0d
--- /dev/null
+++ b/graphics/freeimage/files/freeimage.pc.in
@@ -0,0 +1,11 @@
+$FreeBSD$
+prefix=%%PREFIX%%
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: %%name%%
+Description: %%description%%
+Version: %%version%%
+Libs: -L${libdir} -lfreeimage
+Cflags: -I${includedir}