geometalab / Vector-Tiles-Reader-QGIS-Plugin

Vector Tiles Reader QGIS-Plugin - QGIS Python plugin which reads Mapbox Vector Tiles from a server, a local MBTiles file or a directory
http://plugins.qgis.org/plugins/vector_tiles_reader/
GNU General Public License v2.0
149 stars 30 forks source link

add support for OpenBSD #280

Open landryb opened 4 years ago

landryb commented 4 years ago

with a very small tweak to plugin/util/mp_helper.py:

adventurer:~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/vector_tiles_reader/ $grep -B2 openbsd plugin/util/mp_helper.py 
    elif sys.platform.startswith("darwin"):
        lib = "pbf2geojson_osx_{}.so".format(bitness_string)
    elif sys.platform.startswith("openbsd"):
        lib = "pbf2geojson_openbsd6_{}.so".format(bitness_string)

and once i had manually built the pbf2geojson library (after installing the protozero & vtzero libraries)

adventurer:~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/vector_tiles_reader/ext-libs/pbf2geojson/ $
  c++ -fPIC -std=c++11 -I/usr/local/include -s -Os -Ofast -O3 --shared -o pbf2geojson_openbsd6_x86_64.so pbf2geojson.cpp

i've been able to use the plugin with qgis 3.12 on OpenBSD:

2020-03-10T14:46:39     WARNING    Loading native lib...
2020-03-10T14:46:39     WARNING    Native decoding supported!!! (OpenBSD, 64bit)

tested working fine against the server provided at https://vectortiles.ign.fr/

dunno if you want a PR for the Makefile or the doc or...

mnboos commented 4 years ago

Awesome! Would you mind making a PR including the updated makefile as well as the compiled binaries?

landryb commented 4 years ago

the binaries wouldnt really make sense as OpenBSD has no promise of ABI stability, so right now a library build on my system has zero promise to work on another OpenBSD system in 2 months... but sure will make a PR with the makefile & loader bits.

mnboos commented 4 years ago

Ok, if that's the case, then just updating the readme and makefile should be sufficient