Postgis/postgresql as openembedded/yocto recipe

August Larsson <[email protected]>
Newsgroups gmane.comp.gis.postgis
Message-ID <AS8PR02MB10008BA5873CCFBADD5EA8C27E7EF2@AS8PR02MB10008.eurprd02.prod.outlook.com>
Hello!

I am trying to build postgis in yocto environment. Does anyone have any experience in this?

SUMMARY = "PostGIS is a spatial database extender for PostgreSQL \
object-relational database. It adds support for geographic \
objects allowing location queries to be run in SQL."
HOMEPAGE = "https://postgis.net/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=50e16bf358714da17c7f759954384398"

PR = "r0"

SRC_URI = "\
https://download.osgeo.org/postgis/source/${BPN}-${PV}.tar.gz<https://download.osgeo.org/postgis/source/$%7BBPN%7D-$%7BPV%7D.tar.gz> \
"

SRC_URI[md5sum] = "cbde5b95e73e248f71cdd485db011671"
SRC_URI[sha256sum] = "fb9f95d56e3aaef6a296473c76a3b99005ac41864d486c197cd478c9b14f791a"

DEPENDS += "proj json-c libxml2 geos gdal postgresql"
inherit autotools-brokensep pkgconfig gettext

# We rely on postgresql to have a crossscript alternative to the binary pg_config
EXTRA_OECONF = "\
--with-pgconfig=${STAGING_BINDIR_CROSS}/pg_config \
--with-gdallibdir=${STAGING_LIBDIR} \
"

CFLAGS += "-DPOSTGIS_DEBUG_LEVEL=0"

FILES_${PN} += "${libdir}/postgresql/lib/"
FILES_${PN} += "${datadir}"
FILES_${PN} += "${datadir}/postgresql/contrib/postgis-3.5"
FILES_${PN} += "${datadir}/postgresql/extension"
This is my recipe at the moment, but I have some difficulty with the pg_config file. It does not end up in STAGING_BINDIR_CROSS. I suspect I need some bbappend for my postgresql recipe for this to work.

Any help would be greatly appreciated!

/August
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.