import shapelib 1.2.10
The Shapefile C Library provides the ability to write simple C programs for reading, writing and updating (to a limited extent) ESRI Shapefiles, and the associated attribute file (.dbf). from jason@
This commit is contained in:
parent
d806139ed5
commit
e7da1f54df
21
devel/shapelib/Makefile
Normal file
21
devel/shapelib/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2006/10/08 16:57:08 jasper Exp $
|
||||
|
||||
COMMENT= "shapefile manipulation library"
|
||||
|
||||
DISTNAME= shapelib-1.2.10
|
||||
SHARED_LIBS= shp 1.2
|
||||
CATEGORIES= devel
|
||||
|
||||
HOMEPAGE= http://shapelib.maptools.org/
|
||||
|
||||
MAINTAINER= Jason Wright <jason@openbsd.org>
|
||||
|
||||
# LGPL
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
MASTER_SITES= http://dl.maptools.org/dl/shapelib/
|
||||
|
||||
.include <bsd.port.mk>
|
4
devel/shapelib/distinfo
Normal file
4
devel/shapelib/distinfo
Normal file
@ -0,0 +1,4 @@
|
||||
MD5 (shapelib-1.2.10.tar.gz) = 4d96bd926167193d27bf14d56e2d484e
|
||||
RMD160 (shapelib-1.2.10.tar.gz) = 9dcd90d5197aa7d6063a703a369a530f6aa1f1c3
|
||||
SHA1 (shapelib-1.2.10.tar.gz) = 436b09b6a90f403e4568460d67560d5730725651
|
||||
SIZE (shapelib-1.2.10.tar.gz) = 167219
|
156
devel/shapelib/patches/patch-Makefile
Normal file
156
devel/shapelib/patches/patch-Makefile
Normal file
@ -0,0 +1,156 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1.1.1 2006/10/08 16:57:08 jasper Exp $
|
||||
--- Makefile.orig Mon Apr 7 09:03:22 2003
|
||||
+++ Makefile Fri Aug 11 16:03:50 2006
|
||||
@@ -1,142 +1,14 @@
|
||||
|
||||
-#LINKOPT = /usr/local/lib/libdbmalloc.a
|
||||
-CFLAGS = -g
|
||||
+CFLAGS ?= -g -O
|
||||
+PREFIX ?= /usr/local
|
||||
+SRCS= shpopen.c shptree.c dbfopen.c
|
||||
+LIB= shp
|
||||
|
||||
-default: all
|
||||
+LIBDIR= $(TRUEPREFIX)/lib
|
||||
+INCDIR= $(PREFIX)/include
|
||||
|
||||
-all: shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump shptest
|
||||
+afterinstall:
|
||||
+ install -d -m 755 -o root -g bin $(INCDIR)/libshp
|
||||
+ install -c -m 644 -o root -g bin shapefil.h $(INCDIR)/libshp
|
||||
|
||||
-shpopen.o: shpopen.c shapefil.h
|
||||
- $(CC) $(CFLAGS) -c shpopen.c
|
||||
-
|
||||
-shptree.o: shptree.c shapefil.h
|
||||
- $(CC) $(CFLAGS) -c shptree.c
|
||||
-
|
||||
-dbfopen.o: dbfopen.c shapefil.h
|
||||
- $(CC) $(CFLAGS) -c dbfopen.c
|
||||
-
|
||||
-shpcreate: shpcreate.c shpopen.o
|
||||
- $(CC) $(CFLAGS) shpcreate.c shpopen.o $(LINKOPT) -o shpcreate
|
||||
-
|
||||
-shpadd: shpadd.c shpopen.o
|
||||
- $(CC) $(CFLAGS) shpadd.c shpopen.o $(LINKOPT) -o shpadd
|
||||
-
|
||||
-shpdump: shpdump.c shpopen.o
|
||||
- $(CC) $(CFLAGS) shpdump.c shpopen.o $(LINKOPT) -o shpdump
|
||||
-
|
||||
-shprewind: shprewind.c shpopen.o
|
||||
- $(CC) $(CFLAGS) shprewind.c shpopen.o $(LINKOPT) -o shprewind
|
||||
-
|
||||
-dbfcreate: dbfcreate.c dbfopen.o
|
||||
- $(CC) $(CFLAGS) dbfcreate.c dbfopen.o $(LINKOPT) -o dbfcreate
|
||||
-
|
||||
-dbfadd: dbfadd.c dbfopen.o
|
||||
- $(CC) $(CFLAGS) dbfadd.c dbfopen.o $(LINKOPT) -o dbfadd
|
||||
-
|
||||
-dbfdump: dbfdump.c dbfopen.o
|
||||
- $(CC) $(CFLAGS) dbfdump.c dbfopen.o $(LINKOPT) -o dbfdump
|
||||
-
|
||||
-shptest: shptest.c shpopen.o
|
||||
- $(CC) $(CFLAGS) shptest.c shpopen.o $(LINKOPT) -o shptest
|
||||
-
|
||||
-shputils: shputils.c shpopen.o dbfopen.o
|
||||
- $(CC) $(CFLAGS) shputils.c shpopen.o dbfopen.o $(LINKOPT) -o shputils
|
||||
-
|
||||
-shptreedump: shptreedump.c shptree.o shpopen.o
|
||||
- $(CC) $(CFLAGS) shptreedump.c shptree.o shpopen.o $(LINKOPT) \
|
||||
- -o shptreedump
|
||||
-
|
||||
-clean:
|
||||
- rm -f *.o dbfdump dbfcreate dbfadd shpdump shpcreate shpadd shputils
|
||||
- rm -f shptreedump
|
||||
- rm -rf *.lo *.la .libs
|
||||
- rm -f shptest
|
||||
-
|
||||
-test: test2 test3
|
||||
-
|
||||
-#
|
||||
-# Note this stream only works if example data is accessable.
|
||||
-# Fetch ftp://gdal.velocet.ca/pub/outgoing/shape_eg_data.zip
|
||||
-#
|
||||
-test1:
|
||||
- @./stream1.sh > s1.out
|
||||
- @if test "`diff s1.out stream1.out`" = '' ; then \
|
||||
- echo "******* Stream 1 Succeeded *********"; \
|
||||
- rm s1.out; \
|
||||
- else \
|
||||
- echo "******* Stream 1 Failed *********"; \
|
||||
- diff s1.out stream1.out; \
|
||||
- fi
|
||||
-
|
||||
-test2:
|
||||
- @./stream2.sh > s2.out
|
||||
- @if test "`diff s2.out stream2.out`" = '' ; then \
|
||||
- echo "******* Stream 2 Succeeded *********"; \
|
||||
- rm s2.out; \
|
||||
- rm test*.s??; \
|
||||
- else \
|
||||
- echo "******* Stream 2 Failed *********"; \
|
||||
- diff s2.out stream2.out; \
|
||||
- fi
|
||||
-
|
||||
-test3:
|
||||
- @./makeshape.sh > s3.out
|
||||
- @if test "`diff s3.out stream3.out`" = '' ; then \
|
||||
- echo "******* Stream 3 Succeeded *********"; \
|
||||
- rm s3.out; \
|
||||
- rm test.*; \
|
||||
- else \
|
||||
- echo "******* Stream 3 Failed *********"; \
|
||||
- diff s3.out stream3.out; \
|
||||
- fi
|
||||
-
|
||||
-
|
||||
-# -----------------------------------------------------------------------------
|
||||
-# The following is contributed by Jan-Oliver Wagner, and should allow for
|
||||
-# creating shared libraries on most platforms with gcc, and libtool installed.
|
||||
-
|
||||
-SHPLIB_VERSION=1.2.9
|
||||
-LIBSHP_VERSION=1.0.1 # still once to be changed manually (see for 1:1:0), sorry
|
||||
-
|
||||
-lib:
|
||||
- /bin/sh ./libtool --mode=compile gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c shpopen.c
|
||||
- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c -fPIC -DPIC shpopen.c -o .libs/shpopen.lo
|
||||
- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c shpopen.c -o shpopen.o >/dev/null 2>&1
|
||||
- mv -f .libs/shpopen.lo shpopen.lo
|
||||
- /bin/sh ./libtool --mode=compile gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c shptree.c
|
||||
- rm -f .libs/shptree.lo
|
||||
- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c -fPIC -DPIC shptree.c -o .libs/shptree.lo
|
||||
- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c shptree.c -o shptree.o >/dev/null 2>&1
|
||||
- mv -f .libs/shptree.lo shptree.lo
|
||||
- /bin/sh ./libtool --mode=compile gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c dbfopen.c
|
||||
- rm -f .libs/dbfopen.lo
|
||||
- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c -fPIC -DPIC dbfopen.c -o .libs/dbfopen.lo
|
||||
- gcc -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include -g -O2 -c dbfopen.c -o dbfopen.o >/dev/null 2>&1
|
||||
- mv -f .libs/dbfopen.lo dbfopen.lo
|
||||
- /bin/sh ./libtool --mode=link gcc -g -O2 -o libshp.la -rpath /usr/local/lib -version-info 1:1:0 shpopen.lo shptree.lo dbfopen.lo
|
||||
- rm -fr .libs/libshp.la .libs/libshp.* .libs/libshp.*
|
||||
- rm -fr .libs/libshp.lax
|
||||
- mkdir .libs/libshp.lax
|
||||
- /usr/bin/ld -G -h libshp.so.1 -o .libs/libshp.so.$(LIBSHP_VERSION) shpopen.lo shptree.lo dbfopen.lo -lc
|
||||
-
|
||||
- (cd .libs && rm -f libshp.so.1 && ln -s libshp.so.$(LIBSHP_VERSION) libshp.so.1)
|
||||
- (cd .libs && rm -f libshp.so && ln -s libshp.so.$(LIBSHP_VERSION) libshp.so)
|
||||
- ar cru .libs/libshp.a shpopen.o shptree.o dbfopen.o
|
||||
- ranlib .libs/libshp.a
|
||||
- rm -fr .libs/libshp.lax
|
||||
- (cd .libs && rm -f libshp.la && ln -s ../libshp.la libshp.la)
|
||||
-
|
||||
-lib_install:
|
||||
- cp .libs/libshp.la .libs/libshp.lai
|
||||
- /bin/sh ./mkinstalldirs /usr/local/lib
|
||||
- /bin/sh ./libtool --mode=install /usr/bin/install -c libshp.la /usr/local/lib/libshp.la
|
||||
- /usr/bin/install -c .libs/libshp.so.$(LIBSHP_VERSION) /usr/local/lib/libshp.so.$(LIBSHP_VERSION)
|
||||
- (cd /usr/local/lib && rm -f libshp.so.1 && ln -s libshp.so.$(LIBSHP_VERSION) libshp.so.1)
|
||||
- (cd /usr/local/lib && rm -f libshp.so && ln -s libshp.so.$(LIBSHP_VERSION) libshp.so)
|
||||
- chmod +x /usr/local/lib/libshp.so.$(LIBSHP_VERSION)
|
||||
- /usr/bin/install -c .libs/libshp.la /usr/local/lib/libshp.la
|
||||
- /usr/bin/install -c .libs/libshp.a /usr/local/lib/libshp.a
|
||||
- ranlib /usr/local/lib/libshp.a
|
||||
- chmod 644 /usr/local/lib/libshp.a
|
||||
- /bin/sh ./mkinstalldirs /usr/local/include/libshp
|
||||
- /usr/bin/install -c -m 644 shapefil.h /usr/local/include/libshp/shapefil.h
|
||||
+.include <bsd.lib.mk>
|
6
devel/shapelib/patches/patch-shlib_version
Normal file
6
devel/shapelib/patches/patch-shlib_version
Normal file
@ -0,0 +1,6 @@
|
||||
$OpenBSD: patch-shlib_version,v 1.1.1.1 2006/10/08 16:57:08 jasper Exp $
|
||||
--- shlib_version.orig Fri Aug 11 16:03:06 2006
|
||||
+++ shlib_version Fri Aug 11 16:03:06 2006
|
||||
@@ -0,0 +1,2 @@
|
||||
+major=1
|
||||
+minor=2
|
3
devel/shapelib/pkg/DESCR
Normal file
3
devel/shapelib/pkg/DESCR
Normal file
@ -0,0 +1,3 @@
|
||||
The Shapefile C Library provides the ability to write simple C programs
|
||||
for reading, writing and updating (to a limited extent) ESRI Shapefiles,
|
||||
and the associated attribute file (.dbf).
|
2
devel/shapelib/pkg/PFRAG.shared
Normal file
2
devel/shapelib/pkg/PFRAG.shared
Normal file
@ -0,0 +1,2 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2006/10/08 16:57:08 jasper Exp $
|
||||
@lib lib/libshp.so.${LIBshp_VERSION}
|
7
devel/shapelib/pkg/PLIST
Normal file
7
devel/shapelib/pkg/PLIST
Normal file
@ -0,0 +1,7 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2006/10/08 16:57:08 jasper Exp $
|
||||
%%SHARED%%
|
||||
include/libshp/
|
||||
include/libshp/shapefil.h
|
||||
lib/libshp.a
|
||||
lib/libshp_p.a
|
||||
lib/libshp_pic.a
|
Loading…
Reference in New Issue
Block a user