ports/142376: New port: graphics/picpuz

Stas Timokhin devel at stasyan.com
Wed Jan 6 12:00:17 UTC 2010


>Number:         142376
>Category:       ports
>Synopsis:       New port: graphics/picpuz
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 06 12:00:16 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Stas Timokhin
>Release:        9.0-current
>Organization:
None
>Environment:
>Description:
Cool Jigsaw Puzzle.
http://kornelix.squarespace.com/picpuz/
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	picpuz
#	picpuz/files
#	picpuz/files/patch-zfuncs.h
#	picpuz/files/patch-zfuncs.cpp
#	picpuz/files/patch-Makefile
#	picpuz/Makefile
#	picpuz/distinfo
#	picpuz/pkg-descr
#	picpuz/pkg-plist
#
echo c - picpuz
mkdir -p picpuz > /dev/null 2>&1
echo c - picpuz/files
mkdir -p picpuz/files > /dev/null 2>&1
echo x - picpuz/files/patch-zfuncs.h
sed 's/^X//' >picpuz/files/patch-zfuncs.h << '526902bab5a07a2edec3eeeced36861c'
X--- zfuncs.h.orig	2009-10-07 08:40:43.000000000 +0700
X+++ zfuncs.h	2009-10-07 08:50:37.000000000 +0700
X@@ -19,7 +19,201 @@
X #include <signal.h>
X #include <execinfo.h>
X #include <locale.h>
X-#include <sys/inotify.h>
X+// inotify_local.h injected directly into zfuncs.h
X+
X+/*
X+ * inotify_local.h - wrapping of libc features and kernel defines
X+ *
X+ * Copyright (C) 2005-2006 Kay Sievers <kay.sievers at vrfy.org>
X+ *
X+ *	This program is free software; you can redistribute it and/or modify it
X+ *	under the terms of the GNU General Public License as published by the
X+ *	Free Software Foundation version 2 of the License.
X+ * 
X+ *	This program is distributed in the hope that it will be useful, but
X+ *	WITHOUT ANY WARRANTY; without even the implied warranty of
X+ *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
X+ *	General Public License for more details.
X+ * 
X+ *	You should have received a copy of the GNU General Public License along
X+ *	with this program; if not, write to the Free Software Foundation, Inc.,
X+ *	675 Mass Ave, Cambridge, MA 02139, USA.
X+ *
X+ */
X+
X+#ifndef _INOTIFY_LOCAL_H_
X+#define _INOTIFY_LOCAL_H_
X+
X+#include <string.h>
X+#include <unistd.h>
X+#include <stdint.h>
X+
X+/* needed until Inotify! syscalls reach glibc */
X+#include <sys/syscall.h>
X+#ifndef __NR_inotify_init
X+#if defined(__i386__)
X+# define __NR_inotify_init	291
X+# define __NR_inotify_add_watch	292
X+# define __NR_inotify_rm_watch	293
X+#elif defined(__x86_64__)
X+# define __NR_inotify_init	253
X+# define __NR_inotify_add_watch	254
X+# define __NR_inotify_rm_watch	255
X+#elif defined(__powerpc__) || defined(__powerpc64__)
X+# define __NR_inotify_init	275
X+# define __NR_inotify_add_watch	276
X+# define __NR_inotify_rm_watch	277
X+#elif defined (__ia64__)
X+# define __NR_inotify_init	1277
X+# define __NR_inotify_add_watch	1278
X+# define __NR_inotify_rm_watch	1279
X+#elif defined (__s390__)
X+# define __NR_inotify_init	284
X+# define __NR_inotify_add_watch	285
X+# define __NR_inotify_rm_watch	286
X+#elif defined (__mc68000__)
X+# define __NR_inotify_init	284
X+# define __NR_inotify_add_watch	285
X+# define __NR_inotify_rm_watch	286
X+#elif defined (__alpha__)
X+# define __NR_inotify_init	444
X+# define __NR_inotify_add_watch	445
X+# define __NR_inotify_rm_watch	446
X+#elif defined (__sparc__) || defined (__sparc64__)
X+# define __NR_inotify_init	151
X+# define __NR_inotify_add_watch	152
X+# define __NR_inotify_rm_watch	156
X+#elif defined (__arm__)
X+# define __NR_inotify_init	__NR_SYSCALL_BASE+316
X+# define __NR_inotify_add_watch	__NR_SYSCALL_BASE+317
X+# define __NR_inotify_rm_watch	__NR_SYSCALL_BASE+318
X+#elif defined (__sh__)
X+# define __NR_inotify_init	290
X+# define __NR_inotify_add_watch	291
X+# define __NR_inotify_rm_watch	292
X+#elif defined (__m32r__)
X+# define __NR_inotify_init      290
X+# define __NR_inotify_add_watch 291
X+# define __NR_inotify_rm_watch  292
X+#elif defined (__hppa__)
X+# define __NR_inotify_init      269
X+# define __NR_inotify_add_watch 270
X+# define __NR_inotify_rm_watch  271
X+#elif defined (__mips__)
X+# include <sgidefs.h>
X+# if _MIPS_SIM == _MIPS_SIM_ABI32
X+#  define __NR_Linux             4000
X+#  define __NR_inotify_init      (__NR_Linux + 284)
X+#  define __NR_inotify_add_watch (__NR_Linux + 285)
X+#  define __NR_inotify_rm_watch  (__NR_Linux + 286)
X+# elif _MIPS_SIM == _MIPS_SIM_ABI64
X+#  define __NR_Linux             5000
X+#  define __NR_inotify_init      (__NR_Linux + 243)
X+#  define __NR_inotify_add_watch (__NR_Linux + 244)
X+#  define __NR_inotify_rm_watch  (__NR_Linux + 245)
X+# elif _MIPS_SIM == _MIPS_SIM_NABI32
X+#  define __NR_Linux             6000
X+#  define __NR_inotify_init      (__NR_Linux + 247)
X+#  define __NR_inotify_add_watch (__NR_Linux + 248)
X+#  define __NR_inotify_rm_watch  (__NR_Linux + 249)
X+# endif
X+#else
X+# warning "inotify unsupported on this architecture!"
X+#endif
X+#endif /* __NR_inotify_init */
X+
X+/* dummy if we don't have the syscalls defined */
X+#ifndef __NR_inotify_init
X+static inline int inotify_init(void)
X+{
X+	return -1;
X+}
X+
X+static inline int inotify_add_watch(int fd, const char *name, uint32_t mask)
X+{
X+	return -1;
X+}
X+
X+static inline int inotify_rm_watch(int fd, uint32_t wd)
X+{
X+	return -1;
X+}
X+#else
X+static inline int inotify_init(void)
X+{
X+	return syscall(__NR_inotify_init);
X+}
X+
X+static inline int inotify_add_watch(int fd, const char *name, uint32_t mask)
X+{
X+	return syscall(__NR_inotify_add_watch, fd, name, mask);
X+}
X+
X+static inline int inotify_rm_watch(int fd, uint32_t wd)
X+{
X+	return syscall(__NR_inotify_rm_watch, fd, wd);
X+}
X+#endif /* __NR_inotify_init */
X+
X+#ifndef IN_CREATE
X+#define IN_CREATE		0x00000100	/* Subfile was created */
X+#define IN_MOVED_FROM		0x00000040	/* File was moved from X */
X+#define IN_MOVED_TO		0x00000080	/* File was moved to Y */
X+#define IN_DELETE		0x00000200	/* Subfile was deleted */
X+#define IN_CLOSE_WRITE		0x00000008	/* Writtable file was closed */
X+#define IN_MOVE			(IN_MOVED_FROM | IN_MOVED_TO) /* moves */
X+#endif /* IN_CREATE */
X+
X+struct inotify_event {
X+	int      wd;
X+	uint32_t mask;
X+	uint32_t cookie;
X+	uint32_t len;
X+	char     *name;
X+};
X+
X+/* the following are legal, implemented events that user-space can watch for */
X+#define IN_ACCESS		0x00000001	/* File was accessed */
X+#define IN_MODIFY		0x00000002	/* File was modified */
X+#define IN_ATTRIB		0x00000004	/* Metadata changed */
X+#define IN_CLOSE_WRITE		0x00000008	/* Writtable file was closed */
X+#define IN_CLOSE_NOWRITE	0x00000010	/* Unwrittable file closed */
X+#define IN_OPEN			0x00000020	/* File was opened */
X+#define IN_MOVED_FROM		0x00000040	/* File was moved from X */
X+#define IN_MOVED_TO		0x00000080	/* File was moved to Y */
X+#define IN_CREATE		0x00000100	/* Subfile was created */
X+#define IN_DELETE		0x00000200	/* Subfile was deleted */
X+#define IN_DELETE_SELF		0x00000400	/* Self was deleted */
X+#define IN_MOVE_SELF		0x00000800	/* Self was moved */
X+
X+/* the following are legal events.  they are sent as needed to any watch */
X+#define IN_UNMOUNT		0x00002000	/* Backing fs was unmounted */
X+#define IN_Q_OVERFLOW		0x00004000	/* Event queued overflowed */
X+#define IN_IGNORED		0x00008000	/* File was ignored */
X+
X+/* helper events */
X+#define IN_CLOSE		(IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* close */
X+#define IN_MOVE			(IN_MOVED_FROM | IN_MOVED_TO) /* moves */
X+
X+/* special flags */
X+#define IN_ONLYDIR		0x01000000	/* only watch the path if it is a directory */
X+#define IN_DONT_FOLLOW		0x02000000	/* don't follow a sym link */
X+#define IN_MASK_ADD		0x20000000	/* add to the mask of an already existing watch */
X+#define IN_ISDIR		0x40000000	/* event occurred against dir */
X+#define IN_ONESHOT		0x80000000	/* only send event once */
X+
X+/*
X+ * All of the events - we build the list by hand so that we can add flags in
X+ * the future and not break backward compatibility.  Apps will get only the
X+ * events that they originally wanted.  Be sure to add new events here!
X+ */
X+#define IN_ALL_EVENTS	(IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \
X+			 IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \
X+			 IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \
X+			 IN_MOVE_SELF)
X+
X+#endif /* _INOTIFY_LOCAL_H_ */
X+
X 
X #define  int8   char                                                       //  number types
X #define  int16  short
526902bab5a07a2edec3eeeced36861c
echo x - picpuz/files/patch-zfuncs.cpp
sed 's/^X//' >picpuz/files/patch-zfuncs.cpp << 'f2bb48b049edb641f5f6a981d506a7cb'
X--- zfuncs.cpp.orig	2009-10-02 03:20:15.000000000 +0700
X+++ zfuncs.cpp	2009-10-07 12:35:45.000000000 +0700
X@@ -23,6 +23,11 @@
X //     zfuncs version  v.2.25
X 
X #include "zfuncs.h"
X+#ifdef __FreeBSD__
X+#include <sys/wait.h>
X+#include <sys/types.h>
X+#include <pwd.h>
X+#endif
X 
X /**************************************************************************
X    system-level utility functions
X@@ -2875,7 +2880,7 @@
X    strcpy(zicondir,zdatadir);
X    strcat(zicondir,"/icons");
X 
X-   pp = cuserid(0);
X+   pp = getpwuid(geteuid())->pw_name;
X    if (strEqu(pp,"root")) snprintf(zuserdir,199,"/root/.%s",zappname);     //  get /root/.appname
X    else snprintf(zuserdir,199,"%s/.%s",getenv("HOME"),zappname);           //  or /home/user/.appname
X 
f2bb48b049edb641f5f6a981d506a7cb
echo x - picpuz/files/patch-Makefile
sed 's/^X//' >picpuz/files/patch-Makefile << '2b067940c6f241bcaff0e1479a2dab33'
X--- Makefile.orig	2009-10-29 14:38:40.000000000 +0600
X+++ Makefile	2010-01-04 19:55:10.000000000 +0600
X@@ -6,7 +6,7 @@
X 
X # replace CFLAGS and LFLAGS -O (oh) with -g for GDB debugging
X CFLAGS = -O -Wall -c `pkg-config --cflags gtk+-2.0`
X-LFLAGS = -O -Wall -rdynamic `pkg-config --libs gtk+-2.0 gthread-2.0`
X+LFLAGS = -O -Wall -rdynamic -lexecinfo `pkg-config --libs gtk+-2.0 gthread-2.0`
X 
X # use $PREFIX if defined, else assume /usr/local
X ifeq "$(PREFIX)" ""
X@@ -39,15 +39,16 @@
X 	cp $(PROGRAM) $(DESTDIR)$(BINDIR)
X 	cp -R locales/* $(DESTDIR)$(DATADIR)/locales
X 	#  install .desktop file (menu entry)
X-	@echo "[Desktop Entry]" > $(DESKTOP)
X-	@echo "Name=$(PROGRAM)" >> $(DESKTOP)
X-	@echo "Categories=Game" >> $(DESKTOP)
X-	@echo "Type=Application" >> $(DESKTOP)
X-	@echo "Terminal=false" >> $(DESKTOP)
X-	@echo "Exec=$(BINDIR)/$(PROGRAM)" >> $(DESKTOP)
X-	@echo "Icon=$(DATADIR)/icons/$(PROGRAM).png" >> $(DESKTOP)
X-	@echo "GenericName=Jigsaw Puzzle" >> $(DESKTOP)
X-	xdg-desktop-menu install $(DESKTOP)
X+	ln -s $(DESTDIR)$(DATADIR)/icons/picpuz.png ${PREFIX}/share/pixmaps/picpuz.png
X+#	@echo "[Desktop Entry]" > $(DESKTOP)
X+#	@echo "Name=$(PROGRAM)" >> $(DESKTOP)
X+#	@echo "Categories=Game" >> $(DESKTOP)
X+#	@echo "Type=Application" >> $(DESKTOP)
X+#	@echo "Terminal=false" >> $(DESKTOP)
X+#	@echo "Exec=$(BINDIR)/$(PROGRAM)" >> $(DESKTOP)
X+#	@echo "Icon=$(DATADIR)/icons/$(PROGRAM).png" >> $(DESKTOP)
X+#	@echo "GenericName=Jigsaw Puzzle" >> $(DESKTOP)
X+#	xdg-desktop-menu install $(DESKTOP)
X 
X uninstall:
X 	xdg-desktop-menu uninstall $(DESKTOP)
2b067940c6f241bcaff0e1479a2dab33
echo x - picpuz/Makefile
sed 's/^X//' >picpuz/Makefile << '8861abd9820d3cb1471d96cbc70e70b9'
X# New ports collection makefile for: graphics/picpuz
X# Date created:		04 Jan 2010
X# Whom:			Stas Timokhin <devel at stasyan.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	picpuz
XPORTVERSION=	2.1.1
XCATEGORIES=	graphics games
XMASTER_SITES=	http://kornelix.squarespace.com/storage/downloads/
X
XMAINTAINER=	devel at stasyan.com
XCOMMENT=	Jigsaw puzzle program
X
XUSE_GMAKE=	yes
XUSE_GNOME=	gtk20 pkgconfig
X
XALL_TARGET=	#
X#RUN_DEPENDS+=	xdg-desktop-menu:${PORTSDIR}/devel/xdg-utils
XLIB_DEPENDS+=	execinfo.1:${PORTSDIR}/devel/libexecinfo
XDESKTOP_ENTRIES="Picpuz" \
X		"Jigsaw Puzzle" \
X		"picpuz.png" \
X		"picpuz" \
X		"Application;Game;" \
X		true
X
X.include <bsd.port.mk>
8861abd9820d3cb1471d96cbc70e70b9
echo x - picpuz/distinfo
sed 's/^X//' >picpuz/distinfo << 'c8d98f20d2645bf01c330fbcc3756c26'
XMD5 (picpuz-2.1.1.tar.gz) = 56e8033746739abe34ef84e6458bf27f
XSHA256 (picpuz-2.1.1.tar.gz) = 9c22d81e5f3e4b21fcb9055e3ac6e56407b31382455471aba63863619bc6938c
XSIZE (picpuz-2.1.1.tar.gz) = 214984
c8d98f20d2645bf01c330fbcc3756c26
echo x - picpuz/pkg-descr
sed 's/^X//' >picpuz/pkg-descr << '97469d0da6dba015e8f97055132a6680'
XPicpuz is a free Linux "jigsaw puzzle" program.
XYou can take almost any image (jpeg, tiff, png ...)
Xand scramble it into many pieces (tens to hundreds).
XYou can then reassemble the picture using the mouse to move the pieces around.
X
XWWW: http://kornelix.squarespace.com/picpuz/
97469d0da6dba015e8f97055132a6680
echo x - picpuz/pkg-plist
sed 's/^X//' >picpuz/pkg-plist << '0ce9e3ca9043f059ac1b7bc1ede1aa86'
Xbin/picpuz
Xshare/doc/picpuz/CHANGES
Xshare/doc/picpuz/COPYING
Xshare/doc/picpuz/README
Xshare/doc/picpuz/TRANSLATIONS
Xshare/doc/picpuz/images/screenshot.jpg
Xshare/doc/picpuz/userguide-en.html
Xshare/pixmaps/picpuz.png
X%%DATADIR%%/icons/bigger.png
X%%DATADIR%%/icons/first-page.png
X%%DATADIR%%/icons/folder.png
X%%DATADIR%%/icons/folder128.png
X%%DATADIR%%/icons/folder256.png
X%%DATADIR%%/icons/gallery.png
X%%DATADIR%%/icons/last-page.png
X%%DATADIR%%/icons/line.png
X%%DATADIR%%/icons/next-page.png
X%%DATADIR%%/icons/next-row.png
X%%DATADIR%%/icons/open.png
X%%DATADIR%%/icons/picpuz.png
X%%DATADIR%%/icons/piece.png
X%%DATADIR%%/icons/prev-page.png
X%%DATADIR%%/icons/prev-row.png
X%%DATADIR%%/icons/show.png
X%%DATADIR%%/icons/smaller.png
X%%DATADIR%%/icons/tile.png
X%%DATADIR%%/locales/de/picpuz.po
X%%DATADIR%%/locales/de/zfuncs.po
X%%DATADIR%%/locales/es/picpuz.po
X%%DATADIR%%/locales/es/picpuz.po.old
X%%DATADIR%%/locales/es/zfuncs.po
X%%DATADIR%%/locales/fr/picpuz.po
X%%DATADIR%%/locales/fr/zfuncs.po
X%%DATADIR%%/locales/gl/picpuz.po
X%%DATADIR%%/locales/gl/picpuz.po.old
X%%DATADIR%%/locales/gl/zfuncs.po
X%%DATADIR%%/locales/zh_CN/picpuz.po
X%%DATADIR%%/locales/zh_CN/zfuncs.po
X at dirrm %%DATADIR%%/locales/zh_CN
X at dirrm %%DATADIR%%/locales/gl
X at dirrm %%DATADIR%%/locales/fr
X at dirrm %%DATADIR%%/locales/es
X at dirrm %%DATADIR%%/locales/de
X at dirrm %%DATADIR%%/locales
X at dirrm %%DATADIR%%/icons
X at dirrm %%DATADIR%%
X at dirrm share/doc/picpuz/images
X at dirrm share/doc/picpuz
X at dirrmtry share/applications
0ce9e3ca9043f059ac1b7bc1ede1aa86
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list