summaryrefslogtreecommitdiff
path: root/audio/mpg123/Makefile.common
blob: c6ca8ffa2ceff27eb600a89b7c4b0ec8a9334168 (plain)
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
# $NetBSD: Makefile.common,v 1.22 2005/05/24 13:55:30 rillig Exp $

DISTNAME=	mpg123-0.59r
MPG123_VERSION=	0.59.18
CATEGORIES=	audio
MASTER_SITES=	http://www.mpg123.de/mpg123/ \
		http://www-ti.informatik.uni-tuebingen.de/~hippm/mpg123/

PATCH_SITES=	ftp://ftp.kame.net/pub/kame/misc/
PATCHFILES=	mpg123-059r-v6-20000713b.diff.gz

MAINTAINER=	tron@NetBSD.org
HOMEPAGE=	http://www.mpg123.de/
BUILD_DEFS+=	USE_INET6 MPG123_ARM_FIXED64
DIST_SUBDIR=	mpg123
PATCHDIR=	${.CURDIR}/../../audio/mpg123/patches
FILESDIR=	${.CURDIR}/../../audio/mpg123/files
DISTINFO_FILE=	${.CURDIR}/../../audio/mpg123/distinfo

LICENSE=	no-commercial-use

PKG_INSTALLATION_TYPES=	overwrite pkgviews

.include "../../mk/bsd.prefs.mk"
.include "../../mk/compiler.mk"
.if ${OPSYS} == "SunOS"
.  if !empty(PKGSRC_COMPILER:Msunpro)
BUILD_TARGET=	solaris
.  else
BUILD_TARGET=	solaris-gcc${TARGET_SUFFIX}
.  endif
.elif ${OPSYS} == "IRIX"
BUILD_TARGET=	sgi
.elif ${OPSYS} == "Linux"
.  if ${MACHINE_ARCH} == "i386"
BUILD_TARGET=	linux
.  elif ${MACHINE_ARCH} == "powerpc"
BUILD_TARGET=	linux-ppc
.  else
BUILD_TARGET=	${LOWER_OPSYS}-${MACHINE_ARCH}
.  endif
.elif ${OPSYS} == "NetBSD"
.  if ${MACHINE_ARCH} == "i386"
.    if ${OBJECT_FMT} == "ELF"
BUILD_TARGET=	netbsd-i386-elf${TARGET_SUFFIX}
.    else
BUILD_TARGET=	netbsd-i386${TARGET_SUFFIX}
.    endif # ELF
.  elif ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32"
.    if defined(MPG123_ARM_FIXED64) && ${MPG123_ARM_FIXED64} == "YES"
BUILD_TARGET=	netbsd-arm-64${TARGET_SUFFIX}
.    else
BUILD_TARGET=	netbsd-arm${TARGET_SUFFIX}
.    endif # MPG123_ARM_FIXED64
.  elif ${MACHINE_ARCH} == "m68k"
BUILD_TARGET=	netbsd-m68k${TARGET_SUFFIX}
.  else
BUILD_TARGET=	netbsd
.  endif
.else
BUILD_TARGET=	${LOWER_OPSYS}${TARGET_SUFFIX}
.endif

.if defined(USE_INET6) && ${USE_INET6} == "YES"
CPPFLAGS+=	-DINET6
.endif

MAKE_FLAGS+=	PREFIX="${PREFIX}"

pre-patch:
	${LN} -s . ${WRKSRC}/mpg123

post-patch:
	${RM} -f ${WRKSRC}/mpg123
	${CP} ${FILESDIR}/decode_i586_.s ${WRKSRC}
	cd ${WRKSRC} && ${MV} decode_i586.s decode_i586.s.orig; \
		${SED} -e 's@^/@#/@g' decode_i586.s.orig > decode_i586.s