Subject: mjpegtools patch review request
To: None <tech-pkg@netbsd.org>
From: Christopher SEKIYA <wileyc@rezrov.net>
List: tech-pkg
Date: 03/27/2004 14:54:37
--n8g4imXOkfNTN/H1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

All,

Wanting to use transcode to create MPEG1 files, I discovered that its mjpeg
modules wanted to use a shared libmjpegutils library.

Per an old post by Bernd about this exact subject, I've modified mjpegutils in
pkgsrc to create, install, and buildlink the shared library.  transcode is
happier thereby.

If there are no objections, I'd like to commit these modifications in a day or
so.

Thanks,

-- Chris
	GPG key FEB9DE7F (91AF 4534 4529 4BCC 31A5  938E 023E EEFB FEB9 DE7F)

--n8g4imXOkfNTN/H1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=pkg-diff

? patches/patch-ad
? patches/patch-ae
? patches/patch-af
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/mjpegtools/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile	11 Mar 2004 13:17:03 -0000	1.7
+++ Makefile	27 Mar 2004 05:49:42 -0000
@@ -1,6 +1,7 @@
 # $NetBSD: Makefile,v 1.7 2004/03/11 13:17:03 recht Exp $
 
 DISTNAME=	mjpegtools-1.6.2
+PKGREVISION=	2
 CATEGORIES=	multimedia
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=mjpeg/}
 
@@ -24,6 +25,9 @@
 # XXX fix me
 CONFIGURE_ARGS+=	--without-avifile
 
+pre-configure:
+	cd ${WRKSRC} && ./autogen.sh
+
 .include "../../audio/lame/buildlink3.mk"
 .include "../../devel/SDL/buildlink3.mk"
 .include "../../graphics/ImageMagick/buildlink3.mk"
@@ -35,4 +39,5 @@
 #.include "../../x11/gtk/buildlink3.mk"
 .include "../../mk/ossaudio.buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/automake.mk"
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/mjpegtools/PLIST,v
retrieving revision 1.3
diff -u -r1.3 PLIST
--- PLIST	11 Mar 2004 13:17:03 -0000	1.3
+++ PLIST	27 Mar 2004 05:49:42 -0000
@@ -99,7 +99,10 @@
 lib/liblavplay-1.6.so.2.2
 lib/liblavplay.la
 lib/liblavplay.so
-lib/libmjpegutils.a
+lib/libmjpegutils-1.6.so.2
+lib/libmjpegutils-1.6.so.2.2
+lib/libmjpegutils.la
+lib/libmjpegutils.so
 lib/libmpeg2encpp-1.6.so.2
 lib/libmpeg2encpp-1.6.so.2.2
 lib/libmpeg2encpp.la
Index: buildlink2.mk
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/mjpegtools/buildlink2.mk,v
retrieving revision 1.2
diff -u -r1.2 buildlink2.mk
--- buildlink2.mk	26 Jan 2004 12:45:44 -0000	1.2
+++ buildlink2.mk	27 Mar 2004 05:49:42 -0000
@@ -23,6 +23,7 @@
 BUILDLINK_FILES.mjpegtools+=	lib/liblavjpeg.*
 BUILDLINK_FILES.mjpegtools+=	lib/liblavplay-1.6.*
 BUILDLINK_FILES.mjpegtools+=	lib/liblavplay.*
+BUILDLINK_FILES.mjpegtools+=	lib/libmjpegutils-1.6.*
 BUILDLINK_FILES.mjpegtools+=	lib/libmjpegutils.*
 BUILDLINK_FILES.mjpegtools+=	lib/pkgconfig/mjpegtools.pc
 
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/mjpegtools/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo	11 Mar 2004 13:17:03 -0000	1.2
+++ distinfo	27 Mar 2004 05:49:43 -0000
@@ -5,3 +5,6 @@
 SHA1 (patch-aa) = b47aaacdbe02a3254c1ff58213448d63b39e5a34
 SHA1 (patch-ab) = 392bc09ca0142fb1e435b219e598a70ae4bf258f
 SHA1 (patch-ac) = 0297beecec5947ae153b60a43891c9d373255af5
+SHA1 (patch-ad) = 6465e516556f6f87ea43c54cd4d4f39d2b02d09b
+SHA1 (patch-ae) = 996b2ca068a3c8996f20f8a5dc35c1240283a786
+SHA1 (patch-af) = d926d9ea74436b49b4b4c13c2a9cc20dd37c9d59

--n8g4imXOkfNTN/H1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-ad

--- utils/Makefile.am.orig	2003-12-21 02:33:38.000000000 +0900
+++ utils/Makefile.am	2004-03-27 14:38:18.000000000 +0900
@@ -15,16 +15,21 @@
 
 noinst_LTLIBRARIES = libmotion.la libcpuaccel.la
 
-# FIXME: make this libtool (but static-only!) too
-lib_LIBRARIES = libmjpegutils.a
+# transcode depends on a shared libmjpegutils
+lib_LTLIBRARIES = libmjpegutils.la
 
-libmjpegutils_a_SOURCES = \
+libmjpegutils_la_SOURCES = \
 	mjpeg_logging.c \
 	mpegconsts.c \
 	mpegtimecode.c \
 	yuv4mpeg.c \
 	yuv4mpeg_ratio.c
 
+libmjpegutils_la_LDFLAGS = \
+	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+	-release $(LT_RELEASE) \
+	-export-dynamic 
+
 noinst_HEADERS = \
 	attributes.h \
 	cpu_accel.h \

--n8g4imXOkfNTN/H1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-ae

--- autogen.sh.orig	2004-03-27 14:20:37.000000000 +0900
+++ autogen.sh	2004-03-27 14:20:41.000000000 +0900
@@ -54,16 +54,6 @@
   NO_AUTOMAKE=yes
 }
 
-automakevermin=`($automake --version|head -n 1|sed 's/^.* //;s/\./ /g;';echo "1 5")|sort -n|head -n 1`
-if test "x$automakevermin" != "x1 5"; then
-# version is less than 1.5, the minimum suitable version
-  echo
-  echo "You must have automake version 1.5 or greater installed."
-  echo "Download the appropriate package for your distribution,"
-  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
-  DIE=1
-fi
-
 # if no automake, don't bother testing for aclocal
 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
   echo

--n8g4imXOkfNTN/H1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-af

--- aenc/Makefile.am.orig	2004-03-27 14:27:10.000000000 +0900
+++ aenc/Makefile.am	2004-03-27 14:26:04.000000000 +0900
@@ -27,4 +27,4 @@
 	table_th.h \
 	wav_io.h
 
-mp2enc_LDADD = $(top_builddir)/utils/libmjpegutils.a $(LIBM_LIBS)
+mp2enc_LDADD = $(top_builddir)/utils/libmjpegutils.la $(LIBM_LIBS)
--- lavtools/Makefile.am.orig	2004-03-27 14:31:25.000000000 +0900
+++ lavtools/Makefile.am	2004-03-27 14:25:18.000000000 +0900
@@ -133,113 +133,113 @@
 	yuvcorrect.h
 
 ypipe_SOURCES = ypipe.c
-ypipe_LDADD = $(top_builddir)/utils/libmjpegutils.a
+ypipe_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 yuv2lav_SOURCES = yuv2lav.c
-yuv2lav_LDADD = $(top_builddir)/utils/libmjpegutils.a \
+yuv2lav_LDADD = $(top_builddir)/utils/libmjpegutils.la \
 		 liblavfile.la liblavjpeg.la ${LIBM_LIBS}
 
 transist_flt_SOURCES = transist.flt.c
-transist_flt_LDADD = $(top_builddir)/utils/libmjpegutils.a
+transist_flt_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 matteblend_flt_SOURCES = matteblend.flt.c
-matteblend_flt_LDADD = $(top_builddir)/utils/libmjpegutils.a
+matteblend_flt_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 multiblend_flt_SOURCES = multiblend.flt.c
-multiblend_flt_LDADD = $(top_builddir)/utils/libmjpegutils.a
+multiblend_flt_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 if HAVE_X
   LAVPLAY_X_LIBS = $(X_LIBS) -lX11
 endif
 
 lavplay_SOURCES = lavplay.c
-lavplay_LDADD = $(top_builddir)/utils/libmjpegutils.a \
+lavplay_LDADD = $(top_builddir)/utils/libmjpegutils.la \
 	liblavplay.la liblavjpeg.la liblavfile.la \
 	@LIBGETOPT_LIB@ ${PTHREAD_LIBS} ${SDL_LIBS} $(LAVPLAY_X_LIBS)
 
 lavrec_SOURCES = lavrec.c
-lavrec_LDADD = $(top_builddir)/utils/libmjpegutils.a \
+lavrec_LDADD = $(top_builddir)/utils/libmjpegutils.la \
 	liblavrec.la liblavfile.la liblavjpeg.la \
 	@LIBGETOPT_LIB@ $(PTHREAD_LIBS)
 
 testrec_SOURCES = testrec.c audiolib.c
-testrec_LDADD = $(PTHREAD_LIBS) $(top_builddir)/utils/libmjpegutils.a
+testrec_LDADD = $(PTHREAD_LIBS) $(top_builddir)/utils/libmjpegutils.la
 
 lav2yuv_SOURCES = lav2yuv.c lav_common.c
-lav2yuv_LDADD = $(top_builddir)/utils/libmjpegutils.a \
+lav2yuv_LDADD = $(top_builddir)/utils/libmjpegutils.la \
 		liblavfile.la liblavjpeg.la $(DV_LIBS)
 
 jpeg2yuv_SOURCES = jpeg2yuv.c
-jpeg2yuv_LDADD = $(top_builddir)/utils/libmjpegutils.a liblavjpeg.la
+jpeg2yuv_LDADD = $(top_builddir)/utils/libmjpegutils.la liblavjpeg.la
 
 png2yuv_SOURCES = png2yuv.c colorspace.c subsample.c
-png2yuv_LDADD = $(top_builddir)/utils/libmjpegutils.a -lpng -lz -lm
+png2yuv_LDADD = $(top_builddir)/utils/libmjpegutils.la -lpng -lz -lm
 
 lavpipe_SOURCES = lavpipe.c pipelist.c
-lavpipe_LDADD = $(top_builddir)/utils/libmjpegutils.a
+lavpipe_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 yuvmedianfilter_SOURCES = yuvmedianfilter.c
-yuvmedianfilter_LDADD = $(top_builddir)/utils/libmjpegutils.a
+yuvmedianfilter_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 lav2wav_SOURCES = lav2wav.c
-lav2wav_LDADD = $(top_builddir)/utils/libmjpegutils.a \
+lav2wav_LDADD = $(top_builddir)/utils/libmjpegutils.la \
 	 liblavfile.la
 
 lavtrans_SOURCES = lavtrans.c
-lavtrans_LDADD = $(top_builddir)/utils/libmjpegutils.a \
+lavtrans_LDADD = $(top_builddir)/utils/libmjpegutils.la \
 	 liblavfile.la
 
 lavaddwav_SOURCES = lavaddwav.c
-lavaddwav_LDADD = $(top_builddir)/utils/libmjpegutils.a \
+lavaddwav_LDADD = $(top_builddir)/utils/libmjpegutils.la \
 	 liblavfile.la
 
 glav_SOURCES = glav.c glav_main.c
-glav_LDADD = $(top_builddir)/utils/libmjpegutils.a ${GTK_LIBS}
+glav_LDADD = $(top_builddir)/utils/libmjpegutils.la ${GTK_LIBS}
 
 lavvideo_SOURCES = lavvideo.c frequencies.c
 
 yuvscaler_SOURCES = yuvscaler.c yuvscaler_resample.c yuvscaler_bicubic.c
-yuvscaler_LDADD = $(top_builddir)/utils/libmjpegutils.a $(LIBM_LIBS)
+yuvscaler_LDADD = $(top_builddir)/utils/libmjpegutils.la $(LIBM_LIBS)
 
 yuvcorrect_SOURCES = yuvcorrect.c yuvcorrect_functions.c
-yuvcorrect_LDADD = $(top_builddir)/utils/libmjpegutils.a $(LIBM_LIBS)
+yuvcorrect_LDADD = $(top_builddir)/utils/libmjpegutils.la $(LIBM_LIBS)
 
 yuvcorrect_tune_SOURCES = yuvcorrect_tune.c yuvcorrect_functions.c
-yuvcorrect_tune_LDADD = $(top_builddir)/utils/libmjpegutils.a $(LIBM_LIBS)
+yuvcorrect_tune_LDADD = $(top_builddir)/utils/libmjpegutils.la $(LIBM_LIBS)
 
 yuvplay_SOURCES = yuvplay.c
-yuvplay_LDADD = $(SDL_LIBS) $(PTHREAD_LIBS) $(top_builddir)/utils/libmjpegutils.a
+yuvplay_LDADD = $(SDL_LIBS) $(PTHREAD_LIBS) $(top_builddir)/utils/libmjpegutils.la
 
 ppmtoy4m_SOURCES = ppmtoy4m.c colorspace.c subsample.c
-ppmtoy4m_LDADD = $(top_builddir)/utils/libmjpegutils.a
+ppmtoy4m_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 pgmtoy4m_SOURCES = pgmtoy4m.c
-pgmtoy4m_LDADD = $(top_builddir)/utils/libmjpegutils.a
+pgmtoy4m_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 y4mtoppm_SOURCES = y4mtoppm.c colorspace.c subsample.c
-y4mtoppm_LDADD = $(top_builddir)/utils/libmjpegutils.a
+y4mtoppm_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 y4mcolorbars_SOURCES = y4mcolorbars.c colorspace.c subsample.c
-y4mcolorbars_LDADD = $(top_builddir)/utils/libmjpegutils.a
+y4mcolorbars_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 lavinfo_SOURCES = lavinfo.c
-lavinfo_LDADD = $(top_builddir)/utils/libmjpegutils.a \
+lavinfo_LDADD = $(top_builddir)/utils/libmjpegutils.la \
 	liblavfile.la
 
 y4mshift_SOURCES = y4mshift.c
-y4mshift_LDADD = $(top_builddir)/utils/libmjpegutils.a
+y4mshift_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 y4mblack_SOURCES = y4mblack.c
-y4mblack_LDADD = $(top_builddir)/utils/libmjpegutils.a
+y4mblack_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 y4mtoyuv_SOURCES = y4mtoyuv.c
-y4mtoyuv_LDADD = $(top_builddir)/utils/libmjpegutils.a
+y4mtoyuv_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 yuv4mpeg_SOURCES = yuv4mpeg.c
-yuv4mpeg_LDADD = $(top_builddir)/utils/libmjpegutils.a
+yuv4mpeg_LDADD = $(top_builddir)/utils/libmjpegutils.la
 
 yuvfps_SOURCES = yuvfps.c
-yuvfps_LDADD = ${top_builddir}/utils/libmjpegutils.a
+yuvfps_LDADD = ${top_builddir}/utils/libmjpegutils.la
 
 yuvinactive_SOURCES = yuvinactive.c
-yuvinactive_LDADD = ${top_builddir}/utils/libmjpegutils.a
+yuvinactive_LDADD = ${top_builddir}/utils/libmjpegutils.la
--- mplex/Makefile.am.orig	2004-03-27 14:27:10.000000000 +0900
+++ mplex/Makefile.am	2004-03-27 14:26:10.000000000 +0900
@@ -67,7 +67,7 @@
 	-export-dynamic 
 
 libmplex2_la_LIBADD = \
-	$(top_builddir)/utils/libmjpegutils.a
+	$(top_builddir)/utils/libmjpegutils.la
 
 libmplex2_la_CXXFLAGS = $(ZALPHA_FLAGS)
 
--- mpeg2enc/Makefile.am.orig	2004-03-27 14:27:10.000000000 +0900
+++ mpeg2enc/Makefile.am	2004-03-27 14:26:27.000000000 +0900
@@ -113,24 +113,24 @@
 	-export-dynamic 
 
 libmpeg2encpp_la_DEPENDENCIES = \
-	$(top_builddir)/utils/libmjpegutils.a \
+	$(top_builddir)/utils/libmjpegutils.la \
 	$(top_builddir)/utils/libcpuaccel.la \
 	$(top_builddir)/utils/libmotion.la \
 	$(LIBSIMDASM_LIB)
 
 libmpeg2encpp_la_LIBADD = \
-	$(top_builddir)/utils/libmjpegutils.a \
+	$(top_builddir)/utils/libmjpegutils.la \
 	$(top_builddir)/utils/libcpuaccel.la \
 	$(top_builddir)/utils/libmotion.la \
 	$(LIBSIMDASM_LIB)
 
 mpeg2enc_DEPENDENCIES = \
-	$(top_builddir)/utils/libmjpegutils.a \
+	$(top_builddir)/utils/libmjpegutils.la \
 	$(top_builddir)/mpeg2enc/libmpeg2encpp.la
 
 mpeg2enc_LDADD = \
 	$(top_builddir)/mpeg2enc/libmpeg2encpp.la \
-	$(top_builddir)/utils/libmjpegutils.a \
+	$(top_builddir)/utils/libmjpegutils.la \
 	@PTHREAD_LIBS@ @LIBGETOPT_LIB@ $(LIBM_LIBS)
 
 # VITAL: Override default compilation rules generated by automake...
--- yuvdenoise/Makefile.am.orig	2004-03-27 14:27:10.000000000 +0900
+++ yuvdenoise/Makefile.am	2004-03-27 14:26:32.000000000 +0900
@@ -25,5 +25,5 @@
 
 yuvdenoise_LDADD = \
 	$(top_builddir)/utils/libcpuaccel.la \
-	$(top_builddir)/utils/libmjpegutils.a \
+	$(top_builddir)/utils/libmjpegutils.la \
 	@LIBM_LIBS@
--- yuvfilters/Makefile.am.orig	2004-03-27 14:27:10.000000000 +0900
+++ yuvfilters/Makefile.am	2004-03-27 14:26:40.000000000 +0900
@@ -7,7 +7,7 @@
 noinst_LTLIBRARIES = libyuvfilters.la
 
 AM_CPPFLAGS = -I$(top_srcdir)/utils
-MJPEGLIB = $(top_builddir)/utils/libmjpegutils.a
+MJPEGLIB = $(top_builddir)/utils/libmjpegutils.la
 
 libyuvfilters_la_SOURCES = \
 	addtask.c \

--n8g4imXOkfNTN/H1--