diff options
-rw-r--r-- | graphics/xvid/Makefile | 53 | ||||
-rw-r--r-- | graphics/xvid/distinfo | 2 | ||||
-rw-r--r-- | graphics/xvid/files/config.h.in | 9 | ||||
-rw-r--r-- | graphics/xvid/files/configure.in | 5 | ||||
-rw-r--r-- | graphics/xvid/files/patch-Makefile | 19 | ||||
-rw-r--r-- | graphics/xvid/files/patch-src:portab.h | 58 | ||||
-rw-r--r-- | graphics/xvid/pkg-plist | 4 | ||||
-rw-r--r-- | multimedia/xvid/Makefile | 53 | ||||
-rw-r--r-- | multimedia/xvid/distinfo | 2 | ||||
-rw-r--r-- | multimedia/xvid/files/config.h.in | 9 | ||||
-rw-r--r-- | multimedia/xvid/files/configure.in | 5 | ||||
-rw-r--r-- | multimedia/xvid/files/patch-Makefile | 19 | ||||
-rw-r--r-- | multimedia/xvid/files/patch-src:portab.h | 58 | ||||
-rw-r--r-- | multimedia/xvid/pkg-plist | 4 |
14 files changed, 178 insertions, 122 deletions
diff --git a/graphics/xvid/Makefile b/graphics/xvid/Makefile index e4ccf7e98e99..d1b405c374e9 100644 --- a/graphics/xvid/Makefile +++ b/graphics/xvid/Makefile @@ -6,45 +6,30 @@ # PORTNAME= xvid -PORTVERSION= 0.20020412 -PORTREVISION= 1 +PORTVERSION= 0.9.0 +PORTEPOCH= 1 CATEGORIES= graphics -MASTER_SITES= http://www.xvid.org/snapshots/ -DISTNAME= xvid_snapshot_${PORTVERSION:S/^0.//} +MASTER_SITES= http://cvs.xvid.org/downloads/xvidcore-0.9.0/ +DISTNAME= xvidcore-${PORTVERSION} MAINTAINER= michaelnottebrock@gmx.net BUILD_DEPENDS= ${LOCALBASE}/bin/nasm:${PORTSDIR}/devel/nasm -ONLY_FOR_ARCHS= i386 -USE_AUTOCONF= yes +MAKEFILE= Makefile.linuxx86 +ONLY_FOR_ARCHS= i386 alpha sparc64 +USE_AUTOCONF_VER= 253 USE_GMAKE= yes -USE_REINPLACE= yes INSTALLS_SHLIB= yes CONFIGURE_WRKSRC= ${WRKDIR} -WRKSRC= ${WRKDIR}/xvid_20020412/xvidcore/build/generic +WRKSRC= ${WRKDIR}/${DISTNAME}/build/generic # XXX - compatility header installed for mplayer-devel port's benefit EXTRA_HEADER_FILES= divx4.h -pre-everything:: -.if !defined(WITH_OPTIMIZED_CFLAGS) - @ ${ECHO_MSG} "You can enable additional compilation optimizations" - @ ${ECHO_MSG} "by defining WITH_OPTIMIZED_CFLAGS" -.endif - -post-patch: - @ ${FIND} ${WRKDIR} -type f | \ - ${XARGS} -n 10 -x ${REINPLACE_CMD} -e \ - 's|<malloc.h>|<stdlib.h>|' -.ifndef(WITH_OPTIMIZED_CFLAGS) - @ ${REINPLACE_CMD} -E -e 's|(CFLAGS \+=).*|\1 ${CFLAGS}|' ${WRKSRC}/Makefile -.else - @ ${REINPLACE_CMD} -E -e 's|(CFLAGS \+=.*)|\1 ${CFLAGS}|' ${WRKSRC}/Makefile -.endif - # trick to detect existence of stdint.h +# amongst other things pre-configure: .for file in configure.in config.h.in @ ${CP} ${FILESDIR}/${file} ${WRKDIR} @@ -52,13 +37,23 @@ pre-configure: do-install: @ ${INSTALL_DATA} ${WRKSRC}/libxvidcore.so ${PREFIX}/lib/libxvidcore.so.0 - @ ${INSTALL_DATA} ${WRKSRC}/libcore.a ${PREFIX}/lib/libcore.a @ ${LN} -s libxvidcore.so.0 ${PREFIX}/lib/libxvidcore.so @ ${INSTALL_DATA} ${WRKSRC}/../../src/xvid.h ${PREFIX}/include -# XXX - compatility header installed for mplayer-devel port's benefit - @ ${MKDIR} ${PREFIX}/include/xvid +# XXX - compatility header installed for mplayer's benefit .for header in ${EXTRA_HEADER_FILES} - @ ${INSTALL_DATA} ${WRKSRC}/../../src/${header} ${PREFIX}/include/xvid + @ ${INSTALL_DATA} ${WRKSRC}/../../src/${header} ${PREFIX}/include .endfor -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +CFLAGS+= -DLINUX + +.if ${ARCH:L} == i386 +CFLAGS+= -DARCH_X86 +.elif ${ARCH:L} == alpha +CFLAGS+= -DARCH_PPC +.elif ${ARCH:L} == sparc64 +CFLAGS+= -DARCH_SPARC +.endif + +.include <bsd.port.post.mk> diff --git a/graphics/xvid/distinfo b/graphics/xvid/distinfo index a09ca799f8ae..ca845674745a 100644 --- a/graphics/xvid/distinfo +++ b/graphics/xvid/distinfo @@ -1 +1 @@ -MD5 (xvid_snapshot_20020412.tar.gz) = 05643ca7a870bba08631d7ef4127dbb8 +MD5 (xvidcore-0.9.0.tar.gz) = 8d0cd15a9d935ec46d3b67eddf188c4a diff --git a/graphics/xvid/files/config.h.in b/graphics/xvid/files/config.h.in index 9c556c46c573..eb38bce90bde 100644 --- a/graphics/xvid/files/config.h.in +++ b/graphics/xvid/files/config.h.in @@ -1,5 +1,14 @@ +/* Define as 1 if you have sys/endian.h. */ +#undef HAVE_SYS_ENDIAN_H + +/* Define as 1 if you have sys/param.h. */ +#undef HAVE_SYS_PARAM_H + /* Define as 1 if you have stdint.h. */ #undef HAVE_STDINT_H /* Define as 1 if you have inttypes.h. */ #undef HAVE_INTTYPES_H + +/* Define size of uintptr_t type. */ +#undef SIZEOF_UINTPTR_T diff --git a/graphics/xvid/files/configure.in b/graphics/xvid/files/configure.in index e9f3bbb84ccb..db732af19e66 100644 --- a/graphics/xvid/files/configure.in +++ b/graphics/xvid/files/configure.in @@ -2,7 +2,10 @@ dnl Process this file with autoconf to produce a configure header AC_INIT(config.h.in) dnl Check for and header files -AC_CHECK_HEADERS(stdint.h inttypes.h) +AC_CHECK_HEADERS(sys/endian.h sys/param.h stdint.h inttypes.h) + +dnl Check size of pointer for cache size +AC_CHECK_SIZEOF(uintptr_t) AC_CONFIG_HEADER([config.h]) diff --git a/graphics/xvid/files/patch-Makefile b/graphics/xvid/files/patch-Makefile deleted file mode 100644 index 1e43f1b207fa..000000000000 --- a/graphics/xvid/files/patch-Makefile +++ /dev/null @@ -1,19 +0,0 @@ ---- Makefile.orig Sat Apr 6 16:29:59 2002 -+++ Makefile Sat Apr 6 16:31:10 2002 -@@ -14,7 +14,6 @@ - - include Makefile.inc - --CC = gcc - #CC=icc - #CC = /opt/experimental/bin/gcc # that's where SuSE installs gcc3 - -@@ -33,7 +32,7 @@ - # CFLAGS += -march=pentium -mcpu=pentium - # CFLAGS += -march=pentiumpro -mcpu=pentiumpro - -- CFLAGS += -Wall -O3 -funroll-loops -ffast-math -march=pentiumpro -mcpu=pentiumpro -+ CFLAGS += -Wall -O3 -funroll-loops -ffast-math - CFLAGS += -fstrict-aliasing -fomit-frame-pointer - endif - diff --git a/graphics/xvid/files/patch-src:portab.h b/graphics/xvid/files/patch-src:portab.h index 88808c2d34d2..4879792de98f 100644 --- a/graphics/xvid/files/patch-src:portab.h +++ b/graphics/xvid/files/patch-src:portab.h @@ -1,16 +1,58 @@ ---- ../../src/portab.h.orig Thu May 23 04:52:08 2002 -+++ ../../src/portab.h Thu May 23 04:54:41 2002 -@@ -88,7 +88,13 @@ +--- ../../src/portab.h.orig Sat Nov 23 22:50:14 2002 ++++ ../../src/portab.h Fri Jan 3 14:40:18 2003 +@@ -83,6 +83,14 @@ + * Types used in XviD sources + ****************************************************************************/ - #if defined(LINUX) ++#if defined(HAVE_SYS_PARAM_H) ++#include <sys/param.h> ++#endif ++ ++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000 && defined(HAVE_SYS_ENDIAN_H) ++#include <sys/endian.h> ++#endif ++ + /*---------------------------------------------------------------------------- + | Standard Unix include file (sorry, we put all unix into "linux" case) + *---------------------------------------------------------------------------*/ +@@ -90,8 +98,15 @@ + #if defined(LINUX) || defined(BEOS) || defined(FREEBSD) + + /* All (u)int(size)_t types are defined here */ +-# include <inttypes.h> -+#include "../../../config.h" ++#include "../../config.h" + +#if defined(HAVE_STDINT_H) - #include <stdint.h> ++#include <stdint.h> +#elif defined(HAVE_INTTYPES_H) +#include <inttypes.h> +#endif ++ + /*---------------------------------------------------------------------------- + | msvc (lacks such a header file) + *---------------------------------------------------------------------------*/ +@@ -139,6 +154,9 @@ + #elif defined(ARCH_IA64) + # define CACHE_LINE 32 + # define ptr_t uint64_t ++#elif defined(__FreeBSD__) ++# define CACHE_LINE (SIZEOF_UINTPTR_T * 4) ++# define ptr_t uintptr_t + #else + # error Architecture not supported. + #endif +@@ -341,6 +359,13 @@ + { + return 0; + } ++ ++/*---------------------------------------------------------------------------- ++ | FreeBSD specific macros/functions ++ *---------------------------------------------------------------------------*/ ++# elif defined(__FreeBSD__) && __FreeBSD_version >= 470000 && defined(HAVE_SYS_ENDIAN_H) ++# define BSWAP(a) (be32toh(x)) ++# error Missing EMMS() definition for this architecture. - #define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ - type name##_storage[(sizex)*(sizey)+(alignment)-1]; \ + /*---------------------------------------------------------------------------- + | XviD + gcc unsupported Architecture diff --git a/graphics/xvid/pkg-plist b/graphics/xvid/pkg-plist index 6e2091d69c8e..a9433f44f490 100644 --- a/graphics/xvid/pkg-plist +++ b/graphics/xvid/pkg-plist @@ -1,6 +1,4 @@ +include/divx4.h include/xvid.h -include/xvid/divx4.h -lib/libcore.a lib/libxvidcore.so lib/libxvidcore.so.0 -@dirrm include/xvid diff --git a/multimedia/xvid/Makefile b/multimedia/xvid/Makefile index e4ccf7e98e99..d1b405c374e9 100644 --- a/multimedia/xvid/Makefile +++ b/multimedia/xvid/Makefile @@ -6,45 +6,30 @@ # PORTNAME= xvid -PORTVERSION= 0.20020412 -PORTREVISION= 1 +PORTVERSION= 0.9.0 +PORTEPOCH= 1 CATEGORIES= graphics -MASTER_SITES= http://www.xvid.org/snapshots/ -DISTNAME= xvid_snapshot_${PORTVERSION:S/^0.//} +MASTER_SITES= http://cvs.xvid.org/downloads/xvidcore-0.9.0/ +DISTNAME= xvidcore-${PORTVERSION} MAINTAINER= michaelnottebrock@gmx.net BUILD_DEPENDS= ${LOCALBASE}/bin/nasm:${PORTSDIR}/devel/nasm -ONLY_FOR_ARCHS= i386 -USE_AUTOCONF= yes +MAKEFILE= Makefile.linuxx86 +ONLY_FOR_ARCHS= i386 alpha sparc64 +USE_AUTOCONF_VER= 253 USE_GMAKE= yes -USE_REINPLACE= yes INSTALLS_SHLIB= yes CONFIGURE_WRKSRC= ${WRKDIR} -WRKSRC= ${WRKDIR}/xvid_20020412/xvidcore/build/generic +WRKSRC= ${WRKDIR}/${DISTNAME}/build/generic # XXX - compatility header installed for mplayer-devel port's benefit EXTRA_HEADER_FILES= divx4.h -pre-everything:: -.if !defined(WITH_OPTIMIZED_CFLAGS) - @ ${ECHO_MSG} "You can enable additional compilation optimizations" - @ ${ECHO_MSG} "by defining WITH_OPTIMIZED_CFLAGS" -.endif - -post-patch: - @ ${FIND} ${WRKDIR} -type f | \ - ${XARGS} -n 10 -x ${REINPLACE_CMD} -e \ - 's|<malloc.h>|<stdlib.h>|' -.ifndef(WITH_OPTIMIZED_CFLAGS) - @ ${REINPLACE_CMD} -E -e 's|(CFLAGS \+=).*|\1 ${CFLAGS}|' ${WRKSRC}/Makefile -.else - @ ${REINPLACE_CMD} -E -e 's|(CFLAGS \+=.*)|\1 ${CFLAGS}|' ${WRKSRC}/Makefile -.endif - # trick to detect existence of stdint.h +# amongst other things pre-configure: .for file in configure.in config.h.in @ ${CP} ${FILESDIR}/${file} ${WRKDIR} @@ -52,13 +37,23 @@ pre-configure: do-install: @ ${INSTALL_DATA} ${WRKSRC}/libxvidcore.so ${PREFIX}/lib/libxvidcore.so.0 - @ ${INSTALL_DATA} ${WRKSRC}/libcore.a ${PREFIX}/lib/libcore.a @ ${LN} -s libxvidcore.so.0 ${PREFIX}/lib/libxvidcore.so @ ${INSTALL_DATA} ${WRKSRC}/../../src/xvid.h ${PREFIX}/include -# XXX - compatility header installed for mplayer-devel port's benefit - @ ${MKDIR} ${PREFIX}/include/xvid +# XXX - compatility header installed for mplayer's benefit .for header in ${EXTRA_HEADER_FILES} - @ ${INSTALL_DATA} ${WRKSRC}/../../src/${header} ${PREFIX}/include/xvid + @ ${INSTALL_DATA} ${WRKSRC}/../../src/${header} ${PREFIX}/include .endfor -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +CFLAGS+= -DLINUX + +.if ${ARCH:L} == i386 +CFLAGS+= -DARCH_X86 +.elif ${ARCH:L} == alpha +CFLAGS+= -DARCH_PPC +.elif ${ARCH:L} == sparc64 +CFLAGS+= -DARCH_SPARC +.endif + +.include <bsd.port.post.mk> diff --git a/multimedia/xvid/distinfo b/multimedia/xvid/distinfo index a09ca799f8ae..ca845674745a 100644 --- a/multimedia/xvid/distinfo +++ b/multimedia/xvid/distinfo @@ -1 +1 @@ -MD5 (xvid_snapshot_20020412.tar.gz) = 05643ca7a870bba08631d7ef4127dbb8 +MD5 (xvidcore-0.9.0.tar.gz) = 8d0cd15a9d935ec46d3b67eddf188c4a diff --git a/multimedia/xvid/files/config.h.in b/multimedia/xvid/files/config.h.in index 9c556c46c573..eb38bce90bde 100644 --- a/multimedia/xvid/files/config.h.in +++ b/multimedia/xvid/files/config.h.in @@ -1,5 +1,14 @@ +/* Define as 1 if you have sys/endian.h. */ +#undef HAVE_SYS_ENDIAN_H + +/* Define as 1 if you have sys/param.h. */ +#undef HAVE_SYS_PARAM_H + /* Define as 1 if you have stdint.h. */ #undef HAVE_STDINT_H /* Define as 1 if you have inttypes.h. */ #undef HAVE_INTTYPES_H + +/* Define size of uintptr_t type. */ +#undef SIZEOF_UINTPTR_T diff --git a/multimedia/xvid/files/configure.in b/multimedia/xvid/files/configure.in index e9f3bbb84ccb..db732af19e66 100644 --- a/multimedia/xvid/files/configure.in +++ b/multimedia/xvid/files/configure.in @@ -2,7 +2,10 @@ dnl Process this file with autoconf to produce a configure header AC_INIT(config.h.in) dnl Check for and header files -AC_CHECK_HEADERS(stdint.h inttypes.h) +AC_CHECK_HEADERS(sys/endian.h sys/param.h stdint.h inttypes.h) + +dnl Check size of pointer for cache size +AC_CHECK_SIZEOF(uintptr_t) AC_CONFIG_HEADER([config.h]) diff --git a/multimedia/xvid/files/patch-Makefile b/multimedia/xvid/files/patch-Makefile deleted file mode 100644 index 1e43f1b207fa..000000000000 --- a/multimedia/xvid/files/patch-Makefile +++ /dev/null @@ -1,19 +0,0 @@ ---- Makefile.orig Sat Apr 6 16:29:59 2002 -+++ Makefile Sat Apr 6 16:31:10 2002 -@@ -14,7 +14,6 @@ - - include Makefile.inc - --CC = gcc - #CC=icc - #CC = /opt/experimental/bin/gcc # that's where SuSE installs gcc3 - -@@ -33,7 +32,7 @@ - # CFLAGS += -march=pentium -mcpu=pentium - # CFLAGS += -march=pentiumpro -mcpu=pentiumpro - -- CFLAGS += -Wall -O3 -funroll-loops -ffast-math -march=pentiumpro -mcpu=pentiumpro -+ CFLAGS += -Wall -O3 -funroll-loops -ffast-math - CFLAGS += -fstrict-aliasing -fomit-frame-pointer - endif - diff --git a/multimedia/xvid/files/patch-src:portab.h b/multimedia/xvid/files/patch-src:portab.h index 88808c2d34d2..4879792de98f 100644 --- a/multimedia/xvid/files/patch-src:portab.h +++ b/multimedia/xvid/files/patch-src:portab.h @@ -1,16 +1,58 @@ ---- ../../src/portab.h.orig Thu May 23 04:52:08 2002 -+++ ../../src/portab.h Thu May 23 04:54:41 2002 -@@ -88,7 +88,13 @@ +--- ../../src/portab.h.orig Sat Nov 23 22:50:14 2002 ++++ ../../src/portab.h Fri Jan 3 14:40:18 2003 +@@ -83,6 +83,14 @@ + * Types used in XviD sources + ****************************************************************************/ - #if defined(LINUX) ++#if defined(HAVE_SYS_PARAM_H) ++#include <sys/param.h> ++#endif ++ ++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000 && defined(HAVE_SYS_ENDIAN_H) ++#include <sys/endian.h> ++#endif ++ + /*---------------------------------------------------------------------------- + | Standard Unix include file (sorry, we put all unix into "linux" case) + *---------------------------------------------------------------------------*/ +@@ -90,8 +98,15 @@ + #if defined(LINUX) || defined(BEOS) || defined(FREEBSD) + + /* All (u)int(size)_t types are defined here */ +-# include <inttypes.h> -+#include "../../../config.h" ++#include "../../config.h" + +#if defined(HAVE_STDINT_H) - #include <stdint.h> ++#include <stdint.h> +#elif defined(HAVE_INTTYPES_H) +#include <inttypes.h> +#endif ++ + /*---------------------------------------------------------------------------- + | msvc (lacks such a header file) + *---------------------------------------------------------------------------*/ +@@ -139,6 +154,9 @@ + #elif defined(ARCH_IA64) + # define CACHE_LINE 32 + # define ptr_t uint64_t ++#elif defined(__FreeBSD__) ++# define CACHE_LINE (SIZEOF_UINTPTR_T * 4) ++# define ptr_t uintptr_t + #else + # error Architecture not supported. + #endif +@@ -341,6 +359,13 @@ + { + return 0; + } ++ ++/*---------------------------------------------------------------------------- ++ | FreeBSD specific macros/functions ++ *---------------------------------------------------------------------------*/ ++# elif defined(__FreeBSD__) && __FreeBSD_version >= 470000 && defined(HAVE_SYS_ENDIAN_H) ++# define BSWAP(a) (be32toh(x)) ++# error Missing EMMS() definition for this architecture. - #define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ - type name##_storage[(sizex)*(sizey)+(alignment)-1]; \ + /*---------------------------------------------------------------------------- + | XviD + gcc unsupported Architecture diff --git a/multimedia/xvid/pkg-plist b/multimedia/xvid/pkg-plist index 6e2091d69c8e..a9433f44f490 100644 --- a/multimedia/xvid/pkg-plist +++ b/multimedia/xvid/pkg-plist @@ -1,6 +1,4 @@ +include/divx4.h include/xvid.h -include/xvid/divx4.h -lib/libcore.a lib/libxvidcore.so lib/libxvidcore.so.0 -@dirrm include/xvid |