diff options
author | obache <obache@pkgsrc.org> | 2011-05-21 08:18:16 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2011-05-21 08:18:16 +0000 |
commit | 0ec7ed272ea694e7194f15d0ff96e05ade369d69 (patch) | |
tree | d4e64af95544d4d7087aa83efc3b4bc55dfad9f2 /x11/efltk | |
parent | 8cb40d011ab7c66f611cac6f418bc0a2f97f3cb8 (diff) | |
download | pkgsrc-0ec7ed272ea694e7194f15d0ff96e05ade369d69.tar.gz |
* build fixes, libpng-1.5, and others.
* set LICENSE
* add user-destdir installation support.
Diffstat (limited to 'x11/efltk')
-rw-r--r-- | x11/efltk/Makefile | 7 | ||||
-rw-r--r-- | x11/efltk/distinfo | 7 | ||||
-rw-r--r-- | x11/efltk/patches/patch-ae | 24 | ||||
-rw-r--r-- | x11/efltk/patches/patch-efltk_Fl__Text__Buffer.h | 13 | ||||
-rw-r--r-- | x11/efltk/patches/patch-efltk_Fl__Window.h | 13 | ||||
-rw-r--r-- | x11/efltk/patches/patch-src_images_Fl__Png.cpp | 193 |
6 files changed, 252 insertions, 5 deletions
diff --git a/x11/efltk/Makefile b/x11/efltk/Makefile index 19e32b6a0da..a3511f27a4d 100644 --- a/x11/efltk/Makefile +++ b/x11/efltk/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2011/04/22 13:42:03 obache Exp $ +# $NetBSD: Makefile,v 1.21 2011/05/21 08:18:16 obache Exp $ # DISTNAME= efltk-2.0.5 @@ -10,6 +10,9 @@ EXTRACT_SUFX= .tar.bz2 MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://ede.sourceforge.net/ COMMENT= Extended Fast Light Toolkit +LICENSE= gnu-lgpl-v2 # or later + +PKG_DESTDIR_SUPPORT= user-destdir WRKSRC= ${WRKDIR}/efltk GNU_CONFIGURE= yes @@ -24,6 +27,8 @@ CONFIGURE_ARGS+= --enable-plugins CONFIGURE_ARGS+= --disable-unixODBC CONFIGURE_ARGS+= --disable-shared +INSTALL_MAKE_FLAGS+= INSTALL_PREFIX=${DESTDIR:Q} + .include "options.mk" .include "../../devel/gettext-lib/buildlink3.mk" diff --git a/x11/efltk/distinfo b/x11/efltk/distinfo index 992619cab99..ecef41bd195 100644 --- a/x11/efltk/distinfo +++ b/x11/efltk/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2006/03/08 11:29:50 joerg Exp $ +$NetBSD: distinfo,v 1.6 2011/05/21 08:18:16 obache Exp $ SHA1 (efltk-2.0.5.tar.bz2) = 26f7124b384d0bfe3d28a73cbdf0111432b08d99 RMD160 (efltk-2.0.5.tar.bz2) = 7efa711d0df8a01ee402e1866286265d294778e8 @@ -7,7 +7,10 @@ SHA1 (patch-aa) = d87f595661c465fc315b643241b22ef65926906e SHA1 (patch-ab) = 27a6870c068c8ea44089955a7d3c0492191f23ba SHA1 (patch-ac) = cf4474ff83f9630f6b310bc3df0fc16adaff7138 SHA1 (patch-ad) = 41911884bc0eaa6a4de869b90d62c9ee27d1908b -SHA1 (patch-ae) = db02f224887f6d0e55334310ad0a3f09da6499b8 +SHA1 (patch-ae) = 45f32b9d098736443a3d9b405b6fe17da624d9fc SHA1 (patch-af) = 2fe44ea57e0579dcfa43ba597e52161c70f67efd SHA1 (patch-ag) = 29799b2b0aeffbca82dbc98cb1e06eb62a7e595a SHA1 (patch-ah) = 63bacecefa0cece0cbcbf229c886231f2907c0a8 +SHA1 (patch-efltk_Fl__Text__Buffer.h) = 16eb6b48d0f06ac0f2074a0b61a782db7757663e +SHA1 (patch-efltk_Fl__Window.h) = b97f04435b88e05ec4f642b0615575cf8d279dd7 +SHA1 (patch-src_images_Fl__Png.cpp) = 0c2d3bf30a5542274048784aaf32256cc5466dea diff --git a/x11/efltk/patches/patch-ae b/x11/efltk/patches/patch-ae index 1ae860529c4..a4ba251f871 100644 --- a/x11/efltk/patches/patch-ae +++ b/x11/efltk/patches/patch-ae @@ -1,7 +1,27 @@ -$NetBSD: patch-ae,v 1.1 2006/02/18 14:07:54 joerg Exp $ +$NetBSD: patch-ae,v 1.2 2011/05/21 08:18:16 obache Exp $ ---- makeinclude.in.orig 2006-02-01 18:02:22.000000000 +0000 +* destdir installation support +* libtoolize + +--- makeinclude.in.orig 2003-03-13 15:10:15.000000000 +0000 +++ makeinclude.in +@@ -37,11 +37,11 @@ SYSTYPE = @SYSTYPE@ + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +-bindir = @bindir@ +-datadir = @datadir@ +-includedir = @includedir@ +-libdir = @libdir@ +-mandir = @mandir@ ++bindir = $(DESTDIR)@bindir@ ++datadir = $(DESTDIR)@datadir@ ++includedir = $(DESTDIR)@includedir@ ++libdir = $(DESTDIR)@libdir@ ++mandir = $(DESTDIR)@mandir@ + srcdir = @srcdir@ + VPATH = @srcdir@ + @@ -104,8 +104,8 @@ ODBCLIBS =$(FLODBCLIB) $(UNIXODBCLIB) MYSQLLIBS_ =$(FLMYSQLLIB) $(MYSQLLIBS) diff --git a/x11/efltk/patches/patch-efltk_Fl__Text__Buffer.h b/x11/efltk/patches/patch-efltk_Fl__Text__Buffer.h new file mode 100644 index 00000000000..8a284dd21b4 --- /dev/null +++ b/x11/efltk/patches/patch-efltk_Fl__Text__Buffer.h @@ -0,0 +1,13 @@ +$NetBSD: patch-efltk_Fl__Text__Buffer.h,v 1.1 2011/05/21 08:18:16 obache Exp $ + +--- efltk/Fl_Text_Buffer.h.orig 2003-06-15 20:05:55.000000000 +0000 ++++ efltk/Fl_Text_Buffer.h +@@ -78,7 +78,7 @@ public: + Fl_Text_Buffer(int requestedSize = 0); + ~Fl_Text_Buffer(); + +- char *Fl_Text_Buffer::static_buffer(); ++ char* static_buffer(); + + // Undo stack size: (default 50) + int undo_size(); diff --git a/x11/efltk/patches/patch-efltk_Fl__Window.h b/x11/efltk/patches/patch-efltk_Fl__Window.h new file mode 100644 index 00000000000..b52455878f2 --- /dev/null +++ b/x11/efltk/patches/patch-efltk_Fl__Window.h @@ -0,0 +1,13 @@ +$NetBSD: patch-efltk_Fl__Window.h,v 1.1 2011/05/21 08:18:16 obache Exp $ + +--- efltk/Fl_Window.h.orig 2003-05-14 21:07:55.000000000 +0000 ++++ efltk/Fl_Window.h +@@ -27,6 +27,8 @@ + // value for x,y to indicate window system places window + #define FL_USEDEFAULT ((int)0x80000000) // same as Win32 value + ++class Fl_X; ++ + /** Fl_Window */ + class FL_API Fl_Window : public Fl_Group { + public: diff --git a/x11/efltk/patches/patch-src_images_Fl__Png.cpp b/x11/efltk/patches/patch-src_images_Fl__Png.cpp new file mode 100644 index 00000000000..7a8a9b571c2 --- /dev/null +++ b/x11/efltk/patches/patch-src_images_Fl__Png.cpp @@ -0,0 +1,193 @@ +$NetBSD: patch-src_images_Fl__Png.cpp,v 1.1 2011/05/21 08:18:16 obache Exp $ + +* fixes build with libpng>=1.5. + +--- src/images/Fl_Png.cpp.orig 2003-07-13 15:07:26.000000000 +0000 ++++ src/images/Fl_Png.cpp +@@ -18,17 +18,17 @@ bool setup_png_transformations(png_struc + static void my_png_warning(png_structp png_ptr, png_const_charp message) + { + const char *name = "PNG: Unknown (WARNING!)"; +- if (png_ptr != NULL && png_ptr->error_ptr != NULL) +- name = (const char *)png_ptr->error_ptr; ++ if (png_ptr != NULL && png_get_error_ptr(png_ptr) != NULL) ++ name = (const char *)png_get_error_ptr(png_ptr); + Fl::warning("%s: libpng warning: %s", name, message); + } + + static void my_png_error(png_structp png_ptr, png_const_charp message) + { + png_last_error = (volatile char*)"PNG: Unknown (ERROR!)"; +- if (png_ptr != NULL && png_ptr->error_ptr != NULL) ++ if (png_ptr != NULL && png_get_error_ptr(png_ptr) != NULL) + png_last_error = (volatile char*)message; +- longjmp(png_ptr->jmpbuf, 0); ++ png_longjmp(png_ptr, 0); + } + + static bool png_is_valid_file(const char *filename) +@@ -56,7 +56,7 @@ static bool png_is_valid_mem(const uint8 + // PNG READ METHODS: + + static void read_data_fn(png_structp png_ptr, png_bytep d, png_size_t length) { +- ((Fl_IO*)png_ptr->io_ptr)->read(d, length); ++ ((Fl_IO*)png_get_io_ptr(png_ptr))->read(d, length); + } + + #define return_error() \ +@@ -81,7 +81,7 @@ static bool png_create(Fl_IO &png_io, ui + if(!end_info_ptr) { return_error(); } + + png_bytepp rows = 0; +- if(setjmp(png_ptr->jmpbuf)) { ++ if(setjmp(png_jmpbuf(png_ptr))) { + if(rows) free(rows); + if(png_ptr) png_destroy_read_struct (&png_ptr, &info_ptr, &end_info_ptr); + fputs((const char *)png_last_error, stderr); +@@ -94,6 +94,8 @@ static bool png_create(Fl_IO &png_io, ui + int i=0; + uint32 Rmask=0, Gmask=0, Bmask=0, Amask=0; + png_color_16 *transv=0; ++ png_colorp png_palette; ++ int png_num_palette; + Fl_Colormap *palette=0; + + png_set_error_fn(png_ptr, (png_voidp)0, my_png_error, my_png_warning); +@@ -108,15 +110,15 @@ static bool png_create(Fl_IO &png_io, ui + Rmask = 0x000000FF; + Gmask = 0x0000FF00; + Bmask = 0x00FF0000; +- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0; ++ Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0; + #else +- int s = (info_ptr->channels == 4) ? 0 : 8; ++ int s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8; + Rmask = 0xFF000000 >> s; + Gmask = 0x00FF0000 >> s; + Bmask = 0x0000FF00 >> s; + Amask = 0x000000FF >> s; + #endif +- if(info_ptr->channels == 4) ++ if(png_get_channels(png_ptr, info_ptr) == 4) + fmt.masktype = FL_MASK_ALPHA; + } + +@@ -144,13 +146,13 @@ static bool png_create(Fl_IO &png_io, ui + palette->colors[i].g = i; + palette->colors[i].b = i; + } +- } else if(info_ptr->num_palette > 0 ) ++ } else if(png_get_PLTE(png_ptr, info_ptr, &png_palette, &png_num_palette) != 0 ) + { +- palette->ncolors = info_ptr->num_palette; +- for( i=0; i<info_ptr->num_palette; ++i ) { +- palette->colors[i].b = info_ptr->palette[i].blue; +- palette->colors[i].g = info_ptr->palette[i].green; +- palette->colors[i].r = info_ptr->palette[i].red; ++ palette->ncolors = png_num_palette; ++ for( i=0; i<png_num_palette; ++i ) { ++ palette->colors[i].b = png_palette[i].blue; ++ palette->colors[i].g = png_palette[i].green; ++ palette->colors[i].r = png_palette[i].red; + } + } + } +@@ -178,10 +180,11 @@ bool setup_png_transformations(png_struc + { + int bit_depth, interlace_type, compression_type, filter_type; + int channels; ++ png_uint_32 w, h; + + /* Get the image info */ + png_get_IHDR(png_ptr, info_ptr, +- (ulong*)&width, (ulong*)&height, ++ &w, &h, + &bit_depth, + &col_type, + &interlace_type, +@@ -191,10 +194,10 @@ bool setup_png_transformations(png_struc + /* Extract multiple pixels with bit depths of 1, 2, and 4 from a single + * byte into separate bytes (useful for paletted and grayscale images). + */ +- if (info_ptr->bit_depth < 8) ++ if (png_get_bit_depth(png_ptr, info_ptr) < 8) + png_set_packing(png_ptr); + /* tell libpng to strip 16 bit/color files down to 8 bits/color */ +- else if (info_ptr->bit_depth == 16) ++ else if (png_get_bit_depth(png_ptr, info_ptr) == 16) + png_set_strip_16(png_ptr) ; + + /* scale greyscale values to the range 0..255 */ +@@ -234,7 +237,7 @@ bool setup_png_transformations(png_struc + /* Update the info the reflect our transformations */ + png_read_update_info(png_ptr, info_ptr); + png_get_IHDR(png_ptr, info_ptr, +- (ulong*)&width, (ulong*)&height, ++ &w, &h, + &bit_depth, + &col_type, + &interlace_type, +@@ -242,6 +245,8 @@ bool setup_png_transformations(png_struc + &filter_type); + channels = png_get_channels(png_ptr, info_ptr); + bitspp = bit_depth*channels; ++ width = w; ++ height = h; + + if(channels < 1 || channels > 4) { + return false; +@@ -254,7 +259,7 @@ bool setup_png_transformations(png_struc + // PNG WRITE METHODS: + + static void write_data_fn(png_structp png_ptr, png_bytep d, png_size_t length) { +- ((Fl_IO*)png_ptr->io_ptr)->write(d, length); ++ ((Fl_IO*)png_get_io_ptr(png_ptr))->write(d, length); + //png_io.write(d, length); + } + +@@ -318,7 +323,7 @@ static bool png_write(Fl_IO &png_io, con + + bool allocated = false; + uint8 *wr_data = (uint8*)data; +- if(setjmp(png_ptr->jmpbuf)) { ++ if(setjmp(png_jmpbuf(png_ptr))) { + if(png_ptr) png_destroy_write_struct(&png_ptr, &info_ptr); + if(allocated && wr_data) free(wr_data); + return false; +@@ -373,7 +378,6 @@ static bool png_write(Fl_IO &png_io, con + * PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST + * currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED + */ +- info_ptr->channels = wr_fmt->bytespp; + png_set_IHDR(png_ptr, info_ptr, w, h, + (wr_fmt->bitspp==1) == 1 ? 1 : 8 /* per channel */, + +@@ -385,9 +389,14 @@ static bool png_write(Fl_IO &png_io, con + PNG_FILTER_TYPE_BASE + ); + +- info_ptr->sig_bit.red = 8; +- info_ptr->sig_bit.green = 8; +- info_ptr->sig_bit.blue = 8; ++ png_color_8 sig_bit; ++ sig_bit.red = 8; ++ sig_bit.green = 8; ++ sig_bit.blue = 8; ++ if(wr_fmt->Amask) { ++ sig_bit.alpha = 8; ++ } ++ png_set_sBIT(png_ptr, info_ptr, &sig_bit); + #if !WORDS_BIGENDIAN + if(wr_fmt->bitspp==1) png_set_packswap(png_ptr); + #endif +@@ -418,10 +427,6 @@ static bool png_write(Fl_IO &png_io, con + png_set_PLTE(png_ptr, info_ptr, palette, wr_fmt->palette->ncolors); + } + +- if(wr_fmt->Amask) { +- info_ptr->sig_bit.alpha = 8; +- } +- + /* Write the file header information. REQUIRED */ + png_write_info(png_ptr, info_ptr); + |