Bug 47622

Summary: New Port: misc/gkrellshoot2
Product: Ports & Packages Reporter: Andrew Stuart <elitetek>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
gkrellshoot2.shar none

Description Andrew Stuart 2003-01-29 06:00:10 UTC
	New port: gkrellshoot2, a screen lock and capture plugin for gkrellm 2
Comment 1 corecode@corecode.ath.cx 2003-01-29 15:00:15 UTC
Lately Andrew Stuart told:

> sed 's/^X//' >gkrellshoot2/files/patch-Makefile << 'END-of-gkrellshoot2/files/patch-Makefile'
> X--- Makefile.orig	Tue Jan 28 21:30:32 2003
> X+++ Makefile	Tue Jan 28 21:39:34 2003
> X@@ -1,11 +1,11 @@
> X GTK_INCLUDE = `pkg-config gtk+-2.0 --cflags`
> X GTK_LIB = `pkg-config gtk+-2.0 --libs`
> X 
> X-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE) 
> X+CFLAGS+= -Wall -fPIC $(GTK_INCLUDE)

i don't see the purpose here WRT the diff below

> X LIBS = $(GTK_LIB) 
> X LFLAGS = -shared
> X 
> X-CC = gcc $(CFLAGS) $(FLAGS)
> X+CC ?= gcc $(CFLAGS)

don't seem good. how about this:

CC?=	gcc
CC+=	${CFLAGS}

> X 
> X OBJS = gkrellshoot.o
> X 
> X@@ -18,13 +18,7 @@
> X gkrellshoot.o: gkrellshoot.c
> X 
> X install:
> X-	if [ -d /usr/local/lib/gkrellm2/plugins/ ] ; then \
> X-		install -c -s -m 644 gkrellshoot.so /usr/local/lib/gkrellm2/plugins/ ; \
> X-	elif [ -d /usr/lib/gkrellm2/plugins/ ] ; then \
> X-        	install -c -s -m 644 gkrellshoot.so /usr/lib/gkrellm2/plugins/ ; \
> X-	else \
> X-		install -D -c -s -m 644 gkrellshoot.so /usr/lib/gkrellm2/plugins/gkrellshoot.so ; \
> X-	fi
> X+	install -c -s gkrellshoot.so ${PREFIX}/libexec/gkrellm2/plugins
> X userinstall:
> X 	if [ -d $(HOME)/.gkrellm2/plugins/ ] ; then \
> X 		install -C -s -m 644 gkrellshoot.so $(HOME)/.gkrellm2/plugins/ ; \

large hunk for a change that could be done in the port's Makefile in a
much more easy way:

do-install:
	@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.so ${PREFIX}/libexec/gkrellm2/plugins
> X@@ -33,7 +27,6 @@
> X 	fi
> X 
> X uninstall:
> X-	rm -f /usr/local/lib/gkrellm2/plugins/gkrellshoot.so
> X-	rm -f /usr/lib/gkrellm2/plugins/gkrellshoot.so
> X-	rm -f $(HOME)/.gkrellm2/plugins/gkrellshoot.so
> X+	rm -f ${PREFIX}/libexec/gkrellm2/plugins/gkrellshoot.so

we don't need that, do we?

> X 
> X+all:   gkrellshoot.so

how about (in port's Makefile):

ALL_TARGET=	${PORTNAME}.so

> sed 's/^X//' >gkrellshoot2/Makefile << 'END-of-gkrellshoot2/Makefile'
> X# New ports collection makefile for: gkrellshoot2
                                       (-----|1|----)
> X# Date Created:			28 Jan 2003
> X# Whom:				Andrew Stuart <elitetek@tekrealm.net>
> X#
> X# $FreeBSD$
> X#
> X
> XPORTNAME=    gkrellshoot
               (----|2|----)

uhm. why is |1| != |2|?
there already exists a port 'gkrellshoot'. how about modifying either
${PORTNAME} or ${PKGNAMESUFFIX}?

cheers
  simon

-- 
/"\   http://corecode.ath.cx/#donate
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News
Comment 2 Andrew Stuart 2003-01-30 23:14:17 UTC
On Wed, 29 Jan 2003 at 16:00:15 +0100, Simon 'corecode' Schubert wrote:
> i don't see the purpose here WRT the diff below


what does WRT stand for?
> 
> > X LIBS = $(GTK_LIB) 
> > X LFLAGS = -shared
> > X 
> > X-CC = gcc $(CFLAGS) $(FLAGS)
> > X+CC ?= gcc $(CFLAGS)
> 
> don't seem good. how about this:
> 
> CC?=	gcc
> CC+=	${CFLAGS}


Interesting, I was told to do it the way above via another commiter, but
I will correct this.

> 
> > X 
> > X OBJS = gkrellshoot.o
> > X 
> > X@@ -18,13 +18,7 @@
> > X gkrellshoot.o: gkrellshoot.c
> > X 
> > X install:

_snip_
> large hunk for a change that could be done in the port's Makefile in a
> much more easy way:
> 
> do-install:
> 	@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.so ${PREFIX}/libexec/gkrellm2/plugins


Again, I was taught to do it this way via the commiter, but defiently
this way looks better and saves me alot of work.

> > X@@ -33,7 +27,6 @@
> > X 	fi
> > X 
> > X uninstall:
> > X-	rm -f /usr/local/lib/gkrellm2/plugins/gkrellshoot.so
> > X-	rm -f /usr/lib/gkrellm2/plugins/gkrellshoot.so
> > X-	rm -f $(HOME)/.gkrellm2/plugins/gkrellshoot.so
> > X+	rm -f ${PREFIX}/libexec/gkrellm2/plugins/gkrellshoot.so
> 
> we don't need that, do we?


Again, was suggested I do this for completeness. Will remove though.
> 
> > X 
> > X+all:   gkrellshoot.so
> 
> how about (in port's Makefile):
> 
> ALL_TARGET=	${PORTNAME}.so
>

same as all the above, better way, I will update and submit it again.
 
> > sed 's/^X//' >gkrellshoot2/Makefile << 'END-of-gkrellshoot2/Makefile'
> > X# New ports collection makefile for: gkrellshoot2
>                                        (-----|1|----)
> > X# Date Created:			28 Jan 2003
> > X# Whom:				Andrew Stuart <elitetek@tekrealm.net>
> > X#
> > X# $FreeBSD$
> > X#
> > X
> > XPORTNAME=    gkrellshoot
>                (----|2|----)
> 
> uhm. why is |1| != |2|?
> there already exists a port 'gkrellshoot'. how about modifying either
> ${PORTNAME} or ${PKGNAMESUFFIX}?


Alas, this is from my own lack of knowledge, but i reference
audio/gkrellmvolume2 and audio/gkrellmms2 which have it set
the same way.

If i change the portname, the port fails to fetch/build, I didnt think
of using pkgnamesuffix as I was trying to follow 'uniform' for the above
mentioned ports.

I appreciate your insite, and I will work on changing these, It's also
helpful, as I was going to add a few other gkrellm 2 plugins.
> 
> cheers
>   simon
> 
> -- 
> /"\   http://corecode.ath.cx/#donate
> \ /
>  \     ASCII Ribbon Campaign
> / \  Against HTML Mail and News


-- 
Andrew Stuart
http://www.tekrealm.net


There are very few personal problems that cannot be solved through a
suitable application of high explosives.
Comment 3 Andrew Stuart 2003-01-31 06:28:04 UTC
Updated shar file.

---gkrellshoot2-new.shar ---

# 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:
#
#	gkrellshoot2
#	gkrellshoot2/files
#	gkrellshoot2/files/patch-Makefile
#	gkrellshoot2/Makefile
#	gkrellshoot2/distinfo
#	gkrellshoot2/pkg-comment
#	gkrellshoot2/pkg-descr
#	gkrellshoot2/pkg-plist
#
echo c - gkrellshoot2
mkdir -p gkrellshoot2 > /dev/null 2>&1
echo c - gkrellshoot2/files
mkdir -p gkrellshoot2/files > /dev/null 2>&1
echo x - gkrellshoot2/files/patch-Makefile
sed 's/^X//' >gkrellshoot2/files/patch-Makefile <<
'END-of-gkrellshoot2/files/patch-Makefile'
X--- Makefile.orig	Thu Jan 30 21:20:26 2003
X+++ Makefile	Thu Jan 30 21:23:35 2003
X@@ -1,11 +1,12 @@
X GTK_INCLUDE = `pkg-config gtk+-2.0 --cflags`
X GTK_LIB = `pkg-config gtk+-2.0 --libs`
X 
X-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE) 
X+CFLAGS = -fPIC $(GTK_INCLUDE) 
X LIBS = $(GTK_LIB) 
X LFLAGS = -shared
X 
X-CC = gcc $(CFLAGS) $(FLAGS)
X+CC?=    gcc
X+CC+=    ${CFLAGS}
X 
X OBJS = gkrellshoot.o
X 
END-of-gkrellshoot2/files/patch-Makefile
echo x - gkrellshoot2/Makefile
sed 's/^X//' >gkrellshoot2/Makefile << 'END-of-gkrellshoot2/Makefile'
X# New ports collection makefile for:	gkrellshoot2
X# Date Created:			28 Jan 2003
X# Whom:				Andrew Stuart
<elitetek@tekrealm.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	gkrellshoot
XPORTVERSION=	0.4.1
XCATEGORIES=	misc
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
XPKGNAMESUFFIX=	2
X
XMAINTAINER=	elitetek@tekrealm.net
X
XBUILD_DEPENDS=
${X11BASE}/include/gkrellm2/gkrellm.h:${PORTSDIR}/sysutils/gkrellm2
XRUN_DEPENDS=	gkrellm:${PORTSDIR}/sysutils/gkrellm2 \
X		import:${PORTSDIR}/graphics/ImageMagick
X
XWRKSRC=		${WRKDIR}/gkrellShoot-${PORTVERSION}
XUSE_X_PREFIX=	yes
X
XALL_TARGET=	${PORTNAME}.so
X
Xdo-install:
X	@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.so
${PREFIX}/libexec/gkrellm2/plugins
X
X.include <bsd.port.mk>
END-of-gkrellshoot2/Makefile
echo x - gkrellshoot2/distinfo
sed 's/^X//' >gkrellshoot2/distinfo << 'END-of-gkrellshoot2/distinfo'
XMD5 (gkrellshoot-0.4.1.tar.gz) = db0835ef0ec77ab06547fff25ec134f7
END-of-gkrellshoot2/distinfo
echo x - gkrellshoot2/pkg-comment
sed 's/^X//' >gkrellshoot2/pkg-comment <<
'END-of-gkrellshoot2/pkg-comment'
XA screen locking and screen capture plugin for GKrellM 2
END-of-gkrellshoot2/pkg-comment
echo x - gkrellshoot2/pkg-descr
sed 's/^X//' >gkrellshoot2/pkg-descr << 'END-of-gkrellshoot2/pkg-descr'
XThis plugin puts a lock and shoot button on your GKrellM 2, It uses
XImageMagick for screen capture and can be configured for your screen
Xsaver program. Known to work with either Xlock or xscreensaver.
X
XWWW: http://gkrellshoot.sourceforge.net/
END-of-gkrellshoot2/pkg-descr
echo x - gkrellshoot2/pkg-plist
sed 's/^X//' >gkrellshoot2/pkg-plist << 'END-of-gkrellshoot2/pkg-plist'
Xlibexec/gkrellm2/plugins/gkrellshoot.so
END-of-gkrellshoot2/pkg-plist
exit

-- end --

-Andrew
Comment 4 Mathieu Arnold freebsd_committer freebsd_triage 2003-09-03 08:49:29 UTC
Class Changed
From-To: update->change-request

wrong class
Comment 5 Edwin Groothuis freebsd_committer freebsd_triage 2003-10-10 05:11:54 UTC
State Changed
From-To: open->closed

Commited, thanks!