diff options
author | ade <ade@FreeBSD.org> | 2006-02-23 18:40:44 +0800 |
---|---|---|
committer | ade <ade@FreeBSD.org> | 2006-02-23 18:40:44 +0800 |
commit | da880765886f48c0ac8fd253e5601d04ea853215 (patch) | |
tree | 55155f50e8a40ea2e2a16e2331e8cbb919b7d04f /devel/shapelib | |
parent | ba4beb1ea11e6147a9b30969be42685d1c709e56 (diff) | |
download | freebsd-ports-gnome-da880765886f48c0ac8fd253e5601d04ea853215.tar.gz freebsd-ports-gnome-da880765886f48c0ac8fd253e5601d04ea853215.tar.zst freebsd-ports-gnome-da880765886f48c0ac8fd253e5601d04ea853215.zip |
Conversion to a single libtool environment.
Approved by: portmgr (kris)
Diffstat (limited to 'devel/shapelib')
-rw-r--r-- | devel/shapelib/Makefile | 16 | ||||
-rw-r--r-- | devel/shapelib/files/patch-Makefile | 77 | ||||
-rw-r--r-- | devel/shapelib/pkg-plist | 1 |
3 files changed, 52 insertions, 42 deletions
diff --git a/devel/shapelib/Makefile b/devel/shapelib/Makefile index ee2aadc95171..4fc6111eff5b 100644 --- a/devel/shapelib/Makefile +++ b/devel/shapelib/Makefile @@ -7,6 +7,7 @@ PORTNAME= shapelib PORTVERSION= 1.2.10 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://dl.maptools.org/dl/shapelib/ @@ -16,15 +17,14 @@ COMMENT= C API for reading and writing ArcView Shapefiles USE_AUTOTOOLS= libtool:15:env ALL_TARGET= lib INSTALLS_SHLIB= yes +USE_REINPLACE= yes +INSTALL_TARGET= lib_install -do-configure: - @${CP} ${LIBTOOL} ${WRKSRC} - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/.libs/libshp.so.1 ${PREFIX}/lib - ${LN} -sf libshp.so.1 ${PREFIX}/lib/libshp.so - ${INSTALL_DATA} ${WRKSRC}/.libs/libshp.a ${PREFIX}/lib/ - ${INSTALL_DATA} ${WRKSRC}/shapefil.h ${PREFIX}/include +post-patch: + @${REINPLACE_CMD} -e 's#%%PREFIX%%#${PREFIX}#g' \ + -e 's#%%LIBTOOL%%#${LIBTOOL}#g' \ + -e 's#%%INSTALL%%#${INSTALL}#g' ${WRKSRC}/Makefile +post-install: ${MKDIR} ${PREFIX}/share/doc/shapelib ${INSTALL_DATA} ${WRKSRC}/*.html ${PREFIX}/share/doc/shapelib diff --git a/devel/shapelib/files/patch-Makefile b/devel/shapelib/files/patch-Makefile index f9f333903518..11c3cff776da 100644 --- a/devel/shapelib/files/patch-Makefile +++ b/devel/shapelib/files/patch-Makefile @@ -1,19 +1,16 @@ ---- Makefile.orig Tue Oct 7 05:32:36 2003 -+++ Makefile Tue Oct 7 05:33:10 2003 -@@ -1,6 +1,6 @@ - +--- 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 -CFLAGS = -g +#CFLAGS = -g - default: all - -@@ -93,33 +93,33 @@ - +@@ -94,49 +94,16 @@ # ----------------------------------------------------------------------------- - # The following is contributed by Jan-Oliver Wagner, and should allow for +-# The following is contributed by Jan-Oliver Wagner, and should allow for -# creating shared libraries on most platforms with gcc, and libtool installed. -+# creating shared libraries on most platforms with $(CC), and libtool installed. ++# A truly insane amount of hackery to make things actually work with ++# libtool-1.5.x -- you'd not believe the garbage that was here before. -SHPLIB_VERSION=1.2.9 -LIBSHP_VERSION=1.0.1 # still once to be changed manually (see for 1:1:0), sorry @@ -24,35 +21,47 @@ - /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. -I. -I/usr/local/include $(CFLAGS) -c shpopen.c -+ $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include $(CFLAGS) -c -fPIC -DPIC shpopen.c -o .libs/shpopen.lo -+ $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include $(CFLAGS) -c shpopen.c -o shpopen.o >/dev/null 2>&1 - mv -f .libs/shpopen.lo shpopen.lo +- 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. -I. -I/usr/local/include $(CFLAGS) -c shptree.c - rm -f .libs/shptree.lo +- 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. -I. -I/usr/local/include $(CFLAGS) -c -fPIC -DPIC shptree.c -o .libs/shptree.lo -+ $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include $(CFLAGS) -c shptree.c -o shptree.o >/dev/null 2>&1 - mv -f .libs/shptree.lo shptree.lo +- 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. -I. -I/usr/local/include $(CFLAGS) -c dbfopen.c - rm -f .libs/dbfopen.lo +- 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. -I. -I/usr/local/include $(CFLAGS) -c -fPIC -DPIC dbfopen.c -o .libs/dbfopen.lo -+ $(CC) -DPACKAGE=\"libshp\" -DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1 -I. -I. -I/usr/local/include $(CFLAGS) -c dbfopen.c -o dbfopen.o >/dev/null 2>&1 - mv -f .libs/dbfopen.lo dbfopen.lo +- 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=link $(CC) $(CFLAGS) -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 - +- 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.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 +- (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 %%INSTALL%% -c libshp.la %%PREFIX%%/lib/libshp.la ++ %%INSTALL%% -c -m 644 shapefil.h %%PREFIX%%/include/shapefil.h diff --git a/devel/shapelib/pkg-plist b/devel/shapelib/pkg-plist index e187f8086422..0d23fe02cc2a 100644 --- a/devel/shapelib/pkg-plist +++ b/devel/shapelib/pkg-plist @@ -1,5 +1,6 @@ include/shapefil.h lib/libshp.a +lib/libshp.la lib/libshp.so lib/libshp.so.1 share/doc/shapelib/dbf_api.html |