git: 91bb18500a34 - main - x11/xforward: Fix build with LLVM15 and other fixes

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Sat, 11 Feb 2023 14:41:04 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=91bb18500a34e6ffa1eee79c386711ac32679ae5

commit 91bb18500a34e6ffa1eee79c386711ac32679ae5
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2023-02-11 14:32:18 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2023-02-11 14:32:18 +0000

    x11/xforward: Fix build with LLVM15 and other fixes
    
    In addition to fixing the build with LLVM15, a number of packages xforward
    depends on no longer provide static libraries, making building the static
    version impossible. Therefore this revision also reverts f6d424b24071
    (SVN r414578 in May 2016) which added a static build option.
---
 x11/xforward/Makefile             |  6 ------
 x11/xforward/files/patch-Makefile | 33 +++++++--------------------------
 2 files changed, 7 insertions(+), 32 deletions(-)

diff --git a/x11/xforward/Makefile b/x11/xforward/Makefile
index 9c2ff4cc8813..e058f1aba42a 100644
--- a/x11/xforward/Makefile
+++ b/x11/xforward/Makefile
@@ -23,10 +23,4 @@ MAKE_ARGS=	PREFIX=${PREFIX} LOCALBASE=${LOCALBASE}
 NO_WRKSUBDIR=	yes
 PLIST_FILES=	bin/xforward man/man1/xforward.1.gz
 
-OPTIONS_DEFINE=		STATIC
-
-STATIC_ALL_TARGET=	all-static
-STATIC_INSTALL_TARGET=	install-static
-STATIC_PLIST_FILES=	bin/xforward-static
-
 .include <bsd.port.mk>
diff --git a/x11/xforward/files/patch-Makefile b/x11/xforward/files/patch-Makefile
index 6579b005b3df..dc9586307749 100644
--- a/x11/xforward/files/patch-Makefile
+++ b/x11/xforward/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig	1993-06-05 02:32:01 UTC
-+++ Makefile
-@@ -18,18 +18,20 @@
+--- Makefile.orig	1993-06-04 19:32:01.000000000 -0700
++++ Makefile	2023-02-11 06:30:12.418352000 -0800
+@@ -18,18 +18,19 @@
  # MANDIR is where the manual page will be installed.
  
  DESTDIR=
@@ -20,41 +20,22 @@
 +INCFLAGS= -I${LOCALBASE}/include
 +LDFLAGS= -L${LOCALBASE}/lib
 +LIBS= -lXm -lXt -lX11 -lXext
-+LIBS_STATIC= -lXm -lXmu -lXt -lXext -lSM -lICE -lpng16 -lz -lm -ljpeg -lXft -lfontconfig -lexpat -lfreetype -lbz2 -lX11 -lXau -lxcb -lXdmcp -lXau -lXft -lXrender -lXp
  
 +
  CFLAGS= ${INCFLAGS} -O
  
  # For CenterLine CodeCenter
-@@ -39,20 +41,30 @@ SRCS= xforward.c
- AUXFILES= README NOTICE Makefile xforward.1
- 
- PROGS = xforward
-+PROGS_STATIC = xforward-static
- 
-+all-static: all ${PROGS_STATIC}
-+
- all: ${PROGS}
- 
- xforward:	xforward.o
+@@ -46,11 +47,12 @@
  	cc ${LDFLAGS} xforward.o -o xforward ${LIBS}
  
-+xforward-static:	xforward.o
-+	cc ${LDFLAGS} -static xforward.o -o xforward-static ${LIBS_STATIC}
-+
  xforward.o:	xforward.c
- 	cc -c ${CFLAGS} xforward.c
+-	cc -c ${CFLAGS} xforward.c
++	cc -c -Wno-int-conversion ${CFLAGS} xforward.c
  
  install: ${PROGS}
  	install -c xforward ${DESTDIR}${BINDIR}/xforward
  	install -c xforward.1 ${DESTDIR}${MANDIR}/xforward.1
-+
-+install-static: install ${PROGS_STATIC}
-+	install -c xforward-static ${DESTDIR}${BINDIR}/xforward-static
 +
  clean: 	;
--	rm -f *~ *.o core ${PROGS}
-+	rm -f *~ *.o core ${PROGS} ${PROGS_STATIC}
+ 	rm -f *~ *.o core ${PROGS}
  
- center:
- 	#load ${LDFLAGS} ${LIBS}