summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-09-25 12:04:06 +0000
committerjlam <jlam@pkgsrc.org>2002-09-25 12:04:06 +0000
commit78cf5e127c967727f72625878988707e914b9b9f (patch)
tree740f3a9b33dc40f38fb2fb24b2a685f164e429e9
parent9794a53e8722589c61e792e39fcaa7f886ea9cdd (diff)
downloadpkgsrc-78cf5e127c967727f72625878988707e914b9b9f.tar.gz
Create a new variable XANIM_CODECS, whose value is a space-separated list
of codecs that may be compiled into xanim: iv32, cvid, and cyuk. The default is to compile them all into xanim. This allows building a xanim that may be distributed on CD-ROM by removing the restricted codecs from the XANIM_CODECS list (currently, this is iv32 and cyuk). For clarity, separate the codec-handling into a separate Makefile.codecs.
-rw-r--r--graphics/xanim/Makefile62
-rw-r--r--graphics/xanim/Makefile.codecs62
-rw-r--r--graphics/xanim/distinfo6
-rw-r--r--graphics/xanim/patches/patch-ab82
-rw-r--r--graphics/xanim/patches/patch-ae27
5 files changed, 108 insertions, 131 deletions
diff --git a/graphics/xanim/Makefile b/graphics/xanim/Makefile
index def8f5acde8..32d01da0f1b 100644
--- a/graphics/xanim/Makefile
+++ b/graphics/xanim/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2002/09/20 03:13:09 jlam Exp $
+# $NetBSD: Makefile,v 1.28 2002/09/25 12:04:06 jlam Exp $
DISTNAME= xanim2801
PKGNAME= xanim-2.80.1
@@ -12,7 +12,7 @@ MASTER_SITES= ftp://xanim.va.pubnix.com/\
ftp://ftp.ba-stuttgart.de/Mirrors/xanim/modules/ \
http://smurfland.cit.buffalo.edu/xanim/files/ \
http://smurfland.cit.buffalo.edu/xanim/files/modules/
-DISTFILES= ${EXTRACT_ONLY} ${EXTRA_FILES}
+DISTFILES= ${EXTRACT_ONLY} ${CODEC_FILES}
MAINTAINER= packages@netbsd.org
HOMEPAGE= http://xanim.va.pubnix.com/
@@ -20,59 +20,27 @@ COMMENT= play most popular animation formats and show pictures
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-RESTRICTED= Can't mirror/distribute iv32 or cyuv object modules
-NO_SRC_ON_FTP= ${RESTRICTED}
-NO_SRC_ON_CDROM= ${RESTRICTED}
-NO_BIN_ON_FTP= ${RESTRICTED}
-NO_BIN_ON_CDROM= ${RESTRICTED}
+.include "Makefile.codecs"
USE_BUILDLINK2= YES
USE_X11BASE= YES
USE_IMAKE= YES
+.include "../../mk/bsd.prefs.mk"
+
+MAKE_ENV+= ${XANIM_AUDIO.${OPSYS}}
+XANIM_AUDIO.Linux= XA_AUDIO_DEFS="-DXA_LINUX_AUDIO" \
+ XA_AUDIO_LIBS="-lc"
+XANIM_AUDIO.NetBSD= XA_AUDIO_DEFS="-DXA_NetBSD_AUDIO"
+XANIM_AUDIO.SunOS= XA_AUDIO_DEFS="-DXA_SPARC_AUDIO -DSVR4 -DXA_SELECT"
+
post-extract:
@${LN} -s docs/xanim.man ${WRKSRC}
@${MKDIR} ${WRKSRC}/mods
- @for file in ${EXTRA_FILES}; do \
- ${CP} ${DISTDIR}/$$file ${WRKSRC}/mods; \
- ${GUNZIP_CMD} ${WRKSRC}/mods/$$file; \
+ @for file in ${CODEC_FILES}; do \
+ ${CP} ${DISTDIR}/$$file ${WRKSRC}/mods; \
+ ${GUNZIP_CMD} ${WRKSRC}/mods/$$file; \
done
-pre-configure:
- @${ECHO} >${WRKSRC}/objarch.tmpl \
- "MACHINE_OBJ_ARCH = ${MACHINE_OBJ_ARCH}"
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/xanim ${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/xanim.0 ${PREFIX}/man/cat1
-
-.include "../../mk/bsd.prefs.mk"
-
-MACHINE_OBJ_ARCH= ${MACHINE_ARCH}-${OBJECT_FMT}
-
-.if (${MACHINE_OBJ_ARCH} == "i386-a.out") || make(makesum)
-EXTRA_FILES+= xa2.0_cvid_netbsd386.o.Z \
- xa2.0_iv32_netbsd386.o.Z \
- xa1.0_cyuv_netbsd386.o.Z
-.endif
-.if (${MACHINE_OBJ_ARCH} == "i386-ELF") || make(makesum)
-EXTRA_FILES+= xa2.0_cvid_linuxELF.o.Z \
- xa2.0_iv32_linuxELF.o.Z \
- xa1.0_cyuv_linuxELF.o.Z
-.endif
-.if (${MACHINE_OBJ_ARCH} == "m68k-a.out") || make(makesum)
-EXTRA_FILES+= xa2.0_cvid_netbsd68k.o.Z \
- xa2.0_iv32_netbsd68k.o.Z \
- xa1.0_cyuv_netbsd68k.o.Z
-.endif
-.if (${MACHINE_OBJ_ARCH} == "sparc-a.out") || make(makesum)
-EXTRA_FILES+= xa2.0_cvid_sparcCOFF.o.Z \
- xa2.0_iv32_sparcCOFF.o.Z \
- xa1.0_cyuv_sparcAOUT.o.Z
-.endif
-.if (${MACHINE_OBJ_ARCH} == "powerpc-ELF") || make(makesum)
-EXTRA_FILES+= xa2.0_cvid_linuxPPC.o.Z \
- xa1.0_cyuv_linuxPPC.o.Z
-.endif
-
.include "../../mk/bsd.pkg.mk"
+
diff --git a/graphics/xanim/Makefile.codecs b/graphics/xanim/Makefile.codecs
new file mode 100644
index 00000000000..f74783b2fdd
--- /dev/null
+++ b/graphics/xanim/Makefile.codecs
@@ -0,0 +1,62 @@
+# $NetBSD: Makefile.codecs,v 1.1 2002/09/25 12:04:06 jlam Exp $
+
+.include "../../mk/bsd.prefs.mk"
+
+# cvid Radius Cinepak video decompression for AVI and Quicktime
+# cyuv Creative CYUV video decompression for AVI
+# iv32 Intel YVU9 and Indeo 3.2 decompression for AVI and Quicktime
+#
+XANIM_CODECS?= ${_XANIM_ALL_CODECS}
+_XANIM_ALL_CODECS= cvid cyuv iv32
+_XANIM_RESTRICTED_CODECS= cyuv iv32
+
+_XANIM_CODEC.cvid.i386-a.out= xa2.0_cvid_netbsd386.o.Z
+_XANIM_CODEC.cyuv.i386-a.out= xa1.0_cyuv_netbsd386.o.Z
+_XANIM_CODEC.iv32.i386-a.out= xa2.0_iv32_netbsd386.o.Z
+
+_XANIM_CODEC.cvid.m68k-a.out= xa2.0_cvid_netbsd68k.o.Z
+_XANIM_CODEC.cyuv.m68k-a.out= xa1.0_cyuv_netbsd68k.o.Z
+_XANIM_CODEC.iv32.m68k-a.out= xa2.0_iv32_netbsd68k.o.Z
+
+_XANIM_CODEC.cvid.i386-ELF= xa2.0_cvid_linuxELF.o.Z
+_XANIM_CODEC.cyuv.i386-ELF= xa1.0_cyuv_linuxELF.o.Z
+_XANIM_CODEC.iv32.i386-ELF= xa2.0_iv32_linuxELF.o.Z
+
+_XANIM_CODEC.cvid.sparc-a.out= xa2.0_cvid_sparcCOFF.o.Z
+_XANIM_CODEC.cyuv.sparc-a.out= xa1.0_cyuv_sparcAOUT.o.Z
+_XANIM_CODEC.iv32.sparc-a.out= xa2.0_iv32_sparcCOFF.o.Z
+
+_XANIM_CODEC.cvid.powerpc-ELF= xa2.0_cvid_linuxPPC.o.Z
+_XANIM_CODEC.cyuv.powerpc-ELF= xa1.0_cyuv_linuxPPC.o.Z
+
+_XANIM_DEF.cvid= XA_CVID_DEF="-DXA_CVID"
+_XANIM_DEF.cyuv= XA_CYUV_DEF="-DXA_CYUV"
+_XANIM_DEF.iv32= XA_IV32_DEF="-DXA_IV32"
+
+_XANIM_LIB.cvid= XA_CVID_LIB
+_XANIM_LIB.cyuv= XA_CYUV_LIB
+_XANIM_LIB.iv32= XA_IV32_LIB
+
+_XANIM_MACH_TYPE= ${MACHINE_ARCH}-${OBJECT_FMT}
+
+.for _codec_ in ${XANIM_CODECS}
+. if defined(_XANIM_CODEC.${_codec_}.${_XANIM_MACH_TYPE})
+CODECS+= ${_codec_}
+CODEC_FILES+= ${_XANIM_CODEC.${_codec_}.${_XANIM_MACH_TYPE}}
+MAKE_ENV+= ${_XANIM_DEF.${_codec_}}
+MAKE_ENV+= ${_XANIM_LIB.${_codec_}}="mods/${_XANIM_CODEC.${_codec_}.${_XANIM_MACH_TYPE}:S/.Z$//}"
+. if !empty(_XANIM_RESTRICTED_CODECS:M${_codec_})
+_RESTRICTED_CODECS+= ${_codec_}
+. endif
+. endif
+.endfor
+
+BUILD_DEFS+= CODECS
+
+.if defined(_RESTRICTED_CODECS)
+RESTRICTED= "Can't mirror/distribute object modules: ${_RESTRICTED_CODECS}"
+NO_SRC_ON_FTP= ${RESTRICTED}
+NO_SRC_ON_CDROM= ${RESTRICTED}
+NO_BIN_ON_FTP= ${RESTRICTED}
+NO_BIN_ON_CDROM= ${RESTRICTED}
+.endif
diff --git a/graphics/xanim/distinfo b/graphics/xanim/distinfo
index 525e7c9a2cd..7bd6b7c9556 100644
--- a/graphics/xanim/distinfo
+++ b/graphics/xanim/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2002/05/31 00:28:05 itohy Exp $
+$NetBSD: distinfo,v 1.8 2002/09/25 12:04:06 jlam Exp $
SHA1 (xanim2801.tar.gz) = 1966880880c3779d02199fbcd1acb771bc57f754
Size (xanim2801.tar.gz) = 441250 bytes
@@ -30,5 +30,5 @@ SHA1 (xa2.0_cvid_linuxPPC.o.Z) = d6736d7fe65008293863c31b8f4c28e13152afda
Size (xa2.0_cvid_linuxPPC.o.Z) = 5192 bytes
SHA1 (xa1.0_cyuv_linuxPPC.o.Z) = b9af24646b46d94ccfb5e042ca20f32006a8b0af
Size (xa1.0_cyuv_linuxPPC.o.Z) = 1513 bytes
-SHA1 (patch-ab) = 44ec064497c46a6f9e69b22c9cc1aaa13b6cec25
-SHA1 (patch-ae) = 230f52e95997ba72d36baa8f4d5cd5a5e5500f9a
+SHA1 (patch-ab) = b55ebcb351152de078b7dd167b82a59cf5f61eb1
+SHA1 (patch-ae) = 6023e76bc0471a0810b0789cd24355c06eac02b8
diff --git a/graphics/xanim/patches/patch-ab b/graphics/xanim/patches/patch-ab
index 8d929f06213..f63a5478776 100644
--- a/graphics/xanim/patches/patch-ab
+++ b/graphics/xanim/patches/patch-ab
@@ -1,25 +1,25 @@
-$NetBSD: patch-ab,v 1.10 2001/10/21 15:40:52 mycroft Exp $
+$NetBSD: patch-ab,v 1.11 2002/09/25 12:04:07 jlam Exp $
---- Imakefile.orig Sun Mar 21 23:36:26 1999
-+++ Imakefile Sun Oct 21 08:23:48 2001
-@@ -96,9 +96,9 @@
+--- Imakefile.orig Sun Mar 21 14:36:26 1999
++++ Imakefile
+@@ -96,9 +96,10 @@ XCOMM Specify any Linker flags needed
XCOMM to link against symbols inside xanim.
XCOMM
XCOMM ## Linux
-LD_FLAGS = -rdynamic
+XCOMM LD_FLAGS = -rdynamic
XCOMM ## SunOS/Solaris use:
--XCOMM LD_FLAGS =
+ XCOMM LD_FLAGS =
+LD_FLAGS =
XCOMM #########################################################################
-@@ -111,17 +111,17 @@
+@@ -111,17 +112,17 @@ XCOMM
XCOMM NOTE: not all machines need the XA_DLL_LIB define.
XCOMM #########################################################################
XCOMM
-XA_DLL_DEF = -DXA_DLL -DXA_PRINT
-+XA_DLL_DEF = -DXA_PRINT
++XCOMM XA_DLL_DEF = -DXA_DLL -DXA_PRINT
XCOMM ### Use this only if the above doesn't work
XCOMM XA_DLL_DEF = -DXA_DLL
XCOMM
@@ -35,56 +35,7 @@ $NetBSD: patch-ab,v 1.10 2001/10/21 15:40:52 mycroft Exp $
-@@ -186,13 +186,41 @@
- XCOMM
- XCOMM Again don't use these if you are using the dynamically loadable modules.
- XCOMM
--XCOMM XA_IV32_DEF = -DXA_IV32
--XCOMM XA_CVID_DEF = -DXA_CVID
--XCOMM XA_CYUV_DEF = -DXA_CYUV
--XCOMM
--XCOMM XA_IV32_LIB = mods/xa2.1_iv32_linuxELF.o
--XCOMM XA_CVID_LIB = mods/xa2.0_cvid_linuxELF.o
--XCOMM XA_CYUV_LIB = mods/xa1.0_cyuv_linuxELF.o
-+#include "objarch.tmpl"
-+
-+.if (${MACHINE_OBJ_ARCH} == "i386-a.out") || (${MACHINE_OBJ_ARCH} == "i386-ELF") || (${MACHINE_OBJ_ARCH} == "m68k-a.out") || (${MACHINE_OBJ_ARCH} == "sparc-a.out")
-+XA_IV32_DEF = -DXA_IV32
-+XA_CVID_DEF = -DXA_CVID
-+XA_CYUV_DEF = -DXA_CYUV
-+.elif (${MACHINE_OBJ_ARCH} == "powerpc-ELF")
-+XA_CVID_DEF = -DXA_CVID
-+XA_CYUV_DEF = -DXA_CYUV
-+.endif
-+XCOMM
-+.if (${MACHINE_OBJ_ARCH} == "i386-a.out")
-+XA_IV32_LIB = mods/xa2.0_iv32_netbsd386.o
-+XA_CVID_LIB = mods/xa2.0_cvid_netbsd386.o
-+XA_CYUV_LIB = mods/xa1.0_cyuv_netbsd386.o
-+.elif (${MACHINE_OBJ_ARCH} == "i386-ELF")
-+XA_IV32_LIB = mods/xa2.0_iv32_linuxELF.o
-+XA_CVID_LIB = mods/xa2.0_cvid_linuxELF.o
-+XA_CYUV_LIB = mods/xa1.0_cyuv_linuxELF.o
-+.elif (${MACHINE_OBJ_ARCH} == "m68k-a.out")
-+XA_IV32_LIB = mods/xa2.0_iv32_netbsd68k.o
-+XA_CVID_LIB = mods/xa2.0_cvid_netbsd68k.o
-+XA_CYUV_LIB = mods/xa1.0_cyuv_netbsd68k.o
-+.elif (${MACHINE_OBJ_ARCH} == "sparc-a.out")
-+XA_IV32_LIB = mods/xa2.0_iv32_sparcCOFF.o
-+XA_CVID_LIB = mods/xa2.0_cvid_sparcCOFF.o
-+XA_CYUV_LIB = mods/xa1.0_cyuv_sparcAOUT.o
-+.elif (${MACHINE_OBJ_ARCH} == "powerpc-ELF")
-+XA_CVID_LIB = mods/xa2.0_cvid_linuxPPC.o
-+XA_CYUV_LIB = mods/xa1.0_cyuv_linuxPPC.o
-+.else
-+XA_IV32_DEF =
-+XA_CVID_DEF =
-+XA_CYUV_DEF =
-+.endif
- XCOMM
- XCOMM ##########################
- XCOMM NOTE: SGI Machines Only:
-@@ -267,8 +295,8 @@
+@@ -267,8 +268,8 @@ XCOMM -- NOTE_9 Since xanim doesn't yet
XCOMM XA_AUDIO_DEFS =
XCOMM
XCOMM ## -- Linux PCs ---------------------------------------------------------
@@ -95,25 +46,12 @@ $NetBSD: patch-ab,v 1.10 2001/10/21 15:40:52 mycroft Exp $
XCOMM
XCOMM -- Linux PC's with OLD Rev sound drivers -------------------------------
XCOMM XA_AUDIO_DEFS = -DXA_LINUX_AUDIO -DXA_LINUX_OLDER_SND
-@@ -307,7 +335,7 @@
- XCOMM XA_AUDIO_DEFS = -DXA_SONY_AUDIO
- XCOMM
- XCOMM -- NetBSD-current (as of 30/April 1995)---------------------------------
--XCOMM XA_AUDIO_DEFS = -DXA_NetBSD_AUDIO
-+XA_AUDIO_DEFS = -DXA_NetBSD_AUDIO
- XCOMM
- XCOMM -- QNX 4.2 PC's --------------------------------------------------------
- XCOMM XA_AUDIO_DEFS = -DXA_LINUX_AUDIO -DXA_SELECT
-@@ -465,7 +493,11 @@
+@@ -465,7 +466,7 @@ DEFINES = $(XA_DEFS)
PROGRAMS = $(XANIM)
-INCLUDES = -I$(INCDIR) $(XA_INCS)
-+.ifdef X11_ROOT
-+INCLUDES = -I$(X11_ROOT)/include/X11 $(XA_INCS)
-+.else
-+INCLUDES = -I$(INCDIR)/X11 $(XA_INCS)
-+.endif
++INCLUDES = -I$(INCDIR) -I$(X11BASE)/include/X11 $(XA_INCS)
LIBS1 = $(XA_LIBS) $(EXTENSIONLIB) $(XTOOLLIB) $(XLIB) -lm
DEPLIBS1 = $(DEPEXTENSIONLIB) $(DEPXTOOLLIB) $(DEPXLIB)
diff --git a/graphics/xanim/patches/patch-ae b/graphics/xanim/patches/patch-ae
index 1b3b6d2dfef..82f33d94d98 100644
--- a/graphics/xanim/patches/patch-ae
+++ b/graphics/xanim/patches/patch-ae
@@ -1,16 +1,25 @@
-$NetBSD: patch-ae,v 1.2 2002/05/20 18:14:19 cjep Exp $
---- xa_audio.c.original Fri Aug 24 17:33:57 2001
-+++ xa_audio.c Fri Aug 24 17:35:14 2001
-@@ -4665,10 +4665,10 @@
+$NetBSD: patch-ae,v 1.3 2002/09/25 12:04:07 jlam Exp $
+
+--- xa_audio.c.orig Sun Mar 21 14:36:25 1999
++++ xa_audio.c
+@@ -4665,7 +4665,19 @@ void NetBSD_Audio_Init()
a_info.mode = AUMODE_PLAY | AUMODE_PLAY_ALL;
ioctl(devAudio, AUDIO_SETINFO, &a_info);
-#ifdef AUDIO_ENCODING_SLINEAR
+#ifdef AUDIO_ENCODING_SLINEAR_LE
++ /* Use new encoding names */
++ AUDIO_INITINFO(&a_info);
++ a_info.play.encoding = AUDIO_ENCODING_SLINEAR_LE;
++ a_info.play.precision = 16;
++ if ( ioctl(devAudio, AUDIO_SETINFO, &a_info) < 0)
++ {
++ AUDIO_INITINFO(&a_info);
++ a_info.play.encoding = AUDIO_ENCODING_ULINEAR;
++ a_info.play.precision = 8;
++ ioctl(devAudio, AUDIO_SETINFO, &a_info);
++ }
++#elif defined(AUDIO_ENCODING_SLINEAR)
/* Use new encoding names */
AUDIO_INITINFO(&a_info);
-- a_info.play.encoding = AUDIO_ENCODING_SLINEAR;
-+ a_info.play.encoding = AUDIO_ENCODING_SLINEAR_LE;
- a_info.play.precision = 16;
- if ( ioctl(devAudio, AUDIO_SETINFO, &a_info) < 0)
- {
+ a_info.play.encoding = AUDIO_ENCODING_SLINEAR;