2005-09-22 12:49:18 +00:00
|
|
|
# New ports collection makefile for: ocp
|
|
|
|
# Date created: 22 April 2005
|
|
|
|
# Whom: Emanuel Haupt <ehaupt@critical.ch>
|
2005-04-24 14:11:31 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= ocp
|
2005-06-12 13:30:07 +00:00
|
|
|
PORTVERSION= 0.1.9
|
2005-10-28 07:59:53 +00:00
|
|
|
PORTREVISION= 3
|
2005-04-24 14:11:31 +00:00
|
|
|
CATEGORIES= audio
|
2005-07-29 08:55:37 +00:00
|
|
|
MASTER_SITES= http://labs.nixia.no/ \
|
|
|
|
http://critical.ch/distfiles/
|
2005-04-24 14:11:31 +00:00
|
|
|
|
2005-10-06 11:57:11 +00:00
|
|
|
MAINTAINER= ehaupt@FreeBSD.org
|
2005-04-24 14:11:31 +00:00
|
|
|
COMMENT= The legendary Open Cubic Player
|
|
|
|
|
2005-10-28 07:59:53 +00:00
|
|
|
LIB_DEPENDS= id3tag.0:${PORTSDIR}/audio/libid3tag \
|
2005-04-24 14:11:31 +00:00
|
|
|
mad.2:${PORTSDIR}/audio/libmad \
|
|
|
|
vorbis.3:${PORTSDIR}/audio/libvorbis
|
|
|
|
|
|
|
|
ONLY_FOR_ARCHS= i386
|
|
|
|
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
USE_GMAKE= yes
|
|
|
|
USE_REINPLACE= yes
|
|
|
|
USE_GCC= 3.4+
|
|
|
|
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib
|
2005-06-12 13:30:07 +00:00
|
|
|
CFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib
|
|
|
|
CXXFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib
|
2005-04-24 14:11:31 +00:00
|
|
|
|
2005-06-12 13:30:07 +00:00
|
|
|
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
2005-04-24 14:11:31 +00:00
|
|
|
CONFIGURE_ENV= CFLAGS="${CFLAGS} ${CPPFLAGS}" \
|
|
|
|
CXXFLAGS="${CXXFLAGS} ${CPPFLAGS}" \
|
|
|
|
CPPFLAGS="${CPPFLAGS}" \
|
|
|
|
LDFLAGS="${LDFLAGS}"
|
|
|
|
|
2005-06-12 13:30:07 +00:00
|
|
|
CONFIGURE_ARGS= --with-dir-suffix="" \
|
|
|
|
--libdir=${LOCALBASE}/lib
|
2005-05-02 09:36:28 +00:00
|
|
|
|
2005-04-25 00:01:17 +00:00
|
|
|
TIMIDITY_CFG= ${LOCALBASE}/share/timidity/timidity.cfg
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-07-05 22:30:07 +00:00
|
|
|
.if ${OSVERSION} > 500000
|
|
|
|
LIB_DEPENDS+= sidplay.1:${PORTSDIR}/audio/libsidplay
|
|
|
|
PLIST_SUB+= LIBSIDPLAY=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= LIBSIDPLAY="@comment "
|
|
|
|
.endif
|
|
|
|
|
2005-04-25 00:01:17 +00:00
|
|
|
.if exists(${TIMIDITY_CFG}) || !defined(WITHOUT_MIDI)
|
2005-07-05 22:30:07 +00:00
|
|
|
RUN_DEPENDS+= ${TIMIDITY_CFG}:${PORTSDIR}/audio/eawpats
|
2005-04-25 00:01:17 +00:00
|
|
|
.endif
|
|
|
|
|
2005-05-02 09:36:28 +00:00
|
|
|
.if defined(WITHOUT_X11)
|
|
|
|
CONFIGURE_ARGS+= --without-x11
|
|
|
|
.else
|
|
|
|
USE_XLIB= yes
|
|
|
|
CONFIGURE_ARGS+= --with-x11=yes
|
|
|
|
.endif
|
2005-05-04 16:22:23 +00:00
|
|
|
.if defined(WITH_DEBUG)
|
|
|
|
CONFIGURE_ARGS+= --with-debug
|
|
|
|
.endif
|
2005-06-12 13:30:07 +00:00
|
|
|
.if defined(WITH_ADPLUG)
|
|
|
|
LIB_DEPENDS+= adplug-1.5.1:${PORTSDIR}/audio/libadplug
|
2005-09-22 12:49:18 +00:00
|
|
|
CONFIGURE_ARGS+= --without-x11 --with-adplug
|
2005-06-12 13:30:07 +00:00
|
|
|
PLIST_SUB+= ADPLUG=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= ADPLUG="@comment "
|
|
|
|
CONFIGURE_ARGS+= --without-adplug
|
|
|
|
.endif
|
2005-05-02 09:36:28 +00:00
|
|
|
|
2005-04-25 00:01:17 +00:00
|
|
|
pre-everything::
|
2005-05-02 09:36:28 +00:00
|
|
|
.if !exists(${TIMIDITY_CFG}) && !defined(WITHOUT_MIDI)
|
2005-04-25 00:01:17 +00:00
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "In order to be able to play MIDI files, audio/eawpats will be installed."
|
|
|
|
@${ECHO_MSG} "Define WITHOUT_MIDI if you do not want to install it."
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.endif
|
2005-06-12 13:30:07 +00:00
|
|
|
.if !defined(WITHOUT_X11) && !defined(WITH_ADPLUG)
|
2005-05-02 09:36:28 +00:00
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "If you want to compile without X11 support, hit Ctrl-C right now and"
|
|
|
|
@${ECHO_MSG} "define WITHOUT_X11"
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.endif
|
2005-04-25 00:01:17 +00:00
|
|
|
|
2005-06-12 13:30:07 +00:00
|
|
|
# Hangs on exit
|
|
|
|
.if defined(WITH_ADPLUG) && !defined(WITHOUT_X11)
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "Disabling X11 support. X11 and libadplug usage cannot yet peacefully"
|
|
|
|
@${ECHO_MSG} "coexist."
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.endif
|
|
|
|
|
2005-04-24 14:11:31 +00:00
|
|
|
post-patch:
|
2005-05-02 09:36:28 +00:00
|
|
|
.if defined(WITH_DEBUG)
|
2005-06-12 13:30:07 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|/\*\ \(#define\ LD_DEBUG\ 1\)\ \*/|\1|' \
|
2005-05-02 09:36:28 +00:00
|
|
|
${WRKSRC}/config.h.in
|
|
|
|
.endif
|
2005-04-24 14:11:31 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|stdint\.h|inttypes\.h|' ${WRKSRC}/types.h
|
2005-04-25 00:01:17 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|/etc/.*\.cfg|${TIMIDITY_CFG}|' \
|
|
|
|
${WRKSRC}/playgmi/gmitimidity.c
|
2005-06-12 13:30:07 +00:00
|
|
|
# conflicts with fnmatch.h from security/heimdal
|
|
|
|
@${REINPLACE_CMD} -e 's|<\(fnmatch.h\)>|"/usr/include/\1"|' \
|
|
|
|
${WRKSRC}/filesel/adb.c \
|
|
|
|
${WRKSRC}/filesel/pfilesel.c
|
2005-04-24 14:11:31 +00:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/ocp ${PREFIX}/bin
|
|
|
|
|
|
|
|
${MKDIR} ${DATADIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/cp.pak ${DATADIR}
|
|
|
|
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/ocp.ini ${PREFIX}/etc/ocp.ini.default
|
|
|
|
.if !exists(${PREFIX}/etc/ocp.ini)
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/ocp.ini ${PREFIX}/etc
|
|
|
|
.endif
|
|
|
|
|
|
|
|
${MKDIR} ${PREFIX}/lib/ocp
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/*.so ${PREFIX}/lib/ocp
|
|
|
|
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${DOCSDIR}
|
|
|
|
.for f in AUTHORS BUGS CREDITS Changelog KEYBOARD_REMAPS SUID TODO
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
2005-04-25 00:01:17 +00:00
|
|
|
.include <bsd.port.post.mk>
|