1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-06 01:57:40 +00:00
freebsd-ports/net/pmf/files/patch-Makefile
Martin Wilke 703301fbb4 - Fix build
- Stage support

PR:		184235
Submitted by:	ports fury
2014-02-27 09:00:19 +00:00

69 lines
2.0 KiB
Plaintext

--- ./Makefile.orig 1993-05-23 07:54:05.000000000 -0400
+++ ./Makefile 2010-02-02 14:21:04.000000000 -0500
@@ -29,12 +29,13 @@
# pmf without GNU readline or without sound.
# Remove one (or both) of "-DGNU_READLINE" and "-DSOUND".
#
-OPTIONS = -DGNU_READLINE -DSOUND
+#OPTIONS = -DGNU_READLINE -DSOUND
+OPTIONS = -DGNU_READLINE
# This variable, SOUND_OBJECT, should be changed if you want to
# compile pmf without sound: remove this definition of SOUND_OBJECT.
#
-SOUND_OBJECT = sound.o
+#SOUND_OBJECT = sound.o
# This variable, HISTORY_OBJECT, should be changed if you want to
# compile pmf without GNU readline: define HISTORY_OBJECT as
@@ -56,7 +57,7 @@
# If you want to use the GNU C compiler,
# change the variable CC to "gcc -traditional" instead:
#
-CC = cc
+CC ?= cc
# CC = gcc -traditional
######################################################################
@@ -65,7 +66,7 @@
# -- the Makefiles in the subdirs have to be changed separately.
# Distribution: CFLAGS = -O
# Maximum debug: CFLAGS = -g -pg -DDEBUG -pipe
-CFLAGS = -O
+CFLAGS += -DSYSTEM_DIR=\"${PREFIX}/share/pmf\"
######################################################################
@@ -101,7 +102,7 @@
READLINE_DIR = readline
C_PACKAGES_DIR = c_packages
-READLINE_LIB = $(READLINE_DIR)/libreadline.a
+#READLINE_LIB = $(READLINE_DIR)/libreadline.a
C_PACKAGES_LIB = $(C_PACKAGES_DIR)/libc_packs.a
LIBS = $(READLINE_LIB) $(C_PACKAGES_LIB)
@@ -123,8 +124,7 @@
pmf: $(OBJECTS) $(LIBS)
rm -f compile_time.c
- $(CC) -o pmf $(CFLAGS) $(OBJECTS) $(LIBS) -ltermcap -lresolv
- strip pmf
+ $(CC) -o pmf $(CFLAGS) $(OBJECTS) $(LIBS) -ltermcap -lreadline -lcompat
rm -f compile_time.o
compile_time.c:
@@ -133,10 +133,10 @@
######################################################################
$(READLINE_LIB):
- ( cd $(READLINE_DIR); make )
+ ( cd $(READLINE_DIR); $(MAKE) )
$(C_PACKAGES_LIB):
- ( cd $(C_PACKAGES_DIR); make )
+ ( cd $(C_PACKAGES_DIR); $(MAKE) 'CFLAGS=$(CFLAGS)')
READLINE_FILES = \
$(READLINE_DIR)/*