diff options
Diffstat (limited to 'graphics/fotoxx/files')
-rw-r--r-- | graphics/fotoxx/files/patch-Makefile | 26 | ||||
-rw-r--r-- | graphics/fotoxx/files/patch-dependencies.sh | 37 | ||||
-rw-r--r-- | graphics/fotoxx/files/patch-fotoxx-11.03.cc | 43 | ||||
-rw-r--r-- | graphics/fotoxx/files/patch-zfuncs.cc | 119 | ||||
-rw-r--r-- | graphics/fotoxx/files/patch-zfuncs.h | 17 |
5 files changed, 242 insertions, 0 deletions
diff --git a/graphics/fotoxx/files/patch-Makefile b/graphics/fotoxx/files/patch-Makefile new file mode 100644 index 000000000000..c624cacf4f12 --- /dev/null +++ b/graphics/fotoxx/files/patch-Makefile @@ -0,0 +1,26 @@ +--- Makefile.orig 2011-02-28 17:04:24.000000000 +0100 ++++ Makefile 2011-05-25 17:26:15.000000000 +0200 +@@ -15,13 +15,12 @@ + BINDIR = $(PREFIX)/bin + DATADIR = $(PREFIX)/share/$(PROGRAM) + DOCDIR = $(PREFIX)/share/doc/$(PROGRAM) +-MANDIR = $(PREFIX)/share/man/man1 ++MANDIR = $(PREFIX)/man/man1 + ICONDIR = $(DATADIR)/icons + DESKTOP = $(DATADIR)/kornelix-$(PROGRAM).desktop + + $(PROGRAM): $(PROGRAM).o zfuncs.o + $(CXX) $(LFLAGS) -ltiff -o $(PROGRAM) $(PROGRAM).o zfuncs.o +- @ ./dependencies.sh + + $(PROGRAM).o: $(SOURCE) + $(CXX) $(CFLAGS) -o $(PROGRAM).o $(SOURCE) \ +@@ -42,8 +41,6 @@ + cp -f icons/* $(DESTDIR)$(ICONDIR) + cp -f -R locales/* $(DESTDIR)$(DATADIR)/locales + cp -f $(PROGRAM) $(DESTDIR)$(BINDIR) +- @ echo use make menu to install desktop menu +- @ echo use make manpage to install man page + + menu: + cp -f desktop $(DESTDIR)$(DESKTOP) diff --git a/graphics/fotoxx/files/patch-dependencies.sh b/graphics/fotoxx/files/patch-dependencies.sh new file mode 100644 index 000000000000..907629690ac7 --- /dev/null +++ b/graphics/fotoxx/files/patch-dependencies.sh @@ -0,0 +1,37 @@ +--- dependencies.sh.orig 2011-02-28 11:04:24.000000000 -0500 ++++ dependencies.sh 2011-03-28 08:52:03.000000000 -0400 +@@ -1,4 +1,4 @@ +-#! /bin/bash ++#!/bin/sh + # + # Check if dependencies are installed before build. + # +@@ -7,15 +7,15 @@ + # but they are required at run time to handle EXIF data + # and RAW files from digital cameras. + +-dlist=" g++ /usr/include/gtk-2.0/gtk/gtk.h +- /usr/include/tiffio.h /usr/lib*/libtiff.so +- xdg-open xdg-desktop-menu exiftool" ++dlist=" /usr/local/include/gtk-2.0/gtk/gtk.h ++ /usr/local/include/tiffio.h /usr/local/lib/libtiff.so ++ /usr/local/bin/xdg-open /usr/local/bin/xdg-desktop-menu /usr/local/bin/exiftool" + + error=0 + + for dname in $dlist + do +- if [ ${dname:0:1} = "/" ] ++ if [ ${dname#/*} = ${dname} ] + then find $dname >/dev/null 2>&1 + else which $dname >/dev/null + fi +@@ -40,7 +40,7 @@ + + for dname in $dlist + do +- if [ ${dname:0:1} = "/" ] ++ if [ ${dname#/*} = ${dname} ] + then find $dname >/dev/null 2>&1 + else which $dname >/dev/null + fi diff --git a/graphics/fotoxx/files/patch-fotoxx-11.03.cc b/graphics/fotoxx/files/patch-fotoxx-11.03.cc new file mode 100644 index 000000000000..292dd0f6a234 --- /dev/null +++ b/graphics/fotoxx/files/patch-fotoxx-11.03.cc @@ -0,0 +1,43 @@ +--- fotoxx-11.03.cc.orig 2011-02-28 17:04:24.000000000 +0100 ++++ fotoxx-11.03.cc 2011-05-26 10:36:11.000000000 +0200 +@@ -24,6 +24,13 @@ + #include <tiffio.h> + #include "zfuncs.h" + ++#ifdef __FreeBSD__ ++ #include <unistd.h> /* for getcwd */ ++ #include <sys/types.h> /* for getpwuid */ ++ #include <pwd.h> /* for getpwuid */ ++ #define WEXITSTATUS(w)((w)>>8) // fixes WEXITSTATUS not declared on FreeBSD ++#endif ++ + #define fversion "Fotoxx v.11.03 2011.03.01" // version and date + #define fversioncc 16 // cc to use for window title bar + #define flicense "Free software - GNU General Public License v.3" +@@ -986,7 +993,7 @@ + } + + if (! curr_file) { // set curr. directory anyway v.11.01 +- ppv = get_current_dir_name(); ++ ppv = getwd(null); + curr_dirk = strdupz(ppv,0,"curr_dirk"); + free(ppv); + err = chdir(curr_dirk); +@@ -2428,7 +2435,7 @@ + if (curr_file) + image_gallery(curr_file,"paint1",0,m_gallery2,mWin); // overlay main window v.10.9 + else { +- char *pp = get_current_dir_name(); ++ char *pp = getwd(null); + if (pp) { + image_gallery(pp,"paint1",0,m_gallery2,mWin); // use current directory v.10.9 + free(pp); +@@ -5169,7 +5176,7 @@ + } + + *tempdir = 0; // temp directory: /tmp/<user>/fotoxx/email +- strncatv(tempdir,99,"/tmp/",cuserid(null),"/fotoxx/email",null); ++ strncatv(tempdir,99,"/tmp/",getpwuid(null),"/fotoxx/email",null); + + sprintf(command,"mkdir -p %s",tempdir); // (re)create directory + err = system(command); diff --git a/graphics/fotoxx/files/patch-zfuncs.cc b/graphics/fotoxx/files/patch-zfuncs.cc new file mode 100644 index 000000000000..f92ddf042292 --- /dev/null +++ b/graphics/fotoxx/files/patch-zfuncs.cc @@ -0,0 +1,119 @@ +--- zfuncs.cc.orig 2011-02-28 17:04:24.000000000 +0100 ++++ zfuncs.cc 2011-05-26 10:04:13.000000000 +0200 +@@ -24,6 +24,15 @@ + + #include "zfuncs.h" + ++#ifdef __FreeBSD__ ++ #include <sys/event.h> ++ #include <sys/types.h> ++ #include <sys/times.h> ++ #include <pwd.h> ++ #include <execinfo.h> ++ ++ #define WEXITSTATUS(w)((w)>>8) // fixes the WEXITSTATUS not declared on FreeBSD ++#endif + + /************************************************************************** + system-level utility functions +@@ -778,23 +787,27 @@ + char fname[200]; // null-terminated file name within directory + }; + ++ int f, kq, nev; ++ struct kevent change; ++ struct kevent event; ++ + inotify_event evbuff; + struct timeval waitime; + fd_set fids; + int wd, retval, cc, fcc; +- int evbcc = sizeof(evbuff); ++ int evbcc = sizeof(event); + static int fid = -1; + + if (strEqu(action,"open")) // setup a monitored directory + { +- fid = inotify_init(); +- if (fid < 0) { ++ f = kqueue(); ++ if (f < 0) { + return -1; + } +- wd = inotify_add_watch(fid,dirk,IN_ALL_EVENTS); ++ wd = kevent(f, &change, 1, &event, 1, NULL); + if (wd < 0) { +- close(fid); +- fid = -1; ++ close(f); ++ f = -1; + return -1; + } + return 0; +@@ -802,7 +815,7 @@ + + if (strEqu(action,"event")) // return pending event or zero + { +- if (fid < 0) return -1; ++ if (f < 0) return -1; + + if (file) { + if (*file) zfree(*file); // free prior memory +@@ -816,12 +829,12 @@ + waitime.tv_sec = 0; + waitime.tv_usec = 1; + +- retval = select(fid+1, &fids, null, null, &waitime); ++ retval = select(f+1, &fids, null, null, &waitime); + if (retval == 0) return 0; // nothing pending + + if (retval == -1) { // error + close(fid); +- fid = -1; ++ f = -1; + return -1; + } + +@@ -832,28 +845,21 @@ + return -1; + } + +- fcc = evbuff.len; +- if (fcc > 199) return -1; +- if (fcc > 0 && file) +- *file = strdupz(evbuff.fname,0,"zmondirk_file"); // return filename v.3.5 +- +- if (evbuff.mask & (IN_CREATE | IN_MOVED_TO)) // file was added ++ if (event.fflags & (NOTE_WRITE | NOTE_RENAME)) // file was added + return 1; +- if (evbuff.mask & (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE | IN_MODIFY)) // file was possibly added ++ if (event.fflags & (NOTE_EXIT | NOTE_REVOKE | NOTE_ATTRIB)) // file was possibly added + return 1; +- if (evbuff.mask & (IN_DELETE | IN_MOVED_FROM)) // file was deleted ++ if (event.fflags & (NOTE_DELETE)) // file was deleted + return 2; +- if (evbuff.mask & (IN_DELETE_SELF | IN_MOVE_SELF)) // monitored directory gone +- return 3; + return 9; // other + } + } + + if (strEqu(action,"close")) // stop monitoring + { +- if (fid > -1) retval = close(fid); ++ if (f > -1) retval = close(f); + else retval = -1; +- fid = -1; ++ f = -1; + return retval; + } + +@@ -2983,7 +2989,7 @@ + strcpy(zicondir,zdatadir); + strcat(zicondir,"/icons"); + +- pp = cuserid(0); ++ pp = getlogin(); + if (strEqu(pp,"root")) snprintf(zuserdir,199,"/root/.%s",zappname); // get /root/.appname + else snprintf(zuserdir,199,"%s/.%s",getenv("HOME"),zappname); // or /home/user/.appname + diff --git a/graphics/fotoxx/files/patch-zfuncs.h b/graphics/fotoxx/files/patch-zfuncs.h new file mode 100644 index 000000000000..4cfd1a9c6209 --- /dev/null +++ b/graphics/fotoxx/files/patch-zfuncs.h @@ -0,0 +1,17 @@ +--- zfuncs.h.orig 2011-02-28 17:04:24.000000000 +0100 ++++ zfuncs.h 2011-05-25 17:50:21.000000000 +0200 +@@ -36,7 +36,13 @@ + #include <signal.h> + #include <execinfo.h> + #include <locale.h> +-#include <sys/inotify.h> ++ ++#ifdef __linux__ ++ #include <sys/inotify.h> ++#elif defined(__FreeBSD__) ++ #include <sys/event.h> ++ #include <sys/types.h> ++#endif + + #define int8 char // number types + #define int16 short |