Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2009 03:02:18 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/130466: Update port: multimedia/libmpeg3 to 1.8
Message-ID:  <20090113030218.8c1fc96e.tkato432@yahoo.com>
Resent-Message-ID: <200901121840.n0CIe6rh036905@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         130466
>Category:       ports
>Synopsis:       Update port: multimedia/libmpeg3 to 1.8
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 12 18:40:06 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 7.1-RELEASE-p1 i386
>Organization:
>Environment:
>Description:
- Update to version 1.8

Remove file:
files/patch-Makefile

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/multimedia/libmpeg3/Makefile multimedia/libmpeg3/Makefile
--- /usr/ports/multimedia/libmpeg3/Makefile	2008-09-07 14:59:54.000000000 +0900
+++ multimedia/libmpeg3/Makefile	2008-09-11 13:00:18.000000000 +0900
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	libmpeg3
-PORTVERSION=	1.7
-PORTREVISION=	1
+PORTVERSION=	1.8
 DISTVERSIONSUFFIX=	-src
 CATEGORIES=	multimedia
 MASTER_SITES=	SF/heroines
@@ -15,33 +14,62 @@
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Advanced editing and manipulation of MPEG streams
 
-BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
-LIB_DEPENDS=	ao.3:${PORTSDIR}/audio/libao \
-		a52.0:${PORTSDIR}/audio/liba52
+LIB_DEPENDS=	a52.0:${PORTSDIR}/audio/liba52
+
+OPTIONS=	MMX "Enable MMX instruction set (i386 only)" off
+
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 USE_BZIP2=	yes
 USE_GMAKE=	yes
-WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
-NASM?=		${LOCALBASE}/bin/nasm
-MAKE_ENV=	NASM=${NASM} INSTALL='${INSTALL}' ARCH=${ARCH} PTHREAD_LIBS=${PTHREAD_LIBS}
+MAKE_ARGS=	CC="${CC}" USE_CSS=0 OBJDIR="obj" \
+		CFLAGS="${CFLAGS} ${CPPFLAGS}" LIBS="${LDFLAGS}"
 
 PORTDOCS=	index.html
-MPEG3_UTILS=	mpeg3cat mpeg3dump mpeg3peek mpeg3toc
-PLIST_FILES=	${MPEG3_UTILS:S,^,bin/,} include/libmpeg3.h include/mpeg3private.h \
-		include/mpeg3protos.h lib/libmpeg3.a
+PLIST_FILES=	${BIN_FILES:S|^|bin/|} ${INC_FILES:S|^|include/|} \
+		${LIB_FILES:S|^|lib/|}
+
+BIN_FILES=	mpeg3cat mpeg3dump mpeg3peek mpeg3toc
+INC_FILES=	libmpeg3.h mpeg3private.h mpeg3protos.h
+LIB_FILES=	libmpeg3.a
+
+CPPFLAGS=	-I. -I${LOCALBASE}/include/a52dec ${PTHREAD_CFLAGS}
+LDFLAGS=	-lm -L${LOCALBASE}/lib -la52 ${PTHREAD_LIBS}
+
+NASM?=		${LOCALBASE}/bin/nasm
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_MMX) && (${ARCH} == "i386")
+BUILD_DEPENDS+=	nasm:${PORTSDIR}/devel/nasm
+MAKE_ARGS+=	USE_MMX=1 NASM="${NASM}"
+CFLAGS+=	-DHAVE_MMX
+.else
+MAKE_ARGS+=	USE_MMX=0
+.endif
 
 post-patch:
+	@${REINPLACE_CMD} -e 's|^OBJDIR|#OBJDIR|g ; \
+		 s|^A52DIR|#A52DIR|g ; \
+		 s|^include|#include|g' ${WRKSRC}/Makefile
 	@${FIND} ${WRKSRC} -name '*.[ch]' -print0 \
 		| ${XARGS} -0 ${REINPLACE_CMD} -e 's|stdint\.h|sys/types.h|g'
 
 do-install:
-	${INSTALL_PROGRAM} ${MPEG3_UTILS:S,^,${WRKSRC}/${ARCH}/,} ${PREFIX}/bin/
-	${INSTALL_DATA} ${WRKSRC}/${ARCH}/libmpeg3.a ${PREFIX}/lib/
-	${INSTALL_DATA} ${WRKSRC}/libmpeg3.h ${WRKSRC}/mpeg3private.h \
-		${WRKSRC}/mpeg3protos.h ${PREFIX}/include/
-.ifndef (NOPORTDOCS)
-	${INSTALL} -d ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/docs/index.html ${DOCSDIR}/
+.for file in ${BIN_FILES}
+	cd ${WRKSRC}/obj && ${INSTALL_PROGRAM} ${file} ${PREFIX}/bin
+.endfor
+.for file in ${INC_FILES}
+	cd ${WRKSRC} && ${INSTALL_DATA} ${file} ${PREFIX}/include
+.endfor
+.for file in ${LIB_FILES}
+	cd ${WRKSRC}/obj && ${INSTALL_DATA} ${file} ${PREFIX}/lib
+.endfor
+.if !defined(NOPORTDOCS)
+	@${MKDIR} ${DOCSDIR}
+.for file in ${PORTDOCS}
+	cd ${WRKSRC}/docs && ${INSTALL_DATA} ${file} ${DOCSDIR}
+.endfor
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -urN /usr/ports/multimedia/libmpeg3/distinfo multimedia/libmpeg3/distinfo
--- /usr/ports/multimedia/libmpeg3/distinfo	2006-07-23 03:09:12.000000000 +0900
+++ multimedia/libmpeg3/distinfo	2008-09-11 01:57:52.000000000 +0900
@@ -1,3 +1,3 @@
-MD5 (libmpeg3-1.7-src.tar.bz2) = 4a3e8896164d59d7d0dff69b50b75352
-SHA256 (libmpeg3-1.7-src.tar.bz2) = b9e840ab489fd57860d305cdfb43d2c25fbb01105c4db4e16f09122727ee052d
-SIZE (libmpeg3-1.7-src.tar.bz2) = 320897
+MD5 (libmpeg3-1.8-src.tar.bz2) = a9d0d34e8941a4437eb8e7dfe559eca1
+SHA256 (libmpeg3-1.8-src.tar.bz2) = 656f50bef752463af06c6b131f67efef30a34978499e1fdee30e97cac1dea3c4
+SIZE (libmpeg3-1.8-src.tar.bz2) = 2452350
diff -urN /usr/ports/multimedia/libmpeg3/files/patch-Makefile multimedia/libmpeg3/files/patch-Makefile
--- /usr/ports/multimedia/libmpeg3/files/patch-Makefile	2006-07-23 03:09:12.000000000 +0900
+++ multimedia/libmpeg3/files/patch-Makefile	1970-01-01 09:00:00.000000000 +0900
@@ -1,135 +0,0 @@
---- ./Makefile.orig	Wed Feb 15 08:09:31 2006
-+++ ./Makefile	Sat Jul 22 18:10:38 2006
-@@ -1,13 +1,6 @@
--CC = gcc
--NASM = nasm
- USE_MMX = 0
--USE_CSS = 1
--A52DIR := $(shell expr a52dec* )
--
-+USE_CSS = 0
- 
--ifeq ("$(PREFIX)", "")
--PREFIX=/usr
--endif
- 
- ifeq ($(origin CFLAGS), environment)
- HAVE_CFLAGS := y
-@@ -16,7 +9,7 @@
- endif
- 
- 
--OBJDIR := $(shell uname --machine)
-+OBJDIR := $(ARCH)
- 
- 
- 
-@@ -28,7 +21,7 @@
-   endif
- endif
- 
--ifeq ($(OBJDIR), i686)
-+ifeq ($(OBJDIR), i386)
-   USE_MMX = 1
-   ifneq ($(HAVE_CFLAGS), y)
-     CFLAGS := -O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/local/include
-@@ -36,13 +29,11 @@
-   CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
- endif
- 
--ifeq ($(OBJDIR), x86_64)
-+ifeq ($(OBJDIR), amd64)
-   ifneq ($(HAVE_CFLAGS), y)
-     CFLAGS := -O2 -fomit-frame-pointer -I/usr/local/include
-   endif
-   CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
--
--
- endif
- 
- 
-@@ -64,22 +55,10 @@
- 
- CFLAGS += \
- 	-I. \
--	-I$(A52DIR)/include \
--	-I$(A52DIR)/liba52
--
--
-+	-I$(LOCALBASE)/include/a52dec
- 
- CFLAGS += -g
- 
--
--
--
--
--
--
--
--
--
- OBJS = \
- 	$(OBJDIR)/audio/ac3.o \
- 	$(OBJDIR)/audio/dct.o \
-@@ -136,30 +115,30 @@
- 	$(OBJDIR)/audio \
- 	$(OBJDIR)/video
- 
--include Makefile.a52
--
--DIRS += $(A52DIRS)
--
--
- OUTPUT = $(OBJDIR)/libmpeg3.a
- UTILS = $(OBJDIR)/mpeg3dump $(OBJDIR)/mpeg3peek $(OBJDIR)/mpeg3toc  $(OBJDIR)/mpeg3cat
- 
- #$(OBJDIR)/mpeg3split
- 
- 
--LIBS = -lm -lpthread
-+LIBS = -lm -la52 $(PTHREAD_LIBS) -L${LOCALBASE}/lib
- 
--$(shell if ! test -d $(OBJDIR) \; then mkdir -p $(OBJDIR) \; fi )
-+#$(shell if ! test -d $(OBJDIR) ; then mkdir -p $(OBJDIR) ; fi )
- 
--$(shell echo $(CFLAGS) > $(OBJDIR)/c_flags)
--$(shell echo $(A52CFLAGS) > $(OBJDIR)/a52_flags)
--$(shell echo $(OBJS) $(ASMOBJS) $(A52OBJS) $(NASMOBJS) > $(OBJDIR)/objs)
--$(shell mkdir -p $(DIRS) )
-+#$(shell echo $(CFLAGS) > $(OBJDIR)/c_flags)
-+#$(shell echo $(OBJS) $(ASMOBJS) $(NASMOBJS) > $(OBJDIR)/objs)
-+#$(shell mkdir -p $(DIRS) )
- 
--all: $(OUTPUT) $(UTILS)
-+all: SHELL $(OUTPUT) $(UTILS)
-+
-+SHELL:
-+	$(INSTALL) -d $(OBJDIR)
-+	echo $(CFLAGS) > $(OBJDIR)/c_flags
-+	echo $(OBJS) $(ASMOBJS) $(NASMOBJS) > $(OBJDIR)/objs
-+	$(INSTALL) -d $(DIRS)
- 
- 
--$(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS) $(A52OBJS)
-+$(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS)
- 	ar rcs $(OUTPUT) `cat $(OBJDIR)/objs`
- 
- 
-@@ -211,8 +190,6 @@
- 	$(CC) -c `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.S) -o $*.o
- $(NASMOBJS): 
- 	$(NASM) -f elf $(subst $(OBJDIR)/,, $*.s) -o $*.o
--$(A52OBJS):
--	$(CC) -c `cat $(OBJDIR)/a52_flags` $(subst $(OBJDIR)/,, $*.c) -o $*.o
- 
- $(OBJDIR)/libmpeg3.o: 				    libmpeg3.c
- $(OBJDIR)/mpeg3atrack.o: 			    mpeg3atrack.c
-@@ -256,7 +233,3 @@
- $(OBJDIR)/video/subtitle.o:                         video/subtitle.c
- $(OBJDIR)/video/vlc.o:  			    video/vlc.c
- $(OBJDIR)/workarounds.o:  			    workarounds.c
--
--
--
--include depend.a52
diff -urN /usr/ports/multimedia/libmpeg3/files/patch-mpeg3ifo.c multimedia/libmpeg3/files/patch-mpeg3ifo.c
--- /usr/ports/multimedia/libmpeg3/files/patch-mpeg3ifo.c	2006-07-23 03:09:13.000000000 +0900
+++ multimedia/libmpeg3/files/patch-mpeg3ifo.c	2008-09-11 05:39:34.000000000 +0900
@@ -1,23 +1,21 @@
---- ./mpeg3ifo.c.orig	Sun Feb 19 01:19:23 2006
-+++ ./mpeg3ifo.c	Sat Jul 22 18:02:04 2006
+--- mpeg3ifo.c.orig	2007-12-17 08:25:26.000000000 +0900
++++ mpeg3ifo.c	2008-09-11 05:39:21.000000000 +0900
 @@ -1,4 +1,4 @@
 -#include <byteswap.h>
 +//#include <byteswap.h>
  #include <dirent.h>
  #include <fcntl.h>
  #include <stdlib.h>
-@@ -9,6 +9,14 @@
- #include "ifo.h"
+@@ -10,6 +10,12 @@
  #include "mpeg3private.h"
  #include "mpeg3protos.h"
-+
-+#define bswap_16(x) ((((x) << 8) & 0xff00) | \
-+		     (((x) >> 8) & 0x00ff))
-+
-+#define bswap_32(x) ((((x) << 24) & 0xff000000) | \
-+                     (((x) <<  8) & 0x00ff0000) | \
-+                     (((x) >>  8) & 0x0000ff00) | \
-+                     (((x) >> 24) & 0x000000ff))
  
++#ifdef __FreeBSD__
++#include <sys/endian.h>
++#define bswap_16(x) bswap16(x)
++#define bswap_32(x) bswap32(x)
++#endif
++
  typedef struct
  {
+ // Bytes relative to start of stream.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090113030218.8c1fc96e.tkato432>