Репозиторий Sisyphus
Последнее обновление: 27 ноября 2022 | Пакетов: 17929 | Посещений: 25410283
en ru br
Репозитории ALT

Группа :: Разработка/C
Пакет: libshape

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: shapelib-1.3.0b1-Makefile.patch
Скачать


diff -Naur shapelib-1.2.10/Makefile shapelib-1.2.10-mod/Makefile
--- shapelib-1.2.10/Makefile	2007-12-13 22:27:13.000000000 +0200
+++ shapelib-1.2.10-mod/Makefile	2010-02-19 09:59:18.000000000 +0200
@@ -6,6 +6,13 @@
 INSTALL = /usr/bin/install
 LD = /usr/bin/ld
 #CC = g++
+bindir = /usr/local/bin
+libdir = /usr/local/lib
+includedir = /usr/local/include
+
+CC = gcc
+CFLAGS =       -g
+
 
 default:	all
 
@@ -103,29 +110,34 @@
 # 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
+SHPLIB_VERSION=1.3.1
 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
+	/bin/sh ./libtool --mode=compile $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CFLAGS) $(LINKOPTS) -c shpopen.c
+	$(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c  -fPIC -DPIC shpopen.c -o .libs/shpopen.lo
+	$(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -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
+	/bin/sh ./libtool --mode=compile $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CFLAGS) $(LINKOPTS) -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
+	$(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c  -fPIC -DPIC shptree.c -o .libs/shptree.lo
+	$(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -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
+	/bin/sh ./libtool --mode=compile $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CFLAGS) $(LINKOPTS) -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
+	$(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c  -fPIC -DPIC dbfopen.c -o .libs/dbfopen.lo
+	$(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -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  
+	/bin/sh ./libtool --mode=compile $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. -I. $(CFLAGS) $(LINKOPTS) -c safileio.c
+	rm -f .libs/safileio.lo
+	$(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c  -fPIC -DPIC safileio.c -o .libs/safileio.lo
+	$(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. $(CFLAGS) $(LINKOPTS) -c safileio.c -o safileio.o >/dev/null 2>&1
+	mv -f .libs/safileio.lo safileio.lo
+	/bin/sh ./libtool --mode=link $(CC) $(CFLAGS) $(LINKOPTS)  -o libshp.la -rpath $(libdir) -version-info 1:1:0 shpopen.lo shptree.lo dbfopen.lo safileio.lo
 	rm -fr .libs/libshp.la .libs/libshp.* .libs/libshp.*
 	rm -fr .libs/libshp.lax
 	mkdir .libs/libshp.lax
-	$(LD) -G -h libshp.so.1 -o .libs/libshp.so.$(LIBSHP_VERSION)  shpopen.lo shptree.lo dbfopen.lo  -lc
+	$(LD) -G -h libshp.so.1 -o .libs/libshp.so.$(LIBSHP_VERSION)  shpopen.lo shptree.lo dbfopen.lo safileio.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)
@@ -136,15 +148,21 @@
 
 lib_install:
 	cp .libs/libshp.la .libs/libshp.lai
-	/bin/sh ./mkinstalldirs /usr/local/lib
-	/bin/sh ./libtool  --mode=install $(INSTALL) -c libshp.la /usr/local/lib/libshp.la
-	$(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)
-	$(INSTALL) -c .libs/libshp.la /usr/local/lib/libshp.la
-	$(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
-	$(INSTALL) -c -m 644 shapefil.h /usr/local/include/libshp/shapefil.h
+	/bin/sh ./mkinstalldirs $(libdir)
+	/bin/sh ./libtool  --mode=install $(INSTALL) -c libshp.la $(libdir)/libshp.la
+	$(INSTALL) -c .libs/libshp.so.$(LIBSHP_VERSION) $(libdir)/libshp.so.$(LIBSHP_VERSION)
+	(cd $(libdir) && rm -f libshp.so.1 && ln -s libshp.so.$(LIBSHP_VERSION) libshp.so.1)
+	(cd $(libdir) && rm -f libshp.so && ln -s libshp.so.$(LIBSHP_VERSION) libshp.so)
+	chmod +x $(libdir)/libshp.so.$(LIBSHP_VERSION)
+	$(INSTALL) -c .libs/libshp.la $(libdir)/libshp.la
+	$(INSTALL) -c .libs/libshp.a $(libdir)/libshp.a
+	ranlib $(libdir)/libshp.a
+	chmod 644 $(libdir)/libshp.a
+	/bin/sh ./mkinstalldirs $(includedir)/libshp
+	$(INSTALL) -c -m 644 shapefil.h $(includedir)/libshp/shapefil.h
+	
+bin_install: all
+	mkdir -p $(bindir)
+	install dbfadd dbfcreate dbfdump shpadd shpcreate shpdump shptest $(bindir)/
+
+install: bin_install lib_install
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin