aboutsummaryrefslogtreecommitdiffstats
path: root/audio/kid3-kde4/Makefile
blob: 83d59fe0677f7b232ca8f3e6e89e5829ef35861a (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
# $FreeBSD$

PORTNAME=   kid3
PORTVERSION=    3.3.0
PORTREVISION=   1
CATEGORIES= audio kde
MASTER_SITES=   SF

MAINTAINER= makc@FreeBSD.org
COMMENT?=   MP3/Ogg/FLAC tag editor for KDE

LICENSE=    GPLv2

USE_PERL5=  build
USES=       cmake:outsource kde:4 perl5
CMAKE_ARGS= -DWITH_DOCBOOKDIR=${LOCALBASE}/share/xsl/docbook \
        -DWITH_MANDIR=man \
        -DFFMPEG_ROOT=${LOCALBASE} \
        -DWITH_QML=OFF
CXXFLAGS+=  -I${LOCALBASE}/include

OPTIONS_DEFINE= CHROMAPRINT FLAC ID3LIB MP4V2 VORBIS TAGLIB \
        CLI
OPTIONS_DEFAULT:=   ${OPTIONS_DEFINE}
OPTIONS_SUB=    yes
NO_OPTIONS_SORT=    yes

.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-qt5"
CONFLICTS_INSTALL+= kid3-qt4-3.*

USE_QT5=    core dbus gui multimedia network testlib xml widgets \
        buildtools_build linguisttools_build qmake_build
CMAKE_ARGS+=    -DWITH_QT5=true
.else
# Qt 4 and KDE 4
USE_QT4=    qmake_build moc_build rcc_build uic_build \
        linguisttools_build
.endif

.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-qt4"
CONFLICTS_INSTALL+= kid3-qt5-3.*

USE_QT4+=   corelib dbus gui network xml

OPTIONS_DEFINE+=    PHONON
PHONON_DESC=    Build with Phonon support
PHONON_CMAKE_OFF=   -DWITH_PHONON=OFF
PHONON_USE= QT4=phonon
.endif

.if defined(PKGNAMESUFFIX)
# Qt 4 and Qt 5
CONFLICTS_INSTALL+= kid3-3.*

BUILD_DEPENDS+= ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl

USES+=      desktop-file-utils
USE_GNOME=  libxslt:build
CMAKE_ARGS+=    -DWITH_APPS="${KID3_CLI}QT"
PLIST_SUB+= QT="" KDE="@comment "
.else
CONFLICTS_INSTALL+= kid3-qt4-3.* kid3-qt5-3.*

USE_KDE=    kdelibs automoc4
CMAKE_ARGS+=    -DWITH_APPS="${KID3_CLI}KDE"
PLIST_SUB+= QT="@comment " KDE=""
.endif

PLIST_SUB+= SHLIB_VER=${PORTVERSION}

CLI_DESC=   Build and install command line utility
CLI_USES=   readline

FLAC_DESC=  Support for FLAC files
FLAC_LIB_DEPENDS=   libFLAC.so:audio/flac
FLAC_CMAKE_ON=      -DWITH_FLAC=ON
FLAC_CMAKE_OFF=     -DWITH_FLAC=OFF

ID3LIB_DESC=    Support for mp3 files
ID3LIB_LIB_DEPENDS= libid3.so:audio/id3lib
ID3LIB_CMAKE_ON=    -DWITH_ID3LIB=ON
ID3LIB_CMAKE_OFF=   -DWITH_ID3LIB=OFF

MP4V2_DESC= Support for mp4 files
MP4V2_LIB_DEPENDS=  libmp4v2.so:multimedia/mp4v2
MP4V2_CMAKE_ON=     -DWITH_MP4V2=ON
MP4V2_CMAKE_OFF=    -DWITH_MP4V2=OFF

VORBIS_DESC=    Support for Ogg/Vorbis files
VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis \
            libogg.so:audio/libogg
VORBIS_CMAKE_ON=    -DWITH_VORBIS=ON
VORBIS_CMAKE_OFF=   -DWITH_VORBIS=OFF

TAGLIB_DESC=    Support for various audio formats
TAGLIB_LIB_DEPENDS= libtag.so:audio/taglib
TAGLIB_CMAKE_ON=    -DWITH_TAGLIB=ON
TAGLIB_CMAKE_OFF=   -DWITH_TAGLIB=OFF

CHROMAPRINT_DESC=   Support for Chromaprint audio fingerprints
CHROMAPRINT_LIB_DEPENDS=    libchromaprint.so:audio/chromaprint
CHROMAPRINT_CMAKE_ON=   -DWITH_CHROMAPRINT=ON
CHROMAPRINT_CMAKE_OFF=  -DWITH_CHROMAPRINT=OFF

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MCLI}
KID3_CLI=   CLI;
.endif

.if ${PORT_OPTIONS:MFLAC} || ${PORT_OPTIONS:MVORBIS}
PLIST_SUB+= OGGFLAC=""
.else
PLIST_SUB+= OGGFLAC="@comment "
.endif

.include <bsd.port.mk>