diff options
-rw-r--r-- | community/gen2shp/PKGBUILD | 8 | ||||
-rw-r--r-- | community/gen2shp/link.patch | 11 | ||||
-rw-r--r-- | community/shapelib/PKGBUILD | 9 |
3 files changed, 23 insertions, 5 deletions
diff --git a/community/gen2shp/PKGBUILD b/community/gen2shp/PKGBUILD index 2859477ec..d0379a3ef 100644 --- a/community/gen2shp/PKGBUILD +++ b/community/gen2shp/PKGBUILD @@ -10,14 +10,18 @@ arch=('i686' 'x86_64' 'mips64el') url='http://www.intevation.de/~jan/gen2shp/' license=('GPL') depends=('glibc' 'shapelib') -source=("http://web.archive.org/web/20110716144136/http://intevation.de/~jan/gen2shp/$pkgname-$pkgver.tar.gz") -md5sums=('1cf9f1c2097825ef96290f7e9a7eb195') +source=("http://web.archive.org/web/20110716144136/http://intevation.de/~jan/gen2shp/$pkgname-$pkgver.tar.gz" + "link.patch") +md5sums=('1cf9f1c2097825ef96290f7e9a7eb195' + 'cc9ad41a7577c0cbfebb637d3a83c2aa') build() { cd "$pkgname-$pkgver" # fix conflicting function names sed -i 's/getline/get_line/' gen2shp.c utils.c utils.h + # Fix linking. + patch -p1 -i "$srcdir/link.patch" make } diff --git a/community/gen2shp/link.patch b/community/gen2shp/link.patch new file mode 100644 index 000000000..71e40de1b --- /dev/null +++ b/community/gen2shp/link.patch @@ -0,0 +1,11 @@ +--- gen2shp-0.3.1/Makefile.orig 2013-03-18 12:20:49.925820131 +0100 ++++ gen2shp-0.3.1/Makefile 2013-03-18 12:20:57.757895932 +0100 +@@ -10,7 +10,7 @@ + $(CC) -c utils.c + + gen2shp: gen2shp.c utils.o +- $(CC) $(CFLAGS) -o $@ -lshp gen2shp.c utils.o ++ $(CC) $(CFLAGS) -o $@ gen2shp.c utils.o -lshp + + test: gen2shp + rm -f pnttest.dbf pnttest.shp pnttest.shx diff --git a/community/shapelib/PKGBUILD b/community/shapelib/PKGBUILD index 2ea1983d6..76a74eca6 100644 --- a/community/shapelib/PKGBUILD +++ b/community/shapelib/PKGBUILD @@ -5,7 +5,7 @@ pkgname=shapelib pkgver=1.3.0 -pkgrel=1 +pkgrel=1.1 pkgdesc='simple C API for reading and writing ESRI Shapefiles' arch=('i686' 'x86_64' 'mips64el') url='http://shapelib.maptools.org/' @@ -18,6 +18,8 @@ sha256sums=('23d474016158ab5077db2f599527631706ba5c0dc7c4178a6a1d685bb014f68f' build() { cd "$pkgname-$pkgver" + + sed -ri "s:^(CFLAGS\s*=\s*):\1 ${CFLAGS} :" Makefile make lib } @@ -25,7 +27,8 @@ build() { package() { cd "$pkgname-$pkgver" - install -d "$pkgdir/usr/lib" "$pkgdir/usr/include" - make PREFIX="$pkgdir/usr lib_install" + # The Makefile won't install it correctly, this is easier. + install -D -m644 libshp.a "$pkgdir/usr/lib/libshp.a" + install -D -m644 shapefil.h "$pkgdir/usr/include/libshp/shapefil.h" install -D -m644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |