Skip to content

Commit

Permalink
graphics/rayshade: Unbreak with llvm15
Browse files Browse the repository at this point in the history
- Pet portclippy
- Adopt port
  • Loading branch information
5u623l20 committed May 18, 2023
1 parent 3f4e9f1 commit e3ec54e
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 78 deletions.
18 changes: 13 additions & 5 deletions graphics/rayshade/Makefile
Expand Up @@ -9,7 +9,7 @@ DISTFILES= ${PORTNAME}.${PORTVERSION}.tar.Z
DIST_SUBDIR= rayshade
EXTRACT_ONLY= ${PORTNAME}.${PORTVERSION}.tar.Z

MAINTAINER= ports@FreeBSD.org
MAINTAINER= bofh@FreeBSD.org
COMMENT= Extensible system for creating ray-traced images
WWW= http://www-graphics.stanford.edu/~cek/rayshade/

Expand All @@ -20,17 +20,19 @@ LICENSE_PERMS= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept

BUILD_DEPENDS= ${LOCALBASE}/lib/librle.a:graphics/urt

WRKSRC= ${WRKDIR}/${PORTNAME}.${PORTVERSION:R}

HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= Configure

ALL_TARGET= # empty

WRKSRC= ${WRKDIR}/${PORTNAME}.${PORTVERSION:R}

PLIST_FILES= bin/rayshade
PORTDOCS= *
PORTEXAMPLES= *
PLIST_FILES= bin/rayshade

OPTIONS_DEFINE= DOCS EXAMPLES

DOCS_DISTFILES= guide.ps.Z

.include <bsd.port.options.mk>
Expand All @@ -39,6 +41,12 @@ DOCS_DISTFILES= guide.ps.Z
CONFIGURE_ARGS= < ${WRKDIR}/config.ans
.endif

.include <bsd.port.pre.mk>

.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 ))
CFLAGS+= -Wno-error=int-conversion
.endif

pre-configure:
@${SED} -e \
"s,@CFLAGS@,${CFLAGS},g ; \
Expand All @@ -60,4 +68,4 @@ do-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/Examples/* ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>
.include <bsd.port.post.mk>
12 changes: 6 additions & 6 deletions graphics/rayshade/files/patch-Configure
@@ -1,6 +1,6 @@
--- Configure.orig Mon Feb 10 12:04:23 1992
+++ Configure Tue Jul 29 14:18:04 2003
@@ -28,10 +28,11 @@
--- Configure.orig 1992-02-10 03:04:23 UTC
+++ Configure
@@ -28,10 +28,11 @@ PATH=$PATH:'/sys5.3/bin:/sys5.3/usr/bin /bsd4.3/bin /b
PATH=$PATH:'/bsd4.3/usr/bin:/usr/bsd'
export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)

Expand All @@ -16,15 +16,15 @@

(alias) >/dev/null 2>&1 && \
echo "(I see you are using the Korn shell. Some ksh's blow up on Configure," && \
@@ -660,6 +661,7 @@
@@ -660,6 +661,7 @@ case "$libs" in
;;
esac
set /usr/ccs/lib/libc.so
+test -f $1 || set /usr/lib/libc.a
test -f $1 || set /usr/lib/libc.so
test -f $1 || set /usr/lib/libc.so.[0-9]*
eval set \$$#
@@ -872,7 +874,7 @@
@@ -872,7 +874,7 @@ $eunicefix filexp
: determine where manual pages are on this system
echo " "
case "$sysman" in
Expand All @@ -33,7 +33,7 @@
;;
esac
if test -d "$sysman"; then
@@ -1418,14 +1420,8 @@
@@ -1418,14 +1420,8 @@ if $contains '^index$' libc.list >/dev/null 2>&1 ; the
if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
if $contains strchr "$strings" >/dev/null 2>&1 ; then
if $contains index "$strings" >/dev/null 2>&1 ; then
Expand Down
6 changes: 3 additions & 3 deletions graphics/rayshade/files/patch-etc__rsconvert__lex.l
@@ -1,5 +1,5 @@
--- etc/rsconvert/lex.l.orig 1992-02-10 12:03:54.000000000 +0900
+++ etc/rsconvert/lex.l 2013-05-28 22:55:24.000000000 +0900
--- etc/rsconvert/lex.l.orig 1992-02-10 03:03:54 UTC
+++ etc/rsconvert/lex.l
@@ -22,6 +22,7 @@
#include "libcommon/common.h"
#include "y.tab.h"
Expand All @@ -8,7 +8,7 @@
alpha [a-zA-Z]
special [\.\_-]
digit [0-9]
@@ -113,7 +114,7 @@
@@ -113,7 +114,7 @@ skipcomments()
if ((c = input()) == '/') {
WriteChar(c);
WriteNewline();
Expand Down
2 changes: 1 addition & 1 deletion graphics/rayshade/files/patch-etc__rsconvert__yacc.y
@@ -1,4 +1,4 @@
--- etc/rsconvert/yacc.y.orig
--- etc/rsconvert/yacc.y.orig 1992-02-10 03:04:17 UTC
+++ etc/rsconvert/yacc.y
@@ -14,6 +14,7 @@
/* $Id: yacc.y,v 4.0.1.3 92/02/07 11:05:21 cek Exp Locker: cek $ */
Expand Down
10 changes: 0 additions & 10 deletions graphics/rayshade/files/patch-fog.c

This file was deleted.

10 changes: 0 additions & 10 deletions graphics/rayshade/files/patch-fogdeck.c

This file was deleted.

6 changes: 3 additions & 3 deletions graphics/rayshade/files/patch-libray_Makefile
Expand Up @@ -2,9 +2,9 @@ On really fast machines some of the .o files aren't being added to
libray.a because they are generated so fast that make(1) thinks the
library is up-to-date. Marvel at the horrific hack below.

--- libray/Makefile.orig Sat Feb 26 16:41:28 2000
+++ libray/Makefile Sat Feb 26 16:42:36 2000
@@ -12,6 +12,8 @@
--- libray/Makefile.orig 1992-02-10 03:03:05 UTC
+++ libray/Makefile
@@ -12,6 +12,8 @@ default:
for i in $(STUFF); do \
(cd $$i && $(MAKE)); \
done
Expand Down
6 changes: 3 additions & 3 deletions graphics/rayshade/files/patch-libray__libtext__texture.c
@@ -1,6 +1,6 @@
--- libray/libtext/texture.c.orig 1992-02-10 12:04:02.000000000 +0900
+++ libray/libtext/texture.c 2013-05-28 22:41:59.000000000 +0900
@@ -162,7 +162,7 @@
--- libray/libtext/texture.c.orig 1992-02-10 03:04:02 UTC
+++ libray/libtext/texture.c
@@ -162,7 +162,7 @@ Float *u, *v;
*u = ptmp.x;
*v = ptmp.y;
if (dpdu == (Vector *)NULL || dpdv == (Vector *)NULL)
Expand Down
@@ -1,6 +1,6 @@
--- libray/liblight/extended.c.orig Mon Feb 10 04:03:43 1992
+++ libray/liblight/extended.c Wed Feb 7 18:34:20 2007
@@ -54,7 +54,7 @@
--- libray/liblight/extended.c.orig 1992-02-10 03:03:43 UTC
+++ libray/liblight/extended.c
@@ -54,7 +54,7 @@ ExtendedMethods()
/*
* Compute intensity ('color') of extended light source 'lp' from 'pos'.
*/
Expand Down
@@ -1,6 +1,6 @@
--- libray/libobj/hf.c.orig Mon Feb 10 04:04:18 1992
+++ libray/libobj/hf.c Wed Feb 7 18:27:10 2007
@@ -42,7 +42,7 @@
--- libray/libobj/hf.c.orig 1992-02-10 03:04:18 UTC
+++ libray/libobj/hf.c
@@ -42,7 +42,7 @@ typedef struct {
Vector cp, pDX, pDY;
} Trav2D;

Expand Down
10 changes: 10 additions & 0 deletions graphics/rayshade/files/patch-libray_libsurf_fog.c
@@ -0,0 +1,10 @@
--- libray/libsurf/fog.c.orig 1992-02-10 03:03:33 UTC
+++ libray/libsurf/fog.c
@@ -28,7 +28,6 @@ FogCreate(color, trans)
Color *color, *trans;
{
Fog *fog;
- static void ComputeFog();

fog = (Fog *)Malloc(sizeof(Fog));

10 changes: 10 additions & 0 deletions graphics/rayshade/files/patch-libray_libsurf_fogdeck.c
@@ -0,0 +1,10 @@
--- libray/libsurf/fogdeck.c.orig 1992-02-10 03:03:45 UTC
+++ libray/libsurf/fogdeck.c
@@ -31,7 +31,6 @@ int octaves;
Color *color, *trans;
{
Fogdeck *fogdeck;
- static void ComputeFogdeck();

fogdeck = (Fogdeck *)Malloc(sizeof(Fogdeck));

6 changes: 3 additions & 3 deletions graphics/rayshade/files/patch-libshade__lex.l
@@ -1,5 +1,5 @@
--- libshade/lex.l.orig 1992-02-10 12:04:02.000000000 +0900
+++ libshade/lex.l 2013-05-28 22:45:54.000000000 +0900
--- libshade/lex.l.orig 1992-02-10 03:04:02 UTC
+++ libshade/lex.l
@@ -29,6 +29,7 @@
#include "y.tab.h"
extern char *strsave();
Expand All @@ -8,7 +8,7 @@
alpha [a-zA-Z]
special [\.\_-]
digit [0-9]
@@ -171,7 +172,7 @@
@@ -171,7 +172,7 @@ skipcomments()
while (input() != '*')
;
if ((c = input()) == '/')
Expand Down
2 changes: 1 addition & 1 deletion graphics/rayshade/files/patch-libshade__yacc.y
@@ -1,4 +1,4 @@
--- libshade/yacc.y.orig
--- libshade/yacc.y.orig 1992-02-10 03:04:21 UTC
+++ libshade/yacc.y
@@ -13,6 +13,8 @@
/* for any purpose. It is provided solely "as is". */
Expand Down
43 changes: 16 additions & 27 deletions graphics/rayshade/files/patch-raypaint_Makefile.SH
@@ -1,27 +1,16 @@
*** raypaint/Makefile.SH.orig Sat Mar 28 20:31:28 1998
--- raypaint/Makefile.SH Sat Mar 28 20:31:55 1998
***************
*** 55,65 ****

#
# If using X11, use:
! #GRAPHICSLIB = -lX11

#
# If you are using GL, use:
! GRAPHICSLIB = -lgl_s

LIBRAY = $(LIBRAYDIR)/libray.a
LIBSHADE = $(LIBSHADEDIR)/libshade.a
--- 55,65 ----

#
# If using X11, use:
! GRAPHICSLIB = -lX11

#
# If you are using GL, use:
! #GRAPHICSLIB = -lgl_s

LIBRAY = $(LIBRAYDIR)/libray.a
LIBSHADE = $(LIBSHADEDIR)/libshade.a
--- raypaint/Makefile.SH.orig 1992-02-10 03:03:47 UTC
+++ raypaint/Makefile.SH
@@ -55,11 +55,11 @@ YFLAGS = -d

#
# If using X11, use:
-#GRAPHICSLIB = -lX11
+GRAPHICSLIB = -lX11

#
# If you are using GL, use:
-GRAPHICSLIB = -lgl_s
+#GRAPHICSLIB = -lgl_s

LIBRAY = $(LIBRAYDIR)/libray.a
LIBSHADE = $(LIBSHADEDIR)/libshade.a

0 comments on commit e3ec54e

Please sign in to comment.