o Update to 0.9.0

o Bump PORTEPOCH since PORTVERSION is lower than previous one
o Add initial work on a FreeBSD specific portable code namely by
  ${PATCHDIR}/patch-src:portab.h
o Update ONLY_FOR_ARCHS to "i386 alpha sparc64". This still needs
  to be verified by the bento ports cluster.

PR:		46173
Submitted by:	maintainer et al
This commit is contained in:
Mario Sergio Fujikawa Ferreira
2003-01-10 20:23:38 +00:00
parent e70444ae5f
commit 0b480fe2fc
14 changed files with 178 additions and 122 deletions
+24 -29
View File
@@ -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>
+1 -1
View File
@@ -1 +1 @@
MD5 (xvid_snapshot_20020412.tar.gz) = 05643ca7a870bba08631d7ef4127dbb8
MD5 (xvidcore-0.9.0.tar.gz) = 8d0cd15a9d935ec46d3b67eddf188c4a
+9
View File
@@ -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
+4 -1
View File
@@ -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])
-19
View File
@@ -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
+50 -8
View File
@@ -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)
+#include "../../../config.h"
/* All (u)int(size)_t types are defined here */
-# include <inttypes.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
+1 -3
View File
@@ -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
+24 -29
View File
@@ -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>
+1 -1
View File
@@ -1 +1 @@
MD5 (xvid_snapshot_20020412.tar.gz) = 05643ca7a870bba08631d7ef4127dbb8
MD5 (xvidcore-0.9.0.tar.gz) = 8d0cd15a9d935ec46d3b67eddf188c4a
+9
View File
@@ -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
+4 -1
View File
@@ -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])
-19
View File
@@ -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
+50 -8
View File
@@ -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)
+#include "../../../config.h"
/* All (u)int(size)_t types are defined here */
-# include <inttypes.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
+1 -3
View File
@@ -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