aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/libxine/Makefile
blob: 3c35aca4753631866398f59ca5cb6f992606e1c7 (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# New ports collection makefile for:    libxine
# Date created:         14 Oct 2000
# Whom:                 alex
#
# $FreeBSD$
#

PORTNAME=   xine
PORTVERSION=    1.1.1
CATEGORIES= multimedia ipv6
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
PKGNAMEPREFIX=  lib
DISTNAME=   ${PORTNAME}-lib-${PORTVERSION}

MAINTAINER= nobutaka@FreeBSD.org
COMMENT=    Libraries for xine multimedia player

BUILD_DEPENDS=  ${LOCALBASE}/lib/libdjbfft.a:${PORTSDIR}/math/djbfft
LIB_DEPENDS=    FLAC.7:${PORTSDIR}/audio/flac \
        vorbis.3:${PORTSDIR}/audio/libvorbis \
        speex.3:${PORTSDIR}/audio/speex \
        aa.1:${PORTSDIR}/graphics/aalib \
        mng.1:${PORTSDIR}/graphics/libmng \
        png.5:${PORTSDIR}/graphics/png \
        dvdread.3:${PORTSDIR}/multimedia/libdvdread \
        freetype.9:${PORTSDIR}/print/freetype2 \
        fame-0.9.1:${PORTSDIR}/multimedia/libfame \
        cdio.6:${PORTSDIR}/sysutils/libcdio \
        modplug.0:${PORTSDIR}/audio/libmodplug \
        vcdinfo.2:${PORTSDIR}/multimedia/vcdimager \
        Wand.8:${PORTSDIR}/graphics/ImageMagick
PATCH_DEPENDS=  libtool15:${PORTSDIR}/devel/libtool15

USE_GETTEXT=    yes
USE_ICONV=  yes
USE_X_PREFIX=   yes
USE_AUTOTOOLS=  libtool:15:inc
WANT_GNOME= yes
USE_GNOME=  gnomehack gnometarget
USE_GMAKE=  yes
USE_GL=     yes
USE_SDL=    sdl
USE_REINPLACE=  yes
CONFIGURE_ENV=  CFLAGS="${CFLAGS} -fno-force-addr -I${LOCALBASE}/include -I${LOCALBASE}/include/dvdread -I${X11BASE}/include" \
        CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
        THREAD_CFLAGS="${PTHREAD_CFLAGS}" \
        THREAD_LIBS="${PTHREAD_LIBS}" \
        EXTRA_X_LIBS="-lGL -lGLU -lXext -lX11 -lm"
CONFIGURE_ARGS= --with-w32-path=${LOCALBASE}/lib/win32 --enable-ipv6
INSTALLS_SHLIB= yes

MAN1=   xine-config.1
MAN5=   xine.5

.include <bsd.port.pre.mk>

.if ${X_WINDOW_SYSTEM:L} != xfree86-3
PLIST_SUB+= WITH_LIBXV=""
.else
PLIST_SUB+= WITH_LIBXV="@comment "
.endif

.if !defined(WITHOUT_ARTS) && (exists(${LOCALBASE}/bin/artsc-config) || defined(WITH_ARTS))
LIB_DEPENDS+=   artsc.0:${PORTSDIR}/audio/arts
PLIST_SUB+= WITH_ARTS=""
.else
PLIST_SUB+= WITH_ARTS="@comment "
.endif

.if !defined(WITHOUT_CACA) && (exists(${LOCALBASE}/lib/libcaca.a) || defined(WITH_CACA))
BUILD_DEPENDS+= caca-config:${PORTSDIR}/graphics/libcaca
PLIST_SUB+= WITH_CACA=""
.else
PLIST_SUB+= WITH_CACA="@comment "
.endif

.if !defined(WITHOUT_ESOUND) && (${HAVE_GNOME:Mesound} != "" || defined(WITH_ESOUND))
USE_GNOME+= esound
PLIST_SUB+= WITH_ESOUND=""
.else
PLIST_SUB+= WITH_ESOUND="@comment "
.endif

.if !defined(WITHOUT_GNOMEVFS2) && (${HAVE_GNOME:Mgnomevfs2} != "" || defined(WITH_GNOMEVFS2))
USE_GNOME+= gnomevfs2
PLIST_SUB+= WITH_GNOMEVFS2=""
.else
PLIST_SUB+= WITH_GNOMEVFS2="@comment "
.endif

.if !defined(WITHOUT_POLYPAUDIO) && (exists(${LOCALBASE}/lib/libpolyp-0.7.so.0) || defined(WITH_POLYPAUDIO))
LIB_DEPENDS+=   polyp-0.7.0:${PORTSDIR}/audio/polypaudio
PLIST_SUB+= WITH_POLYPAUDIO=""
.else
PLIST_SUB+= WITH_POLYPAUDIO="@comment "
.endif

.if ${ARCH} == "i386"
PLIST_SUB+= WITH_VIDIX=""
.else
PLIST_SUB+= WITH_VIDIX="@comment "
.endif

.if !defined(WITHOUT_XVMC) && (exists(${X11BASE}/lib/libXvMCNVIDIA.so.1) || defined(WITH_XVMC))
CONFIGURE_ARGS+=--with-xvmc-lib=XvMCNVIDIA
LIB_DEPENDS+=   XvMCNVIDIA.1:${PORTSDIR}/x11/nvidia-driver
PLIST_SUB+= WITH_XVMC=""
.else
PLIST_SUB+= WITH_XVMC="@comment "
.endif

.if !defined(WITHOUT_THEORA) && (exists(${LOCALBASE}/lib/libtheora.so.1) || defined (WITH_THEORA))
LIB_DEPENDS+=   theora.1:${PORTSDIR}/multimedia/libtheora
PLIST_SUB+= WITH_THEORA=""
.else
PLIST_SUB+= WITH_THEORA="@comment "
.endif

.if !defined(WITHOUT_SMB) && (exists(${LOCALBASE}/lib/libsmbclient.so.0) || defined (WITH_SMB))
LIB_DEPENDS+=   smbclient.0:${PORTSDIR}/net/samba-libsmbclient
PLIST_SUB+= WITH_SMB=""
.else
PLIST_SUB+= WITH_SMB="@comment "
.endif

pre-everything::
    @${ECHO_MSG} "===>"
    @${ECHO_MSG} "===> You can enable some features by defining following variables."
    @${ECHO_MSG} "===>"
.if !exists(${LOCALBASE}/bin/artsc-config) && !defined(WITH_ARTS)
    @${ECHO_MSG} "===> WITH_ARTS   (arts support)"
.else
    @${ECHO_MSG} "===> WITH_ARTS   (arts support, enabled)"
.endif
.if !exists(${LOCALBASE}/lib/libcaca.a) && !defined(WITH_CACA)
    @${ECHO_MSG} "===> WITH_CACA (libcaca support)"
.else
    @${ECHO_MSG} "===> WITH_CACA (libcaca support, enabled)"
.endif
.if !(${HAVE_GNOME:Mgnomevfs2} != "") && !defined(WITH_GNOMEVFS2)
    @${ECHO_MSG} "===> WITH_GNOMEVFS2 (gnomevfs2 support)"
.else
    @${ECHO_MSG} "===> WITH_GNOMEVFS2 (gnomevfs2 support, enabled)"
.endif
.if !(${HAVE_GNOME:Mesound} != "") && !defined(WITH_ESOUND)
    @${ECHO_MSG} "===> WITH_ESOUND (esound support)"
.else
    @${ECHO_MSG} "===> WITH_ESOUND (esound support, enabled)"
.endif
.if !exists(${LOCALBASE}/lib/libpolyp-0.7.so.0) && !defined(WITH_POLYPAUDIO)
    @${ECHO_MSG} "===> WITH_POLYPAUDIO (polypaudio support)"
.else
    @${ECHO_MSG} "===> WITH_POLYPAUDIO (polypaudio support, enabled)"
.endif
.if !exists(${LOCALBASE}/lib/libsmbclient.so.0) && !defined (WITH_SMB)
    @${ECHO_MSG} "===> WITH_SMB (SMB support)"
.else
    @${ECHO_MSG} "===> WITH_SMB (SMB support, enabled)"
.endif
.if !exists(${LOCALBASE}/lib/libtheora.so.1) && !defined(WITH_THEORA)
    @${ECHO_MSG} "===> WITH_THEORA (libtheora support)"
.else
    @${ECHO_MSG} "===> WITH_THEORA (libtheora support, enabled)"
.endif
.if !exists(${X11BASE}/lib/libXvMCNVIDIA.so.1) && !defined(WITH_XVMC)
    @${ECHO_MSG} "===> WITH_XVMC (XvMC support)"
.else
    @${ECHO_MSG} "===> WITH_XVMC (XvMC support, enabled)"
.endif
    @${ECHO_MSG} "===>"

post-patch:
    @${REINPLACE_CMD} -e \
        's|THREAD_LIBS=.*$$|THREAD_LIBS="\$$THREAD_LIBS"|g ; \
         s|THREAD_CFLAGS=.*$$|THREAD_CFLAGS="\$$THREAD_CFLAGS"|g ; \
         s|-L/usr/local/lib||g ; \
         s|-I/usr/local/include||g ; \
         s|-lgiconv|-liconv|g ; \
         s|-funroll-loops||g' ${WRKSRC}/configure
.if ${OSVERSION} >= 500035
    @${REINPLACE_CMD} -e \
         's|-malign-loops|-falign-loops|g ; \
          s|-malign-jumps|-falign-jumps|g ; \
          s|-malign-functions|-falign-functions|g' ${WRKSRC}/configure
.endif
    ${CP} ${LTMAIN} ${WRKSRC}/ltmain.sh

.include <bsd.port.post.mk>