Index: head/devel/shapelib/files/patch-Makefile =================================================================== --- head/devel/shapelib/files/patch-Makefile (revision 427175) +++ head/devel/shapelib/files/patch-Makefile (revision 427176) @@ -1,52 +1,52 @@ ---- Makefile.orig 2011-07-24 12:32:26.000000000 +0800 -+++ Makefile 2013-10-13 21:38:40.590435497 +0800 +--- Makefile.orig 2011-07-24 04:32:26 UTC ++++ Makefile @@ -1,16 +1,19 @@ -PREFIX = /usr/local -CFLAGS = -g -Wall -fPIC +PREFIX ?= /usr/local +CFLAGS += -Wall -fPIC #CFLAGS = -g -DUSE_CPL #CC = g++ LIBOBJ = shpopen.o dbfopen.o safileio.o shptree.o SHPBIN = shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump \ - shptreedump + shptreedump shputils shptest default: all -all: $(SHPBIN) shptest lib +all: $(SHPBIN) lib contrib_tools + +contrib_tools: + (cd contrib/; ${MAKE} %%PROJ%% all; cd ..) shpopen.o: shpopen.c shapefil.h $(CC) $(CFLAGS) -c shpopen.c @@ -98,16 +101,21 @@ lib: libshp.a + $(CC) -shared -Wl,-soname,libshp.so.1 -o libshp.so.1 $(LDFLAGS) dbfopen.o safileio.o shpopen.o shptree.o libshp.a: $(LIBOBJ) ar r libshp.a $(LIBOBJ) lib_install: libshp.a - cp libshp.a $(PREFIX)/lib - cp shapefil.h $(PREFIX)/include + $(BSD_INSTALL_DATA) shapefil.h $(DESTDIR)$(PREFIX)/include/ + $(BSD_INSTALL_DATA) libshp.a $(DESTDIR)$(PREFIX)/lib/ + $(BSD_INSTALL_LIB) libshp.so.1 $(DESTDIR)$(PREFIX)/lib/ bin_install: $(SHPBIN) - cp $(SHPBIN) $(PREFIX)/bin + $(BSD_INSTALL_PROGRAM) $(SHPBIN) $(DESTDIR)$(PREFIX)/bin/ + +contrib_install: + (cd contrib/; ${MAKE} %%PROJ%% install; cd ..) -install: lib_install bin_install +install: lib_install bin_install contrib_install Index: head/devel/shapelib/files/patch-contrib-Makefile =================================================================== --- head/devel/shapelib/files/patch-contrib-Makefile (revision 427175) +++ head/devel/shapelib/files/patch-contrib-Makefile (revision 427176) @@ -1,43 +1,43 @@ ---- contrib/Makefile.orig 2010-01-04 12:08:02.000000000 +0800 -+++ contrib/Makefile 2013-10-13 21:39:57.405429171 +0800 +--- contrib/Makefile.orig 2010-01-04 04:08:02 UTC ++++ contrib/Makefile @@ -3,19 +3,36 @@ #CFLAGS = -g # Endian: define either _LITTLE_ENDIAN or _BIG_ENDIAN -ENDIAN = -D_LITTLE_ENDIAN +#ENDIAN = -D_LITTLE_ENDIAN -CFLAGS = -g -I.. -I$(HOME)/bld/include -DPROJ4 $(ENDIAN) -DDEBUG -DDEBUG2 +CFLAGS += %%ENDIAN%% %%PROJ%% -I.. -I$(LOCALBASE)/include -L$(LOCALBASE)/lib SHPOBJ = ../shpopen.o ../dbfopen.o ../safileio.o SHPGOBJ = ../shpopen.o ../dbfopen.o ../safileio.o shpgeo.o -GEOOBJ = ./shpgeo.o -lm -L$(HOME)/bld/lib -lproj +GEOOBJ = ./shpgeo.o -lm -lproj default: all -all: shpdxf shpproj dbfinfo shpcentrd shpdata shpwkb dbfinfo dbfcat shpinfo shpfix shpcat Shape_PointInPoly shpsort +#all: shpdxf shpproj dbfinfo shpcentrd shpdata shpwkb dbfinfo dbfcat shpinfo shpfix shpcat Shape_PointInPoly shpsort + +ALLPROG= Shape_PointInPoly dbfcat dbfinfo shpcat shpdxf shpfix shpsort +ALLPROJ= shpcentrd shpdata shpinfo shpproj shpwkb + +.if defined(NO_PROJ4) +all: $(ALLPROG) +install: allprog_install +.else +all: $(ALLPROG) $(ALLPROJ) +install: allprog_install allproj_install +.endif + +allprog_install: $(ALLPROG) + $(BSD_INSTALL_PROGRAM) $(ALLPROG) $(DESTDIR)$(PREFIX)/bin/ + +allproj_install: $(ALLPROJ) + $(BSD_INSTALL_PROGRAM) $(ALLPROJ) $(DESTDIR)$(PREFIX)/bin/ clean: rm -f shpdxf shpproj dbfinfo shpcentrd shpdata shpwkb dbfcat dbfinfo shpinfo shpfix shpcat *.o Index: head/devel/shapelib/files/patch-shapefil.h =================================================================== --- head/devel/shapelib/files/patch-shapefil.h (revision 427175) +++ head/devel/shapelib/files/patch-shapefil.h (revision 427176) @@ -1,11 +1,11 @@ ---- shapefil.h.orig 2011-07-24 14:15:51.000000000 +0800 -+++ shapefil.h 2011-12-24 03:00:00.000000000 +0800 +--- shapefil.h.orig 2011-07-24 06:15:51 UTC ++++ shapefil.h @@ -138,6 +138,8 @@ */ #include +#include +#include #ifdef USE_DBMALLOC #include