imlib2: imlib2-config: delete old reference to @my_libs@
authorFabio Porcedda <fabio.porcedda@gmail.com>
Sun, 8 Mar 2015 16:54:30 +0000 (17:54 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 8 Mar 2015 17:32:13 +0000 (18:32 +0100)
The script "imlib2-config" returns "@my_libs@" that causes build failures
on the programs that use it.
This is a regression of version v1.4.6.

Add a upstream patch to fix it and reorder the patches to follow
upstream branch order.

Fixes:
http://autobuild.buildroot.net/results/e1a7691a6528d635c308d7bf47a8be8aa0594190
http://autobuild.buildroot.net/results/23fea2e4d668d69565d5f50493635fc834c54ce1

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/imlib2/0003-fix-X_DISPLAY_MISSING-redefined-warnings-when-X-is-d.patch [deleted file]
package/imlib2/0003-imlib2-config-delete-old-reference-to-my_libs.patch [new file with mode: 0644]
package/imlib2/0004-do-not-link-with-X-libs-when-X-is-disabled.patch [deleted file]
package/imlib2/0004-fix-X_DISPLAY_MISSING-redefined-warnings-when-X-is-d.patch [new file with mode: 0644]
package/imlib2/0005-GIF-loader-Fix-for-libgif-version-5.1.patch [deleted file]
package/imlib2/0005-do-not-link-with-X-libs-when-X-is-disabled.patch [new file with mode: 0644]
package/imlib2/0006-GIF-loader-Fix-for-libgif-version-5.1.patch [new file with mode: 0644]

diff --git a/package/imlib2/0003-fix-X_DISPLAY_MISSING-redefined-warnings-when-X-is-d.patch b/package/imlib2/0003-fix-X_DISPLAY_MISSING-redefined-warnings-when-X-is-d.patch
deleted file mode 100644 (file)
index b5d451d..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-From aaf62d4c605726e6c5f6869bd6834eca03c50d9c Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Mon, 28 Jul 2014 22:59:35 -0400
-Subject: [PATCH 3/5] fix X_DISPLAY_MISSING redefined warnings when X is
- disabled
-
-This is set up in config.h by configure, so avoid defining it again.
----
- src/bin/imlib2_conv.c | 2 ++
- src/lib/api.c         | 2 ++
- src/lib/image.h       | 2 ++
- src/lib/script.c      | 2 ++
- 4 files changed, 8 insertions(+)
-
-diff --git a/src/bin/imlib2_conv.c b/src/bin/imlib2_conv.c
-index 1b05b1f..1c46d0c 100644
---- a/src/bin/imlib2_conv.c
-+++ b/src/bin/imlib2_conv.c
-@@ -8,7 +8,9 @@
- #include <stdio.h>
- #include <string.h>
-+#ifndef X_DISPLAY_MISSING
- #define X_DISPLAY_MISSING
-+#endif
- #include <Imlib2.h>
- #define PROG_NAME "imlib2_conv"
-diff --git a/src/lib/api.c b/src/lib/api.c
-index e29eaf0..178d2ca 100644
---- a/src/lib/api.c
-+++ b/src/lib/api.c
-@@ -4,8 +4,10 @@
- #include <X11/Xutil.h>
- #include <X11/extensions/shape.h>
- #else
-+#ifndef X_DISPLAY_MISSING
- #define X_DISPLAY_MISSING
- #endif
-+#endif
- #include <string.h>
- #include <stdarg.h>
- #include "common.h"
-diff --git a/src/lib/image.h b/src/lib/image.h
-index eef59d2..52dde9d 100644
---- a/src/lib/image.h
-+++ b/src/lib/image.h
-@@ -5,7 +5,9 @@
- # ifdef BUILD_X11
- #  include <X11/Xlib.h>
- # else
-+#ifndef X_DISPLAY_MISSING
- #  define X_DISPLAY_MISSING
-+#endif
- # endif
- # include <dlfcn.h>
-diff --git a/src/lib/script.c b/src/lib/script.c
-index 55ebd4e..7c974c0 100644
---- a/src/lib/script.c
-+++ b/src/lib/script.c
-@@ -13,8 +13,10 @@
- #ifdef BUILD_X11
- #include <X11/Xlib.h>
- #else
-+#ifndef X_DISPLAY_MISSING
- #define X_DISPLAY_MISSING
- #endif
-+#endif
- #include "image.h"
- #include "file.h"
- #include "dynamic_filters.h"
--- 
-2.3.1
-
diff --git a/package/imlib2/0003-imlib2-config-delete-old-reference-to-my_libs.patch b/package/imlib2/0003-imlib2-config-delete-old-reference-to-my_libs.patch
new file mode 100644 (file)
index 0000000..35babbb
--- /dev/null
@@ -0,0 +1,28 @@
+From 534e736e52b6be0da58397ef05f55d47f3794ea7 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 18 Jan 2014 13:56:54 -0500
+Subject: [PATCH 3/6] imlib2-config: delete old reference to @my_libs@
+
+This was cleaned up a while ago, but this file was missed.
+
+URL: https://bugs.gentoo.org/497894
+---
+ imlib2-config.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/imlib2-config.in b/imlib2-config.in
+index cf814c6..965f7c3 100644
+--- a/imlib2-config.in
++++ b/imlib2-config.in
+@@ -46,7 +46,7 @@ while test $# -gt 0; do
+       ;;
+     --libs)
+       libdirs=-L@libdir@
+-      echo $libdirs -lImlib2 @my_libs@
++      echo $libdirs -lImlib2
+       ;;
+     *)
+       echo "${usage}" 1>&2
+-- 
+2.3.1
+
diff --git a/package/imlib2/0004-do-not-link-with-X-libs-when-X-is-disabled.patch b/package/imlib2/0004-do-not-link-with-X-libs-when-X-is-disabled.patch
deleted file mode 100644 (file)
index 11611eb..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-From c7f6ae523bbe165e50c44c21744f56f6f4b575c5 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Mon, 28 Jul 2014 23:01:23 -0400
-Subject: [PATCH 4/5] do not link with X libs when X is disabled
-
-URL: https://bugs.gentoo.org/517670
----
- src/lib/Makefile.am | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
-index 64de98b..ea94991 100644
---- a/src/lib/Makefile.am
-+++ b/src/lib/Makefile.am
-@@ -86,7 +86,10 @@ AMD64_OBJS = $(AMD64_SRCS:.S=.lo)
- EXTRA_DIST = $(MMX_SRCS) $(AMD64_SRCS) asm_loadimmq.S
--MY_LIBS = -lXext -lX11 $(FREETYPE_LIBS) $(DLOPEN_LIBS) -lm
-+MY_LIBS = $(FREETYPE_LIBS) $(DLOPEN_LIBS) -lm
-+if BUILD_X11
-+MY_LIBS += -lXext -lX11
-+endif
- if BUILD_MMX
- libImlib2_la_LIBADD       = $(MMX_OBJS) $(MY_LIBS)
--- 
-2.3.1
-
diff --git a/package/imlib2/0004-fix-X_DISPLAY_MISSING-redefined-warnings-when-X-is-d.patch b/package/imlib2/0004-fix-X_DISPLAY_MISSING-redefined-warnings-when-X-is-d.patch
new file mode 100644 (file)
index 0000000..513c493
--- /dev/null
@@ -0,0 +1,75 @@
+From 7fb1a4468b9d0314cffcdd1fd2a156e6f8c5101b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 28 Jul 2014 22:59:35 -0400
+Subject: [PATCH 4/6] fix X_DISPLAY_MISSING redefined warnings when X is
+ disabled
+
+This is set up in config.h by configure, so avoid defining it again.
+---
+ src/bin/imlib2_conv.c | 2 ++
+ src/lib/api.c         | 2 ++
+ src/lib/image.h       | 2 ++
+ src/lib/script.c      | 2 ++
+ 4 files changed, 8 insertions(+)
+
+diff --git a/src/bin/imlib2_conv.c b/src/bin/imlib2_conv.c
+index 1b05b1f..1c46d0c 100644
+--- a/src/bin/imlib2_conv.c
++++ b/src/bin/imlib2_conv.c
+@@ -8,7 +8,9 @@
+ #include <stdio.h>
+ #include <string.h>
++#ifndef X_DISPLAY_MISSING
+ #define X_DISPLAY_MISSING
++#endif
+ #include <Imlib2.h>
+ #define PROG_NAME "imlib2_conv"
+diff --git a/src/lib/api.c b/src/lib/api.c
+index e29eaf0..178d2ca 100644
+--- a/src/lib/api.c
++++ b/src/lib/api.c
+@@ -4,8 +4,10 @@
+ #include <X11/Xutil.h>
+ #include <X11/extensions/shape.h>
+ #else
++#ifndef X_DISPLAY_MISSING
+ #define X_DISPLAY_MISSING
+ #endif
++#endif
+ #include <string.h>
+ #include <stdarg.h>
+ #include "common.h"
+diff --git a/src/lib/image.h b/src/lib/image.h
+index eef59d2..52dde9d 100644
+--- a/src/lib/image.h
++++ b/src/lib/image.h
+@@ -5,7 +5,9 @@
+ # ifdef BUILD_X11
+ #  include <X11/Xlib.h>
+ # else
++#ifndef X_DISPLAY_MISSING
+ #  define X_DISPLAY_MISSING
++#endif
+ # endif
+ # include <dlfcn.h>
+diff --git a/src/lib/script.c b/src/lib/script.c
+index 55ebd4e..7c974c0 100644
+--- a/src/lib/script.c
++++ b/src/lib/script.c
+@@ -13,8 +13,10 @@
+ #ifdef BUILD_X11
+ #include <X11/Xlib.h>
+ #else
++#ifndef X_DISPLAY_MISSING
+ #define X_DISPLAY_MISSING
+ #endif
++#endif
+ #include "image.h"
+ #include "file.h"
+ #include "dynamic_filters.h"
+-- 
+2.3.1
+
diff --git a/package/imlib2/0005-GIF-loader-Fix-for-libgif-version-5.1.patch b/package/imlib2/0005-GIF-loader-Fix-for-libgif-version-5.1.patch
deleted file mode 100644 (file)
index 63e0ef1..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-From 8531957235f8702f8bdafac31059812d66e95c23 Mon Sep 17 00:00:00 2001
-From: Heiko Becker <heirecka@exherbo.org>
-Date: Mon, 13 Oct 2014 17:41:25 +0200
-Subject: [PATCH 5/5] GIF loader: Fix for libgif version 5.1
-
-Summary:
-From giflib-5.1.0's NEWS:
-"A small change to the API: DGifClose() and EGifClose() now take a
-pointer-to-int second argument (like the corresponding openers)
-where a diagnostic code will be deposited when they return
-GIF_ERROR."
-
-Test Plan:
-I've built imlib2 against giflib-4.2.3 and 5.1.0 and opened a few
-gif files with feh.
-
-Reviewers: kwo
-
-Reviewed By: kwo
-
-Differential Revision: https://phab.enlightenment.org/D1529
----
- src/modules/loaders/loader_gif.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/modules/loaders/loader_gif.c b/src/modules/loaders/loader_gif.c
-index a39c860..c53f62c 100644
---- a/src/modules/loaders/loader_gif.c
-+++ b/src/modules/loaders/loader_gif.c
-@@ -193,7 +193,11 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
-    free(rows);
-  quit2:
-+#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
-+   DGifCloseFile(gif, NULL);
-+#else
-    DGifCloseFile(gif);
-+#endif
-    return rc;
- }
--- 
-2.3.1
-
diff --git a/package/imlib2/0005-do-not-link-with-X-libs-when-X-is-disabled.patch b/package/imlib2/0005-do-not-link-with-X-libs-when-X-is-disabled.patch
new file mode 100644 (file)
index 0000000..85da48d
--- /dev/null
@@ -0,0 +1,29 @@
+From 19d568d7a58e88a6e0a43500175d731fb43f97cd Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 28 Jul 2014 23:01:23 -0400
+Subject: [PATCH 5/6] do not link with X libs when X is disabled
+
+URL: https://bugs.gentoo.org/517670
+---
+ src/lib/Makefile.am | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
+index 64de98b..ea94991 100644
+--- a/src/lib/Makefile.am
++++ b/src/lib/Makefile.am
+@@ -86,7 +86,10 @@ AMD64_OBJS = $(AMD64_SRCS:.S=.lo)
+ EXTRA_DIST = $(MMX_SRCS) $(AMD64_SRCS) asm_loadimmq.S
+-MY_LIBS = -lXext -lX11 $(FREETYPE_LIBS) $(DLOPEN_LIBS) -lm
++MY_LIBS = $(FREETYPE_LIBS) $(DLOPEN_LIBS) -lm
++if BUILD_X11
++MY_LIBS += -lXext -lX11
++endif
+ if BUILD_MMX
+ libImlib2_la_LIBADD       = $(MMX_OBJS) $(MY_LIBS)
+-- 
+2.3.1
+
diff --git a/package/imlib2/0006-GIF-loader-Fix-for-libgif-version-5.1.patch b/package/imlib2/0006-GIF-loader-Fix-for-libgif-version-5.1.patch
new file mode 100644 (file)
index 0000000..2f319d8
--- /dev/null
@@ -0,0 +1,44 @@
+From aa16abfa6c0198668b6a4e101fde8b42ec9cdb68 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Mon, 13 Oct 2014 17:41:25 +0200
+Subject: [PATCH 6/6] GIF loader: Fix for libgif version 5.1
+
+Summary:
+From giflib-5.1.0's NEWS:
+"A small change to the API: DGifClose() and EGifClose() now take a
+pointer-to-int second argument (like the corresponding openers)
+where a diagnostic code will be deposited when they return
+GIF_ERROR."
+
+Test Plan:
+I've built imlib2 against giflib-4.2.3 and 5.1.0 and opened a few
+gif files with feh.
+
+Reviewers: kwo
+
+Reviewed By: kwo
+
+Differential Revision: https://phab.enlightenment.org/D1529
+---
+ src/modules/loaders/loader_gif.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/modules/loaders/loader_gif.c b/src/modules/loaders/loader_gif.c
+index a39c860..c53f62c 100644
+--- a/src/modules/loaders/loader_gif.c
++++ b/src/modules/loaders/loader_gif.c
+@@ -193,7 +193,11 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
+    free(rows);
+  quit2:
++#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
++   DGifCloseFile(gif, NULL);
++#else
+    DGifCloseFile(gif);
++#endif
+    return rc;
+ }
+-- 
+2.3.1
+