On Thu, May 20, 2010 at 01:33:17PM +0000, Jacob Meuser wrote:
> On Thu, May 20, 2010 at 01:07:44PM +0200, David Coppa wrote:
> > On Thu, May 20, 2010 at 12:00 PM, Edd Barrett <vex...@gmail.com> wrote:
> > > On Thu, May 20, 2010 at 06:43:29AM +0000, Jacob Meuser wrote:
> > >> #...@multimedia/x264
> > >> #...@graphice/ffmpeg
> > >
> > > I can tell you these build and install on i386. I have not had time to 
> > > look in
> > > depth at the patches for these however.
> > >
> > >
> > > You have already tested these, so not much use :P
> > 
> > x264 cmdline tool is b0rked.
> 
> oh, indeed.  it does absolutely nothing.  I'll look into that.  not
> like I actually use x264, but hey, why not.

this turned out to be from the use of -Bsymbolic when linking both
the shared library and executable, which is plain silly.

updated diff below for x264 that just removes the use of -Bsymbolic.
since this only affects the shared library and executable, you don't
need to rebuild/reinstall everything that depends on x264, just x264
itself.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/x264/Makefile,v
retrieving revision 1.9
diff -N -u -p Makefile
--- Makefile    14 Apr 2009 19:50:47 -0000      1.9
+++ Makefile    20 May 2010 16:51:05 -0000
@@ -2,14 +2,14 @@
 
 COMMENT=       free H264/AVC encoder
 
-V=             20090204
+V=             20100511
 DISTNAME=      x264-snapshot-${V}-2245
 PKGNAME=       x264-${V}
 CATEGORIES=    multimedia
 MASTER_SITES=  ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
 EXTRACT_SUFX=  .tar.bz2
 
-SHARED_LIBS=   x264    3.0
+SHARED_LIBS=   x264    4.0
 
 HOMEPAGE=      http://www.videolan.org/developers/x264.html
 
@@ -25,12 +25,11 @@ WANTLIB=    c m pthread
 USE_GMAKE=     Yes
 CONFIGURE_STYLE= simple
 CONFIGURE_ENV= API=${LIBx264_VERSION}
-CONFIGURE_ARGS+=--disable-mp4-output \
+CONFIGURE_ARGS+=--disable-asm \
+               --disable-ffms-input \
+               --disable-lavf-input \
+               --disable-mp4-output \
                --prefix=${PREFIX}
-
-.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
-BUILD_DEPENDS+=        ::devel/yasm
-.endif
 
 NO_REGRESS=    Yes
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/multimedia/x264/distinfo,v
retrieving revision 1.4
diff -N -u -p distinfo
--- distinfo    14 Apr 2009 19:50:47 -0000      1.4
+++ distinfo    20 May 2010 16:51:05 -0000
@@ -1,5 +1,5 @@
-MD5 (x264-snapshot-20090204-2245.tar.bz2) = MBqmWc2OCb7fXd1oKGUfeg==
-RMD160 (x264-snapshot-20090204-2245.tar.bz2) = U+dOLIo/FMafvvBDb6BqZs6AycM=
-SHA1 (x264-snapshot-20090204-2245.tar.bz2) = DGzbusrnJdrk36+vSwoPFJ+wD6k=
-SHA256 (x264-snapshot-20090204-2245.tar.bz2) = 
uOQfiUM+7iocylGfslF8U8DyzfQNAhpSaKsKhb51mzY=
-SIZE (x264-snapshot-20090204-2245.tar.bz2) = 2419267
+MD5 (x264-snapshot-20100511-2245.tar.bz2) = SdUh/Hg8Fg/3aKDn0F1Ong==
+RMD160 (x264-snapshot-20100511-2245.tar.bz2) = OSlC3y3tcZM8UjwvlnfmBLA5eKs=
+SHA1 (x264-snapshot-20100511-2245.tar.bz2) = neo8PA9DQtS1uBC+Y96fq7y/J5w=
+SHA256 (x264-snapshot-20100511-2245.tar.bz2) = 
JRiKgZPTKfN0SMXJAezuaZqtyvX0mK6I6RKgLGSy+B8=
+SIZE (x264-snapshot-20100511-2245.tar.bz2) = 418097
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/multimedia/x264/patches/patch-Makefile,v
retrieving revision 1.4
diff -N -u -p patches/patch-Makefile
--- patches/patch-Makefile      14 Apr 2009 19:50:47 -0000      1.4
+++ patches/patch-Makefile      20 May 2010 16:51:05 -0000
@@ -1,54 +1,40 @@
 $OpenBSD: patch-Makefile,v 1.4 2009/04/14 19:50:47 kili Exp $
---- Makefile.orig      Wed Feb  4 16:45:09 2009
-+++ Makefile   Thu Mar  5 10:44:49 2009
-@@ -53,6 +53,9 @@ ALTIVECSRC += common/ppc/mc.c common/ppc/pixel.c commo
-               common/ppc/predict.c
- SRCS += $(ALTIVECSRC)
- $(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS)
-+$(ALTIVECSRC:%.c=%.so): CFLAGS += $(ALTIVECFLAGS)
-+common/cpu.o: CFLAGS += $(ALTIVECFLAGS)
-+common/cpu.so: CFLAGS += $(ALTIVECFLAGS)
+--- Makefile.orig      Tue May 11 16:45:09 2010
++++ Makefile   Tue May 11 18:11:56 2010
+@@ -112,6 +112,7 @@ endif
  endif
  
- # VIS optims
-@@ -66,6 +69,7 @@ SRCS += extras/getopt.c
- endif
- 
  OBJS = $(SRCS:%.c=%.o)
 +SOBJS = $(SRCS:%.c=%.so)
  OBJCLI = $(SRCCLI:%.c=%.o)
+ OBJSO = $(SRCSO:%.c=%.o)
  DEP  = depend
+@@ -124,8 +125,8 @@ libx264.a: .depend $(OBJS) $(OBJASM)
+       $(AR) rc libx264.a $(OBJS) $(OBJASM)
+       $(RANLIB) libx264.a
  
-@@ -77,8 +81,8 @@ libx264.a: .depend $(OBJS) $(OBJASM)
-       ar rc libx264.a $(OBJS) $(OBJASM)
-       ranlib libx264.a
+-$(SONAME): .depend $(OBJS) $(OBJASM) $(OBJSO)
+-      $(CC) -shared -o $@ $(OBJS) $(OBJASM) $(OBJSO) $(SOFLAGS) $(LDFLAGS)
++$(SONAME): .depend $(SOBJS) $(OBJASM) $(OBJSO)
++      $(CC) -shared -o $@ $(SOBJS) $(OBJASM) $(OBJSO) $(SOFLAGS) $(LDFLAGS)
  
--$(SONAME): .depend $(OBJS) $(OBJASM)
--      $(CC) -shared -o $@ $(OBJS) $(OBJASM) $(SOFLAGS) $(LDFLAGS)
-+$(SONAME): .depend $(SOBJS) $(OBJASM)
-+      $(CC) -shared -o $@ $(SOBJS) $(OBJASM) $(SOFLAGS) $(LDFLAGS)
+ x264$(EXE): $(OBJCLI) libx264.a
+       $(CC) -o $@ $+ $(LDFLAGS) $(LDFLAGSCLI)
+@@ -141,6 +142,9 @@ checkasm: tools/checkasm.o libx264.a
+       $(AS) $(ASFLAGS) -o $@ $<
+       -@ $(STRIP) -x $@ # delete local/anonymous symbols, so they don't show 
up in oprofile
  
- x264$(EXE): $(OBJCLI) libx264.a 
-       $(CC) -o $@ $+ $(LDFLAGS)
-@@ -91,9 +95,12 @@ checkasm: tools/checkasm.o libx264.a
- # delete local/anonymous symbols, so they don't show up in oprofile
-       -@ strip -x $@
- 
 +%.so: %.c
 +      $(CC) $(CFLAGS) -fPIC -c -o $@ $<
 +
  .depend: config.mak
-       rm -f .depend
--      $(foreach SRC, $(SRCS) $(SRCCLI), $(CC) $(CFLAGS) $(ALTIVECFLAGS) 
$(SRC) -MT $(SRC:%.c=%.o) -MM -g0 1>> .depend;)
-+      $(foreach SRC, $(SRCS) $(SRCCLI), ( $(ECHON) "`dirname $(SRC)`/" && 
$(CC) $(CFLAGS) $(ALTIVECFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
- 
- config.mak:
-       ./configure
-@@ -154,7 +161,6 @@ install: x264$(EXE) $(SONAME)
+       @rm -f .depend
+       @$(foreach SRC, $(SRCS) $(SRCCLI) $(SRCSO), $(CC) $(CFLAGS) $(SRC) -MT 
$(SRC:%.c=%.o) -MM -g0 1>> .depend;)
+@@ -206,7 +210,6 @@ install: x264$(EXE) $(SONAME)
  ifeq ($(SYS),MINGW)
        $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(bindir))
  else
--      $(if $(SONAME), ln -sf $(SONAME) 
$(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
+-      $(if $(SONAME), ln -f -s $(SONAME) 
$(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
        $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
  endif
        $(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir))
Index: patches/patch-common_cpu_c
===================================================================
RCS file: /cvs/ports/multimedia/x264/patches/patch-common_cpu_c,v
retrieving revision 1.4
diff -N -u -p patches/patch-common_cpu_c
--- patches/patch-common_cpu_c  14 Apr 2009 19:50:47 -0000      1.4
+++ /dev/null   20 May 2010 16:31:02 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-common_cpu_c,v 1.4 2009/04/14 19:50:47 kili Exp $
---- common/cpu.c.orig  Wed Feb  4 16:45:09 2009
-+++ common/cpu.c       Sun Apr  5 16:55:33 2009
-@@ -214,10 +214,12 @@ uint32_t x264_cpu_detect( void )
-     size_t   length = sizeof( has_altivec );
-     int      error = sysctl( selectors, 2, &has_altivec, &length, NULL, 0 );
- 
-+#if 0
-     if( error == 0 && has_altivec != 0 )
-     {
-         cpu |= X264_CPU_ALTIVEC;
-     }
-+#endif
- 
-     return cpu;
- }
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/multimedia/x264/patches/patch-configure,v
retrieving revision 1.5
diff -N -u -p patches/patch-configure
--- patches/patch-configure     14 Apr 2009 19:50:47 -0000      1.5
+++ patches/patch-configure     20 May 2010 16:51:05 -0000
@@ -1,39 +1,18 @@
 $OpenBSD: patch-configure,v 1.5 2009/04/14 19:50:47 kili Exp $
---- configure.orig     Wed Feb  4 16:45:09 2009
-+++ configure  Thu Mar  5 10:44:49 2009
+--- configure.orig     Tue May 11 13:45:10 2010
++++ configure  Thu May 20 09:49:54 2010
 @@ -1,4 +1,4 @@
 -#!/bin/bash
 +#!/bin/sh
  
  if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
  
-@@ -70,6 +70,18 @@ ASFLAGS=""
- 
- EXE=""
- 
-+# check whether 'echo -n' works as expected, otherwise try printf
-+if [ "x`echo -n houba`" = xhouba ]
-+then
-+  ECHON="echo -n"
-+elif [ "x`printf houba`" = xhouba ]
-+then
-+  ECHON="printf"
-+else
-+  echo "Neither 'echo -n' nor 'printf' are working with your shell!"
-+  exit 1
-+fi
-+
- # parse options
- 
- for opt do
-@@ -371,21 +383,15 @@ if [ "$avis_input" = "yes" ] ; then
- fi
- 
- if [ "$pic" = "yes" ] ; then
--    CFLAGS="$CFLAGS -fPIC"
+@@ -609,22 +609,17 @@ if [ "$pic" = "yes" ] ; then
+     CFLAGS="$CFLAGS -fPIC"
      ASFLAGS="$ASFLAGS -DPIC"
      # resolve textrels in the x86 asm
-     cc_check stdio.h -Wl,-Bsymbolic && LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
+-    cc_check stdio.h -Wl,-Bsymbolic && LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
++    #cc_check stdio.h -Wl,-Bsymbolic && LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
  fi
  
 -if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
@@ -43,31 +22,26 @@ $OpenBSD: patch-configure,v 1.5 2009/04/14 19:50:47 ki
 -
  if [ "$debug" = "yes" ]; then
      CFLAGS="-O1 -g $CFLAGS"
+ elif [ $ARCH = ARM ]; then
+     # arm-gcc-4.2 produces incorrect output with -ffast-math
+     # and it doesn't save any speed anyway on 4.4, so disable it
+-    CFLAGS="-O3 -fno-fast-math $CFLAGS"
++    CFLAGS="-fno-fast-math $CFLAGS"
  else
--    CFLAGS="-O4 -ffast-math $CFLAGS"
+-    CFLAGS="-O3 -ffast-math $CFLAGS"
 +    CFLAGS="-ffast-math $CFLAGS"
  fi
  
  if cc_check "stdio.h" "" "fseeko(stdin,0,0);" ; then
-@@ -418,10 +424,16 @@ EXE=$EXE
- VIS=$vis
- HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
- DEVNULL=$DEVNULL
-+ECHON=$ECHON
+@@ -663,7 +658,6 @@ DEVNULL=$DEVNULL
  EOF
  
-+$ECHON 'CONFIGURE_ARGS=' >> config.mak
-+for A in "$@" ; do
-+    $ECHON " '$A'" >> config.mak
-+done
-+echo '' >> config.mak
-+
  if [ "$shared" = "yes" ]; then
 -    API=$(grep '#define X264_BUILD' < x264.h | cut -f 3 -d ' ')
      if [ "$SYS" = "MINGW" ]; then
          echo "SONAME=libx264-$API.dll" >> config.mak
          echo 'IMPLIBNAME=libx264.dll.a' >> config.mak
-@@ -437,14 +449,13 @@ if [ "$shared" = "yes" ]; then
+@@ -679,14 +673,13 @@ if [ "$shared" = "yes" ]; then
      else
          echo "SOSUFFIX=so" >> config.mak
          echo "SONAME=libx264.so.$API" >> config.mak
Index: patches/patch-version_sh
===================================================================
RCS file: /cvs/ports/multimedia/x264/patches/patch-version_sh,v
retrieving revision 1.1
diff -N -u -p patches/patch-version_sh
--- patches/patch-version_sh    14 Apr 2009 19:50:47 -0000      1.1
+++ patches/patch-version_sh    20 May 2010 16:51:05 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-version_sh,v 1.1 2009/04/14 19:50:47 kili Exp $
---- version.sh.orig    Thu Jan 29 16:45:08 2009
-+++ version.sh Thu Feb 12 01:24:30 2009
+--- version.sh.orig    Tue May 11 16:45:10 2010
++++ version.sh Tue May 11 18:16:17 2010
 @@ -1,19 +1,6 @@
 -#!/bin/bash
 -git rev-list HEAD | sort > config.git-hash
@@ -12,7 +12,7 @@ $OpenBSD: patch-version_sh,v 1.1 2009/04/14 19:50:47 k
 -    elif git status | grep -q "modified:" ; then
 -        VER="${VER}M"
 -    fi
--    VER="$VER $(git rev-list HEAD -n 1 | head -c 7)"
+-    VER="$VER $(git rev-list HEAD -n 1 | cut -c 1-7)"
 -    echo "#define X264_VERSION \" r$VER\"" >> config.h
 -else
 -    echo "#define X264_VERSION \"\"" >> config.h

Reply via email to