# $NetBSD: Makefile.common,v 1.31 2009/05/19 08:59:04 wiz 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?= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.mpg123.de/ LICENSE= mpg123-license DIST_SUBDIR= mpg123 PATCHDIR= ${.CURDIR}/../../audio/mpg123/patches FILESDIR= ${.CURDIR}/../../audio/mpg123/files DISTINFO_FILE= ${.CURDIR}/../../audio/mpg123/distinfo PKG_INSTALLATION_TYPES= overwrite pkgviews .include "../../mk/bsd.prefs.mk" TARGET_SUFFIX?= # PKG_OPTIONS_VAR must be set in the including Makefile PKG_SUPPORTED_OPTIONS= inet6 mpg123-arm-fixed64 PKG_SUGGESTED_OPTIONS= inet6 PKG_OPTIONS_LEGACY_VARS+= MPG123_ARM_FIXED64:mpg123-arm-fixed64 .include "../../mk/bsd.options.mk" ### ### IPv6 support ### .if !empty(PKG_OPTIONS:Minet6) CPPFLAGS+= -DINET6 .endif .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 ${TARGET_SUFFIX} == "-nas" BUILD_TARGET= linux-nas . elif ${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" ### ### Optionally enable 64-bit calculations to avoid glitches on ARM. ### . if !empty(PKG_OPTIONS:Mmpg123-arm-fixed64) BUILD_TARGET= netbsd-arm-64${TARGET_SUFFIX} . else BUILD_TARGET= netbsd-arm${TARGET_SUFFIX} . endif . elif ${MACHINE_ARCH} == "m68k" BUILD_TARGET= netbsd-m68k${TARGET_SUFFIX} . else BUILD_TARGET= netbsd${TARGET_SUFFIX} . endif .else BUILD_TARGET= ${LOWER_OPSYS}${TARGET_SUFFIX} .endif MAKE_FLAGS+= PREFIX=${PREFIX:Q} 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