Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

159.8. shapelib-1.6.3

Read and write ESRI shapefiles and their dBase attribute tables

1.6.3-2 · MIT OR LGPL-2.0-or-later · 0.2 SBU · 566.2 KiB, 31 files · 41_system, 591 of 1047 · ports/core/gis/shapelib

Homepage: https://shapelib.maptools.org/

Depends on: cmake, ninja.

Required by (4): gpsman, marble, opencpn, xastir.

Sources: shapelib-1.6.3.tar.gz (1.0 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install shapelib'

build.sh:

cmake -B build -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DBUILD_SHARED_LIBS=ON \
	-DBUILD_APPS=ON \
	-DBUILD_SHAPELIB_CONTRIB=ON \
	-DUSE_RPATH=OFF \
	-DCMAKE_SKIP_INSTALL_RPATH=ON \
	-DBUILD_TESTING=OFF
ninja -C build
DESTDIR=$PKG ninja -C build install

test -e "$PKG/usr/lib/libshp.so"
test -e "$PKG/usr/include/shapefil.h"

Programs: Shape_PointInPoly, csv2shp, dbfadd, dbfcat, dbfcreate, dbfdump, dbfinfo, shpadd, shpcat, shpcentrd, shpcreate, shpdata, shpdump, shpdxf, shpfix, shpinfo, shprewind, shpsort, shptreedump, shpwkb.

Libraries: libshp.so.

Directories: /usr/share/licenses/shapelib, /usr/share/shapelib.