3 ## toolbox for the VLC media player
6 ## Authors: Samuel Hocevar <sam@zoy.org>
9 ### Get a sane environment, just in case
25 --update-vc update Microsoft Visual Studio files
26 --update-po update translation files
27 --update-includes generate various include files
28 --update-glade generate and fix Glade code
29 --update-glade2 generate and fix Glade 2 code
30 --update-flexml generate and fix flexml and flex code
31 --distclean "make distclean" on steroids
32 --dist-contrib add the contrib dir to MAKE_DIST
33 --make-woody <dir> change distdir <dir> to a woody distdir
39 ## Extract stuff from Makefile.am
43 awk 'BEGIN{a=0}{if(!a&&$0~/^'"$1"'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' < "${srcdir}/Makefile.am" | \
45 sed -ne 's/[^-$()_a-zA-Z0-9][^-$()_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p' | \
46 sed -e "s,^,${srcdir}/,"
59 --changelog|--update-changelog)
74 --update-glade|--fix-glade)
77 --update-glade2|--update-glade-2|--fix-glade2)
96 echo "$0: unknown option $1"
103 ## Add includes to help doxygen
105 if test "${action}" = "include"
108 */vlc_common.h|*/include/vlc/*);;
109 */include/*.h) echo "#include <vlc_common.h>" ;;
116 ## Update the CVS changelog
118 if test "${action}" = "changelog"
121 echo "toolbox --changelog no longer required. use this instead:"
122 echo " svn log -v -r '{$YEAR-12-31}:{$YEAR-01-01}' > ChangeLog"
127 ## Update the MSVC project files
129 if test "${action}" = "vc"
131 echo "generating Visual Studio files"
133 if test -z "${srcdir}"; then
134 srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
137 # The evil ^M. printf '\r' does not work in Cygwin.
140 # Variables we get from configure.ac
141 LIBVLC_VERSION=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac`
142 LIBVLC_CODENAME=`sed -ne '/CODENAME=/s/.*"\(.*\)"/\1/p' < configure.ac`
143 LIBVLC_SYMBOL=`echo $LIBVLC_VERSION | sed -e 'y/.-/__/'`
145 # Sources that get built under Win32 - FIXME: anyone wanna deuglify this? :)
146 LIBVLC_SOURCES=`getfiles SOURCES_libvlc_common; getfiles SOURCES_libvlc_win32; getfiles SOURCES_libvlc_dirent; getfiles SOURCES_libvlc_getopt; getfiles SOURCES_libvlc_libc`
148 LIBVLC_HEADERS=`getfiles HEADERS_include; getfiles HEADERS_include_built`
150 LIBVLC_PKG_HEADERS=`getfiles dist_pkginclude_HEADERS`
153 rm -f evc/*.vcp msvc/*.dsp msvc/*.vcproj msvc/*.sln msvc/*.ncb
156 for target in evc/config.h msvc/config.h
160 sed -e "s/@CODENAME@/${LIBVLC_CODENAME}/" \
161 -e "s/@VERSION@/${LIBVLC_VERSION}/" \
162 -e "s/@SYMBOL@/${LIBVLC_SYMBOL}/" < ${target}.in > ${target}
166 for target in evc/libvlc.vcp msvc/libvlc.dsp
169 # Top of the project file
170 perl -pe 'if(/§SOURCES§/){last;}' < ${target}.in > ${target}
172 for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep -v "/.*/"`
174 cat >> ${target} << EOF
175 # Begin Source File${M}
176 SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
177 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
178 # End Source File${M}
181 for subdir in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/.*/" | cut -f2 -d/ | sort | uniq`
183 cat >> ${target} << EOF
184 # Begin Group "${subdir}"${M}
186 for file in `for i in ${LIBVLC_SOURCES} ; do echo $i ; done | grep "/${subdir}/"`
188 subdir="`echo ${file} | sed -e 's%/[^/]*$%/%' | sed -e 's%/%\\\\%g'`"
189 if test "${target}" = "evc/libvlc.vcp"
191 cat >> ${target} << EOF
192 # Begin Source File${M}
193 SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
194 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
195 !IF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Release"${M}
196 # PROP Output_Dir "MIPSRel\\${subdir}"${M}
197 # PROP Intermediate_Dir "MIPSRel\\${subdir}"${M}
198 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Debug"${M}
199 # PROP Output_Dir "MIPSDbg\\${subdir}"${M}
200 # PROP Intermediate_Dir "MIPSDbg\\${subdir}"${M}
201 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE SH4) Release"${M}
202 # PROP Output_Dir "SH4Rel\\${subdir}"${M}
203 # PROP Intermediate_Dir "SH4Rel\\${subdir}"${M}
204 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE SH4) Debug"${M}
205 # PROP Output_Dir "SH4Dbg\\${subdir}"${M}
206 # PROP Intermediate_Dir "SH4Dbg\\${subdir}"${M}
207 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE SH3) Release"${M}
208 # PROP Output_Dir "SH3Rel\\${subdir}"${M}
209 # PROP Intermediate_Dir "SH3Rel\\${subdir}"${M}
210 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE SH3) Debug"${M}
211 # PROP Output_Dir "SH3Dbg\\${subdir}"${M}
212 # PROP Intermediate_Dir "SH3Dbg\\${subdir}"${M}
213 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE ARM) Release"${M}
214 # PROP Output_Dir "ARMRel\\${subdir}"${M}
215 # PROP Intermediate_Dir "ARMRel\\${subdir}"${M}
216 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE ARM) Debug"${M}
217 # PROP Output_Dir "ARMDbg\\${subdir}"${M}
218 # PROP Intermediate_Dir "ARMDbg\\${subdir}"${M}
219 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE ARMV4) Release"${M}
220 # PROP Output_Dir "ARMV4Rel\\${subdir}"${M}
221 # PROP Intermediate_Dir "ARMV4Rel\\${subdir}"${M}
222 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE ARMV4) Debug"${M}
223 # PROP Output_Dir "ARMV4Dbg\\${subdir}"${M}
224 # PROP Intermediate_Dir "ARMV4Dbg\\${subdir}"${M}
225 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE x86em) Release"${M}
226 # PROP Output_Dir "X86EMRel\\${subdir}"${M}
227 # PROP Intermediate_Dir "X86EMRel\\${subdir}"${M}
228 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE x86em) Debug"${M}
229 # PROP Output_Dir "X86EMDbg\\${subdir}"${M}
230 # PROP Intermediate_Dir "X86EMDbg\\${subdir}"${M}
231 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE emulator) Debug"${M}
232 # PROP Output_Dir "emulatorDbg\\${subdir}"${M}
233 # PROP Intermediate_Dir "emulatorDbg\\${subdir}"${M}
234 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE emulator) Release"${M}
235 # PROP Output_Dir "emulatorRel\\${subdir}"${M}
236 # PROP Intermediate_Dir "emulatorRel\\${subdir}"${M}
237 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE x86) Debug"${M}
238 # PROP Output_Dir "X86Dbg\\${subdir}"${M}
239 # PROP Intermediate_Dir "X86Dbg\\${subdir}"${M}
240 !ELSEIF "\$(CFG)" == "libvlc - Win32 (WCE x86) Release"${M}
241 # PROP Output_Dir "X86Rel\\${subdir}"${M}
242 # PROP Intermediate_Dir "X86Rel\\${subdir}"${M}
244 # End Source File${M}
247 cat >> ${target} << EOF
248 # Begin Source File${M}
249 SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
250 # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
251 !IF "\$(CFG)" == "libvlc - Win32 Release"${M}
252 # PROP Output_Dir "Release\\${subdir}"${M}
253 # PROP Intermediate_Dir "Release\\${subdir}"${M}
254 !ELSEIF "\$(CFG)" == "libvlc - Win32 Debug"${M}
255 # PROP Output_Dir "Debug\\${subdir}"${M}
256 # PROP Intermediate_Dir "Debug\\${subdir}"${M}
258 # End Source File${M}
262 cat >> ${target} << EOF
267 perl -e 'while(<>){if(/§SOURCES§/){last;}}while(<>){if(/§HEADERS§/){last;}print $_}' < ${target}.in >> ${target}
268 for file in ${LIBVLC_HEADERS}
270 cat >> ${target} << EOF
271 # Begin Source File${M}
272 SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
273 # End Source File${M}
276 cat >> ${target} << EOF
277 # Begin Group "vlc"${M}
279 for file in ${LIBVLC_PKG_HEADERS}
281 cat >> ${target} << EOF
282 # Begin Source File${M}
283 SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
284 # End Source File${M}
287 cat >> ${target} << EOF
290 perl -e 'while(<>){if(/§HEADERS§/){last;}}while(<>){print $_}' < ${target}.in >> ${target}
294 for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' ${srcdir}/configure.ac`
296 mf="${srcdir}/modules/${dir}/Modules.am"
297 for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}`
299 # this is an attempt at getting a list of plugin sources... we take the
300 # production and remove everything that does not contain "module", which
301 # means you miss $(NULL), but other variables too.
302 allfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${mf} | awk 'BEGIN{a=0}{if(!a&&$0~/^SOURCES_'${mod}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | grep '\.'`
303 hfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep '\.h$'`
304 cfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep -v '\.h$'`
305 for msdir in evc msvc
307 test "${msdir}" = "evc" && suf="vcp" || suf="dsp"
308 source="${msdir}/plugins.${suf}.in"
309 target="${msdir}/plugin_${mod}.${suf}"
311 perl -pe 'if(/§SOURCES§/){last;} s/§PLUGIN§/'${mod}'/g' < ${source} > ${target}
312 for cfile in ${cfiles}
314 cat >> ${target} << EOF
315 # Begin Source File${M}
316 SOURCE="..\\modules\\`echo ${dir}/${cfile} | sed 's,/,\\\\,g'`"${M}
317 # ADD CPP /D "__VLC__" /D "__PLUGIN__" /D "MODULE_NAME=${mod}" /D "MODULE_NAME_IS_${mod}" ${M}
318 !IF "\$(CFG)" == "plugin_${mod} - Win32 Release"${M}
319 # PROP Output_Dir "Release\\modules\\`echo ${dir} | sed 's,/,\\\\,g'`"${M}
320 # PROP Intermediate_Dir "Release\\modules\\`echo ${dir} | sed 's,/,\\\\,g'`"${M}
321 !ELSEIF "\$(CFG)" == "plugin_${mod} - Win32 Debug"${M}
322 # PROP Output_Dir "Debug\\modules\\`echo ${dir} | sed 's,/,\\\\,g'`"${M}
323 # PROP Intermediate_Dir "Debug\\modules\\`echo ${dir} | sed 's,/,\\\\,g'`"${M}
324 # End Source File${M}
327 # sed is really nicer for this... unfortunately it's broken under cygwin
328 # sed -ne '1,/§SOURCES§/d; /§HEADERS§/,$d; p' < ${source} >> ${target}
329 perl -e 'while(<>){if(/§SOURCES§/){last;}}while(<>){if(/§HEADERS§/){last;}print $_}' < ${source} >> ${target}
330 for hfile in ${hfiles}
332 cat >> ${target} << EOF
333 # Begin Source File${M}
334 SOURCE="..\\modules\\`echo ${dir}/${hfile} | sed 's,/,\\\\,g'`"${M}
335 # End Source File${M}
338 # sed -ne '1,/§HEADERS§/d; p' < ${source} >> ${target}
339 perl -e 'while(<>){if(/§HEADERS§/){last;}}while(<>){print $_}' < ${source} >> ${target}
345 for target in evc/vlc.vcp msvc/vlc.dsp
348 # Top of the project file
349 perl -pe 'if(/§SOURCES§/){last;}' < ${target}.in > ${target}
351 cat >> ${target} << EOF
352 # Begin Source File${M}
353 SOURCE="..\\src\\vlc.c"${M}
354 # End Source File${M}
356 # Bottom of the project file - handles resource files too
357 perl -e 'while(<>){if(/§SOURCES§/){last;}}while(<>){print $_}' < ${target}.in >> ${target}
365 ## Update the potfiles because no one ever does it
367 if test "${action}" = "po"
369 # find out the source files
371 echo "# automatically created by toolbox --update-po" > po/POTFILES.in
372 echo "" >> po/POTFILES.in
373 echo "# main sources" >> po/POTFILES.in
374 find include src -name '*.[chm]' -o -name '*.[ch]pp' \
375 | grep -v '\(vlc_symbols\|misc/modules_\)' \
376 | sort >> po/POTFILES.in
377 echo "" >> po/POTFILES.in
378 echo "# modules" >> po/POTFILES.in
379 find modules -name '*.[chm]' -o -name '*.[ch]pp' \
380 | grep -v '\(\.moc\.\|gui/gtk2/\)' \
381 | sort >> po/POTFILES.in
386 make vlc.pot || exit 1
387 make update-po || exit 1
394 ## Create include files
396 if test "${action}" = "includes"
400 if test -z "${srcdir}"; then
401 srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
403 LIBVLC_HEADERS=`getfiles HEADERS_include`
404 BUILTINS=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' vlc-config`
406 file="${srcdir}/include/vlc_symbols.h"
409 echo '/* DO NOT EDIT THIS FILE! See Makefile.am */' >> ${file}.in
410 echo 'struct module_symbols_t {' >> ${file}.in
411 cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ \1 (* \2_inner) \3;/' >> ${file}.in
412 echo '};' >> ${file}.in
413 echo '#ifdef __PLUGIN__' >> ${file}.in
414 cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/# define \2 p_symbols->\2_inner/' >> ${file}.in
415 echo '#endif /* __PLUGIN__ */' >> ${file}.in
416 if diff >/dev/null 2>&1 ${file} ${file}.in
420 echo "creating new ${file}"
421 mv -f ${file}.in ${file}
424 file="${srcdir}/src/misc/modules_plugin.h"
426 rm -f ${file}.tmp && cp ${file}.in ${file}.tmp
427 sed -e 's#.*\$[I][d]:.*# * Automatically generated from '${file}'.in by bootstrap#' < ${file}.in > ${file}.tmp
428 echo '#define STORE_SYMBOLS( p_symbols ) \' >> ${file}.tmp
429 cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ (p_symbols)->\2_inner = \2; \\/' >> ${file}.tmp
430 echo '' >> ${file}.tmp
431 if diff >/dev/null 2>&1 ${file} ${file}.tmp
435 echo "creating new ${file}"
436 mv -f ${file}.tmp ${file}
439 file="${srcdir}/src/misc/modules_builtin.h"
441 rm -f ${file}.tmp && cp ${file}.in ${file}.tmp
442 if test -n "${BUILTINS}"
444 for i in `echo ${BUILTINS}`
446 echo "int vlc_entry__`echo $i | sed -e 'y@/@_@' -e 's@\..*@@'`( module_t* );" >>${file}.tmp
448 echo "" >> ${file}.tmp
450 echo "#define ALLOCATE_ALL_BUILTINS() \\" >> ${file}.tmp
451 echo " do \\" >> ${file}.tmp
452 echo " { \\" >> ${file}.tmp
453 if test -n "${BUILTINS}"
455 for i in `echo ${BUILTINS}`
457 echo " ALLOCATE_BUILTIN(`echo $i | sed -e 'y@/@_@' -e 's@\..*@@'`); \\" >> ${file}.tmp
460 echo " } while( 0 );" >> ${file}.tmp
461 echo "" >> ${file}.tmp
462 if diff >/dev/null 2>&1 ${file} ${file}.tmp
466 echo "creating new ${file}"
467 mv -f ${file}.tmp ${file}
474 ## Fix glade-generated files
476 if test "${action}" = "glade"
478 for file in modules/gui/gtk/gnome.glade modules/gui/gtk/gtk.glade modules/gui/familiar/familiar.glade
480 echo "generating code from $file"
481 glade -w $file || exit 1
484 for file in modules/gui/gtk/gnome_interface.c modules/gui/gtk/gtk_interface.c modules/gui/familiar/interface.c
487 if grep "DO NOT EDIT THIS FILE" $file >/dev/null 2>&1
490 cat > $file.$$.bak << EOF
491 /* This file was created automatically by glade and fixed by bootstrap */
496 -e 's#_(\(".:..:.."\))#\1#' \
497 -e 's#_(\("[a-z0-9]*://[^"]*"\))#\1#' \
498 -e 's#_("---")#"---"#' \
499 -e 's#_("--")#"--"#' \
500 -e 's#_(\("/dev/[^"]*"\))#"\1"#' \
501 -e 's#_(\("./."\))#\1#' \
502 < $file >> $file.$$.bak
503 mv -f $file.$$.bak $file
507 for file in modules/gui/gtk/gtk_support.h modules/gui/familiar/support.h
510 if grep "DO NOT EDIT THIS FILE" $file >/dev/null 2>&1
513 sed -e 's/DO NOT EDIT.*/Created by glade, fixed by bootstrap/' \
514 -e 's,<config.h>,<vlc/vlc.h>,' \
515 -e 's,#if.*ENABLE_NLS.*,#if 0 /* Disabled by bootstrap */,' \
516 -e 's,#else,/* & */,' \
517 < $file > $file.$$.bak
518 mv -f $file.$$.bak $file
526 ## Fix glade2-generated files
528 if test "${action}" = "glade2"
530 for file in modules/gui/gtk2/gnome2.glade modules/gui/gtk2/gtk2.glade modules/gui/pda/pda.glade
532 echo "generating code from $file"
533 glade-2 -w $file || exit 1
536 for file in modules/gui/pda/pda_interface.c
539 if grep "DO NOT EDIT THIS FILE" $file >/dev/null 2>&1
542 cat > $file.$$.bak << EOF
543 /* This file was created automatically by glade2 and fixed by bootstrap */
548 -e 's#_(\(".:..:.."\))#\1#' \
549 -e 's#_(\("[a-z0-9]*://[^"]*"\))#\1#' \
550 -e 's#_("---")#"---"#' \
551 -e 's#_("--")#"--"#' \
552 -e 's#_(\("/dev/[^"]*"\))#\1#' \
553 -e 's#_(\("./."\))#\1#' \
554 < $file >> $file.$$.bak
555 mv -f $file.$$.bak $file
565 if test "${action}" = "distclean"
568 # a naive sanity check to make sure we are in a VLC tree
569 test -f vlc.spec.mdk -a -f debian/rules || exit 1
571 find . -type f '(' -name '*.[oa]' -o -name '*.so' -o -name '*.sl' -o -name '*.dylib' -o -name '*.dll' -o -name .dirstamp -o -name Makefile.in -o -name 'stamp-h*' -o -name '*~' -o -name '*.bak' -o -name '*.moc.cpp' ')' -exec rm -f '{}' ';'
572 (cd autotools && find . -name '[a-z]*' -maxdepth 1 -exec rm -f '{}' ';')
573 (cd debian && find . -type d -name '[a-z]*' -maxdepth 1 -exec rm -Rf '{}' ';')
574 find msvc -type f -name '*.dsp' -exec rm -f '{}' ';'
575 find evc -type f -name '*.vcp' -exec rm -f '{}' ';'
576 #find . -type d -name '.deps' -exec rm -Rf '{}' ';'
577 # there's some more cruft all around
578 rm -f config.h config.log config.status
579 rm -f vlc vlc-config Makefile Modules.am
580 rm -Rf autom4te.cache
581 rm -f mozilla/vlcintf.h mozilla/vlcintf.xpt
582 # FIXME: a lot of Makefiles are still there
586 ## Add the extras/contrib dir to the distribution
588 if test "${action}" = "contrib"
591 if test ! -d "${distdir}/extras"
593 mkdir "${distdir}/extras"
595 if test ! -d "${distdir}/extras/contrib"
597 mkdir "${distdir}/extras/contrib"
599 cp "${srcdir}/extras/contrib/Makefile" "${distdir}/extras/contrib/Makefile"
600 cp "${srcdir}/extras/contrib/README" "${distdir}/extras/contrib/README"
601 cp "${srcdir}/extras/contrib/bootstrap" "${distdir}/extras/contrib/bootstrap"
602 cp "${srcdir}/extras/contrib/change_prefix.sh" "${distdir}/extras/contrib/change_prefix.sh"
603 if test ! -d "${distdir}/extras/contrib/src"
605 mkdir "${distdir}/extras/contrib/src"
607 cp "${srcdir}/extras/contrib/src/Makefile" "${distdir}/extras/contrib/src/Makefile"
608 cp "${srcdir}/extras/contrib/src/packages.mak" "${distdir}/extras/contrib/src/packages.mak"
609 if test ! -d "${distdir}/extras/contrib/src/Patches"
611 mkdir "${distdir}/extras/contrib/src/Patches"
613 cp ${srcdir}/extras/contrib/src/Patches/* "${distdir}/extras/contrib/src/Patches/"
617 ## Build a woody-friendly package
619 if test "${action}" = "woody"
624 # changelog: replace (1.2.3-4) with (1.2.3-0woody.4)
625 sed -e 's/^vlc (\([^)]*\)-\([^-)]*\))/vlc-woody (\1-0woody.\2)/' \
626 -e 's/ unstable; / stable; /' \
627 < "$1/debian/changelog" > "$1/debian/changelog.woody"
628 mv "$1/debian/changelog.woody" "$1/debian/changelog"
630 # control: replace liba52-*-dev with a52dec-dev (>=0.7.3)
631 # libdv*-dev with libdv-dev
632 # kdelibs4-dev with kdelibs-dev
633 # libqt3-mt-dev libqt3-compat-headers with libqt-dev
634 # libarts1-dev with libarts-dev
635 # libdvdread3-dev with libdvdread2-dev
636 # libdvdplay0-dev (>=1.0.1-2) with libdvdplay0-dev
637 # libxosd-dev (>=2.2.4-1.3) with libxosd-dev
638 # ttf-freefont with ttf-thryomanes
639 # dvb-dev (>= 1.0.1-6) with dvb-dev
640 # remove libwxgtk2.4-dev
641 # libidl0 (workaround for mozilla-dev's bad deps)
642 # libglib2.0-0 (workaround for mozilla-dev's bad deps)
643 # gcc-3.2 (workaround for an ICE in gcc-3.3)
644 # change Section: gnome with Section: graphics
645 # Section: kde with Section: kde
646 # Section: libdevel with Section: devel
647 sed -e 's/liba52-[^-]*-dev/a52dec-dev (>=0.7.3)/' \
648 -e 's/libdv[0-9]*-dev/libdv-dev/' \
649 -e 's/kdelibs[0-9]*-dev/kdelibs-dev/' \
650 -e 's/libqt[0-9]*-mt-dev/libqt-dev/' \
651 -e 's/, libqt[0-9]*-compat-headers[^,]*//' \
652 -e 's/libarts[0-9]*-dev/libarts-dev/' \
653 -e 's/libdvdread[0-9]*-dev/libdvdread2-dev/' \
654 -e 's/, libdvdplay0-dev[^,]*/, libdvdplay0-dev/' \
655 -e 's/, libxosd-dev[^,]*/, libxosd-dev/' \
656 -e 's/, ttf-freefont[^,]*/, ttf-thryomanes/' \
657 -e 's/, dvb-dev[^,]*/, dvb-dev/' \
658 -e 's/, libwx[^,]*//' \
659 -e '/Package: wxvlc/,/^ *$/d' \
660 -e 's/, libidl0[^,]*//' \
661 -e 's/, libglib2.0-0[^,]*//' \
662 -e 's/, gcc-3.2[^,]*//' \
663 -e 's/Section: gnome/Section: graphics/' \
664 -e 's/Section: kde/Section: graphics/' \
665 -e 's/Section: libdevel/Section: devel/' \
666 < "$1/debian/control" > "$1/debian/control.woody"
667 mv "$1/debian/control.woody" "$1/debian/control"
669 # rules: remove wxwindows and skins stuff
670 sed -e '/# Package: wxvlc/,/^ *$/d' \
671 -e 's,--enable-wxwindows,--disable-wxwindows,' \
672 -e 's,--enable-skins,--disable-skins,' \
673 < "$1/debian/rules" > "$1/debian/rules.woody"
674 mv "$1/debian/rules.woody" "$1/debian/rules"
675 chmod 0755 "$1/debian/rules"
677 # modules/misc/freetype.c: replace the default font
678 sed -e 's,freefont/FreeSerifBold.ttf,thryomanes/thryb___.ttf,' \
679 < "$1/modules/misc/freetype.c" > "$1/modules/misc/freetype.c.woody"
680 mv "$1/modules/misc/freetype.c.woody" "$1/modules/misc/freetype.c"