blob: 4aee8692a9a2b837b13d0e299d9dcc2281e5a67f (
plain) (
blame)
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
56
57
58
59
60
61
62
63
|
# Created by: Glenn Johnson
PORTNAME= libimg
PORTVERSION= 1.4.12
CATEGORIES?= graphics tk tcl
MASTER_SITES= SF/tkimg/tkimg/${PORTVERSION:R}/tkimg%20${PORTVERSION}
DISTNAME= Img-${PORTVERSION}-Source
MAINTAINER= mi@aldan.algebra.com
COMMENT= Library of image format handlers for Tk4.1 and later
LICENSE= TclTk
LICENSE_NAME= Tcl/Tk License
LICENSE_FILE= ${WRKSRC}/license.terms
LICENSE_PERMS= auto-accept pkg-sell pkg-mirror dist-sell dist-mirror
BUILD_DEPENDS= dtplite:devel/tcllib
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libpng.so:graphics/png \
libtiff.so:graphics/tiff
USES= autoreconf jpeg tk:tea xorg dos2unix
PLIST_SUB+= PORTVERSION=${PORTVERSION}
USE_XORG= x11 xext xft xrender xscrnsaver
OPTIONS_DEFINE= EXAMPLES
OPTIONS_SUB= yes
WRKSRC= ${WRKDIR}/Img-${PORTVERSION}
DOS2UNIX_GLOB= *.[ch] *.tcl *.msg *.in *.test license.terms
# We don't need the bundled libraries:
EXTRACT_AFTER_ARGS= --exclude 'config.*' --exclude Makefile --exclude \
'compat' --exclude win
MAKE_ARGS+= INSTALL_ROOT="${STAGEDIR}"
CONFIGURE_ENV= WRKDIR="${WRKDIR}"
CONFIGURE_ARGS+=--enable-shared --disable-stubs
post-patch:
${REINPLACE_CMD} -E -e 's,"(zlib|tiff|jpeg|png)tcl.h",<\1.h>,' \
-e 's,jpeg\.h,jpeglib.h,' ${WRKSRC}/*/*.[ch]
.for d in jpeg png tiff zlib
${TOUCH} ${WRKDIR}/$dtclConfig.sh
.endfor
post-configure:
.for l in jpeg png tiff
# Link with -l$l
${REINPLACE_CMD} -E \
-e 's,^SHLIB_LD_LIBS[[:space:]]*=[[:space:]]*(.*),SHLIB_LD_LIBS=\1 -l$l,' \
${WRKSRC}/$l/Makefile
.endfor
do-test:
cd ${WRKSRC}/tests && \
${SETENV} TCLLIBPATH=${WRKSRC:Q} ${WISH} ${WRKSRC}/tests/all
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/msgs/
${INSTALL_DATA} ${WRKSRC}/msgs/*.msg ${STAGEDIR}${EXAMPLESDIR}/msgs/
${INSTALL_SCRIPT} ${WRKSRC}/demo.tcl ${WRKSRC}/tkv.tcl ${STAGEDIR}${EXAMPLESDIR}/
.include <bsd.port.mk>
|