openbsd-ports/graphics/fxtv/patches/patch-Makefile
2003-12-28 00:24:38 +00:00

76 lines
2.5 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.3 2003/12/28 00:24:38 naddy Exp $
--- Makefile.orig 2001-02-12 23:08:59.000000000 +0100
+++ Makefile 2003-12-28 01:19:51.000000000 +0100
@@ -50,8 +50,11 @@ endif
ifeq ($(OS),NetBSD)
override RPATH_FLAG = -R
endif
+ifeq ($(OS),OpenBSD)
+ override RPATH_FLAG = -rpath
+ override LD_INC += -L$(X11BASE)/lib -L$(LOCALBASE)/lib
+endif
-override LD_INC = $(foreach dir,$(LIBDIRS),-Wl,-L,$(dir))
ifneq ($(RPATH_FLAG),)
override LD_INC += $(foreach dir,$(LIBDIRS),-Wl,$(RPATH_FLAG),$(dir))
endif
@@ -60,9 +63,9 @@ endif
# CFLAGS
#
ifneq ($(DEBUG),NO)
- override CFLAGS = -DDEBUG -g
+ override CFLAGS += -DDEBUG -g
else
- override CFLAGS = -DNDEBUG -O2
+ override CFLAGS += -DNDEBUG
endif
C_WARN_FLAG = -Wall
override CFLAGS += $(C_WARN_FLAG) $(INC) $(CF_VERS)
@@ -73,15 +76,16 @@ endif
override CFLAGS += $(C_WARN_FLAG) -DX11BASE=\"$(X11BASEINST)\"
ifeq ($(OS), linux)
-override CFLAGS = $(CFLAGS) -DOLD_TUNER_IFACE
+override CFLAGS += -DOLD_TUNER_IFACE
endif
+
#
# LDFLAGS,LIBS
#
override LDFLAGS = $(LD_INC)
override VIDEOLIB_LIB = $(VIDEOLIB_DIR)/libvideo.a
-override LIBS = -ltiff -ljpeg -lXaw3d -lXmu -lXt -lXpm \
+override LIBS = -ltiff -ljpeg -lz -lXaw3d -lXmu -lXt -lXpm \
-lSM -lICE -lXext -lX11 -lm
ifeq ($(HAVE_XFREE86),YES)
override LIBS += -lXxf86dga -lXxf86vm
@@ -98,6 +102,11 @@ override PIXMAPS = $(wildcard
override CSRCOBJ = $(CSRC:%.c=%.o)
override EXEC = fxtv
+ifeq ($(OS), OpenBSD)
+override FXTV_LIBDIR = $(LOCALBASE)/share/fxtv
+override CFLAGS += -DFXTV_LIBDIR=\"$(FXTV_LIBDIR)/%T/%N\"
+endif
+
all : $(EXEC)
%.o : %.c
@@ -118,13 +127,14 @@ tv.o : tv.c app_rsrc.h
install : fxtv
mkdir -p $(FXTV_LIBDIR)/bitmaps
install -c -m 444 -o root $(PIXMAPS) $(FXTV_LIBDIR)/bitmaps
- install -c -m 444 -o root README $(FXTV_LIBDIR)
mkdir -p $(X11BASEINST)/lib/X11/app-defaults
install -c -m 444 -o root Fxtv $(X11BASEINST)/lib/X11/app-defaults
mkdir -p $(X11BASEINST)/bin
install -c -m 444 -o root fxtv.1 $(X11BASEINST)/man/man1/fxtv.1
install -c -m 555 -o root fxtv $(X11BASEINST)/bin
install -c -m 555 -o root fxtv_cnvt.sh $(FXTV_LIBDIR)
+ mkdir -p $(X11BASEINST)/share/doc/fxtv
+ install -c -m 444 -o root README $(X11BASEINST)/share/doc/fxtv
clean:
rm -f *.o fxtv *.core *~