[geos-devel] astyle followup

2019-05-22 Thread Sandro Santilli
As I noticed astyle was recently included in the GEOS source tree
(tools/astyle) I thought I'd move another little step in the
direction of having some style enforced by tools.

Result of this excercise was the creation of an astyle wrapper
which landed in tools/astyle.sh that you can pass a list of files
to operate one.

For a test I run it against all the .cpp files in our tree,
except for astyle/ source code itself. The resulting stats:

 317 files changed, 7672 insertions(+), 7634 deletions(-)

Of those 317 files changed:

  120 have less than 10 lines changed
  179 have more than 10 but less than 100 lines changed
   12 have more than 100 lines changed

Those 12 "big offenders" are, in order of lines changed:

   src/operation/polygonize/PolygonizeGraph.cpp   |  100 +-
   src/triangulate/quadedge/QuadEdgeSubdivision.cpp   |  100 +-
   src/io/WKTReader.cpp   |  102 +-
   src/operation/distance/DistanceOp.cpp  |  102 +-
   src/io/WKTWriter.cpp   |  106 +-
   src/geom/GeometryFactory.cpp   |  120 +-
   tests/unit/operation/polygonize/PolygonizeTest.cpp |  120 +-
   src/operation/valid/IsValidOp.cpp  |  136 +-
   src/operation/overlay/OverlayOp.cpp|  140 +-
   src/geom/Geometry.cpp  |  146 +-
   .../intersection/RectangleIntersection.cpp |  148 +-
   src/operation/valid/MakeValid.cpp  |  148 +-
   src/algorithm/LineIntersector.cpp  |  202 +-
   doc/example.cpp|  230 +-
   tests/xmltester/XMLTester.cpp  |  500 ++-
   capi/geos_ts_c.cpp | 1642 -
   tests/xmltester/tinyxml2/tinyxml2.cpp  | 1939 +--
   tests/xmltester/Stackwalker.cpp| 3511 
++--

I found out that the astyle configuration will NOT touch multi-line
comments, so style drifts in alignment of `*' symbols in those blocks
won't be fixed.

I think we could play with astyle configuration and see which options
give us the less changes. For example I found that dropping --pad-header
gives us less changes:

 24 files changed, 3056 insertions(+), 3019 deletions(-)


--strk;

  ()   Free GIS & Flash consultant/developer
  /\   https://strk.kbt.io/services.html
___
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

Re: [geos-devel] [GEOS] #971: @GEOS_VERSION@ not being replaced

2019-05-22 Thread GEOS
#971: @GEOS_VERSION@ not being replaced
--+--
 Reporter:  robe  |   Owner:  pramsey
 Type:  defect|  Status:  new
 Priority:  major |   Milestone:  3.8.0
Component:  Default   | Version:  master
 Severity:  Critical  |  Resolution:
 Keywords:|
--+--
Changes (by robe):

 * owner:  geos-devel@… => pramsey


-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

[geos-devel] PHP Bindings fir Windows 10 with Wamp and PHP 7.x

2019-05-22 Thread Tim Balschmiter
Hi Community,

The php-bindings of Sandro (https://git.osgeo.org/gitea/geos/php-geos)
is working finde on my ubuntu system, but i can´t get it work on Windows
10.
I´ve installe geos with the OSGeo4W-Package and i´ve install wamp with
php 7.3.1 (the same as on my ubuntu). Now, i installed cygwin (as an
building tool).

Maybe one of you can help me by building it on Win10 or has a
PHP-Bindingpackage, which is working on Winows10.

When i run: $ ./autogen.sh, i get the following output:
Configuring for:
PHP Api Version: 20180731
Zend Module Api No:  20180731
Zend Extension Api No:   320180731

After this i´m getting the following by runing ./configure  :
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-cygwin
checking host system type... x86_64-pc-cygwin
checking target system type... x86_64-pc-cygwin
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20180731
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to
regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable geos support... yes, shared
checking for geos-config... yes, shared
checking for geos-config... no
configure: error: Cannot find geos_c.h. Please specify correct GEOS
installation path

i do not find the place to configure the path for geos_c.h . Maybe you
can help me.
In my opinion a lot of people are interessted in a solution ;-).



thanks a lot for reading my mail
best regards
Tim

p.s. i only need it for desktop pc, where i can not change the OS.



___
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

Re: [geos-devel] [GEOS] #971: @GEOS_VERSION@ not being replaced

2019-05-22 Thread GEOS
#971: @GEOS_VERSION@ not being replaced
--+---
 Reporter:  robe  |   Owner:  geos-devel@…
 Type:  defect|  Status:  new
 Priority:  major |   Milestone:  3.8.0
Component:  Default   | Version:  master
 Severity:  Critical  |  Resolution:
 Keywords:|
--+---

Comment (by robe):

 I should add that the geos 3.7 geos-config last installed 5/2 looks like
 this, see the difference?

 {{{
 #!/bin/sh
 prefix=/var/lib/jenkins/workspace/geos/rel-3.7w64
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib

 usage()
 {
 cat <&2
 fi
 while test $# -gt 0; do
 case "$1" in
 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
 *) optarg= ;;
 esac
 case $1 in
 --prefix)
 echo ${prefix}
  ;;
 --version)
 echo 3.7.3dev
  ;;
 --cflags)
 echo -I${prefix}/include
   ;;
 --libs)
   # TODO: make an alias for --clibs
   # see http://trac.osgeo.org/geos/ticket/497
   echo -L${libdir} -lgeos-3.7.3
   ;;
 --clibs)
   echo -L${libdir} -lgeos_c
   ;;
 --cclibs)
   echo -L${libdir} -lgeos
   ;;
 --static-clibs)
   echo -L${libdir} -lgeos_c -lgeos -lm
   ;;
 --static-cclibs)
   echo -L${libdir} -lgeos -lm
   ;;
 --ldflags)
   echo -L${libdir}
   ;;
 --includes)
   echo ${prefix}/include
   ;;
 --jtsport)
 echo 1.13.0
   ;;
 *)
   usage 1 1>&2
   ;;
   esac
   shift
 done

 }}}

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

Re: [geos-devel] [GEOS] #971: @GEOS_VERSION@ not being replaced

2019-05-22 Thread GEOS
#971: @GEOS_VERSION@ not being replaced
--+---
 Reporter:  robe  |   Owner:  geos-devel@…
 Type:  defect|  Status:  new
 Priority:  major |   Milestone:  3.8.0
Component:  Default   | Version:  master
 Severity:  Critical  |  Resolution:
 Keywords:|
--+---

Comment (by robe):

 Correct strk, but it's because of GEOS that debbie's postgis builds are
 failing because PostGIS is expecting GEOS 3.6 or greater, and debbie is
 running against GEOS trunk (head) and the geos-config that got installed
 is all screwed up.  No variables got replaced.

 this is the output of geos-config that got installed:


 {{{
 #!/bin/sh

 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
 libdir=@CMAKE_INSTALL_PREFIX@/lib

 usage()
 {
 cat <&2
 fi

 while test $# -gt 0; do
 case "$1" in
 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
 *) optarg= ;;
 esac
 case $1 in
 --prefix)
   echo @CMAKE_INSTALL_PREFIX@
   ;;
 --version)
   echo @GEOS_VERSION@
   ;;
 --cflags)
   echo -I@CMAKE_INSTALL_PREFIX@/include
   ;;
 --libs)
   echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos-@GEOS_VERSION_MAJOR@
   ;;
 --clibs)
   echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos_c
   ;;
 --cclibs)
   echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos
   ;;
 --static-clibs)
   echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos_c -lgeos -lm
   ;;
 --static-cclibs)
   echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos -lm
   ;;
 --ldflags)
   echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos
   ;;
 --includes)
   echo @CMAKE_INSTALL_PREFIX@/include
   ;;
 --jtsport)
 echo 1.13.0
   ;;
 *)
   usage 1 1>&2
   ;;
   esac
   shift
 done

 }}}

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

Re: [geos-devel] [GEOS] #971: @GEOS_VERSION@ not being replaced

2019-05-22 Thread GEOS
#971: @GEOS_VERSION@ not being replaced
--+---
 Reporter:  robe  |   Owner:  geos-devel@…
 Type:  defect|  Status:  new
 Priority:  major |   Milestone:  3.8.0
Component:  Default   | Version:  master
 Severity:  Critical  |  Resolution:
 Keywords:|
--+---

Comment (by strk):

 I'm confused, you're showing what look like being PostGIS build
 output, not GEOS'...

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel