Ticket #26705: patch-pg2xbase-port.diff

File patch-pg2xbase-port.diff, 5.4 KB (added by anddam (Andrea D'Amore), 14 years ago)
  • files/patch-pg2xbase-cpp.diff

     
     1--- pg2xbase.cpp.orig   2004-12-10 15:19:07.000000000 +0100
     2+++ pg2xbase.cpp        2010-10-03 01:32:34.000000000 +0200
     3@@ -44,7 +44,8 @@
     4 #include <sstream>
     5 #include <string>
     6 #include <strings.h>
     7-#include <xbase.h>
     8+#include <fcntl.h>
     9+#include <xbase64/xbase64.h>
     10 #include <strings.h>
     11 #include <libpq-fe.h>
     12 #include <postgres_fe.h>
  • files/patch-xbase2pg-cpp.diff

     
     1--- xbase2pg.cpp.orig   2010-10-03 01:13:32.000000000 +0200
     2+++ xbase2pg.cpp        2010-10-03 01:14:38.000000000 +0200
     3@@ -38,7 +38,9 @@
     4 #include <sstream>
     5 #include <string>
     6 #include <strings.h>
     7-#include <xbase.h>
     8+#include <fcntl.h>
     9+#include <sys/types.h>
     10+#include <xbase64/xbase64.h>
     11 #include <errno.h>
     12 #include <libpq-fe.h>
     13 #include "xbase2pg.hh"
  • files/patch-xbasenew-cpp.diff

     
     1--- xbasenew.cpp.orig   2010-10-03 01:20:36.000000000 +0200
     2+++ xbasenew.cpp        2010-10-03 01:21:37.000000000 +0200
     3@@ -31,7 +31,8 @@
     4  #endif
     5  #include <unistd.h>
     6 #endif
     7-#include <xbase.h>
     8+#include <fcntl.h>
     9+#include <xbase64/xbase64.h>
     10 #include <strings.h>
     11 #include "xbase2pg.hh"
     12 
  • files/patch-Makefile.diff

     
     1--- Makefile.orig       2004-06-02 11:36:58.000000000 +0200
     2+++ Makefile    2010-10-03 01:33:55.000000000 +0200
     3@@ -1,6 +1,6 @@
     4 # vim: set noexpandtab :
     5 
     6-INCLUDES = -I/usr/local/include -I/usr/include/pgsql -I/usr/include/pgsql/internal -I/usr/local/pgsql/include/internal -I/usr/include/xbase -I/usr/local/pgsql/include -I/usr/local/include/xbase
     7+INCLUDES = -I/opt/local/include -I/opt/local/include/postgresql81 -I/opt/local/include/postgresql81/internal -I/opt/local/include/xbase64
     8 OPTIMIZE=-O2
     9 CFLAGS = -g -Wall $(OPTIMIZE)
     10 CFLAGS += -Wno-deprecated
     11@@ -8,7 +8,7 @@
     12 #CFLAGS = -g -ggdb -Wall
     13 # for xbase sys/locking problem in 1.8.0a
     14 CFLAGS += -DHAVE_CONFIG_H
     15-LIBS = -L/usr/local/pgsql/lib -lpq -lxbase
     16+LIBS = -L/opt/local/lib -L/opt/local/lib/postgresql81 -lpq -lxbase64
     17 
     18 ifeq ($(OSTYPE),solaris)
     19 # uncomment for Solaris
     20@@ -16,9 +16,9 @@
     21 prefix=/usr/local
     22 else
     23 # -- LINUX DEFS --
     24-LIBS += -lcrypt
     25-CFLAGS += -DLINUX
     26-prefix=/usr
     27+#LIBS += -lcrypt
     28+#CFLAGS += -DLINUX
     29+prefix=/opt/local
     30 endif
     31 
     32 # CFLAGS += -static
     33@@ -60,9 +60,9 @@
     34        tar cvf - README INSTALL COPYING-2.0 *.h *.hh *.cpp *.1 convenctable Makefile | gzip -c > xbase2pg.tgz
     35 
     36 install: xbase2pg pg2xbase xbasenew xbaseconv
     37-       mkdir -p $(prefix)/bin/ $(prefix)/man/man1/
     38+       mkdir -p $(prefix)/bin/ $(prefix)/share/man/man1/
     39        mkdir -p $(prefix)/share/pg2xbase
     40        $(CP) $(PROGS) $(prefix)/bin/
     41        $(CP) convenctable $(convtable)
     42-       $(CP) xbase2pg.1 pg2xbase.1 xbaseconv.1 xbasenew.1 $(prefix)/man/man1/
     43+       $(CP) xbase2pg.1 pg2xbase.1 xbaseconv.1 xbasenew.1 $(prefix)/share/man/man1/
     44       
  • files/patch-xbaseconv-cpp.diff

     
     1--- xbaseconv.cpp.orig  2010-10-03 01:20:54.000000000 +0200
     2+++ xbaseconv.cpp       2010-10-03 01:21:44.000000000 +0200
     3@@ -30,7 +30,8 @@
     4 #include <fstream>
     5 #include <sstream>
     6 #include <string>
     7-#include <xbase.h>
     8+#include <fcntl.h>
     9+#include <xbase64/xbase64.h>
     10 #include <strings.h>
     11 #include <ctype.h>
     12 #include <unistd.h>
  • Portfile

     
    88platforms               darwin
    99maintainers             gmail.com:seanasy
    1010description             Convert data between PostgreSQL and DBF files
    11 long_description        pg2xbase provides utilities for converting between PostgreSQL databases and DBF files.
     11long_description        pg2xbase provides utilities for converting between \
     12    PostgreSQL databases and DBF files.
     13   
     14homepage       
     15depends_lib             port:postgresql81 port:xbase
    1216
    13 homepage                http://www.klaban.torun.pl/prog/pg2xbase/
    1417master_sites            ${homepage}
    1518
    16 extract.suffix          .tgz
    1719checksums               sha1 695625b19bea40748916c9e4c4185e82bdb808cc
    1820
    19 depends_lib             port:postgresql81 port:xbase
     21extract.suffix  .tgz
     22post-extract {
     23    #get rid of ELF binaries(!) extracted from tarball
     24    system "cd ${worksrcpath} && make clean"
     25}
    2026
     27patchfiles      patch-pg2xbase-cpp.diff \
     28                patch-xbase2pg-cpp.diff \
     29                patch-xbaseconv-cpp.diff \
     30                patch-xbasenew-cpp.diff \
     31                patch-Makefile.diff
     32
     33post-patch {
     34    reinplace "s|@@PREFIX@@|${prefix}|g"   ${worksrcpath}/Makefile
     35}
     36
    2137use_configure           no
     38use_parallel_build  no
    2239
    23 build.args              INCLUDES="-I${prefix}/include -I${prefix}/include/postgresql81  -I${prefix}/include/postgresql81/internal  -I${prefix}/include/xbase" \
    24                         LIBS="-L${prefix}/lib -L${prefix}/lib/postgresql81 -lpq -lxbase"
    25 
    2640destroot.destdir        prefix=${destroot}${prefix}