-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[librttopo]new port #15037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
BillyONeal
merged 15 commits into
microsoft:master
from
longhuan2018:new-port-librttopo
Dec 18, 2020
Merged
[librttopo]new port #15037
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c184526
new port librttopo
longhuan2018 7d61f8c
Update ports/librttopo/CONTROL
longhuan2018 d2988ed
Update ports/librttopo/portfile.cmake
longhuan2018 17dc03a
Update fix-geoconfig.patch
longhuan2018 6905820
Update fix-geoconfig.patch
longhuan2018 54dba07
Update portfile.cmake
longhuan2018 1040d06
Update vcpkg-cmake-wrapper.cmake
longhuan2018 18c6d9f
Update portfile.cmake
longhuan2018 839af2c
remove vcpkg-cmake-wrapper.cmake and usage
longhuan2018 a6eb085
Update ports/librttopo/portfile.cmake
longhuan2018 ed4b1fa
Update portfile.cmake
longhuan2018 c3c27d1
ONLY_STATIC_LIBRARY
longhuan2018 00d2c30
Update ports/librttopo/portfile.cmake
longhuan2018 729c827
Update ports/librttopo/portfile.cmake
longhuan2018 e4eed0f
Update ports/librttopo/portfile.cmake
longhuan2018 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Source: librttopo | ||
| Version: 1.1.0-2 | ||
| Homepage: https://git.osgeo.org/gitea/rttopo/librttopo | ||
| Description: The RT Topology Library exposes an API to create and manage standard (ISO 13249 aka SQL/MM) topologies using user-provided [data stores] (doc/DATASTORES.md) and released under the GNU GPL license (version 2 or later). | ||
| Build-Depends: geos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| diff --git a/configure.ac b/configure.ac | ||
| index a9561069c..7adef1bf5 100644 | ||
| --- a/configure.ac | ||
| +++ b/configure.ac | ||
| @@ -87,6 +87,7 @@ AC_CONFIG_FILES([Makefile \ | ||
| #----------------------------------------------------------------------- | ||
| # --with-geosconfig | ||
| # | ||
| +if 0; then | ||
| AC_ARG_WITH([geosconfig], | ||
| [AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])], | ||
| [GEOSCONFIG="$withval"], [GEOSCONFIG=""]) | ||
| @@ -112,6 +113,7 @@ fi | ||
| # Extract the linker and include flags | ||
| GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` | ||
| GEOS_CFLAGS=-I`$GEOSCONFIG --includes` | ||
| +fi | ||
| AC_SUBST([GEOS_LDFLAGS]) | ||
| AC_SUBST([GEOS_CFLAGS]) | ||
| # Ensure that we can parse geos_c.h | ||
| @@ -120,6 +122,7 @@ CPPFLAGS="$GEOS_CFLAGS" | ||
| AC_CHECK_HEADERS([geos_c.h],, [AC_MSG_ERROR([could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig])]) | ||
| CPPFLAGS="$CPPFLAGS_SAVE" | ||
| # Ensure we can link against libgeos_c | ||
| +if 0; then | ||
| LIBS_SAVE="$LIBS" | ||
| LIBS="$GEOS_LDFLAGS" | ||
| AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.5.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig])) | ||
| @@ -127,6 +130,8 @@ LIBS="$LIBS_SAVE" | ||
| LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c" | ||
| GEOS_MAJOR_VERSION=`$GEOSCONFIG --version | cut -d. -f1 | sed 's/[[^0-9]]//g'` | ||
| GEOS_MINOR_VERSION=`$GEOSCONFIG --version | cut -d. -f2 | sed 's/[[^0-9]]//g'` | ||
| +fi | ||
| +LIBS="$LIBS $GEOS_LDFLAGS" | ||
| RTGEOM_GEOS_VERSION="$GEOS_MAJOR_VERSION$GEOS_MINOR_VERSION" | ||
| AC_DEFINE_UNQUOTED([RTGEOM_GEOS_VERSION], [$RTGEOM_GEOS_VERSION], [GEOS library version]) | ||
| AC_SUBST([RTGEOM_GEOS_VERSION]) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| diff --git a/makefile.vc b/makefile.vc | ||
| index 1f790f0de..2f7e00f7b 100644 | ||
| --- a/makefile.vc | ||
| +++ b/makefile.vc | ||
| @@ -17,11 +17,11 @@ LIBOBJ = src\box2d.obj src\bytebuffer.obj src\g_box.obj \ | ||
| src\rtout_kml.obj src\rtout_svg.obj src\rtout_twkb.obj src\rtout_wkb.obj \ | ||
| src\rtout_wkt.obj src\rtout_x3d.obj src\rtpoint.obj src\rtpoly.obj src\rtprint.obj \ | ||
| src\rtpsurface.obj src\rtspheroid.obj src\rtstroke.obj src\rttin.obj src\rttree.obj \ | ||
| - src\rttriangle.obj src\rtutil.obj src\stringbuffer.obj src\varint.obj | ||
| + src\rttriangle.obj src\rtutil.obj src\stringbuffer.obj src\varint.obj src\rtt_tpsnap.obj | ||
|
|
||
| LIBRTTOPO_DLL = librttopo$(VERSION).dll | ||
|
|
||
| -CFLAGS = /nologo -IC:\OSGeo4W\include -I. -Iheaders $(OPTFLAGS) | ||
| +CFLAGS = /nologo -I. -Iheaders $(OPTFLAGS) | ||
|
|
||
| default: all | ||
|
|
||
|
|
||
| diff --git a/nmake.opt b/nmake.opt | ||
| index 938979df1..ea80dab00 100644 | ||
| --- a/nmake.opt | ||
| +++ b/nmake.opt | ||
| @@ -1,9 +1,8 @@ | ||
| # Directory tree where RTTOPO will be installed. | ||
| -INSTDIR=C:\OSGeo4W | ||
| +INSTDIR=$(INSTALLDIR) | ||
|
|
||
| # Uncomment the first for an optimized build, or the second for debug. | ||
| -OPTFLAGS= /nologo /Ox /fp:precise /W4 /MD /D_CRT_SECURE_NO_WARNINGS \ | ||
| - /DDLL_EXPORT | ||
| +OPTFLAGS= /nologo /fp:precise /W4 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS | ||
| #OPTFLAGS= /nologo /Zi /MD /Fdlibrttopo.pdb /DDLL_EXPORT | ||
|
|
||
| # Set the version number for the DLL. Normally we leave this blank since |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| vcpkg_check_linkage(ONLY_STATIC_LIBRARY) | ||
|
|
||
| # NOTE: update the version and checksum for new LIBRTTOPO release | ||
| set(LIBRTTOPO_VERSION_STR "1.1.0-2") | ||
| set(LIBRTTOPO_PACKAGE_SUM "cc2f646dd9ac3099c77e621984cdd2baa676ed1d8e6aaa9642afe2855e6fdef585603cc052ca09084204a1325e38bb626133072fbb5080e8adc369cc4854c40e") | ||
|
|
||
| vcpkg_download_distfile(ARCHIVE | ||
| URLS "https://salsa.debian.org/debian-gis-team/librttopo/-/archive/debian/${LIBRTTOPO_VERSION_STR}/librttopo-debian-${LIBRTTOPO_VERSION_STR}.tar.gz" | ||
| FILENAME "librttopo${LIBRTTOPO_VERSION_STR}.zip" | ||
| SHA512 ${LIBRTTOPO_PACKAGE_SUM} | ||
| ) | ||
|
|
||
| vcpkg_extract_source_archive_ex( | ||
| ARCHIVE ${ARCHIVE} | ||
| OUT_SOURCE_PATH SOURCE_PATH | ||
| PATCHES | ||
| fix-makefiles.patch | ||
| fix-geoconfig.patch | ||
| ) | ||
|
|
||
| if (VCPKG_TARGET_IS_WINDOWS) | ||
| set(SRID_MAX 999999) | ||
| set(SRID_USR_MAX 998999) | ||
JackBoosY marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| configure_file(${CMAKE_CURRENT_LIST_DIR}/rttopo_config.h.in ${SOURCE_PATH}/src/rttopo_config.h @ONLY) | ||
| configure_file(${SOURCE_PATH}/headers/librttopo_geom.h.in ${SOURCE_PATH}/headers/librttopo_geom.h @ONLY) | ||
|
|
||
| vcpkg_build_nmake( | ||
| SOURCE_PATH ${SOURCE_PATH} | ||
| TARGET librttopo.lib | ||
| ) | ||
|
|
||
| file(GLOB LIBRTTOPO_INCLUDE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/headers/*.h) | ||
| file(COPY ${LIBRTTOPO_INCLUDE} DESTINATION ${CURRENT_PACKAGES_DIR}/include) | ||
|
|
||
| file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/librttopo.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) | ||
| file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/librttopo.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) | ||
| elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) # Build in UNIX | ||
| vcpkg_configure_make( | ||
| SOURCE_PATH ${SOURCE_PATH} | ||
| AUTOCONFIG | ||
| OPTIONS | ||
| "GEOS_MAJOR_VERSION=3" | ||
| "GEOS_MINOR_VERSION=8" | ||
| OPTIONS_DEBUG | ||
| "GEOS_LDFLAGS=-lgeos_cd -lgeosd -lm" | ||
| OPTIONS_RELEASE | ||
| "GEOS_LDFLAGS=-lgeos_c -lgeos -lm" | ||
| ) | ||
|
|
||
| vcpkg_install_make() | ||
| endif() | ||
|
|
||
| # Handle copyright | ||
| file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,168 @@ | ||
| /* src/rttopo_config.h. Generated from rttopo_config.h.in by configure. */ | ||
| /* src/rttopo_config.h.in. Generated from configure.ac by autoheader. */ | ||
|
|
||
| /* Define to 1 if you have the <assert.h> header file. */ | ||
| #define HAVE_ASSERT_H 1 | ||
|
|
||
| /* Define to 1 if you have the <ctype.h> header file. */ | ||
| #define HAVE_CTYPE_H 1 | ||
|
|
||
| /* Define to 1 if you have the <dlfcn.h> header file. */ | ||
| #define HAVE_DLFCN_H 1 | ||
|
|
||
| /* Define to 1 if you have the <errno.h> header file. */ | ||
| #define HAVE_ERRNO_H 1 | ||
|
|
||
| /* Define to 1 if you have the `fdatasync' function. */ | ||
| #define HAVE_FDATASYNC 1 | ||
|
|
||
| /* Define to 1 if you have the <float.h> header file. */ | ||
| #define HAVE_FLOAT_H 1 | ||
|
|
||
| /* Define to 1 if you have the `ftruncate' function. */ | ||
| #define HAVE_FTRUNCATE 1 | ||
|
|
||
| /* Define to 1 if you have the <geos_c.h> header file. */ | ||
| #define HAVE_GEOS_C_H 1 | ||
|
|
||
| /* Define to 1 if you have the `getcwd' function. */ | ||
| #define HAVE_GETCWD 1 | ||
|
|
||
| /* Define to 1 if you have the `gettimeofday' function. */ | ||
| #define HAVE_GETTIMEOFDAY 1 | ||
|
|
||
| /* Define to 1 if you have the <inttypes.h> header file. */ | ||
| #define HAVE_INTTYPES_H 1 | ||
|
|
||
| /* Define to 1 if you have the `localtime_r' function. */ | ||
| #define HAVE_LOCALTIME_R 1 | ||
|
|
||
| /* Define to 1 if `lstat' has the bug that it succeeds when given the | ||
| zero-length file name argument. */ | ||
| /* #undef HAVE_LSTAT_EMPTY_STRING_BUG */ | ||
|
|
||
| /* Define to 1 if you have the <math.h> header file. */ | ||
| #define HAVE_MATH_H 1 | ||
|
|
||
| /* Define to 1 if you have the `memmove' function. */ | ||
| #define HAVE_MEMMOVE 1 | ||
|
|
||
| /* Define to 1 if you have the <memory.h> header file. */ | ||
| #define HAVE_MEMORY_H 1 | ||
|
|
||
| /* Define to 1 if you have the `memset' function. */ | ||
| #define HAVE_MEMSET 1 | ||
|
|
||
| /* Define to 1 if you have the `sqrt' function. */ | ||
| /* #undef HAVE_SQRT */ | ||
|
|
||
| /* Define to 1 if `stat' has the bug that it succeeds when given the | ||
| zero-length file name argument. */ | ||
| /* #undef HAVE_STAT_EMPTY_STRING_BUG */ | ||
|
|
||
| /* Define to 1 if you have the <stdarg.h> header file. */ | ||
| #define HAVE_STDARG_H 1 | ||
|
|
||
| /* Define to 1 if you have the <stdint.h> header file. */ | ||
| #define HAVE_STDINT_H 1 | ||
|
|
||
| /* Define to 1 if you have the <stdio.h> header file. */ | ||
| #define HAVE_STDIO_H 1 | ||
|
|
||
| /* Define to 1 if you have the <stdlib.h> header file. */ | ||
| #define HAVE_STDLIB_H 1 | ||
|
|
||
| /* Define to 1 if you have the `strcasecmp' function. */ | ||
| #define HAVE_STRCASECMP 1 | ||
|
|
||
| /* Define to 1 if you have the `strerror' function. */ | ||
| #define HAVE_STRERROR 1 | ||
|
|
||
| /* Define to 1 if you have the `strftime' function. */ | ||
| #define HAVE_STRFTIME 1 | ||
|
|
||
| /* Define to 1 if you have the <strings.h> header file. */ | ||
| #define HAVE_STRINGS_H 1 | ||
|
|
||
| /* Define to 1 if you have the <string.h> header file. */ | ||
| #define HAVE_STRING_H 1 | ||
|
|
||
| /* Define to 1 if you have the `strncasecmp' function. */ | ||
| #define HAVE_STRNCASECMP 1 | ||
|
|
||
| /* Define to 1 if you have the `strstr' function. */ | ||
| #define HAVE_STRSTR 1 | ||
|
|
||
| /* Define to 1 if you have the <sys/stat.h> header file. */ | ||
| #define HAVE_SYS_STAT_H 1 | ||
|
|
||
| /* Define to 1 if you have the <sys/types.h> header file. */ | ||
| #define HAVE_SYS_TYPES_H 1 | ||
|
|
||
| /* Define to 1 if you have the <unistd.h> header file. */ | ||
| #define HAVE_UNISTD_H 1 | ||
|
|
||
| /* rtgeom version */ | ||
| #define LIBRTGEOM_VERSION "1.1.0" | ||
|
|
||
| /* Define to 1 if `lstat' dereferences a symlink specified with a trailing | ||
| slash. */ | ||
| #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | ||
|
|
||
| /* Define to the sub-directory where libtool stores uninstalled libraries. */ | ||
| #define LT_OBJDIR ".libs/" | ||
|
|
||
| /* Must be defined in order to disable debug mode. */ | ||
| #undef NDEBUG | ||
|
|
||
| /* Name of package */ | ||
| #define PACKAGE "librttopo" | ||
|
|
||
| /* Define to the address where bug reports for this package should be sent. */ | ||
| #define PACKAGE_BUGREPORT "strk@kbt.io" | ||
|
|
||
| /* Define to the full name of this package. */ | ||
| #define PACKAGE_NAME "librttopo" | ||
|
|
||
| /* Define to the full name and version of this package. */ | ||
| #define PACKAGE_STRING "librttopo 1.1.0" | ||
|
|
||
| /* Define to the one symbol short name of this package. */ | ||
| #define PACKAGE_TARNAME "librttopo" | ||
|
|
||
| /* Define to the home page for this package. */ | ||
| #define PACKAGE_URL "" | ||
|
|
||
| /* Define to the version of this package. */ | ||
| #define PACKAGE_VERSION "1.1.0" | ||
|
|
||
| /* RTGEOM Debug level */ | ||
| #define RTGEOM_DEBUG_LEVEL 0 | ||
|
|
||
| /* GEOS library version */ | ||
| #define RTGEOM_GEOS_VERSION 38 | ||
|
|
||
| /* Define to 1 if you have the ANSI C header files. */ | ||
| #define STDC_HEADERS 1 | ||
|
|
||
| /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | ||
| #define TIME_WITH_SYS_TIME 1 | ||
|
|
||
| /* Define to 1 if your <sys/time.h> declares `struct tm'. */ | ||
| /* #undef TM_IN_SYS_TIME */ | ||
|
|
||
| /* Version number of package */ | ||
| #define VERSION "1.1.0" | ||
|
|
||
| /* Define to empty if `const' does not conform to ANSI C. */ | ||
| /* #undef const */ | ||
|
|
||
| /* Define to `long int' if <sys/types.h> does not define. */ | ||
| /* #undef off_t */ | ||
|
|
||
| /* Define to `unsigned int' if <sys/types.h> does not define. */ | ||
| /* #undef size_t */ | ||
|
|
||
| /* Define to empty if the keyword `volatile' does not work. Warning: valid | ||
| code using `volatile' can become incorrect without. Disable with care. */ | ||
| /* #undef volatile */ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.