aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/gimageview/Makefile
blob: ecb9bf936f07dfe8c9f917146e023f8cf5bb4e5e (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# New ports collection makefile for:    gimageview
# Date Created:             5 Feb 2002
# Whom:     TATEISHI Katsuyuki <katsu@iec.hiroshima-u.ac.jp>
#
# $FreeBSD$
#

PORTNAME=   gimageview
PORTVERSION=    0.2.23
CATEGORIES= graphics
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= gtkmmviewer

MAINTAINER= katsu@iec.hiroshima-u.ac.jp
COMMENT=    Yet another GTK+ based image viewer

USE_REINPLACE=  yes
USE_X_PREFIX=   yes
USE_GMAKE=  yes
USE_GNOME=  gdkpixbuf
WANT_GNOME= yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LIBS="-L${LOCALBASE}/lib"

.include <bsd.port.pre.mk>

.if ${HAVE_GNOME:Mimlib}!=""
USE_GNOME+= imlib
PKGNAMESUFFIX=  -imlib
WITH_IMLIB= yes
.endif

.if exists(${LOCALBASE}/lib/libmng.so.1)
WITH_LIBMNG=    yes
.endif

.if exists(${LOCALBASE}/lib/libwmf.so.2)
WITH_LIBWMF=    yes
.endif

.if exists(${X11BASE}/lib/librsvg.so.1)
WITH_LIBRSVG=   yes
.endif

.if exists(${LOCALBASE}/bin/mplayer)
WITH_MPLAYER=   yes
.endif

.if defined(WITH_LIBMNG)
LIB_DEPENDS+=   mng.1:${PORTSDIR}/graphics/libmng
PLIST_SUB+= WITH_LIBMNG=""
.else
PLIST_SUB+= WITH_LIBMNG="@comment "
.endif

.if defined(WITH_LIBWMF)
LIB_DEPENDS+=   wmf.2:${PORTSDIR}/graphics/libwmf
PLIST_SUB+= WITH_LIBWMF=""
.else
PLIST_SUB+= WITH_LIBWMF="@comment "
.endif

.if defined(WITH_LIBRSVG)
LIB_DEPENDS+=   rsvg.1:${PORTSDIR}/graphics/librsvg
PLIST_SUB+= WITH_LIBRSVG=""
.else
PLIST_SUB+= WITH_LIBRSVG="@comment "
.endif

.if defined(WITH_MPLAYER)
RUN_DEPENDS+=   mplayer:${PORTSDIR}/multimedia/mplayer
CONFIGURE_ARGS+=    --enable-mplayer
PLIST_SUB+= WITH_LIBMPLAYER=""
.else
PLIST_SUB+= WITH_LIBMPLAYER="@comment "
.endif

.if defined(WITH_LIBXINE)
LIB_DEPENDS+=   xine.9:${PORTSDIR}/multimedia/libxine
CONFIGURE_ARGS+=    --with-xine
PLIST_SUB+= WITH_LIBXINE=""
.else
PLIST_SUB+= WITH_LIBXINE="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e 's/DATADIRNAME=lib/DATADIRNAME=share/g' \
        ${WRKSRC}/configure

post-configure:
.if !defined(WITH_IMLIB)
    @${FIND} ${WRKSRC} -name 'Makefile' | ${XARGS} ${REINPLACE_CMD} -Ee \
        's/^(GDK_IMLIB_(CFLAGS|LIBS) =).*$$/$${1}/'
.endif

.include <bsd.port.post.mk>