aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/phonon-gstreamer
diff options
context:
space:
mode:
authorfluffy <fluffy@FreeBSD.org>2010-05-11 17:47:27 +0800
committerfluffy <fluffy@FreeBSD.org>2010-05-11 17:47:27 +0800
commitc4646d53fd302757917b17da41e851928d1946aa (patch)
tree61b56a551b71a305123b24c64bedcf2c6d91c724 /multimedia/phonon-gstreamer
parent6ee823a8df850c3c03a22b41b97afc935137f542 (diff)
downloadfreebsd-ports-gnome-c4646d53fd302757917b17da41e851928d1946aa.tar.gz
freebsd-ports-gnome-c4646d53fd302757917b17da41e851928d1946aa.tar.zst
freebsd-ports-gnome-c4646d53fd302757917b17da41e851928d1946aa.zip
- Resurrect multimedia/phonon[-gstreamer] ports
- Update all Phonon parts to 4.4.1 With hat on: kde@
Diffstat (limited to 'multimedia/phonon-gstreamer')
-rw-r--r--multimedia/phonon-gstreamer/Makefile57
-rw-r--r--multimedia/phonon-gstreamer/distinfo3
-rw-r--r--multimedia/phonon-gstreamer/files/patch-CMakeLists.txt50
-rw-r--r--multimedia/phonon-gstreamer/files/patch-cmake__FindGObject.cmake24
-rw-r--r--multimedia/phonon-gstreamer/files/patch-cmake__FindPhonon.cmake73
-rw-r--r--multimedia/phonon-gstreamer/files/patch-gstreamer__CMakeLists.txt15
-rw-r--r--multimedia/phonon-gstreamer/pkg-descr2
-rw-r--r--multimedia/phonon-gstreamer/pkg-plist7
8 files changed, 231 insertions, 0 deletions
diff --git a/multimedia/phonon-gstreamer/Makefile b/multimedia/phonon-gstreamer/Makefile
new file mode 100644
index 000000000000..1519d9806b68
--- /dev/null
+++ b/multimedia/phonon-gstreamer/Makefile
@@ -0,0 +1,57 @@
+# New ports collection Makefile for: phonon
+# Date created: 2008-01-30
+# Whom: Martin Wilke <miwi@FreeBSD.org>
+#
+# $FreeBSD$
+
+PORTNAME= phonon
+PORTVERSION= 4.4.1
+PORTREVISION= 0
+CATEGORIES= multimedia kde ipv6
+MASTER_SITES= ${MASTER_SITE_KDE} \
+ http://ns.ael.ru/~fluffy.khv/distfiles/
+MASTER_SITE_SUBDIR= ${PHONON_BRANCH}/${PORTNAME}/${PORTVERSION}/
+PKGNAMESUFFIX= -gstreamer
+DIST_SUBDIR= KDE
+
+MAINTAINER= kde@FreeBSD.org
+COMMENT= Phonon gstreamer backend
+
+CONFLICTS= qt4-phonon-gst-4*
+
+PHONON_BRANCH= stable
+USE_BZIP2= yes
+USE_CMAKE= yes
+USE_KDE4= kdehier automoc4 kdeprefix
+USE_QT_VER= 4
+QT_COMPONENTS= gui dbus xml opengl phonon \
+ qmake_build moc_build rcc_build uic_build
+USE_GSTREAMER= yes
+
+PLIST_SUB+= QT_PREFIX=${QT_PREFIX}
+
+# Explicitly disable alsa, see for details:
+# http://mail.kde.org/pipermail/kde-freebsd/2010-March/008015.html
+CMAKE_ARGS+= -DWITH_Alsa:BOOL=OFF
+
+.if defined(WITH_QT_PHONON)
+IGNORE= conflicts with Qt4 phonon. Please, deinstall qt4-phonon-gst and set WITH_KDE_PHONON to continue
+.endif
+
+post-patch:
+#fix finding automoc when PREFIX is not matched KDE4_PREFIX
+ ${REINPLACE_CMD} -e 's|NO_DEFAULT_PATH|${KDE4_PREFIX} NO_DEFAULT_PATH|' \
+ ${PATCH_WRKSRC}/cmake/FindAutomoc4.cmake
+
+pre-configure:
+ ${REINPLACE_CMD} -e '/phonon.pc/s|pkgconfig|../libdata/pkgconfig|' \
+ -e 's|{QT_INCLUDES}|{QT_INCLUDES} ${LOCALBASE}/include|'\
+ ${PATCH_WRKSRC}/CMakeLists.txt
+
+pre-install:
+ ${MKDIR} ${QT_PLUGINDIR}/phonon_backend
+
+post-install:
+ ${LN} -sf ${PREFIX}/lib/kde4/plugins/phonon_backend/phonon_gstreamer.so ${QT_PLUGINDIR}/phonon_backend/libphonon_gstreamer.so
+
+.include <bsd.port.mk>
diff --git a/multimedia/phonon-gstreamer/distinfo b/multimedia/phonon-gstreamer/distinfo
new file mode 100644
index 000000000000..f8471851a1b8
--- /dev/null
+++ b/multimedia/phonon-gstreamer/distinfo
@@ -0,0 +1,3 @@
+MD5 (KDE/phonon-4.4.1.tar.bz2) = 5a1444f009a77054f16fea38c08e6cb5
+SHA256 (KDE/phonon-4.4.1.tar.bz2) = 8a52b0e74c5fb5c8dd3ce65d745c7052cdcea0e7535658fbc655671cef5e5277
+SIZE (KDE/phonon-4.4.1.tar.bz2) = 625008
diff --git a/multimedia/phonon-gstreamer/files/patch-CMakeLists.txt b/multimedia/phonon-gstreamer/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..a7dc43f09100
--- /dev/null
+++ b/multimedia/phonon-gstreamer/files/patch-CMakeLists.txt
@@ -0,0 +1,50 @@
+--- ./CMakeLists.txt.orig 2009-01-22 11:20:44.000000000 +0300
++++ ./CMakeLists.txt 2009-02-21 01:22:42.000000000 +0300
+@@ -127,12 +127,12 @@
+
+ try_run(_run_result _compile_result ${CMAKE_BINARY_DIR} ${_source_file} CMAKE_FLAGS "${_include_dirs}")
+
+- if(NOT _compile_result)
+- message(FATAL_ERROR "Could not compile simple test program:\n ${_source}")
+- endif(NOT _compile_result)
+- if(_run_result)
+- message(FATAL_ERROR "Qt compiled without support for -fvisibility=hidden. This will break plugins and linking of some applications. Please fix your Qt installation.")
+- endif(_run_result)
++# if(NOT _compile_result)
++# message(FATAL_ERROR "Could not compile simple test program:\n ${_source}")
++# endif(NOT _compile_result)
++# if(_run_result)
++# message(FATAL_ERROR "Qt compiled without support for -fvisibility=hidden. This will break plugins and linking of some applications. Please fix your Qt installation.")
++# endif(_run_result)
+
+ if (GCC_IS_NEWER_THAN_4_2)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
+@@ -255,8 +255,8 @@
+ endif(APPLE)
+
+
+-add_subdirectory(phonon)
+-add_subdirectory(includes)
++#add_subdirectory(phonon)
++#add_subdirectory(includes)
+ if (Q_WS_MAC AND BUILD_PHONON_QT7)
+ add_subdirectory(qt7)
+ endif (Q_WS_MAC AND BUILD_PHONON_QT7)
+@@ -266,12 +266,12 @@
+
+ if (Q_WS_X11)
+ add_subdirectory(gstreamer)
+- add_subdirectory(xine)
++# add_subdirectory(xine)
+ endif (Q_WS_X11)
+
+-if(NOT WIN32) # pkgconfig file
+- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/phonon.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/phonon.pc @ONLY)
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/phonon.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+-endif(NOT WIN32)
++# if(NOT WIN32) # pkgconfig file
++# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/phonon.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/phonon.pc @ONLY)
++# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/phonon.pc DESTINATION ${LIB_INSTALL_DIR}/../libdata/../libdata/../libdata/../libdata/../libdata/pkgconfig)
++# endif(NOT WIN32)
+
+ macro_display_feature_log()
diff --git a/multimedia/phonon-gstreamer/files/patch-cmake__FindGObject.cmake b/multimedia/phonon-gstreamer/files/patch-cmake__FindGObject.cmake
new file mode 100644
index 000000000000..cfcd9876a824
--- /dev/null
+++ b/multimedia/phonon-gstreamer/files/patch-cmake__FindGObject.cmake
@@ -0,0 +1,24 @@
+--- ./cmake/FindGObject.cmake.orig 2008-11-24 20:11:55.000000000 +0300
++++ ./cmake/FindGObject.cmake 2009-02-21 01:19:39.000000000 +0300
+@@ -23,10 +23,12 @@
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ PKG_CHECK_MODULES(PKG_GOBJECT2 REQUIRED gobject-2.0)
+ SET(GOBJECT_DEFINITIONS ${PKG_GOBJECT2_CFLAGS})
++ PKG_CHECK_MODULES(PKG_GLIB REQUIRED glib-2.0)
+ ENDIF (NOT WIN32)
+
+ FIND_PATH(GOBJECT_INCLUDE_DIR gobject/gobject.h
+ PATHS
++ ${PKG_GLIB_INCLUDE_DIRS}
+ ${PKG_GOBJECT2_INCLUDE_DIRS}
+ /usr/include/glib-2.0/
+ PATH_SUFFIXES glib-2.0
+@@ -52,7 +54,7 @@
+ IF (WIN32)
+ SET (GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs})
+ ELSE (WIN32)
+-SET (GOBJECT_LIBRARIES ${PKG_GOBJECT2_LIBRARIES})
++SET (GOBJECT_LIBRARIES ${_GObjectLibs} ${PKG_GOBJECT2_LDFLAGS} ${PKG_GOBJECT2_LIBRARIES})
+ ENDIF (WIN32)
+
+ IF (GOBJECT_INCLUDE_DIR AND GOBJECT_LIBRARIES)
diff --git a/multimedia/phonon-gstreamer/files/patch-cmake__FindPhonon.cmake b/multimedia/phonon-gstreamer/files/patch-cmake__FindPhonon.cmake
new file mode 100644
index 000000000000..44c470dd884b
--- /dev/null
+++ b/multimedia/phonon-gstreamer/files/patch-cmake__FindPhonon.cmake
@@ -0,0 +1,73 @@
+--- ./cmake/FindPhonon.cmake.orig 2009-02-21 01:19:39.000000000 +0300
++++ ./cmake/FindPhonon.cmake 2009-02-21 01:19:39.000000000 +0300
+@@ -0,0 +1,70 @@
++# Find libphonon
++# Once done this will define
++#
++# PHONON_FOUND - system has Phonon Library
++# PHONON_INCLUDES - the Phonon include directory
++# PHONON_LIBS - link these to use Phonon
++# PHONON_VERSION - the version of the Phonon Library
++
++# Copyright (c) 2008, Matthias Kretz <kretz@kde.org>
++#
++# Redistribution and use is allowed according to the terms of the BSD license.
++# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
++
++macro(_phonon_find_version)
++ file(READ "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h" _phonon_header LIMIT 5000 OFFSET 1000)
++ string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}")
++ set(PHONON_VERSION "${CMAKE_MATCH_1}")
++ message(STATUS "Phonon Version: ${PHONON_VERSION}")
++endmacro(_phonon_find_version)
++
++find_package(PkgConfig)
++PKG_CHECK_MODULES(PKG_PHONON phonon)
++
++if(PHONON_FOUND)
++ # Already found, nothing more to do except figuring out the version
++ _phonon_find_version()
++else(PHONON_FOUND)
++ if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
++ set(PHONON_FIND_QUIETLY TRUE)
++ endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
++
++ # As discussed on kde-buildsystem: first look at CMAKE_PREFIX_PATH, then at the suggested PATHS (kde4 install dir)
++ find_library(PHONON_LIBRARY NAMES phonon PATHS ${PKG_PHONON_LIBRARY_DIRS} ${KDE4_PREFIX}/lib ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR} NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
++ # then at the default system locations (CMAKE_SYSTEM_PREFIX_PATH, i.e. /usr etc.)
++ find_library(PHONON_LIBRARY NAMES phonon)
++
++ find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h PATHS ${PKG_PHONON_INCLUDE_DIRS} ${KDE4_PREFIX}/include ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
++ find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h)
++
++ if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
++ set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
++ set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR}/phonon ${PHONON_INCLUDE_DIR})
++ set(PHONON_FOUND TRUE)
++ _phonon_find_version()
++ else(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
++ set(PHONON_FOUND FALSE)
++ endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
++
++ if(PHONON_FOUND)
++ if(NOT PHONON_FIND_QUIETLY)
++ message(STATUS "Found Phonon: ${PHONON_LIBRARY}")
++ message(STATUS "Found Phonon Includes: ${PHONON_INCLUDES}")
++ endif(NOT PHONON_FIND_QUIETLY)
++ else(PHONON_FOUND)
++ if(Phonon_FIND_REQUIRED)
++ if(NOT PHONON_INCLUDE_DIR)
++ message(STATUS "Phonon includes NOT found!")
++ endif(NOT PHONON_INCLUDE_DIR)
++ if(NOT PHONON_LIBRARY)
++ message(STATUS "Phonon library NOT found!")
++ endif(NOT PHONON_LIBRARY)
++ message(FATAL_ERROR "Phonon library or includes NOT found!")
++ else(Phonon_FIND_REQUIRED)
++ message(STATUS "Unable to find Phonon")
++ endif(Phonon_FIND_REQUIRED)
++ endif(PHONON_FOUND)
++
++
++ mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY PHONON_INCLUDES)
++endif(PHONON_FOUND)
diff --git a/multimedia/phonon-gstreamer/files/patch-gstreamer__CMakeLists.txt b/multimedia/phonon-gstreamer/files/patch-gstreamer__CMakeLists.txt
new file mode 100644
index 000000000000..1da5948b40d0
--- /dev/null
+++ b/multimedia/phonon-gstreamer/files/patch-gstreamer__CMakeLists.txt
@@ -0,0 +1,15 @@
+--- ./gstreamer/CMakeLists.txt.orig 2008-11-24 20:12:02.000000000 +0300
++++ ./gstreamer/CMakeLists.txt 2009-02-21 01:19:39.000000000 +0300
+@@ -16,9 +16,12 @@
+ project(phonon-gstreamer)
+ include(ConfigureChecks.cmake)
+
++find_package(Phonon)
++
+ if (BUILD_PHONON_GSTREAMER)
+ include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
++ ${PHONON_INCLUDES}
+ ${GSTREAMER_INCLUDE_DIR}
+ ${GLIB2_INCLUDE_DIR}
+ ${LIBXML2_INCLUDE_DIR}
diff --git a/multimedia/phonon-gstreamer/pkg-descr b/multimedia/phonon-gstreamer/pkg-descr
new file mode 100644
index 000000000000..fefdbc89bd37
--- /dev/null
+++ b/multimedia/phonon-gstreamer/pkg-descr
@@ -0,0 +1,2 @@
+Phonon is multimedia framework for QT4/KDE4.
+This port provides GStreamer backend.
diff --git a/multimedia/phonon-gstreamer/pkg-plist b/multimedia/phonon-gstreamer/pkg-plist
new file mode 100644
index 000000000000..e37e9af961fa
--- /dev/null
+++ b/multimedia/phonon-gstreamer/pkg-plist
@@ -0,0 +1,7 @@
+lib/kde4/plugins/phonon_backend/phonon_gstreamer.so
+share/kde4/services/phononbackends/gstreamer.desktop
+@dirrmtry share/kde4/services/phononbackends
+@dirrmtry lib/kde4/plugins/phonon_backend
+@cwd %%QT_PREFIX%%
+%%QT_PLUGINDIR_REL%%/phonon_backend/libphonon_gstreamer.so
+@dirrmtry %%QT_PLUGINDIR_REL%%/phonon_backend