aboutsummaryrefslogtreecommitdiffstats
path: root/audio/mp3stat/Makefile
blob: 8c53b15ecdffa9f77464e565c623c737bc26acc0 (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
# ex:ts=8
# Ports collection makefile for:    mp3stat
# Date created:         Mar 20, 2002
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   mp3stat
PORTVERSION=    2.6.01
PORTREVISION=   6
CATEGORIES= audio
MASTER_SITES=   https://signal-lost.homeip.net/files/ \
            http://www.alaskaparadise.com/freebsd/
DISTNAME=   ${PORTNAME}_${PORTVERSION}

MAINTAINER= beech@FreeBSD.org
COMMENT=    Read information about mp3s and oggs bitstream

WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}

USE_GNOME=  gtk20
USE_GMAKE=  yes
MAKE_ARGS=  CXX="${CXX}" CXXFLAGS="${CXXFLAGS}"

PLIST_FILES=    bin/mp3stat \
        lib/mp3stat/input_mp3.so \
        lib/mp3stat/ui_gtk2.so \
        lib/mp3stat/ui_console.so
PLIST_DIRS= lib/mp3stat

CXX+=       -I${LOCALBASE}/include -L${LOCALBASE}/lib \
        -Wl,--rpath,${LOCALBASE}/lib

OPTIONS=    VORBIS "Ogg/Vorbis support" on

.include <bsd.port.pre.mk>

.if defined(WITHOUT_VORBIS)
MAKE_ARGS+= VORBIS=""
.else
LIB_DEPENDS+=   vorbis.4:${PORTSDIR}/audio/libvorbis
PLIST_FILES+=   lib/mp3stat/input_vorb.so
.endif

.if !defined(NOPORTDOCS)
PORTDOCS=   README
.endif

post-patch:
    @${FIND} ${WRKSRC} -name "Makefile*" | ${XARGS} ${REINPLACE_CMD} -e \
        's|@$${CXX}|$${CXX}|g ; \
         s|-ldl|-lz|g ; \
         s|-lc||g ; \
         s|-Wl,-soname,.*\.so\.1||g ; \
         s|-fpic|-fPIC|g'

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/mp3stat ${PREFIX}/bin
    @${MKDIR} ${PREFIX}/lib/mp3stat
    ${INSTALL_DATA} ${WRKSRC}/ui/gtk/ui_gtk2.so ${PREFIX}/lib/mp3stat
    ${INSTALL_DATA} ${WRKSRC}/ui/console/ui_console.so ${PREFIX}/lib/mp3stat
    ${INSTALL_DATA} ${WRKSRC}/input/mp3/input_mp3.so ${PREFIX}/lib/mp3stat
.if !defined(WITHOUT_VORBIS)
    ${INSTALL_DATA} ${WRKSRC}/input/vorbis/input_vorb.so ${PREFIX}/lib/mp3stat
.endif
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

.include <bsd.port.post.mk>