[Mapserver-users] FreeBSD port

Douglas K. Rand rand at meridian-enviro.com
Mon May 24 20:53:49 EDT 2004


--Multipart_Mon_May_24_19:53:49_2004-1
Content-Type: text/plain; charset=US-ASCII

I have for quite a while wanted a mapserver entry in the FreeBSD ports
collection (http://www.freebsd.org/ports) so that I could install
Mapserver really easily on my FreeBSD boxes. Well, since
procrastination didn't seem to be doing the trick, I decided to see if
doing actual work would help.  I'm sorry to report that it seems to
have helped. :)

I have a specific question about the configuration of mapserver and
GD. Assuming that GD was correctly built and that the GD build
includes JPEG, PNG, and FreeType (all of which are true if you build
GD via the FreeBSD port) is it safe to leave off the --with-jpeg,
--with-png, and --with-freetype options to mapserver's configure
script? I have done so, and it seems to be working. The issue is that
by having the Mapserver port depend on the GD port, GD gets built just
fine and includes JPEG, PNG, and FreeType, and I don't want to
duplicate those paths in the Mapserver port.

Here, for your review and comments, is a FreeBSD port for Mapserver. 
The knobs for TIFF, MING, PDF, WMS, GDAL, POSTGRESQL, and PHP are
largely untested, they are my attempt to make the port complete. We
don't use those features of Mapserver.

Any and all comments are welcome.  I'm heading over to the bike shed
now. 


--Multipart_Mon_May_24_19:53:49_2004-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="mapserver.shar"
Content-Transfer-Encoding: quoted-printable

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mapserver/Makefile
#	mapserver/distinfo
#	mapserver/pkg-descr
#	mapserver/pkg-plist
#
echo x - mapserver/Makefile
sed 's/^X//' >mapserver/Makefile << 'END-of-mapserver/Makefile'
X# New ports collection Makefile for: mapserver
X# Date created:		2004-05-20
X# Whom:			Douglas K. Rand <rand at meridian-enviro.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=3D		mapserver
XPORTVERSION=3D		4.0.2
XCATEGORIES=3D		graphics www misc
XMASTER_SITES=3D		http://cvs.gis.umn.edu/dist/
X
XMAINTAINER=3D		rand at meridian-enviro.com
XCOMMENT=3D		MapServer is a system for developing web-based GIS applications
X
XLIB_DEPENDS=3D		gd.4:${PORTSDIR}/graphics/gd \
X			proj.3:${PORTSDIR}/graphics/proj
X
XGNU_CONFIGURE=3D	yes
XCONFIGURE_ARGS=3D		--enable-runpath \
X			--with-gd=3D${LOCALBASE} \
X			--with-proj=3D${LOCALBASE}
X#			--with-jpeg=3D${LOCALBASE}
X#			--with-png=3D${LOCALBASE}
X#			--with-freetype=3D${LOCALBASE}
X
X.if defined(WITH_TIFF)
XLIB_DEPENDS+=3D		tiff.4:${PORTSDIR}/graphics/tiff
XCONFIGURE_ARGS+=3D	--with-tiff=3D${LOCALBASE}
X.endif
X
X.if defined(WITH_MING)
XLIB_DEPENDS+=3D		ming.3:${PORTSDIR}/graphics/ming
XCONFIGURE_ARGS+=3D	--with-ming=3D${LOCALBASE}
X.endif
X
X.if defined(WITH_PDF)
XLIB_DEPENDS+=3D		pdf.6:${PORTSDIR}/graphics/pdflib
XCONFIGURE_ARGS+=3D	--with-pdf=3D${LOCALBASE}
X.endif
X
X.if defined(WITH_WMS)
XLIB_DEPENDS+=3D		curl.2:${PORTSDIR}/ftp/curl
XCONFIGURE_ARGS+=3D	--wmsclient
X.endif
X
X.if defined(WITH_GDAL)
XLIB_DEPENDS+=3D		gdal.1.1:${PORTSDIR}/graphics/gdal
XCONFIGURE_ARGS+=3D	--with-gdal=3D${LOCALBASE}
X.endif
X
X.if defined(WITH_POSTGRESQL)
XPOSTGRESQL_PORT?=3D	databases/postgresql-client
XLIB_DEPENDS+=3D		pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
XCONFIGURE_ARGS+=3D	--with-postgis=3D${LOCALBASE}/bin/pg_config
X.endif
X
X.if defined(WITH_PHP)
XBUILD_DEPENDS+=3D		mod_php4:${PORTSDIR}/www/mod_php4:
XCONFIGURE_ARGS+=3D	--with-php=3D${LOCALBASE}
X.endif
X
X.if defined(WITH_DEBUG)
XCONFIGURE_ARGS+=3D	--enable-debug
X.endif
X
XPROG_FILES=3D		mapserv legend scalebar shp2img shp2pdf shptree shptreetst =
shptreevis sortshp
X
X.include <bsd.port.pre.mk>
X
Xdo-install:
X.for f in ${PROG_FILES}
X	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${LOCALBASE}/bin
X.endfor
X	${INSTALL} ${WRKSRC}/shp2mysql.pl ${LOCALBASE}/bin/shp2mysql
X
X.include <bsd.port.post.mk>
END-of-mapserver/Makefile
echo x - mapserver/distinfo
sed 's/^X//' >mapserver/distinfo << 'END-of-mapserver/distinfo'
XMD5 (mapserver-4.0.2.tar.gz) =3D 757ea220ae04aabc44c739682df3d0e4
XSIZE (mapserver-4.0.2.tar.gz) =3D 868993
END-of-mapserver/distinfo
echo x - mapserver/pkg-descr
sed 's/^X//' >mapserver/pkg-descr << 'END-of-mapserver/pkg-descr'
XMapServer is a system for developing web-based GIS applications.=20
XThe basic system consists of a CGI program that can be configured to=20
Xrespond to a variety of spatial requests like making maps, scalebars,=20
Xand point, area and feature queries. Virtually all aspects of an=20
Xapplication, from web interface to map appearance can be developed=20
Xwithout any programming. For the more ambitious user, MapServer=20
Xapplications can be enhanced using Java, JavaScript or many other web=20
Xtechnologies.
X
XWWW: http://mapserver.gis.umn.edu/
END-of-mapserver/pkg-descr
echo x - mapserver/pkg-plist
sed 's/^X//' >mapserver/pkg-plist << 'END-of-mapserver/pkg-plist'
Xbin/mapserv
Xbin/legend
Xbin/scalebar
Xbin/shp2img
Xbin/shp2mysql
Xbin/shp2pdf
Xbin/shptree
Xbin/shptreetst
Xbin/shptreevis
Xbin/sortshp
END-of-mapserver/pkg-plist
exit


--Multipart_Mon_May_24_19:53:49_2004-1--



More information about the mapserver-users mailing list