You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/mdsplib/files/mdsplib-0.11-gentoo.patch

47 lines
1.7 KiB

diff -ur mdsplib-0.11.orig/Makefile mdsplib-0.11/Makefile
--- mdsplib-0.11.orig/Makefile 2003-12-10 21:56:23.000000000 +0200
+++ mdsplib-0.11/Makefile 2009-08-06 13:33:03.000000000 +0300
@@ -1,5 +1,6 @@
-CC = gcc
-CFLAGS = -O3
+AR ?= ar
+CC ?= gcc
+RANLIB ?= ranlib
LIBS =
library: libmetar.a
@@ -7,11 +8,11 @@
all: dmetar library
libmetar.a: src/antoi.o src/charcmp.o src/dcdmetar.o src/dcdmtrmk.o src/fracpart.o src/prtdmetr.o src/stspack2.o src/stspack3.o
- ar ruv libmetar.a src/antoi.o src/charcmp.o src/dcdmetar.o src/dcdmtrmk.o src/fracpart.o src/prtdmetr.o src/stspack2.o src/stspack3.o
- ranlib libmetar.a
+ $(AR) ruv libmetar.a src/antoi.o src/charcmp.o src/dcdmetar.o src/dcdmtrmk.o src/fracpart.o src/prtdmetr.o src/stspack2.o src/stspack3.o
+ $(RANLIB) libmetar.a
dmetar: src/drvmetar.o libmetar.a
- $(CC) $(CFLAGS) -o dmetar src/drvmetar.o libmetar.a $(LIBS)
+ $(CC) $(LDFLAGS) $(CFLAGS) -o dmetar src/drvmetar.o libmetar.a $(LIBS)
src/antoi.o: src/antoi.c src/local.h
$(CC) $(CFLAGS) -c src/antoi.c -o src/antoi.o
@@ -48,5 +49,5 @@
chmod 0644 /usr/local/include/metar.h
cp libmetar.a /usr/local/lib/
chmod 0644 /usr/local/lib/libmetar.a
- ranlib /usr/local/lib/libmetar.a
+ $(RANLIB) /usr/local/lib/libmetar.a
diff -ur mdsplib-0.11.orig/src/local.h mdsplib-0.11/src/local.h
--- mdsplib-0.11.orig/src/local.h 2003-12-10 23:30:56.000000000 +0200
+++ mdsplib-0.11/src/local.h 2009-08-06 13:27:03.000000000 +0300
@@ -1175,7 +1175,7 @@
char *strupr(char *);
char *strlwr(char *);
/* char *strdup(char *); */
-char *strndup(char *, int);
+/* char *strndup(char *, int); */
int strcmpi(char *, char *);
/* void *memccpy(void *, void *, int, unsigned); */