summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/sandy/files/sandy-0.4-gentoo.patch')
-rw-r--r--app-editors/sandy/files/sandy-0.4-gentoo.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/app-editors/sandy/files/sandy-0.4-gentoo.patch b/app-editors/sandy/files/sandy-0.4-gentoo.patch
new file mode 100644
index 000000000000..877c96805ef4
--- /dev/null
+++ b/app-editors/sandy/files/sandy-0.4-gentoo.patch
@@ -0,0 +1,49 @@
+--- a/config.mk
++++ b/config.mk
+@@ -9,19 +9,19 @@
+
+ # includes and libs (ncurses)
+ INCS = -I. -I/usr/include
+-LIBS = -L/usr/lib -lc -lncursesw
++LIBS = $(shell ${PKG_CONFIG} --libs ncurses)
+
+ # flags
+-CPPFLAGS = -DVERSION=\"${VERSION}\"
++CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE
+ #CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
+ #LDFLAGS = -s ${LIBS}
+-CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
+-LDFLAGS = ${LIBS}
++CFLAGS += -std=c99 -pedantic -Wall ${INCS} ${CPPFLAGS}
++LDFLAGS += ${LIBS}
+
+ # Solaris
+ #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
+ #LDFLAGS = ${LIBS}
+
+ # compiler and linker
+-CC = cc
++CC ?= cc
+
+--- a/Makefile
++++ b/Makefile
+@@ -15,8 +15,7 @@
+ @echo "CC = ${CC}"
+
+ .c.o:
+- @echo CC $<
+- @${CC} -c ${CFLAGS} $<
++ ${CC} -c ${CFLAGS} $<
+
+ ${OBJ}: config.h config.mk
+
+@@ -25,8 +24,7 @@
+ @cp config.def.h $@
+
+ sandy: ${OBJ}
+- @echo CC -o $@
+- @${CC} -o $@ sandy.o ${LDFLAGS}
++ ${CC} ${CFLAGS} -o $@ sandy.o ${LDFLAGS}
+
+ clean:
+ @echo cleaning