summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2016-12-17 23:42:32 +0000
committerJames Le Cuirot <chewi@gentoo.org>2016-12-17 23:43:24 +0000
commit2d2e27068addf11b3a4f60265a031686383fd741 (patch)
tree771caf64562c00193522098b926bbc019250e6d9 /media-video/makemkv
parentsci-geosciences/mapserver: bump to 7.0.3 #602616 (diff)
downloadgentoo-2d2e27068addf11b3a4f60265a031686383fd741.tar.gz
gentoo-2d2e27068addf11b3a4f60265a031686383fd741.tar.bz2
gentoo-2d2e27068addf11b3a4f60265a031686383fd741.zip
media-video/makemkv: Fix building against Qt 5.7, closes bug #599228
The -std=c++11 flag is needed for building against Qt 5.7. Trouble is that upstream builds with CC rather than CXX. This only exhibits a warning but if you try to force CXX, it fails to build the C parts, which probably explains why upstream did this in the first place. I thought -x none might work but it breaks unless you put it before every C file. Possibly a GCC bug? Ideally upstream would just use automake and avoid this whole mess. The easiest way out is to only apply CXX and -std=c++11 to the makemkv binary, which doesn't have any C sources. The new patch also respects LDFLAGS. CFLAGS (not CXXFLAGS) is already respected by upstream now so src_compile is no longer needed. Some of the src_install stuff has also been dropped in favour of default as we now want upstream behaviour. Package-Manager: portage-2.3.3
Diffstat (limited to 'media-video/makemkv')
-rw-r--r--media-video/makemkv/files/makemkv-flags.patch51
-rw-r--r--media-video/makemkv/makemkv-1.10.3.ebuild24
2 files changed, 55 insertions, 20 deletions
diff --git a/media-video/makemkv/files/makemkv-flags.patch b/media-video/makemkv/files/makemkv-flags.patch
new file mode 100644
index 000000000000..f88bde00e651
--- /dev/null
+++ b/media-video/makemkv/files/makemkv-flags.patch
@@ -0,0 +1,51 @@
+diff -Naur a/Makefile.in b/Makefile.in
+--- a/Makefile.in 2016-12-11 16:14:27.000000000 +0000
++++ b/Makefile.in 2016-12-17 23:13:03.227251463 +0000
+@@ -2,9 +2,11 @@
+ include makefile.common
+
+ GCC=@CC@
++GXX=@CXX@
+ MOC=@QT_MOC@
+
+ CFLAGS=@CFLAGS_OPT@ -D_linux_ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
++LDFLAGS=@LDFLAGS@
+ DESTDIR=@DESTDIR@
+ PREFIX=@prefix@
+ ENABLE_GUI=@ENABLE_GUI@
+@@ -51,13 +53,13 @@
+
+ out/libdriveio.so.0.full:
+ mkdir -p out
+- $(GCC) $(CFLAGS) -D_REENTRANT -shared -Wl,-z,defs -o$@ $(LIBDRIVEIO_INC) $(LIBDRIVEIO_SRC) \
++ $(GCC) $(CFLAGS) $(LDFLAGS) -D_REENTRANT -shared -Wl,-z,defs -o$@ $(LIBDRIVEIO_INC) $(LIBDRIVEIO_SRC) \
+ -fPIC -Xlinker -dy -Xlinker --version-script=libdriveio/src/libdriveio.vers \
+ -Xlinker -soname=libdriveio.so.0 -lc -lstdc++
+
+ out/libmakemkv.so.1.full: tmp/gen_buildinfo.h
+ mkdir -p out
+- $(GCC) $(CFLAGS) -D_REENTRANT -shared -Wl,-z,defs -o$@ $(LIBEBML_INC) $(LIBEBML_DEF) $(LIBMATROSKA_INC) \
++ $(GCC) $(CFLAGS) $(LDFLAGS) -D_REENTRANT -shared -Wl,-z,defs -o$@ $(LIBEBML_INC) $(LIBEBML_DEF) $(LIBMATROSKA_INC) \
+ $(LIBMAKEMKV_INC) $(SSTRING_INC) $(MAKEMKVGUI_INC) $(LIBABI_INC) $(LIBFFABI_INC) $(LIBDCADEC_DEF) \
+ $(LIBEBML_SRC) $(LIBMATROSKA_SRC) $(LIBMAKEMKV_SRC) $(GLIBC_SRC) $(SSTRING_SRC) \
+ $(LIBABI_SRC) $(LIBABI_SRC_LINUX) $(LIBFFABI_SRC) $(LIBDCADEC_SRC) \
+@@ -67,16 +69,16 @@
+
+ out/libmmbd.so.0.full:
+ mkdir -p out
+- $(GCC) $(CFLAGS) -D_REENTRANT -shared -Wl,-z,defs -o$@ $(MAKEMKVGUI_INC) $(LIBMMBD_INC) \
++ $(GCC) $(CFLAGS) $(LDFLAGS) -D_REENTRANT -shared -Wl,-z,defs -o$@ $(MAKEMKVGUI_INC) $(LIBMMBD_INC) \
+ $(LIBMAKEMKV_INC) $(SSTRING_INC) $(LIBABI_INC) $(LIBMMBD_SRC) $(LIBMMBD_SRC_LINUX) $(SSTRING_SRC) \
+ -fPIC -Xlinker -dy -Xlinker --version-script=libmmbd/src/libmmbd.vers \
+ -Xlinker -soname=libmmbd.so.0 -lc -lstdc++ -lrt -lpthread -lcrypto
+
+ out/makemkv.full: $(MAKEMKVGUI_GEN) $(MAKEMKVGUI_SRC_LINUX) tmp/gen_buildinfo.h
+ mkdir -p out
+- $(GCC) $(CFLAGS) -o$@ $(MAKEMKVGUI_INC) $(LIBMAKEMKV_INC) $(SSTRING_INC) $(LIBDRIVEIO_INC) $(LIBABI_INC) \
++ $(GXX) $(CFLAGS) $(LDFLAGS) -o$@ $(MAKEMKVGUI_INC) $(LIBMAKEMKV_INC) $(SSTRING_INC) $(LIBDRIVEIO_INC) $(LIBABI_INC) \
+ $(MAKEMKVGUI_SRC) $(MAKEMKVGUI_SRC_LINUX) $(MAKEMKVGUI_GEN) $(SSTRING_SRC) $(LIBDRIVEIO_SRC_PUB) \
+- -DHAVE_BUILDINFO_H -Itmp \
++ -std=c++11 -DHAVE_BUILDINFO_H -Itmp \
+ @QT_INC@ -lc -lstdc++ \
+ @QT_LIB@ -lpthread -lz -lrt
+
diff --git a/media-video/makemkv/makemkv-1.10.3.ebuild b/media-video/makemkv/makemkv-1.10.3.ebuild
index d2a5e6ee72d0..fd12203a331c 100644
--- a/media-video/makemkv/makemkv-1.10.3.ebuild
+++ b/media-video/makemkv/makemkv-1.10.3.ebuild
@@ -46,7 +46,7 @@ RDEPEND="${DEPEND}
S="${WORKDIR}/makemkv-oss-${PV}"
src_prepare() {
- PATCHES+=( "${FILESDIR}"/${PN}-{makefile,path,sysmacros}.patch )
+ PATCHES+=( "${FILESDIR}"/${PN}-{makefile,path,sysmacros,flags}.patch )
# Qt5 always trumps Qt4 if it is available. There are no configure
# options or variables to control this and there is no publicly
@@ -75,15 +75,10 @@ src_configure() {
econf "${econf_args[@]}"
}
-src_compile() {
- emake GCC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}"
-}
-
src_install() {
- # install oss package
- dolib.so out/libdriveio.so.0
- dolib.so out/libmakemkv.so.1
- dolib.so out/libmmbd.so.0
+ default
+
+ # add missing symlinks for QA
dosym libdriveio.so.0 /usr/$(get_libdir)/libdriveio.so.0.${PV}
dosym libdriveio.so.0 /usr/$(get_libdir)/libdriveio.so
dosym libmakemkv.so.1 /usr/$(get_libdir)/libmakemkv.so.1.${PV}
@@ -91,17 +86,6 @@ src_install() {
dosym libmmbd.so.0 /usr/$(get_libdir)/libmmbd.so
dosym libmmbd.so.0 /usr/$(get_libdir)/libmmbd.so.0.${PV}
- if use qt5 || use qt4; then
- dobin out/makemkv
-
- local res
- for res in 16 22 32 64 128; do
- newicon -s ${res} makemkvgui/share/icons/${res}x${res}/makemkv.png ${PN}.png
- done
-
- make_desktop_entry ${PN} MakeMKV ${PN} 'Qt;AudioVideo;Video'
- fi
-
cd "${WORKDIR}"/${MY_PB} || die
# install prebuilt bins