[postgis-users] Patch for PostGIS CVS on Windows

Jean David TECHER davidtecher at yahoo.fr
Fri Jul 1 02:06:21 PDT 2005


Hi Sandro

Even if I can't use 1.0.?rc? I've just tried PostGIS CVS

I needed to do few changes in 

postgis/Makefile.config.in
postgis/lwgeom/Makefile
postgis/lwgeom/Makefile.shlib

I was not able to use iconv on MinGW for supoort utf-8 for shp2pgsql.


For using the patch, copy it in the same directory of your postgis' directory then

patch -p0 < patch.diff

It's better to have (binairies of)  Geos, Proj and PostgreSQL in a same directory...example c:\PostgreSQL\8.0.3 or something else...)

Then for your environment variable path, just add at the beginning of your path

PATH = C:\PostgreSQL\8.0.3\bin;C:\PostgeSQL\lib;....

or do from MinGW

export PATH=/c/PostgreSQL/8.0.3/bin:/c/PostgreSQL/8.0.9/lib:$PATH before compiling postgis from cvs

Have fun!!!
---------------------[patch.diff]----------------------------------------------------------------------
diff -cr postgis/Makefile.config.in postgis/Makefile.config.in
*** postgis/Makefile.config.in Tue Jun 28 11:33:47 2005
--- postgis/Makefile.config.in Fri Jul  1 07:48:32 2005
***************
*** 64,70 ****
  # Set USE_ICONV to 1 if you want the loader (shp2pgsql)
  # to support UTF-8 output.
  #
! USE_ICONV=@USE_ICONV@
  
  #
  # PGSQL
--- 64,70 ----
  # Set USE_ICONV to 1 if you want the loader (shp2pgsql)
  # to support UTF-8 output.
  #
! USE_ICONV=0
  
  #
  # PGSQL
diff -cr postgis/lwgeom/Makefile postgis/lwgeom/Makefile
*** postgis/lwgeom/Makefile Tue Jun 28 14:51:18 2005
--- postgis/lwgeom/Makefile Fri Jul  1 06:59:28 2005
***************
*** 139,146 ****
   @mkdir -p $(DESTDIR)$(MODULE_INSTALLDIR)
   $(INSTALL_LIB) $(SHLIB) $(DESTDIR)$(MODULE_INSTALLDIR)/$(SHLIB)
  
! ifneq ($(PORTNAME), cygwin)
! ifneq ($(PORTNAME), win32)
  ifneq ($(PORTNAME), win)
  ifneq ($(SHLIB), $(SHLIB_MAJOR))
   cd $(DESTDIR)$(MODULE_INSTALLDIR) && \
--- 139,146 ----
   @mkdir -p $(DESTDIR)$(MODULE_INSTALLDIR)
   $(INSTALL_LIB) $(SHLIB) $(DESTDIR)$(MODULE_INSTALLDIR)/$(SHLIB)
  
! #ifneq ($(PORTNAME), cygwin)
! #ifneq ($(PORTNAME), win32)
  ifneq ($(PORTNAME), win)
  ifneq ($(SHLIB), $(SHLIB_MAJOR))
   cd $(DESTDIR)$(MODULE_INSTALLDIR) && \
***************
*** 153,160 ****
   ln -sf $(SHLIB) $(SHLIB_BARE)
  endif
  endif # not win
! endif # not win32
! endif # not cygwin
  
  uninstall-lwgeom-lib: 
   rm -f $(DESTDIR)$(MODULE_INSTALLDIR)/$(SHLIB)
--- 153,160 ----
   ln -sf $(SHLIB) $(SHLIB_BARE)
  endif
  endif # not win
! #endif # not win32
! #endif # not cygwin
  
  uninstall-lwgeom-lib: 
   rm -f $(DESTDIR)$(MODULE_INSTALLDIR)/$(SHLIB)
diff -cr postgis/lwgeom/Makefile.shlib postgis/lwgeom/Makefile.shlib
*** postgis/lwgeom/Makefile.shlib Tue Jun  7 07:51:08 2005
--- postgis/lwgeom/Makefile.shlib Fri Jul  1 06:52:43 2005
***************
*** 230,236 ****
  endif
  
  ifeq ($(PORTNAME), win32)
!   shlib   = lib$(NAME)$(DLSUFFIX)
    haslibarule   = yes
  endif
  
--- 230,238 ----
  endif
  
  ifeq ($(PORTNAME), win32)
!   DLLTOOL = dlltool
!   DLLWRAP = dllwrap
!   shlib   = lib$(NAME).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)$(DLSUFFIX)
    haslibarule   = yes
  endif
  
***************
*** 335,341 ****
  $(shlib) lib$(NAME).a: $(OBJS)
  ifndef DLL_DEFFILE
   $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
!  $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
   $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
  else
   $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK)
--- 337,343 ----
  $(shlib) lib$(NAME).a: $(OBJS)
  ifndef DLL_DEFFILE
   $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
!  $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK) $(PGBELIBS)
   $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
  else
   $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK)

---------------------------------------------------------------
TECHER Jean David
01MAP
e-mail: david at 01map.net
Tél: 04 67 45 60 27
Entreprise: http://www.01map.net
Perso: http://techer.pascal.free.fr/postgis/
---------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050701/6d0ed61a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 3199 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050701/6d0ed61a/attachment.obj>


More information about the postgis-users mailing list