Skip to content

Commit

Permalink
media-video/avidemux: version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Aug 27, 2009
1 parent 62f804e commit aba1803
Show file tree
Hide file tree
Showing 9 changed files with 637 additions and 0 deletions.
10 changes: 10 additions & 0 deletions media-video/avidemux/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
# $Header: $

*avidemux-2.5.1 (27 Aug 2009)

27 Aug 2009; Dominik Kapusta <d@ayoy.net>
+files/2.5.1-build-plugins.patch,
+files/2.5.1-coreImage-parallel-build.patch,
+files/2.5.1-fake-inst-dir.patch, +files/2.5.1-i18n.patch,
+files/2.5.1-multilib.patch, +avidemux-2.5.1.ebuild,
+files/2.5.1-opencore.patch, metadata.xml:
Version bump

29 Jul 2009; Ben de Groot <yngwin@gentoo.org> +files/2.5.0-xv.patch,
avidemux-2.5.0.ebuild:
Adding patch from ayoy to fix linking with libXv
Expand Down
162 changes: 162 additions & 0 deletions media-video/avidemux/avidemux-2.5.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/avidemux/avidemux-2.5.0.ebuild,v 1.1 2009/08/04 12:02:38 yngwin Exp $

EAPI="2"

inherit cmake-utils eutils flag-o-matic

MY_P=${PN}_${PV}

DESCRIPTION="Video editor designed for simple cutting, filtering and encoding tasks"
HOMEPAGE="http://fixounet.free.fr/avidemux"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="2"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="+aac +aften +alsa amrnb amrwb +dts esd jack libsamplerate +mp3 nls oss
pulseaudio +sdl +truetype +vorbis +x264 +xv +xvid gtk +qt4"

RDEPEND="dev-libs/libxml2
aac? ( media-libs/faac
media-libs/faad2 )
aften? ( media-libs/aften )
alsa? ( media-libs/alsa-lib )
amrnb? ( media-libs/amrnb )
amrwb? ( media-libs/amrwb )
dts? ( media-libs/libdca )
mp3? ( media-sound/lame )
esd? ( media-sound/esound )
jack? ( media-sound/jack-audio-connection-kit )
libsamplerate? ( media-libs/libsamplerate )
oss? ( media-libs/alsa-oss )
pulseaudio? ( media-sound/pulseaudio )
sdl? ( media-libs/libsdl )
truetype? ( media-libs/freetype:2
media-libs/fontconfig )
vorbis? ( media-libs/libvorbis )
x264? ( media-libs/x264 )
xv? ( x11-libs/libXv )
xvid? ( media-libs/xvid )
gtk? ( x11-libs/gtk+:2 )
qt4? ( >=x11-libs/qt-gui-4.5.1:4 )"
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
dev-util/pkgconfig"

S=${WORKDIR}/${MY_P}

AVIDEMUX_LANGS="bg ca cs de el es fr it ja pt_BR ru sr sr@latin tr zh_TW"
for L in ${AVIDEMUX_LANGS}; do
IUSE="${IUSE} linguas_${L}"
done

PATCHES=( "${FILESDIR}/${PV}-i18n.patch"
"${FILESDIR}/${PV}-multilib.patch"
"${FILESDIR}/${PV}-coreImage-parallel-build.patch"
"${FILESDIR}/${PV}-opencore.patch"
# adds plugins as a build target and adjusts include paths
"${FILESDIR}/${PV}-build-plugins.patch"
# creates a lib dir in a build dir to allow correct plugins linking
"${FILESDIR}/${PV}-fake-inst-dir.patch" )

src_prepare() {
base_src_prepare

local po_files=
local qt_ts_files=
local avidemux_ts_files=
for lingua in ${LINGUAS}; do
if has ${lingua} ${AVIDEMUX_LANGS}; then
if [[ -e ${S}/po/${lingua}.po ]]; then
po_files="${po_files} \${po_subdir}/${lingua}.po"
fi
if [[ -e ${S}/po/qt_${lingua}.ts ]]; then
qt_ts_files="${qt_ts_files} \${ts_subdir}/qt_${lingua}.ts"
fi
if [[ -e ${S}/po/${PN}_${lingua}.ts ]]; then
avidemux_ts_files="${avidemux_ts_files} \${ts_subdir}/${PN}_${lingua}.ts"
fi
fi
done

sed -i -e "s!FILE(GLOB po_files .*)!SET(po_files ${po_files})!" \
"${S}/cmake/Po.cmake" || die "sed failed"
sed -i -e "s!FILE(GLOB.*qt.*)!SET(ts_files ${qt_ts_files})!" \
-e "s!FILE(GLOB.*avidemux.*)!SET(ts_files ${avidemux_ts_files})!" \
"${S}/cmake/Ts.cmake" || die "sed failed"
}

src_configure() {
mycmakeargs="${mycmakeargs}
-DAVIDEMUX_SOURCE_DIR='${S}'
-DAVIDEMUX_INSTALL_PREFIX='${S}_build'
-DAVIDEMUX_CORECONFIG_DIR='${S}_build/config'"

# CMakeLists.txt
use gtk || mycmakeargs="${mycmakeargs} -DGTK=0"
use qt4 || mycmakeargs="${mycmakeargs} -DQT4=0"

# cmake/admCheckMiscLibs.cmake
use nls || mycmakeargs="${mycmakeargs} -DGETTEXT=0"
use sdl || mycmakeargs="${mycmakeargs} -DSDL=0"
use xv || mycmakeargs="${mycmakeargs} -DXVIDEO=0"

# cmake/admCheckAudioDeviceLibs.cmake
use alsa || mycmakeargs="${mycmakeargs} -DALSA=0"
use esd || mycmakeargs="${mycmakeargs} -DESD=0"
use jack || mycmakeargs="${mycmakeargs} -DJACK=0"
use oss || mycmakeargs="${mycmakeargs} -DOSS=0"
use pulseaudio || mycmakeargs="${mycmakeargs} -DPULSEAUDIOSIMPLE=0"

# cmake/admCheckAudioEncoderLibs.cmake
use aften || mycmakeargs="${mycmakeargs} -DAFTEN=0"
use mp3 || mycmakeargs="${mycmakeargs} -DLAME=0"
use aac || mycmakeargs="${mycmakeargs} -DFAAC=0"
use vorbis || mycmakeargs="${mycmakeargs} -DVORBIS=0"

# plugins/ADM_audioDecoders
use aac || mycmakeargs="${mycmakeargs} -DFAAD=0"
use dts || mycmakeargs="${mycmakeargs} -DLIBDCA=0"

# opencore
use amrnb || mycmakeargs="${mycmakeargs} -DOPENCORE_AMRNB=0"
use amrwb || mycmakeargs="${mycmakeargs} -DOPENCORE_AMRWB=0"

# plugins/ADM_videoFilters
use truetype || mycmakeargs="${mycmakeargs} -DFREETYPE2=0 -DFONTCONFIG=0"

# plugins/ADM_videoEncoder
use xvid || mycmakeargs="${mycmakeargs} -DXVID=0"
use x264 || mycmakeargs="${mycmakeargs} -DX264=0"

cmake-utils_src_configure
}

src_compile() {
# first build the application
cmake-utils_src_compile
# and then go on with plugins
emake -C "${CMAKE_BUILD_DIR}/plugins" || die "building plugins failed"
}

src_install() {
# install the application
cmake-utils_src_install
# install plugins
emake -C "${CMAKE_BUILD_DIR}/plugins" DESTDIR="${D}" install \
|| die "installing plugins failed"

dodoc AUTHORS || die "dodoc failed"
newicon avidemux_icon.png avidemux.png || die "installing icon failed"

if use qt4; then
sed -i "s/\(${PN}2_\)gtk/\1qt4/" ${PN}2.desktop || die "sed failed"
domenu ${PN}2.desktop || die "installing desktop file failed"
fi

if use gtk; then
domenu ${PN}2-gtk.desktop || die "installing desktop file failed"
fi
}
82 changes: 82 additions & 0 deletions media-video/avidemux/files/2.5.1-build-plugins.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8bc1697..99e709e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -200,6 +200,7 @@ MESSAGE("")
ADD_SUBDIRECTORY(avidemux)
ADD_SUBDIRECTORY(po)
ADD_SUBDIRECTORY(scripts)
+ADD_SUBDIRECTORY(plugins EXCLUDE_FROM_ALL)

########################################
# Config Summary
diff --git a/cmake/ad_plugin.cmake b/cmake/ad_plugin.cmake
index 5070e18..3602026 100644
--- a/cmake/ad_plugin.cmake
+++ b/cmake/ad_plugin.cmake
@@ -6,9 +6,9 @@ ENDIF (WIN32)

MACRO(INIT_AUDIO_PLUGIN _lib)
INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/config")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_core/include")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_coreAudio/include")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_audiocodec")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_core/include")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_coreAudio/include")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_audiocodec")
ENDMACRO(INIT_AUDIO_PLUGIN)

MACRO(INSTALL_AUDIODECODER _lib)
diff --git a/cmake/admPluginVideoEncoder.cmake b/cmake/admPluginVideoEncoder.cmake
index e839054..c0ef241 100644
--- a/cmake/admPluginVideoEncoder.cmake
+++ b/cmake/admPluginVideoEncoder.cmake
@@ -6,9 +6,9 @@ ENDIF (WIN32)

MACRO(INIT_VIDEO_ENCODER_PLUGIN _lib)
INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/config")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_core/include")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_coreUI/include")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_plugin")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_core/include")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_coreUI/include")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_plugin")
ENDMACRO(INIT_VIDEO_ENCODER_PLUGIN)

MACRO(INSTALL_VIDEO_ENCODER _lib)
diff --git a/cmake/ae_plugin.cmake b/cmake/ae_plugin.cmake
index 83ba00b..b9da302 100644
--- a/cmake/ae_plugin.cmake
+++ b/cmake/ae_plugin.cmake
@@ -5,10 +5,10 @@ ELSE (WIN32)
ENDIF (WIN32)

MACRO(INIT_AUDIO_ENCODER _lib)
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_core/include")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_coreAudio/include")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_coreUI/include")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_audiofilter")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_core/include")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_coreAudio/include")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_coreUI/include")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_audiofilter")
ADD_DEFINITIONS("-DADM_MINIMAL_UI_INTERFACE")
ENDMACRO(INIT_AUDIO_ENCODER)

diff --git a/cmake/av_plugin.cmake b/cmake/av_plugin.cmake
index 61c3a40..2c18b01 100644
--- a/cmake/av_plugin.cmake
+++ b/cmake/av_plugin.cmake
@@ -5,9 +5,9 @@ ELSE (WIN32)
ENDIF (WIN32)

MACRO(INIT_AUDIO_DEVICE _lib)
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_core/include")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_coreAudio/include")
- INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../avidemux/ADM_audiodevice/")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_core/include")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_coreAudio/include")
+ INCLUDE_DIRECTORIES("${AVIDEMUX_SOURCE_DIR}/avidemux/ADM_audiodevice/")
ENDMACRO(INIT_AUDIO_DEVICE)

MACRO(INSTALL_AUDIODEVICE _lib)
12 changes: 12 additions & 0 deletions media-video/avidemux/files/2.5.1-coreImage-parallel-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/avidemux/ADM_coreImage/src/CMakeLists.txt b/avidemux/ADM_coreImage/src/CMakeLists.txt
index fab38a3..4fc236a 100644
--- a/avidemux/ADM_coreImage/src/CMakeLists.txt
+++ b/avidemux/ADM_coreImage/src/CMakeLists.txt
@@ -20,6 +20,7 @@ SET(ADM_coreImage_SRCS
)

ADD_LIBRARY(ADM_coreImage SHARED ${ADM_coreImage_SRCS})
+ADD_DEPENDENCIES(ADM_coreImage ffmpeg)
ADD_SOURCE_CFLAGS(DIA_flyDialog.cpp " -DADM_UI_TYPE_BUILD=99")
IF (APPLE)
TARGET_LINK_LIBRARIES(ADM_coreImage -Wl,-read_only_relocs,suppress)
17 changes: 17 additions & 0 deletions media-video/avidemux/files/2.5.1-fake-inst-dir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/avidemux/CMakeLists.txt b/avidemux/CMakeLists.txt
index eda6cff..ae3a349 100644
--- a/avidemux/CMakeLists.txt
+++ b/avidemux/CMakeLists.txt
@@ -501,3 +501,12 @@ IF (APPLE)
ELSE (APPLE)
INSTALL(TARGETS ${ADM_EXES} RUNTIME DESTINATION ${BIN_DIR} LIBRARY DESTINATION lib)
ENDIF (APPLE)
+
+IF (UNIX AND NOT APPLE)
+ ADD_CUSTOM_COMMAND(TARGET ffmpeg
+ POST_BUILD
+ COMMAND mkdir -p ${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}
+ COMMAND find ${CMAKE_BINARY_DIR}/avidemux -name '*.so*' | xargs ln -sft ${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ COMMENT "Creating temporary lib directory for proper plugins linking")
+ENDIF (UNIX AND NOT APPLE)
42 changes: 42 additions & 0 deletions media-video/avidemux/files/2.5.1-i18n.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
diff --git a/avidemux/ADM_userInterfaces/ADM_QT4/ui_support.cpp b/avidemux/ADM_userInterfaces/ADM_QT4/ui_support.cpp
index 4cce636..b875528 100644
--- a/avidemux/ADM_userInterfaces/ADM_QT4/ui_support.cpp
+++ b/avidemux/ADM_userInterfaces/ADM_QT4/ui_support.cpp
@@ -73,7 +73,7 @@ void loadTranslator(void)
#ifdef __APPLE__
QString appdir = QCoreApplication::applicationDirPath() + "/../Resources/locale/";
#else
- QString appdir = QCoreApplication::applicationDirPath() + "/i18n/";
+ QString appdir = "/usr/share/avidemux/i18n/";
#endif

loadTranslation(&qtTranslator, appdir + "qt_" + QLocale::system().name());
@@ -164,4 +164,4 @@ const char* getNativeRendererDesc(void)
}

return "Qt";
-}
\ No newline at end of file
+}
diff --git a/cmake/Ts.cmake b/cmake/Ts.cmake
index 15eb89b..e40f078 100644
--- a/cmake/Ts.cmake
+++ b/cmake/Ts.cmake
@@ -64,7 +64,7 @@ MACRO(COMPILE_AVIDEMUX_TS_FILES ts_subdir _sources)

SET(qm_files ${qm_files} ${_outXml} ${_out})

- INSTALL(FILES ${_out} DESTINATION "${CMAKE_INSTALL_PREFIX}/${BIN_DIR}/i18n")
+ INSTALL(FILES ${_out} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/avidemux/i18n")
ENDFOREACH(ts_input ${ts_files})

SET(${_sources} ${${_sources}} ${qm_files})
@@ -95,7 +95,7 @@ MACRO(COMPILE_QT_TS_FILES ts_subdir _sources)

SET(qm_files ${qm_files} ${_out})

- INSTALL(FILES ${_out} DESTINATION "${CMAKE_INSTALL_PREFIX}/${BIN_DIR}/i18n")
+ INSTALL(FILES ${_out} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/avidemux/i18n")
ENDFOREACH(ts_input ${ts_files})

SET(${_sources} ${${_sources}} ${qm_files})
Loading

0 comments on commit aba1803

Please sign in to comment.