The current multimedia/handbrake port is outdated and fails to build on FreeBSD 10/11 due to gcc and iconv issues (see ports/183914). The attached patch updates the port to the most recent upstream version 0.9.9. In this version, a number of bundled packages have been replaced with system libraries; these are now pulled in from the corresponding ports. Building with clang fails on the bundled version of mp4v2, so the port still depends on gcc. Finally, hardcoded dependencies on libiconv have been patched to allow the port to use the native iconv implementation in base. I could only test the port on FreeBSD 10.0 without X11, so additional testing is definitely appreciated. This is my first non-trivial patch for a port, so comments on quality and style are equally appreciated. Fix: Patch attached. Patch attached with submission follows:
Responsible Changed From-To: freebsd-ports-bugs->dmarion Over to maintainer (via the GNATS Auto Assign Tool)
Hi, * files/patch-contrib_fontconfig_module.defs and files/patch-contrib_libass_module.defs should be removed. * PORTREVISION= must be removed after that 0.9.9 _build_ fine on 11-current, but [tiger@tiger]~%HandBrake Segmentation fault (core dumped) [tiger@tiger]~%gdb `which HandBrake` /var/core/1001/14055.HandBrake.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... Core was generated by `HandBrake'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/local/lib/libvorbisenc.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libvorbisenc.so.2 Reading symbols from /usr/local/lib/libvorbis.so.4...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libvorbis.so.4 Reading symbols from /usr/local/lib/libsamplerate.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libsamplerate.so.1 Reading symbols from /usr/local/lib/libtheoraenc.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libtheoraenc.so.1 Reading symbols from /usr/local/lib/libogg.so.8...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libogg.so.8 Reading symbols from /usr/local/lib/libtheoradec.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libtheoradec.so.1 Reading symbols from /usr/local/lib/libass.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libass.so.5 Reading symbols from /usr/local/lib/libfribidi.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libfribidi.so.3 Reading symbols from /usr/local/lib/libenca.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libenca.so.5 Reading symbols from /usr/local/lib/libxml2.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libxml2.so.5 Reading symbols from /usr/lib/liblzma.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/lib/liblzma.so.5 Reading symbols from /usr/local/lib/libgtk-x11-2.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libgtk-x11-2.0.so.0 Reading symbols from /usr/local/lib/libgdk-x11-2.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libgdk-x11-2.0.so.0 Reading symbols from /usr/local/lib/libpangocairo-1.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libpangocairo-1.0.so.0 Reading symbols from /usr/local/lib/libharfbuzz.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libharfbuzz.so.0 Reading symbols from /usr/local/lib/libgraphite2.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libgraphite2.so.3 Reading symbols from /usr/local/lib/libXinerama.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXinerama.so.1 Reading symbols from /usr/local/lib/libXi.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXi.so.6 Reading symbols from /usr/local/lib/libXrandr.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXrandr.so.2 Reading symbols from /usr/local/lib/libXext.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXext.so.6 Reading symbols from /usr/local/lib/libXcursor.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXcursor.so.1 Reading symbols from /usr/local/lib/libXcomposite.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXcomposite.so.1 Reading symbols from /usr/local/lib/libXdamage.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXdamage.so.1 Reading symbols from /usr/local/lib/libXfixes.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXfixes.so.3 Reading symbols from /usr/local/lib/libatk-1.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libatk-1.0.so.0 Reading symbols from /usr/local/lib/libcairo.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libcairo.so.2 Reading symbols from /usr/local/lib/libpixman-1.so.30...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libpixman-1.so.30 Reading symbols from /usr/local/lib/libxcb-shm.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libxcb-shm.so.0 Reading symbols from /usr/local/lib/libxcb-render.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libxcb-render.so.0 Reading symbols from /usr/local/lib/libXrender.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXrender.so.1 Reading symbols from /usr/local/lib/libX11.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libX11.so.6 Reading symbols from /usr/local/lib/libxcb.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libxcb.so.2 Reading symbols from /usr/local/lib/libXau.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXau.so.6 Reading symbols from /usr/local/lib/libXdmcp.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libXdmcp.so.6 Reading symbols from /usr/local/lib/libpthread-stubs.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libpthread-stubs.so.0 Reading symbols from /usr/lib/librpcsvc.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/lib/librpcsvc.so.5 Reading symbols from /usr/local/lib/libpangoft2-1.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libpangoft2-1.0.so.0 Reading symbols from /usr/local/lib/libpango-1.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libpango-1.0.so.0 Reading symbols from /usr/local/lib/libfontconfig.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libfontconfig.so.1 Reading symbols from /usr/local/lib/libexpat.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libexpat.so.6 Reading symbols from /usr/local/lib/libfreetype.so.9...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libfreetype.so.9 Reading symbols from /usr/lib/libbz2.so.4...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libbz2.so.4 Reading symbols from /usr/local/lib/libgthread-2.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libgthread-2.0.so.0 Reading symbols from /usr/local/lib/libnotify.so.4...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libnotify.so.4 Reading symbols from /usr/local/lib/libgdk_pixbuf-2.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libgdk_pixbuf-2.0.so.0 Reading symbols from /usr/local/lib/libpng15.so.15...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libpng15.so.15 Reading symbols from /usr/local/lib/libdbus-glib-1.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libdbus-glib-1.so.2 Reading symbols from /usr/local/lib/libgio-2.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libgio-2.0.so.0 Reading symbols from /usr/local/lib/libgmodule-2.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libgmodule-2.0.so.0 Reading symbols from /lib/libz.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libz.so.6 Reading symbols from /usr/local/lib/libdbus-1.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libdbus-1.so.3 Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /usr/local/lib/libgobject-2.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libgobject-2.0.so.0 Reading symbols from /usr/local/lib/libffi.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libffi.so.6 Reading symbols from /usr/local/lib/libglib-2.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libglib-2.0.so.0 Reading symbols from /usr/local/lib/libpcre.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libpcre.so.3 Reading symbols from /usr/local/lib/libintl.so.9...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libintl.so.9 Reading symbols from /usr/local/lib/gcc46/libstdc++.so.6...done. Loaded symbols for /usr/local/lib/gcc46/libstdc++.so.6 Reading symbols from /lib/libm.so.5...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /usr/local/lib/gcc46/libgcc_s.so.1...done. Loaded symbols for /usr/local/lib/gcc46/libgcc_s.so.1 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /usr/lib/libc++.so.1...done. Loaded symbols for /usr/lib/libc++.so.1 Reading symbols from /lib/libcxxrt.so.1...done. Loaded symbols for /lib/libcxxrt.so.1 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x0000000000000000 in ?? () [New Thread 36806400 (LWP 101043/HandBrake)] (gdb) bt #0 0x0000000000000000 in ?? () #1 0x00000000354d8072 in __dynamic_cast (src_ptr=0x35713760, src_type=0x35709c10, dst_type=0x35709940, src2dst=0) at ../../.././../gcc-4.6.4/libstdc++-v3/libsupc++/dyncast.cc:61 #2 0x00000000354ab100 in std::has_facet<std::ctype<char> > (__loc=@0x357132b8) at locale_classes.tcc:234 #3 0x000000003549fff4 in std::basic_ios<char, std::char_traits<char> >::_M_cache_locale ( this=0x357131e8, __loc=@0x357132b8) at basic_ios.tcc:160 #4 0x00000000354a0098 in std::basic_ios<char, std::char_traits<char> >::init (this=0x357131e8, __sb=0x35712ac0) at basic_ios.tcc:133 #5 >0x00000000354879dd in Init (this=<value optimized out>) at ostream:85 #6 0x0000000000452a30 in main () -- wbr, tiger
On Mon, 3 Feb 2014 12:20:40 +0100 "Arjan Gijsberts" <arjan@liralab.it> wrote: > Hi, > > > * files/patch-contrib_fontconfig_module.defs and files/patch- > > contrib_libass_module.defs should be removed. > > * PORTREVISION= must be removed > > Thanks for the tips. I svn rm'ed those files thinking the patch would > take care of it. Only later I saw the notice to advertize deletions > explicitly. > > > after that 0.9.9 _build_ fine on 11-current, but > > > > [tiger@tiger]~%HandBrake > > Segmentation fault (core dumped) > > > > [tiger@tiger]~%gdb `which > [snap] > > #6 0x0000000000452a30 in main () > > Unfortunately, I do not have a 11-current or X11 system here to test. > Does HandBrakeCLI run fine instead? > > yes, I can convert VIDEO_TS folder to mkv with HandBrakeCLI 0.9.9 -- wbr, tiger
Hello: I'm trying to build handbrake on my FreeBSD 10.0-RELEASE #2 r261501 system. I've updated the ports tree with portsnap fetch update. I've applied the patch from this CR to handbrake. Seems like I had to rm the empty patch files, and then handbrake built just fine. Problem is that it dumps core: $ HandbrakeCLI Segmentation fault (core dumped) $ gdb HandBrakeCLI HandBrakeCLI.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... Core was generated by `HandBrakeCLI'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/local/lib/libass.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libass.so.5 Reading symbols from /usr/local/lib/libfontconfig.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libfontconfig.so.1 Reading symbols from /usr/local/lib/libfreetype.so.9...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libfreetype.so.9 Reading symbols from /usr/local/lib/libfribidi.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libfribidi.so.3 Reading symbols from /usr/local/lib/libogg.so.8...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libogg.so.8 Reading symbols from /usr/local/lib/libsamplerate.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libsamplerate.so.1 Reading symbols from /usr/local/lib/libtheoraenc.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libtheoraenc.so.1 Reading symbols from /usr/local/lib/libtheoradec.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libtheoradec.so.1 Reading symbols from /usr/local/lib/libvorbis.so.4...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libvorbis.so.4 Reading symbols from /usr/local/lib/libvorbisenc.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libvorbisenc.so.2 Reading symbols from /usr/local/lib/libxml2.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libxml2.so.5 Reading symbols from /usr/lib/libbz2.so.4...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libbz2.so.4 Reading symbols from /lib/libz.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libz.so.6 Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /usr/local/lib/gcc48/libstdc++.so.6...Error while reading shared library symbols: Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc48/libstdc++.so.6] Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /usr/local/lib/gcc48/libgcc_s.so.1...Error while reading shared library symbols: Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc48/libgcc_s.so.1] Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /usr/local/lib/libharfbuzz.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libharfbuzz.so.0 Reading symbols from /usr/local/lib/libenca.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libenca.so.5 Reading symbols from /usr/local/lib/libexpat.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libexpat.so.6 Reading symbols from /usr/lib/liblzma.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/lib/liblzma.so.5 Reading symbols from /usr/local/lib/libglib-2.0.so.0...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libglib-2.0.so.0 Reading symbols from /usr/local/lib/libpcre.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libpcre.so.3 Reading symbols from /usr/local/lib/libintl.so.9...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libintl.so.9 Reading symbols from /usr/local/lib/libgraphite2.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libgraphite2.so.3 Reading symbols from /usr/lib/libc++.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libc++.so.1 Reading symbols from /lib/libcxxrt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libcxxrt.so.1 Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x0000000000000000 in ?? () [New Thread 805c06400 (LWP 100350/HandBrakeCLI)] (gdb) where #0 0x0000000000000000 in ?? () #1 0x0000000803288cef in ?? () from /usr/local/lib/gcc48/libstdc++.so.6 #2 0x0000000803534200 in ?? () from /usr/local/lib/gcc48/libstdc++.so.6 #3 0x00007fffffffcb70 in ?? () #4 0x0000000000000000 in ?? () Not sure if this provides what you need...Let me know if I can be of more help... Ryan Losh RyanLosh@gmail.com
Hi, Thanks for the info, the patch was indeed flaky. Over at Arch people suggest that handbrake has problems with gcc 4.8, but the patch had other problems with gcc/libc++ as well. Attached an updated patch that now allows compiling handbrake with clang as well. I have tested HandBrake and HandBrakeCLI on FreeBSD 10.0 with base clang and lang/gcc46, and only HandBrakeCLi on FreeBSD 9.2 with base gcc. The patch is w.r.t. SVN head and you need to delete these empty files after patching: files/patch-contrib_freetype_module.defs files/patch-test_module.defs files/patch-libhb_module.defs files/patch-contrib_fontconfig_module.defs files/patch-contrib_libass_module.defs Note that I am not fond of the LDFLAGS line, but could not figure out a nicer way to do it. Credits to commit r289739 for the mp4v2 patch, commit r340847 for pointing to the libc++ issue, and bompopo's handbrake-devel port on redports for some patches and Makefile lines. Best, Arjan
Responsible Changed From-To: dmarion->freebsd-ports-bugs not maintainer anymore
Responsible Changed From-To: freebsd-ports-bugs->riggs I'll take it.
Well, you _MUST_ make sure that the Standard C++ library matches the default of the SYSTEM, not the default of the COMPILER, so as to match what other C++-based libraries link against. I. e. 8.x and 9.x MUST use libstdc++, 10.x and 11.x MUST use libc++. No ifs and buts. We've recently fixed Rawtherapee, which you can use for reference of how you can detect what the default libc++ is, and how to link at it. It is a bit ugly. Further information is in <http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/186240>. Note that if your glib is still 2.36.3_1 (rather than _2 or newer), you also need the patch from <http://people.freebsd.org/~kwm/glib-iconv-hell.diff> to ensure glib20 uses a sane iconv() implementation. BSD's libc-based iconv() is insufficient if some port uses, for instance, wchar_t.
Greetings, I have checked the referenced avidemux2 commit from <http://svnweb.freebsd.org/ports/head/multimedia/avidemux2/Makefile.common?sortby=rev&r1=340847&r2=340846&pathrev=340847> about the libc++ addition, and looking at my own notes in PR186240 it seems that it is lacking. > The crucial points were: > > - a build dependency on libc++ > - compiler flags -nostdinc++ -isystem $LOCALBASE/include/c++/v1 > - linker flags -L$LOCALBASE/lib/c++ it would seem that the libc++ build depends and the compiler flags need to be added on pre-10 systems, too. Best regards Matthias
On 11 February 2014 09:49, Matthias Andree <mandree@freebsd.org> wrote: > Well, you _MUST_ make sure that the Standard C++ library matches the > default of the SYSTEM, not the default of the COMPILER, so as to match > what other C++-based libraries link against. > I. e. 8.x and 9.x MUST use libstdc++, 10.x and 11.x MUST use libc++. > No ifs and buts. If that is the case (no ifs and buts), wouldn't this work: .if ${OSVERSION} >= 1000000 LDFLAGS+= -lc++ .else LDFLAGS+= -lstdc++ .endif Best Riggs
Am 11.02.2014 21:26, schrieb Thomas Zander: > On 11 February 2014 09:49, Matthias Andree <mandree@freebsd.org> wrote: > >> Well, you _MUST_ make sure that the Standard C++ library matches the >> default of the SYSTEM, not the default of the COMPILER, so as to match >> what other C++-based libraries link against. >> I. e. 8.x and 9.x MUST use libstdc++, 10.x and 11.x MUST use libc++. >> No ifs and buts. > > If that is the case (no ifs and buts), wouldn't this work: > .if ${OSVERSION} >= 1000000 > LDFLAGS+= -lc++ > .else > LDFLAGS+= -lstdc++ > .endif The actual OSVERSION that made the switch to clang/libc++ is later, 1000024 or 1000054 or something, so it's better to set USES=compiler but not USE_GCC or thereabouts before .include <bsd.pre.port.mk>, and query the results and set USE_GCC and LDFLAGS after bsd.pre.port.mk. If you must continue using OSVERSION, I think using 1000100 (which is when releng/10.0 branched) should be safe now, users using a 1000000 <= version < 1000100 should have upgraded these days.
On 11 February 2014 23:06, Matthias Andree <mandree@freebsd.org> wrote: > Am 11.02.2014 21:26, schrieb Thomas Zander: >> On 11 February 2014 09:49, Matthias Andree <mandree@freebsd.org> wrote: >> >>> Well, you _MUST_ make sure that the Standard C++ library matches the >>> default of the SYSTEM, not the default of the COMPILER, so as to match >>> what other C++-based libraries link against. >>> I. e. 8.x and 9.x MUST use libstdc++, 10.x and 11.x MUST use libc++. >>> No ifs and buts. >> >> If that is the case (no ifs and buts), wouldn't this work: >> .if ${OSVERSION} >= 1000000 >> LDFLAGS+= -lc++ >> .else >> LDFLAGS+= -lstdc++ >> .endif > > The actual OSVERSION that made the switch to clang/libc++ is later, > 1000024 or 1000054 or something, so it's better to set USES=compiler but > not USE_GCC or thereabouts before .include <bsd.pre.port.mk>, and query > the results and set USE_GCC and LDFLAGS after bsd.pre.port.mk. > > If you must continue using OSVERSION, I think using 1000100 (which is > when releng/10.0 branched) should be safe now, users using a 1000000 <= > version < 1000100 should have upgraded these days. Actually, it makes more sense to do the test for OSVERSION instead of compiler features. We are not trying to get openmp in there. We are simply setting the proper C++ LDFLAGS, which are, as you correctly stated, determined whether we are building on OSVERSION before/after 1000054. I would like to go ahead and commit attached revision of the patch. Best regards Riggs
Am 12.02.2014 21:37, schrieb Thomas Zander: > On 11 February 2014 23:06, Matthias Andree <mandree@freebsd.org> wrote: >> Am 11.02.2014 21:26, schrieb Thomas Zander: >>> On 11 February 2014 09:49, Matthias Andree <mandree@freebsd.org> wrote: >>> >>>> Well, you _MUST_ make sure that the Standard C++ library matches the >>>> default of the SYSTEM, not the default of the COMPILER, so as to match >>>> what other C++-based libraries link against. >>>> I. e. 8.x and 9.x MUST use libstdc++, 10.x and 11.x MUST use libc++. >>>> No ifs and buts. >>> >>> If that is the case (no ifs and buts), wouldn't this work: >>> .if ${OSVERSION} >= 1000000 >>> LDFLAGS+= -lc++ >>> .else >>> LDFLAGS+= -lstdc++ >>> .endif >> >> The actual OSVERSION that made the switch to clang/libc++ is later, >> 1000024 or 1000054 or something, so it's better to set USES=compiler but >> not USE_GCC or thereabouts before .include <bsd.pre.port.mk>, and query >> the results and set USE_GCC and LDFLAGS after bsd.pre.port.mk. >> >> If you must continue using OSVERSION, I think using 1000100 (which is >> when releng/10.0 branched) should be safe now, users using a 1000000 <= >> version < 1000100 should have upgraded these days. > > Actually, it makes more sense to do the test for OSVERSION instead of > compiler features. We are not trying to get openmp in there. We are > simply setting the proper C++ LDFLAGS, which are, as you correctly > stated, determined whether we are building on OSVERSION before/after > 1000054. > > I would like to go ahead and commit attached revision of the patch. I think for clang the idiom would be -stdlib=libc++ instead. And: do we have to state the library explicitly in LDFLAGS?
On 13 February 2014 08:17, Matthias Andree <mandree@freebsd.org> wrote: [snip] >> I would like to go ahead and commit attached revision of the patch. > > I think for clang the idiom would be -stdlib=libc++ instead. > > And: do we have to state the library explicitly in LDFLAGS? There is certainly more than one way to solve this. If you propose a change to the patch such that it solves it more elegant or generally better, I'll be happy to take a look at it and test it. But until then I stand by my proposal. It solves the problem, I got successful builds in all my jails and it allows us to have a working up-to-date handbrake in our tree. Best regards Riggs
Author: riggs Date: Fri Feb 14 20:00:13 2014 New Revision: 344308 URL: http://svnweb.freebsd.org/changeset/ports/344308 QAT: https://qat.redports.org/buildarchive/r344308/ Log: - Update port to upstream release 0.9.9 - Stagify - USES cleanups PR: ports/186387 Submitted by: Arjan Gijsberts <arjan@liralab.it> Approved by: jadawin (co-mentor) Added: head/multimedia/handbrake/files/patch-contrib-ffmpeg-A04-x86-asm-h.patch (contents, props changed) head/multimedia/handbrake/files/patch-contrib-mp4v2-P01-freebsd-clang-namespace.patch (contents, props changed) head/multimedia/handbrake/files/patch-custom.defs (contents, props changed) head/multimedia/handbrake/files/patch-make_include_gcc.defs (contents, props changed) Deleted: head/multimedia/handbrake/files/patch-contrib_fontconfig_module.defs head/multimedia/handbrake/files/patch-contrib_freetype_module.defs head/multimedia/handbrake/files/patch-contrib_libass_module.defs head/multimedia/handbrake/files/patch-libhb_module.defs head/multimedia/handbrake/files/patch-test_module.defs Modified: head/multimedia/handbrake/Makefile head/multimedia/handbrake/distinfo head/multimedia/handbrake/files/patch-make_include_contrib.defs Modified: head/multimedia/handbrake/Makefile ============================================================================== --- head/multimedia/handbrake/Makefile Fri Feb 14 19:56:52 2014 (r344307) +++ head/multimedia/handbrake/Makefile Fri Feb 14 20:00:13 2014 (r344308) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= handbrake -PORTVERSION= 0.9.8 -PORTREVISION= 2 +PORTVERSION= 0.9.9 CATEGORIES= multimedia MASTER_SITES= SF/${PORTNAME}/${PORTVERSION} \ http://download.handbrake.fr/handbrake/contrib/:contrib @@ -11,24 +10,16 @@ DISTFILES= HandBrake-${PORTVERSION}.tar. a52dec-0.7.4.tar.gz:contrib \ faac-1.28.tar.gz:contrib \ faad2-2.7.tar.gz:contrib \ - ffmpeg-v0.7-1696-gcae4f4b.tar.bz2:contrib \ - fontconfig-2.8.0.tar.gz:contrib \ - freetype-2.4.7.tar.bz2:contrib \ + libav-v9.6.tar.bz2:contrib \ lame-3.98.tar.gz:contrib \ - libass-0.10.0-1.tar.gz:contrib \ - libbluray-0.0.1-pre-213-ga869da8.tar.gz:contrib \ + libbluray-0.2.3.tar.bz2:contrib \ libdca-r81-strapped.tar.gz:contrib \ libdvdnav-svn1168.tar.gz:contrib \ libdvdread-svn1168.tar.gz:contrib \ libmkv-0.6.5-0-g82075ae.tar.gz:contrib \ - libogg-1.3.0.tar.gz:contrib \ - libsamplerate-0.1.4.tar.gz:contrib \ - libtheora-1.1.0.tar.bz2:contrib \ - libvorbis-aotuv_b6.03.tar.bz2:contrib \ - libxml2-2.7.7.tar.gz:contrib \ mp4v2-trunk-r355.tar.bz2:contrib \ mpeg2dec-0.5.1.tar.gz:contrib \ - x264-r2146-bcd41db.tar.gz:contrib + x264-r2273-b3065e6.tar.gz:contrib DIST_SUBDIR= ${PORTNAME} MAINTAINER= ports@FreeBSD.org @@ -37,10 +28,20 @@ COMMENT= Versatile DVD ripper and video LICENSE= GPLv2 BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm -LIB_DEPENDS= libfribidi.so:${PORTSDIR}/converters/fribidi +LIB_DEPENDS= libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \ + libfreetype.so:${PORTSDIR}/print/freetype2 \ + libfribidi.so:${PORTSDIR}/converters/fribidi \ + libxml2.so:${PORTSDIR}/textproc/libxml2 \ + libass.so:${PORTSDIR}/multimedia/libass \ + libogg.so:${PORTSDIR}/audio/libogg \ + libvorbis.so:${PORTSDIR}/audio/libvorbis \ + libvorbisenc.so:${PORTSDIR}/audio/libvorbis \ + libtheoradec.so:${PORTSDIR}/multimedia/libtheora \ + libtheoraenc.so:${PORTSDIR}/multimedia/libtheora \ + libsamplerate.so:${PORTSDIR}/audio/libsamplerate RUN_DEPENDS= ${LOCALBASE}/lib/libdvdcss.so:${PORTSDIR}/multimedia/libdvdcss -USES= gmake pkgconfig +USES= gmake pkgconfig iconv USE_AUTOTOOLS= libtool aclocal LIBTOOLFILES= configure USE_PYTHON_BUILD= yes @@ -63,7 +64,6 @@ OPTIONS_DEFINE= X11 X11_DESC= Build GTK+2 based GUI program OPTIONS_DEFAULT= X11 -NO_STAGE= yes .include <bsd.port.pre.mk> # Recent GNU binutils are required to handle inline SSSE3 asm (in x264), and @@ -85,6 +85,13 @@ PLIST_FILES+= bin/HandBrake CONFIGURE_ARGS+= --disable-gtk .endif +# Enforce linking to the system c++ standard lib +.if ${OSVERSION} >= 1000054 +LDFLAGS+= -lc++ +.else +LDFLAGS+= -lstdc++ +.endif + run-autotools-aclocal: @${DO_NADA} @@ -92,52 +99,64 @@ run-autotools-aclocal: # considered good in FreeBSD. Instead, we will prepare everything manually. post-extract: .SILENT # Unversioned directories can be copied in a loop -.for d in a52dec lame libdca libdvdnav libdvdread libsamplerate mpeg2dec x264 +.for d in a52dec lame libdca libdvdnav libdvdread mpeg2dec x264 ${MKDIR} ${BUILD_WRKSRC}/contrib/${d} ${MV} ${WRKDIR}/${d} ${BUILD_WRKSRC}/contrib/${d} .endfor # Others had to be processed one by one due to irregular (versioned) names - cd ${BUILD_WRKSRC}/contrib && ${MKDIR} faac faad2 ffmpeg fontconfig \ - freetype libass libbluray libmkv libogg libtheora libvorbis \ - libxml2 mp4v2 + cd ${BUILD_WRKSRC}/contrib && ${MKDIR} faac faad2 ffmpeg libbluray libmkv mp4v2 ${MV} ${WRKDIR}/faac-1.28 ${BUILD_WRKSRC}/contrib/faac ${MV} ${WRKDIR}/faad2-2.7 ${BUILD_WRKSRC}/contrib/faad2 - ${MV} ${WRKDIR}/ffmpeg-v0.7-1696-gcae4f4b \ - ${BUILD_WRKSRC}/contrib/ffmpeg - ${MV} ${WRKDIR}/fontconfig-2.8.0 ${BUILD_WRKSRC}/contrib/fontconfig - ${MV} ${WRKDIR}/freetype-2.4.7 ${BUILD_WRKSRC}/contrib/freetype - ${MV} ${WRKDIR}/libass-0.10.0-1 ${BUILD_WRKSRC}/contrib/libass - ${MV} ${WRKDIR}/libbluray-0.0.1-pre-213-ga869da8 \ - ${BUILD_WRKSRC}/contrib/libbluray + ${MV} ${WRKDIR}/libav-v9.6 ${BUILD_WRKSRC}/contrib/ffmpeg/libav-v9.6 + ${MV} ${WRKDIR}/libbluray-0.2.3 ${BUILD_WRKSRC}/contrib/libbluray ${MV} ${WRKDIR}/libmkv-0.6.5-0-g82075ae ${BUILD_WRKSRC}/contrib/libmkv - ${MV} ${WRKDIR}/libogg-1.3.0 ${BUILD_WRKSRC}/contrib/libogg - ${MV} ${WRKDIR}/libtheora-1.1.0 ${BUILD_WRKSRC}/contrib/libtheora - ${MV} ${WRKDIR}/aotuv-b6.03_20110424 ${BUILD_WRKSRC}/contrib/libvorbis - ${MV} ${WRKDIR}/libxml2-2.7.7 ${BUILD_WRKSRC}/contrib/libxml2 ${MV} ${WRKDIR}/mp4v2-trunk-r355 ${BUILD_WRKSRC}/contrib/mp4v2 -# Remove one patch file that does not apply cleanly - ${RM} ${WRKSRC}/contrib/fontconfig/A00-config.patch # Avoid conflict with `print/harfbuzz' (also installs "hb.h") ${MV} ${WRKSRC}/libhb/hb.h ${WRKSRC}/libhb/hb-of-handbrake.h +# Mark all bundled dependencies as extracted + ${TOUCH} ${BUILD_WRKSRC}/contrib/a52dec/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/faac/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/faad2/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/ffmpeg/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/lame/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/libbluray/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/libdca/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/libdvdnav/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/libdvdread/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/libmkv/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/mp4v2/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/mpeg2dec/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/x264/.stamp.extract post-patch: @${REINPLACE_CMD} -e 's|machine/soundcard|sys/soundcard|' \ ${BUILD_WRKSRC}/contrib/a52dec/a52dec/libao/audio_out_oss.c @${REINPLACE_CMD} -e 's|-ldl|-lc| ; s|\[dl\]|[c]|' \ - ${BUILD_WRKSRC}/contrib/libbluray/libbluray-0.0.1-pre-213-ga869da8/configure.ac + ${BUILD_WRKSRC}/contrib/libbluray/libbluray-0.2.3/configure.ac @${REINPLACE_CMD} -e 's|<malloc|<stdlib|' ${WRKSRC}/libhb/fifo.c - @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \ - ${WRKSRC}/contrib/libass/module.defs \ - ${WRKSRC}/libhb/module.defs ${WRKSRC}/test/module.defs @${REINPLACE_CMD} -e 's|libdvdcss\.so\.2|libdvdcss.so|' \ ${BUILD_WRKSRC}/contrib/libdvdread/libdvdread/src/dvd_input.c @${FIND} ${WRKSRC} -type f -name '*.[ch]' -print0 | ${XARGS} -0 \ ${REINPLACE_CMD} -e '/#include/s|hb\.h|hb-of-handbrake.h|' + @${REINPLACE_CMD} -e "s|ToolProbe( 'GCC.gcc', 'gcc',|ToolProbe( 'GCC.gcc', '${CC}',|" \ + ${WRKSRC}/make/configure.py + @${REINPLACE_CMD} -e 's|avcodec avformat avutil avresample|avformat avcodec avresample avutil|' \ + ${WRKSRC}/libhb/module.defs ${WRKSRC}/test/module.defs + ${TR} -d '\r' < ${WRKSRC}/contrib/mpeg2dec/A02-gwluserdata.patch > ${WRKDIR}/A02-gwluserdata.patch + ${MV} ${WRKDIR}/A02-gwluserdata.patch ${WRKSRC}/contrib/mpeg2dec/ + @${REINPLACE_CMD} -E \ + -e 's|%%REP_CC%%|${CC}|g' \ + -e 's|%%REP_CXX%%|${CXX}|g' \ + -e 's|%%REP_ARCHS%%|${CPUTYPE}|g' \ + -e 's|%%REP_I%%|-I${LOCALBASE}/include|g' \ + -e 's|%%REP_L%%|-L${LOCALBASE}/lib|g' \ + -e 's|%%REP_ICONV%%|${ICONV_LIB:S/-l//}|g' \ + ${WRKSRC}/custom.defs do-install: - ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/HandBrakeCLI ${PREFIX}/bin + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/HandBrakeCLI ${STAGEDIR}${PREFIX}/bin .if ${PORT_OPTIONS:MX11} - ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gtk/src/ghb ${PREFIX}/bin/HandBrake + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gtk/src/ghb ${STAGEDIR}${PREFIX}/bin/HandBrake .endif .include <bsd.port.post.mk> Modified: head/multimedia/handbrake/distinfo ============================================================================== --- head/multimedia/handbrake/distinfo Fri Feb 14 19:56:52 2014 (r344307) +++ head/multimedia/handbrake/distinfo Fri Feb 14 20:00:13 2014 (r344308) @@ -1,23 +1,17 @@ -SHA256 (handbrake/HandBrake-0.9.8.tar.bz2) = dba75a9ff772e419c01d75532c1bf0d7253e73d7ead184eee755cd4c133dc798 -SIZE (handbrake/HandBrake-0.9.8.tar.bz2) = 3156964 +SHA256 (handbrake/HandBrake-0.9.9.tar.bz2) = a71dd774104cda00cfb51a813550351d638253791f2f419d04a66f3158a835b3 +SIZE (handbrake/HandBrake-0.9.9.tar.bz2) = 9315199 SHA256 (handbrake/a52dec-0.7.4.tar.gz) = 54981ab08fc09a675b9924372cf0cca5aa5363b918c4c19065c2d40e2858be47 SIZE (handbrake/a52dec-0.7.4.tar.gz) = 242978 SHA256 (handbrake/faac-1.28.tar.gz) = c5141199f4cfb17d749c36ba8cfe4b25f838da67c22f0fec40228b6b9c3d19df SIZE (handbrake/faac-1.28.tar.gz) = 678891 SHA256 (handbrake/faad2-2.7.tar.gz) = ee26ed1e177c0cd8fa8458a481b14a0b24ca0b51468c8b4c8b676fd3ceccd330 SIZE (handbrake/faad2-2.7.tar.gz) = 1137407 -SHA256 (handbrake/ffmpeg-v0.7-1696-gcae4f4b.tar.bz2) = f39b2ea8f47db9c84c9bb091707312cd19b927d8f4a957c20222add1a5dd2497 -SIZE (handbrake/ffmpeg-v0.7-1696-gcae4f4b.tar.bz2) = 4242565 -SHA256 (handbrake/fontconfig-2.8.0.tar.gz) = fa2a1c6eea654d9fce7a4b1220f10c99cdec848dccaf1625c01f076b31382335 -SIZE (handbrake/fontconfig-2.8.0.tar.gz) = 1548409 -SHA256 (handbrake/freetype-2.4.7.tar.bz2) = ba22620479954582371286268ef75e6e932c0270ee67d6797bbf3ed9d31a5d77 -SIZE (handbrake/freetype-2.4.7.tar.bz2) = 1490543 +SHA256 (handbrake/libav-v9.6.tar.bz2) = ea41941866fb64d7e363684a4705574f65786bd9eb0fe1f796dee4c0d459aa52 +SIZE (handbrake/libav-v9.6.tar.bz2) = 4672723 SHA256 (handbrake/lame-3.98.tar.gz) = 40235e84dfe4760ad3f352590a64b7bda1502a386c97d06229df356426e37686 SIZE (handbrake/lame-3.98.tar.gz) = 1411318 -SHA256 (handbrake/libass-0.10.0-1.tar.gz) = a0c652f4a5c1bfd58cd47ff627fff2dfbd471b40f765aa96fd1b251c0058b867 -SIZE (handbrake/libass-0.10.0-1.tar.gz) = 745314 -SHA256 (handbrake/libbluray-0.0.1-pre-213-ga869da8.tar.gz) = 4aa7127201a5d3d4148d99c37c7701ede6e0707456dacc8a59464dc68e231b76 -SIZE (handbrake/libbluray-0.0.1-pre-213-ga869da8.tar.gz) = 241927 +SHA256 (handbrake/libbluray-0.2.3.tar.bz2) = 2c65cfb02aeec31721f9ea65ee2c085a9bfe163e99dd01b52ccb3f53ba205eea +SIZE (handbrake/libbluray-0.2.3.tar.bz2) = 465239 SHA256 (handbrake/libdca-r81-strapped.tar.gz) = ab2519af6c2f12411a2bd674b83615af9b0d5fb09f28ad5dab714ea1bfab9df1 SIZE (handbrake/libdca-r81-strapped.tar.gz) = 523282 SHA256 (handbrake/libdvdnav-svn1168.tar.gz) = 7cf4ff6ab0b5d3db3c300fc3cdb24e1ad59f22dd90352df075a604bc698d01c7 @@ -26,19 +20,9 @@ SHA256 (handbrake/libdvdread-svn1168.tar SIZE (handbrake/libdvdread-svn1168.tar.gz) = 946033 SHA256 (handbrake/libmkv-0.6.5-0-g82075ae.tar.gz) = 7314a296c68f42b826164074a96e247e52d8ef9287c21ebc5fe1bf9e73643e97 SIZE (handbrake/libmkv-0.6.5-0-g82075ae.tar.gz) = 32742 -SHA256 (handbrake/libogg-1.3.0.tar.gz) = a8de807631014615549d2356fd36641833b8288221cea214f8a72750efe93780 -SIZE (handbrake/libogg-1.3.0.tar.gz) = 425144 -SHA256 (handbrake/libsamplerate-0.1.4.tar.gz) = 4b4af3ecaee05c8875a9b113c6a2f816f06f283fb882914e57b21c0b08b67b75 -SIZE (handbrake/libsamplerate-0.1.4.tar.gz) = 4259244 -SHA256 (handbrake/libtheora-1.1.0.tar.bz2) = 74be9fe9f85d18c45bdcbb018cebf12c74e2234aeecb4d4c4cb92d80bdd287e2 -SIZE (handbrake/libtheora-1.1.0.tar.bz2) = 1785634 -SHA256 (handbrake/libvorbis-aotuv_b6.03.tar.bz2) = 95455420f07e4b3abdf32bda9f5921e9ed3f1afdc3739098dc090150a42fd7fd -SIZE (handbrake/libvorbis-aotuv_b6.03.tar.bz2) = 1250659 -SHA256 (handbrake/libxml2-2.7.7.tar.gz) = af5b781418ba4fff556fa43c50086658ea8a2f31909c2b625c2ce913a1d9eb68 -SIZE (handbrake/libxml2-2.7.7.tar.gz) = 4868502 SHA256 (handbrake/mp4v2-trunk-r355.tar.bz2) = 5b7d4e62df506b1246463da82cc2f02415eb462e6ccd5848f98f5cdcfc1f3d4f SIZE (handbrake/mp4v2-trunk-r355.tar.bz2) = 475488 SHA256 (handbrake/mpeg2dec-0.5.1.tar.gz) = 161539061aa89864968a5150ed6c6a028a830c4868f7dd7c500732baef47fb71 SIZE (handbrake/mpeg2dec-0.5.1.tar.gz) = 522405 -SHA256 (handbrake/x264-r2146-bcd41db.tar.gz) = 7b3d0ad309426ad49ff21df4d2ee5553b5769bc2bf2b7ae50f37f5fc72d190b1 -SIZE (handbrake/x264-r2146-bcd41db.tar.gz) = 656089 +SHA256 (handbrake/x264-r2273-b3065e6.tar.gz) = 956c82c9318740ef3744cf6e752fb6181be0716273e2e8976306624f0864a815 +SIZE (handbrake/x264-r2273-b3065e6.tar.gz) = 681489 Added: head/multimedia/handbrake/files/patch-contrib-ffmpeg-A04-x86-asm-h.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/handbrake/files/patch-contrib-ffmpeg-A04-x86-asm-h.patch Fri Feb 14 20:00:13 2014 (r344308) @@ -0,0 +1,14 @@ +--- /dev/null 2014-02-09 20:55:00.000000000 +0100 ++++ contrib/ffmpeg/A04-x86-asm-h.patch 2014-02-09 20:55:09.548807959 +0100 +@@ -0,0 +1,11 @@ ++--- a/libavutil/x86/asm.h 2014-02-09 20:38:46.964875000 +0100 +++++ b/libavutil/x86/asm.h 2014-02-09 20:44:57.928849417 +0100 ++@@ -68,7 +68,7 @@ ++ typedef int x86_reg; ++ #endif ++ ++-#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE)) +++#define HAVE_7REGS (ARCH_X86_64) ++ #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE)) ++ ++ #if ARCH_X86_64 && defined(PIC) Added: head/multimedia/handbrake/files/patch-contrib-mp4v2-P01-freebsd-clang-namespace.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/handbrake/files/patch-contrib-mp4v2-P01-freebsd-clang-namespace.patch Fri Feb 14 20:00:13 2014 (r344308) @@ -0,0 +1,120 @@ +--- /dev/null 2014-02-09 17:00:00.000000000 +0100 ++++ contrib/mp4v2/P01-freebsd-clang-namespace.patch 2014-02-09 16:52:59.124808788 +0100 +@@ -0,0 +1,117 @@ ++diff -Naur mp4v2-trunk-r355.orig/src/bmff/typebmff.cpp mp4v2-trunk-r355/src/bmff/typebmff.cpp ++--- mp4v2-trunk-r355.orig/src/bmff/typebmff.cpp 2009-05-21 04:52:31.000000000 +0200 +++++ mp4v2-trunk-r355/src/bmff/typebmff.cpp 2014-02-06 04:18:15.000000000 +0100 ++@@ -23,19 +23,12 @@ ++ ++ #include "impl.h" ++ ++-// VStudio idiocy prevents defining template instanced static data ++-// in a namespace. Workaround it by defining in global scope. ++-// Other platforms will continue to put things in the proper namespace. ++-#if defined( _MSC_VER ) ++-using namespace mp4v2::impl::bmff; ++-#else ++-namespace mp4v2 { namespace impl { namespace bmff { ++-#endif +++namespace mp4v2 { namespace impl { ++ ++ /////////////////////////////////////////////////////////////////////////////// ++ ++ template <> ++-const EnumLanguageCode::Entry EnumLanguageCode::data[] = { +++const bmff::EnumLanguageCode::Entry bmff::EnumLanguageCode::data[] = { ++ { mp4v2::impl::bmff::ILC_AAR, "aar", "Afar" }, ++ { mp4v2::impl::bmff::ILC_ABK, "abk", "Abkhazian" }, ++ { mp4v2::impl::bmff::ILC_ACE, "ace", "Achinese" }, ++@@ -526,9 +519,7 @@ ++ ++ /////////////////////////////////////////////////////////////////////////////// ++ ++-#if defined( _MSC_VER ) ++-namespace mp4v2 { namespace impl { namespace bmff { ++-#endif +++namespace bmff { ++ ++ /////////////////////////////////////////////////////////////////////////////// ++ ++diff -Naur mp4v2-trunk-r355.orig/src/itmf/type.cpp mp4v2-trunk-r355/src/itmf/type.cpp ++--- mp4v2-trunk-r355.orig/src/itmf/type.cpp 2009-05-21 04:52:29.000000000 +0200 +++++ mp4v2-trunk-r355/src/itmf/type.cpp 2014-02-06 04:18:19.000000000 +0100 ++@@ -24,19 +24,12 @@ ++ ++ #include "impl.h" ++ ++-// VStudio idiocy prevents defining template instanced static data ++-// in a namespace. Workaround it by defining in global scope. ++-// Other platforms will continue to put things in the proper namespace. ++-#if defined( _MSC_VER ) ++-using namespace mp4v2::impl::itmf; ++-#else ++-namespace mp4v2 { namespace impl { namespace itmf { ++-#endif +++namespace mp4v2 { namespace impl { ++ ++ /////////////////////////////////////////////////////////////////////////////// ++ ++ template <> ++-const EnumBasicType::Entry EnumBasicType::data[] = { +++const itmf::EnumBasicType::Entry itmf::EnumBasicType::data[] = { ++ { mp4v2::impl::itmf::BT_IMPLICIT, "implicit", "implicit" }, ++ { mp4v2::impl::itmf::BT_UTF8, "utf8", "UTF-8" }, ++ { mp4v2::impl::itmf::BT_UTF16, "utf16", "UTF-16" }, ++@@ -64,7 +57,7 @@ ++ /////////////////////////////////////////////////////////////////////////////// ++ ++ template <> ++-const EnumGenreType::Entry EnumGenreType::data[] = { +++const itmf::EnumGenreType::Entry itmf::EnumGenreType::data[] = { ++ { mp4v2::impl::itmf::GENRE_BLUES, "blues", "Blues" }, ++ { mp4v2::impl::itmf::GENRE_CLASSIC_ROCK, "classicrock", "Classic Rock" }, ++ { mp4v2::impl::itmf::GENRE_COUNTRY, "country", "Country" }, ++@@ -200,7 +193,7 @@ ++ /////////////////////////////////////////////////////////////////////////////// ++ ++ template <> ++-const EnumStikType::Entry EnumStikType::data[] = { +++const itmf::EnumStikType::Entry itmf::EnumStikType::data[] = { ++ { mp4v2::impl::itmf::STIK_OLD_MOVIE, "oldmovie", "Movie" }, ++ { mp4v2::impl::itmf::STIK_NORMAL, "normal", "Normal" }, ++ { mp4v2::impl::itmf::STIK_AUDIOBOOK, "audiobook", "Audio Book" }, ++@@ -216,7 +209,7 @@ ++ /////////////////////////////////////////////////////////////////////////////// ++ ++ template <> ++-const EnumAccountType::Entry EnumAccountType::data[] = { +++const itmf::EnumAccountType::Entry itmf::EnumAccountType::data[] = { ++ { mp4v2::impl::itmf::AT_ITUNES, "itunes", "iTunes" }, ++ { mp4v2::impl::itmf::AT_AOL, "aol", "AOL" }, ++ ++@@ -226,7 +219,7 @@ ++ /////////////////////////////////////////////////////////////////////////////// ++ ++ template <> ++-const EnumCountryCode::Entry EnumCountryCode::data[] = { +++const itmf::EnumCountryCode::Entry itmf::EnumCountryCode::data[] = { ++ { mp4v2::impl::itmf::CC_USA, "usa", "United States" }, ++ { mp4v2::impl::itmf::CC_USA, "fra", "France" }, ++ { mp4v2::impl::itmf::CC_DEU, "ger", "Germany" }, ++@@ -256,7 +249,7 @@ ++ /////////////////////////////////////////////////////////////////////////////// ++ ++ template <> ++-const EnumContentRating::Entry EnumContentRating::data[] = { +++const itmf::EnumContentRating::Entry itmf::EnumContentRating::data[] = { ++ { mp4v2::impl::itmf::CR_NONE, "none", "None" }, ++ { mp4v2::impl::itmf::CR_CLEAN, "clean", "Clean" }, ++ { mp4v2::impl::itmf::CR_EXPLICIT, "explicit", "Explicit" }, ++@@ -266,9 +259,7 @@ ++ ++ /////////////////////////////////////////////////////////////////////////////// ++ ++-#if defined( _MSC_VER ) ++-namespace mp4v2 { namespace impl { namespace itmf { ++-#endif +++namespace itmf { ++ ++ /////////////////////////////////////////////////////////////////////////////// ++ Added: head/multimedia/handbrake/files/patch-custom.defs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/handbrake/files/patch-custom.defs Fri Feb 14 20:00:13 2014 (r344308) @@ -0,0 +1,19 @@ +--- /dev/null 2014-02-09 17:00:00.000000000 +0100 ++++ custom.defs 2014-02-09 16:52:59.125808519 +0100 +@@ -0,0 +1,16 @@ ++################################################################################ ++# for Generic GCC custom setting ++ ++GCC.gcc = %%REP_CC%% ++GCC.gxx = %%REP_CXX%% ++GCC.archs = %%REP_ARCHS%% ++GCC.args.I += %%REP_I%% ++GCC.args.L += %%REP_L%% ++ ++ ++################################################################################ ++# for CLI custom setting ++ ++LIBHB.GCC.D += SYS_FREEBSD ++TEST.GCC.l += pthread m %%REP_ICONV%% ++ Modified: head/multimedia/handbrake/files/patch-make_include_contrib.defs ============================================================================== --- head/multimedia/handbrake/files/patch-make_include_contrib.defs Fri Feb 14 19:56:52 2014 (r344307) +++ head/multimedia/handbrake/files/patch-make_include_contrib.defs Fri Feb 14 20:00:13 2014 (r344308) @@ -1,22 +1,44 @@ ---- ./make/include/contrib.defs.orig 2010-04-25 17:15:43.000000000 -0400 -+++ ./make/include/contrib.defs 2011-05-24 05:50:46.071806770 -0400 -@@ -28,7 +28,7 @@ - $(1).FETCH.url = FETCH_IS_UNDEFINED - $(1).FETCH.target = $$($(1).FETCH.tar) - define $(1).FETCH -- $$(call FETCH,$$@,$$($(1).FETCH.url)) -+# $$(call FETCH,$$@,$$($(1).FETCH.url)) - endef +--- make/include/contrib.defs.orig 2011-08-26 21:35:18.802615405 +0900 ++++ make/include/contrib.defs 2011-08-26 21:35:24.468798054 +0900 +@@ -204,26 +204,26 @@ + ## + ## target: fetch + ## +-$($(1).name).fetch: $$($(1).FETCH.target) +- +-$$($(1).FETCH.target): | $$(dir $$($(1).FETCH.target)) +- $$($(1).FETCH) ++#$($(1).name).fetch: $$($(1).FETCH.target) ++# ++#$$($(1).FETCH.target): | $$(dir $$($(1).FETCH.target)) ++# $$($(1).FETCH) - ## -@@ -38,8 +38,8 @@ - $(1).EXTRACT.dir/ = $$($(1).build/)$$($(1).EXTRACT.tarbase)/ - $(1).EXTRACT.target = $$($(1).build/).stamp.extract - define $(1).EXTRACT -- $$(RM.exe) -fr $$($(1).EXTRACT.dir/) -- $$(TAR.exe) xfC $$($(1).FETCH.tar) $$($(1).build/) -+# $$(RM.exe) -fr $$($(1).EXTRACT.dir/) -+# $$(TAR.exe) xfC $$($(1).FETCH.tar) $$($(1).build/) - $$(TOUCH.exe) $$@ - endef + ## + ## target: extract + ## must touch dir after extraction because old timestamp is restored via tar. + ## +-$($(1).name).extract: $$($(1).EXTRACT.target) +- +-$$($(1).EXTRACT.target): | $$(dir $$($(1).EXTRACT.target)) +-$$($(1).EXTRACT.target): $$($(1).FETCH.target) +- $$($(1).EXTRACT) +- +-$($(1).name).extract.touch: +- $$(TOUCH.exe) $$($(1).EXTRACT.target) +- +-$($(1).name).extract.untouch: +- $$(RM.exe) -f $$($(1).EXTRACT.target) ++#$($(1).name).extract: $$($(1).EXTRACT.target) ++# ++#$$($(1).EXTRACT.target): | $$(dir $$($(1).EXTRACT.target)) ++#$$($(1).EXTRACT.target): $$($(1).FETCH.target) ++# $$($(1).EXTRACT) ++# ++#$($(1).name).extract.touch: ++# $$(TOUCH.exe) $$($(1).EXTRACT.target) ++# ++#$($(1).name).extract.untouch: ++# $$(RM.exe) -f $$($(1).EXTRACT.target) + ## + ## target: patch Added: head/multimedia/handbrake/files/patch-make_include_gcc.defs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/handbrake/files/patch-make_include_gcc.defs Fri Feb 14 20:00:13 2014 (r344308) @@ -0,0 +1,20 @@ +--- make/include/gcc.defs.orig 2011-08-22 15:08:08.322100000 +0900 ++++ make/include/gcc.defs 2011-10-15 20:34:17.737925255 +0900 +@@ -47,7 +47,7 @@ + GCC.args.ML = -fmessage-length=0 + GCC.args.H = -H + GCC.args.W = -W$(1) +-GCC.args.archs = -arch $(1) ++GCC.args.archs = -march=$(1) + GCC.args.sysroot = --sysroot=$(1) + GCC.args.ldsysroot = -syslibroot $(1) + GCC.args.minver = -mmacosx-version-min=$(1) +@@ -85,7 +85,7 @@ + + define import.GCC + $(1).GCC.gcc = $$(GCC.gcc) +- $(1).GCC.gxx = $$(dir $$($(1).GCC.gcc))$$(subst gcc,g++,$$(notdir $$($(1).GCC.gcc))) ++ $(1).GCC.gxx = $$(if $$(filter ./,$$(dir $$($(1).GCC.gcc))),,$$(dir $$($(1).GCC.gcc)))$$(subst gcc,g++,$$(notdir $$($(1).GCC.gcc))) + + $(1).GCC.pipe = $$(GCC.pipe) + $(1).GCC.strip = $$(if $$(filter none,$$($(1).GCC.g)),1) _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed a revised version that has been tested and accepted (via personal mail) by submitter and reviewer (jadawin@). Thanks!