Ruby on Rails 8.1 app backed by MongoDB and Redis. Git snapshot from 2026-03-22 (no upstream releases yet). Requires Ruby 4.0, libproj (rgeo-proj4 C ext), and ImageMagick (rszr C ext).
79 lines
2.3 KiB
Makefile
79 lines
2.3 KiB
Makefile
COMMENT = open source web-based GIS vector editor
|
|
|
|
# No upstream releases; pin to a git snapshot
|
|
GIT_COMMIT = 0c0e1387da1910a2a3b60c6d7c48d0552c701a3c
|
|
SNAP = 20260322
|
|
PKGNAME = mapforge-0.${SNAP}
|
|
|
|
DIST_TUPLE = github mapforge-org mapforge ${GIT_COMMIT} .
|
|
|
|
CATEGORIES = geo www
|
|
|
|
HOMEPAGE = https://github.com/mapforge-org/mapforge
|
|
|
|
# AGPLv3 (source), MPL-2.0 (vendor/javascript)
|
|
PERMIT_PACKAGE = Yes
|
|
|
|
MODULES = lang/ruby
|
|
MODRUBY_REV = 4.0
|
|
MODRUBY_HANDLE_FLAVORS = No
|
|
|
|
BUNDLE = ${LOCALBASE}/bin/bundle${MODRUBY_BINREV}
|
|
|
|
CONFIGURE_STYLE = none
|
|
NO_TEST = Yes
|
|
|
|
# C extensions (rgeo, rgeo-proj4, rszr) make the package arch-dependent
|
|
COMPILER = base-clang ports-gcc
|
|
COMPILER_LANGS = c
|
|
|
|
# git-sourced gems in Gemfile require git at bundle-install time
|
|
BUILD_DEPENDS += devel/git
|
|
|
|
# rgeo-proj4 C extension links against libproj
|
|
LIB_DEPENDS += devel/proj
|
|
# rszr C extension links against ImageMagick
|
|
LIB_DEPENDS += graphics/ImageMagick
|
|
|
|
WANTLIB += proj MagickCore-6.Q16 MagickWand-6.Q16
|
|
|
|
# mongod and redis servers are needed at runtime
|
|
RUN_DEPENDS += databases/mongodb/80 \
|
|
databases/redis
|
|
|
|
APP_DIR = ${PREFIX}/share/mapforge
|
|
DATA_DIR = ${LOCALSTATEDIR}/mapforge
|
|
|
|
SUBST_VARS += APP_DIR DATA_DIR MODRUBY_BINREV
|
|
|
|
# --- Gem vendor cache ---
|
|
# The gem vendor cache must be pre-generated and added as a distfile
|
|
# before this port can build offline. Steps after "make extract":
|
|
#
|
|
# cd ${WRKDIST}
|
|
# bundle _4.0.3_ config set --local without "development test"
|
|
# bundle _4.0.3_ package --all --all-platforms --no-install
|
|
# tar czf ${DISTDIR}/mapforge-gems-${SNAP}.tar.gz vendor/cache/
|
|
#
|
|
# Then add to DISTFILES and re-run "make makesum". Until the cache
|
|
# is generated, bundle install will fetch gems from rubygems.org.
|
|
|
|
do-build:
|
|
cd ${WRKSRC} && \
|
|
${BUNDLE} config set --local without "development test" && \
|
|
${BUNDLE} config set --local deployment true && \
|
|
${BUNDLE} install && \
|
|
${RUBY} ./bin/bootsnap precompile --gemfile app/ lib/
|
|
|
|
do-install:
|
|
${INSTALL_DATA_DIR} ${WRKINST}${APP_DIR}
|
|
cd ${WRKSRC} && pax -rw . ${WRKINST}${APP_DIR}/
|
|
${INSTALL_DATA_DIR} ${WRKINST}${DATA_DIR}/log
|
|
${INSTALL_DATA_DIR} ${WRKINST}${DATA_DIR}/storage
|
|
${INSTALL_DATA_DIR} ${WRKINST}${DATA_DIR}/tmp
|
|
${INSTALL_DATA_DIR} ${WRKINST}${PREFIX}/share/examples/mapforge
|
|
${INSTALL_SCRIPT} ${FILESDIR}/mapforge.rc \
|
|
${WRKINST}${PREFIX}/share/examples/mapforge/
|
|
|
|
.include <bsd.port.mk>
|