pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add libfpx.



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%NetBSD.org@localhost>
Pushed By:	nros
Date:		Thu Dec 17 12:58:20 2015 +0100
Changeset:	62e9b8e5185f4fa0464e2bc667da7fcaa760a98d

Modified Files:
	Makefile
Added Files:
	libfpx/DESCR
	libfpx/Makefile
	libfpx/PLIST
	libfpx/TODO
	libfpx/buildlink3.mk
	libfpx/distinfo
	libfpx/patches/patch-Makefile.in
	libfpx/patches/patch-basics_filename.cpp
	libfpx/patches/patch-configure.ac
	libfpx/patches/patch-fpx_fpxutils.h
	libfpx/patches/patch-fpxlib-config.h.in
	libfpx/patches/patch-fpxlib.h
	libfpx/patches/patch-jpeg_dllmain.c
	libfpx/patches/patch-ole_gen__guid.cpp
	libfpx/patches/patch-ole_olefiles.cpp

Log Message:
Add libfpx.

Can be used by Graphicsmagick to read flashpix images, not in pkgsrc as mention
by richard palo on pkgsrc-users.

Libfpx is a library for reading and writing FlashPix images.

This product includes software developed by the contributors and Digital
Imaging Group, Inc. (http://www.digitalimaging.org/) for use in the
Flashpix Toolkit Project.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=62e9b8e5185f4fa0464e2bc667da7fcaa760a98d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                 |  1 +
 libfpx/DESCR                             |  5 +++++
 libfpx/Makefile                          | 24 ++++++++++++++++++++++++
 libfpx/PLIST                             |  3 +++
 libfpx/TODO                              |  3 +++
 libfpx/buildlink3.mk                     | 12 ++++++++++++
 libfpx/distinfo                          | 15 +++++++++++++++
 libfpx/patches/patch-Makefile.in         | 13 +++++++++++++
 libfpx/patches/patch-basics_filename.cpp | 30 ++++++++++++++++++++++++++++++
 libfpx/patches/patch-configure.ac        | 13 +++++++++++++
 libfpx/patches/patch-fpx_fpxutils.h      | 13 +++++++++++++
 libfpx/patches/patch-fpxlib-config.h.in  | 10 ++++++++++
 libfpx/patches/patch-fpxlib.h            | 14 ++++++++++++++
 libfpx/patches/patch-jpeg_dllmain.c      | 13 +++++++++++++
 libfpx/patches/patch-ole_gen__guid.cpp   | 13 +++++++++++++
 libfpx/patches/patch-ole_olefiles.cpp    | 13 +++++++++++++
 16 files changed, 195 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 7d84458..549ea13 100755
--- a/Makefile
+++ b/Makefile
@@ -1482,6 +1482,7 @@ SUBDIR+=	libetonyek
 SUBDIR+=	libfirm-git
 SUBDIR+=	libfm
 SUBDIR+=	libfplll
+SUBDIR+=	libfpx
 SUBDIR+=	libftdi1
 SUBDIR+=	libgadu
 SUBDIR+=	libgda-bdb
diff --git a/libfpx/DESCR b/libfpx/DESCR
new file mode 100644
index 0000000..eb371eb
--- /dev/null
+++ b/libfpx/DESCR
@@ -0,0 +1,5 @@
+Libfpx is a library for reading and writing FlashPix images.
+
+This product includes software developed by the contributors and Digital
+Imaging Group, Inc. (http://www.digitalimaging.org/) for use in the
+Flashpix Toolkit Project.
diff --git a/libfpx/Makefile b/libfpx/Makefile
new file mode 100644
index 0000000..d868a2a
--- /dev/null
+++ b/libfpx/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD$
+libfpx_ver=	1.3.1
+DISTNAME=	libfpx-${libfpx_ver}-4
+PKGNAME=	libfpx-${libfpx_ver}
+CATEGORIES=	graphics
+MASTER_SITES=	ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/ \
+		ftp://ftp.kddlabs.co.jp/graphics/ImageMagick/ \
+		http://www.imagemagick.org/download/delegates/
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://www.imagemagick.org/
+COMMENT=	Library for reading FlashPix images
+#LICENSE=	# TODO: (see mk/license.mk)
+
+USE_TOOLS+=	autoconf
+GNU_CONFIGURE=	yes
+USE_LANGUAGES=	c c++
+USE_LIBTOOL=	yes
+
+pre-configure:
+	cd ${WRKSRC} && autoconf
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/libfpx/PLIST b/libfpx/PLIST
new file mode 100644
index 0000000..9e1612d
--- /dev/null
+++ b/libfpx/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+include/fpxlib.h
+lib/libfpx.la
diff --git a/libfpx/TODO b/libfpx/TODO
new file mode 100644
index 0000000..727fc3b
--- /dev/null
+++ b/libfpx/TODO
@@ -0,0 +1,3 @@
+LICENSE??
+Better DESCR.
+test with clang and perhaps incororate freebsd ports patch.
diff --git a/libfpx/buildlink3.mk b/libfpx/buildlink3.mk
new file mode 100644
index 0000000..bbc89c0
--- /dev/null
+++ b/libfpx/buildlink3.mk
@@ -0,0 +1,12 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	libfpx
+
+.if !defined(LIBFPX_BUILDLINK3_MK)
+LIBFPX_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libfpx+=	libfpx>=1.3.1
+BUILDLINK_PKGSRCDIR.libfpx?=	../../wip/libfpx
+.endif	# LIBFPX_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-libfpx
diff --git a/libfpx/distinfo b/libfpx/distinfo
new file mode 100644
index 0000000..f4475a2
--- /dev/null
+++ b/libfpx/distinfo
@@ -0,0 +1,15 @@
+$NetBSD$
+
+SHA1 (libfpx-1.3.1-4.tar.xz) = ade847a583aff644d7f0441cf0404aa14bc049fd
+RMD160 (libfpx-1.3.1-4.tar.xz) = 808ec80b0127c62877685c2575779babe5af6c96
+SHA512 (libfpx-1.3.1-4.tar.xz) = 3f4510b6896d76a4f3d0aa1c6060b93e5e2783c8d7c801488f1593b20d8081fb5aa1b19475f863922a1f5c5aa22255aa70e435a2a7bace443efcae7c3e32ae3b
+Size (libfpx-1.3.1-4.tar.xz) = 1896560 bytes
+SHA1 (patch-Makefile.in) = 21c1f1b0ca1b92c8148956a321a32e812865efb0
+SHA1 (patch-basics_filename.cpp) = 705bb933b051437d0628809cfb1d76c66f0f2f43
+SHA1 (patch-configure.ac) = 1ca2374d5ec76ae5c351d3641926d419d5d55855
+SHA1 (patch-fpx_fpxutils.h) = 87890fdb96035808bca140b835c8c4b70346ecd5
+SHA1 (patch-fpxlib-config.h.in) = 49c4d9517cc5cafebd3cb8f9144614056fed936e
+SHA1 (patch-fpxlib.h) = 3ee9dde1db3eee5b901c8da752f5a4c19d2d95d4
+SHA1 (patch-jpeg_dllmain.c) = 31e33814feda2e78845e4a248f31d1f8196e0c58
+SHA1 (patch-ole_gen__guid.cpp) = 1a6f78f609038c5238e9d4c2fc26f5a93d655d1c
+SHA1 (patch-ole_olefiles.cpp) = 18b216766aa2920797dddb61122c05d8b183a8cc
diff --git a/libfpx/patches/patch-Makefile.in b/libfpx/patches/patch-Makefile.in
new file mode 100644
index 0000000..90976d2
--- /dev/null
+++ b/libfpx/patches/patch-Makefile.in
@@ -0,0 +1,13 @@
+$NetBSD$
+* Don't install autoconf config file.
+--- Makefile.in.orig	2014-02-12 13:14:38.000000000 +0000
++++ Makefile.in
+@@ -407,7 +407,7 @@ SUBDIRS = oless jpeg basics ole ri_image
+ AM_CPPFLAGS = -I$(top_srcdir)
+ 
+ # Headers which are installed
+-include_HEADERS = fpxlib.h fpxlib-config.h
++include_HEADERS = fpxlib.h
+ 
+ # Shared libraries built in this directory
+ lib_LTLIBRARIES = libfpx.la
diff --git a/libfpx/patches/patch-basics_filename.cpp b/libfpx/patches/patch-basics_filename.cpp
new file mode 100644
index 0000000..2156e67
--- /dev/null
+++ b/libfpx/patches/patch-basics_filename.cpp
@@ -0,0 +1,30 @@
+$NetBSD$
+* Add use statvfs since it's more portable than statfs.
+  fixes build on NetBSD.
+--- basics/filename.cpp.orig	2013-09-02 15:47:00.000000000 +0000
++++ basics/filename.cpp
+@@ -38,6 +38,9 @@
+ #ifdef _UNIX
+ #  include <sys/types.h>
+ #  include <sys/stat.h>
++#  if defined(HAVE_SYS_STATVFS_H)
++#    include <sys/statvfs.h>
++#  endif
+ #  if defined(HAVE_SYS_STATFS_H)
+ #    /* System V & Linux */
+ #    include <sys/statfs.h>
+@@ -428,6 +431,14 @@ long FicNom::PlaceDisponible() const
+     return nFreeCluster * nSecPerCluster * nBytePerSec / 1024;
+   else    // Function failed, don't know why
+     return 0;
++#elif defined(HAVE_SYS_STATVFS_H)
++  struct statvfs buf;
++  int errNum;
++  errNum = statvfs ( ".", &buf);
++  if (errNum)
++	perror("statvfs on current directory");
++
++  return (buf.f_bsize*buf.f_bfree)/kOneKilobyte;
+ #else
+   struct statfs buf;
+   int errNum;
diff --git a/libfpx/patches/patch-configure.ac b/libfpx/patches/patch-configure.ac
new file mode 100644
index 0000000..162e869
--- /dev/null
+++ b/libfpx/patches/patch-configure.ac
@@ -0,0 +1,13 @@
+$NetBSD$
+* check for statvfs, see patch-basics_filename.cpp
+--- configure.ac.orig	2014-02-12 13:13:22.000000000 +0000
++++ configure.ac
+@@ -70,7 +70,7 @@ AC_C_CONST
+ AC_C_INLINE
+ AC_C_BIGENDIAN
+ 
+-AC_CHECK_HEADERS([wchar.h sys/statfs.h sys/time.h])
++AC_CHECK_HEADERS([wchar.h sys/statfs.h sys/statvfs.h sys/time.h])
+ 
+ # <sys/mount.h> depends on <sys/param.h>
+ AC_CHECK_HEADERS([sys/param.h])
diff --git a/libfpx/patches/patch-fpx_fpxutils.h b/libfpx/patches/patch-fpx_fpxutils.h
new file mode 100644
index 0000000..8718cec
--- /dev/null
+++ b/libfpx/patches/patch-fpx_fpxutils.h
@@ -0,0 +1,13 @@
+$NetBSD$
+* __unix is not defined on NetBSD, _UNIX is always defined by the build system
+--- fpx/fpxutils.h.orig	2013-09-02 15:45:00.000000000 +0000
++++ fpx/fpxutils.h
+@@ -471,7 +471,7 @@
+   #define DefaultPaletteSize  256     // Default size of Palette
+   
+ // Define window DIB structures  
+-#if defined(macintosh) || defined(__unix) 
++#if defined(macintosh) || defined(_UNIX) 
+ 
+   // Bitmap information header
+   typedef struct tagBITMAPINFOHEADER
diff --git a/libfpx/patches/patch-fpxlib-config.h.in b/libfpx/patches/patch-fpxlib-config.h.in
new file mode 100644
index 0000000..1649e9a
--- /dev/null
+++ b/libfpx/patches/patch-fpxlib-config.h.in
@@ -0,0 +1,10 @@
+$NetBSD$
+* add statvfs support, see patch-basics_filename.cpp
+--- fpxlib-config.h.in.orig	2014-02-12 13:14:38.000000000 +0000
++++ fpxlib-config.h.in
+@@ -131,3 +131,5 @@
+ #ifndef __cplusplus
+ #undef inline
+ #endif
++
++#undef HAVE_SYS_STATVFS_H
diff --git a/libfpx/patches/patch-fpxlib.h b/libfpx/patches/patch-fpxlib.h
new file mode 100644
index 0000000..ab7b6ee
--- /dev/null
+++ b/libfpx/patches/patch-fpxlib.h
@@ -0,0 +1,14 @@
+$NetBSD$
+* Don't use autoconf config file in public header,
+  it's macros are unused in it and the macros might conflict
+  with packages own config.h
+--- fpxlib.h.orig	2015-12-11 19:33:16.000000000 +0000
++++ fpxlib.h
+@@ -11,7 +11,6 @@
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+-#include "fpxlib-config.h"
+ #include <inttypes.h>
+ 
+   typedef struct IStream IStream;
diff --git a/libfpx/patches/patch-jpeg_dllmain.c b/libfpx/patches/patch-jpeg_dllmain.c
new file mode 100644
index 0000000..ddb743d
--- /dev/null
+++ b/libfpx/patches/patch-jpeg_dllmain.c
@@ -0,0 +1,13 @@
+$NetBSD$
+* __unix is not defined on NetBSD, _UNIX is always defined by the build system
+--- jpeg/dllmain.c.orig	2013-09-02 15:45:00.000000000 +0000
++++ jpeg/dllmain.c
+@@ -3,7 +3,7 @@ Description:  Main module for dllJPEG li
+ */ 
+ 
+ 
+-#ifndef __unix
++#ifndef _UNIX
+ #include <windows.h>
+ #include "jpegconf.h"
+ 
diff --git a/libfpx/patches/patch-ole_gen__guid.cpp b/libfpx/patches/patch-ole_gen__guid.cpp
new file mode 100644
index 0000000..7725258
--- /dev/null
+++ b/libfpx/patches/patch-ole_gen__guid.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+* __unix is not defined on NetBSD, _UNIX is always defined by the build system
+--- ole/gen_guid.cpp.orig	2013-09-02 15:45:00.000000000 +0000
++++ ole/gen_guid.cpp
+@@ -65,7 +65,7 @@ typedef struct _timespec
+ //  Internal Functions
+ //  ----------------------------------------------------------------------------
+ 
+-#if defined(macintosh) || defined(__unix)
++#if defined(macintosh) || defined(_UNIX)
+ static void GetENETAddress(unsigned char *ENETaddress)
+ {
+   // MPPParamBlock thePB;
diff --git a/libfpx/patches/patch-ole_olefiles.cpp b/libfpx/patches/patch-ole_olefiles.cpp
new file mode 100644
index 0000000..ecb1444
--- /dev/null
+++ b/libfpx/patches/patch-ole_olefiles.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+* __unix is not defined on NetBSD, _UNIX is always defined by the build system
+--- ole/olefiles.cpp.orig	2013-09-02 15:45:00.000000000 +0000
++++ ole/olefiles.cpp
+@@ -387,7 +387,7 @@ static OLECHAR * AsciiToOLECHAR(const ch
+         if (filename == NULL)
+                 return NULL;
+ 
+-#if defined(macintosh) || defined(__unix)
++#if defined(macintosh) || defined(_UNIX)
+         // find the length of filename.
+         size_t len = strlen(filename);
+ 


Home | Main Index | Thread Index | Old Index