summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/fontconfig/A00-mingw-disableShared.patch73
-rw-r--r--contrib/fontconfig/module.defs71
-rw-r--r--contrib/fontconfig/module.rules2
-rw-r--r--contrib/freetype/module.defs5
-rw-r--r--contrib/freetype/module.rules2
-rw-r--r--contrib/libass/A00-configure.patch84
-rw-r--r--contrib/libass/module.defs15
-rw-r--r--contrib/libass/module.rules2
-rw-r--r--contrib/libxml2/module.defs10
-rw-r--r--contrib/libxml2/module.rules2
-rw-r--r--contrib/mp4v2/module.defs7
11 files changed, 268 insertions, 5 deletions
diff --git a/contrib/fontconfig/A00-mingw-disableShared.patch b/contrib/fontconfig/A00-mingw-disableShared.patch
new file mode 100644
index 000000000..1fd7474b1
--- /dev/null
+++ b/contrib/fontconfig/A00-mingw-disableShared.patch
@@ -0,0 +1,73 @@
+--- fontconfig-2.8.0/configure 2009-11-18 15:49:41.000000000 -0800
++++ fontconfig-2.8.0/configure 2010-09-09 21:23:24.000000000 -0700
+@@ -825,6 +825,8 @@
+ ms_librarian
+ OS_WIN32_FALSE
+ OS_WIN32_TRUE
++OS_WIN32_ENABLE_SHARED_TRUE
++OS_WIN32_ENABLE_SHARED_FALSE
+ LTCXXCOMPILE
+ LTCOMPILE
+ DOLT_BASH
+@@ -11782,6 +11784,14 @@
+ OS_WIN32_FALSE=
+ fi
+
++ if test "$os_win32-$enable_shared" = "yes-yes"; then
++ OS_WIN32_ENABLE_SHARED_TRUE=
++ OS_WIN32_ENABLE_SHARED_FALSE='#'
++else
++ OS_WIN32_ENABLE_SHARED_TRUE='#'
++ OS_WIN32_ENABLE_SHARED_FALSE=
++fi
++
+
+ if test "$os_win32" = "yes"; then
+ # Extract the first word of "lib.exe", so it can be a program name with args.
+@@ -15155,6 +15165,13 @@
+ Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
++if test -z "${OS_WIN32_ENABLE_SHARED_TRUE}" && test -z "${OS_WIN32_ENABLE_SHARED_FALSE}"; then
++ { { echo "$as_me:$LINENO: error: conditional \"OS_WIN32_ENABLE_SHARED\" was never defined.
++Usually this means the macro was only invoked conditionally." >&5
++echo "$as_me: error: conditional \"OS_WIN32_ENABLE_SHARED\" was never defined.
++Usually this means the macro was only invoked conditionally." >&2;}
++ { (exit 1); exit 1; }; }
++fi
+ if test -z "${MS_LIB_AVAILABLE_TRUE}" && test -z "${MS_LIB_AVAILABLE_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"MS_LIB_AVAILABLE\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+--- fontconfig-2.8.0/configure.in 2009-11-18 15:49:23.000000000 -0800
++++ fontconfig-2.8.0/configure.in 2010-09-09 21:11:37.000000000 -0700
+@@ -76,6 +76,7 @@
+ os_win32=no
+ esac
+ AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
++AM_CONDITIONAL(OS_WIN32_ENABLE_SHARED, test "$os_win32-$enable_shared" = "yes-yes")
+
+ if test "$os_win32" = "yes"; then
+ AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
+--- fontconfig-2.8.0/src/Makefile.am 2010-09-09 21:12:43.000000000 -0700
++++ fontconfig-2.8.0/src/Makefile.am 2010-09-09 21:13:07.000000000 -0700
+@@ -30,7 +30,9 @@
+ # gcc import library install/uninstall
+
+ install-libtool-import-lib:
++if OS_WIN32_ENABLE_SHARED
+ $(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)
++endif
+ $(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def
+
+ uninstall-libtool-import-lib:
+--- fontconfig-2.8.0/src/Makefile.in 2009-11-18 15:49:39.000000000 -0800
++++ fontconfig-2.8.0/src/Makefile.in 2010-09-09 21:14:38.000000000 -0700
+@@ -688,7 +688,7 @@
+ # gcc import library install/uninstall
+
+ @OS_WIN32_TRUE@install-libtool-import-lib:
+-@OS_WIN32_TRUE@ $(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)
++@OS_WIN32_ENABLE_SHARED_TRUE@@OS_WIN32_TRUE@ $(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)
+ @OS_WIN32_TRUE@ $(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def
+
+ @OS_WIN32_TRUE@uninstall-libtool-import-lib:
diff --git a/contrib/fontconfig/module.defs b/contrib/fontconfig/module.defs
new file mode 100644
index 000000000..ce96c8235
--- /dev/null
+++ b/contrib/fontconfig/module.defs
@@ -0,0 +1,71 @@
+__deps__ := FREETYPE LIBXML2
+$(eval $(call import.MODULE.defs,FONTCONFIG,fontconfig,$(__deps__)))
+$(eval $(call import.CONTRIB.defs,FONTCONFIG))
+
+FONTCONFIG.FETCH.url = http://download.m0k.org/handbrake/contrib/fontconfig-2.8.0.tar.gz
+FONTCONFIG.EXTRACT.tarbase = fontconfig-2.8.0
+
+#
+# Under MinGW:
+#
+# - A 'i386-ming32-gcc' $(FONTCONFIG.GCC.gcc) command will be available,
+# and the '-arch <arch>' argument should be omitted, as it will confuse this compiler.
+#
+# - The $(FONTCONFIG.GCC.archs) variable is not set.
+# Therefore statically guess the target arch to be i386.
+#
+ifeq ($(BUILD.system),mingw)
+ FONTCONFIG.cc_archoption =
+ FONTCONFIG.config_archoption = --with-arch=i386
+else ifeq ($(BUILD.system),linux)
+ FONTCONFIG.cc_archoption =
+else
+ FONTCONFIG.cc_archoption = -arch $(FONTCONFIG.GCC.archs)
+ FONTCONFIG.config_archoption = --with-arch=$(FONTCONFIG.GCC.archs)
+endif
+
+#
+# Support cross-compiling:
+#
+# - Add '-arch <arch>' to CC argument to avoid the need to put a <host_triplet>-gcc
+# trampoline script in the PATH, since fontconfig's configure looks for this when
+# in cross-compile mode. If such a trampoline were used, it would just call "gcc -arch <arch> $@".
+#
+# - In the case of MinGW (on i386), a 'i386-ming32-gcc' command will be available,
+# and the '-arch <arch>' argument should be omitted, as it will confuse the compiler.
+#
+# The following line overrides the original line in /make/include/contrib.defs,
+# but has the -arch argument added (and '$(1)' presubstituted for 'FONTCONFIG').
+#
+FONTCONFIG.CONFIGURE.env.CC = CC="$(FONTCONFIG.GCC.gcc) $(FONTCONFIG.cc_archoption)"
+
+#
+# Support cross-compiling:
+# - Remove '-arch <arch>' from *FLAGS variables, since fontconfig's configure script
+# needs to be given the freedom to insert that flag as necessary, since there are
+# some trampoline executables that need to be built in the native build architecture
+# (without the -arch flag).
+#
+# The following lines override the original lines in /make/include/contrib.defs,
+# but have '*archs' removed (and '$(1)' presubstituted for 'FONTCONFIG').
+#
+FONTCONFIG.CONFIGURE.env.CFLAGS = CFLAGS="$(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?extra)"
+FONTCONFIG.CONFIGURE.env.CXXFLAGS = CXXFLAGS="$(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?extra)"
+FONTCONFIG.CONFIGURE.env.CPPFLAGS = CPPFLAGS="$(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?extra)"
+FONTCONFIG.CONFIGURE.env.LDFLAGS = LDFLAGS="$(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver)"
+
+#
+# Force use of libxml2 instead of expat with --enable-libxml2.
+#
+# Tell configure where to find our (cross-compiled) versions of freetype and libxml2.
+#
+# Support cross-compiling:
+# - Add --with-arch argument since fontconfig's configure isn't smart enough
+# to infer it from the --host argument
+#
+FONTCONFIG.CONFIGURE.extra = \
+ --enable-libxml2 \
+ --with-freetype-config=$(call fn.ABSOLUTE,$(CONTRIB.build/)bin/freetype-config) \
+ LIBXML2_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lxml2" \
+ LIBXML2_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include/libxml2" \
+ $(FONTCONFIG.config_archoption)
diff --git a/contrib/fontconfig/module.rules b/contrib/fontconfig/module.rules
new file mode 100644
index 000000000..72ebbd965
--- /dev/null
+++ b/contrib/fontconfig/module.rules
@@ -0,0 +1,2 @@
+$(eval $(call import.MODULE.rules,FONTCONFIG))
+$(eval $(call import.CONTRIB.rules,FONTCONFIG))
diff --git a/contrib/freetype/module.defs b/contrib/freetype/module.defs
new file mode 100644
index 000000000..85437bab5
--- /dev/null
+++ b/contrib/freetype/module.defs
@@ -0,0 +1,5 @@
+$(eval $(call import.MODULE.defs,FREETYPE,freetype))
+$(eval $(call import.CONTRIB.defs,FREETYPE))
+
+FREETYPE.FETCH.url = http://download.m0k.org/handbrake/contrib/freetype-2.3.9.tar.gz
+FREETYPE.EXTRACT.tarbase = freetype-2.3.9
diff --git a/contrib/freetype/module.rules b/contrib/freetype/module.rules
new file mode 100644
index 000000000..d4ebbda30
--- /dev/null
+++ b/contrib/freetype/module.rules
@@ -0,0 +1,2 @@
+$(eval $(call import.MODULE.rules,FREETYPE))
+$(eval $(call import.CONTRIB.rules,FREETYPE))
diff --git a/contrib/libass/A00-configure.patch b/contrib/libass/A00-configure.patch
new file mode 100644
index 000000000..d26e0fb47
--- /dev/null
+++ b/contrib/libass/A00-configure.patch
@@ -0,0 +1,84 @@
+--- libass-0.9.9/configure 2010-02-28 20:38:16.000000000 -0800
++++ libass-0.9.9/configure 2010-08-19 23:24:11.000000000 -0700
+@@ -15728,10 +15728,10 @@
+ { echo "$as_me:$LINENO: checking for FREETYPE" >&5
+ echo $ECHO_N "checking for FREETYPE... $ECHO_C" >&6; }
+
+-if test -n "$PKG_CONFIG"; then
+ if test -n "$FREETYPE_CFLAGS"; then
+ pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
+ else
++if test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 9.10.3\"") >&5
+ ($PKG_CONFIG --exists --print-errors "freetype2 >= 9.10.3") 2>&5
+@@ -15742,14 +15742,14 @@
+ else
+ pkg_failed=yes
+ fi
+- fi
+ else
+ pkg_failed=untried
+ fi
+-if test -n "$PKG_CONFIG"; then
++ fi
+ if test -n "$FREETYPE_LIBS"; then
+ pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
+ else
++if test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 9.10.3\"") >&5
+ ($PKG_CONFIG --exists --print-errors "freetype2 >= 9.10.3") 2>&5
+@@ -15760,10 +15760,10 @@
+ else
+ pkg_failed=yes
+ fi
+- fi
+ else
+ pkg_failed=untried
+ fi
++ fi
+
+
+
+@@ -15849,10 +15849,10 @@
+ { echo "$as_me:$LINENO: checking for FONTCONFIG" >&5
+ echo $ECHO_N "checking for FONTCONFIG... $ECHO_C" >&6; }
+
+-if test -n "$PKG_CONFIG"; then
+ if test -n "$FONTCONFIG_CFLAGS"; then
+ pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS"
+ else
++if test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.4.2\"") >&5
+ ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.4.2") 2>&5
+@@ -15863,14 +15863,14 @@
+ else
+ pkg_failed=yes
+ fi
+- fi
+ else
+ pkg_failed=untried
+ fi
+-if test -n "$PKG_CONFIG"; then
++ fi
+ if test -n "$FONTCONFIG_LIBS"; then
+ pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS"
+ else
++if test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.4.2\"") >&5
+ ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.4.2") 2>&5
+@@ -15881,10 +15881,10 @@
+ else
+ pkg_failed=yes
+ fi
+- fi
+ else
+ pkg_failed=untried
+ fi
++ fi
+
+
+
diff --git a/contrib/libass/module.defs b/contrib/libass/module.defs
new file mode 100644
index 000000000..e5528fd43
--- /dev/null
+++ b/contrib/libass/module.defs
@@ -0,0 +1,15 @@
+__deps__ := FONTCONFIG FREETYPE
+$(eval $(call import.MODULE.defs,LIBASS,libass,$(__deps__)))
+$(eval $(call import.CONTRIB.defs,LIBASS))
+
+LIBASS.FETCH.url = http://download.m0k.org/handbrake/contrib/libass-0.9.9.tar.bz2
+LIBASS.EXTRACT.tarbase = libass-0.9.9
+
+# Disable as many external dependencies as I can get away with
+# and tell configure where to find our version of freetype
+LIBASS.CONFIGURE.extra = \
+ --disable-png --disable-enca \
+ FREETYPE_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfreetype" \
+ FREETYPE_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include/freetype2" \
+ FONTCONFIG_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfontconfig" \
+ FONTCONFIG_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include"
diff --git a/contrib/libass/module.rules b/contrib/libass/module.rules
new file mode 100644
index 000000000..67a5ab679
--- /dev/null
+++ b/contrib/libass/module.rules
@@ -0,0 +1,2 @@
+$(eval $(call import.MODULE.rules,LIBASS))
+$(eval $(call import.CONTRIB.rules,LIBASS))
diff --git a/contrib/libxml2/module.defs b/contrib/libxml2/module.defs
new file mode 100644
index 000000000..519c60887
--- /dev/null
+++ b/contrib/libxml2/module.defs
@@ -0,0 +1,10 @@
+$(eval $(call import.MODULE.defs,LIBXML2,libxml2))
+$(eval $(call import.CONTRIB.defs,LIBXML2))
+
+LIBXML2.FETCH.url = http://download.m0k.org/handbrake/contrib/libxml2-2.7.7.tar.gz
+LIBXML2.EXTRACT.tarbase = libxml2-2.7.7
+
+# The Python components do not build on MinGW due to the lack of a select() call
+# in the MinGW environment.
+LIBXML2.CONFIGURE.extra = \
+ --without-python \ No newline at end of file
diff --git a/contrib/libxml2/module.rules b/contrib/libxml2/module.rules
new file mode 100644
index 000000000..0715628af
--- /dev/null
+++ b/contrib/libxml2/module.rules
@@ -0,0 +1,2 @@
+$(eval $(call import.MODULE.rules,LIBXML2))
+$(eval $(call import.CONTRIB.rules,LIBXML2))
diff --git a/contrib/mp4v2/module.defs b/contrib/mp4v2/module.defs
index c27f3470e..a69151df5 100644
--- a/contrib/mp4v2/module.defs
+++ b/contrib/mp4v2/module.defs
@@ -10,8 +10,5 @@ MP4V2.CONFIGURE.env.CXXFLAGS = CXXFLAGS="$(call fn.ARGS,MP4V2.GCC,*archs *sysroo
## save some build-time by disabling utils
MP4V2.CONFIGURE.extra += --disable-util
-## make sure gch is disabled; we get build errors on linux with gcc-4.3.x and -g3
-## relatively safe to enable for darwin as it is unlikely to have that bugged version
-ifneq (darwin,$(BUILD.system))
- MP4V2.CONFIGURE.extra += --disable-gch
-endif
+# gch causes build errors with -g3 on many gcc toolchains
+MP4V2.CONFIGURE.extra += --disable-gch