Date: 03 Dec 2002 13:17:51 +0100 From: Tobias Reifenberger <treif@mayn.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/45962: [maintainer] unbreak graphics/xmrm Message-ID: <1038917869.729.12.camel@dmon>
next in thread | raw e-mail | index | archive | help
>Number: 45962 >Category: ports >Synopsis: [maintainer] unbreak graphics/xmrm >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Dec 03 04:20:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Tobias Reifenberger >Release: FreeBSD 5.0-CURRENT i386 >Organization: <Organization of PR author (multiple lines)> >Environment: >Description: This patch solves the build problems on -current and fixes the libtiff save error (thanks to Eugene Ossintsev). >How-To-Repeat: >Fix: diff -u --exclude=CVS -ruN xmrm.orig/Makefile xmrm/Makefile --- xmrm.orig/Makefile Thu Jul 4 11:20:29 2002 +++ xmrm/Makefile Fri Nov 29 18:16:35 2002 @@ -7,7 +7,7 @@ PORTNAME= xmrm PORTVERSION= 2.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= ftp://ftp.cg.tuwien.ac.at/pub/linux/xmrm/ \ ftp://ftp.uni-passau.de/mount/common.lib.archive.unix/Graphic/xmrm/ @@ -16,10 +16,12 @@ MAINTAINER= treif@mayn.de -RUN_DEPENDS= mpeg:${PORTSDIR}/graphics/mpeg +RUN_DEPENDS= mpeg:${PORTSDIR}/graphics/mpeg \ + mpeg_play:${PORTSDIR}/graphics/mpeg_play LIB_DEPENDS= forms.1:${PORTSDIR}/x11-toolkits/xforms \ tiff.4:${PORTSDIR}/graphics/tiff +USE_X_PREFIX= yes USE_XPM= yes NO_WRKSUBDIR= yes diff -u --exclude=CVS -ruN xmrm.orig/files/patch-Makefile xmrm/files/patch-Makefile --- xmrm.orig/files/patch-Makefile Thu Jan 1 01:00:00 1970 +++ xmrm/files/patch-Makefile Fri Nov 29 18:23:59 2002 @@ -0,0 +1,37 @@ +--- Makefile.orig Tue Mar 10 00:00:00 1998 ++++ Makefile Fri Nov 29 18:20:50 2002 +@@ -16,8 +16,8 @@ + # + ############################################################################## + +-CPP = g++ +-CC = gcc ++CPP = c++ ++CC = cc + + # -c: don't link yet + # -g: produce debugging-information, don't use together with link_flag -s +@@ -28,15 +28,19 @@ + # -c: don't link yet + #COMPILE_FLAGS = -O3 -m486 -c + ++.if exists(${PREFIX}/include/X11/forms.h) ++XFORMSINC = -I${PREFIX}/include/X11 ++.endif ++ + # -O: normal optimization level -c: don't link yet +-COMPILE_FLAGS = -O -c ++COMPILE_FLAGS = ${CFLAGS} -I${LOCALBASE}/include -I${PREFIX}/include ${XFORMSINC} -c + + # -s: DESTROYS symbol-table +-LINK_FLAGS = -s ++#LINK_FLAGS = -s + + +-SYSLIB = -L/usr/X11R6/lib -lX11 -lm +-LIBS = -L/usr/lib -ltiff -ljpeg -lgz -lforms -lXpm $(SYSLIB) ++SYSLIB = -L${PREFIX}/lib -lX11 -lGL -lGLU -lm ++LIBS = -L${LOCALBASE}/lib -ltiff -ljpeg -lz -lforms -lXpm $(SYSLIB) + + OBJECTS = xmrm.o xmrm_cb.o io.o morphvec.o init.o wavemorph.o wave_rts.o wave.o\ + areas.o xmrm_main.o diff -u --exclude=CVS -ruN xmrm.orig/files/patch-aa xmrm/files/patch-aa --- xmrm.orig/files/patch-aa Thu Jul 4 10:06:00 2002 +++ xmrm/files/patch-aa Thu Jan 1 01:00:00 1970 @@ -1,37 +0,0 @@ ---- Makefile.orig Mon Mar 9 18:00:00 1998 -+++ Makefile Mon Jul 1 03:46:01 2002 -@@ -16,8 +16,8 @@ - # - ############################################################################## - --CPP = g++ --CC = gcc -+CPP = c++ -+CC = cc - - # -c: don't link yet - # -g: produce debugging-information, don't use together with link_flag -s -@@ -28,15 +28,19 @@ - # -c: don't link yet - #COMPILE_FLAGS = -O3 -m486 -c - -+.if exists(${X11BASE}/include/X11/forms.h) -+XFORMSINC = -I${X11BASE}/include/X11 -+.endif -+ - # -O: normal optimization level -c: don't link yet --COMPILE_FLAGS = -O -c -+COMPILE_FLAGS = ${CFLAGS} -I${PREFIX}/include -I${X11BASE}/include ${XFORMSINC} -c - - # -s: DESTROYS symbol-table --LINK_FLAGS = -s -+#LINK_FLAGS = -s - - --SYSLIB = -L/usr/X11R6/lib -lX11 -lm --LIBS = -L/usr/lib -ltiff -ljpeg -lgz -lforms -lXpm $(SYSLIB) -+SYSLIB = -L${X11BASE}/lib -lX11 -lm -+LIBS = -L${PREFIX}/lib -ltiff -ljpeg -lz -lforms -lXpm $(SYSLIB) - - OBJECTS = xmrm.o xmrm_cb.o io.o morphvec.o init.o wavemorph.o wave_rts.o wave.o\ - areas.o xmrm_main.o diff -u --exclude=CVS -ruN xmrm.orig/files/patch-ab xmrm/files/patch-ab --- xmrm.orig/files/patch-ab Thu Jul 4 10:06:00 2002 +++ xmrm/files/patch-ab Thu Jan 1 01:00:00 1970 @@ -1,18 +0,0 @@ ---- const.h.orig Mon Mar 9 18:00:00 1998 -+++ const.h Mon Jul 1 03:46:45 2002 -@@ -3,12 +3,14 @@ - // Programming: Gerhard Waldhör, Andreas Artmann - - #include <stdio.h> --#include <malloc.h> -+#include <stdlib.h> - #include <errno.h> - #include <math.h> - -+#ifndef TRUE - #define TRUE 1 - #define FALSE 0 -+#endif - - #define MAX_PIC_NUM 999 - diff -u --exclude=CVS -ruN xmrm.orig/files/patch-ac xmrm/files/patch-ac --- xmrm.orig/files/patch-ac Wed Mar 29 00:44:12 2000 +++ xmrm/files/patch-ac Thu Jan 1 01:00:00 1970 @@ -1,20 +0,0 @@ ---- io.cc.orig Mon Mar 9 17:00:00 1998 -+++ io.cc Tue Mar 28 15:27:12 2000 -@@ -87,7 +87,7 @@ - extern ControlClass control; - - /* Constructor: */ --ControlClass::ControlClass() -+void ControlClass::ControlClassInit() - { - int i; - -@@ -1720,7 +1720,7 @@ - // extension--; - - i=0; -- number = ".000."; -+ strcpy(number, ".000."); - while ( !(extension = strstr(extension,number)) && i<=999 ) - { - i++; diff -u --exclude=CVS -ruN xmrm.orig/files/patch-ae xmrm/files/patch-ae --- xmrm.orig/files/patch-ae Wed Mar 29 00:44:12 2000 +++ xmrm/files/patch-ae Thu Jan 1 01:00:00 1970 @@ -1,19 +0,0 @@ ---- xmrm_main.cc.orig Mon Mar 9 17:00:00 1998 -+++ xmrm_main.cc Tue Mar 28 15:23:34 2000 -@@ -6,7 +6,6 @@ - #include <tiffio.h> - #include <stdlib.h> - #include <unistd.h> --#include <malloc.h> //**************** - #include "xmrm.h" - #include "io.h" - #include "const.h" -@@ -308,7 +307,7 @@ - control.debug = 0; - - /* Init control: */ -- control.ControlClass(); // call constructor -+ control.ControlClassInit(); // call constructor - temp = control.URL_manual; - - while( (c=getopt(argc, argv, "hdm:p:")) != -1) diff -u --exclude=CVS -ruN xmrm.orig/files/patch-ag xmrm/files/patch-ag --- xmrm.orig/files/patch-ag Wed Jul 19 15:49:39 2000 +++ xmrm/files/patch-ag Thu Jan 1 01:00:00 1970 @@ -1,28 +0,0 @@ ---- xmrm_mpeg_main.cc.orig Tue Mar 10 00:00:00 1998 -+++ xmrm_mpeg_main.cc Wed Jul 19 15:43:38 2000 -@@ -8,6 +8,7 @@ - #include <forms.h> - #include <unistd.h> - #include "xmrm_mpeg.h" -+#include "const.h" - - #define MAX_PIC_NUM 999 - #define BORDER_WIDTH -1 -@@ -68,7 +69,7 @@ - { - int count = 0; - -- backup_class->number_str = ".000."; -+ strcpy(backup_class->number_str, ".000."); - - while ( !(*ext = strstr(fname_only,backup_class->number_str)) && (count <= MAX_PIC_NUM) ) - { -@@ -417,7 +418,7 @@ - // Check for even picture size - if ( (tif_w % 2) || (tif_h % 2) ) - { -- work_class->even = ".even"; -+ strcpy(work_class->even,".even"); - if ( Even_Size( tif, tif_w, tif_h) ) - return 1; - } diff -u --exclude=CVS -ruN xmrm.orig/files/patch-const.h xmrm/files/patch-const.h --- xmrm.orig/files/patch-const.h Thu Jan 1 01:00:00 1970 +++ xmrm/files/patch-const.h Fri Nov 29 17:43:56 2002 @@ -0,0 +1,25 @@ +--- const.h.orig Tue Mar 10 00:00:00 1998 ++++ const.h Fri Nov 29 17:33:22 2002 +@@ -3,12 +3,14 @@ + // Programming: Gerhard Waldhör, Andreas Artmann + + #include <stdio.h> +-#include <malloc.h> ++#include <stdlib.h> + #include <errno.h> + #include <math.h> + ++#ifndef TRUE + #define TRUE 1 + #define FALSE 0 ++#endif + + #define MAX_PIC_NUM 999 + +@@ -83,3 +85,6 @@ + + #define BW -1 // Borderwidth of objects + #define ABW abs(BW) // absolute value of BW, needed for 'akima'- and 'wavelet-levels'-plots ++ ++#define BROWSER_CMD "mozilla" ++#define BROWSER_MSG "Starts MOZILLA" diff -u --exclude=CVS -ruN xmrm.orig/files/patch-io.cc xmrm/files/patch-io.cc --- xmrm.orig/files/patch-io.cc Thu Jan 1 01:00:00 1970 +++ xmrm/files/patch-io.cc Fri Nov 29 18:01:47 2002 @@ -0,0 +1,93 @@ +--- io.cc.orig Tue Mar 10 00:00:00 1998 ++++ io.cc Fri Nov 29 18:01:04 2002 +@@ -87,7 +87,7 @@ + extern ControlClass control; + + /* Constructor: */ +-ControlClass::ControlClass() ++void ControlClass::ControlClassInit() + { + int i; + +@@ -573,7 +573,7 @@ + TIFFSetField(tif,TIFFTAG_IMAGELENGTH,size_h); + TIFFSetField(tif,TIFFTAG_BITSPERSAMPLE,8); + TIFFSetField(tif,TIFFTAG_SAMPLESPERPIXEL,4); +- TIFFSetField(tif,TIFFTAG_COMPRESSION,COMPRESSION_LZW); // free for non-commercial use (so I read) ++ TIFFSetField(tif,TIFFTAG_COMPRESSION,COMPRESSION_DEFLATE); + TIFFSetField(tif,TIFFTAG_PLANARCONFIG,PLANARCONFIG_CONTIG); + TIFFSetField(tif,TIFFTAG_PHOTOMETRIC,PHOTOMETRIC_RGB); + TIFFSetField(tif,TIFFTAG_ORIENTATION,ORIENTATION_TOPLEFT); +@@ -1154,7 +1154,9 @@ + if ( proj.akima_points[i][0] < 0.0 || proj.akima_points[i][0] > 1.0 ||\ + proj.akima_points[i][1] < 0.0 || proj.akima_points[i][1] > 1.0 ) + wrong_value = TRUE; +- control.akima_P[i] = proj.akima_points[i]; ++ ++ control.akima_P[i][0] = proj.akima_points[i][0]; ++ control.akima_P[i][1] = proj.akima_points[i][1]; + } + if( wrong_value || control.akima_nr < AKIMA_MIN || control.akima_nr > AKIMA_MAX ) + { +@@ -1387,9 +1389,10 @@ + proj.wavelets[0] = control.b_bias_val[0]; + + proj.akima_nr = control.akima_nr; +- for ( i = 0; i < control.akima_nr; i++) +- proj.akima_points[i] = control.akima_P[i]; +- ++ for ( i = 0; i < control.akima_nr; i++) { ++ proj.akima_points[i][0] = control.akima_P[i][0]; ++ proj.akima_points[i][1] = control.akima_P[i][1]; ++ } + proj.weight_a = control.warp_a; + proj.weight_b = control.warp_b; + proj.weight_p = control.warp_p; +@@ -1720,7 +1723,7 @@ + // extension--; + + i=0; +- number = ".000."; ++ strcpy(number, ".000."); + while ( !(extension = strstr(extension,number)) && i<=999 ) + { + i++; +@@ -2336,20 +2339,20 @@ + break; + + case 37:// BT_Drop: +- sprintf(cmdbuf,"netscape %s &", control.URL_CG_Home); ++ sprintf(cmdbuf,"%s %s &", BROWSER_CMD, control.URL_CG_Home); + test = system(cmdbuf); + if ( test==-1 || test==127 ) + { +- fl_show_alert("ERROR:","Execution of Netscape failed !","",1); ++ fl_show_alert("ERROR:","Execution of Browser failed !","",1); + } + break; + + case 38:// BT_TU_Logo: +- sprintf(cmdbuf,"netscape %s &", control.URL_TU_Vienna); ++ sprintf(cmdbuf,"%s %s &", BROWSER_CMD, control.URL_TU_Vienna); + test = system(cmdbuf); + if ( test==-1 || test==127 ) + { +- fl_show_alert("ERROR:","Execution of Netscape failed !","",1); ++ fl_show_alert("ERROR:","Execution of Browser failed !","",1); + } + break; + +@@ -2599,11 +2602,11 @@ + switch (item) + { + case 1://Manual (Netscape) +- sprintf(cmdbuf,"netscape %s &", control.URL_manual); ++ sprintf(cmdbuf,"%s %s &", BROWSER_CMD, control.URL_manual); + test = system(cmdbuf); + if ( test==-1 || test==127 ) + { +- fl_show_alert("ERROR:","Execution of Netscape failed !","",1); ++ fl_show_alert("ERROR:","Execution of Browser failed !","",1); + } + break; + case 2://About diff -u --exclude=CVS -ruN xmrm.orig/files/patch-xmrm.cc xmrm/files/patch-xmrm.cc --- xmrm.orig/files/patch-xmrm.cc Thu Jan 1 01:00:00 1970 +++ xmrm/files/patch-xmrm.cc Fri Nov 29 18:03:30 2002 @@ -0,0 +1,11 @@ +--- xmrm.cc.orig Fri Nov 29 18:03:08 2002 ++++ xmrm.cc Fri Nov 29 17:41:19 2002 +@@ -362,7 +362,7 @@ + // fl_set_object_boxtype(obj,FL_NO_BOX); + fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_lstyle(obj,FL_BOLD_STYLE); +- fl_set_menu(obj, "HTML-Manual (Netscape)%l|ABOUT"); ++ fl_set_menu(obj, "HTML-Manual%l|ABOUT"); + fl_set_object_callback(obj,callback_Menus,3); + + //******************************** SLIDERS ************************************************************* diff -u --exclude=CVS -ruN xmrm.orig/files/patch-xmrm_main.cc xmrm/files/patch-xmrm_main.cc --- xmrm.orig/files/patch-xmrm_main.cc Thu Jan 1 01:00:00 1970 +++ xmrm/files/patch-xmrm_main.cc Fri Nov 29 17:45:28 2002 @@ -0,0 +1,42 @@ +--- xmrm_main.cc.orig Tue Mar 10 00:00:00 1998 ++++ xmrm_main.cc Fri Nov 29 17:42:05 2002 +@@ -6,7 +6,6 @@ + #include <tiffio.h> + #include <stdlib.h> + #include <unistd.h> +-#include <malloc.h> //**************** + #include "xmrm.h" + #include "io.h" + #include "const.h" +@@ -115,7 +114,7 @@ + // CREDITS_post_handler + int CREDITS_post_handler(FL_OBJECT *ob, int event, FL_Coord mx, FL_Coord my, int key, void *xev) + { +- char s[] = "Starts NETSCAPE !"; ++ char s[] = BROWSER_MSG; + + if (ob == fd_CREDITS->BT_Drop) + { +@@ -170,10 +169,11 @@ + s="Morph Source Image into Destination Image according to your settings !"; + else if (ob == fd_MRM->BT_Drop) + { +- s = "Click this pixmap to start Netscape and visit the Institute of Computer Graphics !"; ++ s = "Click this pixmap to visit the Institute of Computer Graphics !"; + if (event == FL_ENTER) + { +- fl_show_oneliner("Starts NETSCAPE !", ob->form->x + ob->x, ob->form->y + ob->y + ob->h + 1); ++ fl_show_oneliner("Visit Institute of Computer Graphics", ob->form->x + ob->x, ob->form->y + ob->y + ob->h + 1); ++ + fl_set_pixmapbutton_pixmap(ob, xpm_drop_shadow, 0); + fl_redraw_object(ob); + } +@@ -308,7 +308,7 @@ + control.debug = 0; + + /* Init control: */ +- control.ControlClass(); // call constructor ++ control.ControlClassInit(); // call constructor + temp = control.URL_manual; + + while( (c=getopt(argc, argv, "hdm:p:")) != -1) diff -u --exclude=CVS -ruN xmrm.orig/files/patch-xmrm_mpeg_main.cc xmrm/files/patch-xmrm_mpeg_main.cc --- xmrm.orig/files/patch-xmrm_mpeg_main.cc Thu Jan 1 01:00:00 1970 +++ xmrm/files/patch-xmrm_mpeg_main.cc Fri Nov 29 17:44:36 2002 @@ -0,0 +1,37 @@ +--- xmrm_mpeg_main.cc.orig Tue Mar 10 00:00:00 1998 ++++ xmrm_mpeg_main.cc Fri Nov 29 15:06:47 2002 +@@ -8,6 +8,7 @@ + #include <forms.h> + #include <unistd.h> + #include "xmrm_mpeg.h" ++#include "const.h" + + #define MAX_PIC_NUM 999 + #define BORDER_WIDTH -1 +@@ -68,7 +69,7 @@ + { + int count = 0; + +- backup_class->number_str = ".000."; ++ strcpy(backup_class->number_str, ".000."); + + while ( !(*ext = strstr(fname_only,backup_class->number_str)) && (count <= MAX_PIC_NUM) ) + { +@@ -329,7 +330,7 @@ + TIFFSetField(tif,TIFFTAG_IMAGELENGTH,even_height); + TIFFSetField(tif,TIFFTAG_BITSPERSAMPLE,8); + TIFFSetField(tif,TIFFTAG_SAMPLESPERPIXEL,4); +- TIFFSetField(tif,TIFFTAG_COMPRESSION,COMPRESSION_LZW); // free for non-commercial use (so I read) ++ TIFFSetField(tif,TIFFTAG_COMPRESSION,COMPRESSION_DEFLATE); + TIFFSetField(tif,TIFFTAG_PLANARCONFIG,PLANARCONFIG_CONTIG); + TIFFSetField(tif,TIFFTAG_PHOTOMETRIC,PHOTOMETRIC_RGB); + TIFFSetField(tif,TIFFTAG_ORIENTATION,ORIENTATION_TOPLEFT); +@@ -417,7 +418,7 @@ + // Check for even picture size + if ( (tif_w % 2) || (tif_h % 2) ) + { +- work_class->even = ".even"; ++ strcpy(work_class->even,".even"); + if ( Even_Size( tif, tif_w, tif_h) ) + return 1; + } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1038917869.729.12.camel>