early-access version 2853
This commit is contained in:
48
externals/vcpkg/ports/readosm/fix-makefiles.patch
vendored
Executable file
48
externals/vcpkg/ports/readosm/fix-makefiles.patch
vendored
Executable file
@@ -0,0 +1,48 @@
|
||||
diff --git a/makefile.vc b/makefile.vc
|
||||
index 8edb536b9..33fd83e35 100644
|
||||
--- a/makefile.vc
|
||||
+++ b/makefile.vc
|
||||
@@ -8,7 +8,7 @@ LIBOBJ = src\readosm.obj src\osmxml.obj \
|
||||
src\protobuf.obj src\osm_objects.obj
|
||||
READOSM_DLL = readosm$(VERSION).dll
|
||||
|
||||
-CFLAGS = /nologo -I. -Iheaders -IC:\OSGeo4W\include $(OPTFLAGS)
|
||||
+CFLAGS = /nologo -I. -Iheaders -I$(INSTALLED_ROOT)\include $(OPTFLAGS)
|
||||
|
||||
default: all
|
||||
|
||||
@@ -21,9 +21,9 @@ readosm.lib: $(LIBOBJ)
|
||||
$(READOSM_DLL): readosm_i.lib
|
||||
|
||||
readosm_i.lib: $(LIBOBJ)
|
||||
- link /dll /out:$(READOSM_DLL) \
|
||||
+ link $(LINK_FLAGS) /dll /out:$(READOSM_DLL) \
|
||||
/implib:readosm_i.lib $(LIBOBJ) \
|
||||
- C:\OSGeo4w\lib\libexpat.lib C:\OSGeo4w\lib\zlib.lib
|
||||
+ $(LIBS_ALL)
|
||||
if exist $(READOSM_DLL).manifest mt -manifest \
|
||||
$(READOSM_DLL).manifest -outputresource:$(READOSM_DLL);2
|
||||
|
||||
@@ -35,7 +35,7 @@ clean:
|
||||
del *.exp
|
||||
del *.manifest
|
||||
del *.lib
|
||||
- del *.obj
|
||||
+ del src\*.obj
|
||||
del *.pdb
|
||||
|
||||
install: all
|
||||
|
||||
diff --git a/nmake.opt b/nmake.opt
|
||||
index 5e45c0e..61c44f9 100644
|
||||
--- a/nmake.opt
|
||||
+++ b/nmake.opt
|
||||
@@ -2,7 +2,7 @@
|
||||
INSTDIR=C:\OSGeo4W
|
||||
|
||||
# Uncomment the first for an optimized build, or the second for debug.
|
||||
-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \
|
||||
+OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \
|
||||
/DDLL_EXPORT
|
||||
#OPTFLAGS= /nologo /Zi /MD /Fdreadosm.pdb /DDLL_EXPORT
|
||||
|
||||
12
externals/vcpkg/ports/readosm/pc-file.patch
vendored
Executable file
12
externals/vcpkg/ports/readosm/pc-file.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/readosm.pc.in b/readosm.pc.in
|
||||
index c1a0961..2417433 100644
|
||||
--- a/readosm.pc.in
|
||||
+++ b/readosm.pc.in
|
||||
@@ -8,5 +8,6 @@ includedir=@includedir@
|
||||
Name: readosm
|
||||
Description: a simple library parsing Open Street Map files
|
||||
Version: @VERSION@
|
||||
-Libs: -L${libdir} -lreadosm -lz -lexpat
|
||||
+Requires.private: expat zlib
|
||||
+Libs: -L${libdir} -lreadosm
|
||||
Cflags: -I${includedir}
|
||||
94
externals/vcpkg/ports/readosm/portfile.cmake
vendored
Executable file
94
externals/vcpkg/ports/readosm/portfile.cmake
vendored
Executable file
@@ -0,0 +1,94 @@
|
||||
set(READOSM_VERSION_STR "1.1.0a")
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.gaia-gis.it/gaia-sins/readosm-sources/readosm-${READOSM_VERSION_STR}.tar.gz"
|
||||
FILENAME "readosm-${READOSM_VERSION_STR}.tar.gz"
|
||||
SHA512 ec8516cdd0b02027cef8674926653f8bc76e2082c778b02fb2ebcfa6d01e21757aaa4fd5d5104059e2f5ba97190183e60184f381bfd592a635805aa35cd7a682
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES
|
||||
fix-makefiles.patch
|
||||
pc-file.patch
|
||||
)
|
||||
|
||||
set(PKGCONFIG_MODULES expat zlib)
|
||||
|
||||
if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
x_vcpkg_pkgconfig_get_modules(
|
||||
PREFIX PKGCONFIG
|
||||
MODULES --msvc-syntax ${PKGCONFIG_MODULES}
|
||||
LIBS
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_UWP)
|
||||
set(UWP_LIBS windowsapp.lib)
|
||||
set(UWP_LINK_FLAGS /APPCONTAINER)
|
||||
endif()
|
||||
|
||||
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR)
|
||||
|
||||
vcpkg_install_nmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS_RELEASE
|
||||
"INSTDIR=${INST_DIR}"
|
||||
"LINK_FLAGS=${UWP_LINK_FLAGS}"
|
||||
"LIBS_ALL=${PKGCONFIG_LIBS_RELEASE} ${UWP_LIBS}"
|
||||
OPTIONS_DEBUG
|
||||
"INSTDIR=${INST_DIR}\\debug"
|
||||
"LINK_FLAGS=${UWP_LINK_FLAGS} /debug"
|
||||
"LIBS_ALL=${PKGCONFIG_LIBS_DEBUG} ${UWP_LIBS}"
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE)
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib")
|
||||
endif()
|
||||
else()
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/readosm.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib" "${CURRENT_PACKAGES_DIR}/lib/readosm.lib")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE)
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib")
|
||||
endif()
|
||||
endif()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
set(infile "${SOURCE_PATH}/readosm.pc.in")
|
||||
set(outfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/readosm.pc")
|
||||
set(VERSION "${READOSM_VERSION_STR}")
|
||||
set(exec_prefix [[${prefix}]])
|
||||
set(libdir [[${prefix}/lib]])
|
||||
set(includedir [[${prefix}/include]])
|
||||
list(JOIN pkg_config_modules " " requires_private)
|
||||
configure_file("${infile}" "${outfile}" @ONLY)
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE)
|
||||
set(outfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/readosm.pc")
|
||||
set(includedir [[${prefix}/../include]])
|
||||
configure_file("${infile}" "${outfile}" @ONLY)
|
||||
endif()
|
||||
|
||||
else()
|
||||
x_vcpkg_pkgconfig_get_modules(
|
||||
PREFIX PKGCONFIG
|
||||
MODULES ${PKGCONFIG_MODULES}
|
||||
LIBS
|
||||
)
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
OPTIONS_RELEASE
|
||||
"LIBS=${PKGCONFIG_LIBS_RELEASE} \$LIBS"
|
||||
OPTIONS_DEBUG
|
||||
"LIBS=${PKGCONFIG_LIBS_DEBUG} \$LIBS"
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
15
externals/vcpkg/ports/readosm/vcpkg.json
vendored
Executable file
15
externals/vcpkg/ports/readosm/vcpkg.json
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "readosm",
|
||||
"version-string": "1.1.0a",
|
||||
"port-version": 2,
|
||||
"description": "ReadOSM is an open source library to extract valid data from within an Open Street Map input file (.osm or .osm.pbf)",
|
||||
"homepage": "https://www.gaia-gis.it/gaia-sins/readosm-sources",
|
||||
"dependencies": [
|
||||
"expat",
|
||||
{
|
||||
"name": "vcpkg-pkgconfig-get-modules",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user