parent
7c2273ba21
commit
8314400a51
@ -0,0 +1,8 @@
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -22,4 +22,4 @@
|
||||
AM_CXXFLAGS = @GTKMM_CFLAGS@
|
||||
|
||||
acovea_gtk_LDFLAGS = -pthread -L//usr/lib
|
||||
-acovea_gtk_LDADD = @LIBS@ @GTKMM_LIBS@ -lgthread-2.0 -lglib-2.0 -lcoyotl -levocosm -lacovea -lexpat
|
||||
+acovea_gtk_LDADD = @LIBS@ @GTKMM_LIBS@ -lgthread-2.0 -lglib-2.0 -lcoyotl -levocosm -lbrahe -lacovea -lexpat
|
@ -0,0 +1,23 @@
|
||||
TeXmacs/misc/mime/texmacs.desktop | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/TeXmacs/misc/mime/texmacs.desktop b/TeXmacs/misc/mime/texmacs.desktop
|
||||
index 493103c..cfd66b3 100644
|
||||
--- a/TeXmacs/misc/mime/texmacs.desktop
|
||||
+++ b/TeXmacs/misc/mime/texmacs.desktop
|
||||
@@ -1,14 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=GNU TeXmacs
|
||||
Comment=A structured wysiwyg scientific text editor
|
||||
-BinaryPattern=texmacs
|
||||
-Protocols=
|
||||
MimeType=text/x-texmacs;text/plain;text/x-tex;
|
||||
Exec=texmacs %f
|
||||
Icon=TeXmacs
|
||||
-TerminalOptions=
|
||||
-Path=
|
||||
Type=Application
|
||||
-Terminal=0
|
||||
-MapNotify=false
|
||||
+Terminal=false
|
||||
Categories=Education;Science;Math;
|
@ -0,0 +1,16 @@
|
||||
configure.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index d79d4b2..8a558af 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -691,7 +691,7 @@ CONFIG_CXXOPTIMIZE="-O2"
|
||||
CONFIG_BSTATIC="-lXdmcp -lXau -lXrender"
|
||||
CONFIG_BSHARED="-Wl,-Bdynamic"
|
||||
CONFIG_BFLAGS=""
|
||||
-CONFIG_BPATH="-Wl,-rpath,"
|
||||
+CONFIG_BPATH=""
|
||||
CONFIG_LDRT=""
|
||||
CONFIG_WORD_LENGTH="4"
|
||||
CONFIG_WORD_LENGTH_INC="3"
|
@ -0,0 +1,16 @@
|
||||
src/makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/makefile.in b/src/makefile.in
|
||||
index f5666c2..b9a10d6 100644
|
||||
--- a/src/makefile.in
|
||||
+++ b/src/makefile.in
|
||||
@@ -399,7 +399,7 @@ TEXMACS_objects := $(strip $(call uses,system kernel data graphics\
|
||||
|
||||
link_options:=-L$(tmsrc)/lib $(LDRT) -lm $(LDPATH) $(LDGUI) $(LDICONV) \
|
||||
$(LDGUILE) $(LDAXEL) $(LDCAIRO) $(LDIMLIB2) $(LDSQLITE3) $(LDFREETYPE) \
|
||||
- $(LDDL) $(LDSPARKLE)
|
||||
+ $(LDDL) $(LDSPARKLE) -lz
|
||||
|
||||
$(tmsrc)/bin/texmacs.bin: Objects/texmacs-$(link).bin
|
||||
$(CP) $^ $@
|
@ -1,59 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-office/texmacs/texmacs-1.0.7.2-r1.ebuild,v 1.11 2014/08/01 10:24:23 armin76 Exp $
|
||||
EAPI=2
|
||||
inherit autotools eutils
|
||||
MY_P=${P/tex/TeX}-src
|
||||
|
||||
DESCRIPTION="Wysiwyg text processor with high-quality maths"
|
||||
HOMEPAGE="http://www.texmacs.org/"
|
||||
SRC_URI="
|
||||
ftp://ftp.texmacs.org/pub/TeXmacs/targz/${MY_P}.tar.gz
|
||||
ftp://ftp.texmacs.org/pub/TeXmacs/targz/TeXmacs-600dpi-fonts.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
IUSE="imlib jpeg netpbm svg spell"
|
||||
KEYWORDS="alpha amd64 ppc x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-scheme/guile[deprecated]
|
||||
virtual/latex-base
|
||||
app-text/ghostscript-gpl
|
||||
media-libs/freetype
|
||||
x11-libs/libXext
|
||||
x11-apps/xmodmap
|
||||
imlib? ( media-libs/imlib2 )
|
||||
jpeg? ( || ( media-gfx/imagemagick media-gfx/jpeg2ps ) )
|
||||
svg? ( || ( media-gfx/inkscape gnome-base/librsvg:2 ) )
|
||||
netpbm? ( media-libs/netpbm )
|
||||
spell? ( app-text/aspell )"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-proto/xproto"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_prepare() {
|
||||
# don't strip
|
||||
epatch "${FILESDIR}"/${PN}-strip.patch
|
||||
|
||||
# fix LD_LIBRARY_PATH in tm_mupad_help, bug #337532
|
||||
epatch "${FILESDIR}"/${PN}-mupad.patch
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf $(use_with imlib imlib2) \
|
||||
--enable-optimize="${CXXFLAGS}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
dodoc TODO || die "dodoc failed"
|
||||
domenu "${FILESDIR}"/TeXmacs.desktop || die "domenu failed"
|
||||
|
||||
# now install the fonts
|
||||
insinto /usr/share/texmf
|
||||
doins -r "${WORKDIR}/fonts" || die "installing fonts failed"
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-office/texmacs/texmacs-1.99.2-r1.ebuild,v 1.2 2015/02/20 08:54:35 jlec Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit autotools eutils fdo-mime gnome2-utils
|
||||
|
||||
MY_P=${P/tex/TeX}-src
|
||||
|
||||
DESCRIPTION="Wysiwyg text processor with high-quality maths"
|
||||
HOMEPAGE="http://www.texmacs.org/"
|
||||
SRC_URI="ftp://ftp.texmacs.org/pub/TeXmacs/tmftp/source/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
IUSE="imlib jpeg netpbm pdf qt4 svg spell"
|
||||
KEYWORDS="~alpha ~amd64 ~ppc ~x86 ~x86-interix ~amd64-linux ~x86-linux"
|
||||
|
||||
RDEPEND="
|
||||
app-text/ghostscript-gpl
|
||||
dev-scheme/guile:12[deprecated]
|
||||
media-libs/freetype
|
||||
x11-apps/xmodmap
|
||||
x11-libs/libXext
|
||||
virtual/latex-base
|
||||
imlib? ( media-libs/imlib2 )
|
||||
jpeg? ( || ( media-gfx/imagemagick media-gfx/jpeg2ps ) )
|
||||
netpbm? ( media-libs/netpbm )
|
||||
qt4? ( dev-qt/qtgui:4 )
|
||||
spell? ( app-text/aspell )
|
||||
svg? ( || ( media-gfx/inkscape gnome-base/librsvg:2 ) )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
x11-proto/xproto"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
PATCHES=(
|
||||
# respect LDFLAGS, bug #338459
|
||||
"${FILESDIR}"/${PN}-plugins-1.patch
|
||||
|
||||
# dont update mime and desktop databases and icon cache
|
||||
"${FILESDIR}"/${PN}-updates.patch
|
||||
|
||||
# underlinking 540600
|
||||
"${FILESDIR}"/${P}-underlinking.patch
|
||||
|
||||
# scanelf: rpath_security_checks(): Security problem NULL DT_RUNPATH
|
||||
"${FILESDIR}"/${P}-norpath.patch
|
||||
|
||||
"${FILESDIR}"/${P}-desktop.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
epatch ${PATCHES[@]}
|
||||
|
||||
mv configure.{in,ac} || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--enable-optimize="${CXXFLAGS}" \
|
||||
$(use_with imlib imlib2) \
|
||||
$(use_enable qt4 qt) \
|
||||
$(use_enable pdf pdf-renderer)
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
fdo-mime_desktop_database_update
|
||||
fdo-mime_mime_database_update
|
||||
gnome2_icon_cache_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
fdo-mime_desktop_database_update
|
||||
fdo-mime_mime_database_update
|
||||
gnome2_icon_cache_update
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST libiodbc-3.52.7.tar.gz 1038710 SHA256 d7002cc7e566785f1203f6096dcb49b0aad02a9d9946a8eca5d663ac1a85c0c7 SHA512 a0274cd40d8fa7445f9442541e7e1d90427273a137fc2d3227e81e8af42fb35a8a38a3601f445ee821a0f88cca732d56cec8b7f08e94492da3aca609063f1a1e WHIRLPOOL c63770fff3fd14cb727828b5c016c127bf17454dbd20b9f7aba6d569fcaf58051d7abf3f9015546931a99144c62a1e38ad0da10bb42b835a2b25017b5ede1134
|
||||
DIST libiodbc-3.52.8.zip 1188493 SHA256 f96cee2f04ab01b3c32297262ebf97b3faed1e49688399e656e8e4743ed72a0c SHA512 76da1e69a6e7ab1b7ba103547070c5dfe7c40fa88d82c243640d862c93c19e731d5a35d0575038491a148bb1d1cb7c5168dc30bf3f9600b31f4e014350f16551 WHIRLPOOL b6dafe709c3dff771ef43f023e62f528d92f9f9b05f0b986942826a2ded16e3cc2ccdae1606b2c31931ee487d01c25a173488c5e6d6c1ddafddb8f6be7dd326b
|
||||
|
@ -1,51 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/libiodbc/libiodbc-3.52.7-r1.ebuild,v 1.6 2014/08/10 20:00:58 slyfox Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="ODBC Interface for Linux"
|
||||
HOMEPAGE="http://www.iodbc.org/"
|
||||
SRC_URI="http://www.iodbc.org/downloads/iODBC/${P}.tar.gz"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
LICENSE="|| ( LGPL-2 BSD )"
|
||||
SLOT="0"
|
||||
IUSE="gtk static-libs"
|
||||
|
||||
DEPEND=">=sys-libs/readline-4.1
|
||||
>=sys-libs/ncurses-5.2
|
||||
gtk? ( x11-libs/gtk+:2 )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
DOCS="AUTHORS ChangeLog NEWS README"
|
||||
|
||||
MAKEOPTS="${MAKEOPTS} -j1"
|
||||
|
||||
src_prepare() {
|
||||
sed -i.orig \
|
||||
-e '/^cd "$PREFIX"/,/^esac/d' \
|
||||
iodbc/install_libodbc.sh || die "sed failed"
|
||||
epatch \
|
||||
"${FILESDIR}"/libiodbc-3.52.7-debian_bug501100.patch \
|
||||
"${FILESDIR}"/libiodbc-3.52.7-debian_bug508480.patch \
|
||||
"${FILESDIR}"/libiodbc-3.52.7-gtk.patch \
|
||||
"${FILESDIR}"/libiodbc-3.52.7-multilib.patch \
|
||||
"${FILESDIR}"/libiodbc-3.52.7-unicode_includes.patch
|
||||
chmod -x include/*.h
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--with-layout=gentoo \
|
||||
--with-iodbc-inidir=yes \
|
||||
$(use_enable gtk gui) \
|
||||
$(use_enable static-libs static)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/libiodbc/libiodbc-3.52.7.ebuild,v 1.12 2014/08/10 20:00:58 slyfox Exp $
|
||||
|
||||
EAPI="1"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
|
||||
DESCRIPTION="ODBC Interface for Linux"
|
||||
HOMEPAGE="http://www.iodbc.org/"
|
||||
SRC_URI="http://www.iodbc.org/downloads/iODBC/${P}.tar.gz"
|
||||
LICENSE="|| ( LGPL-2 BSD )"
|
||||
SLOT="0"
|
||||
IUSE="gtk"
|
||||
|
||||
DEPEND=">=sys-libs/readline-4.1
|
||||
>=sys-libs/ncurses-5.2
|
||||
gtk? ( x11-libs/gtk+:2 )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
sed -i.orig \
|
||||
-e '/^cd "$PREFIX"/,/^esac/d' \
|
||||
iodbc/install_libodbc.sh || die "sed failed"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--with-layout=gentoo \
|
||||
--with-iodbc-inidir=yes \
|
||||
$(use_enable gtk gui) \
|
||||
|| die "econf failed"
|
||||
|
||||
emake -j1 || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake -j1 DESTDIR="${D}" install || die "emake install failed"
|
||||
dodoc AUTHORS ChangeLog NEWS README
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST tora-2.1.3.tar.gz 12284451 SHA256 ecabb2f181d1fefe8c1c401f14e1fea80b49fc6bc7963ef9f202821a626e619b SHA512 817de0eed05dcc89baf5dbf51d88577cf21b809435d76eef76bfc5ad9e5b5c8228c5cf0ac41d126144e3b41feb73fba04e62af7564fde2a11e9c81c62be59329 WHIRLPOOL aa81539e5218acd284c0bd44787220f3926734bd8c91fa7b3ddb86de6a6a50c7a8036f4bf6b5a89f246c52ff9d45533da108db9a7b1a5f5a162f20c87d5953d4
|
||||
DIST tora-3.0.0_pre20140929.tar.xz 9038680 SHA256 67fb6273c930b4ba4cbc185fd3e2a68b8c7029098b14f729ffbdfa09ed91af2b SHA512 42bc76d8bbed8a5cfee447ea6dec9966a31ef740d3ab58078ecdfc12f725cc94568fbb96d044668ae5fd83def5ab35823df6dee77b630e7903edfd1521b87b73 WHIRLPOOL 7fcf7fbe06d1fa4d31a88674f011c634ec9ef12003a074c8185a981650fff8aef85725007f51a3e463d95f332fde724392fd748d4fdbc464663a2da3b8ec8693
|
||||
|
@ -1,18 +0,0 @@
|
||||
https://bugs.gentoo.org/484198
|
||||
|
||||
--- debian/tora.desktop.orig 2013-10-30 21:37:09.624133990 +0100
|
||||
+++ debian/tora.desktop 2013-10-30 21:37:51.847371678 +0100
|
||||
@@ -4,11 +4,11 @@
|
||||
Exec=tora
|
||||
Icon=tora
|
||||
Type=Application
|
||||
-MimeType=application/x-tora
|
||||
+MimeType=application/x-tora;
|
||||
Comment=A graphical toolkit for database administration and development
|
||||
Comment[fr]=Une boite à outil graphique pour l'administration et le développement de base de données
|
||||
Comment[de]=Grafisches Toolkit zur Administration und Entwicklung von Datenbanken
|
||||
X-KDE-StartupNotify=true
|
||||
Terminal=false
|
||||
-Categories=Database;Office;Development;KDE;Qt
|
||||
+Categories=Database;Office;Development;KDE;Qt;
|
||||
|
@ -1,84 +0,0 @@
|
||||
--- CMakeLists.txt.orig 2012-09-25 21:47:27.591130679 +0200
|
||||
+++ CMakeLists.txt 2012-09-25 21:51:02.953508806 +0200
|
||||
@@ -4,6 +4,7 @@
|
||||
# options available for user's input
|
||||
OPTION(WANT_DEBUG "Set the debug build and possible additional outputs" OFF)
|
||||
OPTION(WANT_INTERNAL_QSCINTILLA "Use internal/bundled QScintilla2 source" OFF)
|
||||
+OPTION(WANT_INTERNAL_LOKI "Use internal/bundled Loki source" OFF)
|
||||
OPTION(ENABLE_ORACLE "Enable/Disable Oracle support at all. Including detection" ON)
|
||||
OPTION(ENABLE_PGSQL "Enable/Disable PostgreSQL support. Including detection" ON)
|
||||
OPTION(ENABLE_DB2 "Enable/Disable DB2 support. Including detection" ON)
|
||||
@@ -50,6 +51,7 @@
|
||||
INCLUDE(CheckCXXCompilerFlag)
|
||||
INCLUDE(CheckTypeSize)
|
||||
INCLUDE(TestBigEndian)
|
||||
+INCLUDE(FindPkgConfig)
|
||||
|
||||
#Set the custom CMake module directory where our include/lib finders are
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
|
||||
@@ -197,6 +199,10 @@
|
||||
MESSAGE(FATAL_ERROR "No Qt4 found")
|
||||
ENDIF(QT_FOUND)
|
||||
|
||||
+IF (WANT_INTERNAL_LOKI)
|
||||
+ELSE (WANT_INTERNAL_LOKI)
|
||||
+ pkg_check_modules(LOKI REQUIRED ferrisloki)
|
||||
+ENDIF (WANT_INTERNAL_LOKI)
|
||||
|
||||
IF (WANT_INTERNAL_QSCINTILLA)
|
||||
MESSAGE(STATUS "QSci: Building with internal copy of QScintilla.")
|
||||
--- src/CMakeLists.txt.orig 2012-09-25 22:45:20.702694011 +0200
|
||||
+++ src/CMakeLists.txt 2012-09-25 22:47:39.742124547 +0200
|
||||
@@ -3,7 +3,10 @@
|
||||
|
||||
#Subdirectories
|
||||
# ADD_SUBDIRECTORY(i18n)
|
||||
-ADD_SUBDIRECTORY(loki)
|
||||
+# Default: loki as 3rd party lib!
|
||||
+IF (WANT_INTERNAL_LOKI)
|
||||
+ ADD_SUBDIRECTORY(loki)
|
||||
+ENDIF(WANT_INTERNAL_LOKI)
|
||||
IF (WIN32)
|
||||
ADD_SUBDIRECTORY(windows)
|
||||
ENDIF (WIN32)
|
||||
@@ -468,7 +471,9 @@
|
||||
QT4_ADD_RESOURCES(TORA_RCC_SRCS ${TORA_RCC_FILES})
|
||||
|
||||
|
||||
-LINK_DIRECTORIES(./loki)
|
||||
+IF (WANT_INTERNAL_LOKI)
|
||||
+ LINK_DIRECTORIES(./loki)
|
||||
+ENDIF(WANT_INTERNAL_LOKI)
|
||||
IF (WIN32)
|
||||
LINK_DIRECTORIES(./windows)
|
||||
ENDIF (WIN32)
|
||||
@@ -477,7 +482,10 @@
|
||||
ENDIF (WANT_INTERNAL_QSCINTILLA)
|
||||
|
||||
|
||||
-SET(TORA_LOKI_LIB "tora_loki_lib")
|
||||
+IF (WANT_INTERNAL_LOKI)
|
||||
+ SET(LOKI_LIBRARIES "tora_loki_lib")
|
||||
+ SET(LOKI_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/loki/include)
|
||||
+ENDIF(WANT_INTERNAL_LOKI)
|
||||
IF (WANT_INTERNAL_QSCINTILLA)
|
||||
SET (TORA_QSCINTILLA_LIB tora_qscintilla2_lib)
|
||||
ENDIF (WANT_INTERNAL_QSCINTILLA)
|
||||
@@ -493,7 +501,7 @@
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${QT_INCLUDES}
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/loki/include
|
||||
+ ${LOKI_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/otl
|
||||
)
|
||||
|
||||
@@ -590,7 +598,7 @@
|
||||
ENDIF (USE_TROTL)
|
||||
|
||||
# static
|
||||
-TARGET_LINK_LIBRARIES(${EXE_NAME} ${TORA_LOKI_LIB})
|
||||
+TARGET_LINK_LIBRARIES(${EXE_NAME} ${LOKI_LIBRARIES})
|
||||
IF (WANT_INTERNAL_QSCINTILLA)
|
||||
TARGET_LINK_LIBRARIES(${EXE_NAME} ${TORA_QSCINTILLA_LIB} ${QT_LIBRARIES})
|
||||
ENDIF (WANT_INTERNAL_QSCINTILLA)
|
@ -1,26 +0,0 @@
|
||||
http://tora.svn.sourceforge.net/viewvc/tora?view=revision&revision=4264
|
||||
|
||||
--- trunk/tora/src/toextract.cpp 2012/04/17 16:08:26 4263
|
||||
+++ trunk/tora/src/toextract.cpp 2012/04/20 01:49:18 4264
|
||||
@@ -58,6 +58,9 @@
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
+#ifndef Q_OS_WIN32
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
|
||||
std::map<QString, toExtract::extractor *> *toExtract::Extractors;
|
||||
|
||||
--- trunk/tora/src/toreport.cpp 2012/04/17 16:08:26 4263
|
||||
+++ trunk/tora/src/toreport.cpp 2012/04/20 01:49:18 4264
|
||||
@@ -52,6 +52,9 @@
|
||||
#ifdef Q_OS_WIN32
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
+#ifndef Q_OS_WIN32
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
|
||||
|
||||
static bool SameContext(const QString &str, const QString &str2)
|
@ -1,81 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/tora/tora-2.1.3-r3.ebuild,v 1.3 2014/12/28 15:20:50 titanofold Exp $
|
||||
|
||||
EAPI=3
|
||||
|
||||
inherit cmake-utils eutils
|
||||
|
||||
DESCRIPTION="TOra - Toolkit For Oracle"
|
||||
HOMEPAGE="http://tora.sourceforge.net"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
IUSE="debug mysql oracle oci8-instant-client postgres"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/ferrisloki
|
||||
x11-libs/qscintilla
|
||||
dev-qt/qtgui:4
|
||||
dev-qt/qtsql:4[mysql?,postgres?]
|
||||
dev-qt/qtxmlpatterns:4
|
||||
oci8-instant-client? (
|
||||
dev-db/oracle-instantclient-basic
|
||||
dev-db/oracle-instantclient-sqlplus
|
||||
)
|
||||
postgres? ( dev-db/postgresql[server] )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_setup() {
|
||||
if ( use oracle || use oci8-instant-client ) && [ -z "$ORACLE_HOME" ] ; then
|
||||
eerror "ORACLE_HOME variable is not set."
|
||||
eerror
|
||||
eerror "You must install Oracle >= 8i client for Linux in"
|
||||
eerror "order to compile TOra with Oracle support."
|
||||
eerror
|
||||
eerror "Otherwise specify -oracle in your USE variable."
|
||||
eerror
|
||||
eerror "You can download the Oracle software from"
|
||||
eerror "http://otn.oracle.com/software/content.html"
|
||||
die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${P}-gcc-4.7.patch #430044
|
||||
epatch "${FILESDIR}"/${P}-ext-loki.patch #383109
|
||||
epatch "${FILESDIR}"/${P}-desktop.patch #484198
|
||||
sed -i \
|
||||
-e "/COPYING/ d" \
|
||||
CMakeLists.txt || die "Removal of COPYING file failed"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=()
|
||||
if use oracle || use oci8-instant-client ; then
|
||||
mycmakeargs=(-DENABLE_ORACLE=ON)
|
||||
else
|
||||
mycmakeargs=(-DENABLE_ORACLE=OFF)
|
||||
fi
|
||||
mycmakeargs+=(
|
||||
-DWANT_RPM=OFF
|
||||
-DWANT_BUNDLE=OFF
|
||||
-DWANT_BUNDLE_STANDALONE=OFF
|
||||
-DWANT_INTERNAL_QSCINTILLA=OFF
|
||||
-DWANT_INTERNAL_LOKI=OFF
|
||||
$(cmake-utils_use_enable postgres PGSQL)
|
||||
$(cmake-utils_use_want debug)
|
||||
# path variables
|
||||
-DTORA_DOC_DIR=share/doc/${PF}
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
doicon src/icons/${PN}.xpm || die
|
||||
domenu debian/${PN}.desktop || die
|
||||
}
|
@ -0,0 +1,802 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.4.38.ebuild,v 1.1 2015/02/20 08:58:48 olemarkus Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
function php_get_uri ()
|
||||
{
|
||||
case "${1}" in
|
||||
"php-pre")
|
||||
echo "http://downloads.php.net/stas/${2}"
|
||||
;;
|
||||
"php")
|
||||
echo "http://www.php.net/distributions/${2}"
|
||||
;;
|
||||
"olemarkus")
|
||||
echo "http://dev.gentoo.org/~olemarkus/php/${2}"
|
||||
;;
|
||||
"gentoo")
|
||||
echo "mirror://gentoo/${2}"
|
||||
;;
|
||||
*)
|
||||
die "unhandled case in php_get_uri"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# alias, so we can handle different types of releases (finals, rcs, alphas,
|
||||
# betas, ...) w/o changing the whole ebuild
|
||||
PHP_PV="${PV/_rc/RC}"
|
||||
PHP_PV="${PHP_PV/_alpha/alpha}"
|
||||
PHP_PV="${PHP_PV/_beta/beta}"
|
||||
PHP_RELEASE="php"
|
||||
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
|
||||
PHP_P="${PN}-${PHP_PV}"
|
||||
|
||||
PHP_PATCHSET_LOC="olemarkus"
|
||||
|
||||
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
|
||||
|
||||
PHP_PATCHSET="2"
|
||||
PHP_PATCHSET_URI="
|
||||
$(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${SLOT}-r${PHP_PATCHSET}.tar.bz2")"
|
||||
|
||||
PHP_FPM_INIT_VER="4"
|
||||
PHP_FPM_CONF_VER="1"
|
||||
|
||||
SRC_URI="
|
||||
${PHP_SRC_URI}
|
||||
${PHP_PATCHSET_URI}"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
|
||||
HOMEPAGE="http://php.net/"
|
||||
LICENSE="PHP-3"
|
||||
|
||||
S="${WORKDIR}/${PHP_P}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl curlwrappers debug
|
||||
enchant exif +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
|
||||
mssql mysql mysqlnd mysqli nls
|
||||
oci8-instant-client odbc pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
DEPEND="
|
||||
>=app-admin/eselect-php-0.7.1-r3[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( =sys-libs/db-4* )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
||||
gmp? ( >=dev-libs/gmp-4.1.2 )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
!mysqlnd? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.7 )
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
virtual/mta
|
||||
"
|
||||
|
||||
php="=${CATEGORY}/${PF}"
|
||||
|
||||
REQUIRED_USE="
|
||||
truetype? ( gd )
|
||||
cjk? ( gd )
|
||||
exif? ( gd )
|
||||
|
||||
xpm? ( gd )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
mysqlnd? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
PHP_INI_VERSION="development"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
|
||||
PHP_INI_FILE="php.ini"
|
||||
|
||||
want_apache
|
||||
|
||||
pkg_setup() {
|
||||
depend.apache_pkg_setup
|
||||
}
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}"
|
||||
|
||||
if use_if_iuse opcache; then
|
||||
elog "Adding opcache to ${phpinisrc}"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> ${phpinisrc}
|
||||
fi
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" "${PHP_INI_FILE}"
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
# SAPI-specific handling
|
||||
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
[[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
|
||||
einfo "Installing FPM CGI config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
|
||||
|
||||
# Remove bogus /etc/php-fpm.conf.default (bug 359906)
|
||||
[[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
|
||||
fi
|
||||
|
||||
# Install PHP ini files into /usr/share/php
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-production
|
||||
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
|
||||
# ([empty session.save_path]/session_mm_[sapi][gid].sem)
|
||||
# there is no easy way to circumvent that, all php calls during
|
||||
# install use -n, so no php.ini file will be used.
|
||||
# As such, this is the easiest way to get around
|
||||
addpredict /session_mm_cli250.sem
|
||||
addpredict /session_mm_cli0.sem
|
||||
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
#Add user patches #357637
|
||||
epatch_user
|
||||
|
||||
#force rebuilding aclocal.m4
|
||||
rm aclocal.m4
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# This is a global variable and should be in caps. It isn't because the
|
||||
# phpconfutils eclass relies on exactly this name...
|
||||
# for --with-libdir see bug #327025
|
||||
my_conf="
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}"/man
|
||||
--infodir="${PHP_DESTDIR}"/info
|
||||
--libdir="${PHP_DESTDIR}"/lib
|
||||
--with-libdir=$(get_libdir)
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)"
|
||||
|
||||
# extension USE flag shared
|
||||
my_conf+="
|
||||
$(use_enable bcmath bcmath )
|
||||
$(use_with bzip2 bz2 "${EPREFIX}"/usr)
|
||||
$(use_enable calendar calendar )
|
||||
$(use_enable ctype ctype )
|
||||
$(use_with curl curl "${EPREFIX}"/usr)
|
||||
$(use_with curlwrappers curlwrappers "${EPREFIX}"/usr)
|
||||
$(use_enable xml dom )
|
||||
$(use_with enchant enchant "${EPREFIX}"/usr)
|
||||
$(use_enable exif exif )
|
||||
$(use_enable fileinfo fileinfo )
|
||||
$(use_enable filter filter )
|
||||
$(use_enable ftp ftp )
|
||||
$(use_with nls gettext "${EPREFIX}"/usr)
|
||||
$(use_with gmp gmp "${EPREFIX}"/usr)
|
||||
$(use_enable hash hash )
|
||||
$(use_with mhash mhash "${EPREFIX}"/usr)
|
||||
$(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
|
||||
$(use_enable intl intl )
|
||||
$(use_enable ipv6 ipv6 )
|
||||
$(use_enable json json )
|
||||
$(use_with kerberos kerberos "${EPREFIX}"/usr)
|
||||
$(use_enable xml libxml )
|
||||
$(use_with xml libxml-dir "${EPREFIX}"/usr)
|
||||
$(use_enable unicode mbstring )
|
||||
$(use_with crypt mcrypt "${EPREFIX}"/usr)
|
||||
$(use_with mssql mssql "${EPREFIX}"/usr)
|
||||
$(use_with unicode onig "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl-dir "${EPREFIX}"/usr)
|
||||
$(use_enable pcntl pcntl )
|
||||
$(use_enable phar phar )
|
||||
$(use_enable pdo pdo )
|
||||
$(use_with postgres pgsql "${EPREFIX}"/usr)
|
||||
$(use_enable posix posix )
|
||||
$(use_with spell pspell "${EPREFIX}"/usr)
|
||||
$(use_with recode recode "${EPREFIX}"/usr)
|
||||
$(use_enable simplexml simplexml )
|
||||
$(use_enable sharedmem shmop )
|
||||
$(use_with snmp snmp "${EPREFIX}"/usr)
|
||||
$(use_enable soap soap )
|
||||
$(use_enable sockets sockets )
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}"/usr)
|
||||
$(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
|
||||
$(use_enable sysvipc sysvmsg )
|
||||
$(use_enable sysvipc sysvsem )
|
||||
$(use_enable sysvipc sysvshm )
|
||||
$(use_with systemd fpm-systemd)
|
||||
$(use_with tidy tidy "${EPREFIX}"/usr)
|
||||
$(use_enable tokenizer tokenizer )
|
||||
$(use_enable wddx wddx )
|
||||
$(use_enable xml xml )
|
||||
$(use_enable xmlreader xmlreader )
|
||||
$(use_enable xmlwriter xmlwriter )
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}"/usr)
|
||||
$(use_enable zip zip )
|
||||
$(use_with zlib zlib "${EPREFIX}"/usr)
|
||||
$(use_enable debug debug )"
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
my_conf="${my_conf} --enable-dba${shared}"
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
my_conf+="
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 ${EPREFIX}/usr)
|
||||
$(use_enable flatfile flatfile )
|
||||
$(use_with gdbm gdbm ${EPREFIX}/usr)
|
||||
$(use_enable inifile inifile )
|
||||
$(use_with qdbm qdbm ${EPREFIX}/usr)"
|
||||
|
||||
# Support for the GD graphics library
|
||||
my_conf+="
|
||||
$(use_with truetype freetype-dir ${EPREFIX}/usr)
|
||||
$(use_with truetype t1lib ${EPREFIX}/usr)
|
||||
$(use_enable cjk gd-jis-conv )
|
||||
$(use_with gd jpeg-dir ${EPREFIX}/usr)
|
||||
$(use_with gd png-dir ${EPREFIX}/usr)
|
||||
$(use_with xpm xpm-dir ${EPREFIX}/usr)"
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
my_conf+="
|
||||
$(use_with gd gd)"
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
my_conf+="
|
||||
$(use_with imap imap ${EPREFIX}/usr)
|
||||
$(use_with ssl imap-ssl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
|
||||
if use firebird ; then
|
||||
my_conf+="
|
||||
$(use_with firebird interbase ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
my_conf+="
|
||||
$(use_with ldap ldap ${EPREFIX}/usr)
|
||||
$(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
if use mysql ; then
|
||||
if use mysqlnd ; then
|
||||
my_conf+="
|
||||
$(use_with mysql mysql mysqlnd)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_with mysql mysql ${EPREFIX}/usr)"
|
||||
fi
|
||||
my_conf+="
|
||||
$(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
|
||||
fi
|
||||
|
||||
# MySQLi support
|
||||
if use mysqlnd ; then
|
||||
my_conf+="
|
||||
$(use_with mysqli mysqli mysqlnd)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_with mysqli mysqli ${EPREFIX}/usr/bin/mysql_config)"
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
if use odbc ; then
|
||||
my_conf+="
|
||||
$(use_with odbc unixODBC ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
if use iodbc ; then
|
||||
my_conf+="
|
||||
$(use_with iodbc iodbc ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Oracle support
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client oci8)"
|
||||
fi
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
my_conf+="
|
||||
$(use_with mssql pdo-dblib )"
|
||||
if use mysqlnd ; then
|
||||
my_conf+="
|
||||
$(use_with mysqlnd pdo-mysql mysqlnd)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_with mysql pdo-mysql ${EPREFIX}/usr)"
|
||||
fi
|
||||
my_conf+="
|
||||
$(use_with postgres pdo-pgsql )
|
||||
$(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
|
||||
$(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client pdo-oci)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
my_conf+="
|
||||
$(use_with readline readline ${EPREFIX}/usr)
|
||||
$(use_with libedit libedit ${EPREFIX}/usr)"
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
my_conf+="
|
||||
$(use_with sharedmem mm ${EPREFIX}/usr)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_enable session session )"
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
my_conf="${my_conf} --with-pic"
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
my_conf="${my_conf} --with-pcre-regex=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr"
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
my_conf="${my_conf} ${EXTRA_ECONF:-}"
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build"
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
|
||||
sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
|
||||
--with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --enable-${sapi}"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --disable-${sapi}"
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --without-apxs2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
econf ${sapi_conf}
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake || die "emake failed"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi"
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs \
|
||||
|| die "emake install failed"
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir /usr/share/php${PHP_MV}
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}"
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}" || die "Unable to install ${sapi} sapi"
|
||||
else
|
||||
dobin "${source}" || die "Unable to install ${sapi} sapi"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use_if_iuse opcache ; then
|
||||
dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" \
|
||||
"20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
sed -e "s|php5|php${SLOT}|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" "php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
APACHE2_MOD_DEFINE="PHP5"
|
||||
APACHE2_MOD_CONF="70_mod_php5"
|
||||
apache-module_pkg_postinst
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT}
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
|
||||
elog "to compile extensions for the ${SLOT} ABI"
|
||||
elog
|
||||
if ! use readline && use cli ; then
|
||||
ewarn "Note that in order to use php interactivly, you need to enable"
|
||||
ewarn "the readline USE flag or php -a will hang"
|
||||
fi
|
||||
elog
|
||||
elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
|
||||
elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
|
||||
elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
|
||||
elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
|
||||
|
||||
elog
|
||||
elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
|
||||
elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
eselect php cleanup
|
||||
}
|
@ -0,0 +1,784 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.5.22.ebuild,v 1.1 2015/02/20 08:58:48 olemarkus Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
function php_get_uri ()
|
||||
{
|
||||
case "${1}" in
|
||||
"php-pre")
|
||||
echo "http://downloads.php.net/dsp/${2}"
|
||||
;;
|
||||
"php")
|
||||
echo "http://www.php.net/distributions/${2}"
|
||||
;;
|
||||
"olemarkus")
|
||||
echo "http://dev.gentoo.org/~olemarkus/php/${2}"
|
||||
;;
|
||||
"gentoo")
|
||||
echo "mirror://gentoo/${2}"
|
||||
;;
|
||||
*)
|
||||
die "unhandled case in php_get_uri"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# alias, so we can handle different types of releases (finals, rcs, alphas,
|
||||
# betas, ...) w/o changing the whole ebuild
|
||||
PHP_PV="${PV/_rc/RC}"
|
||||
PHP_PV="${PHP_PV/_alpha/alpha}"
|
||||
PHP_PV="${PHP_PV/_beta/beta}"
|
||||
PHP_RELEASE="php"
|
||||
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
|
||||
PHP_P="${PN}-${PHP_PV}"
|
||||
|
||||
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
|
||||
|
||||
PHP_FPM_CONF_VER="1"
|
||||
|
||||
SRC_URI="${PHP_SRC_URI}"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
|
||||
HOMEPAGE="http://php.net/"
|
||||
LICENSE="PHP-3"
|
||||
|
||||
S="${WORKDIR}/${PHP_P}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl debug
|
||||
enchant exif frontbase +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
|
||||
mssql mysql libmysqlclient mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
DEPEND="
|
||||
>=app-admin/eselect-php-0.7.1-r3[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( =sys-libs/db-4* )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
||||
gmp? ( >=dev-libs/gmp-4.1.2 )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
libmysqlclient? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.7 )
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
vpx? ( media-libs/libvpx )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
virtual/mta
|
||||
"
|
||||
|
||||
php="=${CATEGORY}/${PF}"
|
||||
|
||||
REQUIRED_USE="
|
||||
truetype? ( gd )
|
||||
vpx? ( gd )
|
||||
cjk? ( gd )
|
||||
exif? ( gd )
|
||||
|
||||
xpm? ( gd )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
PHP_INI_VERSION="development"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
|
||||
PHP_INI_FILE="php.ini"
|
||||
|
||||
want_apache
|
||||
|
||||
pkg_setup() {
|
||||
depend.apache_pkg_setup
|
||||
}
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}"
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" "${PHP_INI_FILE}"
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use_if_iuse opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
[[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
|
||||
einfo "Installing FPM CGI config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
|
||||
|
||||
# Remove bogus /etc/php-fpm.conf.default (bug 359906)
|
||||
[[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
|
||||
fi
|
||||
|
||||
# Install PHP ini files into /usr/share/php
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-production
|
||||
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
|
||||
# ([empty session.save_path]/session_mm_[sapi][gid].sem)
|
||||
# there is no easy way to circumvent that, all php calls during
|
||||
# install use -n, so no php.ini file will be used.
|
||||
# As such, this is the easiest way to get around
|
||||
addpredict /session_mm_cli250.sem
|
||||
addpredict /session_mm_cli0.sem
|
||||
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
#Add user patches #357637
|
||||
epatch_user
|
||||
|
||||
#force rebuilding aclocal.m4
|
||||
rm aclocal.m4
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# This is a global variable and should be in caps. It isn't because the
|
||||
# phpconfutils eclass relies on exactly this name...
|
||||
# for --with-libdir see bug #327025
|
||||
my_conf="
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}"/man
|
||||
--infodir="${PHP_DESTDIR}"/info
|
||||
--libdir="${PHP_DESTDIR}"/lib
|
||||
--with-libdir=$(get_libdir)
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)"
|
||||
|
||||
# extension USE flag shared
|
||||
my_conf+="
|
||||
$(use_enable bcmath bcmath )
|
||||
$(use_with bzip2 bz2 "${EPREFIX}"/usr)
|
||||
$(use_enable calendar calendar )
|
||||
$(use_enable ctype ctype )
|
||||
$(use_with curl curl "${EPREFIX}"/usr)
|
||||
$(use_enable xml dom )
|
||||
$(use_with enchant enchant "${EPREFIX}"/usr)
|
||||
$(use_enable exif exif )
|
||||
$(use_enable fileinfo fileinfo )
|
||||
$(use_enable filter filter )
|
||||
$(use_enable ftp ftp )
|
||||
$(use_with nls gettext "${EPREFIX}"/usr)
|
||||
$(use_with gmp gmp "${EPREFIX}"/usr)
|
||||
$(use_enable hash hash )
|
||||
$(use_with mhash mhash "${EPREFIX}"/usr)
|
||||
$(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
|
||||
$(use_enable intl intl )
|
||||
$(use_enable ipv6 ipv6 )
|
||||
$(use_enable json json )
|
||||
$(use_with kerberos kerberos "${EPREFIX}"/usr)
|
||||
$(use_enable xml libxml )
|
||||
$(use_with xml libxml-dir "${EPREFIX}"/usr)
|
||||
$(use_enable unicode mbstring )
|
||||
$(use_with crypt mcrypt "${EPREFIX}"/usr)
|
||||
$(use_with mssql mssql "${EPREFIX}"/usr)
|
||||
$(use_with unicode onig "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl-dir "${EPREFIX}"/usr)
|
||||
$(use_enable pcntl pcntl )
|
||||
$(use_enable phar phar )
|
||||
$(use_enable pdo pdo )
|
||||
$(use_enable opcache opcache )
|
||||
$(use_with postgres pgsql "${EPREFIX}"/usr)
|
||||
$(use_enable posix posix )
|
||||
$(use_with spell pspell "${EPREFIX}"/usr)
|
||||
$(use_with recode recode "${EPREFIX}"/usr)
|
||||
$(use_enable simplexml simplexml )
|
||||
$(use_enable sharedmem shmop )
|
||||
$(use_with snmp snmp "${EPREFIX}"/usr)
|
||||
$(use_enable soap soap )
|
||||
$(use_enable sockets sockets )
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}"/usr)
|
||||
$(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
|
||||
$(use_enable sysvipc sysvmsg )
|
||||
$(use_enable sysvipc sysvsem )
|
||||
$(use_enable sysvipc sysvshm )
|
||||
$(use_with systemd fpm-systemd)
|
||||
$(use_with tidy tidy "${EPREFIX}"/usr)
|
||||
$(use_enable tokenizer tokenizer )
|
||||
$(use_enable wddx wddx )
|
||||
$(use_enable xml xml )
|
||||
$(use_enable xmlreader xmlreader )
|
||||
$(use_enable xmlwriter xmlwriter )
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}"/usr)
|
||||
$(use_enable zip zip )
|
||||
$(use_with zlib zlib "${EPREFIX}"/usr)
|
||||
$(use_enable debug debug )"
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
my_conf="${my_conf} --enable-dba${shared}"
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
my_conf+="
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 ${EPREFIX}/usr)
|
||||
$(use_enable flatfile flatfile )
|
||||
$(use_with gdbm gdbm ${EPREFIX}/usr)
|
||||
$(use_enable inifile inifile )
|
||||
$(use_with qdbm qdbm ${EPREFIX}/usr)"
|
||||
|
||||
# Support for the GD graphics library
|
||||
my_conf+="
|
||||
$(use_with truetype freetype-dir ${EPREFIX}/usr)
|
||||
$(use_with truetype t1lib ${EPREFIX}/usr)
|
||||
$(use_enable cjk gd-jis-conv )
|
||||
$(use_with gd jpeg-dir ${EPREFIX}/usr)
|
||||
$(use_with gd png-dir ${EPREFIX}/usr)
|
||||
$(use_with xpm xpm-dir ${EPREFIX}/usr)
|
||||
$(use_with vpx vpx-dir ${EPREFIX}/usr)"
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
my_conf+="
|
||||
$(use_with gd gd)"
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
my_conf+="
|
||||
$(use_with imap imap ${EPREFIX}/usr)
|
||||
$(use_with ssl imap-ssl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
|
||||
if use firebird ; then
|
||||
my_conf+="
|
||||
$(use_with firebird interbase ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
my_conf+="
|
||||
$(use_with ldap ldap ${EPREFIX}/usr)
|
||||
$(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
use libmysqlclient && mysqllib="${EPREFIX}/usr"
|
||||
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
|
||||
|
||||
my_conf+=" $(use_with mysql mysql $mysqllib)"
|
||||
my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
|
||||
|
||||
local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
|
||||
if use mysql ; then
|
||||
my_conf+="${mysqlsock}"
|
||||
elif use mysqli ; then
|
||||
my_conf+="${mysqlsock}"
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
if use odbc ; then
|
||||
my_conf+="
|
||||
$(use_with odbc unixODBC ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
if use iodbc ; then
|
||||
my_conf+="
|
||||
$(use_with iodbc iodbc ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Oracle support
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client oci8)"
|
||||
fi
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
my_conf+="
|
||||
$(use_with mssql pdo-dblib )
|
||||
$(use_with mysql pdo-mysql ${mysqllib})
|
||||
$(use_with postgres pdo-pgsql )
|
||||
$(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
|
||||
$(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client pdo-oci)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
my_conf+="
|
||||
$(use_with readline readline ${EPREFIX}/usr)
|
||||
$(use_with libedit libedit ${EPREFIX}/usr)"
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
my_conf+="
|
||||
$(use_with sharedmem mm ${EPREFIX}/usr)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_enable session session )"
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
my_conf="${my_conf} --with-pic"
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
my_conf="${my_conf} --with-pcre-regex=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr"
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
my_conf="${my_conf} ${EXTRA_ECONF:-}"
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build"
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
|
||||
sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
|
||||
--with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --enable-${sapi}"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --disable-${sapi}"
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --without-apxs2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
econf ${sapi_conf}
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake || die "emake failed"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi"
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs \
|
||||
|| die "emake install failed"
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir /usr/share/php${PHP_MV}
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}"
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}" || die "Unable to install ${sapi} sapi"
|
||||
else
|
||||
dobin "${source}" || die "Unable to install ${sapi} sapi"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use_if_iuse opcache ; then
|
||||
dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" \
|
||||
"20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
sed -e "s|php5|php${SLOT}|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" "php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
APACHE2_MOD_DEFINE="PHP5"
|
||||
APACHE2_MOD_CONF="70_mod_php5"
|
||||
apache-module_pkg_postinst
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT}
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
|
||||
elog "to compile extensions for the ${SLOT} ABI"
|
||||
elog
|
||||
if ! use readline && use cli ; then
|
||||
ewarn "Note that in order to use php interactivly, you need to enable"
|
||||
ewarn "the readline USE flag or php -a will hang"
|
||||
fi
|
||||
elog
|
||||
elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
|
||||
elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
|
||||
elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
|
||||
elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
|
||||
|
||||
elog
|
||||
elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
|
||||
elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
eselect php cleanup
|
||||
}
|
@ -0,0 +1,784 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.6.6.ebuild,v 1.1 2015/02/20 08:58:48 olemarkus Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
|
||||
function php_get_uri ()
|
||||
{
|
||||
case "${1}" in
|
||||
"php-pre")
|
||||
echo "http://downloads.php.net/dsp/${2}"
|
||||
;;
|
||||
"php")
|
||||
echo "http://www.php.net/distributions/${2}"
|
||||
;;
|
||||
"olemarkus")
|
||||
echo "http://dev.gentoo.org/~olemarkus/php/${2}"
|
||||
;;
|
||||
"gentoo")
|
||||
echo "mirror://gentoo/${2}"
|
||||
;;
|
||||
*)
|
||||
die "unhandled case in php_get_uri"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PHP_MV="$(get_major_version)"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# alias, so we can handle different types of releases (finals, rcs, alphas,
|
||||
# betas, ...) w/o changing the whole ebuild
|
||||
PHP_PV="${PV/_rc/RC}"
|
||||
PHP_PV="${PHP_PV/_alpha/alpha}"
|
||||
PHP_PV="${PHP_PV/_beta/beta}"
|
||||
PHP_RELEASE="php"
|
||||
[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
|
||||
[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
|
||||
PHP_P="${PN}-${PHP_PV}"
|
||||
|
||||
PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
|
||||
|
||||
PHP_FPM_CONF_VER="1"
|
||||
|
||||
SRC_URI="${PHP_SRC_URI}"
|
||||
|
||||
DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs"
|
||||
HOMEPAGE="http://php.net/"
|
||||
LICENSE="PHP-3"
|
||||
|
||||
S="${WORKDIR}/${PHP_P}"
|
||||
|
||||
# We can build the following SAPIs in the given order
|
||||
SAPIS="embed cli cgi fpm apache2"
|
||||
|
||||
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
|
||||
IUSE="${IUSE}
|
||||
${SAPIS/cli/+cli}
|
||||
threads"
|
||||
|
||||
IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
|
||||
crypt +ctype curl debug
|
||||
enchant exif frontbase +fileinfo +filter firebird
|
||||
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
||||
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
|
||||
mssql mysql libmysqlclient mysqli nls
|
||||
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
||||
readline recode selinux +session sharedmem
|
||||
+simplexml snmp soap sockets spell sqlite ssl
|
||||
sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
|
||||
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
||||
|
||||
DEPEND="
|
||||
>=app-admin/eselect-php-0.7.1-r3[apache2?,fpm?]
|
||||
>=dev-libs/libpcre-8.32[unicode]
|
||||
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
|
||||
<www-servers/apache-2.4[threads=] ) )
|
||||
berkdb? ( =sys-libs/db-4* )
|
||||
bzip2? ( app-arch/bzip2 )
|
||||
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
|
||||
cjk? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
crypt? ( >=dev-libs/libmcrypt-2.4 )
|
||||
curl? ( >=net-misc/curl-7.10.5 )
|
||||
enchant? ( app-text/enchant )
|
||||
exif? ( !gd? (
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0=
|
||||
sys-libs/zlib
|
||||
) )
|
||||
firebird? ( dev-db/firebird )
|
||||
gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
gdbm? ( >=sys-libs/gdbm-1.8.0 )
|
||||
gmp? ( >=dev-libs/gmp-4.1.2 )
|
||||
iconv? ( virtual/libiconv )
|
||||
imap? ( virtual/imap-c-client[ssl=] )
|
||||
intl? ( dev-libs/icu:= )
|
||||
iodbc? ( dev-db/libiodbc )
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( >=net-nds/openldap-1.2.11 )
|
||||
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
||||
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
|
||||
mssql? ( dev-db/freetds[mssql] )
|
||||
libmysqlclient? (
|
||||
mysql? ( virtual/mysql )
|
||||
mysqli? ( >=virtual/mysql-4.1 )
|
||||
)
|
||||
nls? ( sys-devel/gettext )
|
||||
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
|
||||
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
||||
postgres? ( dev-db/postgresql )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
readline? ( sys-libs/readline )
|
||||
recode? ( app-text/recode )
|
||||
sharedmem? ( dev-libs/mm )
|
||||
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
||||
soap? ( >=dev-libs/libxml2-2.6.8 )
|
||||
spell? ( >=app-text/aspell-0.50 )
|
||||
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.7 )
|
||||
sybase-ct? ( dev-db/freetds )
|
||||
tidy? ( app-text/htmltidy )
|
||||
truetype? (
|
||||
=media-libs/freetype-2*
|
||||
>=media-libs/t1lib-5.0.0
|
||||
!gd? (
|
||||
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
|
||||
)
|
||||
unicode? ( dev-libs/oniguruma )
|
||||
vpx? ( media-libs/libvpx )
|
||||
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xml? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
||||
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
||||
xpm? (
|
||||
x11-libs/libXpm
|
||||
virtual/jpeg:0
|
||||
media-libs/libpng:0= sys-libs/zlib
|
||||
)
|
||||
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
||||
zip? ( sys-libs/zlib )
|
||||
zlib? ( sys-libs/zlib )
|
||||
virtual/mta
|
||||
"
|
||||
|
||||
php="=${CATEGORY}/${PF}"
|
||||
|
||||
REQUIRED_USE="
|
||||
truetype? ( gd )
|
||||
vpx? ( gd )
|
||||
cjk? ( gd )
|
||||
exif? ( gd )
|
||||
|
||||
xpm? ( gd )
|
||||
gd? ( zlib )
|
||||
simplexml? ( xml )
|
||||
soap? ( xml )
|
||||
wddx? ( xml )
|
||||
xmlrpc? ( || ( xml iconv ) )
|
||||
xmlreader? ( xml )
|
||||
xslt? ( xml )
|
||||
ldap-sasl? ( ldap )
|
||||
mhash? ( hash )
|
||||
phar? ( hash )
|
||||
libmysqlclient? ( || (
|
||||
mysql
|
||||
mysqli
|
||||
pdo
|
||||
) )
|
||||
|
||||
qdbm? ( !gdbm )
|
||||
readline? ( !libedit )
|
||||
recode? ( !imap !mysql !mysqli )
|
||||
sharedmem? ( !threads )
|
||||
|
||||
!cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
fpm? (
|
||||
selinux? ( sec-policy/selinux-phpfpm )
|
||||
systemd? ( sys-apps/systemd ) )"
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/flex
|
||||
>=sys-devel/m4-1.4.3
|
||||
>=sys-devel/libtool-1.5.18"
|
||||
|
||||
# Allow users to install production version if they want to
|
||||
|
||||
case "${PHP_INI_VERSION}" in
|
||||
production|development)
|
||||
;;
|
||||
*)
|
||||
PHP_INI_VERSION="development"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
|
||||
PHP_INI_FILE="php.ini"
|
||||
|
||||
want_apache
|
||||
|
||||
pkg_setup() {
|
||||
depend.apache_pkg_setup
|
||||
}
|
||||
|
||||
php_install_ini() {
|
||||
local phpsapi="${1}"
|
||||
|
||||
# work out where we are installing the ini file
|
||||
php_set_ini_dir "${phpsapi}"
|
||||
|
||||
local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
|
||||
cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
|
||||
|
||||
# default to /tmp for save_path, bug #282768
|
||||
sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
|
||||
|
||||
# Set the extension dir
|
||||
sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
|
||||
|
||||
# Set the include path to point to where we want to find PEAR packages
|
||||
sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}"
|
||||
|
||||
dodir "${PHP_INI_DIR#${EPREFIX}}"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${phpinisrc}" "${PHP_INI_FILE}"
|
||||
|
||||
elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
|
||||
elog
|
||||
|
||||
dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
|
||||
dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
|
||||
|
||||
if use_if_iuse opcache; then
|
||||
elog "Adding opcache to $PHP_EXT_INI_DIR"
|
||||
echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
|
||||
dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
|
||||
fi
|
||||
|
||||
# SAPI-specific handling
|
||||
|
||||
if [[ "${sapi}" == "fpm" ]] ; then
|
||||
[[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
|
||||
einfo "Installing FPM CGI config file php-fpm.conf"
|
||||
insinto "${PHP_INI_DIR#${EPREFIX}}"
|
||||
newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
|
||||
|
||||
# Remove bogus /etc/php-fpm.conf.default (bug 359906)
|
||||
[[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
|
||||
fi
|
||||
|
||||
# Install PHP ini files into /usr/share/php
|
||||
|
||||
dodoc php.ini-development
|
||||
dodoc php.ini-production
|
||||
|
||||
}
|
||||
|
||||
php_set_ini_dir() {
|
||||
PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
|
||||
PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
|
||||
PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
|
||||
# ([empty session.save_path]/session_mm_[sapi][gid].sem)
|
||||
# there is no easy way to circumvent that, all php calls during
|
||||
# install use -n, so no php.ini file will be used.
|
||||
# As such, this is the easiest way to get around
|
||||
addpredict /session_mm_cli250.sem
|
||||
addpredict /session_mm_cli0.sem
|
||||
|
||||
# Change PHP branding
|
||||
# Get the alpha/beta/rc version
|
||||
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
|
||||
-i configure.in || die "Unable to change PHP branding"
|
||||
|
||||
# Patch PHP to show Gentoo as the server platform
|
||||
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
|
||||
-i configure.in || die "Failed to fix server platform name"
|
||||
|
||||
# Prevent PHP from activating the Apache config,
|
||||
# as we will do that ourselves
|
||||
sed -i \
|
||||
-e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
-e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
|
||||
configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
|
||||
|
||||
# Patch PHP to support heimdal instead of mit-krb5
|
||||
if has_version "app-crypt/heimdal" ; then
|
||||
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal libname"
|
||||
sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
|
||||
|| die "Failed to fix heimdal crypt library reference"
|
||||
fi
|
||||
|
||||
#Add user patches #357637
|
||||
epatch_user
|
||||
|
||||
#force rebuilding aclocal.m4
|
||||
rm aclocal.m4
|
||||
eautoreconf
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# http://bugs.php.net/bug.php?id=48795, bug #343481
|
||||
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
|
||||
|
||||
# This is a global variable and should be in caps. It isn't because the
|
||||
# phpconfutils eclass relies on exactly this name...
|
||||
# for --with-libdir see bug #327025
|
||||
my_conf="
|
||||
--prefix="${PHP_DESTDIR}"
|
||||
--mandir="${PHP_DESTDIR}"/man
|
||||
--infodir="${PHP_DESTDIR}"/info
|
||||
--libdir="${PHP_DESTDIR}"/lib
|
||||
--with-libdir=$(get_libdir)
|
||||
--without-pear
|
||||
$(use_enable threads maintainer-zts)"
|
||||
|
||||
# extension USE flag shared
|
||||
my_conf+="
|
||||
$(use_enable bcmath bcmath )
|
||||
$(use_with bzip2 bz2 "${EPREFIX}"/usr)
|
||||
$(use_enable calendar calendar )
|
||||
$(use_enable ctype ctype )
|
||||
$(use_with curl curl "${EPREFIX}"/usr)
|
||||
$(use_enable xml dom )
|
||||
$(use_with enchant enchant "${EPREFIX}"/usr)
|
||||
$(use_enable exif exif )
|
||||
$(use_enable fileinfo fileinfo )
|
||||
$(use_enable filter filter )
|
||||
$(use_enable ftp ftp )
|
||||
$(use_with nls gettext "${EPREFIX}"/usr)
|
||||
$(use_with gmp gmp "${EPREFIX}"/usr)
|
||||
$(use_enable hash hash )
|
||||
$(use_with mhash mhash "${EPREFIX}"/usr)
|
||||
$(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
|
||||
$(use_enable intl intl )
|
||||
$(use_enable ipv6 ipv6 )
|
||||
$(use_enable json json )
|
||||
$(use_with kerberos kerberos "${EPREFIX}"/usr)
|
||||
$(use_enable xml libxml )
|
||||
$(use_with xml libxml-dir "${EPREFIX}"/usr)
|
||||
$(use_enable unicode mbstring )
|
||||
$(use_with crypt mcrypt "${EPREFIX}"/usr)
|
||||
$(use_with mssql mssql "${EPREFIX}"/usr)
|
||||
$(use_with unicode onig "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl "${EPREFIX}"/usr)
|
||||
$(use_with ssl openssl-dir "${EPREFIX}"/usr)
|
||||
$(use_enable pcntl pcntl )
|
||||
$(use_enable phar phar )
|
||||
$(use_enable pdo pdo )
|
||||
$(use_enable opcache opcache )
|
||||
$(use_with postgres pgsql "${EPREFIX}"/usr)
|
||||
$(use_enable posix posix )
|
||||
$(use_with spell pspell "${EPREFIX}"/usr)
|
||||
$(use_with recode recode "${EPREFIX}"/usr)
|
||||
$(use_enable simplexml simplexml )
|
||||
$(use_enable sharedmem shmop )
|
||||
$(use_with snmp snmp "${EPREFIX}"/usr)
|
||||
$(use_enable soap soap )
|
||||
$(use_enable sockets sockets )
|
||||
$(use_with sqlite sqlite3 "${EPREFIX}"/usr)
|
||||
$(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
|
||||
$(use_enable sysvipc sysvmsg )
|
||||
$(use_enable sysvipc sysvsem )
|
||||
$(use_enable sysvipc sysvshm )
|
||||
$(use_with systemd fpm-systemd)
|
||||
$(use_with tidy tidy "${EPREFIX}"/usr)
|
||||
$(use_enable tokenizer tokenizer )
|
||||
$(use_enable wddx wddx )
|
||||
$(use_enable xml xml )
|
||||
$(use_enable xmlreader xmlreader )
|
||||
$(use_enable xmlwriter xmlwriter )
|
||||
$(use_with xmlrpc xmlrpc)
|
||||
$(use_with xslt xsl "${EPREFIX}"/usr)
|
||||
$(use_enable zip zip )
|
||||
$(use_with zlib zlib "${EPREFIX}"/usr)
|
||||
$(use_enable debug debug )"
|
||||
|
||||
# DBA support
|
||||
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
||||
|| use qdbm ; then
|
||||
my_conf="${my_conf} --enable-dba${shared}"
|
||||
fi
|
||||
|
||||
# DBA drivers support
|
||||
my_conf+="
|
||||
$(use_with cdb cdb)
|
||||
$(use_with berkdb db4 ${EPREFIX}/usr)
|
||||
$(use_enable flatfile flatfile )
|
||||
$(use_with gdbm gdbm ${EPREFIX}/usr)
|
||||
$(use_enable inifile inifile )
|
||||
$(use_with qdbm qdbm ${EPREFIX}/usr)"
|
||||
|
||||
# Support for the GD graphics library
|
||||
my_conf+="
|
||||
$(use_with truetype freetype-dir ${EPREFIX}/usr)
|
||||
$(use_with truetype t1lib ${EPREFIX}/usr)
|
||||
$(use_enable cjk gd-jis-conv )
|
||||
$(use_with gd jpeg-dir ${EPREFIX}/usr)
|
||||
$(use_with gd png-dir ${EPREFIX}/usr)
|
||||
$(use_with xpm xpm-dir ${EPREFIX}/usr)
|
||||
$(use_with vpx vpx-dir ${EPREFIX}/usr)"
|
||||
# enable gd last, so configure can pick up the previous settings
|
||||
my_conf+="
|
||||
$(use_with gd gd)"
|
||||
|
||||
# IMAP support
|
||||
if use imap ; then
|
||||
my_conf+="
|
||||
$(use_with imap imap ${EPREFIX}/usr)
|
||||
$(use_with ssl imap-ssl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Interbase/firebird support
|
||||
|
||||
if use firebird ; then
|
||||
my_conf+="
|
||||
$(use_with firebird interbase ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# LDAP support
|
||||
if use ldap ; then
|
||||
my_conf+="
|
||||
$(use_with ldap ldap ${EPREFIX}/usr)
|
||||
$(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# MySQL support
|
||||
local mysqllib="mysqlnd"
|
||||
local mysqlilib="mysqlnd"
|
||||
use libmysqlclient && mysqllib="${EPREFIX}/usr"
|
||||
use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
|
||||
|
||||
my_conf+=" $(use_with mysql mysql $mysqllib)"
|
||||
my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
|
||||
|
||||
local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
|
||||
if use mysql ; then
|
||||
my_conf+="${mysqlsock}"
|
||||
elif use mysqli ; then
|
||||
my_conf+="${mysqlsock}"
|
||||
fi
|
||||
|
||||
# ODBC support
|
||||
if use odbc ; then
|
||||
my_conf+="
|
||||
$(use_with odbc unixODBC ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
if use iodbc ; then
|
||||
my_conf+="
|
||||
$(use_with iodbc iodbc ${EPREFIX}/usr)"
|
||||
fi
|
||||
|
||||
# Oracle support
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client oci8)"
|
||||
fi
|
||||
|
||||
# PDO support
|
||||
if use pdo ; then
|
||||
my_conf+="
|
||||
$(use_with mssql pdo-dblib )
|
||||
$(use_with mysql pdo-mysql ${mysqllib})
|
||||
$(use_with postgres pdo-pgsql )
|
||||
$(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
|
||||
$(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
|
||||
if use oci8-instant-client ; then
|
||||
my_conf+="
|
||||
$(use_with oci8-instant-client pdo-oci)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# readline/libedit support
|
||||
my_conf+="
|
||||
$(use_with readline readline ${EPREFIX}/usr)
|
||||
$(use_with libedit libedit ${EPREFIX}/usr)"
|
||||
|
||||
# Session support
|
||||
if use session ; then
|
||||
my_conf+="
|
||||
$(use_with sharedmem mm ${EPREFIX}/usr)"
|
||||
else
|
||||
my_conf+="
|
||||
$(use_enable session session )"
|
||||
fi
|
||||
|
||||
# Use pic for shared modules such as apache2's mod_php
|
||||
my_conf="${my_conf} --with-pic"
|
||||
|
||||
# we use the system copy of pcre
|
||||
# --with-pcre-regex affects ext/pcre
|
||||
# --with-pcre-dir affects ext/filter and ext/zip
|
||||
my_conf="${my_conf} --with-pcre-regex=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr"
|
||||
|
||||
# Catch CFLAGS problems
|
||||
# Fixes bug #14067.
|
||||
# Changed order to run it in reverse for bug #32022 and #12021.
|
||||
replace-cpu-flags "k6*" "i586"
|
||||
|
||||
# Support user-passed configuration parameters
|
||||
my_conf="${my_conf} ${EXTRA_ECONF:-}"
|
||||
|
||||
# Support the Apache2 extras, they must be set globally for all
|
||||
# SAPIs to work correctly, especially for external PHP extensions
|
||||
|
||||
mkdir -p "${WORKDIR}/sapis-build"
|
||||
for one_sapi in $SAPIS ; do
|
||||
use "${one_sapi}" || continue
|
||||
php_set_ini_dir "${one_sapi}"
|
||||
|
||||
cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${one_sapi}"
|
||||
|
||||
sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
|
||||
--with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
|
||||
|
||||
for sapi in $SAPIS ; do
|
||||
case "$sapi" in
|
||||
cli|cgi|embed|fpm)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --enable-${sapi}"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --disable-${sapi}"
|
||||
fi
|
||||
;;
|
||||
|
||||
apache2)
|
||||
if [[ "${one_sapi}" == "${sapi}" ]] ; then
|
||||
sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
|
||||
else
|
||||
sapi_conf="${sapi_conf} --without-apxs2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
econf ${sapi_conf}
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# snmp seems to run during src_compile, too (bug #324739)
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
addpredict /var/lib/net-snmp/mib_indexes
|
||||
|
||||
for sapi in ${SAPIS} ; do
|
||||
if use "${sapi}"; then
|
||||
cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
|
||||
emake || die "emake failed"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# see bug #324739 for what happens when we don't have that
|
||||
addpredict /usr/share/snmp/mibs/.index
|
||||
|
||||
# grab the first SAPI that got built and install common files from there
|
||||
local first_sapi=""
|
||||
for sapi in $SAPIS ; do
|
||||
if use $sapi ; then
|
||||
first_sapi=$sapi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Makefile forgets to create this before trying to write to it...
|
||||
dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
|
||||
|
||||
# Install php environment (without any sapis)
|
||||
cd "${WORKDIR}/sapis-build/$first_sapi"
|
||||
emake INSTALL_ROOT="${D}" \
|
||||
install-build install-headers install-programs \
|
||||
|| die "emake install failed"
|
||||
|
||||
local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
|
||||
|
||||
# Create the directory where we'll put version-specific php scripts
|
||||
keepdir /usr/share/php${PHP_MV}
|
||||
|
||||
local sapi="", file=""
|
||||
local sapi_list=""
|
||||
|
||||
for sapi in ${SAPIS}; do
|
||||
if use "${sapi}" ; then
|
||||
einfo "Installing SAPI: ${sapi}"
|
||||
cd "${WORKDIR}/sapis-build/${sapi}"
|
||||
|
||||
if [[ "${sapi}" == "apache2" ]] ; then
|
||||
# We're specifically not using emake install-sapi as libtool
|
||||
# may cause unnecessary relink failures (see bug #351266)
|
||||
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
|
||||
newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)"
|
||||
keepdir "/usr/$(get_libdir)/apache2/modules"
|
||||
else
|
||||
# needed each time, php_install_ini would reset it
|
||||
local dest="${PHP_DESTDIR#${EPREFIX}}"
|
||||
into "${dest}"
|
||||
case "$sapi" in
|
||||
cli)
|
||||
source="sapi/cli/php"
|
||||
;;
|
||||
cgi)
|
||||
source="sapi/cgi/php-cgi"
|
||||
;;
|
||||
fpm)
|
||||
source="sapi/fpm/php-fpm"
|
||||
;;
|
||||
embed)
|
||||
source="libs/libphp${PHP_MV}$(get_libname)"
|
||||
;;
|
||||
*)
|
||||
die "unhandled sapi in src_install"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${source}" == *"$(get_libname)" ]]; then
|
||||
dolib.so "${source}" || die "Unable to install ${sapi} sapi"
|
||||
else
|
||||
dobin "${source}" || die "Unable to install ${sapi} sapi"
|
||||
local name="$(basename ${source})"
|
||||
dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
|
||||
fi
|
||||
fi
|
||||
|
||||
php_install_ini "${sapi}"
|
||||
|
||||
# construct correct SAPI string for php-config
|
||||
# thanks to ferringb for the bash voodoo
|
||||
if [[ "${sapi}" == "apache2" ]]; then
|
||||
sapi_list="${sapi_list:+${sapi_list} }apache2handler"
|
||||
else
|
||||
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Installing opcache module
|
||||
if use_if_iuse opcache ; then
|
||||
dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
|
||||
fi
|
||||
|
||||
# Install env.d files
|
||||
newenvd "${FILESDIR}/20php5-envd" \
|
||||
"20php${SLOT}"
|
||||
sed -e "s|/lib/|/$(get_libdir)/|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
sed -e "s|php5|php${SLOT}|g" -i \
|
||||
"${ED}/etc/env.d/20php${SLOT}"
|
||||
|
||||
# set php-config variable correctly (bug #278439)
|
||||
sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
|
||||
"${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
|
||||
|
||||
if use fpm ; then
|
||||
if use systemd; then
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@${SLOT}.service"
|
||||
else
|
||||
systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" "php-fpm@${SLOT}.service"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
|
||||
if [[ ! -x "${PHP_BIN}" ]] ; then
|
||||
ewarn "Test phase requires USE=cli, skipping"
|
||||
return
|
||||
else
|
||||
export TEST_PHP_EXECUTABLE="${PHP_BIN}"
|
||||
fi
|
||||
|
||||
if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
|
||||
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
|
||||
fi
|
||||
|
||||
REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \
|
||||
"${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}"
|
||||
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
mv "${name}.out" "${name}.out.orig" 2>/dev/null
|
||||
done
|
||||
|
||||
local failed="$(find -name '*.out')"
|
||||
if [[ ${failed} != "" ]] ; then
|
||||
ewarn "The following test cases failed unexpectedly:"
|
||||
for name in ${failed}; do
|
||||
ewarn " ${name/.out/}"
|
||||
done
|
||||
else
|
||||
einfo "No unexpected test failures, all fine"
|
||||
fi
|
||||
|
||||
if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
|
||||
local passed=""
|
||||
for name in ${EXPECTED_TEST_FAILURES}; do
|
||||
[[ -f "${name}.diff" ]] && continue
|
||||
passed="${passed} ${name}"
|
||||
done
|
||||
if [[ ${passed} != "" ]] ; then
|
||||
einfo "The following test cases passed unexpectedly:"
|
||||
for name in ${passed}; do
|
||||
ewarn " ${passed}"
|
||||
done
|
||||
else
|
||||
einfo "None of the known-to-fail tests passed, all fine"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Output some general info to the user
|
||||
if use apache2 ; then
|
||||
APACHE2_MOD_DEFINE="PHP5"
|
||||
APACHE2_MOD_CONF="70_mod_php5"
|
||||
apache-module_pkg_postinst
|
||||
fi
|
||||
|
||||
# Create the symlinks for php
|
||||
for m in ${SAPIS}; do
|
||||
[[ ${m} == 'embed' ]] && continue;
|
||||
if use $m ; then
|
||||
local ci=$(eselect php show $m)
|
||||
if [[ -z $ci ]]; then
|
||||
eselect php set $m php${SLOT}
|
||||
einfo "Switched ${m} to use php:${SLOT}"
|
||||
einfo
|
||||
elif [[ $ci != "php${SLOT}" ]] ; then
|
||||
elog "To switch $m to use php:${SLOT}, run"
|
||||
elog " eselect php set $m php${SLOT}"
|
||||
elog
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
|
||||
elog "to compile extensions for the ${SLOT} ABI"
|
||||
elog
|
||||
if ! use readline && use cli ; then
|
||||
ewarn "Note that in order to use php interactivly, you need to enable"
|
||||
ewarn "the readline USE flag or php -a will hang"
|
||||
fi
|
||||
elog
|
||||
elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
|
||||
elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
|
||||
elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
|
||||
elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
|
||||
|
||||
elog
|
||||
elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
|
||||
elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
eselect php cleanup
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST vdk-2.4.1.tar.gz 1062475 SHA256 4eddaa278f8999dbe0c555614cc805603c5434a383de14ca069a3a99a72c68e8 SHA512 ffb0a2cc06f2b5a4e344ecbff8e780a37d8ee7933d2d911670ef08b4b90a2b3744ea1e61baa373af0b424ca992b5ddf956998fea5683907899071ff57b046f35 WHIRLPOOL ce7e6586d54c93ace381676a5929ac9263012b14d4d8befaec6389d2f2dd49712af6160bd1ed7b8aaa67a997cb57adfda82a5eae3b819ca7bee55eec7bc71ce5
|
||||
DIST vdk-2.5.1.tar.gz 1113765 SHA256 5d8f6942b8ec2f83b477f24a4e15a9945c1b1b348412d3d22a89627a35130745 SHA512 49e458785d88ab145b40e6ddcd5c7aadc950697b797d17f1ac633354abb46cd7457ea449c62d4993fca53136051d7d7810a15ab561b49e730635566021997292 WHIRLPOOL 8240ccaaffe1169fbe13b25f585f2e0df483ff633f1e0bf00d2b01b5c60e29a21d7e1a0dbe8bb90da69d0e04c330a3ebb81ffc6355afa314af3a4733e7bcd65d
|
||||
|
@ -1,63 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/vdk/vdk-2.4.1.ebuild,v 1.12 2015/01/15 11:27:27 armin76 Exp $
|
||||
|
||||
EAPI=1
|
||||
inherit eutils toolchain-funcs
|
||||
|
||||
DESCRIPTION="A Visual Development Kit for RAD"
|
||||
SRC_URI="mirror://sourceforge/vdklib/${P}.tar.gz"
|
||||
HOMEPAGE="http://www.mariomotta.it/vdklib/"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~hppa ppc x86"
|
||||
IUSE="doc debug"
|
||||
|
||||
RDEPEND="x11-libs/gtk+:2"
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-doc/doxygen )"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
epatch "${FILESDIR}"/vdk-2.4.1-gcc4.patch
|
||||
epatch "${FILESDIR}"/vdk-2.4.1-gcc43.patch
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local myconf=""
|
||||
|
||||
# gnome and sigc USE flags need to be added later
|
||||
# when upstream decides to re-support them - ChrisWhite
|
||||
|
||||
use doc && \
|
||||
myconf="${myconf} --enable-doc-html=yes \
|
||||
--enable-doc-latex=yes \
|
||||
--enable-doc-man=yes" \
|
||||
|| myconf="${myconf} --enable-doc-html=no \
|
||||
--enable-doc-latex=no \
|
||||
--enable-doc-man=no"
|
||||
|
||||
use debug && \
|
||||
myconf="${myconf} --enable-debug=yes" \
|
||||
|| myconf="${myconf} --enable-debug=no"
|
||||
|
||||
econf \
|
||||
${myconf} \
|
||||
--enable-testvdk=no \
|
||||
|| die "econf failed"
|
||||
|
||||
# die non user custom CFLAGS!
|
||||
sed -e "s/CFLAGS = .*/CFLAGS = ${CFLAGS}/" -i Makefile
|
||||
sed -e "s/CXXFLAGS = .*/CXXFLAGS = ${CXXFLAGS}/" -i Makefile
|
||||
sed -e "s/CFLAGS = .*/CFLAGS = ${CFLAGS}/" -i vdk/Makefile
|
||||
sed -e "s/CXXFLAGS = .*/CXXFLAGS = ${CXXFLAGS}/" -i vdk/Makefile
|
||||
|
||||
emake || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make DESTDIR="${D}" install || die
|
||||
dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README TODO
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST vdr-dvbsddevice-2.0.0.tar.gz 18780 SHA256 e93998ba7fe5735735f59fb1c2375fa09ec4c2b87a5fc448f8de5f2f49c95d9f SHA512 e0e32158fb3d8cc5857a85e89ba7d4f7c641509b21184022d4c7184621db01f93380bde7fdce9540e3cba73dc40ae405bdad323aee989f07ad1f0ce5f4d533ca WHIRLPOOL 9324421f1684d9f2ebc1b0da23408b455023ba9688f2832997c53e458852467fe67cb4c40dcf75f073dd558e83ff27d32fc5f52d6f495ec9753ea16f557169a1
|
||||
DIST vdr-dvbsddevice-2.2.0.tar.gz 19122 SHA256 efafadfed2b6a39473706de9cb6270858a6b7dfe2d973b059ab2c3c7750ae11b SHA512 261861070c1acd2bfac2b0942e46d91a97d694ce3f392bfa4c3707eff104f58cb86db56cddc2f3d76be69e487b11ffb005b9c123626b45c0f0ed8a9e10ddcf91 WHIRLPOOL f9e73e16e846f9716528af0c92ab0ae0d816c9d23c671b1fa358b3b1e1d12f4a4cf18c304cd5da105b61d00f625b6fe3604893b83a754e6d5de5ffe35065b78e
|
||||
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-dvbsddevice/vdr-dvbsddevice-2.2.0.ebuild,v 1.1 2015/02/20 09:33:49 hd_brummy Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit vdr-plugin-2
|
||||
|
||||
DESCRIPTION="VDR Plugin: output device for the 'Full Featured' SD DVB Card"
|
||||
HOMEPAGE="http://www.tvdr.de/"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz
|
||||
http://dev.gentoo.org/~hd_brummy/distfiles/${P}.tar.gz"
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=media-video/vdr-2.2.0"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_install() {
|
||||
vdr-plugin-2_src_install
|
||||
|
||||
doheader "${S}"/dvbsdffdevice.h
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST vdr-rcu-2.0.0.tar.gz 11982 SHA256 f4f01e7351ca425effc76d9c558a9fd7283e67bac311fa071207879265a37880 SHA512 db3bca0a9300b6ee0fb1a0035f4b9847a5f946b73e0e33938e5bc756ab5f990d768e0873ade5dff2b4ad15f378428ce77a77172263a97d69648a39c9e177b1a5 WHIRLPOOL 7a91fa73f7629378670a24122d9616ffd863d96cbfa110f583899564a995a81cc2ce9e330bcda77ff0856f03669a31b910b27235215eb448529c699a4fda7e5d
|
||||
DIST vdr-rcu-2.2.0.tar.gz 12121 SHA256 2c9a5cf5afcf2ae4950437f7899935b6fa8fa7b4b31d06534e5cdacae7a94270 SHA512 78c93a2c9eeb3bd82ddc74dd616753b82841a396a7db75476f86e55911528a29aaeb9a3bae900035b91f7ec886a59828c54aa27d5785ec103c160dc8cff4e5fc WHIRLPOOL 3a1a840503ac4ee29c67fca46b6ca95b535612e3a2065b90b9b16de2f728b12648bdbf3726e2a70f01d7978a04c50b7625849e17a5c854dcc7ed5a71917a740c
|
||||
|
@ -0,0 +1,19 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-rcu/vdr-rcu-2.2.0.ebuild,v 1.1 2015/02/20 09:36:45 hd_brummy Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit vdr-plugin-2
|
||||
|
||||
DESCRIPTION="VDR plugin: Remote Control Unit consists mainly of an infrared receiver, controlled by a PIC 16C84"
|
||||
HOMEPAGE="http://www.tvdr.de/remote.htm"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz
|
||||
http://dev.gentoo.org/~hd_brummy/distfiles/${P}.tar.gz"
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=media-video/vdr-2.2.0"
|
@ -1 +1,2 @@
|
||||
DIST vdr-skincurses-2.0.0.tar.gz 16902 SHA256 489036b6e6d1c61f8cf4196fd13c85b739f928451d0705067f81521b08fcf273 SHA512 455c479ea450d2ffd7dbd2f6410f70d095ba7317abd21ebc55d2d1952ad675ce0d23baee6e2a56f208ae9c16e435c9f644a2a66841245154889bb96497d3489d WHIRLPOOL 0d4405cc3f2cef68fe9dce2e2484e71e65be739aa21b25b69a1e9207d89b2ca74ea0aba12e264eb12c1942cd92359c97151ce317238359f60df17cf44090cf9e
|
||||
DIST vdr-skincurses-2.2.0.tar.gz 17141 SHA256 0e46374d2097395b139fe0ce88b470d8c3a3c3f12a45f0cf7f64fd04c12b319c SHA512 4b5fa7caab0bb89eed637732b005c4a3e1357624e8f73760645ffc6908c7d9595b4f95b87dac904b54b7292fc83669d6b1b0f009bb993d220392f8eb215085d5 WHIRLPOOL 01221334291603a1caf2ab3c0a18bc0ff900c5cd94f3c34f2d03b21cd394d1f26fd6ad8f57f19a2d72e788e43307474d23ad19e3cee85c68b68c789335004cad
|
||||
|
@ -0,0 +1,19 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-skincurses/vdr-skincurses-2.2.0.ebuild,v 1.1 2015/02/20 09:39:39 hd_brummy Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit vdr-plugin-2
|
||||
|
||||
DESCRIPTION="VDR plugin: show content of menu in a shell window"
|
||||
HOMEPAGE="http://www.tvdr.de/"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz
|
||||
http://dev.gentoo.org/~hd_brummy/distfiles/${P}.tar.gz"
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=media-video/vdr-2.2.0"
|
@ -1,8 +1,5 @@
|
||||
DIST extpng-vdr-2.0.4-gentoo-edition-v1.patch.bz2 66092 SHA256 4da8573ee8ad6d5524563e805591407774c4cc7aa10d92ccbff3efa90473b795 SHA512 42c4f488f7cc28491e0652a923fd2e49cad9e749261c0907f1911d5e377009e9ff0adbb1f9385a6a00151ec6934d1e6fd38fc8356d2811abc827df775171469c WHIRLPOOL 012f63ce69a949aedba091f88cc8bce04352d45ba962c55522849003c020072295405cef9813af41bb15af0d30b006eb1b9b1fb149b3b948e89b40d4f32b710e
|
||||
DIST extpng-vdr-2.0.6-gentoo-edition-v6.patch.bz2 69472 SHA256 f2ea1371b88898acfde5fa390f5b13a5c23065a877bbba5658a194e64d6553e5 SHA512 f4ecb786ec5a026fa75fcf539518e80273bf43fc325c13a380c70eb85351910efa991b3ee71ca477e597bc2b4598a18620b6cf00fc02714acfcc4e6112d84b6c WHIRLPOOL 13bb3697afa4b2665d9de3de8892a0baf877991642a94d3305e15d98cbcba73aa743f80bdd76f9a3297653c92e99ec6ae629ed7919c26c730cef2fa2fd608ef1
|
||||
DIST extpng-vdr-2.2.0-gentoo-edition-v1.patch.bz2 34664 SHA256 eebc812b160f5f44d665efa7bacd5abc57b27815deb28eb3d83ea3129d43b2b5 SHA512 16d6fbb8201f003dfe653b6a49424b794d7e697e27ad6f2383dbe17b76712ea5a3da88a676900b84d75ff7425bf3eb9084d60a89a4598758f482dc1f013f7b3e WHIRLPOOL 702ec541dcdb075ba9e9df450312c7a5ca3b34e9520edaf85a89426734d184b3cc8138a2ed8ad0c34fb7599d99d48c7538842c7f8126751f3b3ebeb6702cac4d
|
||||
DIST vdr-2.0.4.tar.bz2 836834 SHA256 4c1ab2e7fa01c95ff83feec7601ad7241a256f05f7d15ef1d79b5b84b84f9ea3 SHA512 b64bbb61eb049b5f34c351b1ca0d77a93830dd8ca6fdec81becbc3be01f833512852c59e7e5290708d9f7b9bfb46d573d269300ffd025cc791263ff7323a632b WHIRLPOOL 113542272970fa1413b8ec296445eb198e319bba5dfa0c24a0e193afffff3cdcca563ae98c2b2bc4d49d779f401ba93c1e3aa0268f2a10d2b495e3e5d4be9c00
|
||||
DIST vdr-2.0.5.tar.bz2 837135 SHA256 04490e31241c3ba1e26cdc1bf7ab119fa08b2a0ebe07a9082b4a48e30a3b25ea SHA512 4a6d6f86648891c474a1af948ecc14c8f2c7b7e44356f4237fc96f962a3a778fdba4b30c26966e97dbaa17c1c809898de4e50583c8c950dd9cb27409a4b401df WHIRLPOOL b79a26c522feb062021080b8888158e8ca0ccc43759841a8b59e6ca94c7b6004e3445edab2e34c760338518510e169ea1214371ceb8736470defab0662d2cb7c
|
||||
DIST vdr-2.0.6.tar.bz2 839575 SHA256 c33c6431726378d5af575d8cfcacd34a50d17334e091dc4a095b6b75bc99b972 SHA512 070ebbfb85478887088567872a71744305dbf9c75de8b095a8fe46d883b0b4fe140539caeb2243715f42793a45790a127542655f549f7ea3cb71c4f9912fa07d WHIRLPOOL c9d1cf47473299617d1eeca7b5445450448c558b17a20193260bf3a01030eb81e29f210dc349e9b3a51137acd6d866201d07860a79954ae2da2b87159db3e511
|
||||
DIST vdr-2.0.7.tar.bz2 841511 SHA256 5c81418dc97d70ae965af5bdf641057cb64a7e76ecf9c94f72e417cc6c73fb13 SHA512 cba35f62162cd681179872915023890f492e95cc94d65aadd3cb4d03d7e3c7e2f197e7f35149cdf872169af35c2b841e1042e054f28164860b7cea8367793ce0 WHIRLPOOL 262e8e96d399c34ae492d92491720346c29c3d84bfb1c8b4a1e992f3586514f698d9f33f5a3b8e8204a054ee41767547ad4510a6a7637c1b27e917655481ab5a
|
||||
DIST vdr-2.2.0.tar.bz2 922708 SHA256 7c259e1ed1f39d93d23df1d5d0f85dd2a1fa9ec1dadff79e5833e2ff3ebf6c4e SHA512 183f58133915c6c0fe8ec2b88becbcb2a36418210e6dcf7931053d3771d727c3581593f9eb5c9693abf39e22e728f7b41c42079cd704610c3636ec05134ea93d WHIRLPOOL 2ce98f242e7ae3e7969005fde7214a2707749ab06622e78d56764c50c9a3f1e6e06a693091f19d45dc537b1702d365d3f9cfa4af24fb61aa8a0c64c5385fa19e
|
||||
|
@ -1,17 +0,0 @@
|
||||
the member variable keepTracks is initialized too late in the cDevice
|
||||
|
||||
--- device.c 2013/03/07 13:18:35 3.0
|
||||
+++ device.c 2013/04/05 10:05:33
|
||||
@@ -94,11 +94,11 @@
|
||||
|
||||
player = NULL;
|
||||
isPlayingVideo = false;
|
||||
+ keepTracks = false; // used in ClrAvailableTracks()!
|
||||
ClrAvailableTracks();
|
||||
currentAudioTrack = ttNone;
|
||||
currentAudioTrackMissingCount = 0;
|
||||
currentSubtitleTrack = ttNone;
|
||||
- keepTracks = false;
|
||||
liveSubtitle = NULL;
|
||||
dvbSubtitleConverter = NULL;
|
||||
autoSelectPreferredSubtitleLanguage = true;
|
@ -1,75 +0,0 @@
|
||||
disabled compile from included plugins, we dont support this way on gentoo
|
||||
support for linguas handling
|
||||
fixed install an multicore cpu
|
||||
|
||||
changed path to install header files in own dir vdr, libsi
|
||||
|
||||
Signed-of-by: Joerg Bornkessel <hd_brummy@gentoo.org> (2013/03/30)
|
||||
|
||||
diff -Naur vdr-1.7.42.orig/Makefile vdr-1.7.42/Makefile
|
||||
--- vdr-1.7.42.orig/Makefile 2013-03-30 21:19:19.000000000 +0100
|
||||
+++ vdr-1.7.42/Makefile 2013-03-30 21:24:47.000000000 +0100
|
||||
@@ -109,7 +109,7 @@
|
||||
VDRVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
|
||||
APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
|
||||
|
||||
-all: vdr i18n plugins
|
||||
+all: vdr i18n
|
||||
|
||||
# Implicit rules:
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
PODIR = po
|
||||
LOCALEDIR = locale
|
||||
-I18Npo = $(wildcard $(PODIR)/*.po)
|
||||
+I18Npo = $(foreach dir,$(LINGUAS),$(wildcard $(PODIR)/$(dir)*.po))
|
||||
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
|
||||
I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr.mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
|
||||
I18Npot = $(PODIR)/vdr.pot
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
install-i18n: i18n
|
||||
@mkdir -p $(DESTDIR)$(LOCDIR)
|
||||
- cp -r $(LOCALEDIR)/* $(DESTDIR)$(LOCDIR)
|
||||
+ @(cd $(LOCALEDIR); for linguas in $(LINGUAS); do [ "$$linguas" = "en" ] && continue; cp -r --parents $$linguas* $(DESTDIR)$(LOCDIR); done)
|
||||
|
||||
# The 'include' directory (for plugins):
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
|
||||
# Install the files (note that 'install-pc' must be first!):
|
||||
|
||||
-install: install-pc install-bin install-dirs install-conf install-doc install-plugins install-i18n install-includes
|
||||
+install: install-pc install-bin install-dirs install-conf install-doc install-i18n install-includes
|
||||
|
||||
# VDR binary:
|
||||
|
||||
@@ -259,11 +259,12 @@
|
||||
|
||||
install-dirs:
|
||||
@mkdir -p $(DESTDIR)$(VIDEODIR)
|
||||
- @mkdir -p $(DESTDIR)$(CONFDIR)
|
||||
+# @mkdir -p $(DESTDIR)$(CONFDIR)
|
||||
@mkdir -p $(DESTDIR)$(CACHEDIR)
|
||||
@mkdir -p $(DESTDIR)$(RESDIR)
|
||||
|
||||
install-conf:
|
||||
+ @mkdir -p $(DESTDIR)$(CONFDIR)
|
||||
@cp -pn *.conf $(DESTDIR)$(CONFDIR)
|
||||
|
||||
# Documentation:
|
||||
@@ -290,8 +291,11 @@
|
||||
# Includes:
|
||||
|
||||
install-includes: include-dir
|
||||
- @mkdir -p $(DESTDIR)$(INCDIR)
|
||||
- @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR)
|
||||
+# @mkdir -p $(DESTDIR)$(INCDIR)
|
||||
+# @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR)
|
||||
+ @mkdir -p $(DESTDIR)$(INCDIR)/vdr $(DESTDIR)$(INCDIR)/vdr/libsi
|
||||
+ @cp -pLR include/vdr $(DESTDIR)$(INCDIR)
|
||||
+ @cp -pLR include/libsi Make.config $(DESTDIR)$(INCDIR)/vdr
|
||||
|
||||
# pkg-config file:
|
||||
|
@ -1,441 +0,0 @@
|
||||
packport from vdr-2.1.7
|
||||
systemd support
|
||||
argsdir support
|
||||
diff -Naur vdr-2.0.6.orig/HISTORY vdr-2.0.6/HISTORY
|
||||
--- vdr-2.0.6.orig/HISTORY 2015-01-20 03:24:14.000000000 +0100
|
||||
+++ vdr-2.0.6/HISTORY 2015-01-20 03:26:04.000000000 +0100
|
||||
@@ -7915,3 +7915,13 @@
|
||||
on a system with a large number of recordings.
|
||||
- The APIVERSION has been increased to 2.0.6 due to the changes to pat.h, sdt.h and
|
||||
the functional modification to cFont::CreateFont().
|
||||
+
|
||||
+2015-01-18: Version 2.0.6 + backport of systemd support from versions 2.1.6 and 2.1.7
|
||||
+
|
||||
+- Added support for systemd (thanks to Christopher Reimer). To activate this you
|
||||
+ need to add "SDNOTIFY=1" to the 'make' call.
|
||||
+
|
||||
+2015-01-18: Version 2.0.6 + backport of reading command line arguments from files, from version 2.1.7
|
||||
+
|
||||
+- VDR now reads command line options from *.conf files in /etc/vdr/conf.d (thanks
|
||||
+ to Lars Hanisch). See vdr.1 and vdr.5 for details.
|
||||
diff -Naur vdr-2.0.6.orig/Make.config.template vdr-2.0.6/Make.config.template
|
||||
--- vdr-2.0.6.orig/Make.config.template 2015-01-20 03:24:14.000000000 +0100
|
||||
+++ vdr-2.0.6/Make.config.template 2015-01-20 03:26:04.000000000 +0100
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#VIDEODIR = /srv/vdr/video
|
||||
#CONFDIR = /var/lib/vdr
|
||||
+#ARGSDIR = /etc/vdr/conf.d
|
||||
#CACHEDIR = /var/cache/vdr
|
||||
|
||||
# Overrides for preset/legacy configurations:
|
||||
diff -Naur vdr-2.0.6.orig/Makefile vdr-2.0.6/Makefile
|
||||
--- vdr-2.0.6.orig/Makefile 2015-01-20 03:24:14.000000000 +0100
|
||||
+++ vdr-2.0.6/Makefile 2015-01-20 03:26:04.000000000 +0100
|
||||
@@ -31,6 +31,7 @@
|
||||
DESTDIR ?=
|
||||
VIDEODIR ?= /srv/vdr/video
|
||||
CONFDIR ?= /var/lib/vdr
|
||||
+ARGSDIR ?= /etc/vdr/conf.d
|
||||
CACHEDIR ?= /var/cache/vdr
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
@@ -66,7 +67,7 @@
|
||||
|
||||
SILIB = $(LSIDIR)/libsi.a
|
||||
|
||||
-OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\
|
||||
+OBJS = args.o audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\
|
||||
dvbplayer.o dvbspu.o dvbsubtitle.o eit.o eitscan.o epg.o filter.o font.o i18n.o interface.o keys.o\
|
||||
lirc.o menu.o menuitems.o nit.o osdbase.o osd.o pat.o player.o plugin.o\
|
||||
receiver.o recorder.o recording.o remote.o remux.o ringbuffer.o sdt.o sections.o shutdown.o\
|
||||
@@ -111,12 +112,18 @@
|
||||
DEFINES += -DBIDI
|
||||
LIBS += $(shell pkg-config --libs fribidi)
|
||||
endif
|
||||
+ifdef SDNOTIFY
|
||||
+INCLUDES += $(shell pkg-config --cflags libsystemd-daemon)
|
||||
+DEFINES += -DSDNOTIFY
|
||||
+LIBS += $(shell pkg-config --libs libsystemd-daemon)
|
||||
+endif
|
||||
|
||||
LIRC_DEVICE ?= /var/run/lirc/lircd
|
||||
|
||||
DEFINES += -DLIRC_DEVICE=\"$(LIRC_DEVICE)\"
|
||||
DEFINES += -DVIDEODIR=\"$(VIDEODIR)\"
|
||||
DEFINES += -DCONFDIR=\"$(CONFDIR)\"
|
||||
+DEFINES += -DARGSDIR=\"$(ARGSDIR)\"
|
||||
DEFINES += -DCACHEDIR=\"$(CACHEDIR)\"
|
||||
DEFINES += -DRESDIR=\"$(RESDIR)\"
|
||||
DEFINES += -DPLUGINDIR=\"$(LIBDIR)\"
|
||||
@@ -161,6 +168,8 @@
|
||||
@echo "mandir=$(MANDIR)" >> $@
|
||||
@echo "configdir=$(CONFDIR)" >> $@
|
||||
@echo "videodir=$(VIDEODIR)" >> $@
|
||||
+# @echo "configdir=$(CONFDIR)" >> $@
|
||||
+ @echo "argsdir=$(ARGSDIR)" >> $@
|
||||
@echo "cachedir=$(CACHEDIR)" >> $@
|
||||
@echo "resdir=$(RESDIR)" >> $@
|
||||
@echo "libdir=$(LIBDIR)" >> $@
|
||||
@@ -278,6 +287,7 @@
|
||||
install-dirs:
|
||||
@mkdir -p $(DESTDIR)$(VIDEODIR)
|
||||
# @mkdir -p $(DESTDIR)$(CONFDIR)
|
||||
+ @mkdir -p $(DESTDIR)$(ARGSDIR)
|
||||
# @mkdir -p $(DESTDIR)$(CACHEDIR)
|
||||
@mkdir -p $(DESTDIR)$(RESDIR)
|
||||
|
||||
diff -Naur vdr-2.0.6.orig/Makefile.orig vdr-2.0.6/Makefile.orig
|
||||
diff -Naur vdr-2.0.6.orig/args.c vdr-2.0.6/args.c
|
||||
--- vdr-2.0.6.orig/args.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ vdr-2.0.6/args.c 2015-01-20 03:26:04.000000000 +0100
|
||||
@@ -0,0 +1,129 @@
|
||||
+/*
|
||||
+ * args.c: Read arguments from files
|
||||
+ *
|
||||
+ * See the main source file 'vdr.c' for copyright information and
|
||||
+ * how to reach the author.
|
||||
+ *
|
||||
+ * Original version written by Lars Hanisch <dvb@flensrocker.de>.
|
||||
+ *
|
||||
+ * $Id: vdr-2.0.6_systemd_argsdir.patch,v 1.1 2015/01/20 03:19:46 hd_brummy Exp $
|
||||
+ */
|
||||
+
|
||||
+#include "args.h"
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+cArgs::cArgs(const char *Argv0)
|
||||
+{
|
||||
+ argv0 = Argv0;
|
||||
+ argc = 0;
|
||||
+ argv = NULL;
|
||||
+}
|
||||
+
|
||||
+cArgs::~cArgs(void)
|
||||
+{
|
||||
+ if (argv != NULL)
|
||||
+ delete [] argv;
|
||||
+}
|
||||
+
|
||||
+bool cArgs::AddArg(const char *s)
|
||||
+{
|
||||
+ if (inVdrSection)
|
||||
+ args.Append(strdup(s));
|
||||
+ else if (*lastArg == NULL)
|
||||
+ return false;
|
||||
+ else
|
||||
+ lastArg = cString::sprintf("%s %s", *lastArg, s);
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+bool cArgs::ReadDirectory(const char *Directory)
|
||||
+{
|
||||
+ if (argv != NULL)
|
||||
+ delete [] argv;
|
||||
+ argc = 0;
|
||||
+ argv = NULL;
|
||||
+ args.Clear();
|
||||
+ lastArg = NULL;
|
||||
+ inVdrSection = false;
|
||||
+ cFileNameList files(Directory, false);
|
||||
+ if (files.Size() == 0)
|
||||
+ return false;
|
||||
+ for (int i = 0; i < files.Size(); i++) {
|
||||
+ const char *fileName = files.At(i);
|
||||
+ if (startswith(fileName, ".") || !endswith(fileName, ".conf"))
|
||||
+ continue;
|
||||
+ cString fullFileName = AddDirectory(Directory, fileName);
|
||||
+ struct stat fs;
|
||||
+ if ((access(*fullFileName, F_OK) != 0) || (stat(*fullFileName, &fs) != 0) || S_ISDIR(fs.st_mode))
|
||||
+ continue;
|
||||
+ bool ok = true;
|
||||
+ int line = 0;
|
||||
+ FILE *f = fopen(*fullFileName, "r");
|
||||
+ if (f) {
|
||||
+ char *s;
|
||||
+ cReadLine ReadLine;
|
||||
+ while ((s = ReadLine.Read(f)) != NULL) {
|
||||
+ line++;
|
||||
+ s = stripspace(skipspace(s));
|
||||
+ if (!isempty(s) && (s[0] != '#')) {
|
||||
+ if (startswith(s, "[") && endswith(s, "]")) {
|
||||
+ s[strlen(s) - 1] = 0;
|
||||
+ s++;
|
||||
+ if (*lastArg) {
|
||||
+ args.Append(strdup(*lastArg));
|
||||
+ lastArg = NULL;
|
||||
+ }
|
||||
+ if (strcmp(s, "vdr") == 0)
|
||||
+ inVdrSection = true;
|
||||
+ else {
|
||||
+ inVdrSection = false;
|
||||
+ lastArg = cString::sprintf("--plugin=%s", s);
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ if ((strlen(s) > 2) && (s[0] == '-') && (s[1] != '-')) { // short option, split at first space
|
||||
+ char *p = strchr(s, ' ');
|
||||
+ if (p == NULL) {
|
||||
+ ok = AddArg(s);
|
||||
+ if (!ok)
|
||||
+ break;
|
||||
+ }
|
||||
+ else {
|
||||
+ *p = 0;
|
||||
+ p++;
|
||||
+ ok = AddArg(s);
|
||||
+ if (!ok)
|
||||
+ break;
|
||||
+ ok = AddArg(p);
|
||||
+ if (!ok)
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ ok = AddArg(s);
|
||||
+ if (!ok)
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ fclose(f);
|
||||
+ }
|
||||
+ if (!ok) {
|
||||
+ esyslog("ERROR: args file %s, line %d", *fullFileName, line);
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ if (*lastArg) {
|
||||
+ args.Append(strdup(*lastArg));
|
||||
+ lastArg = NULL;
|
||||
+ }
|
||||
+ argv = new char*[args.Size() + 1];
|
||||
+ argv[0] = strdup(*argv0);
|
||||
+ argc = 1;
|
||||
+ for (int i = 0; i < args.Size(); i++) {
|
||||
+ argv[argc] = args.At(i);
|
||||
+ argc++;
|
||||
+ }
|
||||
+ return true;
|
||||
+}
|
||||
diff -Naur vdr-2.0.6.orig/args.h vdr-2.0.6/args.h
|
||||
--- vdr-2.0.6.orig/args.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ vdr-2.0.6/args.h 2015-01-20 03:26:04.000000000 +0100
|
||||
@@ -0,0 +1,34 @@
|
||||
+/*
|
||||
+ * args.h: Read arguments from files
|
||||
+ *
|
||||
+ * See the main source file 'vdr.c' for copyright information and
|
||||
+ * how to reach the author.
|
||||
+ *
|
||||
+ * Original version written by Lars Hanisch <dvb@flensrocker.de>.
|
||||
+ *
|
||||
+ * $Id: vdr-2.0.6_systemd_argsdir.patch,v 1.1 2015/01/20 03:19:46 hd_brummy Exp $
|
||||
+ */
|
||||
+
|
||||
+#ifndef __ARGS_H
|
||||
+#define __ARGS_H
|
||||
+
|
||||
+#include "tools.h"
|
||||
+
|
||||
+class cArgs {
|
||||
+private:
|
||||
+ cString argv0;
|
||||
+ cStringList args;
|
||||
+ cString lastArg;
|
||||
+ bool inVdrSection;
|
||||
+ int argc;
|
||||
+ char **argv;
|
||||
+ bool AddArg(const char *s);
|
||||
+public:
|
||||
+ cArgs(const char *Argv0);
|
||||
+ ~cArgs(void);
|
||||
+ bool ReadDirectory(const char *Directory);
|
||||
+ int GetArgc(void) const { return argc; };
|
||||
+ char **GetArgv(void) const { return argv; };
|
||||
+ };
|
||||
+
|
||||
+#endif //__ARGS_H
|
||||
diff -Naur vdr-2.0.6.orig/interface.c vdr-2.0.6/interface.c
|
||||
--- vdr-2.0.6.orig/interface.c 2015-01-20 03:24:14.000000000 +0100
|
||||
+++ vdr-2.0.6/interface.c 2015-01-20 03:25:53.000000000 +0100
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "interface.h"
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
+#ifdef SDNOTIFY
|
||||
+#include <systemd/sd-daemon.h>
|
||||
+#endif
|
||||
#include <unistd.h>
|
||||
#include "i18n.h"
|
||||
#include "status.h"
|
||||
@@ -159,6 +162,9 @@
|
||||
bool known = Keys.KnowsRemote(Remote->Name());
|
||||
dsyslog("remote control %s - %s", Remote->Name(), known ? "keys known" : "learning keys");
|
||||
if (!known) {
|
||||
+#ifdef SDNOTIFY
|
||||
+ sd_notify(0, "READY=1\nSTATUS=Learning keys...");
|
||||
+#endif
|
||||
cSkinDisplayMenu *DisplayMenu = Skins.Current()->DisplayMenu();
|
||||
DisplayMenu->SetMenuCategory(mcUnknown);
|
||||
char Headline[256];
|
||||
diff -Naur vdr-2.0.6.orig/vdr.1 vdr-2.0.6/vdr.1
|
||||
--- vdr-2.0.6.orig/vdr.1 2015-01-20 03:24:14.000000000 +0100
|
||||
+++ vdr-2.0.6/vdr.1 2015-01-20 03:26:04.000000000 +0100
|
||||
@@ -178,6 +178,10 @@
|
||||
Read resource files from \fIdir\fR
|
||||
(default is to read them from the config directory).
|
||||
.TP
|
||||
+.BI \-\-showargs[= dir ]
|
||||
+Read command line arguments from \fIdir\fR (default is \fI/etc/vdr/conf.d\fR),
|
||||
+display them to the console and exit.
|
||||
+.TP
|
||||
.BI \-s\ cmd ,\ \-\-shutdown= cmd
|
||||
Call \fIcmd\fR to shutdown the computer. See the file \fIINSTALL\fR for more
|
||||
information.
|
||||
@@ -213,6 +217,10 @@
|
||||
.BI \-w\ sec ,\ \-\-watchdog= sec
|
||||
Activate the watchdog timer with a timeout of \fIsec\fR seconds.
|
||||
A value of \fB0\fR (default) disables the watchdog.
|
||||
+.P
|
||||
+If started without any options, vdr tries to read command line options
|
||||
+from files named '*.conf' in the directory /etc/vdr/conf.d. Files are
|
||||
+read in alphabetical order. See vdr(5) for details.
|
||||
.SH SIGNALS
|
||||
.TP
|
||||
.B SIGINT, SIGTERM
|
||||
diff -Naur vdr-2.0.6.orig/vdr.5 vdr-2.0.6/vdr.5
|
||||
--- vdr-2.0.6.orig/vdr.5 2015-01-20 03:24:14.000000000 +0100
|
||||
+++ vdr-2.0.6/vdr.5 2015-01-20 03:26:04.000000000 +0100
|
||||
@@ -895,6 +895,33 @@
|
||||
just 16 bit wide. The internal representation in VDR allows for 32 bit to
|
||||
be used, so that external tools can generate EPG data that is guaranteed
|
||||
not to collide with the ids of existing data.
|
||||
+.SS COMMANDLINE OPTIONS
|
||||
+If started without any options, vdr tries to read any files in the directory
|
||||
+/etc/vdr/conf.d with names that do not begin with a '.' and that end with '.conf'.
|
||||
+These files are read in alphabetical order. The format of these files is
|
||||
+
|
||||
+# comment
|
||||
+.br
|
||||
+[name]
|
||||
+.br
|
||||
+-a
|
||||
+.br
|
||||
+-b 123
|
||||
+.br
|
||||
+--long
|
||||
+.br
|
||||
+--longarg=123
|
||||
+.br
|
||||
+
|
||||
+Any lines that begin with '#' as the first non-whitespace character are considered
|
||||
+comments and are ignored.
|
||||
+A command line option file consists of one or more sections, indicated by '[name]',
|
||||
+where 'name' is either the fixed word 'vdr' (if this section contains options for
|
||||
+the main VDR program) or the name of the plugin this section applies to.
|
||||
+Each option must be written on a separate line, including the leading '-' (for
|
||||
+a short option) or '--' (for a long option). If the option has additional arguments,
|
||||
+they have to be written on the same line as the option itself, separated from the
|
||||
+option with a blank (short option) or equal sign (long option).
|
||||
.SH SEE ALSO
|
||||
.BR vdr (1)
|
||||
.SH AUTHOR
|
||||
diff -Naur vdr-2.0.6.orig/vdr.c vdr-2.0.6/vdr.c
|
||||
--- vdr-2.0.6.orig/vdr.c 2015-01-20 03:24:14.000000000 +0100
|
||||
+++ vdr-2.0.6/vdr.c 2015-01-20 03:26:04.000000000 +0100
|
||||
@@ -34,8 +34,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/capability.h>
|
||||
#include <sys/prctl.h>
|
||||
+#ifdef SDNOTIFY
|
||||
+#include <systemd/sd-daemon.h>
|
||||
+#endif
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
+#include "args.h"
|
||||
#include "audio.h"
|
||||
#include "channels.h"
|
||||
#include "config.h"
|
||||
@@ -192,6 +196,7 @@
|
||||
#define DEFAULTWATCHDOG 0 // seconds
|
||||
#define DEFAULTVIDEODIR VIDEODIR
|
||||
#define DEFAULTCONFDIR dd(CONFDIR, VideoDirectory)
|
||||
+#define DEFAULTARGSDIR dd(ARGSDIR, "/etc/vdr/conf.d")
|
||||
#define DEFAULTCACHEDIR dd(CACHEDIR, VideoDirectory)
|
||||
#define DEFAULTRESDIR dd(RESDIR, ConfigDirectory)
|
||||
#define DEFAULTPLUGINDIR PLUGINDIR
|
||||
@@ -229,6 +234,15 @@
|
||||
VdrUser = VDR_USER;
|
||||
#endif
|
||||
|
||||
+ cArgs *Args = NULL;
|
||||
+ if (argc == 1) {
|
||||
+ Args = new cArgs(argv[0]);
|
||||
+ if (Args->ReadDirectory(DEFAULTARGSDIR)) {
|
||||
+ argc = Args->GetArgc();
|
||||
+ argv = Args->GetArgv();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
SetVideoDirectory(VideoDirectory);
|
||||
cPluginManager PluginManager(DEFAULTPLUGINDIR);
|
||||
|
||||
@@ -256,6 +270,7 @@
|
||||
{ "port", required_argument, NULL, 'p' },
|
||||
{ "record", required_argument, NULL, 'r' },
|
||||
{ "resdir", required_argument, NULL, 'r' | 0x100 },
|
||||
+ { "showargs", optional_argument, NULL, 's' | 0x200 },
|
||||
{ "shutdown", required_argument, NULL, 's' },
|
||||
{ "split", no_argument, NULL, 's' | 0x100 },
|
||||
{ "terminal", required_argument, NULL, 't' },
|
||||
@@ -428,6 +443,19 @@
|
||||
case 's' | 0x100:
|
||||
Setup.SplitEditedFiles = 1;
|
||||
break;
|
||||
+ case 's' | 0x200: {
|
||||
+ const char *ArgsDir = optarg ? optarg : DEFAULTARGSDIR;
|
||||
+ cArgs Args(argv[0]);
|
||||
+ if (!Args.ReadDirectory(ArgsDir)) {
|
||||
+ fprintf(stderr, "vdr: can't read arguments from directory: %s\n", ArgsDir);
|
||||
+ return 2;
|
||||
+ }
|
||||
+ int c = Args.GetArgc();
|
||||
+ char **v = Args.GetArgv();
|
||||
+ for (int i = 1; i < c; i++)
|
||||
+ printf("%s\n", v[i]);
|
||||
+ return 0;
|
||||
+ }
|
||||
case 't': Terminal = optarg;
|
||||
if (access(Terminal, R_OK | W_OK) < 0) {
|
||||
fprintf(stderr, "vdr: can't access terminal: %s\n", Terminal);
|
||||
@@ -541,6 +569,8 @@
|
||||
" -s CMD, --shutdown=CMD call CMD to shutdown the computer\n"
|
||||
" --split split edited files at the editing marks (only\n"
|
||||
" useful in conjunction with --edit)\n"
|
||||
+ " --showargs[=DIR] print the arguments read from DIR and exit\n"
|
||||
+ " (default: %s)\n"
|
||||
" -t TTY, --terminal=TTY controlling tty\n"
|
||||
" -u USER, --user=USER run as user USER; only applicable if started as\n"
|
||||
" root\n"
|
||||
@@ -563,6 +593,7 @@
|
||||
DEFAULTLOCDIR,
|
||||
DEFAULTSVDRPPORT,
|
||||
DEFAULTRESDIR,
|
||||
+ DEFAULTARGSDIR,
|
||||
DEFAULTVIDEODIR,
|
||||
DEFAULTWATCHDOG
|
||||
);
|
||||
@@ -848,6 +879,10 @@
|
||||
alarm(WatchdogTimeout); // Initial watchdog timer start
|
||||
}
|
||||
|
||||
+#ifdef SDNOTIFY
|
||||
+ sd_notify(0, "READY=1\nSTATUS=Ready");
|
||||
+#endif
|
||||
+
|
||||
// Main program loop:
|
||||
|
||||
#define DELETE_MENU ((IsInfoMenu &= (Menu == NULL)), delete Menu, Menu = NULL)
|
||||
diff -Naur vdr-2.0.6.orig/vdr.c.orig vdr-2.0.6/vdr.c.orig
|
@ -1,439 +0,0 @@
|
||||
backported from vdr-2.1.7
|
||||
systemd support
|
||||
argsdir support
|
||||
diff -Naur vdr-2.0.6.orig/HISTORY vdr-2.0.6/HISTORY
|
||||
--- vdr-2.0.6.orig/HISTORY 2014-10-01 16:30:32.000000000 +0200
|
||||
+++ vdr-2.0.6/HISTORY 2015-01-20 03:06:42.000000000 +0100
|
||||
@@ -7915,3 +7915,13 @@
|
||||
on a system with a large number of recordings.
|
||||
- The APIVERSION has been increased to 2.0.6 due to the changes to pat.h, sdt.h and
|
||||
the functional modification to cFont::CreateFont().
|
||||
+
|
||||
+2015-01-18: Version 2.0.6 + backport of systemd support from versions 2.1.6 and 2.1.7
|
||||
+
|
||||
+- Added support for systemd (thanks to Christopher Reimer). To activate this you
|
||||
+ need to add "SDNOTIFY=1" to the 'make' call.
|
||||
+
|
||||
+2015-01-18: Version 2.0.6 + backport of reading command line arguments from files, from version 2.1.7
|
||||
+
|
||||
+- VDR now reads command line options from *.conf files in /etc/vdr/conf.d (thanks
|
||||
+ to Lars Hanisch). See vdr.1 and vdr.5 for details.
|
||||
diff -Naur vdr-2.0.6.orig/Make.config.template vdr-2.0.6/Make.config.template
|
||||
--- vdr-2.0.6.orig/Make.config.template 2014-10-01 16:30:32.000000000 +0200
|
||||
+++ vdr-2.0.6/Make.config.template 2015-01-20 03:06:42.000000000 +0100
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#VIDEODIR = /srv/vdr/video
|
||||
#CONFDIR = /var/lib/vdr
|
||||
+#ARGSDIR = /etc/vdr/conf.d
|
||||
#CACHEDIR = /var/cache/vdr
|
||||
|
||||
# Overrides for preset/legacy configurations:
|
||||
diff -Naur vdr-2.0.6.orig/Makefile vdr-2.0.6/Makefile
|
||||
--- vdr-2.0.6.orig/Makefile 2015-01-20 02:55:00.000000000 +0100
|
||||
+++ vdr-2.0.6/Makefile 2015-01-20 03:12:57.000000000 +0100
|
||||
@@ -31,6 +31,7 @@
|
||||
DESTDIR ?=
|
||||
VIDEODIR ?= /srv/vdr/video
|
||||
CONFDIR ?= /var/lib/vdr
|
||||
+ARGSDIR ?= /etc/vdr/conf.d
|
||||
CACHEDIR ?= /var/cache/vdr
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
@@ -66,7 +67,7 @@
|
||||
|
||||
SILIB = $(LSIDIR)/libsi.a
|
||||
|
||||
-OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\
|
||||
+OBJS = args.o audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o dvbci.o\
|
||||
dvbplayer.o dvbspu.o dvbsubtitle.o eit.o eitscan.o epg.o filter.o font.o i18n.o interface.o keys.o\
|
||||
lirc.o menu.o menuitems.o nit.o osdbase.o osd.o pat.o player.o plugin.o\
|
||||
receiver.o recorder.o recording.o remote.o remux.o ringbuffer.o sdt.o sections.o shutdown.o\
|
||||
@@ -93,12 +94,18 @@
|
||||
DEFINES += -DBIDI
|
||||
LIBS += $(shell pkg-config --libs fribidi)
|
||||
endif
|
||||
+ifdef SDNOTIFY
|
||||
+INCLUDES += $(shell pkg-config --cflags libsystemd-daemon)
|
||||
+DEFINES += -DSDNOTIFY
|
||||
+LIBS += $(shell pkg-config --libs libsystemd-daemon)
|
||||
+endif
|
||||
|
||||
LIRC_DEVICE ?= /var/run/lirc/lircd
|
||||
|
||||
DEFINES += -DLIRC_DEVICE=\"$(LIRC_DEVICE)\"
|
||||
DEFINES += -DVIDEODIR=\"$(VIDEODIR)\"
|
||||
DEFINES += -DCONFDIR=\"$(CONFDIR)\"
|
||||
+DEFINES += -DARGSDIR=\"$(ARGSDIR)\"
|
||||
DEFINES += -DCACHEDIR=\"$(CACHEDIR)\"
|
||||
DEFINES += -DRESDIR=\"$(RESDIR)\"
|
||||
DEFINES += -DPLUGINDIR=\"$(LIBDIR)\"
|
||||
@@ -143,6 +150,8 @@
|
||||
@echo "mandir=$(MANDIR)" >> $@
|
||||
@echo "configdir=$(CONFDIR)" >> $@
|
||||
@echo "videodir=$(VIDEODIR)" >> $@
|
||||
+# @echo "configdir=$(CONFDIR)" >> $@
|
||||
+ @echo "argsdir=$(ARGSDIR)" >> $@
|
||||
@echo "cachedir=$(CACHEDIR)" >> $@
|
||||
@echo "resdir=$(RESDIR)" >> $@
|
||||
@echo "libdir=$(LIBDIR)" >> $@
|
||||
@@ -260,6 +269,7 @@
|
||||
install-dirs:
|
||||
@mkdir -p $(DESTDIR)$(VIDEODIR)
|
||||
# @mkdir -p $(DESTDIR)$(CONFDIR)
|
||||
+ @mkdir -p $(DESTDIR)$(ARGSDIR)
|
||||
# @mkdir -p $(DESTDIR)$(CACHEDIR)
|
||||
@mkdir -p $(DESTDIR)$(RESDIR)
|
||||
|
||||
diff -Naur vdr-2.0.6.orig/args.c vdr-2.0.6/args.c
|
||||
--- vdr-2.0.6.orig/args.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ vdr-2.0.6/args.c 2015-01-20 03:06:42.000000000 +0100
|
||||
@@ -0,0 +1,129 @@
|
||||
+/*
|
||||
+ * args.c: Read arguments from files
|
||||
+ *
|
||||
+ * See the main source file 'vdr.c' for copyright information and
|
||||
+ * how to reach the author.
|
||||
+ *
|
||||
+ * Original version written by Lars Hanisch <dvb@flensrocker.de>.
|
||||
+ *
|
||||
+ * $Id: vdr-2.0.6_systemd_argsdir_vanilla.patch,v 1.1 2015/01/20 03:19:46 hd_brummy Exp $
|
||||
+ */
|
||||
+
|
||||
+#include "args.h"
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+cArgs::cArgs(const char *Argv0)
|
||||
+{
|
||||
+ argv0 = Argv0;
|
||||
+ argc = 0;
|
||||
+ argv = NULL;
|
||||
+}
|
||||
+
|
||||
+cArgs::~cArgs(void)
|
||||
+{
|
||||
+ if (argv != NULL)
|
||||
+ delete [] argv;
|
||||
+}
|
||||
+
|
||||
+bool cArgs::AddArg(const char *s)
|
||||
+{
|
||||
+ if (inVdrSection)
|
||||
+ args.Append(strdup(s));
|
||||
+ else if (*lastArg == NULL)
|
||||
+ return false;
|
||||
+ else
|
||||
+ lastArg = cString::sprintf("%s %s", *lastArg, s);
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+bool cArgs::ReadDirectory(const char *Directory)
|
||||
+{
|
||||
+ if (argv != NULL)
|
||||
+ delete [] argv;
|
||||
+ argc = 0;
|
||||
+ argv = NULL;
|
||||
+ args.Clear();
|
||||
+ lastArg = NULL;
|
||||
+ inVdrSection = false;
|
||||
+ cFileNameList files(Directory, false);
|
||||
+ if (files.Size() == 0)
|
||||
+ return false;
|
||||
+ for (int i = 0; i < files.Size(); i++) {
|
||||
+ const char *fileName = files.At(i);
|
||||
+ if (startswith(fileName, ".") || !endswith(fileName, ".conf"))
|
||||
+ continue;
|
||||
+ cString fullFileName = AddDirectory(Directory, fileName);
|
||||
+ struct stat fs;
|
||||
+ if ((access(*fullFileName, F_OK) != 0) || (stat(*fullFileName, &fs) != 0) || S_ISDIR(fs.st_mode))
|
||||
+ continue;
|
||||
+ bool ok = true;
|
||||
+ int line = 0;
|
||||
+ FILE *f = fopen(*fullFileName, "r");
|
||||
+ if (f) {
|
||||
+ char *s;
|
||||
+ cReadLine ReadLine;
|
||||
+ while ((s = ReadLine.Read(f)) != NULL) {
|
||||
+ line++;
|
||||
+ s = stripspace(skipspace(s));
|
||||
+ if (!isempty(s) && (s[0] != '#')) {
|
||||
+ if (startswith(s, "[") && endswith(s, "]")) {
|
||||
+ s[strlen(s) - 1] = 0;
|
||||
+ s++;
|
||||
+ if (*lastArg) {
|
||||
+ args.Append(strdup(*lastArg));
|
||||
+ lastArg = NULL;
|
||||
+ }
|
||||
+ if (strcmp(s, "vdr") == 0)
|
||||
+ inVdrSection = true;
|
||||
+ else {
|
||||
+ inVdrSection = false;
|
||||
+ lastArg = cString::sprintf("--plugin=%s", s);
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ if ((strlen(s) > 2) && (s[0] == '-') && (s[1] != '-')) { // short option, split at first space
|
||||
+ char *p = strchr(s, ' ');
|
||||
+ if (p == NULL) {
|
||||
+ ok = AddArg(s);
|
||||
+ if (!ok)
|
||||
+ break;
|
||||
+ }
|
||||
+ else {
|
||||
+ *p = 0;
|
||||
+ p++;
|
||||
+ ok = AddArg(s);
|
||||
+ if (!ok)
|
||||
+ break;
|
||||
+ ok = AddArg(p);
|
||||
+ if (!ok)
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ ok = AddArg(s);
|
||||
+ if (!ok)
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ fclose(f);
|
||||
+ }
|
||||
+ if (!ok) {
|
||||
+ esyslog("ERROR: args file %s, line %d", *fullFileName, line);
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ if (*lastArg) {
|
||||
+ args.Append(strdup(*lastArg));
|
||||
+ lastArg = NULL;
|
||||
+ }
|
||||
+ argv = new char*[args.Size() + 1];
|
||||
+ argv[0] = strdup(*argv0);
|
||||
+ argc = 1;
|
||||
+ for (int i = 0; i < args.Size(); i++) {
|
||||
+ argv[argc] = args.At(i);
|
||||
+ argc++;
|
||||
+ }
|
||||
+ return true;
|
||||
+}
|
||||
diff -Naur vdr-2.0.6.orig/args.h vdr-2.0.6/args.h
|
||||
--- vdr-2.0.6.orig/args.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ vdr-2.0.6/args.h 2015-01-20 03:06:42.000000000 +0100
|
||||
@@ -0,0 +1,34 @@
|
||||
+/*
|
||||
+ * args.h: Read arguments from files
|
||||
+ *
|
||||
+ * See the main source file 'vdr.c' for copyright information and
|
||||
+ * how to reach the author.
|
||||
+ *
|
||||
+ * Original version written by Lars Hanisch <dvb@flensrocker.de>.
|
||||
+ *
|
||||
+ * $Id: vdr-2.0.6_systemd_argsdir_vanilla.patch,v 1.1 2015/01/20 03:19:46 hd_brummy Exp $
|
||||
+ */
|
||||
+
|
||||
+#ifndef __ARGS_H
|
||||
+#define __ARGS_H
|
||||
+
|
||||
+#include "tools.h"
|
||||
+
|
||||
+class cArgs {
|
||||
+private:
|
||||
+ cString argv0;
|
||||
+ cStringList args;
|
||||
+ cString lastArg;
|
||||
+ bool inVdrSection;
|
||||
+ int argc;
|
||||
+ char **argv;
|
||||
+ bool AddArg(const char *s);
|
||||
+public:
|
||||
+ cArgs(const char *Argv0);
|
||||
+ ~cArgs(void);
|
||||
+ bool ReadDirectory(const char *Directory);
|
||||
+ int GetArgc(void) const { return argc; };
|
||||
+ char **GetArgv(void) const { return argv; };
|
||||
+ };
|
||||
+
|
||||
+#endif //__ARGS_H
|
||||
diff -Naur vdr-2.0.6.orig/interface.c vdr-2.0.6/interface.c
|
||||
--- vdr-2.0.6.orig/interface.c 2014-10-01 16:30:32.000000000 +0200
|
||||
+++ vdr-2.0.6/interface.c 2015-01-20 03:03:40.000000000 +0100
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "interface.h"
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
+#ifdef SDNOTIFY
|
||||
+#include <systemd/sd-daemon.h>
|
||||
+#endif
|
||||
#include <unistd.h>
|
||||
#include "i18n.h"
|
||||
#include "status.h"
|
||||
@@ -159,6 +162,9 @@
|
||||
bool known = Keys.KnowsRemote(Remote->Name());
|
||||
dsyslog("remote control %s - %s", Remote->Name(), known ? "keys known" : "learning keys");
|
||||
if (!known) {
|
||||
+#ifdef SDNOTIFY
|
||||
+ sd_notify(0, "READY=1\nSTATUS=Learning keys...");
|
||||
+#endif
|
||||
cSkinDisplayMenu *DisplayMenu = Skins.Current()->DisplayMenu();
|
||||
DisplayMenu->SetMenuCategory(mcUnknown);
|
||||
char Headline[256];
|
||||
diff -Naur vdr-2.0.6.orig/vdr.1 vdr-2.0.6/vdr.1
|
||||
--- vdr-2.0.6.orig/vdr.1 2014-10-01 16:30:32.000000000 +0200
|
||||
+++ vdr-2.0.6/vdr.1 2015-01-20 03:06:42.000000000 +0100
|
||||
@@ -178,6 +178,10 @@
|
||||
Read resource files from \fIdir\fR
|
||||
(default is to read them from the config directory).
|
||||
.TP
|
||||
+.BI \-\-showargs[= dir ]
|
||||
+Read command line arguments from \fIdir\fR (default is \fI/etc/vdr/conf.d\fR),
|
||||
+display them to the console and exit.
|
||||
+.TP
|
||||
.BI \-s\ cmd ,\ \-\-shutdown= cmd
|
||||
Call \fIcmd\fR to shutdown the computer. See the file \fIINSTALL\fR for more
|
||||
information.
|
||||
@@ -213,6 +217,10 @@
|
||||
.BI \-w\ sec ,\ \-\-watchdog= sec
|
||||
Activate the watchdog timer with a timeout of \fIsec\fR seconds.
|
||||
A value of \fB0\fR (default) disables the watchdog.
|
||||
+.P
|
||||
+If started without any options, vdr tries to read command line options
|
||||
+from files named '*.conf' in the directory /etc/vdr/conf.d. Files are
|
||||
+read in alphabetical order. See vdr(5) for details.
|
||||
.SH SIGNALS
|
||||
.TP
|
||||
.B SIGINT, SIGTERM
|
||||
diff -Naur vdr-2.0.6.orig/vdr.5 vdr-2.0.6/vdr.5
|
||||
--- vdr-2.0.6.orig/vdr.5 2014-10-01 16:30:32.000000000 +0200
|
||||
+++ vdr-2.0.6/vdr.5 2015-01-20 03:06:42.000000000 +0100
|
||||
@@ -889,6 +889,33 @@
|
||||
just 16 bit wide. The internal representation in VDR allows for 32 bit to
|
||||
be used, so that external tools can generate EPG data that is guaranteed
|
||||
not to collide with the ids of existing data.
|
||||
+.SS COMMANDLINE OPTIONS
|
||||
+If started without any options, vdr tries to read any files in the directory
|
||||
+/etc/vdr/conf.d with names that do not begin with a '.' and that end with '.conf'.
|
||||
+These files are read in alphabetical order. The format of these files is
|
||||
+
|
||||
+# comment
|
||||
+.br
|
||||
+[name]
|
||||
+.br
|
||||
+-a
|
||||
+.br
|
||||
+-b 123
|
||||
+.br
|
||||
+--long
|
||||
+.br
|
||||
+--longarg=123
|
||||
+.br
|
||||
+
|
||||
+Any lines that begin with '#' as the first non-whitespace character are considered
|
||||
+comments and are ignored.
|
||||
+A command line option file consists of one or more sections, indicated by '[name]',
|
||||
+where 'name' is either the fixed word 'vdr' (if this section contains options for
|
||||
+the main VDR program) or the name of the plugin this section applies to.
|
||||
+Each option must be written on a separate line, including the leading '-' (for
|
||||
+a short option) or '--' (for a long option). If the option has additional arguments,
|
||||
+they have to be written on the same line as the option itself, separated from the
|
||||
+option with a blank (short option) or equal sign (long option).
|
||||
.SH SEE ALSO
|
||||
.BR vdr (1)
|
||||
.SH AUTHOR
|
||||
diff -Naur vdr-2.0.6.orig/vdr.c vdr-2.0.6/vdr.c
|
||||
--- vdr-2.0.6.orig/vdr.c 2014-10-01 16:30:32.000000000 +0200
|
||||
+++ vdr-2.0.6/vdr.c 2015-01-20 03:06:42.000000000 +0100
|
||||
@@ -34,8 +34,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/capability.h>
|
||||
#include <sys/prctl.h>
|
||||
+#ifdef SDNOTIFY
|
||||
+#include <systemd/sd-daemon.h>
|
||||
+#endif
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
+#include "args.h"
|
||||
#include "audio.h"
|
||||
#include "channels.h"
|
||||
#include "config.h"
|
||||
@@ -186,6 +190,7 @@
|
||||
#define DEFAULTWATCHDOG 0 // seconds
|
||||
#define DEFAULTVIDEODIR VIDEODIR
|
||||
#define DEFAULTCONFDIR dd(CONFDIR, VideoDirectory)
|
||||
+#define DEFAULTARGSDIR dd(ARGSDIR, "/etc/vdr/conf.d")
|
||||
#define DEFAULTCACHEDIR dd(CACHEDIR, VideoDirectory)
|
||||
#define DEFAULTRESDIR dd(RESDIR, ConfigDirectory)
|
||||
#define DEFAULTPLUGINDIR PLUGINDIR
|
||||
@@ -223,6 +228,15 @@
|
||||
VdrUser = VDR_USER;
|
||||
#endif
|
||||
|
||||
+ cArgs *Args = NULL;
|
||||
+ if (argc == 1) {
|
||||
+ Args = new cArgs(argv[0]);
|
||||
+ if (Args->ReadDirectory(DEFAULTARGSDIR)) {
|
||||
+ argc = Args->GetArgc();
|
||||
+ argv = Args->GetArgv();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
SetVideoDirectory(VideoDirectory);
|
||||
cPluginManager PluginManager(DEFAULTPLUGINDIR);
|
||||
|
||||
@@ -250,6 +264,7 @@
|
||||
{ "port", required_argument, NULL, 'p' },
|
||||
{ "record", required_argument, NULL, 'r' },
|
||||
{ "resdir", required_argument, NULL, 'r' | 0x100 },
|
||||
+ { "showargs", optional_argument, NULL, 's' | 0x200 },
|
||||
{ "shutdown", required_argument, NULL, 's' },
|
||||
{ "split", no_argument, NULL, 's' | 0x100 },
|
||||
{ "terminal", required_argument, NULL, 't' },
|
||||
@@ -422,6 +437,19 @@
|
||||
case 's' | 0x100:
|
||||
Setup.SplitEditedFiles = 1;
|
||||
break;
|
||||
+ case 's' | 0x200: {
|
||||
+ const char *ArgsDir = optarg ? optarg : DEFAULTARGSDIR;
|
||||
+ cArgs Args(argv[0]);
|
||||
+ if (!Args.ReadDirectory(ArgsDir)) {
|
||||
+ fprintf(stderr, "vdr: can't read arguments from directory: %s\n", ArgsDir);
|
||||
+ return 2;
|
||||
+ }
|
||||
+ int c = Args.GetArgc();
|
||||
+ char **v = Args.GetArgv();
|
||||
+ for (int i = 1; i < c; i++)
|
||||
+ printf("%s\n", v[i]);
|
||||
+ return 0;
|
||||
+ }
|
||||
case 't': Terminal = optarg;
|
||||
if (access(Terminal, R_OK | W_OK) < 0) {
|
||||
fprintf(stderr, "vdr: can't access terminal: %s\n", Terminal);
|
||||
@@ -535,6 +563,8 @@
|
||||
" -s CMD, --shutdown=CMD call CMD to shutdown the computer\n"
|
||||
" --split split edited files at the editing marks (only\n"
|
||||
" useful in conjunction with --edit)\n"
|
||||
+ " --showargs[=DIR] print the arguments read from DIR and exit\n"
|
||||
+ " (default: %s)\n"
|
||||
" -t TTY, --terminal=TTY controlling tty\n"
|
||||
" -u USER, --user=USER run as user USER; only applicable if started as\n"
|
||||
" root\n"
|
||||
@@ -557,6 +587,7 @@
|
||||
DEFAULTLOCDIR,
|
||||
DEFAULTSVDRPPORT,
|
||||
DEFAULTRESDIR,
|
||||
+ DEFAULTARGSDIR,
|
||||
DEFAULTVIDEODIR,
|
||||
DEFAULTWATCHDOG
|
||||
);
|
||||
@@ -837,6 +868,10 @@
|
||||
alarm(WatchdogTimeout); // Initial watchdog timer start
|
||||
}
|
||||
|
||||
+#ifdef SDNOTIFY
|
||||
+ sd_notify(0, "READY=1\nSTATUS=Ready");
|
||||
+#endif
|
||||
+
|
||||
// Main program loop:
|
||||
|
||||
#define DELETE_MENU ((IsInfoMenu &= (Menu == NULL)), delete Menu, Menu = NULL)
|
@ -1,364 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/vdr-2.0.4.ebuild,v 1.4 2015/02/19 19:38:49 hd_brummy Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs
|
||||
|
||||
# Switches supported by extensions-patch
|
||||
EXT_PATCH_FLAGS="alternatechannel ddepgentry dvlvidprefer graphtft
|
||||
jumpplay jumpingseconds mainmenuhooks menuorg naludump permashift
|
||||
pinplugin rotor setup ttxtsubs vasarajanauloja wareagleicon yaepg"
|
||||
|
||||
# names of the use-flags
|
||||
EXT_PATCH_FLAGS_RENAMED=""
|
||||
|
||||
# names ext-patch uses internally, here only used for maintainer checks
|
||||
EXT_PATCH_FLAGS_RENAMED_EXT_NAME=""
|
||||
|
||||
IUSE="bidi debug html vanilla ${EXT_PATCH_FLAGS} ${EXT_PATCH_FLAGS_RENAMED}"
|
||||
|
||||
MY_PV="${PV%_p*}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
EXT_P="extpng-${P}-gentoo-edition-v1"
|
||||
|
||||
DESCRIPTION="Video Disk Recorder - turns a pc into a powerful set top box for DVB"
|
||||
HOMEPAGE="http://www.tvdr.de/"
|
||||
SRC_URI="ftp://ftp.tvdr.de/vdr/${MY_P}.tar.bz2
|
||||
http://dev.gentoo.org/~hd_brummy/distfiles/${EXT_P}.patch.bz2"
|
||||
|
||||
KEYWORDS="~arm amd64 ~ppc x86"
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2"
|
||||
|
||||
REQUIRED_USE="setup? ( !menuorg )
|
||||
menuorg? ( !setup )"
|
||||
|
||||
COMMON_DEPEND="virtual/jpeg:*
|
||||
sys-libs/libcap
|
||||
>=media-libs/fontconfig-2.4.2
|
||||
>=media-libs/freetype-2
|
||||
setup? ( >=dev-libs/tinyxml-2.6.1[stl] )"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=virtual/linuxtv-dvb-headers-5.3
|
||||
sys-devel/gettext"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
dev-lang/perl
|
||||
>=media-tv/gentoo-vdr-scripts-0.2.0
|
||||
media-fonts/corefonts
|
||||
bidi? ( dev-libs/fribidi )"
|
||||
|
||||
# pull in vdr-setup to get the xml files, else menu will not work
|
||||
PDEPEND="setup? ( >=media-plugins/vdr-setup-0.3.1-r3 )"
|
||||
|
||||
CONF_DIR=/etc/vdr
|
||||
CAP_FILE=${S}/capabilities.sh
|
||||
CAPS="# Capabilities of the vdr-executable for use by startscript etc."
|
||||
|
||||
pkg_setup() {
|
||||
use debug && append-flags -g
|
||||
|
||||
PLUGIN_LIBDIR="/usr/$(get_libdir)/vdr/plugins"
|
||||
|
||||
tc-export CC CXX AR
|
||||
}
|
||||
|
||||
add_cap() {
|
||||
local arg
|
||||
for arg; do
|
||||
CAPS="${CAPS}\n${arg}=1"
|
||||
done
|
||||
}
|
||||
|
||||
enable_patch() {
|
||||
local arg ARG_UPPER
|
||||
for arg; do
|
||||
ARG_UPPER=$(echo $arg|tr '[:lower:]' '[:upper:]')
|
||||
echo "${ARG_UPPER} = 1" >> Make.config
|
||||
|
||||
# codesnippet to bring the extpng defines into the vdr.pc CXXFLAGS CFLAGS
|
||||
echo "-DUSE_${ARG_UPPER}" >> "${T}"/defines.tmp
|
||||
cat "${T}"/defines.tmp | tr \\\012 ' ' > "${T}"/defines.IUSE
|
||||
export DEFINES_IUSE=$( cat ${T}/defines.IUSE )
|
||||
done
|
||||
}
|
||||
|
||||
extensions_add_make_conf()
|
||||
{
|
||||
# copy all ifdef for extensions-patch to Make.config
|
||||
sed -e '1,/need to touch the following:/d' \
|
||||
-e '/need to touch the following/,/^$/d' \
|
||||
Make.config.template >> Make.config
|
||||
}
|
||||
|
||||
extensions_all_defines() {
|
||||
# extract all possible settings for extensions-patch
|
||||
sed -e '/^#\?[A-Z].*= 1/!d' -e 's/^#\?//' -e 's/ .*//' \
|
||||
Make.config.template \
|
||||
| sort \
|
||||
| tr '[:upper:]' '[:lower:]'
|
||||
}
|
||||
|
||||
lang_po() {
|
||||
LING_PO=$( ls ${S}/po | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# apply maintainace-patches
|
||||
|
||||
ebegin "Changing paths for gentoo"
|
||||
|
||||
local DVBDIR=/usr/include
|
||||
local i
|
||||
for i in ${DVB_HEADER_PATH} /usr/include/v4l-dvb-hg /usr/include; do
|
||||
[[ -d ${i} ]] || continue
|
||||
if [[ -f ${i}/linux/dvb/dmx.h ]]; then
|
||||
einfo "Found DVB header files in ${i}"
|
||||
DVBDIR=${i}
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# checking for s2api headers
|
||||
local api_version
|
||||
api_version=$(awk -F' ' '/define DVB_API_VERSION / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
|
||||
api_version=${api_version}*$(awk -F' ' '/define DVB_API_VERSION_MINOR / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
|
||||
|
||||
if [[ ${api_version:-0} -lt 5*3 ]]; then
|
||||
eerror "DVB header files do not contain s2api support or too old for ${P}"
|
||||
eerror "You cannot compile VDR against old dvb-header"
|
||||
die "DVB headers too old"
|
||||
fi
|
||||
|
||||
cat > Make.config <<-EOT
|
||||
#
|
||||
# Generated by ebuild ${PF}
|
||||
#
|
||||
PREFIX = /usr
|
||||
DVBDIR = ${DVBDIR}
|
||||
PLUGINLIBDIR = ${PLUGIN_LIBDIR}
|
||||
CONFDIR = ${CONF_DIR}
|
||||
VIDEODIR = /var/vdr/video
|
||||
LOCDIR = \$(PREFIX)/share/locale
|
||||
INCDIR = \$(PREFIX)/include
|
||||
|
||||
DEFINES += -DCONFDIR=\"\$(CONFDIR)\"
|
||||
INCLUDES += -I\$(DVBDIR)
|
||||
|
||||
# >=vdr-1.7.36-r1; parameter only used for compiletime on vdr
|
||||
# PLUGINLIBDIR (plugin Makefile old) = LIBDIR (plugin Makefile new)
|
||||
LIBDIR = ${PLUGIN_LIBDIR}
|
||||
PCDIR = /usr/$(get_libdir)/pkgconfig
|
||||
EOT
|
||||
eend 0
|
||||
|
||||
# support languages, written from right to left
|
||||
BUILD_PARAMS+=" BIDI=$(usex bidi 1 0)"
|
||||
|
||||
epatch "${FILESDIR}/${PN}-2.0.0_gentoo.patch"
|
||||
|
||||
if ! use vanilla; then
|
||||
|
||||
# Now apply extensions patch
|
||||
epatch "${WORKDIR}/${EXT_P}.patch"
|
||||
|
||||
# This allows us to start even if some plugin does not exist
|
||||
# or is not loadable.
|
||||
enable_patch PLUGINMISSING
|
||||
enable_patch CHANNELBIND
|
||||
|
||||
if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
|
||||
einfo "Doing maintainer checks:"
|
||||
|
||||
# we do not support these patches
|
||||
# (or have them already hard enabled)
|
||||
local IGNORE_PATCHES="pluginmissing channelbind"
|
||||
|
||||
extensions_all_defines > "${T}"/new.IUSE
|
||||
echo $EXT_PATCH_FLAGS $EXT_PATCH_FLAGS_RENAMED_EXT_NAME \
|
||||
$IGNORE_PATCHES | \
|
||||
tr ' ' '\n' |sort > "${T}"/old.IUSE
|
||||
local DIFFS=$(diff -u "${T}"/old.IUSE "${T}"/new.IUSE|grep '^[+-][^+-]')
|
||||
if [[ -z ${DIFFS} ]]; then
|
||||
einfo "EXT_PATCH_FLAGS is up to date."
|
||||
else
|
||||
ewarn "IUSE differences!"
|
||||
local diff
|
||||
for diff in $DIFFS; do
|
||||
ewarn "$diff"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
ebegin "Enabling selected patches"
|
||||
local flag
|
||||
for flag in $EXT_PATCH_FLAGS; do
|
||||
use $flag && enable_patch ${flag}
|
||||
done
|
||||
|
||||
eend 0
|
||||
|
||||
extensions_add_make_conf
|
||||
|
||||
# add defined use-flags compile options to vdr.pc
|
||||
sed -e "s:\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR):\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR) \$(DEFINES_IUSE):" \
|
||||
-i Makefile
|
||||
|
||||
ebegin "Make depend"
|
||||
emake .dependencies >/dev/null
|
||||
eend $? "make depend failed"
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
|
||||
add_cap CAP_UTF8
|
||||
|
||||
add_cap CAP_IRCTRL_RUNTIME_PARAM \
|
||||
CAP_VFAT_RUNTIME_PARAM \
|
||||
CAP_CHUID \
|
||||
CAP_SHUTDOWN_AUTO_RETRY
|
||||
|
||||
echo -e ${CAPS} > "${CAP_FILE}"
|
||||
|
||||
# LINGUAS support
|
||||
einfo "\n \t VDR supports the LINGUAS values"
|
||||
|
||||
lang_po
|
||||
|
||||
einfo "\t Please set one of this values in your sytem make.conf"
|
||||
einfo "\t LINGUAS=\"${LING_PO}\"\n"
|
||||
|
||||
if [[ -z ${LINGUAS} ]]; then
|
||||
einfo "\n \t No values in LINGUAS="
|
||||
einfo "\t You will get only english text on OSD \n"
|
||||
fi
|
||||
|
||||
strip-linguas ${LING_PO} en
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# trick makefile not to create a videodir by supplying it with an existing
|
||||
# directory
|
||||
einstall \
|
||||
VIDEODIR="/" \
|
||||
DESTDIR="${D}" \
|
||||
|| die "einstall failed"
|
||||
|
||||
keepdir "${PLUGIN_LIBDIR}"
|
||||
|
||||
keepdir "${CONF_DIR}"/plugins
|
||||
keepdir "${CONF_DIR}"/themes
|
||||
|
||||
diropts -m0755 -ovdr -gvdr
|
||||
keepdir /var/cache/vdr
|
||||
|
||||
if use html; then
|
||||
dohtml *.html
|
||||
fi
|
||||
|
||||
dodoc MANUAL INSTALL README* HISTORY CONTRIBUTORS
|
||||
|
||||
insinto /usr/share/vdr
|
||||
doins "${CAP_FILE}"
|
||||
|
||||
if use alternatechannel; then
|
||||
insinto /etc/vdr
|
||||
doins "${FILESDIR}"/channel_alternative.conf
|
||||
fi
|
||||
|
||||
if use setup; then
|
||||
insinto /usr/share/vdr/setup
|
||||
doins "${S}"/menu.c
|
||||
fi
|
||||
|
||||
chown -R vdr:vdr "${D}/${CONF_DIR}"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
has_version "<${CATEGORY}/${PN}-1.6.0_p2-r8"
|
||||
previous_less_than_1_6_0_p2_r8=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-1.7.27"
|
||||
previous_less_than_1_7_27=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-1.7.36"
|
||||
previous_less_than_1_7_36=$?
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
# correct wrong permission from earlier install
|
||||
CACHEOWNER="$(stat -c %U /var/cache/vdr)"
|
||||
if [ ! ${CACHEOWNER} == vdr ]; then
|
||||
chown -R vdr:vdr "${ROOT}/var/cache/vdr"
|
||||
fi
|
||||
|
||||
if [[ previous_less_than_1_6_0_p2_r8=$? = 0 ]] ; then
|
||||
elog " Upgrade Info:"
|
||||
|
||||
elog " The recording format is now Transport Stream. Existing recordings in PES format"
|
||||
elog " can still be replayed and edited, but new recordings are done in TS."
|
||||
|
||||
elog " The support for full featured DVB cards of the TT/FuSi design has been moved"
|
||||
elog " into the new plugins 'dvbsddevice' 'dvbhddevice'. On systems that use such a card as their"
|
||||
elog " primary device, one of this plugin now needs to be loaded when running VDR in order"
|
||||
elog " to view live or recorded video. If the plugin is not loaded, the card will"
|
||||
elog " be treated like a budget DVB card, and there will be no OSD or viewing"
|
||||
elog " capability."
|
||||
|
||||
elog " The index file for TS recordings is now regenerated on-the-fly if a"
|
||||
elog " recording is replayed that has no index. This can also be used to"
|
||||
elog " re-create a broken index file by manually deleting the index file and then"
|
||||
elog " replaying the recording."
|
||||
|
||||
elog " The files \"commands.conf\" and \"reccmd.conf\" can now contain nested lists of"
|
||||
elog " commands. See man vdr.5 for information about the new file format."
|
||||
|
||||
elog " The option \"Setup/DVB/Use Dolby Digital\" now only controls whether Dolby Digital"
|
||||
elog " tracks appear in the 'Audio' menu. Dolby Digital is always recorded"
|
||||
|
||||
elog " The default SVDRP port is now 6419"
|
||||
fi
|
||||
|
||||
if [[ previous_less_than_1_7_27=$? = 0 ]] ; then
|
||||
elog " In vdr releases >=vdr-1.7.27 the depricated i18n handling is removed."
|
||||
elog " This results now in a lot of plugins which do on compile any more."
|
||||
elog " Please visit for more infos:"
|
||||
elog " https://bugs.gentoo.org/show_bug.cgi?id=414177"
|
||||
elog " and depended bugs"
|
||||
fi
|
||||
|
||||
if [[ previous_less_than_1_7_36=$? = 0 ]] ; then
|
||||
elog " By default VDR is now build according to the FHS."
|
||||
elog " Gentoo VDR still uses the standard from"
|
||||
elog " Filesystem Hierarchy Standard"
|
||||
elog " It is supported since beginning of VDR support"
|
||||
elog " on Gentoo"
|
||||
elog " Finally, there are minimal changes for the user."
|
||||
fi
|
||||
|
||||
elog "It is a good idea to run vdrplugin-rebuild now."
|
||||
|
||||
if use setup; then
|
||||
if ! has_version media-plugins/vdr-setup || \
|
||||
! egrep -q '^setup$' "${ROOT}/etc/conf.d/vdr.plugins"; then
|
||||
|
||||
echo
|
||||
ewarn "You have compiled media-video/vdr with USE=\"setup\""
|
||||
ewarn "It is very important to emerge media-plugins/vdr-setup now!"
|
||||
ewarn "and you have to loaded it in /etc/conf.d/vdr.plugins"
|
||||
fi
|
||||
fi
|
||||
|
||||
elog "To get nice symbols in OSD we recommend to install"
|
||||
elog "\t1. emerge media-fonts/vdrsymbols-ttf"
|
||||
elog "\t2. select font VDRSymbolsSans in Setup"
|
||||
elog ""
|
||||
elog "To get an idea how to proceed now, have a look at our vdr-guide:"
|
||||
elog "\thttps://wiki.gentoo.org/wiki/VDR"
|
||||
}
|
@ -1,372 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/vdr-2.0.5.ebuild,v 1.3 2015/02/19 19:38:49 hd_brummy Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs
|
||||
|
||||
# Switches supported by extensions-patch
|
||||
EXT_PATCH_FLAGS="alternatechannel ddepgentry dvlvidprefer graphtft
|
||||
jumpplay jumpingseconds mainmenuhooks menuorg naludump permashift
|
||||
pinplugin rotor setup ttxtsubs vasarajanauloja wareagleicon yaepg"
|
||||
|
||||
# names of the use-flags
|
||||
EXT_PATCH_FLAGS_RENAMED=""
|
||||
|
||||
# names ext-patch uses internally, here only used for maintainer checks
|
||||
EXT_PATCH_FLAGS_RENAMED_EXT_NAME=""
|
||||
|
||||
IUSE="bidi debug html vanilla ${EXT_PATCH_FLAGS} ${EXT_PATCH_FLAGS_RENAMED}"
|
||||
|
||||
MY_PV="${PV%_p*}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
EXT_P="extpng-${PN}-2.0.4-gentoo-edition-v1"
|
||||
|
||||
DESCRIPTION="Video Disk Recorder - turns a pc into a powerful set top box for DVB"
|
||||
HOMEPAGE="http://www.tvdr.de/"
|
||||
SRC_URI="ftp://ftp.tvdr.de/vdr/${MY_P}.tar.bz2
|
||||
http://dev.gentoo.org/~hd_brummy/distfiles/${EXT_P}.patch.bz2"
|
||||
|
||||
KEYWORDS="~arm ~amd64 ~ppc ~x86"
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2"
|
||||
|
||||
REQUIRED_USE="setup? ( !menuorg )
|
||||
menuorg? ( !setup )"
|
||||
|
||||
COMMON_DEPEND="virtual/jpeg:*
|
||||
sys-libs/libcap
|
||||
>=media-libs/fontconfig-2.4.2
|
||||
>=media-libs/freetype-2"
|
||||
# setup? ( >=dev-libs/tinyxml-2.6.1[stl] )
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=virtual/linuxtv-dvb-headers-5.3
|
||||
sys-devel/gettext"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
dev-lang/perl
|
||||
>=media-tv/gentoo-vdr-scripts-0.2.0
|
||||
media-fonts/corefonts
|
||||
bidi? ( dev-libs/fribidi )"
|
||||
|
||||
# pull in vdr-setup to get the xml files, else menu will not work
|
||||
#PDEPEND="setup? ( >=media-plugins/vdr-setup-0.3.1-r3 )"
|
||||
|
||||
CONF_DIR=/etc/vdr
|
||||
CAP_FILE=${S}/capabilities.sh
|
||||
CAPS="# Capabilities of the vdr-executable for use by startscript etc."
|
||||
|
||||
pkg_setup() {
|
||||
use debug && append-flags -g
|
||||
|
||||
PLUGIN_LIBDIR="/usr/$(get_libdir)/vdr/plugins"
|
||||
|
||||
tc-export CC CXX AR
|
||||
}
|
||||
|
||||
add_cap() {
|
||||
local arg
|
||||
for arg; do
|
||||
CAPS="${CAPS}\n${arg}=1"
|
||||
done
|
||||
}
|
||||
|
||||
enable_patch() {
|
||||
local arg ARG_UPPER
|
||||
for arg; do
|
||||
ARG_UPPER=$(echo $arg|tr '[:lower:]' '[:upper:]')
|
||||
echo "${ARG_UPPER} = 1" >> Make.config
|
||||
|
||||
# codesnippet to bring the extpng defines into the vdr.pc CXXFLAGS CFLAGS
|
||||
echo "-DUSE_${ARG_UPPER}" >> "${T}"/defines.tmp
|
||||
cat "${T}"/defines.tmp | tr \\\012 ' ' > "${T}"/defines.IUSE
|
||||
export DEFINES_IUSE=$( cat ${T}/defines.IUSE )
|
||||
done
|
||||
}
|
||||
|
||||
extensions_add_make_conf()
|
||||
{
|
||||
# copy all ifdef for extensions-patch to Make.config
|
||||
sed -e '1,/need to touch the following:/d' \
|
||||
-e '/need to touch the following/,/^$/d' \
|
||||
Make.config.template >> Make.config
|
||||
}
|
||||
|
||||
extensions_all_defines() {
|
||||
# extract all possible settings for extensions-patch
|
||||
sed -e '/^#\?[A-Z].*= 1/!d' -e 's/^#\?//' -e 's/ .*//' \
|
||||
Make.config.template \
|
||||
| sort \
|
||||
| tr '[:upper:]' '[:lower:]'
|
||||
}
|
||||
|
||||
lang_po() {
|
||||
LING_PO=$( ls ${S}/po | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# apply maintainace-patches
|
||||
|
||||
if use setup; then
|
||||
eerror "media-plugins/vdr-setup"
|
||||
eerror "is not supported by Upstream anymore"
|
||||
eerror "we will remove this plugin in the future from gentoo portage"
|
||||
eerror "please use as equivalent media-plugins/vdr-menuorg"
|
||||
die
|
||||
fi
|
||||
|
||||
ebegin "Changing paths for gentoo"
|
||||
|
||||
local DVBDIR=/usr/include
|
||||
local i
|
||||
for i in ${DVB_HEADER_PATH} /usr/include/v4l-dvb-hg /usr/include; do
|
||||
[[ -d ${i} ]] || continue
|
||||
if [[ -f ${i}/linux/dvb/dmx.h ]]; then
|
||||
einfo "Found DVB header files in ${i}"
|
||||
DVBDIR=${i}
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# checking for s2api headers
|
||||
local api_version
|
||||
api_version=$(awk -F' ' '/define DVB_API_VERSION / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
|
||||
api_version=${api_version}*$(awk -F' ' '/define DVB_API_VERSION_MINOR / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
|
||||
|
||||
if [[ ${api_version:-0} -lt 5*3 ]]; then
|
||||
eerror "DVB header files do not contain s2api support or too old for ${P}"
|
||||
eerror "You cannot compile VDR against old dvb-header"
|
||||
die "DVB headers too old"
|
||||
fi
|
||||
|
||||
cat > Make.config <<-EOT
|
||||
#
|
||||
# Generated by ebuild ${PF}
|
||||
#
|
||||
PREFIX = /usr
|
||||
DVBDIR = ${DVBDIR}
|
||||
PLUGINLIBDIR = ${PLUGIN_LIBDIR}
|
||||
CONFDIR = ${CONF_DIR}
|
||||
VIDEODIR = /var/vdr/video
|
||||
LOCDIR = \$(PREFIX)/share/locale
|
||||
INCDIR = \$(PREFIX)/include
|
||||
|
||||
DEFINES += -DCONFDIR=\"\$(CONFDIR)\"
|
||||
INCLUDES += -I\$(DVBDIR)
|
||||
|
||||
# >=vdr-1.7.36-r1; parameter only used for compiletime on vdr
|
||||
# PLUGINLIBDIR (plugin Makefile old) = LIBDIR (plugin Makefile new)
|
||||
LIBDIR = ${PLUGIN_LIBDIR}
|
||||
PCDIR = /usr/$(get_libdir)/pkgconfig
|
||||
EOT
|
||||
eend 0
|
||||
|
||||
# support languages, written from right to left
|
||||
BUILD_PARAMS+=" BIDI=$(usex bidi 1 0)"
|
||||
|
||||
epatch "${FILESDIR}/${PN}-2.0.0_gentoo.patch"
|
||||
|
||||
if ! use vanilla; then
|
||||
|
||||
# Now apply extensions patch
|
||||
epatch "${WORKDIR}/${EXT_P}.patch"
|
||||
|
||||
# This allows us to start even if some plugin does not exist
|
||||
# or is not loadable.
|
||||
enable_patch PLUGINMISSING
|
||||
enable_patch CHANNELBIND
|
||||
|
||||
if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
|
||||
einfo "Doing maintainer checks:"
|
||||
|
||||
# we do not support these patches
|
||||
# (or have them already hard enabled)
|
||||
local IGNORE_PATCHES="pluginmissing channelbind"
|
||||
|
||||
extensions_all_defines > "${T}"/new.IUSE
|
||||
echo $EXT_PATCH_FLAGS $EXT_PATCH_FLAGS_RENAMED_EXT_NAME \
|
||||
$IGNORE_PATCHES | \
|
||||
tr ' ' '\n' |sort > "${T}"/old.IUSE
|
||||
local DIFFS=$(diff -u "${T}"/old.IUSE "${T}"/new.IUSE|grep '^[+-][^+-]')
|
||||
if [[ -z ${DIFFS} ]]; then
|
||||
einfo "EXT_PATCH_FLAGS is up to date."
|
||||
else
|
||||
ewarn "IUSE differences!"
|
||||
local diff
|
||||
for diff in $DIFFS; do
|
||||
ewarn "$diff"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
ebegin "Enabling selected patches"
|
||||
local flag
|
||||
for flag in $EXT_PATCH_FLAGS; do
|
||||
use $flag && enable_patch ${flag}
|
||||
done
|
||||
|
||||
eend 0
|
||||
|
||||
extensions_add_make_conf
|
||||
|
||||
# add defined use-flags compile options to vdr.pc
|
||||
sed -e "s:\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR):\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR) \$(DEFINES_IUSE):" \
|
||||
-i Makefile
|
||||
|
||||
ebegin "Make depend"
|
||||
emake .dependencies >/dev/null
|
||||
eend $? "make depend failed"
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
|
||||
add_cap CAP_UTF8
|
||||
|
||||
add_cap CAP_IRCTRL_RUNTIME_PARAM \
|
||||
CAP_VFAT_RUNTIME_PARAM \
|
||||
CAP_CHUID \
|
||||
CAP_SHUTDOWN_AUTO_RETRY
|
||||
|
||||
echo -e ${CAPS} > "${CAP_FILE}"
|
||||
|
||||
# LINGUAS support
|
||||
einfo "\n \t VDR supports the LINGUAS values"
|
||||
|
||||
lang_po
|
||||
|
||||
einfo "\t Please set one of this values in your sytem make.conf"
|
||||
einfo "\t LINGUAS=\"${LING_PO}\"\n"
|
||||
|
||||
if [[ -z ${LINGUAS} ]]; then
|
||||
einfo "\n \t No values in LINGUAS="
|
||||
einfo "\t You will get only english text on OSD \n"
|
||||
fi
|
||||
|
||||
strip-linguas ${LING_PO} en
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# trick makefile not to create a videodir by supplying it with an existing
|
||||
# directory
|
||||
einstall \
|
||||
VIDEODIR="/" \
|
||||
DESTDIR="${D}" \
|
||||
|| die "einstall failed"
|
||||
|
||||
keepdir "${PLUGIN_LIBDIR}"
|
||||
|
||||
keepdir "${CONF_DIR}"/plugins
|
||||
keepdir "${CONF_DIR}"/themes
|
||||
|
||||
diropts -m0755 -ovdr -gvdr
|
||||
keepdir /var/cache/vdr
|
||||
|
||||
if use html; then
|
||||
dohtml *.html
|
||||
fi
|
||||
|
||||
dodoc MANUAL INSTALL README* HISTORY CONTRIBUTORS
|
||||
|
||||
insinto /usr/share/vdr
|
||||
doins "${CAP_FILE}"
|
||||
|
||||
if use alternatechannel; then
|
||||
insinto /etc/vdr
|
||||
doins "${FILESDIR}"/channel_alternative.conf
|
||||
fi
|
||||
|
||||
# if use setup; then
|
||||
# insinto /usr/share/vdr/setup
|
||||
# doins "${S}"/menu.c
|
||||
# fi
|
||||
|
||||
chown -R vdr:vdr "${D}/${CONF_DIR}"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
has_version "<${CATEGORY}/${PN}-1.6.0_p2-r8"
|
||||
previous_less_than_1_6_0_p2_r8=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-1.7.27"
|
||||
previous_less_than_1_7_27=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-1.7.36"
|
||||
previous_less_than_1_7_36=$?
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
# correct wrong permission from earlier install
|
||||
CACHEOWNER="$(stat -c %U /var/cache/vdr)"
|
||||
if [ ! ${CACHEOWNER} == vdr ]; then
|
||||
chown -R vdr:vdr "${ROOT}/var/cache/vdr"
|
||||
fi
|
||||
|
||||
if [[ previous_less_than_1_6_0_p2_r8=$? = 0 ]] ; then
|
||||
elog " Upgrade Info:"
|
||||
|
||||
elog " The recording format is now Transport Stream. Existing recordings in PES format"
|
||||
elog " can still be replayed and edited, but new recordings are done in TS."
|
||||
|
||||
elog " The support for full featured DVB cards of the TT/FuSi design has been moved"
|
||||
elog " into the new plugins 'dvbsddevice' 'dvbhddevice'. On systems that use such a card as their"
|
||||
elog " primary device, one of this plugin now needs to be loaded when running VDR in order"
|
||||
elog " to view live or recorded video. If the plugin is not loaded, the card will"
|
||||
elog " be treated like a budget DVB card, and there will be no OSD or viewing"
|
||||
elog " capability."
|
||||
|
||||
elog " The index file for TS recordings is now regenerated on-the-fly if a"
|
||||
elog " recording is replayed that has no index. This can also be used to"
|
||||
elog " re-create a broken index file by manually deleting the index file and then"
|
||||
elog " replaying the recording."
|
||||
|
||||
elog " The files \"commands.conf\" and \"reccmd.conf\" can now contain nested lists of"
|
||||
elog " commands. See man vdr.5 for information about the new file format."
|
||||
|
||||
elog " The option \"Setup/DVB/Use Dolby Digital\" now only controls whether Dolby Digital"
|
||||
elog " tracks appear in the 'Audio' menu. Dolby Digital is always recorded"
|
||||
|
||||
elog " The default SVDRP port is now 6419"
|
||||
fi
|
||||
|
||||
if [[ previous_less_than_1_7_27=$? = 0 ]] ; then
|
||||
elog " In vdr releases >=vdr-1.7.27 the depricated i18n handling is removed."
|
||||
elog " This results now in a lot of plugins which do on compile any more."
|
||||
elog " Please visit for more infos:"
|
||||
elog " https://bugs.gentoo.org/show_bug.cgi?id=414177"
|
||||
elog " and depended bugs"
|
||||
fi
|
||||
|
||||
if [[ previous_less_than_1_7_36=$? = 0 ]] ; then
|
||||
elog " By default VDR is now build according to the FHS."
|
||||
elog " Gentoo VDR still uses the standard from"
|
||||
elog " Filesystem Hierarchy Standard"
|
||||
elog " It is supported since beginning of VDR support"
|
||||
elog " on Gentoo"
|
||||
elog " Finally, there are minimal changes for the user."
|
||||
fi
|
||||
|
||||
elog "It is a good idea to run vdrplugin-rebuild now."
|
||||
|
||||
# if use setup; then
|
||||
# if ! has_version media-plugins/vdr-setup || \
|
||||
# ! egrep -q '^setup$' "${ROOT}/etc/conf.d/vdr.plugins"; then
|
||||
|
||||
# echo
|
||||
# ewarn "You have compiled media-video/vdr with USE=\"setup\""
|
||||
# ewarn "It is very important to emerge media-plugins/vdr-setup now!"
|
||||
# ewarn "and you have to loaded it in /etc/conf.d/vdr.plugins"
|
||||
# fi
|
||||
# fi
|
||||
|
||||
elog "To get nice symbols in OSD we recommend to install"
|
||||
elog "\t1. emerge media-fonts/vdrsymbols-ttf"
|
||||
elog "\t2. select font VDRSymbolsSans in Setup"
|
||||
elog ""
|
||||
elog "To get an idea how to proceed now, have a look at our vdr-guide:"
|
||||
elog "\thttps://wiki.gentoo.org/wiki/VDR"
|
||||
}
|
@ -1,289 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/vdr-2.0.6-r2.ebuild,v 1.2 2015/02/19 19:38:49 hd_brummy Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs
|
||||
|
||||
# Switches supported by extensions-patch
|
||||
EXT_PATCH_FLAGS="alternatechannel ddepgentry dvlvidprefer graphtft
|
||||
jumpplay jumpingseconds mainmenuhooks menuorg naludump permashift permashift_v1
|
||||
pinplugin rotor ttxtsubs vasarajanauloja wareagleicon yaepg"
|
||||
|
||||
# names of the use-flags
|
||||
EXT_PATCH_FLAGS_RENAMED=""
|
||||
|
||||
# names ext-patch uses internally, here only used for maintainer checks
|
||||
EXT_PATCH_FLAGS_RENAMED_EXT_NAME=""
|
||||
|
||||
IUSE="bidi debug html systemd vanilla ${EXT_PATCH_FLAGS} ${EXT_PATCH_FLAGS_RENAMED}"
|
||||
|
||||
MY_PV="${PV%_p*}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
EXT_P="extpng-${P}-gentoo-edition-v6"
|
||||
|
||||
DESCRIPTION="Video Disk Recorder - turns a pc into a powerful set top box for DVB"
|
||||
HOMEPAGE="http://www.tvdr.de/"
|
||||
SRC_URI="ftp://ftp.tvdr.de/vdr/${MY_P}.tar.bz2
|
||||
http://dev.gentoo.org/~hd_brummy/distfiles/${EXT_P}.patch.bz2"
|
||||
|
||||
KEYWORDS="~arm ~amd64 ~ppc ~x86"
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2"
|
||||
|
||||
REQUIRED_USE="
|
||||
permashift? ( !permashift_v1 )
|
||||
permashift_v1? ( !permashift )"
|
||||
|
||||
COMMON_DEPEND="virtual/jpeg:*
|
||||
sys-libs/libcap
|
||||
>=media-libs/fontconfig-2.4.2
|
||||
>=media-libs/freetype-2"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=virtual/linuxtv-dvb-headers-5.3
|
||||
sys-devel/gettext"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
dev-lang/perl
|
||||
>=media-tv/gentoo-vdr-scripts-2.5
|
||||
media-fonts/corefonts
|
||||
bidi? ( dev-libs/fribidi )
|
||||
systemd? ( sys-apps/systemd )"
|
||||
|
||||
CONF_DIR=/etc/vdr
|
||||
CAP_FILE=${S}/capabilities.sh
|
||||
CAPS="# Capabilities of the vdr-executable for use by startscript etc."
|
||||
|
||||
pkg_setup() {
|
||||
use debug && append-flags -g
|
||||
|
||||
PLUGIN_LIBDIR="/usr/$(get_libdir)/vdr/plugins"
|
||||
|
||||
tc-export CC CXX AR
|
||||
}
|
||||
|
||||
add_cap() {
|
||||
local arg
|
||||
for arg; do
|
||||
CAPS="${CAPS}\n${arg}=1"
|
||||
done
|
||||
}
|
||||
|
||||
enable_patch() {
|
||||
local arg ARG_UPPER
|
||||
for arg; do
|
||||
ARG_UPPER=$(echo $arg|tr '[:lower:]' '[:upper:]')
|
||||
echo "${ARG_UPPER} = 1" >> Make.config
|
||||
|
||||
# codesnippet to bring the extpng defines into the vdr.pc CXXFLAGS CFLAGS
|
||||
echo "-DUSE_${ARG_UPPER}" >> "${T}"/defines.tmp
|
||||
cat "${T}"/defines.tmp | tr \\\012 ' ' > "${T}"/defines.IUSE
|
||||
export DEFINES_IUSE=$( cat ${T}/defines.IUSE )
|
||||
done
|
||||
}
|
||||
|
||||
extensions_add_make_conf()
|
||||
{
|
||||
# copy all ifdef for extensions-patch to Make.config
|
||||
sed -e '1,/need to touch the following:/d' \
|
||||
-e '/need to touch the following/,/^$/d' \
|
||||
Make.config.template >> Make.config
|
||||
}
|
||||
|
||||
extensions_all_defines() {
|
||||
# extract all possible settings for extensions-patch
|
||||
sed -e '/^#\?[A-Z].*= 1/!d' -e 's/^#\?//' -e 's/ .*//' \
|
||||
Make.config.template \
|
||||
| sort \
|
||||
| tr '[:upper:]' '[:lower:]'
|
||||
}
|
||||
|
||||
lang_po() {
|
||||
LING_PO=$( ls ${S}/po | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# apply maintainace-patches
|
||||
ebegin "Changing paths for gentoo"
|
||||
|
||||
local DVBDIR=/usr/include
|
||||
local i
|
||||
for i in ${DVB_HEADER_PATH} /usr/include/v4l-dvb-hg /usr/include; do
|
||||
[[ -d ${i} ]] || continue
|
||||
if [[ -f ${i}/linux/dvb/dmx.h ]]; then
|
||||
einfo "Found DVB header files in ${i}"
|
||||
DVBDIR=${i}
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# checking for s2api headers
|
||||
local api_version
|
||||
api_version=$(awk -F' ' '/define DVB_API_VERSION / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
|
||||
api_version=${api_version}*$(awk -F' ' '/define DVB_API_VERSION_MINOR / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
|
||||
|
||||
if [[ ${api_version:-0} -lt 5*3 ]]; then
|
||||
eerror "DVB header files do not contain s2api support or too old for ${P}"
|
||||
eerror "You cannot compile VDR against old dvb-header"
|
||||
die "DVB headers too old"
|
||||
fi
|
||||
|
||||
cat > Make.config <<-EOT
|
||||
#
|
||||
# Generated by ebuild ${PF}
|
||||
#
|
||||
PREFIX = /usr
|
||||
DVBDIR = ${DVBDIR}
|
||||
PLUGINLIBDIR = ${PLUGIN_LIBDIR}
|
||||
CONFDIR = ${CONF_DIR}
|
||||
VIDEODIR = /var/vdr/video
|
||||
LOCDIR = \$(PREFIX)/share/locale
|
||||
INCDIR = \$(PREFIX)/include
|
||||
|
||||
DEFINES += -DCONFDIR=\"\$(CONFDIR)\"
|
||||
INCLUDES += -I\$(DVBDIR)
|
||||
|
||||
# >=vdr-1.7.36-r1; parameter only used for compiletime on vdr
|
||||
# PLUGINLIBDIR (plugin Makefile old) = LIBDIR (plugin Makefile new)
|
||||
LIBDIR = ${PLUGIN_LIBDIR}
|
||||
PCDIR = /usr/$(get_libdir)/pkgconfig
|
||||
EOT
|
||||
eend 0
|
||||
|
||||
# support languages, written from right to left
|
||||
BUILD_PARAMS+=" BIDI=$(usex bidi 1 0)"
|
||||
|
||||
# systemd support
|
||||
use systemd && BUILD_PARAMS+=" SDNOTIFY=$(usex systemd 1 0)"
|
||||
|
||||
if ! use vanilla; then
|
||||
|
||||
# Now apply extensions patch
|
||||
epatch "${WORKDIR}/${EXT_P}.patch"
|
||||
|
||||
# This allows us to start even if some plugin does not exist
|
||||
# or is not loadable.
|
||||
enable_patch PLUGINMISSING
|
||||
enable_patch CHANNELBIND
|
||||
|
||||
if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
|
||||
einfo "Doing maintainer checks:"
|
||||
|
||||
# we do not support these patches
|
||||
# (or have them already hard enabled)
|
||||
local IGNORE_PATCHES="pluginmissing channelbind"
|
||||
|
||||
extensions_all_defines > "${T}"/new.IUSE
|
||||
echo $EXT_PATCH_FLAGS $EXT_PATCH_FLAGS_RENAMED_EXT_NAME \
|
||||
$IGNORE_PATCHES | \
|
||||
tr ' ' '\n' |sort > "${T}"/old.IUSE
|
||||
local DIFFS=$(diff -u "${T}"/old.IUSE "${T}"/new.IUSE|grep '^[+-][^+-]')
|
||||
if [[ -z ${DIFFS} ]]; then
|
||||
einfo "EXT_PATCH_FLAGS is up to date."
|
||||
else
|
||||
ewarn "IUSE differences!"
|
||||
local diff
|
||||
for diff in $DIFFS; do
|
||||
ewarn "$diff"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
ebegin "Enabling selected patches"
|
||||
local flag
|
||||
for flag in $EXT_PATCH_FLAGS; do
|
||||
use $flag && enable_patch ${flag}
|
||||
done
|
||||
|
||||
eend 0
|
||||
|
||||
extensions_add_make_conf
|
||||
|
||||
# add defined use-flags compile options to vdr.pc
|
||||
sed -e "s:\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR):\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR) \$(DEFINES_IUSE):" \
|
||||
-i Makefile
|
||||
|
||||
ebegin "Make depend"
|
||||
emake .dependencies >/dev/null
|
||||
eend $? "make depend failed"
|
||||
fi
|
||||
|
||||
epatch "${FILESDIR}/${P}-r2_gentoo.patch"
|
||||
|
||||
# backport from vdr-2.1.7 for better systemd support
|
||||
if use vanilla; then
|
||||
epatch "${FILESDIR}/${P}_systemd_argsdir_vanilla.patch"
|
||||
else
|
||||
epatch "${FILESDIR}/${P}_systemd_argsdir.patch"
|
||||
fi
|
||||
|
||||
epatch_user
|
||||
|
||||
add_cap CAP_UTF8
|
||||
|
||||
add_cap CAP_IRCTRL_RUNTIME_PARAM \
|
||||
CAP_VFAT_RUNTIME_PARAM \
|
||||
CAP_CHUID \
|
||||
CAP_SHUTDOWN_AUTO_RETRY
|
||||
|
||||
echo -e ${CAPS} > "${CAP_FILE}"
|
||||
|
||||
# LINGUAS support
|
||||
einfo "\n \t VDR supports the LINGUAS values"
|
||||
|
||||
lang_po
|
||||
|
||||
einfo "\t Please set one of this values in your sytem make.conf"
|
||||
einfo "\t LINGUAS=\"${LING_PO}\"\n"
|
||||
|
||||
if [[ -z ${LINGUAS} ]]; then
|
||||
einfo "\n \t No values in LINGUAS="
|
||||
einfo "\t You will get only english text on OSD \n"
|
||||
fi
|
||||
|
||||
strip-linguas ${LING_PO} en
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# # trick makefile not to create a videodir by supplying it with an existing
|
||||
# # directory
|
||||
emake \
|
||||
VIDEODIR="/" \
|
||||
DESTDIR="${D}" install || die "emake install failed"
|
||||
|
||||
keepdir "${PLUGIN_LIBDIR}"
|
||||
|
||||
# backup for plugins they don't be able to create this dir
|
||||
keepdir "${CONF_DIR}"/plugins
|
||||
|
||||
if use html; then
|
||||
dohtml *.html
|
||||
fi
|
||||
|
||||
dodoc MANUAL INSTALL README* HISTORY CONTRIBUTORS
|
||||
|
||||
insinto /usr/share/vdr
|
||||
doins "${CAP_FILE}"
|
||||
|
||||
if use alternatechannel; then
|
||||
insinto /etc/vdr
|
||||
doins "${FILESDIR}"/channel_alternative.conf
|
||||
fi
|
||||
|
||||
chown -R vdr:vdr "${D}/${CONF_DIR}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "It is a good idea to run vdrplugin-rebuild now."
|
||||
|
||||
elog "To get nice symbols in OSD we recommend to install"
|
||||
elog "\t1. emerge media-fonts/vdrsymbols-ttf"
|
||||
elog "\t2. select font VDRSymbolsSans in Setup"
|
||||
elog ""
|
||||
elog "To get an idea how to proceed now, have a look at our vdr-guide:"
|
||||
elog "\thttps://wiki.gentoo.org/wiki/VDR"
|
||||
}
|
@ -1 +1 @@
|
||||
Fri, 20 Feb 2015 08:06:51 +0000
|
||||
Fri, 20 Feb 2015 10:37:44 +0000
|
||||
|
@ -1 +1 @@
|
||||
Fri, 20 Feb 2015 08:06:52 +0000
|
||||
Fri, 20 Feb 2015 10:37:44 +0000
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue