1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-01 22:05:08 +00:00
freebsd-ports/science/hdf5/scripts/post-patch
Tim Vanderhoek 9ba070b296 Respect prefix. Make this build on -current by changing
"cc /usr/lib/libz.a" to "cc -lz".
1998-08-21 21:40:02 +00:00

84 lines
1.8 KiB
Bash

#!/bin/sh
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^CFLAGS = -ansi -O"`
do
patch -p << END_OF_PATCH
--- $f.orig
+++ $f
@@ -72,1 +72,1 @@
-CFLAGS = -ansi -O
+#CFLAGS = -ansi -O
END_OF_PATCH
done
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^ZLIB_LIB = "`
do
patch -p << END_OF_PATCH
--- $f.orig
+++ $f
@@ -72,1 +72,1 @@
-ZLIB_LIB = \$(TOP_SRCDIR)/hdf/zlib/libz.a
+#ZLIB_LIB = \$(TOP_SRCDIR)/hdf/zlib/libz.a
END_OF_PATCH
done
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^JPEG_LIB = "`
do
patch -p << END_OF_PATCH
--- $f.orig
+++ $f
@@ -72,1 +72,1 @@
-JPEG_LIB = \$(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
+#JPEG_LIB = \$(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
END_OF_PATCH
done
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^ZLIBLIB="`
do
patch -p << END_OF_PATCH
--- $f.orig
+++ $f
@@ -72,2 +72,2 @@
-ZLIBINC=\$(srcdir)/../zlib
-ZLIBLIB=\$(srcdir)/../zlib
+ZLIBINC=/usr/include
+ZLIBLIB=-lz \$(pwrkdir)
END_OF_PATCH
done
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^ZLIBLIB="`
do
patch -p << END_OF_PATCH
--- $f.orig
+++ $f
@@ -72,2 +72,2 @@
-ZLIBLIB=\$(srcdir)/../zlib
-ZLIBINC=\$(srcdir)/../zlib
+ZLIBLIB=-lz \$(pwrkdir)
+ZLIBINC=/usr/include
END_OF_PATCH
done
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^JPEGLIB="`
do
patch -p << END_OF_PATCH
--- $f.orig
+++ $f
@@ -72,2 +72,2 @@
-JPEGINC=\$(srcdir)/../jpeg
-JPEGLIB=\$(srcdir)/../jpeg
+JPEGINC=\$(prefix)/include
+JPEGLIB=\$(prefix)/lib
END_OF_PATCH
done
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^JPEGLIB="`
do
patch -p << END_OF_PATCH
--- $f.orig
+++ $f
@@ -72,2 +72,2 @@
-JPEGLIB=\$(srcdir)/../jpeg
-JPEGINC=\$(srcdir)/../jpeg
+JPEGLIB=\$(prefix)/lib
+JPEGINC=\$(prefix)/include
END_OF_PATCH
done