Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Mar 2008 01:43:04 +0900 (JST)
From:      TAOKA Fumiyoshi <fmysh@iijmio-mail.jp>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        TAOKA Fumiyoshi <fmysh@iijmio-mail.jp>
Subject:   ports/121919: databases
Message-ID:  <20080320164304.C5111154006@xeon.quad.dyndns.org>
Resent-Message-ID: <200803201650.m2KGo2ZH009269@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         121919
>Category:       ports
>Synopsis:       databases
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 20 16:50:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     TAOKA Fumiyoshi
>Release:        
>Organization:
>Environment:
>Description:

	Change #!/bin/bash to ${LOCALBASE}/bin/bash in some shell scripts.
 	Add shells/bash to RUN_DEPENDS. Bump PORTREVISION.
	Pointed out by Sajo Zsolt Attila <sajozsattila@citromail.hu>.

	To avoid a file name conflict between ruby-gems, install bin/gem
	as bin/grass62-gem.  See. ports/115818.

	Add ODBC and SQLite supports to OPTIONS.

>How-To-Repeat:
>Fix:

New file files/patch-Makefile

diff -uNr --exclude CVS grass.orig/Makefile grass/Makefile
--- grass.orig/Makefile	2008-02-17 15:00:53.000000000 +0900
+++ grass/Makefile	2008-03-21 01:17:07.000000000 +0900
@@ -7,7 +7,8 @@
 
 PORTNAME=	grass
 PORTVERSION=	6.2.3
-PORTEPOCH=	2
+PORTREVISION=	1
+PORTEPOCH=	3
 CATEGORIES=	databases geography
 MASTER_SITES=	http://grass.itc.it/grass62/source/ \
 		ftp://grass.itc.it/pub/grass/grass62/source/ \
@@ -28,7 +29,8 @@
 BUILD_DEPENDS=	proj:${PORTSDIR}/graphics/proj \
 		gdal-config:${PORTSDIR}/graphics/gdal
 RUN_DEPENDS=	proj:${PORTSDIR}/graphics/proj \
-		gdal-config:${PORTSDIR}/graphics/gdal
+		gdal-config:${PORTSDIR}/graphics/gdal \
+		bash:${PORTSDIR}/shells/bash
 LIB_DEPENDS=	tiff.4:${PORTSDIR}/graphics/tiff \
 		png.5:${PORTSDIR}/graphics/png \
 		jpeg.9:${PORTSDIR}/graphics/jpeg \
@@ -61,14 +63,21 @@
 		--with-nls \
 		--with-cxx \
 		--with-readline \
+		--with-curses \
 		--enable-largefile
 
 PLIST_SUB=	GRASS_INST_DIR=${GRASS_INST_DIR} \
-		VERSION=${PORTVERSION}
+		VERSION=${PORTVERSION} \
+		VER=${PORTVERSION:R:C/\.//}
 USE_LDCONFIG=	${PREFIX}/${GRASS_INST_DIR}/lib
 
-OPTIONS=	MYSQL "Enable MySQL support" Off \
-		PGSQL "Enable PostgreSQL support" On
+OPTIONS=	MYSQL	"Enable MySQL support" Off \
+		ODBC	"Enable ODBC support" Off \
+		PGSQL	"Enable PostgreSQL support" On \
+		SQLITE	"Enable SQLite support" Off
+
+BASH_SCRIPTS=	i.spectral r.mapcalculator r.tileset r3.mapcalculator \
+		v.in.gpsbabel
 
 .include <bsd.port.pre.mk>
 
@@ -85,6 +94,15 @@
 .else
 PLIST_SUB+=	MYSQL="@comment "
 .endif
+
+.if defined(WITH_ODBC)
+LIB_DEPENDS+=	odbc:${PORTSDIR}/databases/unixODBC
+CONFIGURE_ARGS+=--with-odbc
+PLIST_SUB+=	ODBC=""
+.else
+PLIST_SUB+=	ODBC="@comment "
+.endif
+
 .if defined(WITHOUT_PGSQL)
 CONFIGURE_ARGS+=--without-postgres
 PLIST_SUB+=	PGSQL="@comment "
@@ -93,8 +111,20 @@
 PLIST_SUB+=	PGSQL=""
 .endif
 
-post-extract:
-	@${REINPLACE_CMD} -E '/^INST_DIR=/s|/grass-.*|/${GRASS_INST_DIR}|g' \
-	${WRKSRC}/Makefile
+.if defined(WITH_SQLITE)
+USE_SQLITE=	yes
+CONFIGURE_ARGS+=--with-sqlite
+PLIST_SUB+=	SQLITE=""
+.else
+PLIST_SUB+=	SQLITE="@comment "
+.endif
+
+post-patch:
+	@${REINPLACE_CMD} -e "/^INST_DIR=/s|grass-.*|${GRASS_INST_DIR}|" \
+		${WRKSRC}/Makefile
+.for s in ${BASH_SCRIPTS}
+	@${REINPLACE_CMD} -e "1s|/bin/bash|${LOCALBASE}/bin/bash|" \
+		 ${WRKSRC}/scripts/$s/$s
+.endfor
 
 .include <bsd.port.post.mk>
diff -uNr --exclude CVS grass.orig/files/patch-Makefile grass/files/patch-Makefile
--- grass.orig/files/patch-Makefile	1970-01-01 09:00:00.000000000 +0900
+++ grass/files/patch-Makefile	2008-03-20 21:44:34.000000000 +0900
@@ -0,0 +1,11 @@
+--- Makefile.orig	2007-11-28 05:33:13.000000000 +0900
++++ Makefile	2008-03-20 21:32:22.000000000 +0900
+@@ -257,7 +257,7 @@
+ 	-chmod -R a+rX ${INST_DIR} 2>/dev/null
+ 	#GEM installation
+ 	-tar cBf - gem/skeleton | (cd ${INST_DIR}/etc ; tar xBf - ) 2>/dev/null
+-	-${INSTALL} gem/gem ${BINDIR} 2>/dev/null
++	-${INSTALL} gem/gem ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}-gem 2>/dev/null
+ 	
+ 
+ install-strip: FORCE
diff -uNr --exclude CVS grass.orig/pkg-plist grass/pkg-plist
--- grass.orig/pkg-plist	2008-02-17 15:00:53.000000000 +0900
+++ grass/pkg-plist	2008-03-21 01:13:10.000000000 +0900
@@ -1,5 +1,5 @@
-bin/gem
-bin/grass62
+bin/grass%%VER%%
+bin/grass%%VER%%-gem
 %%GRASS_INST_DIR%%/bin/bmif_to_cell
 %%GRASS_INST_DIR%%/bin/d.ask
 %%GRASS_INST_DIR%%/bin/d.barscale
@@ -466,7 +466,11 @@
 %%GRASS_INST_DIR%%/docs/html/g.version.html
 %%GRASS_INST_DIR%%/docs/html/gis.m.html
 %%GRASS_INST_DIR%%/docs/html/grass-dbf.html
-%%GRASS_INST_DIR%%/docs/html/grass-pg.html
+%%MYSQL%%%%GRASS_INST_DIR%%/docs/html/grass-mesql.html
+%%MYSQL%%%%GRASS_INST_DIR%%/docs/html/grass-mysql.html
+%%ODBC%%%%GRASS_INST_DIR%%/docs/html/grass-odbc.html
+%%PGSQL%%%%GRASS_INST_DIR%%/docs/html/grass-pg.html
+%%SQLITE%%%%GRASS_INST_DIR%%/docs/html/grass-sqlite.html
 %%GRASS_INST_DIR%%/docs/html/grass6.html
 %%GRASS_INST_DIR%%/docs/html/grass_logo.txt
 %%GRASS_INST_DIR%%/docs/html/helptext.html
@@ -962,8 +966,10 @@
 %%GRASS_INST_DIR%%/driver/XDRIVER
 %%GRASS_INST_DIR%%/driver/db/dbf
 %%MYSQL%%%%GRASS_INST_DIR%%/driver/db/mysql
+%%ODBC%%%%GRASS_INST_DIR%%/driver/db/odbc
 %%GRASS_INST_DIR%%/driver/db/ogr
 %%PGSQL%%%%GRASS_INST_DIR%%/driver/db/pg
+%%SQLITE%%%%GRASS_INST_DIR%%/driver/db/sqlite
 %%GRASS_INST_DIR%%/etc/BUILD
 %%GRASS_INST_DIR%%/etc/FIPS.code
 %%GRASS_INST_DIR%%/etc/Init.sh
@@ -1799,7 +1805,11 @@
 %%GRASS_INST_DIR%%/man/man1/g.version.1
 %%GRASS_INST_DIR%%/man/man1/gis.m.1
 %%GRASS_INST_DIR%%/man/man1/grass-dbf.1
-%%GRASS_INST_DIR%%/man/man1/grass-pg.1
+%%MYSQL%%%%GRASS_INST_DIR%%/man/man1/grass-mesql.1
+%%MYSQL%%%%GRASS_INST_DIR%%/man/man1/grass-mysql.1
+%%ODBC%%%%GRASS_INST_DIR%%/man/man1/grass-odbc.1
+%%PGSQL%%%%GRASS_INST_DIR%%/man/man1/grass-pg.1
+%%SQLITE%%%%GRASS_INST_DIR%%/man/man1/grass-sqlite.1
 %%GRASS_INST_DIR%%/man/man1/grass6.1
 %%GRASS_INST_DIR%%/man/man1/helptext.1
 %%GRASS_INST_DIR%%/man/man1/i.ask.1
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080320164304.C5111154006>