diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2009-01-21 14:15:15 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2009-01-21 14:15:15 +0000 |
commit | 684be9f2d46c5b8d31b8198cb5cfee21df18e089 (patch) | |
tree | d5624799a32e0c8881217ec07f1126f35d05ffc0 | |
parent | 67fce398e525243ff52482ebfdd4b675f8558f63 (diff) | |
download | pkgsrc-684be9f2d46c5b8d31b8198cb5cfee21df18e089.tar.gz |
Import handbrake version 0.9.3.
HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video
transcoder, available for MacOS X, NetBSD, Linux and Windows.
Supported sources:
* Any DVD-like source: VIDEO_TS folder, DVD image or real DVD
(unencrypted--protection methods including CSS are not supported internally
and must be handled externally with third-party software and libraries),
and some .VOB and .TS files
* Most any multimedia file it can get libavformat to read and libavcodec to
decode.
Outputs:
* File format: MP4, MKV, AVI or OGM
* Video: MPEG-4, H.264, or Theora (1 or 2 passes or constant quantizer/rate
encoding)
* Audio: AAC, MP3, Vorbis or AC-3 pass-through (supports encoding of several
audio tracks)
Misc features:
* Chapter selection
* Basic subtitle support (burned into the picture)
* Integrated bitrate calculator
* Picture deinterlacing, cropping and scaling
* Grayscale encoding
-rw-r--r-- | multimedia/handbrake/DESCR | 24 | ||||
-rw-r--r-- | multimedia/handbrake/Makefile | 79 | ||||
-rw-r--r-- | multimedia/handbrake/PLIST | 15 | ||||
-rw-r--r-- | multimedia/handbrake/distinfo | 75 | ||||
-rw-r--r-- | multimedia/handbrake/files/patch-ffmpeg-nodocs.patch | 13 | ||||
-rw-r--r-- | multimedia/handbrake/patches/patch-aa | 29 | ||||
-rw-r--r-- | multimedia/handbrake/patches/patch-ab | 36 | ||||
-rw-r--r-- | multimedia/handbrake/patches/patch-ac | 33 | ||||
-rw-r--r-- | multimedia/handbrake/patches/patch-ad | 23 | ||||
-rw-r--r-- | multimedia/handbrake/patches/patch-ae | 13 | ||||
-rw-r--r-- | multimedia/handbrake/patches/patch-af | 38 | ||||
-rw-r--r-- | multimedia/handbrake/patches/patch-ag | 13 | ||||
-rw-r--r-- | multimedia/handbrake/patches/patch-ah | 16 | ||||
-rw-r--r-- | multimedia/handbrake/patches/patch-ai | 49 | ||||
-rw-r--r-- | multimedia/handbrake/patches/patch-aj | 38 |
15 files changed, 494 insertions, 0 deletions
diff --git a/multimedia/handbrake/DESCR b/multimedia/handbrake/DESCR new file mode 100644 index 00000000000..50401fd9fa9 --- /dev/null +++ b/multimedia/handbrake/DESCR @@ -0,0 +1,24 @@ +HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video +transcoder, available for MacOS X, NetBSD, Linux and Windows. + +Supported sources: + * Any DVD-like source: VIDEO_TS folder, DVD image or real DVD + (unencrypted--protection methods including CSS are not supported internally + and must be handled externally with third-party software and libraries), + and some .VOB and .TS files + * Most any multimedia file it can get libavformat to read and libavcodec to + decode. + +Outputs: + * File format: MP4, MKV, AVI or OGM + * Video: MPEG-4, H.264, or Theora (1 or 2 passes or constant quantizer/rate + encoding) + * Audio: AAC, MP3, Vorbis or AC-3 pass-through (supports encoding of several + audio tracks) + +Misc features: + * Chapter selection + * Basic subtitle support (burned into the picture) + * Integrated bitrate calculator + * Picture deinterlacing, cropping and scaling + * Grayscale encoding diff --git a/multimedia/handbrake/Makefile b/multimedia/handbrake/Makefile new file mode 100644 index 00000000000..65cb7474134 --- /dev/null +++ b/multimedia/handbrake/Makefile @@ -0,0 +1,79 @@ +# $NetBSD: Makefile,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ +# + +DISTNAME= HandBrake-0.9.3 +PKGNAME= ${DISTNAME:S/HandBrake/handbrake/} +CATEGORIES= multimedia +MASTER_SITES= http://download.m0k.org/handbrake/releases/ \ + http://download.m0k.org/handbrake/contrib/ + +DIST_SUBDIR= handbrake +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} +CDISTFILES= a52dec-0.7.4.tar.gz \ + bzip2-1.0.5.tar.gz \ + faac-1.26.tar.gz \ + faad2-2.6.1.tar.gz \ + ffmpeg-r15462.tar.gz \ + lame-3.98.tar.gz \ + libdca-r81-strapped.tar.gz \ + libdvdread-0.9.7.tar.gz \ + libmkv-0.6.3.tar.gz \ + libmp4v2-r45.tar.gz \ + libogg-1.1.3.tar.gz \ + libsamplerate-0.1.4.tar.gz \ + libtheora-1.0.tar.gz \ + libvorbis-aotuv_b5.tar.gz \ + mpeg2dec-0.5.1.tar.gz \ + mpeg4ip-1.3.tar.gz \ + libquicktime-0.9.10.tar.gz \ + x264-r1028-83baa7f.tar.gz \ + xvidcore-1.1.3.tar.gz \ + zlib-1.2.3.tar.gz +DISTFILES+= ${CDISTFILES} + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://handbrake.fr/ +COMMENT= Multiplatform, multithreaded video transcoder + +PKG_DESTDIR_SUPPORT= user-destdir + +GNU_CONFIGURE= yes +USE_DIRS+= xdg-1.4 +USE_TOOLS+= gmake perl intltool msgfmt pkg-config +USE_TOOLS+= autoconf automake aclocal autoreconf m4 +USE_LIBTOOL= yes +USE_LANGUAGES= c c++ + +BUILD_DEPENDS+= jam>=2.5.2:../../devel/jam +BUILD_DEPENDS+= nasm>=2.05.01:../../devel/nasm + +CLI_CONFIGURE_ARGS= --release + +post-extract: + cp ${FILESDIR}/patch-ffmpeg-nodocs.patch \ + ${WRKSRC}/contrib/ +.for distfile in ${CDISTFILES} + cp ${DISTDIR}/${DIST_SUBDIR}/${distfile} \ + ${WRKSRC}/contrib/${distfile:C/-.*//}.tar.gz +.endfor + +pre-configure: + cd ${WRKSRC}/gtk && ./autogen.sh + +do-configure: + cd ${WRKSRC} && ./configure ${CLI_CONFIGURE_ARGS} + cd ${WRKSRC}/gtk && ./configure ${CONFIGURE_ARGS} + +do-build: + cd ${WRKSRC} && gmake + cd ${WRKSRC}/gtk && gmake + +do-install: + cd ${WRKSRC}/gtk && gmake install DESTDIR=${DESTDIR} + +.include "../../graphics/hicolor-icon-theme/buildlink3.mk" +.include "../../sysutils/hal/buildlink3.mk" +.include "../../www/gtkhtml314/buildlink3.mk" +.include "../../x11/gtk2/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/multimedia/handbrake/PLIST b/multimedia/handbrake/PLIST new file mode 100644 index 00000000000..438da094dfd --- /dev/null +++ b/multimedia/handbrake/PLIST @@ -0,0 +1,15 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ +bin/HandBrakeCLI +bin/ghb +share/applications/ghb.desktop +share/doc/ghb/AUTHORS +share/doc/ghb/COPYING +share/doc/ghb/ChangeLog +share/doc/ghb/INSTALL +share/doc/ghb/NEWS +share/doc/ghb/README +share/icons/hicolor/128x128/apps/hb-icon.png +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor/128x128/apps +@comment in hicolor-icon-theme: @dirrm share/icons/hicolor +@dirrm share/doc/ghb +@comment in xdg-dirs: @dirrm share/applications diff --git a/multimedia/handbrake/distinfo b/multimedia/handbrake/distinfo new file mode 100644 index 00000000000..c5d7dc25e3f --- /dev/null +++ b/multimedia/handbrake/distinfo @@ -0,0 +1,75 @@ +$NetBSD: distinfo,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +SHA1 (handbrake/HandBrake-0.9.3.tar.gz) = f52389b1226bf81ba58bca67f3a1aa468cfee624 +RMD160 (handbrake/HandBrake-0.9.3.tar.gz) = 50085816875439ee82bc213252f683352bbdbbb0 +Size (handbrake/HandBrake-0.9.3.tar.gz) = 2067663 bytes +SHA1 (handbrake/a52dec-0.7.4.tar.gz) = 7c406b9b5351cdec56279b6d02f3f556711424d2 +RMD160 (handbrake/a52dec-0.7.4.tar.gz) = 5f8ff682a43ffdafdb88a4231bfa64bb40f138d8 +Size (handbrake/a52dec-0.7.4.tar.gz) = 242978 bytes +SHA1 (handbrake/bzip2-1.0.5.tar.gz) = c3c8fe717135d40765b2e5f5b64abb89c6c477fc +RMD160 (handbrake/bzip2-1.0.5.tar.gz) = 8ad29eed3a162a4b801b22f6fa44652907b74df1 +Size (handbrake/bzip2-1.0.5.tar.gz) = 848730 bytes +SHA1 (handbrake/faac-1.26.tar.gz) = 5aad6d5a60107a5d6bf79654970168f498961b21 +RMD160 (handbrake/faac-1.26.tar.gz) = 40656b7b1a7c207373d7a1ba0167f220d9073ecd +Size (handbrake/faac-1.26.tar.gz) = 400915 bytes +SHA1 (handbrake/faad2-2.6.1.tar.gz) = e2432e3e9c0a69982fd507c44002e53b85a3d155 +RMD160 (handbrake/faad2-2.6.1.tar.gz) = 0bb2b25e4a570f7c3f7e7bcf92525091c57b2592 +Size (handbrake/faad2-2.6.1.tar.gz) = 849708 bytes +SHA1 (handbrake/ffmpeg-r15462.tar.gz) = 1a0342bcb9b881c2e1d9f7229388d6f189c9d4e0 +RMD160 (handbrake/ffmpeg-r15462.tar.gz) = e275c802a7b512a43db7a74e6cd2a2dd5eea350b +Size (handbrake/ffmpeg-r15462.tar.gz) = 3154052 bytes +SHA1 (handbrake/lame-3.98.tar.gz) = 2908edcf0628512c407aadad317866826c6df5c7 +RMD160 (handbrake/lame-3.98.tar.gz) = c10c20128622e16f9cac3d346bea8e390e4bfdc5 +Size (handbrake/lame-3.98.tar.gz) = 1411318 bytes +SHA1 (handbrake/libdca-r81-strapped.tar.gz) = aace1f940184fad9ec033de48f7d1efc3d0c0ffa +RMD160 (handbrake/libdca-r81-strapped.tar.gz) = f8af6ac0df89e221d0b95caf68ee3aa3904ab178 +Size (handbrake/libdca-r81-strapped.tar.gz) = 523282 bytes +SHA1 (handbrake/libdvdread-0.9.7.tar.gz) = f2da77542fc302770e0eb55c32919e1387f82049 +RMD160 (handbrake/libdvdread-0.9.7.tar.gz) = 6c866b23a014941d19fb0c2be8bfe408b4443fda +Size (handbrake/libdvdread-0.9.7.tar.gz) = 388570 bytes +SHA1 (handbrake/libmkv-0.6.3.tar.gz) = c57ceb52a1cb358716d6d57d22321a2a68ba3e79 +RMD160 (handbrake/libmkv-0.6.3.tar.gz) = 7540d78adefcf5868cd709a5ec007cca4f390fa4 +Size (handbrake/libmkv-0.6.3.tar.gz) = 341121 bytes +SHA1 (handbrake/libmp4v2-r45.tar.gz) = 4643f6eab2419630e2be12c1391b714f3bf00ffb +RMD160 (handbrake/libmp4v2-r45.tar.gz) = d28ebb1551e3b93f2f164bb1733f48935acc3475 +Size (handbrake/libmp4v2-r45.tar.gz) = 461723 bytes +SHA1 (handbrake/libogg-1.1.3.tar.gz) = 9ce317cfe225e121deee68cd81db39f15b602caa +RMD160 (handbrake/libogg-1.1.3.tar.gz) = fba18455f80b738239ccdd0fc19d518243140cce +Size (handbrake/libogg-1.1.3.tar.gz) = 401303 bytes +SHA1 (handbrake/libquicktime-0.9.10.tar.gz) = 65972ed260c05b26a9892bb4789306ebf30e65bc +RMD160 (handbrake/libquicktime-0.9.10.tar.gz) = b5a4629b3074cd38e45a0e6d8588350b8ea50c09 +Size (handbrake/libquicktime-0.9.10.tar.gz) = 841524 bytes +SHA1 (handbrake/libsamplerate-0.1.4.tar.gz) = d6974129497ba141d43c36826a23deb6c0b3e5d8 +RMD160 (handbrake/libsamplerate-0.1.4.tar.gz) = b2ac47d592702a410d5524e1550251c0e75f1879 +Size (handbrake/libsamplerate-0.1.4.tar.gz) = 4259244 bytes +SHA1 (handbrake/libtheora-1.0.tar.gz) = a04eb62ca79c3b0de11975ae4de3a39dc3545f03 +RMD160 (handbrake/libtheora-1.0.tar.gz) = 2f3ff2d0b55e89d55c2779d07f551b9091236919 +Size (handbrake/libtheora-1.0.tar.gz) = 1946620 bytes +SHA1 (handbrake/libvorbis-aotuv_b5.tar.gz) = ec446e9d2c480210ec8c5a02e479e52336450e3d +RMD160 (handbrake/libvorbis-aotuv_b5.tar.gz) = 3c8cf3f1415cbbd037ec149427fda23e8a6dbe52 +Size (handbrake/libvorbis-aotuv_b5.tar.gz) = 1345888 bytes +SHA1 (handbrake/mpeg2dec-0.5.1.tar.gz) = c39a95d18e133cd81e890fd7672f592ed41fadfc +RMD160 (handbrake/mpeg2dec-0.5.1.tar.gz) = 3986798a30b33e689b1d7c5390380c13b74f8c76 +Size (handbrake/mpeg2dec-0.5.1.tar.gz) = 522405 bytes +SHA1 (handbrake/mpeg4ip-1.3.tar.gz) = 3c5987f51d0bbd49775b45f667cf46a628c4f87a +RMD160 (handbrake/mpeg4ip-1.3.tar.gz) = 4f966d8e4d4de1679e785f92c1c480b14617cb69 +Size (handbrake/mpeg4ip-1.3.tar.gz) = 4719855 bytes +SHA1 (handbrake/x264-r1028-83baa7f.tar.gz) = 9b03dd54adccc7e94278d6d182506d49aef93439 +RMD160 (handbrake/x264-r1028-83baa7f.tar.gz) = ee19fd51074a28ffd8b597542ea2cc258926aebc +Size (handbrake/x264-r1028-83baa7f.tar.gz) = 2325933 bytes +SHA1 (handbrake/xvidcore-1.1.3.tar.gz) = 83f73502462b0893eca9a56da9ee0cb6a118d7cb +RMD160 (handbrake/xvidcore-1.1.3.tar.gz) = 63885af712fa2afae6cb5ac0117e7d23b04aa70c +Size (handbrake/xvidcore-1.1.3.tar.gz) = 739835 bytes +SHA1 (handbrake/zlib-1.2.3.tar.gz) = db9f8380cd0652b5b8e75e43bcf7c4a4431df9f8 +RMD160 (handbrake/zlib-1.2.3.tar.gz) = 292c1bc8d80040bf446bc6ca59341cf50d64dca2 +Size (handbrake/zlib-1.2.3.tar.gz) = 502411 bytes +SHA1 (patch-aa) = 03362c540efc30c28ecb5f31f583883795b89b9e +SHA1 (patch-ab) = 9122a96f4f2aa847c7cd0f23aae3d883d00f8967 +SHA1 (patch-ac) = e2d1e35ec81bfb290bcb402cd163f6bcf582c8cd +SHA1 (patch-ad) = 4059de9d2242f13f9fb5f00e9bddca744796f2d1 +SHA1 (patch-ae) = cace5dc913f68a6d16bcedc21f456d90cc8c3ff5 +SHA1 (patch-af) = 51de27bfa474bf134f97e105ef5fb8b7c0b14862 +SHA1 (patch-ag) = 5b8d90b34a2302c54354c6b9742778658c5024c8 +SHA1 (patch-ah) = c6c050245b990429751c6fe243fb488028253af4 +SHA1 (patch-ai) = d1a77b07ca338f522f7eaec3c2a4a71dacd61268 +SHA1 (patch-aj) = 3855b048017581adac91c8a4d146d41a27840486 diff --git a/multimedia/handbrake/files/patch-ffmpeg-nodocs.patch b/multimedia/handbrake/files/patch-ffmpeg-nodocs.patch new file mode 100644 index 00000000000..7a9e9146996 --- /dev/null +++ b/multimedia/handbrake/files/patch-ffmpeg-nodocs.patch @@ -0,0 +1,13 @@ +$NetBSD: patch-ffmpeg-nodocs.patch,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- configure.orig 2009-01-20 20:56:24.000000000 -0500 ++++ configure 2008-09-28 19:29:23.000000000 -0400 +@@ -1784,7 +1784,7 @@ + restore_flags + fi + +-texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html ++disable texi2html + + ########################################## + # Network check diff --git a/multimedia/handbrake/patches/patch-aa b/multimedia/handbrake/patches/patch-aa new file mode 100644 index 00000000000..58e5abd71a2 --- /dev/null +++ b/multimedia/handbrake/patches/patch-aa @@ -0,0 +1,29 @@ +$NetBSD: patch-aa,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- Makefile.orig 2008-11-21 15:54:03.000000000 -0500 ++++ Makefile +@@ -1,6 +1,12 @@ + include Makefile.config + + SYSTEM = $(shell uname -s) ++ifeq ($(SYSTEM),Linux) ++ SYSTEM = UNIX ++endif ++ifeq ($(SYSTEM),NetBSD) ++ SYSTEM = UNIX ++endif + + # Special case for Mac OS X: everything is handled from the Xcode project + +@@ -65,9 +71,9 @@ cli-snapshot-release: + endif + + # +-# Linux ++# UNIX + # +-ifeq ($(SYSTEM),Linux) ++ifeq ($(SYSTEM),UNIX) + + snapshot: unstable-libhb/hbversion.h all + diff --git a/multimedia/handbrake/patches/patch-ab b/multimedia/handbrake/patches/patch-ab new file mode 100644 index 00000000000..b6aa5f2d235 --- /dev/null +++ b/multimedia/handbrake/patches/patch-ab @@ -0,0 +1,36 @@ +$NetBSD: patch-ab,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- contrib/Makefile.orig 2008-06-17 18:32:05.000000000 -0400 ++++ contrib/Makefile +@@ -1,6 +1,13 @@ + # Contrib Makefile + + SYSTEM = $(shell uname -s) ++ifeq ($(SYSTEM),Linux) ++ SYSTEM = UNIX ++endif ++ifeq ($(SYSTEM),NetBSD) ++ SYSTEM = UNIX ++endif ++ + + # Special case for Mac OS X: everything is handled from the Xcode project + ifeq ($(SYSTEM),Darwin) +@@ -8,7 +15,7 @@ ifeq ($(SYSTEM),Darwin) + all: .contrib + + .contrib: +- ( cd .. ; ./configure ; cd contrib ; cp -f ../config.jam . ; ../jam ) ++ ( cd .. ; ./configure ; cd contrib ; cp -f ../config.jam . ; ../jam -q ) + + clean: + ( echo "Do a make mrproper to remove the contrib libraries ) +@@ -18,7 +25,7 @@ mrproper: + + endif + +-ifeq ($(SYSTEM),Linux) ++ifeq ($(SYSTEM),UNIX) + + all: .contrib + diff --git a/multimedia/handbrake/patches/patch-ac b/multimedia/handbrake/patches/patch-ac new file mode 100644 index 00000000000..64f11c43661 --- /dev/null +++ b/multimedia/handbrake/patches/patch-ac @@ -0,0 +1,33 @@ +$NetBSD: patch-ac,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- configure.orig 2008-09-30 15:17:10.000000000 -0400 ++++ configure +@@ -5,7 +5,7 @@ CXX="g++" + CCFLAGS="$CCFLAGS -Wall -g" + OPTIM="$OPTIM -O3 -funroll-loops" + LINKLIBS="-lz -lbz2" +-MAKE=make ++MAKE=gmake + + # System-specific flags + SYSTEM=`uname -s` +@@ -85,19 +85,6 @@ else + fi + rm -f testconf.c testconf + +-# +-# Use Gnu make when available over the built in make +-# +-if ( make --version | grep GNU ) > /dev/null 2>&1 +-then +-MAKE=make +-elif ( gmake --version | grep GNU ) > /dev/null 2>&1 +-then +-MAKE=gmake +-else +-MAKE=make +-fi +- + # Unless the user wants a release build, configure for SVN snapshots + if test "$1" = "--release" || test "$2" = "--release"; then + SNAPSHOT=0 diff --git a/multimedia/handbrake/patches/patch-ad b/multimedia/handbrake/patches/patch-ad new file mode 100644 index 00000000000..2179e84e9fe --- /dev/null +++ b/multimedia/handbrake/patches/patch-ad @@ -0,0 +1,23 @@ +$NetBSD: patch-ad,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- contrib/Jamfile.orig 2008-10-27 19:29:19.000000000 -0400 ++++ contrib/Jamfile +@@ -80,6 +80,7 @@ rule LibAvCodec + FFMPEG_PATCH = "$(PATCH) -p0 < ../patch-ffmpeg.patch" ; + FFMPEG_PATCH += " && $(PATCH) -p0 < ../patch-ffmpeg-latm.patch " ; + FFMPEG_PATCH += " && $(PATCH) -p0 < ../patch-ffmpeg-mpegleak.patch " ; ++ FFMPEG_PATCH += " && $(PATCH) -p0 < ../patch-ffmpeg-nodocs.patch " ; + if $(OS) = CYGWIN + { + FFMPEG_PATCH += " && $(PATCH) -p1 < ../patch-ffmpeg-cygwin.patch " ; +@@ -98,6 +99,10 @@ rule LibAvCodec + # + FFMPEG_EXTRA_OPTIONS = "--disable-vis --disable-demuxer=mpc8 --disable-vhook --disable-network" ; + } ++ else ++ { ++ FFMPEG_EXTRA_OPTIONS = "--enable-memalign-hack --disable-devices" ; ++ } + + Depends $(<) : $(>) ; + Depends lib : $(<) ; diff --git a/multimedia/handbrake/patches/patch-ae b/multimedia/handbrake/patches/patch-ae new file mode 100644 index 00000000000..779091e24b7 --- /dev/null +++ b/multimedia/handbrake/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- libhb/fifo.c.orig 2009-01-20 20:53:21.000000000 -0500 ++++ libhb/fifo.c +@@ -147,7 +147,7 @@ hb_buffer_t * hb_buffer_init( int size ) + + if (size) + { +-#if defined( SYS_DARWIN ) || defined( SYS_FREEBSD ) ++#if defined( SYS_DARWIN ) || defined( SYS_FREEBSD ) || defined( SYS_NETBSD ) + b->data = malloc( b->alloc ); + #elif defined( SYS_CYGWIN ) + /* FIXME */ diff --git a/multimedia/handbrake/patches/patch-af b/multimedia/handbrake/patches/patch-af new file mode 100644 index 00000000000..c413d2c3730 --- /dev/null +++ b/multimedia/handbrake/patches/patch-af @@ -0,0 +1,38 @@ +$NetBSD: patch-af,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- libhb/ports.c.orig 2008-10-09 20:41:15.000000000 -0400 ++++ libhb/ports.c 2009-01-21 08:57:58.000000000 -0500 +@@ -16,6 +16,11 @@ + #include <sys/processor.h> + #endif + ++#if defined( SYS_NETBSD ) ++#include <sys/param.h> ++#include <sys/sysctl.h> ++#endif ++ + #if USE_PTHREAD + #include <pthread.h> + #endif +@@ -76,7 +81,7 @@ void hb_snooze( int delay ) + } + #if defined( SYS_BEOS ) + snooze( 1000 * delay ); +-#elif defined( SYS_DARWIN ) || defined( SYS_LINUX ) || defined( SYS_FREEBSD) || defined( SYS_SunOS ) ++#elif defined( SYS_DARWIN ) || defined( SYS_LINUX ) || defined( SYS_FREEBSD) || defined( SYS_SunOS ) || defined( SYS_NETBSD ) + usleep( 1000 * delay ); + #elif defined( SYS_CYGWIN ) + Sleep( delay ); +@@ -124,6 +129,12 @@ int hb_get_cpu_count() + fclose( info ); + } + ++#elif defined( SYS_NETBSD ) ++ size_t oldlen = sizeof( cpu_count ); ++ ++ if ( sysctlbyname( "hw.ncpu", &cpu_count, &oldlen, NULL, 0 ) != 0 ) ++ cpu_count = 1; ++ + #elif defined( SYS_LINUX ) + { + FILE * info; diff --git a/multimedia/handbrake/patches/patch-ag b/multimedia/handbrake/patches/patch-ag new file mode 100644 index 00000000000..c528576bb30 --- /dev/null +++ b/multimedia/handbrake/patches/patch-ag @@ -0,0 +1,13 @@ +$NetBSD: patch-ag,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- libhb/ports.h.orig 2009-01-20 20:52:23.000000000 -0500 ++++ libhb/ports.h +@@ -37,7 +37,7 @@ typedef struct hb_thread_s hb_thread_t; + #elif defined( SYS_DARWIN ) + # define HB_LOW_PRIORITY 0 + # define HB_NORMAL_PRIORITY 31 +-#elif defined( SYS_LINUX ) || defined( SYS_FREEBSD ) || defined ( SYS_SunOS ) ++#elif defined( SYS_LINUX ) || defined( SYS_FREEBSD ) || defined ( SYS_SunOS ) || defined( SYS_NETBSD ) + # define HB_LOW_PRIORITY 0 + # define HB_NORMAL_PRIORITY 0 + #elif defined( SYS_CYGWIN ) diff --git a/multimedia/handbrake/patches/patch-ah b/multimedia/handbrake/patches/patch-ah new file mode 100644 index 00000000000..e2f06c74989 --- /dev/null +++ b/multimedia/handbrake/patches/patch-ah @@ -0,0 +1,16 @@ +$NetBSD: patch-ah,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- test/Makefile.orig 2009-01-20 21:27:22.000000000 -0500 ++++ test/Makefile 2009-01-20 21:27:40.000000000 -0500 +@@ -15,7 +15,11 @@ ifeq ($(findstring CYGWIN_NT,$(SYSTEM)), + LIBS2 += $(CYGLIBS:%=../contrib/lib/libz.a) $(CYGLIBS:%=../contrib/lib/libbz2.a) + endif + ++ifeq ($(SYSTEM),NetBSD) ++LDFLAGS += $(LIBS2) -lbz2 ++else + LDFLAGS += $(LIBS2) -lbz2 -ldl ++endif + + ../HandBrakeCLI: test.c parsecsv.c $(LIBS2) + @CMD="$(CC) $(CFLAGS) -o test.o -c test.c"; $$CMD || \ diff --git a/multimedia/handbrake/patches/patch-ai b/multimedia/handbrake/patches/patch-ai new file mode 100644 index 00000000000..d90bb6bc3da --- /dev/null +++ b/multimedia/handbrake/patches/patch-ai @@ -0,0 +1,49 @@ +$NetBSD: patch-ai,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- gtk/src/main.c.orig 2009-01-20 21:29:05.000000000 -0500 ++++ gtk/src/main.c 2009-01-20 21:39:06.000000000 -0500 +@@ -429,8 +429,13 @@ IoRedirect(signal_user_data_t *ud) + g_free(config); + // Set encoding to raw. + g_io_channel_set_encoding (ud->activity_log, NULL, NULL); ++#ifdef __NetBSD__ ++ stderr->_file = pfd[1]; ++ stdin->_file = pfd[0]; ++#else + stderr->_fileno = pfd[1]; + stdin->_fileno = pfd[0]; ++#endif + channel = g_io_channel_unix_new (pfd[0]); + // I was getting an this error: + // "Invalid byte sequence in conversion input" +@@ -457,7 +462,6 @@ static GOptionEntry entries[] = + { NULL } + }; + +-#if defined(__linux__) + void drive_changed_cb(GVolumeMonitor *gvm, GDrive *gd, signal_user_data_t *ud); + //void drive_disconnected_cb(GnomeVFSVolumeMonitor *gvm, GnomeVFSDrive *gd, signal_user_data_t *ud); + +@@ -470,12 +474,6 @@ watch_volumes(signal_user_data_t *ud) + g_signal_connect(gvm, "drive-changed", (GCallback)drive_changed_cb, ud); + //g_signal_connect(gvm, "drive-connected", (GCallback)drive_connected_cb, ud); + } +-#else +-void +-watch_volumes(signal_user_data_t *ud) +-{ +-} +-#endif + + // Hack to avoid a segfault in libavcodec + extern int mm_flags; +@@ -511,9 +509,7 @@ main (int argc, char *argv[]) + ghb_resource_init(); + ghb_load_icons(); + +-#if defined(__linux__) + ghb_hal_init(); +-#endif + + ud = g_malloc0(sizeof(signal_user_data_t)); + ud->debug = ghb_debug; diff --git a/multimedia/handbrake/patches/patch-aj b/multimedia/handbrake/patches/patch-aj new file mode 100644 index 00000000000..2f437434757 --- /dev/null +++ b/multimedia/handbrake/patches/patch-aj @@ -0,0 +1,38 @@ +$NetBSD: patch-aj,v 1.1.1.1 2009/01/21 14:15:15 jmcneill Exp $ + +--- gtk/src/ghb-dvd.c.orig 2009-01-20 21:34:27.000000000 -0500 ++++ gtk/src/ghb-dvd.c 2009-01-20 21:34:56.000000000 -0500 +@@ -315,7 +315,6 @@ ghb_dvd_volname(const gchar *device) + } + #endif + +-#if defined(__linux__) + gchar* + ghb_resolve_symlink(const gchar *name) + { +@@ -359,12 +358,10 @@ ghb_resolve_symlink(const gchar *name) + g_object_unref(gfile); + return file; + } +-#endif + + void + ghb_dvd_set_current(const gchar *name, signal_user_data_t *ud) + { +-#if defined(__linux__) + GFile *gfile; + GFileInfo *info; + gchar *resolved = ghb_resolve_symlink(name); +@@ -394,12 +391,4 @@ ghb_dvd_set_current(const gchar *name, s + g_free(resolved); + } + g_object_unref(gfile); +-#else +- if (ud->current_dvd_device != NULL) +- { +- g_free(ud->current_dvd_device); +- ud->current_dvd_device = NULL; +- } +- ud->current_dvd_device = g_strdup(name);; +-#endif + } |