summaryrefslogtreecommitdiff
path: root/graphics/libfpx/files
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/libfpx/files')
-rw-r--r--graphics/libfpx/files/Makefile.bsd35
-rw-r--r--graphics/libfpx/files/patch-basics::a_file.cpp24
-rw-r--r--graphics/libfpx/files/patch-basics::a_file.h70
-rw-r--r--graphics/libfpx/files/patch-ole::gen_guid.cpp7
4 files changed, 136 insertions, 0 deletions
diff --git a/graphics/libfpx/files/Makefile.bsd b/graphics/libfpx/files/Makefile.bsd
new file mode 100644
index 000000000000..92fa703a2fc1
--- /dev/null
+++ b/graphics/libfpx/files/Makefile.bsd
@@ -0,0 +1,35 @@
+LIB = fpx
+INCS = fpxlib.h
+SHLIB_MAJOR= 1
+SHLIB_MINOR= 2
+
+LIBDIR = ${LOCALBASE}/lib
+INCDIR = ${LOCALBASE}/include
+
+NOPROFILE= Don't want it
+
+CPPS != find ${.CURDIR} -name \*.cpp -print
+# Some of the .cxx files are #include-ed into others, so can't use `find' here:
+OLESS := ascii.cxx cdocfile.cxx chinst.cxx dffuncs.cxx dfiter.cxx \
+ dfstream difat.cxx dir.cxx dirp.cxx docfile.cxx entry.cxx \
+ expdf.cxx expiter expst.cxx fat.cxx funcs.cxx header.cxx \
+ iter.cxx mem.cxx msf msfiter.cxx mstream.cxx page.cxx \
+ refilb.cxx rexpdf.cxx sstream.cxx storage.cxx time.cxx \
+ vect.cxx wchar.c
+JPGS != find ${.CURDIR}/jpeg -name \*.c
+
+CPPS += ${OLESS:S/^/${.CURDIR}\/oless\//} ${JPGS}
+
+SRCS = ${CPPS:T}
+
+CXXFLAGS+= -I${LOCALBASE}/include -D_UNIX
+CXXFLAGS+= -fno-rtti -fno-exceptions
+LDADD += -L${LOCALBASE}/lib -ljpeg
+
+.PATH: ${CPPS:H}
+
+.for d in oless/h jpeg ole basics ri_image oless fpx
+CXXFLAGS+= -I${.CURDIR}/$d
+.endfor
+
+.include <bsd.lib.mk>
diff --git a/graphics/libfpx/files/patch-basics::a_file.cpp b/graphics/libfpx/files/patch-basics::a_file.cpp
new file mode 100644
index 000000000000..f9abb1a75eb7
--- /dev/null
+++ b/graphics/libfpx/files/patch-basics::a_file.cpp
@@ -0,0 +1,24 @@
+--- basics/a_file.cpp Sat Dec 23 17:10:00 2000
++++ basics/a_file.cpp Thu Jan 18 11:37:44 2001
+@@ -29,4 +29,4 @@
+ # include <sys/types.h>
++# include <sys/uio.h>
+ # include <sys/stat.h>
+-# include <sys/statfs.h>
+ # include <sys/ioctl.h>
+--- basics/filename.cpp Sat Dec 23 17:10:00 2000
++++ basics/filename.cpp Thu Jan 18 11:33:35 2001
+@@ -39,3 +39,4 @@
+ # include <sys/stat.h>
+-# include <sys/statfs.h>
++# include <sys/param.h>
++# include <sys/mount.h>
+ # include <stdio.h>
+@@ -424,5 +425,4 @@
+ struct statfs buf;
+- int errNum=0, fstyp;
++ int errNum=0;
+ /* Get file system stats */
+- fstyp=0;
+- errNum = statfs ( ".", &buf, sizeof( struct statfs ), fstyp);
++ errNum = statfs ( ".", &buf);
diff --git a/graphics/libfpx/files/patch-basics::a_file.h b/graphics/libfpx/files/patch-basics::a_file.h
new file mode 100644
index 000000000000..a67744ae5061
--- /dev/null
+++ b/graphics/libfpx/files/patch-basics::a_file.h
@@ -0,0 +1,70 @@
+--- basics/a_file.h Sat Dec 23 17:10:00 2000
++++ basics/a_file.h Thu Jan 18 11:41:58 2001
+@@ -46,12 +46,10 @@
+ // Global Functions
+ // ________________
+
+-#ifdef _WINDOWS
+ uint16 shortswap(uint16); // Swap for Big/Little Endian
+ uint32 longswap(uint32); // Swap for Big/Little Endian
+ # define int32swap longswap
+ # define int16swap shortswap
+-#endif
+
+ // Classes Declarations
+ // --------------------
+@@ -310,7 +308,6 @@
+
+ #ifdef DEFINE_INT32_FUNCTIONS
+
+-#ifdef _WINDOWS
+ inline uint32 longswap( uint32 x )
+ {
+ uint32 a, b;
+@@ -318,7 +315,6 @@
+ b = x & 0x0000ffff;
+ return ( ((uint32)shortswap((uint16)b) << 16) | (uint32)shortswap((uint16)a) );
+ }
+-#endif
+
+ inline Boolean Fichier::Ecriture(int32 ceLong)
+ {
+@@ -376,7 +372,6 @@
+
+
+ // Added by GDN
+-#ifdef _WINDOWS
+ inline uint16 shortswap( uint16 x )
+ {
+ uint16 a, b;
+@@ -384,7 +379,6 @@
+ b = x & 0x00ff;
+ return ( (b << 8) | a );
+ }
+-#endif
+
+ inline Boolean Fichier::Ecriture(short ceShort)
+ {
+@@ -487,9 +481,9 @@
+ inline Boolean Fichier::EcritureTableau(short *array, int32 nshort)
+ {
+ Boolean ret;
+-
++ int32 i;
+ #ifndef __bigEndian
+- for (int32 i = 0; i < nshort; i++)
++ for (i = 0; i < nshort; i++)
+ array[i] = shortswap (array[i]);
+ #endif
+
+@@ -509,8 +503,9 @@
+ inline Boolean Fichier::EcritureTableau( int32 *array, int32 t)
+ {
+ Boolean ret;
++ int32 i;
+ #ifndef __bigEndian
+- for (int32 i = 0; i < t; i++)
++ for (i = 0; i < t; i++)
+ array[i] = int32swap (array[i]);
+ #endif
+
diff --git a/graphics/libfpx/files/patch-ole::gen_guid.cpp b/graphics/libfpx/files/patch-ole::gen_guid.cpp
new file mode 100644
index 000000000000..9f5e1a9cd5db
--- /dev/null
+++ b/graphics/libfpx/files/patch-ole::gen_guid.cpp
@@ -0,0 +1,7 @@
+--- ole/gen_guid.cpp Sat Dec 23 17:12:09 2000
++++ ole/gen_guid.cpp Thu Jan 18 11:46:44 2001
+@@ -55,2 +55,4 @@
+ } timespec;
++#else
++# include <sys/time.h>
+ #endif