ports/120300: [PATCH] devel/shapelib: [SUMMARIZE CHANGES], take maintainership

Sunpoet Po-Chuan Hsieh sunpoet at sunpoet.net
Tue Feb 5 18:30:02 UTC 2008


>Number:         120300
>Category:       ports
>Synopsis:       [PATCH] devel/shapelib: [SUMMARIZE CHANGES], take maintainership
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 05 18:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Sunpoet Po-Chuan Hsieh
>Release:        FreeBSD 6.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD IRIS.sunpoet.net 6.3-STABLE FreeBSD 6.3-STABLE #12: Sun Jan 20 02:27:29 CST 2008
>Description:
[DESCRIBE CHANGES]
- Take maintainership
- Make use of shapelib utils

Added file(s):
- files/patch-contrib-Makefile
- files/patch-shapefil.h
- files/patch-shputils.c

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- shapelib-1.2.10_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/devel/shapelib/Makefile /usr/ports/sunpoet/shapelib/Makefile
--- /usr/ports/devel/shapelib/Makefile	2006-09-28 03:00:23.000000000 +0800
+++ /usr/ports/sunpoet/shapelib/Makefile	2008-01-14 11:46:43.000000000 +0800
@@ -7,24 +7,49 @@
 
 PORTNAME=	shapelib
 PORTVERSION=	1.2.10
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
-MASTER_SITES=	http://dl.maptools.org/dl/shapelib/
+MASTER_SITES=	http://dl.maptools.org/dl/shapelib/ \
+		http://sunpoet.net/distfiles/
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	sunpoet at sunpoet.net
 COMMENT=	C API for reading and writing ArcView Shapefiles
 
 USE_AUTOTOOLS=	libtool:15:env
-ALL_TARGET=	lib
 USE_LDCONFIG=	yes
-INSTALL_TARGET=	lib_install
+
+OPTIONS=	PROJ "Cartographic Projections library" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_PROJ)
+LIB_DEPENDS+=	proj.5:${PORTSDIR}/graphics/proj
+PLIST_SUB+=	PROJ=""
+PROJ=		-DPROJ4
+.else
+PLIST_SUB+=	PROJ="@comment "
+PROJ=		""
+.endif
+
+.if ${ARCH} == "amd64" || ${ARCH} == "i386" || ${ARCH} == "ia64"
+ENDIAN=		-D_LITTLE_ENDIAN
+.else		# powerpc & sparc64
+ENDIAN=		-D_BIG_ENDIAN
+.endif
 
 post-patch:
-	@${REINPLACE_CMD} -e 's#%%PREFIX%%#${PREFIX}#g' \
+	@${REINPLACE_CMD} \
+		-e 's#%%ENDIAN%%#${ENDIAN}#g' \
+		-e 's#%%INSTALL%%#${INSTALL}#g' \
 		-e 's#%%LIBTOOL%%#${LIBTOOL}#g' \
-		-e 's#%%INSTALL%%#${INSTALL}#g' ${WRKSRC}/Makefile
+		-e 's#%%PREFIX%%#${PREFIX}#g' \
+		-e 's#%%PROJ%%#${PROJ}#g' \
+		${WRKSRC}/Makefile ${WRKSRC}/contrib/Makefile
+
 post-install:
-	${MKDIR} ${PREFIX}/share/doc/shapelib
-	${INSTALL_DATA} ${WRKSRC}/*.html ${PREFIX}/share/doc/shapelib
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/*.html ${DOCSDIR}
+.endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/devel/shapelib/files/patch-Makefile /usr/ports/sunpoet/shapelib/files/patch-Makefile
--- /usr/ports/devel/shapelib/files/patch-Makefile	2006-02-24 16:42:28.000000000 +0800
+++ /usr/ports/sunpoet/shapelib/files/patch-Makefile	2007-01-12 01:43:41.000000000 +0800
@@ -1,11 +1,48 @@
---- Makefile.orig	Mon Apr  7 13:03:22 2003
-+++ Makefile	Fri Feb  3 02:16:16 2006
-@@ -2,3 +2,3 @@
- #LINKOPT	=	/usr/local/lib/libdbmalloc.a
+--- Makefile.orig	Mon Apr  7 21:03:22 2003
++++ Makefile	Thu Jan 11 22:19:21 2007
+@@ -1,10 +1,35 @@
+-
+-#LINKOPT	=	/usr/local/lib/libdbmalloc.a
 -CFLAGS	=	-g
-+#CFLAGS	=	-g
++#LINKOPT	=	%%PREFIX%%/lib/libdbmalloc.a
++CFLAGS	+=	-g
+ 
+ default:	all
+ 
+-all:	shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump shptest
++TOOLS=	shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump shptest \
++	shputils shptreedump
++
++CONTRIBTOOLS=	
++
++#all:	lib shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump \
++#	shptest shputils shptreedump
++
++all:	lib tools contrib_tools
++
++install:	lib_install tools_install contrib_install
++
++tools:
++.for _TOOL in $(TOOLS)
++	$(CC) $(CFLAGS) -I. $(_TOOL).c -o $(_TOOL) .libs/libshp.a
++.endfor
++
++contrib_tools:
++	(cd contrib; ${MAKE} %%PROJ%% all; cd ..)
++
++tools_install:
++.for _TOOL in ${TOOLS}
++	%%INSTALL%% -c -m 755 ${_TOOL} %%PREFIX%%/bin/${_TOOL}
++.endfor
++
++contrib_install:
++	(cd contrib; ${MAKE} %%PROJ%% install; cd ..)
+ 
+ shpopen.o:	shpopen.c shapefil.h
+ 	$(CC) $(CFLAGS) -c shpopen.c
+@@ -92,51 +117,18 @@
+ 
  
-@@ -94,49 +94,16 @@
  # -----------------------------------------------------------------------------
 -# The following is contributed by Jan-Oliver Wagner, and should allow for
 -# creating shared libraries on most platforms with gcc, and libtool installed.
@@ -44,10 +81,10 @@
 -	ranlib .libs/libshp.a
 -	rm -fr .libs/libshp.lax
 -	(cd .libs && rm -f libshp.la && ln -s ../libshp.la libshp.la)
-+	%%LIBTOOL%% --mode=compile $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. -I. -I/usr/local/include    $(CFLAGS) -c shpopen.c
-+	%%LIBTOOL%% --mode=compile $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. -I. -I/usr/local/include    $(CFLAGS) -c shptree.c
-+	%%LIBTOOL%% --mode=compile $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. -I. -I/usr/local/include    $(CFLAGS) -c dbfopen.c
-+	%%LIBTOOL%% --mode=link $(CC)  $(CFLAGS)  -o libshp.la -rpath %%PREFIX%%lib -version-info 1:1:0 shpopen.lo shptree.lo dbfopen.lo  
++	%%LIBTOOL%% --mode=compile --tag=CXX $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I%%PREFIX%%/include $(CFLAGS) -c shpopen.c
++	%%LIBTOOL%% --mode=compile --tag=CXX $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I%%PREFIX%%/include $(CFLAGS) -c shptree.c
++	%%LIBTOOL%% --mode=compile --tag=CXX $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I%%PREFIX%%/include $(CFLAGS) -c dbfopen.c
++	%%LIBTOOL%% --mode=link --tag=CXX $(CC) $(CFLAGS) -o libshp.la -rpath %%PREFIX%%/lib -version-info 1:1:0 shpopen.lo shptree.lo dbfopen.lo
  
  lib_install:
 -	cp .libs/libshp.la .libs/libshp.lai
diff -ruN --exclude=CVS /usr/ports/devel/shapelib/files/patch-contrib-Makefile /usr/ports/sunpoet/shapelib/files/patch-contrib-Makefile
--- /usr/ports/devel/shapelib/files/patch-contrib-Makefile	1970-01-01 08:00:00.000000000 +0800
+++ /usr/ports/sunpoet/shapelib/files/patch-contrib-Makefile	2007-01-12 01:52:20.000000000 +0800
@@ -0,0 +1,48 @@
+--- contrib/Makefile.orig	Mon Apr  7 21:03:22 2003
++++ contrib/Makefile	Thu Jan 11 22:11:31 2007
+@@ -3,9 +3,9 @@
+ #CFLAGS	=	-g
+ 
+ # Endian: define either _LITTLE_ENDIAN or _BIG_ENDIAN
+-ENDIAN	=	-D_LITTLE_ENDIAN
++#ENDIAN	=	-D_LITTLE_ENDIAN
+ 
+-CFLAGS	=	-g -I.. -DPROJ4 $(ENDIAN) -DDEBUG -DDEBUG2 
++CFLAGS	+=	-g -I.. %%PROJ%% %%ENDIAN%% -DDEBUG -DDEBUG2 %%PROJ%% -I%%PREFIX%%/include -L%%PREFIX%%/lib
+ 
+ SHPOBJ	=	../shpopen.o ../dbfopen.o 
+ 
+@@ -15,7 +15,32 @@
+ 
+ default:	all
+ 
+-all:	shpdxf shpproj dbfinfo shpcentrd shpdata shpwkb dbfinfo dbfcat shpinfo shpfix shpcat
++#all:	shpdxf shpproj dbfinfo shpcentrd shpdata shpwkb dbfinfo dbfcat shpinfo shpfix shpcat
++
++.if defined(PROJ4)
++all:		allprog allproj
++install:	allprog_install allproj_install
++.else
++all:		allprog
++install:	allprog_install
++.endif
++
++ALLPROG=	dbfcat dbfinfo shpcat shpdxf shpfix
++ALLPROJ=	shpcentrd shpdata shpinfo shpproj shpwkb
++
++allprog:	$(ALLPROG)
++
++allprog_install:	$(ALLPROG)
++.for _ALLPROG in ${ALLPROG}
++	%%INSTALL%% -c -m 755 ${_ALLPROG} %%PREFIX%%/bin/${_ALLPROG}
++.endfor
++
++allproj:	$(ALLPROJ)
++
++allproj_install:	$(ALLPROJ)
++.for _ALLPROJ in ${ALLPROJ}
++	%%INSTALL%% -c -m 755 ${_ALLPROJ} %%PREFIX%%/bin/${_ALLPROJ}
++.endfor
+ 
+ clean:  
+ 	rm -f shpdxf shpproj dbfinfo shpcentrd shpdata shpwkb dbfcat dbfinfo shpinfo shpfix shpcat *.o
diff -ruN --exclude=CVS /usr/ports/devel/shapelib/files/patch-shapefil.h /usr/ports/sunpoet/shapelib/files/patch-shapefil.h
--- /usr/ports/devel/shapelib/files/patch-shapefil.h	1970-01-01 08:00:00.000000000 +0800
+++ /usr/ports/sunpoet/shapelib/files/patch-shapefil.h	2007-01-12 01:48:42.000000000 +0800
@@ -0,0 +1,11 @@
+--- shapefil.h.orig	Mon Apr  7 21:03:22 2003
++++ shapefil.h	Fri Jan 12 01:46:29 2007
+@@ -115,6 +115,8 @@
+  */
+ 
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ 
+ #ifdef USE_DBMALLOC
+ #include <dbmalloc.h>
diff -ruN --exclude=CVS /usr/ports/devel/shapelib/files/patch-shputils.c /usr/ports/sunpoet/shapelib/files/patch-shputils.c
--- /usr/ports/devel/shapelib/files/patch-shputils.c	1970-01-01 08:00:00.000000000 +0800
+++ /usr/ports/sunpoet/shapelib/files/patch-shputils.c	2008-01-14 10:34:10.000000000 +0800
@@ -0,0 +1,20 @@
+--- shputils.c.orig	Mon Apr  7 21:03:22 2003
++++ shputils.c	Tue Dec 12 21:28:33 2006
+@@ -274,7 +274,7 @@
+                 if (factor == 0)
+                 {
+                   if (infactor ==0)
+-                  { puts("ERROR: Input unit must be defined before output unit"); exit(); }
++                  { puts("ERROR: Input unit must be defined before output unit"); exit( 1 ); }
+                   factor=infactor/outfactor;
+                 }
+                 printf("Output file coordinate values will be factored by %lg\n",factor);
+@@ -319,7 +319,7 @@
+     {
+     	ti = DBFGetFieldCount( hDBF );
+ 	showitems();
+-	exit(0);
++	exit( 0 );
+     }
+      
+     if (iclip) check_theme_bnd();
diff -ruN --exclude=CVS /usr/ports/devel/shapelib/pkg-plist /usr/ports/sunpoet/shapelib/pkg-plist
--- /usr/ports/devel/shapelib/pkg-plist	2006-02-24 16:42:28.000000000 +0800
+++ /usr/ports/sunpoet/shapelib/pkg-plist	2008-01-14 11:47:53.000000000 +0800
@@ -1,9 +1,30 @@
+bin/shpcreate
+bin/shpadd
+bin/shpdump
+bin/shprewind
+bin/dbfcreate
+bin/dbfadd
+bin/dbfdump
+bin/shptest
+bin/shputils
+bin/shptreedump
+ at comment contrib/
+bin/dbfcat
+bin/dbfinfo
+bin/shpcat
+bin/shpdxf
+bin/shpfix
+%%PROJ%%bin/shpcentrd
+%%PROJ%%bin/shpdata
+%%PROJ%%bin/shpinfo
+%%PROJ%%bin/shpproj
+%%PROJ%%bin/shpwkb
 include/shapefil.h
 lib/libshp.a
 lib/libshp.la
 lib/libshp.so
 lib/libshp.so.1
-share/doc/shapelib/dbf_api.html
-share/doc/shapelib/shapelib.html
-share/doc/shapelib/shp_api.html
- at dirrm share/doc/shapelib
+%%PORTDOCS%%%%DOCSDIR%%/dbf_api.html
+%%PORTDOCS%%%%DOCSDIR%%/shapelib.html
+%%PORTDOCS%%%%DOCSDIR%%/shp_api.html
+ at dirrm %%DOCSDIR%%
--- shapelib-1.2.10_2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list