読者です 読者をやめる 読者になる 読者になる

qdvdauthor v1.7.0 への qt4 ビルドのためのパッチを作ってみた

Vine Linux

qdvdauthor v1.7.0 になって、公式に添付されている configure でビルドできなくなっていたので、パッチを作ってみた。

I download qdvdauthor v1.7.0 source, and try to build by the official spec file.
However, the atattched spec file can't build on Vine Linux, which is a Japanese community Linux distribusion.
So, I make a patch for correcting this problem below:

qdvdauthor-1.7.0-qt4.patch

--- qdvdauthor-1.7.0/configure.qt4	2009-01-18 12:34:54.000000000 +0900
+++ qdvdauthor-1.7.0/configure	2009-01-24 23:41:38.000000000 +0900
@@ -621,12 +621,6 @@ check_mjpegtools
 	$QTDIR3/bin/qmake qdvdauthor.pro;
 	make;
 
-	if [ $BUILD_QSLIDESHOW = "yes" ];
-	then
-		cd "$BASEDIR/qdvdauthor/qslideshow";
-		$QTDIR3/bin/qmake qslideshow.pro;
-		make;
-	fi;
 	if [ $BUILD_QPLAYER = "yes" ];
 	then
 		cd "$BASEDIR/qdvdauthor/qplayer";
@@ -648,6 +642,12 @@ check_mjpegtools
 	export PATH=$QTDIR/bin:$PATH
 	export LD_LIBRARY_PATH=$QTDIR4/lib:$LD_LIBRARY_PATH
 
+	if [ $BUILD_QSLIDESHOW = "yes" ];
+	then
+		cd "$BASEDIR/qdvdauthor/qslideshow";
+		$QTDIR4/bin/qmake qslideshow.pro;
+		make;
+	fi;
 	if [ $BUILD_LOCAL_FFMPEG = "yes" ];
 	then
 		cd "$BASEDIR/qrender";

My qdvdauthor.spec is expanded below:

#!/bin/sh

  RPM_SOURCE_DIR="${HOME}/rpm/SOURCES"
  RPM_BUILD_DIR="${HOME}/rpm/BUILD"
  RPM_OPT_FLAGS="-O2 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -fno-schedule-insns2"
  RPM_ARCH="i386"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/usr/share/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="qdvdauthor"
  RPM_PACKAGE_VERSION="1.7.0"
  RPM_PACKAGE_RELEASE="1vl5"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  RPM_BUILD_ROOT="/var/tmp/qdvdauthor-1.7.0-1vl5-root"
  export RPM_BUILD_ROOT
  
  
  set -x
  umask 022
  cd "${HOME}/rpm/BUILD"
cd 'qdvdauthor-1.7.0'
# set paths for ffmpeg
export FFMPEG=$(pkg-config --variable=prefix libavformat)
export FFMPEG_INC=$(pkg-config --variable=includedir libavformat)
export FFMPEG_LIB=$(pkg-config --variable=libdir libavformat)

./configure \
    --prefix=/usr \
    --no-configurator \
    --omit-local-ffmpeg \
    --no-xine-support \
    --wget-buttons-library --wget-transitions \
    ;

# No call to make is necessary because it is done by the configure script
#% __make -j2

# build dv2sub
pushd dv2sub-0.3

  CFLAGS="${CFLAGS:--O2 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -fno-schedule-insns2}" ; export CFLAGS ; 
  CXXFLAGS="${CXXFLAGS:--O2 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -fno-schedule-insns2}" ; export CXXFLAGS ; 
  FFLAGS="${FFLAGS:--O2 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -fno-schedule-insns2}" ; export FFLAGS ; 
  ./configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu \
	--target=i386-vine-linux \
	--program-prefix= \
 	--prefix=/usr \
	--exec-prefix=/usr \
	--bindir=/usr/bin \
	--sbindir=/usr/sbin \
	--sysconfdir=/etc \
	--datadir=/usr/share \
	--includedir=/usr/include \
	--libdir=/usr/lib \
	--libexecdir=/usr/libexec \
	--localstatedir=/var \
	--sharedstatedir=/usr/share \
	--mandir=/usr/share/man \
	--infodir=/usr/share/info
/usr/bin/make -j2
popd

# install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
#% __make install DESTDIR="$RPM_BUILD_ROOT"

mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/man/man1
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
mkdir -p $RPM_BUILD_ROOT/usr/share/qdvdauthor/i18n
mkdir -p $RPM_BUILD_ROOT/usr/share/qdvdauthor/html/en
mkdir -p $RPM_BUILD_ROOT/usr/share/qdvdauthor/plugins
mkdir -p $RPM_BUILD_ROOT/usr/share/qdvdauthor/plugins/simpledvd
mkdir -p $RPM_BUILD_ROOT/usr/share/qdvdauthor/plugins/complexdvd
mkdir -p $RPM_BUILD_ROOT/usr/share/qdvdauthor/lib
install -m 0755 bin/qdvdauthor \
	$RPM_BUILD_ROOT/usr/bin
install -m 0755 bin/qplayer \
	$RPM_BUILD_ROOT/usr/bin
install -m 0755 bin/qrender \
	$RPM_BUILD_ROOT/usr/bin
install -m 0644 qdvdauthor.png \
	$RPM_BUILD_ROOT/usr/share/pixmaps
install -m 0644 qdvdauthor.desktop \
	$RPM_BUILD_ROOT/usr/share/applications
install -m 0644 doc/html/en/*.html \
	$RPM_BUILD_ROOT/usr/share/qdvdauthor/html/en
install -m 0644 silence.mp2 \
	$RPM_BUILD_ROOT/usr/share/qdvdauthor
install -m 0755 dv2sub-0.3/src/dv2sub \
	$RPM_BUILD_ROOT/usr/bin
install -m 0644 dv2sub-0.3/doc/dv2sub.1 \
	$RPM_BUILD_ROOT/usr/man/man1
install -m 0644 silence.ac3 \
	$RPM_BUILD_ROOT/usr/share/qdvdauthor
install -m 0644 qdvdauthor/plugins/plugins/libcomplexdvd.so* \
	$RPM_BUILD_ROOT/usr/share/qdvdauthor/plugins
install -m 0644 qdvdauthor/plugins/plugins/libsimpledvd.so* \
	$RPM_BUILD_ROOT/usr/share/qdvdauthor/plugins
install -m 0644 qdvdauthor/plugins/complexdvd/*.jpg \
	$RPM_BUILD_ROOT/usr/share/qdvdauthor/plugins/complexdvd
install -m 0644 qdvdauthor/plugins/complexdvd/*.png \
	$RPM_BUILD_ROOT/usr/share/qdvdauthor/plugins/complexdvd
install -m 0644 qdvdauthor/plugins/simpledvd/*.jpg \
	$RPM_BUILD_ROOT/usr/share/qdvdauthor/plugins/simpledvd
install -m 0644 qdvdauthor/plugins/simpledvd/*.png \
	$RPM_BUILD_ROOT/usr/share/qdvdauthor/plugins/simpledvd
install -m 0755 lib/*so* $RPM_BUILD_ROOT/usr/share/qdvdauthor/lib/