aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/gpac-libgpac/Makefile
blob: c9ce28762b4b9f9f3e250562b37cfc5debe3c50d (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
# New ports collection makefile for:    gpac-libm4systems
# Date created:     2005-05-04
# Whom:         Michael Johnson <ahze@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   gpac
PORTVERSION=    0.4.5
PORTREVISION=   4
PORTEPOCH=  1
CATEGORIES= multimedia
MASTER_SITES=   SF/${PORTNAME}/GPAC/GPAC%20${PORTVERSION}
PKGNAMESUFFIX=  -libgpac

MAINTAINER= multimedia@FreeBSD.org
COMMENT=    Gpac MPEG-4 Systems library and headers

WRKSRC=     ${WRKDIR}/gpac
ALL_TARGET= lib
USE_GMAKE=  yes
MAKE_JOBS_SAFE= yes
HAS_CONFIGURE=  yes
USE_LDCONFIG=   yes

BUILD_WRKSRC=   ${WRKSRC}/src
INSTALL_WRKSRC= ${WRKSRC}/bin/gcc
LIBVER= 1

OPTIONS=    IPV6 "IPv6 support"     on \
        JPEG "JPEG support"     on \
        OPENGL "OpenGL support"     on \
        OPENSSL "OpenSSL support"   on \
        PNG "PNG support"       on

CFLAGS+=    -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

CONFIGURE_ARGS= --cc="${CC}" --X11-path="${X11BASE}" \
        --extra-cflags="${CFLAGS}" --extra-ldflags="${LDFLAGS}" \
        --enable-pic \
        --use-js=no --use-a52=no --use-faad=no --use-ffmpeg=no \
        --use-ft=no --use-mad=no --use-ogg=no \
        --use-openjpeg=no --use-theora=no --usr-vorbis=no

CONFIGURE_ENV+= LIBVER="${LIBVER}" PTHREAD_LIBS="${PTHREAD_LIBS}"

.include <bsd.port.pre.mk>

.if defined(WITHOUT_IPV6)
CONFIGURE_ARGS+=    --disable-ipv6
.endif

.if !defined(WITHOUT_JPEG)
LIB_DEPENDS+=   jpeg.11:${PORTSDIR}/graphics/jpeg
CONFIGURE_ARGS+=    --use-jpeg=local
.else
CONFIGURE_ARGS+=    --use-jpeg=no
.endif

.if defined(WITHOUT_OPENGL)
CONFIGURE_ARGS+=    --disable-opengl
.else
USE_GL=     gl glu
.endif

.if !defined(WITHOUT_OPENSSL)
USE_OPENSSL=    yes
.else
CONFIGURE_ARGS+=    --disable-ssl
.endif

.if !defined(WITHOUT_PNG)
LIB_DEPENDS+=   png.6:${PORTSDIR}/graphics/png
CONFIGURE_ARGS+=    --use-png=local
.else
CONFIGURE_ARGS+=    --use-png=no
.endif

post-patch:
    ${CHMOD} +x ${WRKSRC}/configure

do-install:
    ${MKDIR} ${PREFIX}/include/gpac
    cd ${WRKSRC}/include/gpac && ${FIND} . | \
        ${CPIO} -vpdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/include/gpac
    ${INSTALL_DATA} ${INSTALL_WRKSRC}/libgpac.so.${LIBVER} ${PREFIX}/lib
    ${LN} -sf libgpac.so.${LIBVER} ${PREFIX}/lib/libgpac.so
    ${INSTALL_DATA} ${INSTALL_WRKSRC}/libgpac_static.a ${PREFIX}/lib

.include <bsd.port.post.mk>