Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Mar 2005 23:19:15 -0800
From:      Russell Jackson <raj@cserv62.csub.edu>
To:        freebsd-ports@freebsd.org, vanilla@freebsd.org
Subject:   [patch] imlib2 1.2.0
Message-ID:  <4226BA73.9000500@cserv62.csub.edu>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------050808030504070701070708
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Patch attached to update imlib2 port to lastest release. Please test. I 
hope I'm not stepping on the maintainer's toes. :-P
-- 
Russell A. Jackson
First Corollary of Taber's Second Law:
	Machines that piss people off get murdered.
		-- Pat Taber

--------------050808030504070701070708
Content-Type: text/plain;
 name="imlib2.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="imlib2.patch"

diff -ruN imlib2/Makefile imlib2.new/Makefile
--- imlib2/Makefile	Sun Feb 27 16:54:09 2005
+++ imlib2.new/Makefile	Sun Feb 27 21:10:50 2005
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	imlib2
-PORTVERSION=	1.1.2
-PORTREVISION=	1
+PORTVERSION=	1.2.0
 CATEGORIES=	graphics
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	enlightenment
@@ -27,6 +26,7 @@
 USE_GNOME=	gnomehack pkgconfig gnometarget
 USE_REINPLACE=	yes
 GNU_CONFIGURE=	yes
+USE_AUTOCONF_VER=259
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
 		LDFLAGS="-L${LOCALBASE}/lib"
 INSTALLS_SHLIB=	yes
diff -ruN imlib2/distinfo imlib2.new/distinfo
--- imlib2/distinfo	Sun Feb 27 17:16:31 2005
+++ imlib2.new/distinfo	Sun Feb 27 16:54:47 2005
@@ -1,2 +1,2 @@
-MD5 (imlib2-1.1.2.tar.gz) = 3389bad516032c951fda4fe620df0cef
-SIZE (imlib2-1.1.2.tar.gz) = 875843
+MD5 (imlib2-1.2.0.tar.gz) = 853fb77100ee3c3ca944f52c892ab49b
+SIZE (imlib2-1.2.0.tar.gz) = 890457
diff -ruN imlib2/files/patch-configure.in imlib2.new/files/patch-configure.in
--- imlib2/files/patch-configure.in	Wed Dec 31 16:00:00 1969
+++ imlib2.new/files/patch-configure.in	Sun Feb 27 21:17:37 2005
@@ -0,0 +1,121 @@
+--- configure.in.orig	Wed Jan  5 01:39:08 2005
++++ configure.in	Sun Feb 27 21:16:57 2005
+@@ -6,7 +6,7 @@
+ AC_CANONICAL_HOST
+ AC_CANONICAL_TARGET
+ AC_ISC_POSIX
+-AM_INIT_AUTOMAKE(imlib2, 1.2.0)
++AM_INIT_AUTOMAKE(imlib2, 1.2.0.001)
+ AM_CONFIG_HEADER(config.h)
+ 
+ AC_C_BIGENDIAN
+@@ -86,6 +86,9 @@
+ packagesrcdir=`cd $srcdir && pwd`
+ AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source code directory])
+ 
++# FIXME: fill in requirements for pc.in - but only ft2 has a pc file!
++requirements="freetype2"
++
+ mmx=no
+ AC_ARG_ENABLE(mmx,[  --disable-mmx           attempt compiling using mmx assembly [default=yes]],
+ [
+@@ -98,15 +101,16 @@
+   fi
+ ],
+ [
+-if test x$target_os = xlinux-gnu; then
++if test x$target_os = xlinux-gnu -o x$target_os = xlinux; then
+   if test x$target_cpu = x$host_cpu; then
+     mmx=`cat /proc/cpuinfo | grep mmx`
+     if test -n "$mmx"; then
+       mmx=yes
++      echo "You appear to be compiling on a "$target_cpu/$target_os" system; using MMX."
+     fi
+   else
+     echo ""
+-    echo "You are cross-compiling on a "$host_cpu" machine for a "$target_os" machine."
++    echo "You are cross-compiling on a "$host_cpu" machine for a "$target_cpu/$target_os" machine."
+     echo "If this target supports mmx, please enable mmx with --enable-mmx as a"
+     echo "configure option."
+     echo ""
+@@ -114,6 +118,7 @@
+ else
+   echo ""
+   echo "You are not running Linux - This script cannot auto-detect mmx assembly."
++  echo "(You appear to be running $target_os.)"
+   echo "You will have to enable the mmx assembly (which gives anywhere from 10%"
+   echo "to 300% speedups) by adding --enable-mmx on the configure command-line."
+   echo ""
+@@ -139,35 +144,28 @@
+ freetype_cflags=`$FREETYPE_CONFIG --cflags`
+ freetype_libs=`$FREETYPE_CONFIG --libs`
+ 
+-x11=no
+-AC_ARG_ENABLE(x11,[  --disable-x11           attempt to build with X11 support [default=yes]],
+-[
+-  if test x$enableval = xyes; then
+-    have_x=yes
+-  else
+-    have_x=no
+-  fi
+-],
+-[
+-  AC_CHECK_HEADER(X11/X.h,
+-    [ have_x="yes" ],
+-    [ have_x="no" ]
+-  )
+-]
+-)
+-AC_MSG_CHECKING(whether X11 support is to be enabled)
++AC_PATH_X([X], [X11/Xlib.h], [XOpenDisplay(NULL)])
++
++if test "x$have_x" = "xno"; then
++   # If --without-x was passed, this will be "disabled" instead of "no" --
++   # so always treat "no" as an error
++   AC_MSG_ERROR(
++[no X support found.  Use --x-includes and --x-libraries to specify the X
++path on your system, or --without-x to disable X support.])
++fi
++
+ if test "x$have_x" = "xyes"; then
+-  x_dir="/usr/X11R6";
+-  x_cflags="-I"$x_dir"/include"
+-  x_libs="-L"$x_dir"/lib -lX11 -lXext"
+-  AC_MSG_RESULT(enabling X11 support)
++  if test "x$x_includes" != "x"; then
++    x_cflags="-I$x_includes"
++  fi
++  if test "x$x_libraries" != "x"; then
++    x_libs="-L$x_libraries -lX11 -lXext"
++  fi
+   AM_CONDITIONAL(BUILD_X11, true)
+   AC_DEFINE(BUILD_X11, 1, [enabling X11 support])
+ else
+-  x_dir=""
+   x_cflags=""
+   x_libs=""
+-  AC_MSG_RESULT(disabling X11 support)
+   AM_CONDITIONAL(BUILD_X11, false)
+ fi
+ 
+@@ -354,7 +352,9 @@
+ fi
+ AM_CONDITIONAL(BUILD_BZ2_LOADER, test "$bz2_ok" = yes)
+ AC_SUBST(BZ2LIBS)
+-  
++
++AC_SUBST(requirements)
++
+ AC_OUTPUT([
+ Makefile
+ src/Makefile
+@@ -395,6 +395,9 @@
+ echo "  GIF.....................: $gif_ok"
+ echo "  ZLIB....................: $zlib_ok"
+ echo "  BZIP2...................: $bz2_ok"
++echo
++echo
++echo "Use MMX for extra speed...: $mmx"
+ echo
+ echo
+ echo "Installation Path.........: $prefix"
diff -ruN imlib2/files/patch-imlib2.spec imlib2.new/files/patch-imlib2.spec
--- imlib2/files/patch-imlib2.spec	Wed Dec 31 16:00:00 1969
+++ imlib2.new/files/patch-imlib2.spec	Sun Feb 27 18:20:35 2005
@@ -0,0 +1,48 @@
+--- imlib2.spec.orig	Thu Jan  6 16:55:03 2005
++++ imlib2.spec	Sun Feb 27 18:19:06 2005
+@@ -1,16 +1,16 @@
+ Summary: Powerful image loading and rendering library
+ Name: imlib2
+ Version: 1.2.0
+-Release: 1.%(date '+%Y%m%d')
++Release: 2.%(date '+%Y%m%d')
+ License: BSD
+ Group: System Environment/Libraries
+-URL: http://www.rasterman.com/raster/imlib.html
++URL: http://www.enlightenment.org
+ Source: ftp://ftp.enlightenment.org/pub/enlightenment/e17/libs/%{name}-%{version}.tar.gz
+ Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
+ Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
+ Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
+-#BuildSuggests: xorg-x11-devel
+-BuildRequires: freetype-devel XFree86-devel
++#BuildSuggests: xorg-x11-devel freetype-devel freetype2-devel
++BuildRequires: /usr/bin/freetype-config XFree86-devel libungif-devel
+ Requires: %{name}-loader_jpeg = %{version}
+ Requires: %{name}-loader_png = %{version}
+ Requires: %{name}-loader_argb = %{version}
+@@ -26,7 +26,8 @@
+ Summary: Imlib2 headers, static libraries and documentation
+ Group: System Environment/Libraries
+ Requires: %{name} = %{version}
+-Requires: freetype-devel >= 2
++Requires: /usr/bin/freetype-config
++
+ %description devel
+ Headers, static libraries and documentation for Imlib2.
+ 
+@@ -117,8 +118,12 @@
+ %setup -q
+ 
+ %build
+-%{configure} --prefix=%{_prefix}
+-%{__make} %{?_smp_mflags} %{?mflags}
++%{configure} --prefix=%{_prefix} \
++%ifarch x86_64
++       --disable-mmx \
++%endif
++       $RPM_CONFIGURE_OPTS
++%{__make} LDFLAGS="$LDFLAGS -L/usr/X11R6/%{_lib}" %{?_smp_mflags} %{?mflags}
+ 
+ %install
+ %{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
diff -ruN imlib2/files/patch-security-1 imlib2.new/files/patch-security-1
--- imlib2/files/patch-security-1	Fri Jan 21 07:20:34 2005
+++ imlib2.new/files/patch-security-1	Wed Dec 31 16:00:00 1969
@@ -1,90 +0,0 @@
-===================================================================
-RCS file: /cvsroot/enlightenment/e17/libs/imlib2/src/modules/loaders/loader_xpm.c,v
-retrieving revision 1.2
-retrieving revision 1.3
-diff -u -r1.2 -r1.3
---- enlightenment/e17/libs/imlib2/src/modules/loaders/loader_xpm.c	2004/12/14 03:50:46	1.2
-+++ loaders/loader_xpm.c	2005/01/04 03:34:03	1.3
-@@ -192,37 +192,37 @@
-                     {
-                        /* Header */
-                        sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp);
--                       if (ncolors > 32766)
-+                       if ((ncolors > 32766) || (ncolors < 1))
-                          {
-                             fprintf(stderr,
--                                    "IMLIB ERROR: XPM files with colors > 32766 not supported\n");
-+                                    "IMLIB ERROR: XPM files with colors > 32766 or < 1 not supported\n");
-                             free(line);
-                             fclose(f);
-                             xpm_parse_done();
-                             return 0;
-                          }
--                       if (cpp > 5)
-+                       if ((cpp > 5) || (cpp < 1))
-                          {
-                             fprintf(stderr,
--                                    "IMLIB ERROR: XPM files with characters per pixel > 5 not supported\n");
-+                                    "IMLIB ERROR: XPM files with characters per pixel > 5 or < 1not supported\n");
-                             free(line);
-                             fclose(f);
-                             xpm_parse_done();
-                             return 0;
-                          }
--                       if (w > 32767)
-+                       if ((w > 32767) || (w < 1))
-                          {
-                             fprintf(stderr,
--                                    "IMLIB ERROR: Image width > 32767 pixels for file\n");
-+                                    "IMLIB ERROR: Image width > 32767 or < 1 pixels for file\n");
-                             free(line);
-                             fclose(f);
-                             xpm_parse_done();
-                             return 0;
-                          }
--                       if (h > 32767)
-+                       if ((h > 32767) || (h < 1))
-                          {
-                             fprintf(stderr,
--                                    "IMLIB ERROR: Image height > 32767 pixels for file\n");
-+                                    "IMLIB ERROR: Image height > 32767 or < 1 pixels for file\n");
-                             free(line);
-                             fclose(f);
-                             xpm_parse_done();
-@@ -284,9 +284,14 @@
-                                            if (k >= len)
-                                              {
-                                                 if (col[0])
--                                                   strcat(col, " ");
-+						  {
-+						     if (strlen(col) < ( sizeof(col) - 2))
-+						       strcat(col, " ");
-+						     else
-+						       done = 1;
-+						  }
-                                                 if (strlen(col) + strlen(s) <
--                                                    sizeof(col))
-+                                                    (sizeof(col) - 1))
-                                                    strcat(col, s);
-                                              }
-                                            if (col[0])
-@@ -322,9 +327,16 @@
-                                         }
-                                       else
-                                         {
--                                           if (col[0])
--                                              strcat(col, " ");
--                                           strcat(col, s);
-+					   if (col[0])
-+					     {
-+						if (strlen(col) < ( sizeof(col) - 2))
-+						  strcat(col, " ");
-+						else
-+						  done = 1;
-+					     }
-+					   if (strlen(col) + strlen(s) <
-+					       (sizeof(col) - 1))
-+					     strcat(col, s);
-                                         }
-                                    }
-                               }
diff -ruN imlib2/pkg-plist imlib2.new/pkg-plist
--- imlib2/pkg-plist	Thu Dec 23 10:03:01 2004
+++ imlib2.new/pkg-plist	Sun Feb 27 17:07:24 2005
@@ -1,31 +1,51 @@
-bin/bumpmaptest
-bin/color_spaces
-bin/imconvert
-bin/imlib2
-bin/imlib2_test
-bin/imlib2_view
 bin/imlib2-config
-bin/polytest
+bin/imlib2_conv
 include/Imlib2.h
+lib/imlib2/filters/bumpmap.so
+lib/imlib2/filters/colormod.so
+lib/imlib2/filters/testfilter.so
+lib/imlib2/loaders/argb.so
+lib/imlib2/loaders/bmp.so
+lib/imlib2/loaders/bz2.so
+lib/imlib2/loaders/gif.so
+lib/imlib2/loaders/jpeg.so
+lib/imlib2/loaders/lbm.so
+lib/imlib2/loaders/png.so
+lib/imlib2/loaders/pnm.so
+lib/imlib2/loaders/tga.so
+lib/imlib2/loaders/tiff.so
+lib/imlib2/loaders/xpm.so
+lib/imlib2/loaders/zlib.so
 lib/libImlib2.a
 lib/libImlib2.so
-lib/libImlib2.so.2
-lib/imlib2_loaders/filter/bump_map.so
-lib/imlib2_loaders/filter/colormod.so
-lib/imlib2_loaders/filter/testfilter.so
-lib/imlib2_loaders/image/argb.so
-lib/imlib2_loaders/image/bmp.so
-lib/imlib2_loaders/image/bz2.so
-lib/imlib2_loaders/image/gif.so
-lib/imlib2_loaders/image/jpeg.so
-lib/imlib2_loaders/image/lbm.so
-lib/imlib2_loaders/image/png.so
-lib/imlib2_loaders/image/pnm.so
-lib/imlib2_loaders/image/tga.so
-lib/imlib2_loaders/image/tiff.so
-lib/imlib2_loaders/image/xpm.so
-lib/imlib2_loaders/image/zlib.so
+lib/libImlib2.so.3
 libdata/pkgconfig/imlib2.pc
-@dirrm lib/imlib2_loaders/image
-@dirrm lib/imlib2_loaders/filter
-@dirrm lib/imlib2_loaders
+share/imlib2/data/fonts/cinema.ttf
+share/imlib2/data/fonts/grunge.ttf
+share/imlib2/data/fonts/morpheus.ttf
+share/imlib2/data/fonts/notepad.ttf
+share/imlib2/data/images/audio.png
+share/imlib2/data/images/bg.png
+share/imlib2/data/images/bulb.png
+share/imlib2/data/images/cal.png
+share/imlib2/data/images/calc.png
+share/imlib2/data/images/folder.png
+share/imlib2/data/images/globe.png
+share/imlib2/data/images/imlib2.png
+share/imlib2/data/images/lock.png
+share/imlib2/data/images/mail.png
+share/imlib2/data/images/menu.png
+share/imlib2/data/images/mush.png
+share/imlib2/data/images/paper.png
+share/imlib2/data/images/sh1.png
+share/imlib2/data/images/sh2.png
+share/imlib2/data/images/sh3.png
+share/imlib2/data/images/stop.png
+share/imlib2/data/images/tnt.png
+@dirrm share/imlib2/data/images
+@dirrm share/imlib2/data/fonts
+@dirrm share/imlib2/data
+@dirrm share/imlib2
+@dirrm lib/imlib2/loaders
+@dirrm lib/imlib2/filters
+@dirrm lib/imlib2

--------------050808030504070701070708--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4226BA73.9000500>