Skip to content
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

add support to build/use libpbf2geojson on OpenBSD (fixes #280) #281

Open
wants to merge 3 commits into
base: dev-qgis3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ endif
ifeq ($(detected_OS),Linux)
CXXFLAGS += -fPIC
endif
ifeq ($(detected_OS),OpenBSD)
CXXFLAGS += -fPIC -I/usr/local/include
CXX = c++
endif
ifeq ($(detected_OS),FreeBSD)
CXXFLAGS += -fPIC -I/usr/local/include
endif
ifeq ($(detected_OS),Darwin)
CXXFLAGS += -fPIC
CXX = clang++
Expand Down Expand Up @@ -38,3 +45,10 @@ linux:
osx:
$(CXX) -m64 $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_osx_x86_64.so ./ext-libs/pbf2geojson/pbf2geojson.cpp
$(CXX) -m32 $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_osx_i686.so ./ext-libs/pbf2geojson/pbf2geojson.cpp

openbsd:
$(CXX) $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_openbsd_x86_64.so ./ext-libs/pbf2geojson/pbf2geojson.cpp

freebsd:
$(CXX) -m64 $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_freebsd_x86_64.so ./ext-libs/pbf2geojson/pbf2geojson.cpp
$(CXX) -m32 $(CXXFLAGS) -o ./ext-libs/pbf2geojson/pbf2geojson_freebsd_i686.so ./ext-libs/pbf2geojson/pbf2geojson.cpp
4 changes: 4 additions & 0 deletions plugin/util/mp_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def _get_lib_path():
lib = "pbf2geojson_windows_{}.dll".format(bitness_string)
elif sys.platform.startswith("darwin"):
lib = "pbf2geojson_osx_{}.so".format(bitness_string)
elif sys.platform.startswith("openbsd"):
lib = "pbf2geojson_openbsd_{}.so".format(bitness_string)
landryb marked this conversation as resolved.
Show resolved Hide resolved
elif sys.platform.startswith("freebsd"):
lib = "pbf2geojson_freebsd_{}.so".format(bitness_string)
if lib:
temp_dir = get_temp_dir("native")
lib_path = os.path.join(os.path.abspath(get_plugin_directory()), "ext-libs", "pbf2geojson", lib)
Expand Down