freebsd-ports/devel/newt/files/patch-ab
Koop Mast ce800d8632 Unbreak after r1.651 of bsd.port.mk.
The port Makefile uses multiple .c files in the ${CPP} line,
which cpp can't cope with.
Modify the port Makefile so that it uses CPP=${CC} -E again,
like before r1.651.

Submitted by:	pointyhat
2010-11-03 15:33:06 +00:00

77 lines
3.2 KiB
Text

--- Makefile.in.orig 2009-09-24 17:03:09.000000000 +0200
+++ Makefile.in 2010-11-03 15:56:33.000000000 +0100
@@ -2,7 +2,7 @@ LIBS = -lslang
LIBTCL = -ltcl8.4
CC = @CC@
-CPP = @CPP@
+CPP = $(CC) -E
CFLAGS = @CFLAGS@
CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@
@@ -50,7 +50,7 @@ else
TARGET=depend $(PROGS)
endif
-all: $(TARGET) _snackmodule.so
+all: $(TARGET)
test: test.o $(LIBNEWT)
$(CC) -g -o test test.o $(LIBNEWT) $(LIBS)
@@ -67,19 +67,19 @@ showchars: showchars.o $(LIBNEWT)
showkey: showkey.o $(LIBNEWT)
$(CC) -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
+ifdef PYTHONVERS
+install-sh: _snackmodule.so
+all: _snackmodule.so
_snackmodule.so: snackmodule.c $(LIBNEWTSH)
- for ver in $(PYTHONVERS) ; do \
- mkdir -p $$ver ;\
- $(CC) $(CFLAGS) -I/usr/include/$$ver $(SHCFLAGS) -c -o $$ver/snackmodule.o snackmodule.c ;\
- $(CC) --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L . -lnewt ;\
- done
- touch $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) -I${LOCALBASE}/include/python${PYTHONVERS} $(SHCFLAGS) -c -o snackmodule.o snackmodule.c
+ $(CC) --shared $(SHCFLAGS) -o _snackmodule.so snackmodule.o -L . -lnewt
+endif
whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
$(CC) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
- $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) -lpopt
+ $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) $(LIBS) -lpopt
$(LIBNEWT): $(LIBOBJS)
ar rv $@ $^
@@ -118,20 +118,20 @@ install: $(LIBNEWT) install-sh whiptail
install -m 644 $(LIBNEWT) $(instroot)/$(libdir)
install -m 755 whiptail $(instroot)/$(bindir)
install -m 644 whiptail.1 $(instroot)/$(man1dir)
- make -C po datadir=$(instroot)/$(datadir) install
- install -m 644 -D libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
+ ${MAKE} -C po datadir=$(instroot)/$(datadir) install
+ install -m 644 libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
-install-sh: sharedlib $(WHIPTCLSO) _snackmodule.so
+install-sh: sharedlib $(WHIPTCLSO)
[ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
install -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
ln -sf $(LIBNEWTSONAME) $(instroot)/$(libdir)/libnewt.so
ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/$(LIBNEWTSONAME)
- [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so $(instroot)/$(libdir) || :
- for ver in $(PYTHONVERS) ; do \
- [ -d $(instroot)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/$$ver/site-packages ;\
- install -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
- install -m 644 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
- done
+ [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so ${TCL_LIBDIR}/whip || :
+ifdef PYTHONVERS
+ [ -d $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages
+ install -m 755 _snackmodule.so $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages
+ install -m 644 snack.py $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages
+endif
Makefile: newt.spec
echo "You need to rerun ./configure before continuing"