From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Robert Schwebel Date: Sun, 30 Oct 2011 22:56:11 +0100 Message-Id: <1320011781-24886-1-git-send-email-r.schwebel@pengutronix.de> In-Reply-To: <20111030215436.GJ14918@pengutronix.de> References: <20111030215436.GJ14918@pengutronix.de> Subject: [ptxdist] [PATCH 01/11] fbgrab: include zlib.h, fix linker dependencies Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Robert Schwebel - We have to include zlib.h explicitly when using symbols from there. - fbgrab does not link directly against zlib, and if libpng needs it, we can leave the job of finding the right libs to pkg_config Signed-off-by: Robert Schwebel --- ...001-make-makefile-cross-compilation-aware.patch | 37 ++++++++++++++++++++ .../fbgrab-1.0/0002-fbgrab-include-zlib.h.patch | 24 +++++++++++++ patches/fbgrab-1.0/fbgrab-1.0-crosscompile.diff | 37 -------------------- patches/fbgrab-1.0/series | 6 +++- 4 files changed, 66 insertions(+), 38 deletions(-) create mode 100644 patches/fbgrab-1.0/0001-make-makefile-cross-compilation-aware.patch create mode 100644 patches/fbgrab-1.0/0002-fbgrab-include-zlib.h.patch delete mode 100644 patches/fbgrab-1.0/fbgrab-1.0-crosscompile.diff diff --git a/patches/fbgrab-1.0/0001-make-makefile-cross-compilation-aware.patch b/patches/fbgrab-1.0/0001-make-makefile-cross-compilation-aware.patch new file mode 100644 index 0000000..9fd77f9 --- /dev/null +++ b/patches/fbgrab-1.0/0001-make-makefile-cross-compilation-aware.patch @@ -0,0 +1,37 @@ +From: Roland Hostettler +Date: Tue, 16 Aug 2011 17:35:19 +0200 +Subject: [PATCH] make makefile cross compilation aware + +The upstream makefile is not usable for cross compilation. +[wsa] Simplified 'strip' support + +Signed-off-by: Robert Schwebel +Signed-off-by: Wolfram Sang +--- + Makefile | 11 +++++------ + 1 files changed, 5 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 14c63cb..252b098 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,13 +4,12 @@ + ### + + fbgrab: fbgrab.c +- splint +posixlib fbgrab.c +- gcc -g -Wall fbgrab.c -lpng -lz -o fbgrab ++# splint +posixlib fbgrab.c ++ ${CC} ${CPPFLAGS} ${LDFLAGS} fbgrab.c -o fbgrab + + install: +- strip fbgrab +- install fbgrab /usr/bin/fbgrab +- install fbgrab.1.man /usr/man/man1/fbgrab.1 ++ install -s fbgrab ${DESTDIR}/usr/bin/fbgrab ++ install fbgrab.1.man ${DESTDIR}/usr/man/man1/fbgrab.1 + + clean: +- rm -f fbgrab *~ \#*\# +\ No newline at end of file ++ rm -f fbgrab *~ \#*\# diff --git a/patches/fbgrab-1.0/0002-fbgrab-include-zlib.h.patch b/patches/fbgrab-1.0/0002-fbgrab-include-zlib.h.patch new file mode 100644 index 0000000..6c1b33e --- /dev/null +++ b/patches/fbgrab-1.0/0002-fbgrab-include-zlib.h.patch @@ -0,0 +1,24 @@ +From: Robert Schwebel +Date: Tue, 16 Aug 2011 17:36:49 +0200 +Subject: [PATCH] fbgrab: include zlib.h + +Newer libpng versions do not include zlib.h in their api any more, so if +we use symbols from there, we should include zlib.h directly. + +Signed-off-by: Robert Schwebel +--- + fbgrab.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/fbgrab.c b/fbgrab.c +index fc89f5a..0c959f6 100644 +--- a/fbgrab.c ++++ b/fbgrab.c +@@ -23,6 +23,7 @@ + #include + #include /* to handle vt changing */ + #include /* PNG lib */ ++#include /* zlib */ + #include /* to handle framebuffer ioctls */ + + #define VERSION "1.0 beta 1" diff --git a/patches/fbgrab-1.0/fbgrab-1.0-crosscompile.diff b/patches/fbgrab-1.0/fbgrab-1.0-crosscompile.diff deleted file mode 100644 index d85f71e..0000000 --- a/patches/fbgrab-1.0/fbgrab-1.0-crosscompile.diff +++ /dev/null @@ -1,37 +0,0 @@ -From: Roland Hostettler -Subject: [patch] make makefile cross compilation aware - -The upstream makefile is not usable for cross compilation. -[wsa] Simplified 'strip' support - -Signed-off-by: Robert Schwebel -Signed-off-by: Wolfram Sang - ---- - Makefile | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -Index: Makefile -=================================================================== ---- a/Makefile.orig -+++ b/Makefile -@@ -4,13 +4,12 @@ - ### - - fbgrab: fbgrab.c -- splint +posixlib fbgrab.c -- gcc -g -Wall fbgrab.c -lpng -lz -o fbgrab -+# splint +posixlib fbgrab.c -+ ${CC} ${CPPFLAGS} ${LDFLAGS} fbgrab.c -o fbgrab - - install: -- strip fbgrab -- install fbgrab /usr/bin/fbgrab -- install fbgrab.1.man /usr/man/man1/fbgrab.1 -+ install -s fbgrab ${DESTDIR}/usr/bin/fbgrab -+ install fbgrab.1.man ${DESTDIR}/usr/man/man1/fbgrab.1 - - clean: -- rm -f fbgrab *~ \#*\# -\ No newline at end of file -+ rm -f fbgrab *~ \#*\# diff --git a/patches/fbgrab-1.0/series b/patches/fbgrab-1.0/series index d4a2f2b..45420ce 100644 --- a/patches/fbgrab-1.0/series +++ b/patches/fbgrab-1.0/series @@ -1 +1,5 @@ -fbgrab-1.0-crosscompile.diff +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-make-makefile-cross-compilation-aware.patch +0002-fbgrab-include-zlib.h.patch +# 07f6b94abfd5520604fa320ff0fa961c - git-ptx-patches magic -- 1.7.7 -- ptxdist mailing list ptxdist@pengutronix.de