Bug 47189 - New port: x11/chameleon
Summary: New port: x11/chameleon
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mark Linimon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-18 16:10 UTC by gavin
Modified: 2003-11-15 05:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gavin 2003-01-18 16:10:04 UTC
new port: x11/chameleon

Chameleon is an application which allows the user to put a picture
in any format or a solid color onto the root window. It can be
controlled through a GTK interface, or from the command line.

Note that this is my first attempt at creating a port, so it may be
worth someone giving it a quick check make sure i've done everything
correctly.

Fix: 

http://ury.york.ac.uk/~gavin/chameleon.tgz
How-To-Repeat: 
n/a
Comment 1 corecode@corecode.ath.cx 2003-01-18 17:52:02 UTC
Lately Gavin Atkinson told:

> Note that this is my first attempt at creating a port, so it may be
> worth someone giving it a quick check make sure i've done everything
> correctly.

okay, here we go:
you should try and submit ports as shar; furthermore use portlint to
verify your port.

files/patch-Makefile worked okay but contained some things that could
be addressed:
o use ${INSTALL_DATA}, ${INSTALL_PROGRAM} and ${INSTALL_MAN}
o preserve CFLAGS and use LDFLAGS to link; ${LD} need not always eq ${CC}
see attached diff: i wrote an example Makefile that uses bsd.prog.mk. if
anybody got suggestions about how to cope with that ${DESTDIR} vs
${PREFIX} thingy let me know.
IMO write a Makefile yourself if the port's is screwed too much

your port depends on imlib2 but links with imlib...

welcome to freebsd porters! :)
nice program btw

cheers
  simon

just a quick glance, just to get the impression...

diff -ruN chameleon.old/Makefile chameleon/Makefile
--- chameleon.old/Makefile	Sat Jan 18 16:18:34 2003
+++ chameleon/Makefile	Sat Jan 18 18:38:35 2003
@@ -1,4 +1,4 @@
-# FreeBSD ports collection makefile for:	chameleon
+# New ports collection makefile for:	chameleon
 # Date created:        17 Jan 2003
 # Whom:                Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
 #
@@ -7,23 +7,25 @@
 
 PORTNAME=	chameleon
 PORTVERSION=	1.1
-PORTREVISION=	1
-CATEGORIES+=	x11
-
+CATEGORIES=	x11
 MASTER_SITES=	http://ftp.us.debian.org/debian/pool/main/c/chameleon/ \
-		ftp://carroll.aset.psu.edu/pub/linux/distributions/debian/pool/main/c/chameleon \
+		ftp://carroll.aset.psu.edu/pub/linux/distributions/debian/pool/main/c/chameleon/ \
 		http://www.mirror.ac.uk/sites/ftp.debian.org/debian/pool/main/c/chameleon/ \
 		ftp://ftp.debian.org/debian/pool/main/c/chameleon/
+DISTFILES=	chameleon_${PORTVERSION}.orig${EXTRACT_SUFX}
 
-DISTNAME=	chameleon_${PORTVERSION}.orig
-WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
-
-MAINTAINER?=	gavin.atkinson@ury.york.ac.uk
+MAINTAINER=	gavin.atkinson@ury.york.ac.uk
 
-LIB_DEPENDS=	Imlib2.1:${PORTSDIR}/graphics/imlib2
+LIB_DEPENDS=	Imlib.5:${PORTSDIR}/graphics/imlib
 
 USE_X_PREFIX=	yes
 USE_GTK=	yes
 
-.include <bsd.port.mk>
+MAN1=		chameleon.1
 
+MAKEFILE=	${FILESDIR}/Makefile
+
+post-patch:
+	${GUNZIP_CMD} ${WRKSRC}/${PORTNAME}.1.gz
+
+.include <bsd.port.mk>
diff -ruN chameleon.old/files/Makefile chameleon/files/Makefile
--- chameleon.old/files/Makefile	Thu Jan  1 01:00:00 1970
+++ chameleon/files/Makefile	Sat Jan 18 18:36:19 2003
@@ -0,0 +1,15 @@
+PROG=	chameleon
+SRCS=	chameleon.c info.c setfile.c setname.c setrgb.c
+LDADD=	`imlib-config --libs` `gtk-config --libs`
+CFLAGS+=	`imlib-config --cflags` `gtk-config --cflags`
+
+PREFIX?=	/usr/X11R6
+DESTDIR=	${PREFIX}
+BINDIR=		/bin
+MANDIR=		/man/man
+NOMANCOMPRESS=	yes
+
+FILES=	cham.xpm
+FILESDIR=	/share/pixmaps
+
+.include <bsd.prog.mk>
diff -ruN chameleon.old/files/patch-Makefile chameleon/files/patch-Makefile
--- chameleon.old/files/patch-Makefile	Fri Jan 17 21:51:34 2003
+++ chameleon/files/patch-Makefile	Thu Jan  1 01:00:00 1970
@@ -1,69 +0,0 @@
---- Makefile.orig	Tue Jul 13 00:59:34 1999
-+++ Makefile	Fri Jan 17 20:49:13 2003
-@@ -6,16 +6,10 @@
- # If it gives you trouble, tinker with it a bit.
- 
- 
--CC = gcc
-+CC ?= gcc
- LD = $(CC)
- 
--# this should work fine.
--#CFLAGS = -O2 -pedantic -Wall
--CFLAGS = `imlib-config --cflags` `gtk-config --cflags`
--
--# if 'make' has trouble finding your gtk stuff, and you know that
--# you have it installed, try uncommenting the following line:
--# CFLAGS = -O2 -pedantic -Wall `gtk-config --cflags`
-+OPTIONS = $(CFLAGS) `imlib-config --cflags` `gtk-config --cflags`
- 
- # hope you have all of these...
- # you can get GTK (glib, gtk, gdk) from www.gtk.org
-@@ -29,8 +23,8 @@
- OBJS = chameleon.o setrgb.o setname.o setfile.o info.o
- 
- # this is pretty standard.
--DIR = /usr/X11/bin
--MANDIR = /usr/man/man1
-+DIR = $(PREFIX)/bin
-+MANDIR = $(PREFIX)/man/man1
- 
- # yup, thats me.
- PROG = chameleon
-@@ -38,11 +32,11 @@
- all: $(PROG)
- 
- install: $(PROG)
--	chown root.root $(PROG)
--	chmod 755 $(PROG)
- 	cp -f $(PROG) $(DIR)
-+	chown root:wheel $(DIR)/$(PROG)
-+	chmod 755 $(DIR)/$(PROG)
- 	cp -f chameleon.1.gz $(MANDIR)
--	cp -f cham.xpm /usr/X11R6/include/X11/pixmaps/
-+	cp -f cham.xpm $(PREFIX)/include/X11/pixmaps/
- 
- clean:
- 	rm -f $(PROG) *.o *.core core *.bak *~
-@@ -54,16 +48,16 @@
- 	$(LD) -static -o $(PROG) $(OBJS) $(LIBS)
- 
- chameleon.o: chameleon.c
--	$(CC) $(CFLAGS) -c chameleon.c
-+	$(CC) $(OPTIONS) -c chameleon.c
- 
- setrgb.o: setrgb.c
--	$(CC) $(CFLAGS) -c setrgb.c
-+	$(CC) $(OPTIONS) -c setrgb.c
- 
- setname.o: setname.c
--	$(CC) $(CFLAGS) -c setname.c
-+	$(CC) $(OPTIONS) -c setname.c
- 
- setfile.o: setfile.c
--	$(CC) $(CFLAGS) -c setfile.c
-+	$(CC) $(OPTIONS) -c setfile.c
- 
- info.o: info.c
--	$(CC) $(CFLAGS) -c info.c
-+	$(CC) $(OPTIONS) -c info.c
diff -ruN chameleon.old/pkg-descr chameleon/pkg-descr
--- chameleon.old/pkg-descr	Sat Jan 18 16:33:52 2003
+++ chameleon/pkg-descr	Sat Jan 18 17:48:47 2003
@@ -1,4 +1,3 @@
 Chameleon is an application which allows the user to put a picture
 in any format or a solid color onto the root window. It can be
 controlled through a GTK interface, or from the command line.
-
diff -ruN chameleon.old/pkg-plist chameleon/pkg-plist
--- chameleon.old/pkg-plist	Sat Jan 18 16:34:50 2003
+++ chameleon/pkg-plist	Sat Jan 18 18:37:31 2003
@@ -1,3 +1,2 @@
 bin/chameleon
-man/man1/chameleon.1.gz
-include/X11/pixmaps/cham.xpm
+share/pixmaps/cham.xpm

^^ yea, maybe @unexec rmdir %D/share/pixmaps 2>/dev/null || true

-- 
/"\   http://corecode.ath.cx/#donate
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News
Comment 2 Mark Linimon 2003-11-10 03:19:44 UTC
Is the submitter by any chance still interested in this port?  By
now this is one of the older "new ports" PRs in GNATS.
Comment 3 Gavin Atkinson 2003-11-10 13:17:04 UTC
> -----Original Message-----
> From: Mark Linimon [mailto:linimon@lonesome.com] 
> Sent: 10 November 2003 03:20
> 
> Is the submitter by any chance still interested in this port?  By
> now this is one of the older "new ports" PRs in GNATS.

I am still interested in having it as a port - I use it on a couple of
my machines.

Gavin
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2003-11-11 20:14:43 UTC
Responsible Changed
From-To: freebsd-ports-bugs->linimon

I'll take this one.
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2003-11-15 05:06:16 UTC
State Changed
From-To: open->closed

Committed, thanks.