$NetBSD: patch-aa,v 1.3 2009/11/26 00:42:19 joerg Exp $ --- Makefile.orig 2003-04-07 15:03:22.000000000 +0200 +++ Makefile @@ -91,52 +91,16 @@ test3: 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) + ${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 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 + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} -c libshp.la ${DESTDIR}${PREFIX}/lib/libshp.la + ${BSD_INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/libshp + ${BSD_INSTALL_DATA} -c -m 644 shapefil.h ${DESTDIR}${PREFIX}/include/libshp/shapefil.h