diff options
author | Justin Boffemmyer | 2009-05-21 22:16:39 -0400 |
---|---|---|
committer | Justin Boffemmyer | 2009-05-21 22:16:39 -0400 |
commit | d72b6a05ca59763ae048835444afbba08819bfd3 (patch) | |
tree | 7540e0dde17a6c2d9aa4598da0cfe2e425fcf269 /e | |
parent | 2bc5399d558eb32af19f974d4dba3a4852e85575 (diff) |
e/imlib2: better support for building without X
Now with the correct patch! :)
Diffstat (limited to 'e')
-rwxr-xr-x | e/imlib2/BUILD | 4 | ||||
-rwxr-xr-x | e/imlib2/CONFIGURE | 1 | ||||
-rwxr-xr-x | e/imlib2/DEPENDS | 4 | ||||
-rw-r--r-- | e/imlib2/HISTORY | 9 | ||||
-rw-r--r-- | e/imlib2/Imlib2.h.patch | 129 | ||||
-rwxr-xr-x | e/imlib2/PRE_BUILD | 4 |
6 files changed, 150 insertions, 1 deletions
diff --git a/e/imlib2/BUILD b/e/imlib2/BUILD index 7b82be6ea5..b3b9881b01 100755 --- a/e/imlib2/BUILD +++ b/e/imlib2/BUILD @@ -1,5 +1,7 @@ if [[ $HOST == x86_64-* ]]; then - OPTS="--disable-mmx $OPTS" + OPTS="--disable-mmx $IMLIB2_X11 $OPTS" +else + OPTS="$IMLIB2_X11 $OPTS" fi && default_build diff --git a/e/imlib2/CONFIGURE b/e/imlib2/CONFIGURE new file mode 100755 index 0000000000..a770cab7ca --- /dev/null +++ b/e/imlib2/CONFIGURE @@ -0,0 +1 @@ +config_query_option IMLIB2_X11 "Enable X11 support?" y "" "--without-x" diff --git a/e/imlib2/DEPENDS b/e/imlib2/DEPENDS index 4991b369e2..9e8de0c5a0 100755 --- a/e/imlib2/DEPENDS +++ b/e/imlib2/DEPENDS @@ -8,6 +8,10 @@ if [[ $IMLIB2_CVS == y ]]; then depends automake-1.9 fi && +if [[ -z $IMLIB2_X11 ]]; then + depends xorg-libs +fi && + optional_depends 'tiff' \ '--with-tiff' \ '--without-tiff' \ diff --git a/e/imlib2/HISTORY b/e/imlib2/HISTORY index 73d51e1955..1f0ff5df5a 100644 --- a/e/imlib2/HISTORY +++ b/e/imlib2/HISTORY @@ -1,3 +1,12 @@ +2009-5-21 Justin Boffemmyer <flux@sourcemage.org> + * CONFIGURE: new, ask if X support is wanted + * BUILD: add IMLIB2_X11 to OPTS + * DEPENDS: test IMLIB2_X11 and depends xorg-libs if building with X + support + * PRE_BUILD: patch Imlib2.h if building without X support + * Imlib2.h.patch: new, patch to remove all X11 defines for building + without X support + 2008-10-23 Vlad Glagolev <stealth@sourcemage.org> * DETAILS: updated spell to 1.4.2; quoting paths; cleaned up; SECURITY_PATCH+=1 (http://secunia.com/Advisories/32354/); diff --git a/e/imlib2/Imlib2.h.patch b/e/imlib2/Imlib2.h.patch new file mode 100644 index 0000000000..9dcbd8df6e --- /dev/null +++ b/e/imlib2/Imlib2.h.patch @@ -0,0 +1,129 @@ +--- ./src/lib/Imlib2.h 2008-08-17 05:39:12.000000000 -0400 ++++ ./src/lib/Imlib2.h 2009-05-22 01:01:51.000000000 -0400 +@@ -22,10 +22,6 @@ + # endif + # endif + +-# ifndef X_DISPLAY_MISSING +-# include <X11/Xlib.h> +-# endif +- + /* Data types to use */ + # ifndef DATA64 + # define DATA64 unsigned long long +@@ -129,14 +125,6 @@ + EAPI Imlib_Context imlib_context_get(void); + + /* context setting */ +-# ifndef X_DISPLAY_MISSING +- EAPI void imlib_context_set_display(Display * display); +- EAPI void imlib_context_disconnect_display(void); +- EAPI void imlib_context_set_visual(Visual * visual); +- EAPI void imlib_context_set_colormap(Colormap colormap); +- EAPI void imlib_context_set_drawable(Drawable drawable); +- EAPI void imlib_context_set_mask(Pixmap mask); +-# endif + EAPI void imlib_context_set_dither_mask(char dither_mask); + EAPI void imlib_context_set_mask_alpha_threshold(int mask_alpha_threshold); + EAPI void imlib_context_set_anti_alias(char anti_alias); +@@ -160,13 +148,6 @@ + EAPI void imlib_context_set_TTF_encoding(Imlib_TTF_Encoding encoding); + + /* context getting */ +-# ifndef X_DISPLAY_MISSING +- EAPI Display *imlib_context_get_display(void); +- EAPI Visual *imlib_context_get_visual(void); +- EAPI Colormap imlib_context_get_colormap(void); +- EAPI Drawable imlib_context_get_drawable(void); +- EAPI Pixmap imlib_context_get_mask(void); +-# endif + EAPI char imlib_context_get_dither_mask(void); + EAPI char imlib_context_get_anti_alias(void); + EAPI int imlib_context_get_mask_alpha_threshold(void); +@@ -194,11 +175,6 @@ + EAPI int imlib_get_color_usage(void); + EAPI void imlib_set_color_usage(int max); + EAPI void imlib_flush_loaders(void); +-# ifndef X_DISPLAY_MISSING +- EAPI int imlib_get_visual_depth(Display * display, Visual * visual); +- EAPI Visual *imlib_get_best_visual(Display * display, int screen, +- int *depth_return); +-# endif + + EAPI Imlib_Image imlib_load_image(const char *file); + EAPI Imlib_Image imlib_load_image_immediately(const char *file); +@@ -233,24 +209,6 @@ + EAPI void imlib_image_query_pixel_cmya(int x, int y, int *cyan, int *magenta, int *yellow, int *alpha); + + /* rendering functions */ +-# ifndef X_DISPLAY_MISSING +- EAPI void imlib_render_pixmaps_for_whole_image(Pixmap * pixmap_return, +- Pixmap * mask_return); +- EAPI void imlib_render_pixmaps_for_whole_image_at_size(Pixmap * pixmap_return, +- Pixmap * mask_return, +- int width, int height); +- EAPI void imlib_free_pixmap_and_mask(Pixmap pixmap); +- EAPI void imlib_render_image_on_drawable(int x, int y); +- EAPI void imlib_render_image_on_drawable_at_size(int x, int y, int width, +- int height); +- EAPI void imlib_render_image_part_on_drawable_at_size(int source_x, +- int source_y, +- int source_width, +- int source_height, int x, +- int y, int width, +- int height); +- EAPI DATA32 imlib_render_get_pixel_color(void); +-# endif + EAPI void imlib_blend_image_onto_image(Imlib_Image source_image, + char merge_alpha, int source_x, + int source_y, int source_width, +@@ -264,27 +222,6 @@ + DATA32 * data); + EAPI Imlib_Image imlib_create_image_using_copied_data(int width, int height, + DATA32 * data); +-# ifndef X_DISPLAY_MISSING +- EAPI Imlib_Image imlib_create_image_from_drawable(Pixmap mask, int x, int y, +- int width, int height, +- char need_to_grab_x); +- EAPI Imlib_Image imlib_create_image_from_ximage(XImage *image, XImage *mask, int x, int y, +- int width, int height, +- char need_to_grab_x); +- EAPI Imlib_Image imlib_create_scaled_image_from_drawable(Pixmap mask, +- int source_x, +- int source_y, +- int source_width, +- int source_height, +- int destination_width, +- int destination_height, +- char need_to_grab_x, +- char +- get_mask_from_shape); +- EAPI char imlib_copy_drawable_to_image(Pixmap mask, int x, int y, int width, +- int height, int destination_x, +- int destination_y, char need_to_grab_x); +-# endif + EAPI Imlib_Image imlib_clone_image(void); + EAPI Imlib_Image imlib_create_cropped_image(int x, int y, int width, + int height); +@@ -472,21 +409,6 @@ + int destination_y, int h_angle_x, + int h_angle_y, int v_angle_x, + int v_angle_y); +-# ifndef X_DISPLAY_MISSING +- EAPI void imlib_render_image_on_drawable_skewed(int source_x, int source_y, +- int source_width, +- int source_height, +- int destination_x, +- int destination_y, +- int h_angle_x, int h_angle_y, +- int v_angle_x, int v_angle_y); +- EAPI void imlib_render_image_on_drawable_at_angle(int source_x, int source_y, +- int source_width, +- int source_height, +- int destination_x, +- int destination_y, +- int angle_x, int angle_y); +-# endif + + /* image filters */ + EAPI void imlib_image_filter(void); diff --git a/e/imlib2/PRE_BUILD b/e/imlib2/PRE_BUILD index e2c00f43c4..e859dc1e53 100755 --- a/e/imlib2/PRE_BUILD +++ b/e/imlib2/PRE_BUILD @@ -7,3 +7,7 @@ if [[ $IMLIB2_CVS == y ]]; then sed -i "s/; automake/; automake-1.9/" autogen.sh && NOCONFIGURE=ON ./autogen.sh fi + +if [[ $IMLIB2_X11 == "--without-x" ]]; then + patch -p0 < "$SCRIPT_DIRECTORY"/Imlib2.h.patch +fi |