x264: Add patch to remove default flags -mcpu=cortex-a8 and -mfpu=neon
PATCH 1/4 x264: Add patch to remove default flags -mcpu=cortex-a8 and -mfpu=neon
-march flag is not in CFLAGS so this will always default to -mcpu=cortex-a8 -mfpu=neon. Obviously wrong for other machines.
Signed-off-by Andrei Gherzan <[email protected]>
--- .../don-t-default-to-cortex-a9-with-neon.patch | 20 ++++++++++++++++++++ meta-oe/recipes-multimedia/x264/x264_git.bb | 6 +++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch
meta-oe/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch new file +20 -0
@@ -0,0 +1,20 @@ +-march flag is not in CFLAGS so this will always default to -mcpu=cortex-a8 +-mfpu=neon. + +Upstream-Status: Pending +Signed-off-by: Andrei Gherzan <[email protected]> + +Index: git/configure +=================================================================== +--- git.orig/configure 2013-02-10 16:26:40.666343682 +0200 ++++ git/configure 2013-02-10 16:27:49.198341677 +0200 +@@ -703,9 +703,6 @@ + fi + + if [ $asm = auto -a $ARCH = ARM ] ; then +- # set flags so neon is built by default +- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon" +- + if cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6 + cc_check '' '' '__asm__("movt r0, #0");' && define HAVE_ARMV6T2 + cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEON
meta-oe/recipes-multimedia/x264/x264_git.bb +5 -1
@@ -4,9 +4,13 @@ HOMEPAGE = "http://www.videolan.org/developers/x264.html" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PR = "r1" + DEPENDS = "yasm-native" -SRC_URI = "git://git.videolan.org/x264.git" +SRC_URI = "git://git.videolan.org/x264.git \ + file://don-t-default-to-cortex-a9-with-neon.patch \ + " SRCREV = "1cffe9f406cc54f4759fc9eeb85598fb8cae66c7" PV = "r2230+git"
Signature · 1 line
1.7.9.5
PATCH 2/4 libtorrent: Integrated version 0.13.3
Add patch to avoid running AC_RUN_IFELSE code while configuring package.
Signed-off-by Andrei Gherzan <[email protected]>
--- .../don-t-run-code-while-configuring-package.patch | 94 ++++++++++++++++++++ .../libtorrent/libtorrent_0.13.3.bb | 17 ++++ 2 files changed, 111 insertions(+) create mode 100644 meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch create mode 100644 meta-oe/recipes-connectivity/libtorrent/libtorrent_0.13.3.bb
meta-oe/recipes-connectivity/libtorrent/libtorrent/don-t-run-code-while-configuring-package.patch new file +94 -0
@@ -0,0 +1,94 @@ +Using AC_RUN_IFELSE prevent people from configuring package for +cross-compiling. Don't run code while configuring package. + +Upstream-Status: Pending +Signed-off-by: Andrei Gherzan <[email protected]> + +Index: libtorrent-0.13.3/scripts/checks.m4 +=================================================================== +--- libtorrent-0.13.3.orig/scripts/checks.m4 2012-05-14 14:17:04.000000000 +0300 ++++ libtorrent-0.13.3/scripts/checks.m4 2013-02-10 15:28:37.414445524 +0200 +@@ -95,40 +95,6 @@ + + AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [ + AC_MSG_CHECKING(whether kqueue supports pipes and ptys) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <fcntl.h> +- #include <stdlib.h> +- #include <unistd.h> +- #include <sys/event.h> +- #include <sys/time.h> +- int main() { +- struct kevent ev@<:@2@:>@, ev_out@<:@2@:>@; +- struct timespec ts = { 0, 0 }; +- int pfd@<:@2@:>@, pty@<:@2@:>@, kfd, n; +- char buffer@<:@9001@:>@; +- if (pipe(pfd) == -1) return 1; +- if (fcntl(pfd@<:@1@:>@, F_SETFL, O_NONBLOCK) == -1) return 2; +- while ((n = write(pfd@<:@1@:>@, buffer, sizeof(buffer))) == sizeof(buffer)); +- if ((pty@<:@0@:>@=posix_openpt(O_RDWR | O_NOCTTY)) == -1) return 3; +- if ((pty@<:@1@:>@=grantpt(pty@<:@0@:>@)) == -1) return 4; +- EV_SET(ev+0, pfd@<:@1@:>@, EVFILT_WRITE, EV_ADD | EV_ENABLE, 0, 0, NULL); +- EV_SET(ev+1, pty@<:@1@:>@, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, NULL); +- if ((kfd = kqueue()) == -1) return 5; +- if ((n = kevent(kfd, ev, 2, NULL, 0, NULL)) == -1) return 6; +- if (ev_out@<:@0@:>@.flags & EV_ERROR) return 7; +- if (ev_out@<:@1@:>@.flags & EV_ERROR) return 8; +- read(pfd@<:@0@:>@, buffer, sizeof(buffer)); +- if ((n = kevent(kfd, NULL, 0, ev_out, 2, &ts)) < 1) return 9; +- return 0; +- } +- ])], +- [ +- AC_MSG_RESULT(yes) +- ], [ +- AC_DEFINE(KQUEUE_SOCKET_ONLY, 1, kqueue only supports sockets.) +- AC_MSG_RESULT(no) +- ]) + ]) + + AC_DEFUN([TORRENT_WITH_KQUEUE], [ +Index: libtorrent-0.13.3/scripts/common.m4 +=================================================================== +--- libtorrent-0.13.3.orig/scripts/common.m4 2012-05-14 14:17:04.000000000 +0300 ++++ libtorrent-0.13.3/scripts/common.m4 2013-02-10 15:27:55.874446741 +0200 +@@ -222,38 +222,10 @@ + + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <execinfo.h> +- int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} +- ])], +- [ +- AC_MSG_RESULT(yes) +- AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h) +- ], [ +- AC_MSG_RESULT(no) +- ]) + ]) + + AC_DEFUN([TORRENT_CHECK_ALIGNED], [ + AC_MSG_CHECKING(the byte alignment) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <inttypes.h> +- int main() { +- char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 }; +- int i; +- for (i = 1; i < 4; ++i) +- if (*(uint32_t*)(buf + i) == 0) return -1; +- return 0; +- } +- ])], +- [ +- AC_MSG_RESULT(none needed) +- ], [ +- AC_DEFINE(USE_ALIGNED, 1, Require byte alignment) +- AC_MSG_RESULT(required) +- ]) + ]) + +
meta-oe/recipes-connectivity/libtorrent/libtorrent_0.13.3.bb new file +17 -0
@@ -0,0 +1,17 @@ +DESCRIPTION = "libTorrent is a BitTorrent library written in C++ for *nix, \ +with a focus on high performance and good code." +HOMEPAGE = "http://libtorrent.rakshasa.no/" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" + +DEPENDS = "libsigc++-2.0 openssl cppunit" + +SRC_URI = "http://libtorrent.rakshasa.no/downloads/${PN}-${PV}.tar.gz \ + file://don-t-run-code-while-configuring-package.patch \ + " + +SRC_URI[md5sum] = "e94f6c590bb02aaf4d58618f738a85f2" +SRC_URI[sha256sum] = "34317d6783b7f8d0805274c9467475b5432a246c0de8e28fc16e3b0b43f35677" + +inherit autotools +
Signature · 1 line
1.7.9.5
PATCH 3/4 rtorrent: Integrated version 0.9.3
In reply to Andrei GherzanAdd patch to avoid running AC_RUN_IFELSE code while configuring package.
Signed-off-by Andrei Gherzan <[email protected]>
--- .../don-t-run-code-while-configuring-package.patch | 94 ++++++++++++++++++++ .../rtorrent/rtorrent_0.9.3.bb | 16 ++++ 2 files changed, 110 insertions(+) create mode 100644 meta-oe/recipes-connectivity/rtorrent/rtorrent/don-t-run-code-while-configuring-package.patch create mode 100644 meta-oe/recipes-connectivity/rtorrent/rtorrent_0.9.3.bb
meta-oe/recipes-connectivity/rtorrent/rtorrent/don-t-run-code-while-configuring-package.patch new file +94 -0
@@ -0,0 +1,94 @@ +Using AC_RUN_IFELSE prevent people from configuring package for +cross-compiling. Don't run code while configuring package. + +Upstream-Status: Pending +Signed-off-by: Andrei Gherzan <[email protected]> + +Index: libtorrent-0.13.3/scripts/checks.m4 +=================================================================== +--- libtorrent-0.13.3.orig/scripts/checks.m4 2012-05-14 14:17:04.000000000 +0300 ++++ libtorrent-0.13.3/scripts/checks.m4 2013-02-10 15:28:37.414445524 +0200 +@@ -95,40 +95,6 @@ + + AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [ + AC_MSG_CHECKING(whether kqueue supports pipes and ptys) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <fcntl.h> +- #include <stdlib.h> +- #include <unistd.h> +- #include <sys/event.h> +- #include <sys/time.h> +- int main() { +- struct kevent ev@<:@2@:>@, ev_out@<:@2@:>@; +- struct timespec ts = { 0, 0 }; +- int pfd@<:@2@:>@, pty@<:@2@:>@, kfd, n; +- char buffer@<:@9001@:>@; +- if (pipe(pfd) == -1) return 1; +- if (fcntl(pfd@<:@1@:>@, F_SETFL, O_NONBLOCK) == -1) return 2; +- while ((n = write(pfd@<:@1@:>@, buffer, sizeof(buffer))) == sizeof(buffer)); +- if ((pty@<:@0@:>@=posix_openpt(O_RDWR | O_NOCTTY)) == -1) return 3; +- if ((pty@<:@1@:>@=grantpt(pty@<:@0@:>@)) == -1) return 4; +- EV_SET(ev+0, pfd@<:@1@:>@, EVFILT_WRITE, EV_ADD | EV_ENABLE, 0, 0, NULL); +- EV_SET(ev+1, pty@<:@1@:>@, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, NULL); +- if ((kfd = kqueue()) == -1) return 5; +- if ((n = kevent(kfd, ev, 2, NULL, 0, NULL)) == -1) return 6; +- if (ev_out@<:@0@:>@.flags & EV_ERROR) return 7; +- if (ev_out@<:@1@:>@.flags & EV_ERROR) return 8; +- read(pfd@<:@0@:>@, buffer, sizeof(buffer)); +- if ((n = kevent(kfd, NULL, 0, ev_out, 2, &ts)) < 1) return 9; +- return 0; +- } +- ])], +- [ +- AC_MSG_RESULT(yes) +- ], [ +- AC_DEFINE(KQUEUE_SOCKET_ONLY, 1, kqueue only supports sockets.) +- AC_MSG_RESULT(no) +- ]) + ]) + + AC_DEFUN([TORRENT_WITH_KQUEUE], [ +Index: libtorrent-0.13.3/scripts/common.m4 +=================================================================== +--- libtorrent-0.13.3.orig/scripts/common.m4 2012-05-14 14:17:04.000000000 +0300 ++++ libtorrent-0.13.3/scripts/common.m4 2013-02-10 15:27:55.874446741 +0200 +@@ -222,38 +222,10 @@ + + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <execinfo.h> +- int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} +- ])], +- [ +- AC_MSG_RESULT(yes) +- AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h) +- ], [ +- AC_MSG_RESULT(no) +- ]) + ]) + + AC_DEFUN([TORRENT_CHECK_ALIGNED], [ + AC_MSG_CHECKING(the byte alignment) +- +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +- #include <inttypes.h> +- int main() { +- char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 }; +- int i; +- for (i = 1; i < 4; ++i) +- if (*(uint32_t*)(buf + i) == 0) return -1; +- return 0; +- } +- ])], +- [ +- AC_MSG_RESULT(none needed) +- ], [ +- AC_DEFINE(USE_ALIGNED, 1, Require byte alignment) +- AC_MSG_RESULT(required) +- ]) + ]) + +
meta-oe/recipes-connectivity/rtorrent/rtorrent_0.9.3.bb new file +16 -0
@@ -0,0 +1,16 @@ +DESCRIPTION = "Torrent client" +HOMEPAGE = "http://libtorrent.rakshasa.no/" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "libsigc++-2.0 curl cppunit libtorrent" + +SRC_URI = "http://libtorrent.rakshasa.no/downloads/${PN}-${PV}.tar.gz \ + file://don-t-run-code-while-configuring-package.patch \ + " + +SRC_URI[md5sum] = "0bf2f262faa8c8c8d3b11ce286ea2bf2" +SRC_URI[sha256sum] = "9e93ca41beb1afe74ad7ad8013e0d53ae3586c9b0e97263d722f721535cc7310" + +inherit autotools +
Signature · 1 line
1.7.9.5
PATCH 4/4 minidlna: Integrated version 1.0.25
In reply to Andrei GherzanAdd two patches to fix build.
Signed-off-by Andrei Gherzan <[email protected]>
--- .../minidlna/minidlna/fix-makefile.patch | 41 +++++++++++++++++ .../search-for-headers-in-staging-dir.patch | 48 ++++++++++++++++++++ .../recipes-multimedia/minidlna/minidlna_1.0.25.bb | 19 ++++++++ 3 files changed, 108 insertions(+) create mode 100644 meta-oe/recipes-multimedia/minidlna/minidlna/fix-makefile.patch create mode 100644 meta-oe/recipes-multimedia/minidlna/minidlna/search-for-headers-in-staging-dir.patch create mode 100644 meta-oe/recipes-multimedia/minidlna/minidlna_1.0.25.bb
meta-oe/recipes-multimedia/minidlna/minidlna/fix-makefile.patch new file +41 -0
@@ -0,0 +1,41 @@ +Fix Makefile: +* don't overwrite CFLAGS but append to it +* use gcc as CC only if CC is not already defined +* use -I= to include paths +* fix compile of minidlna binary by removing ${LIBS} dependency + +Upstream-status: Pending +Signed-off-by: Andrei Gherzan <[email protected]> + +Index: minidlna-1.0.25/Makefile +=================================================================== +--- minidlna-1.0.25.orig/Makefile 2012-01-18 00:49:01.000000000 +0200 ++++ minidlna-1.0.25/Makefile 2013-02-10 17:46:49.000000000 +0200 +@@ -12,13 +12,13 @@ + # + #CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG + #CFLAGS = -Wall -g -Os -D_GNU_SOURCE +-CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \ +- -I/usr/include/ffmpeg \ +- -I/usr/include/libavutil -I/usr/include/libavcodec -I/usr/include/libavformat \ +- -I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat ++CFLAGS += -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \ ++ -I=/usr/include/ffmpeg \ ++ -I=/usr/include/libavutil -I=/usr/include/libavcodec -I=/usr/include/libavformat \ ++ -I=/usr/include/ffmpeg/libavutil -I=/usr/include/ffmpeg/libavcodec -I=/usr/include/ffmpeg/libavformat + #STATIC_LINKING: CFLAGS += -DSTATIC + #STATIC_LINKING: LDFLAGS = -static +-CC = gcc ++CC ?= gcc + RM = rm -f + INSTALL = install + +@@ -64,7 +64,7 @@ + $(INSTALL) -d $(ETCINSTALLDIR) + $(INSTALL) --mode=0644 minidlna.conf $(ETCINSTALLDIR) + +-minidlna: $(BASEOBJS) $(LNXOBJS) $(LIBS) ++minidlna: $(BASEOBJS) $(LNXOBJS) + @echo Linking $@ + @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(BASEOBJS) $(LNXOBJS) $(LIBS) +
meta-oe/recipes-multimedia/minidlna/minidlna/search-for-headers-in-staging-dir.patch new file +48 -0
48 lines not on this page · raw message
meta-oe/recipes-multimedia/minidlna/minidlna_1.0.25.bb new file +19 -0
@@ -0,0 +1,19 @@ +DESCRIPTION = "MiniDLNA (aka ReadyDLNA) is server software with the aim of \ +being fully compliant with DLNA/UPnP-AV clients." +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://LICENCE;md5=b1a795ac1a06805cf8fd74920bc46b5c" + +DEPENDS = "flac libav jpeg sqlite3 libexif libogg libid3tag" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}_${PV}_src.tar.gz \ + file://search-for-headers-in-staging-dir.patch \ + file://fix-makefile.patch \ + " + +SRC_URI[md5sum] = "d966256baf2f9b068b9de871ab5dade5" +SRC_URI[sha256sum] = "170560fbe042c2bbcba78c5f15b54f4fac321ff770490b23b55789be463f2851" + +export STAGING_DIR_HOST + +inherit autotools +
Signature · 1 line
1.7.9.5
Review
Quoted 2 lines · Andrei Gherzan
(quoted diff) +0
-2-march flag is not in CFLAGS so this will always default to -mcpu=cortex-a8 -mfpu=neon. Obviously wrong for other machines.
All 4 applied
Quoted 61 lines
Signed-off-by Andrei Gherzan <[email protected]>--- .../don-t-default-to-cortex-a9-with-neon.patch | 20 ++++++++++++++++++++ meta-oe/recipes-multimedia/x264/x264_git.bb | 6 +++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patchmeta-oe/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch new file +20
-0@@ -0,0 +1,20 @@ +-march flag is not in CFLAGS so this will always default to -mcpu=cortex-a8 +-mfpu=neon. + +Upstream-Status: Pending +Signed-off-by: Andrei Gherzan <[email protected]> + +Index: git/configure +=================================================================== +--- git.orig/configure 2013-02-10 16:26:40.666343682 +0200 ++++ git/configure 2013-02-10 16:27:49.198341677 +0200 +@@ -703,9 +703,6 @@ + fi + + if [ $asm = auto -a $ARCH = ARM ] ; then +- # set flags so neon is built by default +- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon" +- + if cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6 + cc_check '' '' '__asm__("movt r0, #0");' && define HAVE_ARMV6T2 + cc_check '' '' '__asm__("vadd.i16 q0, q0, q0");' && define HAVE_NEONmeta-oe/recipes-multimedia/x264/x264_git.bb +5
-1@@ -4,9 +4,13 @@ HOMEPAGE = "http://www.videolan.org/developers/x264.html" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PR = "r1" + DEPENDS = "yasm-native" -SRC_URI = "git://git.videolan.org/x264.git" +SRC_URI = "git://git.videolan.org/x264.git \ + file://don-t-default-to-cortex-a9-with-neon.patch \ + " SRCREV = "1cffe9f406cc54f4759fc9eeb85598fb8cae66c7" PV = "r2230+git"Signature · 7 lines
1.7.9.5 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]