Ticket #11591: packaging.patches.20130623.mingw

File packaging.patches.20130623.mingw, 10.1 KB (added by Mark Spieth, 8 years ago)
Line 
1patches for mingw
2
3From: Mark Spieth <mspieth@digivation.com.au>
4
5
6---
7 Win32/mythbuild.sh |   77 +++++++++++++++++++++++++++++++++++++++-------------
8 1 file changed, 58 insertions(+), 19 deletions(-)
9
10diff --git a/Win32/mythbuild.sh b/Win32/mythbuild.sh
11index 4fb21c6..1787cd4 100755
12--- a/Win32/mythbuild.sh
13+++ b/Win32/mythbuild.sh
14@@ -105,7 +105,7 @@ readonly myargs="$*"
15 : ${GETTEXT_URL:="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/$GETTEXT.zip"}
16 : ${PTHREADS:="pthreads-w32-2-8-0-release"}
17 : ${PTHREADS_URL:="ftp://sourceware.org/pub/pthreads-win32/$PTHREADS.tar.gz"}
18-: ${ZLIB:="zlib-1.2.5"}
19+: ${ZLIB:="zlib-1.2.8"}
20 : ${ZLIB_URL:="http://$SOURCEFORGE/project/libpng/zlib/${ZLIB/zlib-/}/$ZLIB.tar.gz"}
21 : ${FREETYPE:="freetype-2.4.3"}
22 : ${FREETYPE_URL:="http://download.savannah.gnu.org/releases/freetype/$FREETYPE.tar.gz"}
23@@ -139,14 +139,16 @@ readonly myargs="$*"
24 : ${LIBXSLT:="libxslt-1.1.26"}
25 : ${LIBXSLT_URL:="ftp://xmlsoft.org/libxslt/${LIBXSLT}.tar.gz"}
26 # 16-Sep-2011 latest: mysql-5.5.16
27-: ${MYSQL:="mysql-5.1.58"}
28+#: ${MYSQL:="mysql-5.1.58"}
29+: ${MYSQL:="mysql-5.1.65"}
30 : ${MYSQL_URL:="http://mirrors.ircam.fr/pub/mysql/Downloads/MySQL-${MYSQL:6:3}/$MYSQL.tar.gz"}
31 # Pre-built win32 install. NB mysql-5.1 requires winXP-SP2, 5.0 works on win2k
32 # 5.0.89 unavailable 11-feb-11
33 #: ${MYSQLW:="mysql-5.0.89-win32"}
34 # 5.1.55 unavailable 15-sep-11
35 #: ${MYSQLW:="mysql-5.1.55-win32"}
36-: ${MYSQLW:="mysql-5.1.58-win32"}
37+#: ${MYSQLW:="mysql-5.1.58-win32"}
38+: ${MYSQLW:="mysql-5.1.65-win32"}
39 : ${MYSQLW_URL:="ftp://mirrors.ircam.fr/pub/mysql/Downloads/MySQL-${MYSQLW:6:3}/${MYSQLW/mysql-/mysql-noinstall-}.zip"}
40 #: ${MYSQLW_URL:="ftp://ftp.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-${MYSQLW:6:3}/${MYSQLW/mysql-/mysql-noinstall-}.zip"}
41 # Pre-built MacOSX install
42@@ -156,8 +158,10 @@ readonly myargs="$*"
43 : ${MYSQLX:="mysql-standard-4.1.22-apple-darwin7.9.0-powerpc"}
44 : ${MYSQLX_URL:="ftp://mirrors.ircam.fr/pub/mysql/Downloads/MySQL-${MYSQLX:15:3}/$MYSQLX.tar.gz"}
45 #: ${QT:="qt-everywhere-opensource-src-4.7.4"} # Builds for host OK but win32 & mac need updated patches
46-: ${QT:="qt-everywhere-opensource-src-4.7.0"}
47-: ${QT_URL:="http://get.qt.nokia.com/qt/source/$QT.tar.gz"}
48+#: ${QT:="qt-everywhere-opensource-src-4.7.0"}
49+: ${QT:="qt-everywhere-opensource-src-4.8.4"}
50+#: ${QT_URL:="http://get.qt.nokia.com/qt/source/$QT.tar.gz"}
51+: ${QT_URL:="http://releases.qt-project.org/qt4/source/$QT.tar.gz"}
52 # Configurable libraries
53 readonly packages1="MYTHTV MYTHPLUGINS QT MYSQL FREETYPE LAME LIBEXIF LIBXML2"
54 readonly packages2="LIBXSLT LIBOGG LIBVORBIS FLAC LIBCDIO TAGLIB FFTW LIBSDL"
55@@ -233,6 +237,8 @@ fi
56 verbose="no"
57 unset dosudo
58 unset patchmaster
59+noask="no"
60+qtbuildloop="no"
61 : ${DXVA2:="no"}
62 
63 
64@@ -268,6 +274,8 @@ function myhelp() {
65     echo "  -j n          Number of parallel make jobs [$makejobs]"
66     echo "  -t <n>        Timeout after configure [$readtimeout Seconds]"
67     echo "  -v            Verbose build messages [$verbose]"
68+    echo "  -q            dont ask questions and wait"
69+    echo "  -Q            loop QT build on failure due to VM alloc issues"
70     echo "  -C            Force a clean re-build"
71     echo "  -E            Force a clean re-install"
72     echo "  -F            Enable mythtv and mythplugins master patches [${patchmaster:-no}]"
73@@ -308,13 +316,14 @@ function die() {
74 }
75 
76 # Options
77-while getopts ":b:c:dj:lprt:vhVCEFHI:MPRSTWX" opt
78+while getopts ":b:c:dj:lpqrt:vhVCEFHI:MPQRSTWX" opt
79 do
80     case "$opt" in
81         b) [ "${OPTARG:0:1}" != "-" ] && MYTHBRANCH=$OPTARG || die "Invalid branch tag: $OPTARG" ;;
82         c) [ "${OPTARG:0:1}" != "-" ] && cpu=$OPTARG || die "Invalid CPU: $OPTARG" ;;
83         d) MYTHBUILD="debug" ;;
84         p) MYTHBUILD="profile" ;;
85+        q) noask="yes" ;;
86         r) MYTHBUILD="release" ;;
87         j) [ $OPTARG -lt 0 -o $OPTARG -gt 99 ] && die "Invalid number of jobs: $OPTARG"
88            [ $OPTARG -lt 1 ] && die "Invalid make jobs: $OPTARG"
89@@ -332,6 +341,7 @@ do
90         W) MYTHTARGET="Windows" ;;
91         I) MYTHINSTALL=`readlink -f "$OPTARG" 2>/dev/null` || die "Invalid path: $OPTARG" ;;
92         P) patches="apply" ;;
93+        Q) qtbuildloop="yes" ;;
94         R) patches="reverse" ;;
95         S) dosudo="sudo" ;;
96         T) [ "$themes" = "no" ] && themes="yes" || themes="no" ;;
97@@ -812,7 +822,9 @@ esac
98 # Display Myth branch & build type and wait for OK
99 banner "Building MythTV${branch:+ branch '$branch'} ($MYTHBUILD) for $MYTHTARGET" >&2
100 [ "$cleanbuild" = "yes" ] && echo "WARNING: All packages will be rebuilt from scratch." >&2
101-read -p "Press [Return] to continue or [Control-C] to abort: "
102+if [ "$noask" = "no" ] ; then
103+    read -p "Press [Return] to continue or [Control-C] to abort: "
104+fi
105 echo ""
106 
107 # Change to the working dir
108@@ -985,8 +997,8 @@ if ! git --version >/dev/null 2>&1 ; then
109     if [ "$MSYSTEM" != "MINGW32" ]; then
110         install_pkg git-core
111     else
112-        gitexe="c:\Program Files\Git\bin\git.exe"
113-        gitexe32="C:\Program Files (x86)\Git\bin\git.exe"
114+        gitexe="$PROGRAMFILES\Git\bin\git.exe"
115+        gitexe32="$SYSTEMDRIVE\Program Files (x86)\Git\bin\git.exe"
116         if [ ! -e "$gitexe" -a ! -e "$gitexe32" ]; then
117             name=$WINGIT; url=$WINGIT_URL; arc=`basename "$url"`
118             [ ! -e "$arc" ] && download "$url"
119@@ -1089,6 +1101,7 @@ function patchmingw() {
120 function patchmingw32() {
121     local gccversion=$(gcc -dumpversion)
122     local path="/mingw/lib/gcc/mingw32/$gccversion/include"
123+    shift
124 
125        $dosudo patch -p0 "$@" <<-EOF
126                --- $path/float.h       2012-03-10 17:43:36 +0100
127@@ -1877,6 +1890,7 @@ if [ ! -e "$stampconfig.$debug" -o -n "${!compcfg}" -o ! -e Makefile ]; then
128 
129     if [ "$MSYSTEM" = "MINGW32" ]; then
130         args="$args -I $incdir/mysql -L `pwd -W`/../$MYSQLW/lib/opt -l mysql"
131+       export QMAKESPEC=win32-g++
132         set -x
133         cmd /c "configure.exe $args ${!compcfg}"
134         set +x
135@@ -1952,7 +1966,13 @@ function helpQt() {
136     exit 1
137 }
138 if [ ! -e "$stampbuild" ] ; then
139-    $make || helpQt
140+    if [ "$qtbuildloop" = "yes" ]; then
141+       while ! $make ; do
142+           sleep 60
143+       done
144+    else
145+        $make || helpQt
146+    fi
147     touch "$stampbuild"
148     rm -f "$stampinstall"
149 fi
150@@ -2011,6 +2031,11 @@ elif [ "$clean" = "yes" ]; then
151 fi
152 
153 mythtag=$( git describe)
154+case "$MYTHVER" in
155+    master)
156+        mythtag="master-`date +%F`"
157+        ;;
158+esac
159 banner "Building $name branch $branch ($MYTHBUILD)"
160 
161 # Apply patches
162@@ -2079,7 +2104,7 @@ if [ ! -e "$stampconfig${MYTHBUILD:+.$MYTHBUILD}" -o -n "$MYTHTV_CFG" \
163     case "$MYTHVER" in
164         0.23*) args="$args --disable-directfb" ;;
165         0.24*) args="$args --disable-directfb --enable-vaapi" ;;
166-        ""|0.25*|master) args="$args --enable-vaapi" ;;
167+        ""|0.25*|0.26*|0.27*|master) args="$args --enable-vaapi" ;;
168     esac
169     rprefix=".."
170     case "$MYTHTARGET" in
171@@ -2102,6 +2127,8 @@ if [ ! -e "$stampconfig${MYTHBUILD:+.$MYTHBUILD}" -o -n "$MYTHTV_CFG" \
172             # Disable symbol-visibility or build problems on 0.24 & 0.23
173             # Also disabled on master to quieten warnings which otherwise hide real probs
174             args="$args --disable-symbol-visibility"
175+            args="$args --disable-w32threads"
176+            args="$args --disable-vaapi"
177         ;;
178         MacOSX*)
179             targetos="darwin"
180@@ -2189,7 +2216,7 @@ if [ ! -e "$stampconfig${MYTHBUILD:+.$MYTHBUILD}" -o -n "$MYTHPLUGINS_CFG" \
181         [ "$MYTHNETVISION" = "yes" ] || plugins="$plugins --disable-mythnetvision"
182         case "$MYTHVER" in
183             ""|0.23*|0.24*) [ "$MYTHWEATHER" = "yes" ] || plugins="$plugins --disable-mythweather" ;;
184-            0.25*|master) ;;
185+            0.25*|0.26*|master) ;;
186         esac
187     fi
188 
189@@ -2280,30 +2307,35 @@ fi
190 ###############################################################################
191 # Create the installation
192 ###############################################################################
193-mythlibs="myth mythfreemheg mythtv mythui mythupnp mythlivemedia"
194+#mythlibs="myth mythfreemheg mythtv mythui mythupnp mythlivemedia"
195+mythlibs="myth mythfreemheg mythtv mythui mythupnp"
196+mythextlibs=""
197 if [ -z "$MYTHVER" ]; then
198     case "$branch" in
199         *-master) MYTHVER="master" ;;
200         *-0*24)   MYTHVER="0.24" ;;
201         *-0*25)   MYTHVER="0.25" ;;
202+        *-0*26)   MYTHVER="0.26" ;;
203     esac
204 fi
205 case "$MYTHVER" in
206-    0.23*)        mythlibs="$mythlibs mythdb" ;;
207-    0.24*)        mythlibs="$mythlibs mythdb mythmetadata" ;;
208-    0.25*|master) mythlibs="$mythlibs mythbase mythmetadata mythservicecontracts mythprotoserver" ;;
209+    0.23*)        mythlibs="$mythlibs mythdb mythlivemedia" ;;
210+    0.24*)        mythlibs="$mythlibs mythdb mythmetadata mythlivemedia" ;;
211+    0.25*|0.26*)  mythlibs="$mythlibs mythbase mythmetadata mythservicecontracts mythprotoserver mythlivemedia" ;;
212+    master)       mythlibs="$mythlibs mythbase mythmetadata mythservicecontracts mythprotoserver"
213+                  mythextlibs="$mythextlibs mythnzmqt mythqjson mythzmq" ;;
214     *)            mythlibs="$mythlibs mythbase mythmetadata mythservicecontracts mythprotoserver"
215                   echo "WARNING Installation untested with this version." ;;
216 esac
217-ffmpeglibs="mythavcodec mythavformat mythavutil mythswscale"
218+ffmpeglibs="mythavcodec mythavformat mythavutil mythswscale mythswresample"
219 case "$MYTHVER" in
220     0.24*|0.23*)     ffmpeglibs="$ffmpeglibs mythavcore mythpostproc" ;;
221-    0.25*|master|"") ffmpeglibs="$ffmpeglibs mythpostproc" ;;
222+    0.25*|0.26*|master|"") ffmpeglibs="$ffmpeglibs mythpostproc" ;;
223 esac
224 xtralibs="xml2 xslt freetype mp3lame dvdcss exif ogg vorbis vorbisenc tag cdio cdio_cdda cdio_paranoia udf visual-0.4"
225 QTDLLS="QtCore QtGui QtNetwork QtOpenGL QtSql QtSvg QtWebKit QtXml Qt3Support"
226 case "$MYTHVER" in
227-    ""|0.25*|master) QTDLLS="$QTDLLS QtScript" ;;
228+    ""|0.25*|0.26*|master) QTDLLS="$QTDLLS QtScript" ;;
229 esac
230 
231 if isWinTarget ; then
232@@ -2344,6 +2376,13 @@ if isWinTarget ; then
233         done
234     done
235 
236+    # mythextlibs
237+    for lib in $mythextlibs ; do
238+        for file in {$bindir,$libdir}/{lib,}$lib.dll ; do
239+            [ -e "$file" ] && ln -s "$file" .
240+        done
241+    done
242+
243     # External libs
244     for lib in $xtralibs ; do
245         for file in $bindir/lib$lib-*.dll ; do